|
Four 1Volt/100mV Input Module Command / Reply / Event messages V2.5
|
Cdios Controller Commands | Cdios Firmware Page
All CDIOS messages are presented as 8 bytes long. When variable length messages are selected, the part of the message that is not send over the CAN bus is represented in italic/lightgray text.
All multibyte (16 bits) parameters or values are placed in the messages with the LSB first (little endian)
|
Command |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
28h |
0 - 15 |
Selector |
0 |
0 |
0 |
0 |
0 |
|
Parameter |
Value |
Description |
|
Selector |
00h |
Read current value of input #1 |
| 01h | Read latched value of input #1, latched by the latest SYNC command | |
|
10h |
Read current value of input #2 |
|
| 11h | Read latched value of input #2, latched by the latest SYNC command | |
| 20h | Read current value of input #3 | |
| 21h | Read latched value of input #3, latched by the latest SYNC command | |
| 30h | Read current value of input #4 | |
| 31h | Read latched value of input #4, latched by the latest SYNC command |
Normal reply is:
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
28h |
0 - 15 |
Selector |
Data |
0 |
0 |
0 |
|
|
Parameter |
Value |
Description |
| Selector | x | Copy of value of the command |
|
Data |
30000 |
Analog input is +1.000 V or +100.0 mV |
|
0 |
Analog input is 0.000 V or 0.00 mV |
|
|
-30000 |
Analog input is -1.000 V or -100.0 mV |
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A8h |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
0 |
1 = Selector parameter out of range |
This command sets the A/D converter sample rate and amount of channels to
scan.
Command Module ID Selector 4 5 6 7 8 29h 0 - 15 0 Config Start 0 0 0
|
Value |
Default |
Amount of channels | Sample rate per channel | Effective resolution | Notes | |||
|
Config |
|
15 |
Basic sample rate = 200 SPS | 11 bits (+sign) | Results in upper 12 bits of data word, lower 4 bits are noisy. | |||
| 0 | 1 | 200 | ||||||
|
1 |
2 | 100 | ||||||
|
2 |
3 | 66.7 | ||||||
| 3 | 4 | 50 | ||||||
| Basic sample rate = 100 SPS | 13 bits (+sign) | Results in upper 14 bits of data word, lower 2 bits are noisy. | ||||||
| 4 | 1 | 100 | ||||||
| 5 | 2 | 50 | ||||||
| 6 | 3 | 33.3 | ||||||
| 7 | 4 | 25 | ||||||
| Basic sample rate = 60 SPS | 15 bits (+sign) | Optimized for 60Hz line frequency suppression | ||||||
| 8 | 1 | 60 | ||||||
| 9 | 2 | 30 | ||||||
| 10 | 3 | 20 | ||||||
| 11 | 4 | 15 | ||||||
| Basic sample rate = 50 SPS | 15 bits (+sign) | Optimized for 50Hz line frequency suppression | ||||||
| 12 | 1 | 50 | ||||||
| 13 | 2 | 25 | ||||||
| 14 | 3 | 16.7 | ||||||
| 15 | 4 | 12.5 | ||||||
| Amount of channels |
|
|||||||
| 1 | 2 | 3 | 4 | |||||
| Start | 0 |
0 |
1 | 1-2 | 1-3 | 1-4 |
The START parameter defines the first channel to sample. |
|
| 1 | 2 | 2-3 | 2-4 | illegal | ||||
| 2 | 3 | 3-4 | illegal | illegal | ||||
| 3 | 4 | illegal | illegal | illegal | ||||
| Measured channels | ||||||||
NOTE: when the basic sample rate (200/100/60/50 SPS) is changed the A/D converter is stopped and an internal auto-calibration is performed. This takes up to 1 second before the A/D converter resumes it normal operation and a new sample is ready.
When the amount of channels or the start channel is changed, it takes approx. 15 mS plus the total sample time of all selected channels before a new sample is ready.
Confirmation reply message (suppressed when 'Confirm' of CDIOS controller is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A9h |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A9h |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
0 |
1 = Config parameter out of range |
| 6 | 1 = Start parameter out of range | |
| 7 | 1 = Selector parameter out of range |
This command gets the A/D converter sample rate and amount of channels to
scan.
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
29h |
0 - 15 |
80h |
0 |
0 |
0 |
0 |
0 |
Normal reply:
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
29h |
0 - 15 |
80h |
Config |
Start |
0 |
0 |
0 |
|
Parameter |
Description |
|
Config |
Same format as in the 'Configure sample rate and amount of channels' command |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A9h |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
7 |
1 = Selector parameter out of range |
Command code 2Ah: Set input range
This command sets the input range (V or mA) per input channel.
By selecting V or mA, the appropriate calibration factor is used. The user must connect the signal to the correct input terminals.
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Ah |
0 - 15 |
0 |
Range 1 |
Range 2 |
Range 3 |
Range 4 |
0 |
|
Value |
Default |
Description |
|
|
Range 1 |
0 - 1 |
0 |
0: 1V input will be used 1: 100mV input will be used |
Confirmation reply message (suppressed when 'Confirm' of CDIOS controller is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
2Ah |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
8Ah |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
0 |
1 = Range 1 parameter out of range |
| 1 | 1 = Range 2 parameter out of range | |
| 2 | 1 = Range 3 parameter out of range | |
| 3 | 1 = Range 4 parameter out of range | |
| 7 | 1 = Selector parameter out of range |
Command code 2Ah: Read input range
This command gets the input range (1V or 100mV) per input channel.
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Ah |
0 - 15 |
80h |
0 | 0 | 0 | 0 |
0 |
|
Reply |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Ah |
0 - 15 |
80h |
Range 1 |
Range 2 |
Range 3 |
Range 4 |
0 |
|
Parameter |
Description |
|
Range 1-4 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
8Ah |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
7 |
1 = Selector parameter out of range |
This command sets the input 'moving average' filters per input channel.
These filters can be used to stabilize fluctuating input signals.
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Bh |
0 - 15 |
0 |
Filter 1 |
Filter 2 |
Filter 3 |
Filter 4 |
0 |
|
Value |
Default |
Description |
|
|
Filter 1 |
0 - 4 |
0 |
0: no filtering 1: average of last 2 measurements 2: average of last 4 measurements 3: average of last 8 measurements 4: average of last 16 measurements |
Confirmation reply message (suppressed when 'Confirm' of CDIOS controller is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
2Bh |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
8Bh |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
0 |
1 = Filter 1 parameter out of range |
| 1 | 1 = Filter 2 parameter out of range | |
| 2 | 1 = Filter 3 parameter out of range | |
| 3 | 1 = Filter 4 parameter out of range | |
| 7 | 1 = Selector parameter out of range |
This command gets the input 'moving average' filters per input channel.
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Bh |
0 - 15 |
80h |
0 | 0 | 0 | 0 |
0 |
|
Reply |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Bh |
0 - 15 |
80h |
Filter 1 |
Filter 2 |
Filter 3 |
Filter 4 |
0 |
|
Parameter |
Description |
|
Filter 1-4 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
8Bh |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
7 |
1 = Selector parameter out of range |
This command sets the upper / lower / delta limit values per input channel.
These limit values can be used to generate an CAN message (event) when the analog input changes or when a limit has exceeded.
See also next command code (2Dh)
|
Command |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
2Ch |
0 - 15 |
Selector |
Data |
0 |
0 |
0 |
|
|
Parameter |
Value |
Default |
Description |
| Selector | 00h 01h 02h |
0 |
Input #1 upper limit value Input #1 lower limit value Input #1 delta value |
| 10h 11h 12h |
0 | Input #2 upper limit value Input #2 lower limit value Input #2 delta value |
|
| 20h 21h 22h |
0 | Input #3 upper limit value Input #3 lower limit value Input #3 delta value |
|
| 30h 31h 32h |
0 | Input #4 upper limit value Input #4 lower limit value Input #4 delta value |
Confirmation reply message (suppressed when 'Confirm' of CDIOS controller is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
2Ch |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
8Ch |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
0 |
1 = Selector parameter out of range |
This command gets the upper / lower / delta limit values per input channel.
|
Command |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
2Ch |
0 - 15 |
Selector |
0 | 0 |
0 |
0 |
0 |
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
2Ch |
0 - 15 |
Selector |
Data |
0 |
0 |
0 |
|
|
Parameter |
Value |
Description |
| Selector | 80h 81h 82h |
Input #1 upper limit value Input #1 lower limit value Input #1 delta value |
| 90h 91h 92h |
Input #2 upper limit value Input #2 lower limit value Input #2 delta value |
|
| A0h A1h A2h |
Input #3 upper limit value Input #3 lower limit value Input #3 delta value |
|
| B0h B1h B2h |
Input #4 upper limit value Input #4 lower limit value Input #4 delta value |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
8Ch |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
0 |
1 = Selector parameter out of range |
This command defines which situations will send a 'change of state' event (more then one allowed)
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Dh |
0 - 15 |
0 |
Mask 1 |
Mask 2 |
Mask 3 |
Mask 4 |
0 |
|
Bit |
Default |
Description (action when bit is set to one) |
|
|
Mask 1 |
0 |
0 |
send message when input becomes higher then 'upper limit' |
| 1 | 0 | send message when input becomes lower then 'lower limit' | |
| 2 | 0 | send message when input has changed more then 'delta value' since it was last send | |
| 3 | 0 | always send message when new measurement is ready CAUTION! this can generate a lot of CAN messages and may slow down the system if too many analog inputs are enabled to do this!! |
Confirmation reply message (suppressed when 'Confirm' of CDIOS controller is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
2Dh |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
8Dh |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
0 |
1 = Mask 1 parameter out of range |
| 1 | 1 = Mask 2 parameter out of range | |
| 2 | 1 = Mask 3 parameter out of range | |
| 3 | 1 = Mask 4 parameter out of range | |
| 7 | 1 = Selector parameter out of range |
This command gets which situations will send a 'change of state' event (more then one allowed)
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Dh |
0 - 15 |
80h |
0 | 0 | 0 | 0 |
0 |
|
Reply |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
2Dh |
0 - 15 |
80h |
Mask 1 |
Mask 2 |
Mask 3 |
Mask 4 |
0 |
|
Parameter |
Description |
|
Mask 1-4 |
Same format as in the 'Set event on input limit mask' command |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
8Dh |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
7 |
1 = Selector parameter out of range |
This command stores the current or the default I/O module configuration into
internal EEPROM memory.
The configuration is restored from this memory after power on or a reset
command.
|
Command |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
05h |
0 - 15 |
Selector |
43h |
44h |
53h |
0 |
0 |
|
Parameter |
Value |
Description |
|
Selector |
0 |
Store current configuration |
|
1 |
Change configuration into default and then store it. |
The internal EEPROM erasing / programming takes 120 up
to 250 milli-seconds, then the reply message is send.
During programming I/O communication with this module is inhibited.
Sending a command will result in a general error message with errorcode = 8.
The confirmation reply message for this command is NEVER SUPPRESSED.
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
05h |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
85h |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error status |
0 |
1 = Selector parameter out of range |
| 1 | 1 = 'password' bytes 4-6 in command are not equal to 43h,44h,53h | |
| 2 | 1 = Configuration EEPROM programming error |
Events
A 'change of State' event can be configured with the 'Set event on input
limit mask' command.
If an enabled limit is reached, a read input event message is sent:
|
Event |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
68h |
0 - 15 |
Indicator |
Data |
0 |
0 |
0 |
|
|
Parameter |
Value |
Description |
Enabled by 'limit mask' bit |
| Indicator
|
02h 03h 04h 05h |
Input #1, upper limit exceeded Input #1, lower limit exceeded Input #1, delta limit exceeded Input #1, new measurement ready |
0 1 2 3 |
| 12h 13h 14h 15h |
Input #2, upper limit exceeded Input #2, lower limit exceeded Input #2, delta limit exceeded Input #2, new measurement ready |
0 1 2 3 |
|
| 22h 23h 24h 25h |
Input #3, upper limit exceeded Input #3, lower limit exceeded Input #3, delta limit exceeded Input #3, new measurement ready |
0 1 2 3 |
|
| 32h 33h 34h 35h |
Input #4, upper limit exceeded Input #4, lower limit exceeded Input #4, delta limit exceeded Input #4, new measurement ready |
0 1 2 3 |
Input events react directly on the actual inputs, not on latched inputs.
NOTE: when the basic sample rate (200/100/60/50 SPS) is changed the A/D converter is stopped and an internal auto-calibration is performed. This takes up to 1 second before the A/D converter resumes it normal operation and a new event is send.
When the amount of channels or the start channel is changed, it takes approx. 15 mS plus the total sample time of all selected channels before a new event is send.
Calibration
The 6170 is calibrated by CD Systems before delivery.
All calibration values are stored in the internal calibration FLASH EEPROM.
Calibration commands and protocol are described in 6170-calibration.