8.1. Introduction
8.1.1. What is MainDevice Object Dictionary?
Like SubDevices may support diagnosis and configuration that can be accessed by means of asynchronous SDO uploads, the EC-Master stack contains the possibility to get access to such objects similarly. The MainDevice implements the mandatory objects of the SubDevice and enhances some useful things in the vendor definable areas.
Find a close documentation to Object Dictionary structure in this document.
8.1.2. How to access MainDevice Object Dictionary
The way for the application to access the MainDevice’s Object Dictionary is the same as for accessing the of Object Dictionary of SubDevices. The only difference is the parameter slave id that must be set to MASTER_SLAVE_ID:
emCoeSdoUpload(…,MASTER_SLAVE_ID, …);
emCoeSdoDownload(…,MASTER_SLAVE_ID, …);
emCoeGetODList(…,MASTER_SLAVE_ID, …);
…
Some objects, e.g. 0x1018 are read-only for emCoeSdo… access, but the value can be changed by the application. This can be accomplished by means of EC_IOCTL_MASTEROD_SET_VALUE, see below.
Complete access to objects of type OBJCODE_VAR is not possible.
See also
emCoeSdoUpload(), emCoeSdoDownload(), emCoeGetODList() for the CoE API used to access the object dictionary
The MainDevice Object Dictionary follows the little-endian byte ordering convention.
8.1.3. emIoCtl - EC_IOCTL_MASTEROD_SET_VALUE
-
EC_IOCTL_MASTEROD_SET_VALUE
Sets the value of the Object Entry with the given Index and SubIndex in the MainDevice Object Dictionary.
Note
Cannot be used by a RAS Client application, nor for Object Entries located at SubDevices. Complete access is not supported.
- Parameters:
pbyInBuf – [in] Pointer to struct EC_T_MASTEROD_OBJECT_PARMS
dwInBufSize – [in] Size of the input buffer provided at pbyInBuf in bytes
pbyOutBuf – [out] Should be set to EC_NULL
dwOutBufSize – [in] Should be set to 0
pdwNumOutData – [out] Should be set to EC_NULL
- Returns:
EC_E_NOERROR or error code
-
struct EC_T_MASTEROD_OBJECT_PARMS
Public Members
-
EC_T_WORD wIndex
Object’s index, e.g. 0x1018
-
EC_T_BYTE bySubindex
Object’s sub-index, e.g. 1
-
EC_T_BYTE *pbyData
Pointer to object’s data to be written
-
EC_T_DWORD dwLength
Data length in bytes to be written
-
EC_T_WORD wIndex
See also
Overview for the Object Entries that are forceable (column F)