Logging Functionality in Canoe

Author: Manzoor Abdul Jaffar

Logging Feature is a facility available in Canoe to record the activities and events happening in Canoe Environment. This includes Trace window, CAPL Events, Diagnostic Requests etc.

The Relevance of this functionality can be:

  • During the Testing, it is very important to have proof for the testing performed. The proof should be evident enough to understand test request, response, timing, other environment Status and dependent Signal/Variable values etc.
  • Test case and response may need to evaluate on a later situation, and it will be difficult to recreate the Test Environment. Like the test bench shall be connected to ECU with proper software, all the license and hardware shall be present and mostly the time required to set up all these will be also a concern.

So, with this Logging feature, we can record the simulation, and can be shared as a file. And this file can be opened on other machines and can evaluate the test performed before. So, this Log file can be used by the tester itself in case of further analyse on the Communication Flow or timings etc. As we mentioned, this file can be shared as a proof to mention that the test case is performed, and the result obtained is so and so.

To Discuss on a real time scenario, lets take an example of CAN TP Module which is responsible to handle can Frame more than 8 bytes of Data. To test this, the Manual Steps shall be

  • Send the First Frame from IG Block in Proper Frame Format for Multi Frame
  • Confirm the Flow Control Message Received on Trace (Either From ECU, or any simulated CAPL Node)
  • Then we send Consecutive frames
  • Based on the block size provided in first Frame, we need to confirm the Flow control messages are received in proper intervals.

In the Above Scenario, we can write CAPL Script or Test Script to Automate the Testing and get the Test Report Generated as proof. But on a later situation, if we need to evaluate some thing extra which was not part of test script, then it will not be possible by this way. And it will be difficult in certain situation to write test script especially on complex testing scenario where multiple information and conditions are concerned. So as an Alternative, we can use the logger to record the Trace. And this can be used to analyse and share the trace/graph log for later situations as well.

Another Use case of Logged file is, we can switch the simulation to Offline Mode and Configure the Logged file as source for simulation instead of Real ECU (ECUs connected to Canoe Hardware). In this way, we can visualise/recreate the same events and communication happened during recording of the Log File. For this, we Need to Load recorded Log File as source in Offline Mode (In Analysis Tab). All the Messages we sent from IG and Their Responses, and other communication happened are visible in trace and Graphics as same as how it was during Live ECU Simulation (recording). We can do step by step simulation as well on this.

The Above Diagram shows, how the Measurement setup works on general Canoe Configuration, here the Logging module is also connected to Network where rest of Modules like Data, Trace, Graphics are connected. So, whatever Data received on these Modules will be received on Logging module as well. And the same will be recorded.

How to Use Logger Module in Canoe?

To Add Logging Module:

  • There are 2 Ways add Logging module
    • Go to Simulation Setup and then Turn the Logging module as Active (Click on the Square in Between). If it is not present, we can create New by right Clicking.
    • In the Analysis Tab, we can see Logging button, on the Drop Down we can click on tick to activate the corresponding Logger.
  • We can configure multiple options related to logging (Not Mandatory to alter)
    • Which Format the recording shall be exported (Generic are: mf4, blf)
    • The Path to store the logged file
    • What are all the events to be recorded (Like CAN Events, Communication, etc)
    • Is it needs to record the whole simulation, or any single test case etc

To Start/Stop the Recording:

  • We Start our simulation on Online Mode and confirm the Logger is Active and recording is turned on. if it Configured to record complete simulation, recording will be turned on once we start simulation. If already a log file is present with same name, then it will ask for an overwrite confirmation pop up window.
  • Once we stop the simulation, it will store the log file in mentioned path.
  • We can manually start and pause recording during Simulation. For this go to Logging Module (Analysis Tab), and from the Drop down list control the necessary logging.

How to See the Log File in Canoe

  • One way: Drag and Drop to Canoe
    • Open Any Canoe configuration and Drag and Drop the Log file to Trace or Graph etc to see the Log.
  • Another way is to feed the log file as input to Offline mode
    • Open Offline Mode (Analyse Tab) and Add the Log File as input this (Confirm the Tick is present)
    • Ensure same log file is not configured in Logging module (For Recording, either give separate name, or disable during Offline Mode)
    • Switch to Offline Mode (Home Tab)
    • Start Simulation, you can see the Trace and All getting updated as same as the recorded condition.
    • We can Actually put filters, toggle view, change view perspective (CAN, Initial, J1939, Ethernet, etc) etc.
Shopping Cart
WhatsApp chat