Difference between revisions of "CANopen:SET CONTROL PDO DADD"

From SoftMC-Wiki
Jump to: navigation, search
m (Text replace - "Template:CANopen-Firmware-Functions" to "Template:CANopen Firmware Functions")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:CANOpen-Firmware-Functions
+
{{Template:CANopen Firmware Functions
  
 
|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 0x6040.0 is 2 bytes long<br>
+
size:  in bytes, for example 0x607a.0 is 4 bytes long<br>
 
'''Important note'''<br>
 
'''Important note'''<br>
Control word and pcmd/vcmd/tcmd must be mapped to the '''same''' PDO.<br>
+
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(0x200,1 , 0 , 2) 'control word is located in fist two bytes of TPDO with COBID 0x200
+
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]]
* [[CANOpen:SET CONTROL PDO DADD|SET_CONTROL_PDO_DADD]]
+
* [[CANopen:SET CONTROL PDO DADD|SET_CONTROL_PDO_DADD]]
* [[CANOpen:SET STATUS PDO DADD|SET_STATUS_PDO_DADD]]
+
* [[CANopen:SET STATUS PDO DADD|SET_STATUS_PDO_DADD]]
* [[CANOpen:SET PCMD PDO DADD|SET_PCMD_PDO_DADD]]
+
* [[CANopen:SET PCMD PDO DADD|SET_PCMD_PDO_DADD]]
* [[CANOpen:SET PFB PDO DADD|SET_PFB_PDO_DADD]]
+
* [[CANopen:SET PFB PDO DADD|SET_PFB_PDO_DADD]]
* [[CANOpen:SET VCMD PDO DADD|SET_VCMD_PDO_DADD]]
+
* [[CANopen:SET VCMD PDO DADD|SET_VCMD_PDO_DADD]]
* [[CANOpen:SET VFB PDO DADD|SET_VFB_PDO_DADD]]
+
* [[CANopen:SET VFB PDO DADD|SET_VFB_PDO_DADD]]
* [[CANOpen:SET TCMD PDO DADD|SET_TCMD_PDO_DADD]]
+
* [[CANopen:SET TCMD PDO DADD|SET_TCMD_PDO_DADD]]
* [[CANOpen:SET TDCMD PDO DADD|SET_TDCMD_PDO_DADD]]
+
* [[CANopen:SET TDCMD PDO DADD|SET_TDCMD_PDO_DADD]]
* [[CANOpen:SET CFB PDO DADD|SET_CFB_PDO_DADD]]
+
* [[CANopen:SET CFB PDO DADD|SET_CFB_PDO_DADD]]
* [[CANOpen:SET DOUT PDO DADD|SET_DOUT_PDO_DADD]]
+
* [[CANopen:SET DOUT PDO DADD|SET_DOUT_PDO_DADD]]
* [[CANOpen:Configuration Example|Configuration_Example]]
+
* [[CANopen:Configuration Example|Configuration_Example]]
 
}}
 
}}

Latest revision as of 14:41, 26 August 2014

Set COBID and location of 16-bit Control Word inside TPDO.

Input

dadd: device address (physical network address)
cobid: CAN COBID
offset: offset inside PDO, starting from 0
size: in bytes, for example 0x607a.0 is 4 bytes long
Important note
Control Word and either "Position Command" or "Velocity Command" or "Torque Command" must be mapped to the same PDO.
if Control Word is not mapped, COB id of either pcmd, vcmd or vcmd will be used instead

Output

None

Return Value

None

Declaration

import_c SET_CONTROL_PDO_DADD(byval as long,byval as long,byval as long,byval as long)

Syntax

SET_CONTROL_PDO_DADD(<dadd>,<cobid>,<offset>,<size>)

Exceptions

None

Examples

SET_CONTROL_PDO_DADD(1,0,0,0) ' Unmap Control Word
SET_CONTROL_PDO_DADD(1,0x200,0 , 2) ' Control Word is located in bytes 0 and 1 of TPDO with COBID 0x200

See Also