REXGEN 1REXGEN 2REXGEN 2 IMU GNSSREXGEN AirREXGEN ProDeveloper

REXGEN XML reference: CAN messages and signals

Updated

Receive and filter CAN frames, transmit your own, forward frames between buses and pack or decode signals inside them.

Messages and signals at a glance

A CANMESSAGE is a frame or a range of frames on one CAN interface. It works in one of three ways:

  • Input: the logger takes frames whose identifiers fall in a range. Other blocks record or forward them.
  • Periodic output: the logger transmits a frame every so many milliseconds.
  • Event output: the logger transmits a frame when another block fires.

A CANSIGNAL is one value inside a frame. It either takes a value from a source block and writes it into an output message, or reads a value out of a received message. Each block takes a UID attribute (required and unique in the file) and the optional Version, X and Y. Each entry in the settings lists gives the meaning, then whether the schema requires the element, its type and its default where one exists.

CAN messages (CANMESSAGE_LIST)

CANMESSAGE

This pair comes from Gateway_CAN0_to_CAN1.xml. Message 3, an input, takes every frame arriving on CAN 0 (the interface with UID 1). Message 4, an output, names message 3 as its input and sends each frame out on CAN 1 (the interface with UID 2).

<CANMESSAGE UID="3">
  <MessageIdentStart>0</MessageIdentStart>
  <MessageIdentEnd>4294967295</MessageIdentEnd>
  <Direction>Input</Direction>
  <DLC>8</DLC>
  <IsExtended>false</IsExtended>
  <InterfaceUID>1</InterfaceUID>
  <Period>0</Period>
  <TriggeringMessageUniqueID>0</TriggeringMessageUniqueID>
  <DefaultHex>0000000000000000</DefaultHex>
  <CANFD_Option>NORMAL_CAN</CANFD_Option>
  <InputMessageUID>0</InputMessageUID>
  <Name>Log All</Name>
  <isJ1939>false</isJ1939>
  <J1939Source>0</J1939Source>
  <J1939Destination>0</J1939Destination>
  <Downsampling>0</Downsampling>
  <Delay>0</Delay>
  <NextOutputMessageID>0</NextOutputMessageID>
</CANMESSAGE>
<CANMESSAGE UID="4">
  <MessageIdentStart>0</MessageIdentStart>
  <MessageIdentEnd>4294967295</MessageIdentEnd>
  <Direction>OutputPeriodic</Direction>
  <DLC>8</DLC>
  <IsExtended>false</IsExtended>
  <InterfaceUID>2</InterfaceUID>
  <Period>100</Period>
  <TriggeringMessageUniqueID>0</TriggeringMessageUniqueID>
  <DefaultHex>0000000000000000</DefaultHex>
  <CANFD_Option>NORMAL_CAN</CANFD_Option>
  <InputMessageUID>3</InputMessageUID>
  <Name/>
  <isJ1939>false</isJ1939>
  <J1939Source>0</J1939Source>
  <J1939Destination>0</J1939Destination>
  <Downsampling>0</Downsampling>
  <Delay>0</Delay>
  <NextOutputMessageID>0</NextOutputMessageID>
</CANMESSAGE>
MessageIdentStart, MessageIdentEnd
Identifier range, in decimal. An input takes every frame whose identifier falls in the range. 0 to 4294967295 takes all of them. An output sends one identifier, so both values are the same. Required. Unsigned int.
Direction
Input (receive), OutputPeriodic (send every Period) or OutputEvent (send when the block in TriggeringMessageUniqueID fires). Required. Default Input.
InterfaceUID
UID of the CANINTERFACE the message belongs to. Required. Unsigned short.
DLC
Data length code of the frame. Use 8 for a full classic CAN frame. Required. Unsigned byte.
Period
Milliseconds between transmissions of an OutputPeriodic message. 0 for inputs. Required. Unsigned int.
CANFD_Option
Frame format: NORMAL_CAN (classic), FD_CAN or FD_FAST_CAN (both CAN FD). FD_FAST_CAN uses bit rate switching. Required. Default NORMAL_CAN.
IsExtended
true for 29-bit identifiers, false for 11-bit. Optional. Boolean. Default false.
DefaultHex
The payload an output sends before any signal writes into it, two hexadecimal digits per byte. For example 0000000000000000. Optional. Type hexBinary.
TriggeringMessageUniqueID
UID of the block whose event sends an OutputEvent message, or 0 for none. Optional. Unsigned short. Default 0.
InputMessageUID
On an output, the UID of an input message whose frames it forwards, or 0 for none. This is how a gateway works. Optional. Unsigned short. Default 0.
Name
A name for the message, carried into post-processing. Optional. String.
isJ1939
true filters J1939 traffic by the addresses in J1939Source and J1939Destination. The name starts with a lower-case i. Optional. Boolean. Default false.
J1939Source, J1939Destination
J1939 source and destination addresses to filter on. Optional. Unsigned byte. Default 0.
Downsampling
Downsampling interval in milliseconds. 0 disables it. Optional. Unsigned int. Default 0.
Delay
Delay in milliseconds before the logger sends the message. Optional. Unsigned int. Default 0.
NextOutputMessageID
Links this output message to the next one in a sequence, or 0 for none. Optional. Unsigned short. Default 0.
Protocol_Type
Marks a message that belongs to a diagnostic exchange: NO, UDS or XCP. Diagnostics are not covered in this series yet. Optional. Default NO.
ResponseUID, ResponseTimeout, ResponseAttempts, ResponseObligatory
Request and response handling for diagnostic messages. The message waits for the response named in ResponseUID. If none arrives within ResponseTimeout milliseconds, the logger sends the message again. With ResponseObligatory true, the sequence waits for the response. With false, it moves on after the timeout. Optional.
CANMessage_Custom
Up to eight entries of Algorithm, BytePosition and DataSize. Optional.

