CAN Bus Data Channels

Can Bus Data Channel Properties
Label
  • Freely editable channel name
 
Message ID hex
  • The id of the can bus message that contains the channel information. Can be 11 or 29 bit.
 
Start Byte
  • The can bus message byte where the channel information starts
 
Length
  • The can bus channel length in bytes in the can bus message.
  • If the length is not a byte multiple then an appropriate Mask must be used
 
Byte Order    
  • Defines the order of the bytes if the length is larger than 1 byte.
 
Mask hex    
  • A hexadecimal mask that is applied to the raw channel bytes using a binary AND function.
 
Sign          
  • When set to SIGNED the raw channel value is decoded as a 2s complement number.
  • The sign bit can only be at bit positions 7,15,23,31 of the raw channel value.
 
Multiplier         
  • Used in equation to convert bits to device internal units.
 
Divisor
  • Used in equation to convert bits to device internal units.
  • Can also be used to right shift a partial bitfield. ex divisor = 64 is equivalent to >> 6
     
    Offset
  • Used in equation to convert bits to device internal units.
     
    Compound Format
  • When enabled the first byte of the message must match the Compound Byte ID for the channel to be decoded
  • The compound message or message with row counter format is used to allow sending many channels on the same can id.
     
    Internal Units
    Defines the bit resolution of the channel value as stored in the device. Ex Temperaturex0.1degC means that each bit is equal to 0.1degC.
    Display Units
  • Defines how the channel value is converted from internal units for display on the device and in the data analysis software.
 
Decoding Procedure
  • The device receives a message with an ID that matches the channel ID
  • A raw value is built using LENGTH bytes starting at START BYTE.
  • The bytes are ordered according to the BYTE ORDER setting.
  • The mask is applied. value = raw_value & mask
  • If the channel is SIGNED then the value is converted to a signed number.
  • The factors equation is applied: ((value * MULTIPLIER) / DIVISOR) + OFFSET = value in
  • The final value in Internal Units is stored and logged.
  • The conversion to display units is done when the value is displayed so it can be changed at any time