Supported platforms: CODESYS 2.3, CODESYS 3.5
This function adds or updates line in the object dictionary.
Input variable name |
Data type |
Description |
i_pOD |
POINTER TO CANopenOD |
Pointer to the Object Dictionary, where to add the line. |
i_index |
WORD |
Index to be added. |
i_ObjectCode |
CANopenObjectCode |
Object Code 0,2,5,6,7,8 or 9 |
i_NumOfSubids |
BYTE |
Number of sub indexes in defstruct(6), array(8) or struct(9) |
i_TypeSpec |
WORD |
Index of the data type ie. OD Index which ObjectCode is 5(typedef) or 6(defstruct), see table Types below. |
i_ObjectAccess |
BYTE |
Access rights ored value of: 16#40=NoRead 16#20=NoWrite 16#10=Sub0NoRead 16#08=Sub0NoWrite see Global variables G_CANOPEN_OD_ACCESS_? |
i_sub0data |
BYTE |
Value of sub index 0 in array or (def)struct |
i_pIndexData |
DWORD |
Pointer to the data of the index |
i_CallBackPOU |
WORD |
SDO handler POU type PROGRAM SDO gives own pointer in G_CANVXDMSGParam |
Input variable name |
Data type |
Description |
i_pOD |
POINTER TO CANopenOD |
Pointer to the Object Dictionary, where to add the line. |
i_Index |
WORD |
Index to be added. |
i_ObjectCode |
CANopenObjectCode |
Object Code 0,2,5,6,7,8 or 9 |
i_NumOfSubids |
BYTE |
Number of sub indexes in defstruct(6), array(8) or struct(9) |
i_TypeSpec |
WORD |
Index of the data type ie. OD Index which ObjectCode is 5(typedef) or 6(defstruct), see table Types below. |
i_ObjectAccess |
BYTE |
Access rights ored value of: 16#40=NoRead 16#20=NoWrite 16#10=Sub0NoRead 16#08=Sub0NoWrite see Global variables G_CANOPEN_OD_ACCESS_? |
i_Sub0data |
BYTE |
Value of sub index 0 in array or (def)struct |
i_pIndexData |
POINTER TO ANY |
Pointer to the data of the index |
i_itfSDOHandler |
ICANopenSDOHandler |
SDO handler POU type PROGRAM SDO gives own pointer in G_CANVXDMSGParam |
The types listed in the table below are the most commonly used. The complete list of types can be found in CiA standard DS-301 (Version 4.02).
Index |
Object |
Name |
0001 |
DEFTYPE |
BOOLEAN |
0002 |
DEFTYPE |
INTEGER8 |
0003 |
DEFTYPE |
INTEGER16 |
0004 |
DEFTYPE |
INTEGER32 |
0005 |
DEFTYPE |
UNSIGNED8 |
0006 |
DEFTYPE |
UNSIGNED16 |
0007 |
DEFTYPE |
UNSIGNED32 |
0008 |
DEFTYPE |
REAL32 |
0009 |
DEFTYPE |
VISIBLE_STRING |
... |
|
|
0020 |
DEFSTRUCT |
PDO_COMMUNICATION_PARAMETER |
Error code |
CANopenNoError |
CANopenErrorODFull |
CANopenErrorIndexZero |
Source file Topic000190.htm
Last updated 24-Apr-2025