This function is used to impose the 'manufacturer specific', 'halt' and 'operation mode specific' bits of the CAN/CoE controlword (object 6040H).
Syntax |
i32 co_controlword_om (i32 nWs, i32 state, i32 bitMsk) |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nWs |
Robox station ID (logical workstation 1-:-64). Note: If 0 is specified as ws then it is meant for all. |
|||||||||||||||
state |
Value to be imposed on the specified bits |
|||||||||||||||
bitMsk |
Mask of bits predisposed to assume the status |
|||||||||||||||
Result |
Returns:
|
|||||||||||||||
Validity |
Rule, Task |
|||||||||||||||
Note |
The mask of imposable bits with this instruction is 0x0000FD70, which corresponds to:
Remember that in the rte.cfg configuration file, or from the graphical project configurator (axis properties), you can set the 'operation mode specific' bits via the axis_can keyword |
co_controlword_om() for SOE devices
Since RTE 34.18.4, this function can also be used with SOE devices. The writable bits are 8, 9, 11 and the corresponding mask is 0x00000B00.
These bits correspond to:
Bits |
Hex value |
Meaning |
---|---|---|
- |
0x00000000 |
Primary op mode |
8 |
0x00000100 |
Secondary mode 1 |
9 |
0x00000200 |
Secondary mode 2 |
8, 9 |
0x00000300 |
Secondary mode 3 |
11 |
0x00000800 |
Secondary mode 4 |
8, 11 |
0x00000900 |
Secondary mode 5 |
9, 11 |
0x00000A00 |
Secondary mode 6 |
8, 9, 11 |
0x00000B00 |
Secondary mode 7 |
Controlword bits definition |
Example of use:
|