Stx Function: Canopendownloadsdo() - Jetter JC-120MC User Manual

Table of Contents

Advertisement

10 Programming

STX function: CanOpenDownloadSDO()

Introduction
Function declaration
Function parameters
Return value
514
The function CanOpenDownloadSDO() lets you access a particular object in
the Object Directory of the message recipient and specify the value of the
object. Data is exchanged in accordance with the SDO upload protocol.
Supported transfer types are segmented or block (more than 4 data bytes)
and expedited (up to 4 data bytes).
Function
CanOpenDownloadSDO(
CANNo:Int,
NodeID:Int,
wIndex:Word,
SubIndex:Byte,
DataType:Int,
// Data length of the global variable DataAddr
DataLength:Int,
// Global variable holding the value to be sent
const ref
DataAddr,
ref
Busy: Int,
) :Int;
The CanOpenDownloadSDO() function has got the following parameters:
Parameter
CANNo
CAN bus number
NodeID
Node ID of the message recipient
wIndex
Index number of the object
SubIndex
Subindex number of the object
DataType
Type of data to be sent
DataLength
Data length of the global variable
DataAddr
DataAddr
Global variable into which the value to
be sent is to be entered
Busy
Status of the SDO transmission
This function sends the following return values to the higher-level program.
Return value
0
OK
-1
Error when checking parameters
Device in Stop status (own heartbeat status)
-2
-3
DataType is greater than DataLength
-4
Insufficient memory
// Number of the bus line
// Device ID
// Type of the data to be sent
// Status of the SDO transmission
Description
Value
0 ... CANMAX
1 ... 127
0 ... 0xFFFF
0 ... 255
2 ... 27
Jetter AG

Advertisement

Table of Contents
loading

Table of Contents