Difference between revisions of "CANopen:CAN SDO READ STRING"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Template:CANOpen-Functions |DESCRIPTION= To read byte array from the slave <br/> The first sub-index is 0. If only one sub-index exists, we still have to specify 0 (we cann...")
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:CANOpen-Functions
+
{{Template:CANopen Functions
  
 
|DESCRIPTION=
 
|DESCRIPTION=
Line 23: Line 23:
  
 
|EXCEPTIONS=
 
|EXCEPTIONS=
* [[CANOpen:Error Codes|Error_Codes]]
+
* [[CANopen:Error Codes|Error_Codes]]
 
|LIMITATIONS=
 
|LIMITATIONS=
  
 
|EXAMPLE=
 
|EXAMPLE=
Version = CAN_SDO_READ_STRING(0, 0x100a,0)  '  Read device version
+
Version = CAN_SDO_READ_STRING(0, 0x100a,0)  '  Read device version<br>
 
Print Version
 
Print Version
  
 
|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 REAL|CAN_SDO_REAL]]
 +
* [[CANopen:CAN SDO WRITE|CAN_SDO_WRITE]]
  
  
 
}}
 
}}

Latest revision as of 15:08, 26 August 2014

To read byte array from 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).
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_STRING(byval slaveaddress as long, byval index as long, byval subindex as long) as string

Syntax

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

Exceptions

Examples

Version = CAN_SDO_READ_STRING(0, 0x100a,0) ' Read device version
Print Version

See Also