Signals (CANSIGNAL_LIST)

CANSIGNAL

A signal works in one of two directions, set by InputType:

  • COMMON takes the value of the block named in InputUID and writes it into the output message named in MessageUID. The source can be an analogue input, a GNSS message, an internal parameter or another signal.
  • MESSAGE reads the value out of the received message named in InputUID and MessageUID.

This pair, from Gateway_CAN0_CAN1_Signal.xml, reads a 16-bit value from input message 4 (signal 6) and writes it into output message 3 (signal 8).

<CANSIGNAL UID="6">
  <InputType>MESSAGE</InputType>
  <InputUID>4</InputUID>
  <MessageUID>4</MessageUID>
  <StartBit>0</StartBit>
  <BitCount>16</BitCount>
  <Endian>INTEL</Endian>
  <DefaultValue>0</DefaultValue>
  <ParA>1</ParA>
  <ParB>0</ParB>
  <SignalType>UNSIGNED</SignalType>
  <Name>Signal1</Name>
</CANSIGNAL>
<CANSIGNAL UID="8">
  <InputType>COMMON</InputType>
  <InputUID>6</InputUID>
  <MessageUID>3</MessageUID>
  <StartBit>0</StartBit>
  <BitCount>16</BitCount>
  <Endian>INTEL</Endian>
  <DefaultValue>0</DefaultValue>
  <ParA>1</ParA>
  <ParB>0</ParB>
  <SignalType>UNSIGNED</SignalType>
  <Name>Signal1</Name>
</CANSIGNAL>
InputType
COMMON or MESSAGE. Required.
InputUID
Where the value comes from: the source block for COMMON, the received message for MESSAGE. Required. Unsigned short.
MessageUID
The message the signal sits in: the output message for COMMON, the received message for MESSAGE. Required. Unsigned short.
StartBit
Position of the signal in the payload, numbered as in a DBC file. The RTC example's StartBit 7 with MOTOROLA matches 7|32@0+ in its DBC. Required. Unsigned short.
BitCount
Length of the signal in bits. Required. Unsigned byte.
Endian
Byte order: INTEL (little-endian) or MOTOROLA (big-endian). Required.
SignalType
How the bits are read: UNSIGNED, SIGNED, FLOAT32 or FLOAT64. Required.
ParA, ParB
Factor and offset, as in a DBC file: physical value = raw value × ParA + ParB. The example files use the same factor in the XML and in their DBC, so a tool reading the DBC gets the physical value back. Required. Float. Default 1 and 0.
DefaultValue
The value the logger uses before the source produces one. Optional. Float. Default 0.
Name
Signal name. Optional. String.
COMMENT
Free text. Optional. String.
Where INTEL and MOTOROLA signals sit in the payload CAN · SIGNAL BIT LAYOUT Where INTEL and MOTOROLA signals sit in the payload INTEL (little-endian) StartBit 0, BitCount 16 as ADC_0 in ADC2CAN_Only.xml 7 6 5 4 3 2 1 0 bit Byte 0 low byte Byte 1 high byte Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 76543210LSB15MSB141312111098232221201918171631302928272625243938373635343332474645444342414055545352515049486362616059585756 MOTOROLA (big-endian) StartBit 7, BitCount 32 as RTC in RTC2CAN.xml, 7|32@0+ in its DBC 7 6 5 4 3 2 1 0 bit Byte 0 high byte Byte 1 Byte 2 Byte 3 low byte Byte 4 Byte 5 Byte 6 Byte 7 7MSB65432101514131211109823222120191817163130292827262524LSB3938373635343332474645444342414055545352515049486362616059585756 Bit numbers follow the DBC layout: bit 0 is the lowest bit of byte 0. StartBit names the LSB for INTEL and the MSB for MOTOROLA. The arrow beside each grid runs from the most significant byte to the least: INTEL puts the low byte first, MOTOROLA the high byte.

These Learn articles explain start bits, byte order and scaling:

How the blocks chain together

  • Send a sensor value on CAN: sensor block, then a COMMON signal, then an OutputPeriodic message on a CANINTERFACE.
  • Forward whole frames: an Input message on one interface, then an output message on another with InputMessageUID pointing back at it.
  • Forward chosen signals: an Input message, a MESSAGE signal to decode the value, then a COMMON signal that writes it into an output message.

These guides show each chain in a complete file:

Next: REXGEN XML reference: LIN interfaces and messages.

Products in this guide

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.