|
Stepper Motor Controller Command / Reply / Event messages V1.1
|
6166 Cdios Module V1.0 Commands
Addition to V1.0:
|
|
|
Selector |
|
|
|
|
|
|
|
|
|
(lsb) (msb) |
(lsb) (msb) |
|
||
|
|
|
|
|
|
|
||
|
|
|
|
|
Description |
|
|
|
|
half steps per second
|
|
|
|
|
|
||
|
|
|
|
half steps per milli- |
Acceleration / Deceleration speed. |
|
|
|
|
|
Set maximum motor current while motor is running, 0.1 - 4.0 A |
|
|
|
|
Set maximum motor current (holding current) when motor is stopped, this can be used to save energy. |
|
|
|
|
|
|
Enable/disable (1/0) forward end switch checking |
|
|
|
|
|
Enable/disable (1/0) reverse end switch checking |
This command is only valid when the stepper motor is not running.
Confirmation reply message (suppressed when 'Confirm' is 0):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If any error occurs, the current speed settings remain unchanged and an error message is returned
Possible error message:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description |
|
|
|
1 = Motor is running |
|
|
1 = Selector parameter out of range |
|
|
|
1 = Minimum speed parameter out of range |
|
|
|
1 = Maximum speed parameter out of range |
|
|
|
1 = Slope parameter out of range |
|
|
|
Description |
|
|
0 |
1 = Run current parameter out of range |
| 1 |
1 = Stop current parameter out of range |
|
|
2 |
1 = Forward end switch parameter out of range |
|
|
3 |
1 = Reverse end switch parameter out of range |
This command returns the current 24 bits (signed) stepper motor position.
A
32 bits long-int is sent in the message for application layer compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(lsb) (msb) |
|
|||
|
|
|
Description |
|
|
|
This command returns the current 24 bits (signed) stepper motor position |
Command code 22h: Set position
This command sets the current 24 bits (signed) stepper motor position.
A
32 bits long-int is sent in the message for application layer compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
(lsb) (msb) |
|
|||
This command is only valid when the stepper motor is not running.
Allowable range for stepper motor position: -8388608 up to 8388607
Confirmation reply message (suppressed when 'Confirm' is 0):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If any error occurs, the current setting remains unchanged and an error message is returned
Possible error message:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description |
|
|
|
1 = Motor is running |
|
|
1 = Stepper motor position parameter out of range |
This command causes the stepper motor to move to the given 24 bits (signed)
stepper motor position.
A 32 bits long-int is sent in the message for
application layer compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
Selector |
(lsb) (msb) |
|
|||
This command is only valid when the stepper motor is not running.
|
|
|
Description |
|
Selector |
|
Move motor absolute to the given position |
|
|
Write position into internal latch, motor will move after SYNC command (note 1) When a SYNC pulse is received without prior reception of the goto command with selector = 1, the motor state remains unchanged. |
|
|
2 |
Move motor relative, motor moves forward when given amount of steps is
positive. |
|
|
3 |
Write relative position into internal latch, motor will move after SYNC command (note 1) When a SYNC pulse is received without prior reception of the goto command with selector = 3, the motor state remains unchanged. |
|
|
|
Description |
|
|
|
Allowable range: -8388608 up to 8388607 |
Confirmation reply message (suppressed when 'Confirm' is 0):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If any error occurs, the current setting remains unchanged and an error message is returned
Possible error message:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description |
|
|
|
1 = Motor is running |
|
|
1 = Emergency stop or watchdog status active (note 2) |
|
|
|
1 = Selector parameter out of range |
|
|
|
1 = Stepper motor position parameter out of range |
This command is used to control the motor motion 'manually'
Do not combine
this command with the 'goto position' command.
|
|
|
|
|
|
|
|
|
|
|
|
Selector |
|
|
|
|
|
This command is only valid when the stepper motor is not running.
|
|
|
Description |
|
Selector |
|
Motor starts directly according to 'Direction' and 'Option' |
|
|
|
|
|
Description |
|
|
|
Motor starts in Forward direction, if forward end switch is inactive or forward end switch checking is disabled |
|
|
Motor starts in Reverse direction, if reverse end switch is inactive or reverse end switch checking is disabled |
|
|
|
Description |
|
|
|
Motor starts and remains at minimum speed |
|
|
Motor starts at minimum speed and accelerates to maximum speed |
|
|
|
Motor starts and remains at minimum speed until the forward (when direction if forward) or reverse (when direction is reverse) end switch is activated, even if end switch checking is disabled |
Confirmation reply message (suppressed when 'Confirm' is 0):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If any error occurs, the current setting remains unchanged and an error message is returned
Possible error message:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description |
|
|
|
1 = Motor is running |
|
|
1 = Emergency stop or watchdog status active (note 2) |
|
|
|
1 = Motor is running in opposite direction |
|
|
|
1 = Selector parameter out of range |
|
|
|
1 = Direction parameter out of range |
|
|
|
1 = Option parameter out of range |
|
| 6 | 1 = End switch active, cannot start |
This command is used to control the motor motion 'manually'
Do not combine
this command with the 'goto position' command.
|
|
|
|
|
|
|
|
|
|
|
|
Selector |
|
|
|
|
|
|
|
|
Description |
|
Selector |
|
Stop command is executed immediately |
|
|
Stop command is latched and executed after receiving SYNC command (note 1) |
|
|
|
Description |
|
|
|
Motor decelerates to minimum speed and remains at minimum speed |
|
|
Motor decelerates to minimum speed and then stops (motor current will be set to 'stop current', 500 ms after the motor was stopped). This option also stops the motor when is was started with a goto command. |
|
|
|
Motor current is switched completely off |
|
|
|
Release emergency stop condition, the emergency stop input has to be inactive (note 2). |
Confirmation reply message (suppressed when 'Confirm' is 0):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If any error occurs, the current setting remains unchanged and an error message is returned
Possible error message:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description |
|
|
|
1 = Motor is running (when option 2 selected) |
|
|
1 = Emergency stop or watchdog status active (note 2) |
|
|
|
1 = Motor is not running (when option 0 or 1 selected) |
|
|
|
1 = Selector parameter out of range |
|
|
|
1 = Option parameter out of range |
This commands reads the internal stepper motor controller module status
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description |
|
|
|
1 = Motor is running forward |
|
|
1 = Motor is running reverse |
|
|
|
1 = Motor is running until end switch found |
|
|
|
1 = Motor is running at minimum speed |
|
|
|
1 = Motor is running at maximum speed |
|
|
|
1 = Motor is accelerating |
|
|
|
1 = Motor is decelerating |
|
|
|
1 = Goto command is being executed |
|
|
|
Description |
|
|
|
1 = Forward end switch active |
|
1 |
1 = Reverse end switch active |
|
|
2 |
1 = Emergency stop input is active (note 2) |
|
|
3 |
1 = Motor was stopped by an active and enabled forward end switch, |
|
|
4 |
1 = Motor was stopped by an active and enabled reverse end switch, |
|
|
5 |
1 = Motor was stopped by an active emergency stop input |
|
| 6 | 1 = Motor was stopped by 0.5 second 'watchdog' time-out. The Cdios controller checks the 6166 with a short interval, when this fails, the 6166 performs an emergency stop... This status bit can only be cleared by a stop command with option 3, 'Goto' , 'Start' and other 'Stop' commands return an error is this bit is set. |
This commands defines the motor controller status bits to scan for change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description |
|
|
|
1 = enable bit 0 of the status 1 byte |
|
|
1 = enable ... |
|
|
|
1 = enable bit 7 of the status 1 byte |
|
|
|
Description |
|
|
|
1 = enable bit 0 of the status 2 byte |
|
|
1 = enable ... |
|
|
|
1 = enable bit 7 of the status 2 byte |
At power on or reset, the internal masks are cleared.
Confirmation reply message (suppressed when 'Confirm' is 0):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If an enabled motor status bit changes state, a read motor status event message is sent:
|
|
|
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
|
|
|
Description |
|
|
|
1 = Motor is running forward |
|
|
1 = Motor is running reverse |
|
|
|
1 = Motor is running until end switch found |
|
|
|
1 = Motor is running at minimum speed |
|
|
|
1 = Motor is running at maximum speed |
|
|
|
1 = Motor is accelerating |
|
|
|
1 = Motor is decelerating |
|
|
|
1 = Goto command is being executed |
|
|
|
Description |
|
|
|
1 = Forward end switch active |
|
1 |
1 = Reverse end switch active |
|
|
2 |
1 = Emergency stop input is active (note 2) |
|
|
3 |
1 = Motor was stopped by an active and enabled forward end switch, |
|
|
4 |
1 = Motor was stopped by an active and enabled reverse end switch, |
|
|
5 |
1 = Motor was stopped by an active emergency stop input |
|
| 6 | 1 = Motor was stopped by 0.5 second 'watchdog' time-out. The Cdios controller checks the 6166 with a short interval, when this fails, the 6166 performs an emergency stop... This status bit can only be cleared by a stop command with option 3, 'Goto' , 'Start' and other 'Stop' commands return an error is this bit is set. |
All status data is given in two bytes, so the application has to
find out itself which status actually changed.
When the user polls the status with the 'read motor status' command and
events are enabled, it is possible that an event is not send.
This occurrs
when the user has read the status after the state change and before the event
should be sent.