REXDESKREXGEN 1REXGEN 2REXGEN 2 IMU GNSSREXGEN AirREXGEN ProManual

REXDESK: record CAN, CAN FD and LIN

Updated

Set up a REXGEN to record every message on its CAN, CAN FD and LIN buses, then check the traffic live.

Before you start

A linear CAN bus with a terminator at each end CAN BUS · TOPOLOGY A linear CAN bus with a terminator at each end CAN-H CAN-L 120 Ω terminator 120 Ω terminator ECU ECU Logger Stub: keep it short Logger ground tied to the vehicle ground Terminate only the two physical ends of the bus. With the power off, CAN-H to CAN-L measures about 60 Ω.
The logger taps the bus on a short stub. The two terminators stay at the ends.

REXDESK shows slots for four CAN buses, a LIN bus and the input channels. Use only those your logger has. The specifications guide for your logger lists them. REXGEN 1, for example, has one CAN bus and no LIN.

Log every message

  1. Create a project. Select New Project on the toolbar.
  2. Drop Log All on each bus. Drag Log All from the CAN group of the Tools panel onto CAN0. Repeat for CAN1 to CAN3 as needed, up to four CAN buses.
    The Log All tool dropped on all four CAN slots of the Configuration panel, each slot now holding a Bus icon and a Log All icon
    Each bus that carries Log All records every frame it sees.
  3. Add error frames if you want them. Drop Errors on a bus as well to record its CAN error frames. See CAN error frames below.
  4. Set each bus. Select the Bus icon on each bus and set its type and bit rate. See CAN and CAN FD settings below.
  5. Set the log files. Select Storage under Device Configuration and choose the file length and size.
  6. Connect the logger. Plug it in over USB. The status bar shows the logger status and its time.
  7. Run the configuration. Select Run on the toolbar (or Config > Run > Run Config), then save and name the project. The logger names its log files after the project, loads the configuration and starts logging at once.

Watch: Set up REXGEN series to record CAN data (1:19)

CAN and CAN FD settings

Select the Bus icon on a CAN slot to open its Settings tab.

Two bus settings dialogs side by side: on the left Type CAN at 500 Kbit with the CAN FD options greyed out, on the right Type CANFD with CAN speed 500 Kbit and CAN FD speed 8 Mbit
The same window for a classic CAN bus (left) and a CAN FD bus (right).
Type
CAN for classic CAN, CANFD for CAN FD.
Autodetect bus speed
The logger detects the bit rate itself.
CAN speed
The bit rate of a classic CAN bus, or of the arbitration phase of a CAN FD bus: 100 kbit/s to 1 Mbit/s.
CAN FD speed
The data-phase bit rate of a CAN FD bus: 1 Mbit/s to 8 Mbit/s.
Silent Mode
The logger listens on the bus without taking part in it.
CAN FD Non Iso
For ECUs that use the non-ISO CAN FD frame format. Clear it for ISO CAN FD.
Use Bit Timing
Unlocks Bit Timing, where you set the bus timing yourself for advanced configurations such as a non-standard bit rate.
A classic CAN frame against a CAN FD frame CAN · FRAME FORMATS A classic CAN frame against a CAN FD frame Classic CAN, base format SOF ID, 11 bit RTR IDE r0 DLC Data, 0 to 8 bytes CRC 15 DEL ACK EOF CAN FD, base format Arbitration phase: nominal bit rate Data phase: data bit rate when BRS is set Nominal SOF ID, 11 bit RRS IDE FDF res BRS ESI DLC Data, 0 to 64 bytes Stuff CRC 17/21 DEL ACK EOF SOF start of frame · ID identifier · RTR remote transmission request · IDE identifier extension · r0, res reserved RRS remote request substitution · FDF FD format · BRS bit rate switch · ESI error state indicator · DLC data length code Stuff: stuff bit count · DEL CRC delimiter · ACK acknowledge slot and delimiter · EOF end of frame Field widths are not to scale and stuff bits are not shown. A CRC of 17 bits covers up to 16 data bytes, 21 bits above that.
CAN speed applies to the arbitration phase. CAN FD speed applies to the data phase once the frame switches bit rate.

