REXGEN 1REXGEN 2REXGEN 2 IMU GNSSREXGEN AirREXGEN ProDeveloper
REXGEN XML reference: CAN messages and signals
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.
0to4294967295takes all of them. An output sends one identifier, so both values are the same. Required. Unsigned int. Direction-
Input(receive),OutputPeriodic(send everyPeriod) orOutputEvent(send when the block inTriggeringMessageUniqueIDfires). Required. DefaultInput. InterfaceUID- UID of the
CANINTERFACEthe message belongs to. Required. Unsigned short. DLC- Data length code of the frame. Use
8for a full classic CAN frame. Required. Unsigned byte. Period- Milliseconds between transmissions of an
OutputPeriodicmessage.0for inputs. Required. Unsigned int. CANFD_Option- Frame format:
NORMAL_CAN(classic),FD_CANorFD_FAST_CAN(both CAN FD).FD_FAST_CANuses bit rate switching. Required. DefaultNORMAL_CAN. IsExtended-
truefor 29-bit identifiers,falsefor 11-bit. Optional. Boolean. Defaultfalse. 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
OutputEventmessage, or0for none. Optional. Unsigned short. Default0. InputMessageUID- On an output, the UID of an input message whose frames it forwards, or
0for none. This is how a gateway works. Optional. Unsigned short. Default0. Name- A name for the message, carried into post-processing. Optional. String.
isJ1939-
truefilters J1939 traffic by the addresses inJ1939SourceandJ1939Destination. The name starts with a lower-casei. Optional. Boolean. Defaultfalse. -
J1939Source,J1939Destination - J1939 source and destination addresses to filter on. Optional. Unsigned byte. Default
0. Downsampling- Downsampling interval in milliseconds.
0disables it. Optional. Unsigned int. Default0. 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
0for none. Optional. Unsigned short. Default0. Protocol_Type- Marks a message that belongs to a diagnostic exchange:
NO,UDSorXCP. Diagnostics are not covered in this series yet. Optional. DefaultNO. -
ResponseUID,ResponseTimeout,ResponseAttempts,ResponseObligatory - Request and response handling for diagnostic messages. The message waits for the response named in
ResponseUID. If none arrives withinResponseTimeoutmilliseconds, the logger sends the message again. WithResponseObligatorytrue, the sequence waits for the response. Withfalse, it moves on after the timeout. Optional. CANMessage_Custom- Up to eight entries of
Algorithm,BytePositionandDataSize. Optional.
Signals (CANSIGNAL_LIST)
CANSIGNAL
A signal works in one of two directions, set by InputType:
-
COMMONtakes the value of the block named inInputUIDand writes it into the output message named inMessageUID. The source can be an analogue input, a GNSS message, an internal parameter or another signal. -
MESSAGEreads the value out of the received message named inInputUIDandMessageUID.
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-
COMMONorMESSAGE. Required. InputUID- Where the value comes from: the source block for
COMMON, the received message forMESSAGE. Required. Unsigned short. MessageUID- The message the signal sits in: the output message for
COMMON, the received message forMESSAGE. Required. Unsigned short. StartBit- Position of the signal in the payload, numbered as in a DBC file. The RTC example's
StartBit7withMOTOROLAmatches7|32@0+in its DBC. Required. Unsigned short. BitCount- Length of the signal in bits. Required. Unsigned byte.
Endian- Byte order:
INTEL(little-endian) orMOTOROLA(big-endian). Required. SignalType- How the bits are read:
UNSIGNED,SIGNED,FLOAT32orFLOAT64. 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
1and0. 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.
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
COMMONsignal, then anOutputPeriodicmessage on aCANINTERFACE. -
Forward whole frames: an
Inputmessage on one interface, then an output message on another withInputMessageUIDpointing back at it. -
Forward chosen signals: an
Inputmessage, aMESSAGEsignal to decode the value, then aCOMMONsignal that writes it into an output message.
These guides show each chain in a complete file:
Products in this guide
Still stuck?
Our engineers answer support questions on every Influx Technology product.