Difference between revisions of "CANopen:CAN SDO WRITE"
(Created page with "{{Template:CANOpen-Functions |DESCRIPTION= In order to communicate with a specific slave we use its address and the functions CAN_SDO_READ, CAN_SDO_WRITE. CAN_SDO_WRITE sends...") |
m |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{Template: | + | {{Template:CANopen Functions |
|DESCRIPTION= | |DESCRIPTION= | ||
Line 23: | Line 23: | ||
|EXCEPTIONS= | |EXCEPTIONS= | ||
− | * [[ | + | * [[CANopen:Error Codes|Error_Codes]] |
|EXAMPLE= | |EXAMPLE= | ||
call CAN_SDO_WRITE(1, 0x6040, 0, 16, 128) 'clear faults | call CAN_SDO_WRITE(1, 0x6040, 0, 16, 128) 'clear faults | ||
|SEE ALSO= | |SEE ALSO= | ||
− | * [[ | + | * [[CANopen:CAN SDO READ STRING|CAN_SDO_READ_STRING]] |
+ | * [[CANopen:CAN SDO WRITE STRING|CAN_SDO_WRITE_STRING]] | ||
+ | * [[CANopen:CAN SDO READ|CAN_SDO_READ]] | ||
+ | * [[CANopen:CAN SDO WRITE|CAN_SDO_WRITE]] | ||
+ | * [[CANopen:CAN SDO WRITE REAL|CAN_SDO_WRITE_REAL]] | ||
}} | }} |
Latest revision as of 15:11, 26 August 2014
In order to communicate with a specific slave we use its address and the functions CAN_SDO_READ, CAN_SDO_WRITE.
CAN_SDO_WRITE sends data to the slave over a specific SDO. We have to specify the SDO's index, and its sub-index, its size, and the new value
that we would like to write to the slave.
The first sub-index is 0. If only one sub-index exists, we still have to specify 0 (we cannot omit this field).
Input
Slave address, SDO index, SDO sub-index, SDO size in bits, the new value to be written.
Output
None
Return Value
Void
Declaration
public sub CAN_SDO_WRITE(byval slaveaddress as long, byval index as long, byval subindex as long,byval size_bits as long, byval new_val as long)
Syntax
call CAN_SDO_WRITE(<Slave address>, <SDO index>, <SDO sub-index>, <SDO size in bits>, <new value>)
Exceptions
Examples
call CAN_SDO_WRITE(1, 0x6040, 0, 16, 128) 'clear faults