For the difference between the two protocols, see the Learn article CAN vs CAN FD.

LIN settings

Drag Log All from the LIN group onto the LIN slot to record every LIN frame. To make the logger the LIN master, drop Schedule instead and load the schedule table from your LDF file. Select the LIN bus icon to open its settings.

The LIN settings dialog with Protocol Version 2.0, Baudrate 9600 bit/s, Time Base 5 ms, Time Jitter 1 ms and Master Mode greyed out
Master Mode becomes available once a schedule table is loaded.
Protocol Version
The LIN protocol version of the bus.
Baudrate (bit/s)
The bit rate of the LIN bus.
Time Base (ms)
The LIN time base. Frame slots are scheduled in this unit, usually 5 ms or 10 ms.
Time Jitter (ms)
The timing tolerance allowed for the master node, as given in the LDF file.
Master Mode
Makes the logger the LIN master. It becomes active when you load a schedule table.

Watch: Configure REXGEN to record LIN data (0:59)

New to LIN? Read LIN basics.

Storage settings

Select Storage under Device Configuration to open Master Partition.

The Master Partition dialog opened from the Storage button, with Max Logging Time 1 hour and Max Log Size 100 MB
Storage sets how long and how large each log file can be.
Max Logging Time
The longest time one log file covers.
Max Log Size
The largest size one log file can reach.

REXDESK labels some controls SD, such as Format SD. On current loggers they act on the logger's internal storage.

View live data

  1. Enable Live. Before you run the configuration, check that the Live button under Device Configuration is enabled. Live data works with Log All or with a Filter.
  2. Run the configuration. Send it to the logger as above, with the logger still connected over USB.
  3. Open the live window. Select Live on the toolbar.
  4. Go online. Select Online to start the trace. Select it again to go offline.
The Live Data window in List view, showing time-stamped gyroscope and accelerometer X, Y and Z values
Live data also shows the logger's internal channels, here the IMU.

The window shows the raw trace: time, bus, identifier, flags, data length and data. With a DBC linked to the bus it also shows decoded values. Clear empties the window, Export saves the trace as an .asc file and List switches to a list of parameters.

CAN error frames

With Errors on a bus, the logger records that bus's error frames in the ASAM format. In a trace, an error frame is a row with no identifier and a description in the data column.

A REXDESK trace of CAN 0 in which one row has no identifier, a data length of 0 and the text Bit Stuffing Error, Code: 3, Count: 1
An error frame in a log: error code 3, a bit stuffing error.
CAN error codes in a REXGEN log
Code Error What happened
0 Other An unknown or other error.
1 Bit error A node read back a different bit from the one it sent.
2 Form error A fixed-format field was wrong, for example the end of frame.
3 Bit stuffing error More than five consecutive bits had the same level.
4 CRC error The received CRC did not match the calculated one.
5 Acknowledgement error The transmitter saw no dominant acknowledge bit.

Each error record can also carry two values the logger measures, which never appear on the bus:

FrameDuration
How long the frame took on the bus, in nanoseconds. It runs from the first bit of the start of frame to the end of the error delimiter.
BitPosition
The bit at which the error was found, counted from the start of frame (position 0), ignoring stuff bits.

Watch: Set up REXGEN series to log CAN errors (0:50)

For what causes each error, read CAN errors basics.

Next: REXDESK: download and export your logs.

Products in this guide

REXDESK

Logger setup & data export

View REXDESK Ask an engineer

REXGEN 1

Vehicle black box

View REXGEN 1 Ask an engineer

REXGEN 2

Evidence data logger

View REXGEN 2 Ask an engineer

REXGEN 2 IMU GNSS

Motion & location data logging

View REXGEN 2 IMU GNSS Ask an engineer

REXGEN Air

CAN to cloud

View REXGEN Air Ask an engineer

REXGEN Pro

Edge data platform

View REXGEN Pro Ask an engineer

Still stuck?

Our engineers answer support questions on every Influx Technology product.