The Method WriteByIndex can be used to access the POWERLINK Object Dictionary by Index and Sub-Index to write values of POWERLINK Objects.
Signature
WriteByIndex (
[in]UInt16 Index
[in]Byte SubIndex
[in]BaseDataTypeData
[out]UInt32 PowerlinkAbortCode
);
Argument |
Description |
Index |
Index of the POWERLINK Object in the POWERLINK Object Dictionary |
SubIndex |
Sub-Index of the POWERLINK Object in the POWERLINK Object Dictionary |
Data |
Data to be written to the POWERLINK Object |
PowerlinkAbortCode |
SDO Abort Code as defined in EPSG DS 301 Some of the SDO Abort Codes defined in POWERLINK are mapped to an OPC UA ResultCode, see table for ‘Method Result Codes’ |
Method Result Codes
ResultCode |
SDO Abort Code |
Description |
Good |
0 |
The write access was successful |
Bad_ResourceInvalid |
- |
The POWERLINK Device is not available, the output argument PowerlinkAbortCode will be set to 0x0504 0000 (timeout) |
Bad_NotFound |
0x0602 0000 |
Object does not exist in the POWERLINK Object Dictionary |
0x0609 0011 |
Sub-Index does not exist |
Bad_Timeout |
0x0504 0000 |
The operation timed out / SDO protocol timed out |
Bad_NotSupported |
0x0601 0000 |
Unsupported access to an POWERLINK Object |
Bad_NotWritable |
0x0601 0002 |
Attempt to write a read-only POWERLINK Object |
Bad_OutOfRange |
0x0609 0030 |
Value range of parameter exceeded |
0x0609 0031 |
Value of parameter written too high |
0x0609 0032 |
Value of parameter written too low |
Bad_TypeMismatch |
0x0607 0010 |
length of service parameter does not match |
0x0607 0012 |
length of service parameter too high |
0x0607 0013 |
length of service parameter too low |
Bad_CommunicationError |
All other SDO Abort Codes |
|