|
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/light gray text.
All multibyte (16 / 32 bits) parameters are placed in the messages with the
LSB first (little endian)
These 6182 commands are a subset of the 6167/6168 commands
Command code 20h: Set configuration
All data set with this command is stored in EEPROM after the 'Store
Configuration Command', becoming the new power on default.
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
| 20h |
0 - 15 |
2 |
Pulses Per Revolution |
0 |
Auto Zero |
0 |
| 3 |
0 |
0 |
0 |
0 |
Failsafe |
|
Parameter |
Range |
Default |
Units |
Description |
| AutoZero |
0 - 1 |
0 |
|
| 0: |
Device does not Auto Zero the motor position. Z input has no other function
and can be used as digital input |
| 1: |
Device one time only sets the motor position to zero when the Zero and Index
inputs are active. Both inputs must become inactive to enable another reset. |
|
| Pulses Per Revolution |
1 - 65535 |
500 |
|
Defines the pulses per revolution of the encoder input, to
calculate the correct RPM |
| Failsafe |
0 - 15 |
0 |
|
Defines the active level of the digital inputs. 0 = active
high (when input is above 11 Volts) 1 = active low (when input is below 4
Volts)
| bit 0 |
Active level of Forward endswitch input |
| bit 1 |
Active level of Reverse endswitch input |
| bit 2 |
Active level of Emergency input |
| bit 3 |
Active level of Zero input |
|
This command is only valid when the motor is not running.
Confirmation reply message (suppressed when 'Confirm' is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
20h |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A0h |
0 - 15 |
0 |
0 |
Error Status1 |
Error Status 2 |
0 |
0 |
|
Parameter |
Bit |
Description (unused bits remain zero) |
| Error Status1 |
2 |
1 = Selector parameter out of range |
| 5 |
1 = Pulses per revolution parameter out of range |
| 7 |
1 = Autozero parameter out of range |
| Error Status 2 |
6 |
1 = Failsafe parameter out of range |
Command code 20h: Read configuration
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
20h |
0 - 15 |
82h - 83h |
0 |
0 |
0 |
0 |
0 |
Normal reply is:
|
Reply |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
| 20h |
0 - 15 |
82h |
Pulses Per Revolution |
0 |
Auto Zero |
0 |
| 83h |
0 |
0 |
0 |
0 |
Failsafe |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A0h |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error Status |
|
1 |
1 = Selector parameter out of range |
Command code 21h: Read current position
This command returns the current 32 bits (signed) position.
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
21h |
0 - 15 |
0 - 1 |
0 |
0 |
0 |
0 |
0 |
|
Parameter |
Value |
Description |
|
Selector |
0 |
Read current position |
| 1 |
Read latched position, latched by the latest SYNC command |
Normal reply:
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
21h |
0 - 15 |
Selector (copy of command) |
position |
0 |
|
Parameter |
Value |
Description |
|
Position |
32 bits- long-int |
The requested 32 bits (signed) position |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A1h |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error Status |
0 |
1 = Selector parameter out of range |
Command code 22h: Set position
This command sets the current 32 bits (signed) position and the current
setpoint.
|
Command |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
22h |
0 - 15 |
0 |
position |
0 |
Allowable range for position: -2147483648 up to 2147483647
Confirmation reply message (suppressed when 'Confirm' is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
22h |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Command code 24h: Start
This command is only used for resetting the motor position on the first
active I input edge:
|
Command |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
24h |
0 - 15 |
0 |
0 |
Option |
0 |
0 |
0 |
|
Parameter |
Value |
Description |
| Option |
4 |
The motor position is set to zero (one time only) when the I
(index) input becomes active |
| 6 |
The motor position is set to zero (one time only) when the I
(index) and the Z (Zero) input are active |
Confirmation reply message (suppressed when 'Confirm' is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
24h |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
If any error occurs, the current setting remains unchanged and an error
message is returned
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A4h |
0 - 15 |
0 |
0 |
Error Status1 |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
| Error Status1 |
5 |
1 = Option parameter out of range |
Command code 26h: Read status
This commands reads the internal motor controller module status
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
26h |
0 - 15 |
0-1 |
0 |
0 |
0 |
0 |
0 |
|
Reply |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
26h |
0 - 15 |
0 |
Status 1 |
Status 2 |
Status 3 |
Status 4 |
0 |
| 1 |
MotorSpeed |
0 |
0 |
0 |
|
Parameter |
Bit |
Description (unimplemented bits remain zero) |
| Status 1 |
2 |
1 = A start command with option 4 or 6 is given. The position
will be set to zero when the I input or the Z+I inputs become active |
|
Status 2 |
0 |
1 = Forward end switch active |
|
1 |
1 = Reverse end switch active |
|
2 |
1 = Emergency stop input is active |
| Status 3 |
0 |
1 = position was set to zero by I input (start command) or Z and
I inputs (AutoZero)
This status bit will be automatically cleared when
the status is read (note). |
| 5 |
1 = Encoder input frequency is too high, pulses may be missed |
| Status 4 |
0 |
1 = Z input active |
| 7 |
1 = Motor position is not initialized, may be incorrect. This
bit is set after power on reset or node reset. It is cleared after: - a 'Set
Position' command - an autoreset |
| Motor Speed |
-32768 - 32767 |
The actual motor speed, value depends on the Pulses Per
Revolution setting. The speed is signed to indicate the rotation direction |
Command code 27h: Set event on status change mask
This commands defines the controller status bits to scan for change.
|
Command |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
27h |
0 - 15 |
0 |
Mask1 |
Mask 2 |
Mask 3 |
Mask 4 |
Timer |
|
Parameter |
Bit |
Default |
Description |
|
Mask 1 |
0 |
0 |
1 = enable bit 0 of the status 1 byte |
|
until |
|
1 = enable ... |
|
7 |
0 |
1 = enable bit 7 of the status 1 byte |
|
Mask 2 |
0 |
0 |
1 = enable bit 0 of the status 2 byte |
|
until |
|
1 = enable ... |
|
7 |
0 |
1 = enable bit 7 of the status 2 byte |
|
Mask 3 |
0 |
0 |
1 = enable bit 0 of the status 3 byte |
|
until |
|
1 = enable ... |
|
7 |
0 |
1 = enable bit 7 of the status 3 byte |
| Mask 4 |
0 |
0 |
1 = enable bit 0 of the status 4 byte |
|
until |
|
1 = enable ... |
|
7 |
0 |
1 = enable bit 7 of the status 4 byte |
| Timers |
0 - 2 |
0 |
This value (0 - 7) determines the 'send current position' interval |
| 3 |
0 |
0 = current position is send on timer interval 1 = current position is
send on timer interval only when it was changed |
| 4 - 6 |
0 |
This value (0 - 7) determines the 'send MotorSpeed' interval |
| 7 |
0 |
0 = MotorSpeed is send on timer interval 1 = MotorSpeed is send on timer
interval only when one or both values were changed |
|
|
| Value |
Interval |
| 0 |
Value is never send |
| 1 |
3.9 mS |
| 2 |
7.8 mS |
| 3 |
15.6 mS |
| 4 |
31.25 mS |
| 5 |
62.5 mS |
| 6 |
125 mS |
| 7 |
250 mS |
|
Confirmation reply message (suppressed when 'Confirm' is 0):
|
Reply |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
27h |
0 - 15 |
0 |
0 |
0 |
0 |
0 |
0 |
Command code 27h: Read event on status change mask
This command reads back the controller status bits to scan for change.
|
Command |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
27h |
0 - 15 |
80h |
0 |
0 |
0 |
0 |
0 |
Normal reply:
|
Reply |
Module ID |
Selector |
4 |
5 |
6 |
7 |
8 |
|
27h |
0 - 15 |
80h |
0 |
Mask 2 |
Mask 3 |
Mask 4 |
Timer |
Possible error message:
|
Error |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
A7h |
0 - 15 |
0 |
0 |
Error Status |
0 |
0 |
0 |
|
Parameter |
Bit |
Description |
|
Error Status |
|
0 |
1 = Selector parameter out of range |
Command code 05h: Store configuration
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 260 up
to 750 milliseconds, 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
If an enabled status bit changes state, a read status event message is sent:
|
Event |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
66h |
0 - 15 |
0 |
Status 1 |
Status 2 |
Status 3 |
Status 4 |
0 |
|
Parameter |
Bit |
Description (unimplemented bits remain zero) |
| Status 1 |
2 |
1 = A start command with option 4 or 6 is given. The position
will be set to zero when the I input or the Z+I inputs become active |
|
Status 2 |
0 |
1 = Forward end switch active |
|
1 |
1 = Reverse end switch active |
|
2 |
1 = Emergency stop input is active |
| Status 3 |
0 |
1 = position was set to zero by I input (start command) or Z and
I inputs (AutoZero)
This status bit will be automatically cleared when
the status is read (note). |
| 5 |
1 = Encoder input frequency is too high, pulses may be missed |
| Status 4 |
0 |
1 = Z input active |
| 7 |
1 = Motor position is not initialized, may be incorrect. This
bit is set after power on reset or node reset. It is cleared after: - a 'Set
Position' command - an autoreset |
All status data is given, so the application has to find out itself
which status actually changed.
If a timer interval expires one of two possible timer events is send:
|
Event |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
66h |
0 - 15 |
1 |
MotorSpeed |
0 |
0 |
0 |
|
Event |
Module ID |
3 |
4 |
5 |
6 |
7 |
8 |
|
61h |
0 - 15 |
0 |
Current position |
0 |
| Note:: |
The auto-clear mechanism of Status3 bit 0 depends on if and how
an event is enabled:
| Action |
Event enabled (Mask3, bit 0) |
Status 3, bit 0 auto-cleared |
| Read Status with command 26h |
0 |
yes |
| 1 |
no |
Event send by controller (event checking / COS handling must
be on) |
0 |
no |
| 1 |
yes |
|
|