REXGEN 1REXGEN 2REXGEN 2 IMU GNSSREXGEN AirREXGEN ProDeveloper

REXGEN XML reference: recording (SD) and USB outputs

Updated

Choose what the logger records, when recording starts and stops, how files are split and what streams live to REXDESK over USB.

Recording blocks at a glance

The "SD" in these element names is historical. Every REXGEN logger records to internal storage (eMMC). There is no card to insert. Recording uses two kinds of block:

  • SDINTERFACE is the recorder: file size and length, triggers, pre and post-trigger time. The schema allows up to four.
  • SDMESSAGE names one thing to record and the SDINTERFACE that records it. Add one for each message or sensor block.

If the file has no SDINTERFACE, the logger writes nothing to storage. Live data over USB works the same way: one USBINTERFACE and one USBMESSAGE for each stream. Every 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.

Recorders (SDINTERFACE_LIST)

SDINTERFACE

This recorder records from power-on, starts a new file every 100 MiB or every hour and keeps no pre or post-trigger data.

<SDINTERFACE UID="2">
  <MaxLogSize>104857600</MaxLogSize>
  <MaxLogTime>3600</MaxLogTime>
  <LogFormat>InfluxGeneric1</LogFormat>
  <PreLogTime>0</PreLogTime>
  <PostLogTime>0</PostLogTime>
  <IsPostTimeFromEnableStart>true</IsPostTimeFromEnableStart>
  <NumberOfLogs>0</NumberOfLogs>
  <IsEnableCreateNewLog>false</IsEnableCreateNewLog>
  <InitialEnableState>true</InitialEnableState>
  <EnableUID>0</EnableUID>
  <DisableUID>0</DisableUID>
  <PartitionID>0</PartitionID>
</SDINTERFACE>
MaxLogSize
Maximum size of one log file in bytes. When a file reaches it, the logger starts a new file. For example 104857600 (100 MiB). Required. Unsigned int.
MaxLogTime
Maximum duration of one log file in seconds. When a file reaches it, the logger starts a new file. For example 3600. Required. Unsigned int.
LogFormat
File format of the log. The only allowed value is InfluxGeneric1. Required.
NumberOfLogs
Maximum number of log files the logger creates. 0 means no limit other than the storage. 1 means a single file. Required. Unsigned int.
InitialEnableState
true records from power-on. false waits for the event named in EnableUID. Required. Boolean.
EnableUID
UID of the block whose event starts recording, for example a trigger. 0 means none. Optional. Unsigned short.
DisableUID
UID of the block whose event stops recording. 0 means none. Optional. Unsigned short.
EnableUID_LIST, DisableUID_LIST
Several start or stop sources, each an EnableUID or DisableUID child. The example files do not use them. Optional.
IsEnableCreateNewLog
true starts a new file each time recording is enabled, so every event gets its own file. Required. Boolean. Default false.
PreLogTime
Milliseconds of data from before the enable event that the logger keeps in the file. 0 means no pre-trigger data. Required. Unsigned int.
PostLogTime
Milliseconds the logger keeps recording after the trigger. Required. Unsigned int.
IsPostTimeFromEnableStart
Where PostLogTime is counted from: true from the start of the enable event, false from its end. Required. Boolean.
PostLogContinuous
When true, recording continues past PostLogTime until a size, time or other limit stops it. Optional. Boolean. Default true.
PostLogOnlyOnEnable
When true, post-trigger recording happens only when recording was explicitly enabled, not in always-on recording. Optional. Boolean. Default false.
PartitionID
Storage partition to write to. The main partition is 0. A value above 0 needs storage formatted with partitions. Use 0. Required. Unsigned byte.

How pre and post-trigger time work together

When a trigger enables recording, the logger first adds PreLogTime of buffered data from before the event. It then records through the event and keeps recording for PostLogTime. IsPostTimeFromEnableStart moves the start of that post-trigger count. IsEnableCreateNewLog puts each event in its own file.

What PreLogTime and PostLogTime record REXGEN XML · PRE AND POST-TRIGGER What PreLogTime and PostLogTime record Event 1 start end Disable Event 2 Enable event EnableUID Disable event DisableUID From the event start IsPostTimeFromEnableStart true From the event end IsPostTimeFromEnableStart false Past PostLogTime PostLogContinuous true Until the disable event a DisableUID block A file per event IsEnableCreateNewLog true PostLogTime PostLogTime until a size, time or other limit recording File 1 File 2 PreLogTime time PreLogTime data from the buffer Recording Event active (raised) Not to scale. Each row shows one setting on its own; the rows that stop at PostLogTime assume PostLogContinuous false. PreLogTime and PostLogTime are in milliseconds. Engineering to confirm this timing, including how PostLogTime 0 works with PostLogContinuous.

