Difference between revisions of "CANopen:CAN SDO WRITE REAL"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Template:CANOpen-Functions |DESCRIPTION= CAN_SDO_WRITE_REAL Download single precision floating point value to the device. We have to specify the SDO's index, and its sub-in...")
 
m (Lisa moved page CANOpen:CAN SDO WRITE REAL to CANopen:CAN SDO WRITE REAL: correction of CANopen)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:CANOpen-Functions
+
{{Template:CANopen Functions
  
 
|DESCRIPTION=
 
|DESCRIPTION=
Line 22: Line 22:
  
 
|EXCEPTIONS=
 
|EXCEPTIONS=
* [[CANOpen:Error Codes|Error_Codes]]
+
* [[CANopen:Error Codes|Error_Codes]]
 
|EXAMPLE=
 
|EXAMPLE=
 
call CAN_SDO_WRITE(1, 0x2020, 0,  1.234)  
 
call CAN_SDO_WRITE(1, 0x2020, 0,  1.234)  
Line 30: Line 30:
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[CANOpen:CAN SDO READ STRING|CAN_SDO_READ_STRING]]
+
* [[CANopen:CAN SDO READ STRING|CAN_SDO_READ_STRING]]
* [[CANOpen:CAN SDO WRITE STRING|CAN_SDO_WRITE_STRING]]
+
* [[CANopen:CAN SDO WRITE STRING|CAN_SDO_WRITE_STRING]]
* [[CANOpen:CAN SDO READ|CAN_SDO_READ]]
+
* [[CANopen:CAN SDO READ|CAN_SDO_READ]]
* [[CANOpen:CAN SDO WRITE|CAN_SDO_WRITE]]
+
* [[CANopen:CAN SDO WRITE|CAN_SDO_WRITE]]
* [[CANOpen:CAN SDO WRITE REAL|CAN_SDO_WRITE_REAL]]
+
* [[CANopen:CAN SDO WRITE REAL|CAN_SDO_WRITE_REAL]]
  
 
}}
 
}}

Latest revision as of 14:43, 26 August 2014

CAN_SDO_WRITE_REAL Download single precision floating point value to the device. 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,the new value to be written.

Output

None

Return Value

Void

Declaration

public sub CAN_SDO_WRITE_REAL(byval slaveaddress as long, byval index as long, byval subindex as long, byval new_val as double)

Syntax

call CAN_SDO_WRITE_REAL(<Slave address>, <SDO index>, <SDO sub-index>, <SDO size in bits>, <new value>)

Limitations

<new Value> will be converted from Double to Single precision floating point

Exceptions

Examples

call CAN_SDO_WRITE(1, 0x2020, 0, 1.234)

See Also