Zum Hauptinhalt springen

smartIO 8x24 CAN Mapping

CAN Mapping für smartIO 8x24

Definition of CAN messages:
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Syntax:
CAN:Msg MsgId, Period, DataTyp1 [,DataTyp2 [,DataTyp3 [,...]]]


MsgId:
Message Id on the CAN bus (Example: 0x123)

Period:
defines the period of the message [ms, 0..2^24-1].
Special periods:
0: Send on DR event. The message is send when the DR Pin of the ADC signals that new AD data are available
-1: Send when the modul is started. The Message is send CAN:NBOot times with a period of CAN:TINfo
The message start with a delay of CAN:TBOot plus a delay based on the serial number
-2: Like -1, in addition the message is sent on remote request (Delayed based on the serial number)

Unless marked *1* all measurement related data is scaled (and shifted)
with calibration data y = adc * cal:scale + cal:offset according to gain and U/I-Mode
and optional channel polynom v = c[0] y^(n) + c[1] y^(n-1) .. + c[n]

int16, marked *2* has gain dependant scaling unless a channel polynom is specified:
gain 1 2 4 8 16 32 unit
---------- ------ ------ ------ ------ ------ ------ --------
voltage 200 400 800 1600 3200 6400 count/V
current 160 320 640 1280 2560 5120 count/mA
resulting in +/-32000 counts as 100% nom range. If a channel polynom is
specified, its result value is rounded into int16.

DataTyp:
is a number which defines the desired data.
0.. 7: Analog data filtered by EMA data (Tau = 0 => Disables filter) (float)
100.. 107: Moving Average data (float)
200.. 207: RMS Average (float)
300.. 307: Min (float)
400.. 407: Max (float)
1000..1007: Analog data filtered by EMA without scale and offset (int16 / int24, *1*)
1100..1107: Raw AD-Converter data without EMA filter (int16 / int24, *1*)
1900..1907: Unit (Should be the last element because the lenght could change (char[2..4]))
2000..2007: Standard Deviation (float)
2100..2107: Variance (float)
2200..2207: Bit Deviation / bits (float, *1*)

4000..4007: Gain (uint8, see also 8210)
4100..4107: Sallen Key Low Pass filter (uint8, see also 8300)
4200..4207: Current mode (uint8, see also 8301)
4300..4307: Overrange detected since last call (uint8, see also 8110)
4400..4407: One byte with all status bits (uint8: Ovfl{7}, CurM{6}, SaKy{5}, Gain{4-0})

5000..5007: Analog data filtered by EMA data (Tau = 0 => Disables filter) (int16, *2*)
5100..5107: Moving Average data (int16, *2*)
5200..5207: RMS Average (int16, *2*)
5300..5307: Min (int16, *2*)
5400..5407: Max (int16, *2*)

8000 : CPU0 load (uint8)
8001 : CPU1 load (uint8)
8002 : Internal temperatur / 0.1 °C (int16)
8100 : One byte with all Overrange flags since last call (uint8)
8110 : Lost AD data counter (uint16)
8200 : Tau / s (float)
8210 : 3 bytes with all Gains (uint24, Directly from the ADC)
8300 : One byte with all Sallen Key Low Pass filters (uint8)
8301 : One byte with all Current modes (uint8)

9000 : Serial number (uint40)
9001 : HW Version (uint8)
9002 : SW Version (uint16, Firmware_Rev * 100)
9003 : SW Date (uint8[3], YYMMDD (dec))
9004 : SW Time (uint8[2], HHMM (dec))

10### : insert one const byte of value ### (uint8, ### := 0..255)

Examples:
Read all channels with the maximal sample rate:
can:msg 0x0F1, 0, 0, 1; can:msg 0x0F2, 0, 2, 3; can:msg 0x0F3, 0, 4, 5; can:msg 0x0F4, 0, 6, 7

Check in an overrange has occoured in the last second:
can:msg 0x3000, 1000, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307