CANopen:CAN SDO READ REAL

From SoftMC-Wiki
Jump to: navigation, search

Upload single precision floating point value from the device .
To read data from the slave we have to specify a SDO index and a sub-index.
The first sub-index is 0. If only one sub-index exists, we still have to specify 0 (we cannot omit this field).
The read value is returned from the function and can be set to a variable.

Input

Slave address, SDO index, SDO sub-index.

Output

None

Return Value

Value that is read from the slave.

Declaration

public function CAN_SDO_READ_REAL(byval slaveaddres as long, byval index as long, byval subindex as long) as double

Syntax

retVal = CAN_SDO_READ_REAL(<Slave address>, <SDO index>, <SDO sub-index>)

Exceptions

Examples

retVal = CAN_SDO_READ_REAL(2, 0x2020,0)

See Also