The triggers themselves are easiest to build in REXDESK. See REXDESK: start and stop logging with triggers.

What to record (SDMESSAGE_LIST)

SDMESSAGE

Each SDMESSAGE records one block through one recorder. This one, from ADC2CAN_SD.xml, records analogue input block 8 through recorder 2.

<SDMESSAGE UID="18">
  <MessageIdentStart>0</MessageIdentStart>
  <MessageIdentEnd>4294967295</MessageIdentEnd>
  <Direction>OutputPeriodic</Direction>
  <DLC>8</DLC>
  <IsExtended>false</IsExtended>
  <InterfaceUID>2</InterfaceUID>
  <Period>0</Period>
  <TriggeringMessageUniqueID>0</TriggeringMessageUniqueID>
  <DefaultHex>0000000000000000</DefaultHex>
  <InputMessageUID>8</InputMessageUID>
</SDMESSAGE>
InputMessageUID
UID of the block to record: a CANMESSAGE, an analogue, IMU or GNSS block. Required. Unsigned short.
InterfaceUID
UID of the SDINTERFACE that writes it. Required. Unsigned short.
Period
Period in milliseconds. Every example sets 0. Required. Unsigned int.
MessageIdentStart, MessageIdentEnd
Required by the schema and ignored by the logger. Filter CAN identifiers on the CANMESSAGE instead. Use 0 and 4294967295. Unsigned int.
Direction
Required by the schema and ignored by the logger. Use OutputPeriodic.
DLC
Required by the schema and ignored by the logger. Use 8. Unsigned byte.
IsExtended
Deprecated, still required by the schema. Use false. Boolean.
TriggeringMessageUniqueID
Required by the schema and ignored by the logger. Use 0. Unsigned short.
DefaultHex
A default payload, two hexadecimal digits per byte. The examples set 0000000000000000. Optional.

Live data over USB (USBINTERFACE_LIST and USBMESSAGE_LIST)

A USBINTERFACE enables the USB live view, which REXDESK uses to show data while the logger is connected. The schema allows one. It works on models with a USB PC connection: REXGEN 1, REXGEN 2, REXGEN 2 IMU GNSS and REXGEN Air with the factory USB option.

USBINTERFACE

The block has no children, only its attributes.

<USBINTERFACE UID="3"/>

USBMESSAGE

Each USBMESSAGE streams one block. This one, from ADC2CAN_SD.xml, streams analogue input block 8.

<USBMESSAGE UID="20">
  <MessageIdentStart>0</MessageIdentStart>
  <MessageIdentEnd>4294967295</MessageIdentEnd>
  <Direction>OutputPeriodic</Direction>
  <DLC>8</DLC>
  <IsExtended>false</IsExtended>
  <InterfaceUID>3</InterfaceUID>
  <Period>0</Period>
  <DefaultHex>0000000000000000</DefaultHex>
  <InputUID>8</InputUID>
</USBMESSAGE>
InputUID
UID of the block whose data the logger streams, for example a CANMESSAGE or an analogue block. Required. Unsigned short.
InterfaceUID
UID of the USBINTERFACE. Required. Unsigned short.
MessageIdentStart, MessageIdentEnd
Range of CAN identifiers to stream, in decimal. 0 to 4294967295 streams everything. Required. Unsigned int.
Direction
Input, OutputEvent or OutputPeriodic. The example files use Input for a CAN message and OutputPeriodic for sensor values. Required.
Period
Transmit period in milliseconds, used only with OutputPeriodic. Required. Unsigned int.
DLC
Data length of the message. The examples set 8. Required. Unsigned byte.
IsExtended
Deprecated, still required by the schema. Use false. Boolean.
DefaultHex
A default payload, two hexadecimal digits per byte. Optional.

Putting it together

To record a sensor and stream it, name the sensor block's UID in an SDMESSAGE (record) and in a USBMESSAGE (stream). To send it on the bus as well, name it in a CANSIGNAL too. The "with recording" example files do exactly that. See REXGEN XML examples: GNSS, IMU, analogue and RTC data onto CAN.

To get the recorded files off the logger, see REXDESK: download and export your logs.

Next: REXGEN XML reference: CAN interfaces and bit timing.

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.