RtecatCoeReadSdoObjectDescription
RtecatCoeReadSdoObjectDescription reads the description of an object through the CoE (CANopen over EtherCAT) SDO method.
Syntax
RTECAT_COMMAND_STATUS RtecatCoeReadSdoObjectDescription(
[in] RTECAT_HANDLE SubDevice,
[out] RTECAT_SDO_OBJECT_DESCRIPTION* pData
);
Parameters
[in] SubDevice
A handle to a SubDevice. To retrieve the corresponding handle, use RtecatOpenSubDeviceByIndex, RtecatOpenSubDeviceByStationAddress, or RtecatOpenSubDeviceByExplicitId.
[out] pData
A pointer to an RTECAT_SDO_OBJECT_DESCRIPTION structure that stores the description of an object.
Return Values
The function returns an RTECAT_COMMAND_STATUS structure. If an error occurs, field State of the structure is set to ecatCommandError and the error code is stored in field ErrorId (see RTECAT_ERROR for error values). If the function succeeds, ErrorId is set to ecatErrNoError (which is represented by the value 0). If the function fails, it stores a different error value.
Possible return values:
| Return value | Meaning |
|---|---|
|
ecatErrNoError |
The function succeeded. |
|
ecatErrNullParameter |
Parameter pData is NULL. |
|
ecatErrWrongParameter |
Parameter SubDevice is invalid. |
|
ecatErrMainDeviceNotReady |
The MainDevice is not ready. |
|
ecatErrFeatureUnavailable |
The SubDevice doesn't support CoE. |
Remarks
RtecatCoeReadSdoObjectDescription is an asynchronous function that takes time to complete. It allows for background execution and requires you to check its status by calling RtecatGetCommandStatus or wait for it to complete by calling RtecatWaitForCommand.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtecatApi.h |
RtecatApi_W64.lib (Windows), RtecatApi.lib (RTSS) |
See Also: