Difference between revisions of "CANopen:SET CONTROL PDO DADD"
Line 2: | Line 2: | ||
|DESCRIPTION= | |DESCRIPTION= | ||
− | Set COBID and location of Control Word inside TPDO | + | Set COBID and location of 16-bit Control Word inside TPDO. |
|INPUT= | |INPUT= | ||
Line 8: | Line 8: | ||
cobid: CAN COBID<br> | cobid: CAN COBID<br> | ||
offset: offset inside PDO, starting from 0<br> | offset: offset inside PDO, starting from 0<br> | ||
− | size: in bytes, for example | + | size: in bytes, for example 0x607a.0 is 4 bytes long<br> |
'''Important note'''<br> | '''Important note'''<br> | ||
− | Control | + | Control Word and either "Position Command" or "Velocity Command" or "Torque Command" must be mapped to the '''same''' PDO.<br> |
− | if Control Word is not mapped, COB id of either pcmd, vcmd or vcmd will be used <br> | + | if Control Word is not mapped, COB id of either pcmd, vcmd or vcmd will be used instead<br> |
|OUTPUT= | |OUTPUT= | ||
Line 29: | Line 29: | ||
|EXAMPLE= | |EXAMPLE= | ||
− | SET_CONTROL_PDO_DADD( | + | SET_CONTROL_PDO_DADD(1,0,0,0) ' Unmap Control Word<br> |
+ | SET_CONTROL_PDO_DADD(1,0x200,0 , 2) ' Control Word is located in bytes 0 and 1 of TPDO with COBID 0x200 | ||
|SEE ALSO= | |SEE ALSO= | ||
* [[CANOpen:CAN SDO WRITE|CAN_SDO_WRITE]] | * [[CANOpen:CAN SDO WRITE|CAN_SDO_WRITE]] |