Skip to main content
RACELOGIC Support Centre

Recording and Replaying CAN Data

This page contains step-by-step instructions for how to connect to, record and replay CAN data with LabSat 4 Record & Replay variants.

LabSat 4 Record & Replay variants (LabSat 4 and LabSat 4 Core) can record and replay CAN data in addition to GNSS signal data. 

Model Limitations

LabSat 4 Lite models cannot record or replay CAN data.

There are two methods you can use to record CAN:

  • A digitized mode where LabSat 4 samples the raw logic level transitions of the CAN data and reconstructs the signal during replay
  • A log file mode, where LabSat 4 receives CAN data and stores the data in a readable text file.
     

You can use log file mode and digitize mode simultaneously to record data and then choose whether to replay it as digitized or as logged data.

You can see the differences between the Digitized mode and the Log file mode below:

  Strengths Weaknesses
Digitized Mode
  • No need to configure baud rate
  • Very accurate timing
  • Captures all bus events
  • No readable log file
Log File Mode
  • Produces readable text file with time stamping
  • Files can be modified to produce test conditions
  • Original message timing is not perfectly reproduced
  • Does not capture all bus events
Digitized 

In digitized mode, the data level is sampled and stored in synchronisation with the recorded GNSS data. When replayed, the levels are recreated and output via a voltage level shifter to the CAN output of LabSat 4. The benefit of this method is that you are not required to configure the baud rate. You can also use this method to capture binary data that does not use the ASCII format.

Recording 
  1. Connect the CAN1 High and CAN1 Low ports of the expansion connector to the appropriate wires/cable.
  2. Connect the LabSat 4 antenna (RLACS354) to the RF IN port.
  3. Connect the expansion connector to the Expansion port on the rear panel of LabSat 4.
  4. Power up LabSat 4 and navigate to the Digital menu in the Setup menu.

    Menu -> Setup -> Digital -> CH1/CH2/CH3/CH4
     
  5. Select CAN1/CAN2.
  6. Exit the menu.
  7. Press the REC button on the front of LabSat 4 to begin the recording.

    LabSat 4 will record all CAN data available on the connected CAN bus.

 

LabSat4_Recording_DigitizedFile_750px.png

Replaying 
  1. Connect from the CAN1 High and CAN1 Low ports of the expansion connector to the appropriate wires/port on the device under test.
  2. Connect the device under test to the RF OUT port on the rear panel on LabSat 4.
  3. Connect the expansion connector to the Expansion port on the rear panel on LabSat 4.
  4. Power up LabSat 4 and select the previously recorded CAN scenario file.
  5. Press the Play button on the front of LabSat 4 to begin the playback.

    LabSat 4 will replay all CAN data originally recorded.

LabSat4_Replaying_DigitizedFile_750px.png

IMPORTANT

If the recording contains CAN 1 and CAN 2 at the same time, you must replay with both CAN 1 and CAN 2 ports connected. 

If you replay this recording with only CAN1 OR CAN2 connected, no CAN data will be replayed, and the replay may stall.

Log File  

Selecting the 'LOG FILE' mode for CAN recording enables data to be recorded in an easy-to-read text log file. 

During recording, the CAN controller listens to the CAN bus and stores incoming data. LabSat 4 will transmit acknowledge pulses on the bus in response to correctly received data unless you disable the Enable Acknowledge option in the Setup menu. The ability to transmit acknowledge pulses in ‘LOG FILE’ mode means it can record data directly from inertial sensors or other devices with a CAN bus output. 

Because Log File data is received and processed by LabSat 4, you must configure the correct data or baud rate on LabSat 4. 

Note: There will be some variation in data output timing when compared to the recorded timing.

During the replay of data recorded in the ‘LOG FILE’ mode, the LabSat 4 unit scans through the log file, sending the CAN data at the time intervals indicated by the time-stamp. Because CAN data is transmitted using an active CAN Bus controller, the LabSat 4 unit will arbitrate by listening to the current bus state and only transmit the data between messages that may be sent from other nodes.

The log file contains a header detailing the LabSat unit's serial number, time, date, CAN bus baud settings and GNSS settings. At the end of the log file, it has a summary of the number of CAN messages received on each channel during the recording.

Each line of CAN data recorded contains the following space-delimited information:

  1. CHAN - the CAN Channel the data was received on, 1 or 2.
  2. TIME - Timestamp to 1 ms resolution.
  3. ID - Identifier, ‘x’ suffix is shown for extended CAN IDs.
  4. DLC - Data length code DLC, this shows the number of data bytes within the CAN frame.
  5. DATA - Data section, up to 8 bytes of data as indicated by the DLC.

The log file is recorded in the same folder as the RF data and has a .TXT file extension.

Log File Example.png

Example of a log file

Once a log file has been created, you can modify it by using a text editor application such as Notepad to change the replayed output.

IMPORTANT

Take care when you configure the CAN bus settings, as incorrect settings can lead to bus errors or crashes. 

Recording 
  1. Connect the CAN1 High and CAN1 Low ports of the expansion connector to the appropriate wires/cable.
  2. Connect the LabSat 4 antenna (RLACS354) to the RF IN port on the rear panel of LabSat 4.
  3. Power up LabSat 4 and navigate to the CAN section of the menu.

    Menu -> Setup -> CAN -> Log File
     
  4. Press the OK button with Log File highlighted to enable it.
  5. Set the baud rate for both the CAN channels.

    Menu -> Setup -> CAN -> CAN1/CAN2
     
  6. Exit the menu.
  7. Connect the expansion connector to the Expansion port on LabSat 4.
  8. Press the REC button on the front of LabSat 4 to start the recording.

    LabSat 4 will record all CAN data available on the connected CAN bus.

LabSat4_Recording_DigitizedFile_750px.png

Replaying 
  1. Connect from the CAN1 High and CAN1 Low ports of the expansion connector to the appropriate wires/port on your device under test. 
  2. Connect the device under test to the RF OUT port on the LabSat 4.
  3. Connect the expansion connector to the Expansion port on the rear panel of LabSat 4.
  4. Power up the LabSat 4 and navigate to the CAN menu in the Setup menu.

    Menu -> Setup -> CAN -> REPLAY Log File
     
  5. Press the OK button with Replay Log file highlighted to enable it.
  6. Exit the menu. 
  7. Highlight the relevant scenario file on the File Selection Screen.
  8. Press the Play button on the front of LabSat 4 to start the replay.

    LabSat 4 will replay all CAN data originally recorded.

LabSat4_Replaying_DigitizedFile_750px.png

IMPORTANT

If the recording contains CAN 1 and CAN 2 at the same time, you must replay with both CAN 1 and CAN 2 ports connected. 

If you replay this recording with only CAN1 OR CAN2 connected, no CAN data will be replayed, and the replay may stall.

  • Was this article helpful?