LabSat 3 Wideband is capable of listening to, and recording data from, two separate CAN networks. Dual channel CAN Bus data recording with LabSat 3 Wideband can be achieved in two ways. Depending on the mode selected, the CAN signal will be either digitized and re-created on a raw bit level or decoded and recorded in a time-stamped text file. The CAN mode operation is selected under the menu option ‘CAN’ in the SETUP section. When ‘digitized’ mode is selected, the channel is configured in the ‘Digital’ menu.
The ‘Digitize’ mode records CAN data by listening to the bus and sampling the rising and falling edges of the raw signal. Timing codes are inserted into the recorded GPS data so that when the file is replayed LabSat re-creates the digitized CAN signal exactly as it appeared during recording. This mode can therefore be used to capture data along with bus-errors or data-collisions and is synchronised to the RF signal to within approximately 60 nanoseconds. One advantage of this mode is that there is no-need to configure CAN baud rate. During replay, the CAN data can be viewed with a CAN Bus analyser tool such as Vehicle-SPY or CANAlyzer.
When using the digitize method the CAN data is replayed exactly as recorded, there will be no arbitration with other systems during replay. Therefore, if the CAN data is replayed into a system which is transmitting its own CAN data, LabSat will ‘speak’ over the top of the other CAN data. This may cause corruption of some data frames.
LOG FILE mode
Selecting the ‘LOG FILE’ mode of CAN recording enables data to be recorded in an easy to read text log file as shown below.
The log file contains a short header detailing the LabSat serial number, time, date CAN Bus baud settings and GNSS settings. Each line of CAN data recorded contains the following space-delimited information:-
- CHAN - CAN Channel that the data was received on 1 or 2.
- TIME - Timestamp to 1 ms resolution.
- ID - Identifier, ‘x’ suffix is shown for extended CAN IDs.
- DLC - Data length code DLC, this shows the number of data bytes within the CAN frame.
- DATA - Data section, up to 8 bytes of data as indicated by the DLC.
At the end of the log file there will be a summary of the number of CAN messages received on each channel during the recording.
The log file is recorded in the same folder as the RF data and has a .TXT file extension.
During recording, the CAN controller listens to the CAN bus and stores incoming data. LabSat 3 Wideband will transmit acknowledge pulses on the bus in response to correctly received data unless the ‘Silent Record’ option is ticked. The ability to transmit acknowledge pulses in ‘LOG FILE’ mode means that it is possible to record data directly from inertial sensors or other devices with a CAN bus output.
During the replay of data recorded in the ‘LOG FILE’ mode, LabSat 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, LabSat will arbitrate by listening to the current bus state and only transmitting the data between other messages that may be sent from other nodes.
Filtering CAN frames
Filtering of selected CAN frames in the LOG FILE mode can be achieved by creating a file called CANFILTER.TXT in the root directory of the current SD/SSD. An example of the CANFILTER.TXT file is shown below.
The format for the filter file is:-
<CHANNEL><IDENTIFIER><MASK>, for example 1 0x3F1 0x7FF means that channel 1 will allow recording of identifier 0x3F1. The mask value of 0x7FF is a bit-wise mask that is used by the CAN controller to allow a single identifier of a range of identifiers to be recorded. If the mask value was set to 0x7F0, then identifiers from 0x3F0 to 0x3FF would be recorded, not just 0x3F1. Up to 16 identifiers can be defined for each CAN channel.
Please Note: The filter will remain until the CANFILTER.TXT file on the SD card or SSD is manually removed.