Function that imposes the status of the controlword.
Syntax |
i32 co_controlword_state (i32 nWs , i32 state) |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nWs |
Robox Station ID (logical workstation 1-:-64). Note: If 0 is specified as ws then it is meant for all. |
||||||||||||||||||
state |
Possible states in accordance with DSP 402 state machine:
|
||||||||||||||||||
Result |
Returns:
|
||||||||||||||||||
Validity |
Rule, Task |
||||||||||||||||||
Note |
The mask of imposable bits with this instruction is 0x00008F, which corresponds to:
|
If the axis is managed using a PowerSet, the management of the DS402 state machine is done by RTE.
The use of this function is therefore necessary when:
•the management of a device is not done through a PowerSet
•to command a quick stop independently of RTE management
•to command a reset fault independently of RTE management
To know the current command present on the controlword use the co_statusword() function.
Controlword bits definition |
Example of use:
|