Next
ReferenceHardwareICDsImport

Import ICDs

Import the messages of an ICD from a DBC, CSV, or XLSX file.

Import a DBC file, or a CSV or XLSX file with one line for each field, into an ICD. Each message that the file describes becomes a binary message, such as a CAN frame.

Import a file

  1. Create the ICD, or open one.
  2. Click Import at the top of the ICD’s tab. You can also right-click the ICD in the ICDs toolbar and select Import.
  3. Select a .dbc, .csv, or .xlsx file. The extension of the file selects its format.

What an import changes

An import replaces all the messages of the ICD with the messages in the file:

  • A message in the file with the name of a message in the ICD keeps the key of that message. Each of its fields keeps the key of the field with its name. Tasks that read them continue to work.
  • A message or field that the file does not hold is removed from the ICD.

A file that Synnax cannot read stops the import, and the ICD does not change. So does a value that breaks a rule of the ICD’s schema, such as a field with no name. Other problems that a check finds do not stop an import.

DBC files

Synnax makes one message for each BO_ definition in the file, with its CAN ID, and one field for each signal of the message. It skips VECTOR__INDEPENDENT_SIG_MSG, which holds the signals that no message sends.

In the DBC file In the ICD
Message name, or its long name when the file gives one Message name
Signal name, or its long name when the file gives one Field name
Start bit, size, and byte order (@1 Intel, @0 Motorola) Start bit, bit length, and byte order (little endian, big endian)
Factor and offset Scale and offset
Minimum and maximum, unless both are 0 Min and max
Unit Units
Float value type, or signed (-), or unsigned (+) Type: float, integer, or unsigned
Multiplexor signals (M, m<N>, SG_MUL_VAL_) Multiplexor and multiplex values
VFrameFormat, BusType, or a message longer than 8 bytes CAN FD
CANFD_BRS of 1 Bitrate switch
J1939 VFrameFormat or ProtocolType A mask that matches the parameter group

The mask of a J1939 message leaves out the priority and the source address, and for a PDU1 group the destination address. When two messages share a parameter group, the mask keeps the source address. When two PDU1 messages also share a source address, the mask keeps the destination address too.

Synnax skips value tables and value descriptions (VAL_TABLE_, VAL_).

CSV and XLSX files

The first line holds the names of the columns, in any order. Each line after it is one field. Lines with the same message make one message, with their fields in file order. Synnax reads the first sheet of an XLSX workbook, and skips empty lines.

message,id,length,field,start_bit,bit_length,kind,scale,units
Status,0x101,8,state,0,8,,,
Status,0x101,8,temperature,8,16,integer,0.1,degC
Engine,0x200,8,rpm,0,16,unsigned,1,rpm

Columns

Column names are not case sensitive. message, field, start_bit, and bit_length are required.

Column Value Empty means
message The name of the message Required
id The CAN ID, in decimal or in hex with 0x No identifier
extended Whether the ID is extended: true or false (also yes, no, 1, 0) Extended when the ID is > 0x7FF
length The length of the message in bytes Variable length
field The name of the field Required
start_bit The first bit of the field Required
bit_length The number of bits, 1 to 64 Required
byte_order little_endian or intel, big_endian or motorola little_endian
kind float, integer, or unsigned unsigned
scale Multiplies the raw value 1
offset Added after the scale 0
units The units of the value No units
min, max The range of values that a write task accepts No range

id, extended, and length belong to the message. When more than one line of a message gives one of them, the lines must agree.

Problems

Most errors name the row or line of the file. In the Console, an error shows under “Failed to import ICD”. Fix the file and import it again.