# CAN application protocol over EtherCAT® (CoE) The EC-Monitor can forward CoE transfers to the application in real time via the notifications [emonNotify - eMbxTferType_COE_SDO_DOWNLOAD](#emonnotify-embxtfertype-coe-sdo-download), [emonNotify - eMbxTferType_COE_SDO_UPLOAD](#emonnotify-embxtfertype-coe-sdo-upload) and [emonNotify - eMbxTferType_COE_EMERGENCY](#coe-emergency-emonnotify-embxtfertype-coe-emergency). There is also the option of storing the recorded data from the CoE transfers in an internal object dictionary. This object dictionary is structured analogously to that from the SubDevices and can be read out via the functions [`emonCoeSdoUpload()`](#_CPPv416emonCoeSdoUpload10EC_T_DWORD10EC_T_DWORD9EC_T_WORD9EC_T_BYTEP9EC_T_BYTE10EC_T_DWORDP10EC_T_DWORD10EC_T_DWORD10EC_T_DWORD) / [`emonCoeSdoUploadReq()`](#_CPPv419emonCoeSdoUploadReq10EC_T_DWORDP12EC_T_MBXTFER10EC_T_DWORD9EC_T_WORD9EC_T_BYTE10EC_T_DWORD10EC_T_DWORD) and [`emonCoeGetODListReq()`](#_CPPv419emonCoeGetODListReq10EC_T_DWORDP12EC_T_MBXTFER10EC_T_DWORD20EC_T_COE_ODLIST_TYPE10EC_T_DWORD). The notifications for CoE can be deactivated using the [`EC_T_MBX_PARMS_COE::bDisableNotifications`](api_general.html.md#_CPPv4N18EC_T_MBX_PARMS_COE21bDisableNotificationsE) parameter if they are not required or to save computing time. In order to reduce memory consumption, the internal memory for the CoE data can be deactivated using the [`EC_T_MBX_PARMS_COE::bDisableODStorage`](api_general.html.md#_CPPv4N18EC_T_MBX_PARMS_COE17bDisableODStorageE) parameter. If both parameters [`EC_T_MBX_PARMS_COE::bDisableNotifications`](api_general.html.md#_CPPv4N18EC_T_MBX_PARMS_COE21bDisableNotificationsE) and [`EC_T_MBX_PARMS_COE::bDisableODStorage`](api_general.html.md#_CPPv4N18EC_T_MBX_PARMS_COE17bDisableODStorageE) are set, the CoE monitoring is completely deactivated. ## emonNotify - eMbxTferType_COE_SDO_DOWNLOAD SDO download transfer completion. **emonNotify - eMbxTferType_COE_SDO_DOWNLOAD** : **Parameter** : * `pbyInBuf`: [in] Pointer to a structure of type EC_T_MBXTFER, containing the corresponding mailbox transfer object * `dwInBufSize`: [in] Size of the transfer object 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 The transfer result is stored in [`EC_T_MBXTFER::dwErrorCode`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER11dwErrorCodeE). The requested parameters stored in element [`EC_T_MBX_DATA::CoE`](api_mbx.html.md#_CPPv4N13EC_T_MBX_DATA3CoEE) of type [`EC_T_MBX_DATA_COE`](#_CPPv417EC_T_MBX_DATA_COE) are part of [`EC_T_MBXTFER::MbxData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER7MbxDataE). The SDO data stored in [`EC_T_MBXTFER::pbyMbxTferData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER14pbyMbxTferDataE). ### struct EC_T_MBX_DATA_COE ### Public Members ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wStationAddress Station address of the slave ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wIndex Object index ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) bySubIndex Object subindex ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bCompleteAccess Complete access ## emonNotify - eMbxTferType_COE_SDO_UPLOAD SDO upload transfer completion. **emonNotify - eMbxTferType_COE_SDO_UPLOAD** : **Parameter** : * `pbyInBuf`: [in] Pointer to a structure of type EC_T_MBXTFER, containing the corresponding mailbox transfer object * `dwInBufSize`: [in] Size of the transfer object 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 The transfer result is stored in [`EC_T_MBXTFER::dwErrorCode`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER11dwErrorCodeE). The request parameters stored in element [`EC_T_MBX_DATA::CoE`](api_mbx.html.md#_CPPv4N13EC_T_MBX_DATA3CoEE) of type [`EC_T_MBX_DATA_COE`](#_CPPv417EC_T_MBX_DATA_COE) are part of [`EC_T_MBXTFER::MbxData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER7MbxDataE). The SDO data stored in [`EC_T_MBXTFER::pbyMbxTferData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER14pbyMbxTferDataE). ## CoE Emergency (emonNotify - eMbxTferType_COE_EMERGENCY) Indication of a CoE emergency request. A [emonNotify - EC_NOTIFY_MBOXRCV](api_mbx.html.md#emonnotify-ec-notify-mboxrcv) is given with [`EC_T_MBXTFER::eMbxTferType`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER12eMbxTferTypeE) = [`EC_T_MBXTFER_TYPE::eMbxTferType_COE_EMERGENCY`](api_mbx.html.md#_CPPv4N17EC_T_MBXTFER_TYPE26eMbxTferType_COE_EMERGENCYE). **emonNotify - eMbxTferType_COE_EMERGENCY** : **Parameter** : * `pbyInBuf`: [in] Pointer to a structure of type EC_T_MBXTFER, containing the corresponding mailbox transfer object * `dwInBufSize`: [in] Size of the transfer object 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 In case of an emergency notification all registered clients will get this notification. The corresponding mailbox transfer object will be created. [`EC_T_MBXTFER::dwTferId`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER8dwTferIdE) is undefined as it is not needed by the client. The transfer result is stored in [`EC_T_MBXTFER::dwErrorCode`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER11dwErrorCodeE). The emergency data stored in element [`EC_T_MBX_DATA::CoE_Emergency`](api_mbx.html.md#_CPPv4N13EC_T_MBX_DATA13CoE_EmergencyE) of type [`EC_T_COE_EMERGENCY`](#_CPPv418EC_T_COE_EMERGENCY) is part of [`EC_T_MBXTFER::MbxData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER7MbxDataE) and may have to be buffered by the client. Access to the memory area [`EC_T_MBXTFER::MbxData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER7MbxDataE) outside of the notification caller context is illegal and the results are undefined. ### struct EC_T_COE_EMERGENCY ### Public Members ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wErrorCode Error code according to EtherCAT specification ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byErrorRegister Error register ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) abyData[EC_COE_EMERGENCY_DATASIZE] Error data ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wStationAddress Slave node address of the faulty slave #### SEE ALSO A more detailed description of the values can be found in the EtherCAT® specification ETG.1000, section 5. ## emonCoeSdoUpload ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonCoeSdoUpload([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wObIndex, [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byObSubIndex, [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) \*pbyData, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwDataLen, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) \*pdwOutDataLen, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwTimeout, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwFlags) Execute a CoE SDO upload from an EtherCAT slave device to the master. This function may not be called from within the JobTask’s context. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **dwSlaveId** – [in] Slave ID * **wObIndex** – [in] Object index * **byObSubIndex** – [in] Object sub index. If Complete Access only 0 or 1 allowed. * **pbyData** – [out] Buffer receiving transferred data * **dwDataLen** – [in] Buffer length [bytes] * **pdwOutDataLen** – [out] Length of received data [byte] * **dwTimeout** – [in] Timeout [ms] * **dwFlags** – [in] Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE). * **Returns:** * [EC_E_NOERROR](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga8c8419c32e88e73d940a4501fe427116) if successful * [EC_E_INVALIDSTATE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga2a6310e052fca1b94797e8e26f031739) if EtherCAT stack isn’t initialized * [EC_E_INVALIDPARM](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga1e10d9022db11a708658c71b0dead2fe) if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * [EC_E_NOMEMORY](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga48c2a7b288dc6922a8c0eb116495e1fd) if the mailbox protocol queue of the slave is full * [EC_E_SLAVE_NOT_PRESENT](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga45555d5de25571188a82d2d76c02dd81) if slave not present * [EC_E_NOTFOUND](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga3113f3b6f82bb50e6ab3cde40268730a) if no slave matching dwSlaveId can be found * [EC_E_NO_MBX_SUPPORT](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga461eba97c1aa71d0d6bc72202035ad98) if slave has no mailbox support * [EC_E_INVALID_SLAVE_STATE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga9a3a38c9d24ba99a15c7fc3c953e1ff2) if slave is in an invalid state for mailbox transfer * [EC_E_MASTER_RED_STATE_INACTIVE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1gae2870f20d370920995e27b2a78171a5e) if Master Redundancy is configured and master is inactive * [EC_E_ADS_IS_RUNNING](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1gac053cb32c9b2bee0305b0644ef76e933) if ADS server is running * [CoE SDO error code](error-codes_coe.html.md#df-d91-group-e-c-e-r-r-o-r-c-o-d-e-s-c-o-e) #### SEE ALSO [`emonGetSlaveId()`](api_slave.html.md#_CPPv414emonGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emonCoeSdoUploadReq ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonCoeSdoUploadReq([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_MBXTFER](api_mbx.html.md#_CPPv412EC_T_MBXTFER) \*pMbxTfer, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wObIndex, [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byObSubIndex, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwTimeout, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwFlags) Initiates a CoE SDO upload from an EtherCAT slave device to the master and returns immediately. A unique transfer ID must be written into [EC_T_MBXTFER.dwTferId](api_mbx.html.md#dd/db6/struct_e_c___t___m_b_x_t_f_e_r_1a36cd53365b5741523a1f5b8777866024). EC_NOTIFY_MBOXRCV is given on completion. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **pMbxTfer** – [in] Mailbox transfer object created with emMbxTferCreate * **dwSlaveId** – [in] Slave ID * **wObIndex** – [in] Object index * **byObSubIndex** – [in] Object sub index. If Complete Access only 0 or 1 allowed. * **dwTimeout** – [in] Timeout [ms] * **dwFlags** – [in] Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE). * **Returns:** * [EC_E_NOERROR](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga8c8419c32e88e73d940a4501fe427116) if successful * [EC_E_INVALIDSTATE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga2a6310e052fca1b94797e8e26f031739) if EtherCAT stack isn’t initialized * [EC_E_INVALIDPARM](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga1e10d9022db11a708658c71b0dead2fe) if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * [EC_E_NOMEMORY](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga48c2a7b288dc6922a8c0eb116495e1fd) if the mailbox protocol queue of the slave is full * [EC_E_SLAVE_NOT_PRESENT](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga45555d5de25571188a82d2d76c02dd81) if slave not present * [EC_E_NOTFOUND](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga3113f3b6f82bb50e6ab3cde40268730a) if no slave matching dwSlaveId can be found * [EC_E_NO_MBX_SUPPORT](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga461eba97c1aa71d0d6bc72202035ad98) if slave has no mailbox support * [EC_E_INVALID_SLAVE_STATE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga9a3a38c9d24ba99a15c7fc3c953e1ff2) if slave is in an invalid state for mailbox transfer * [EC_E_MASTER_RED_STATE_INACTIVE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1gae2870f20d370920995e27b2a78171a5e) if Master Redundancy is configured and master is inactive * [EC_E_ADS_IS_RUNNING](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1gac053cb32c9b2bee0305b0644ef76e933) if the ADS server is running * [CoE SDO error code](error-codes_coe.html.md#df-d91-group-e-c-e-r-r-o-r-c-o-d-e-s-c-o-e) #### SEE ALSO - [emonNotify - eMbxTferType_COE_SDO_UPLOAD](#emonnotify-embxtfertype-coe-sdo-upload) - [`emonGetSlaveId()`](api_slave.html.md#_CPPv414emonGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emonIoCtl - EC_IOCTL_MONITOR_SET_COESDO_CLEAR_ON_READ ### EC_IOCTL_MONITOR_SET_COESDO_CLEAR_ON_READ Enable or disable clear on read of the CoE SDO data. If clear on read is enabled, the data is automatically cleared after each read of the CoE SDO Index, SubIndex using : [emonCoeSdoUpload()](#db/d74/_ec_master_api_8cpp_1a901fe227913f012d68e77c12b42d0aca) or : [emonCoeSdoUploadReq()](#db/d74/_ec_master_api_8cpp_1a33064d6d492bdda5f169b78ef381e277). The IOCTL must be called after : [emonConfigureNetwork()](api_general.html.md#db/d74/_ec_master_api_8cpp_1abdf92b52ec02b48f106a638f839db3c0). * **Parameters:** * **pbyInBuf** – [in] Pointer to value of EC_T_BOOL. EC_TRUE: enable clear on read * **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](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga8c8419c32e88e73d940a4501fe427116) or error code #### SEE ALSO [`emonIoCtl()`](api_general.html.md#_CPPv49emonIoCtl10EC_T_DWORD10EC_T_DWORDPCK9EC_T_VOID10EC_T_DWORDPC9EC_T_VOID10EC_T_DWORDPC10EC_T_DWORD) ## emonCoeGetODList ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonCoeGetODList([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_COE_ODLIST_TYPE](#_CPPv420EC_T_COE_ODLIST_TYPE) eListType, [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) \*pbyData, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwDataLen, [EC_T_COE_ODLIST](#_CPPv415EC_T_COE_ODLIST) \*poOdList, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwTimeout) Gets a list of object IDs that have so far been transferred to a slave and received by the EC-Monitor. This function may not be called from within the JobTask’s context. #### NOTE The data buffer will receive the slave response containing the list type followed by the list itself. Therefore the buffer must be 2 bytes bigger than the expected list size. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **dwSlaveId** – [in] Slave ID * **eListType** – [in] Which object types shall be transferred * **pbyData** – [out] Buffer receiving transferred data * **dwDataLen** – [in] Buffer length in bytes * **poOdList** – [out] Received OD list object * **dwTimeout** – [in] Timeout [ms] * **Returns:** * [EC_E_NOERROR](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga8c8419c32e88e73d940a4501fe427116) if successful * [EC_E_INVALIDSTATE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga2a6310e052fca1b94797e8e26f031739) if master isn’t initialized * [EC_E_INVALIDPARM](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga1e10d9022db11a708658c71b0dead2fe) if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * [EC_E_NOMEMORY](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga48c2a7b288dc6922a8c0eb116495e1fd) if the mailbox protocol queue of the slave is full * [EC_E_SLAVE_NOT_PRESENT](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga45555d5de25571188a82d2d76c02dd81) if slave not present * [EC_E_NOTFOUND](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga3113f3b6f82bb50e6ab3cde40268730a) if no slave matching dwSlaveId can be found * [EC_E_NO_MBX_SUPPORT](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga461eba97c1aa71d0d6bc72202035ad98) if slave has no mailbox support * [EC_E_INVALID_SLAVE_STATE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga9a3a38c9d24ba99a15c7fc3c953e1ff2) if slave is in an invalid state for mailbox transfer * [EC_E_MASTER_RED_STATE_INACTIVE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1gae2870f20d370920995e27b2a78171a5e) if Master Redundancy is configured and master is inactive * [EC_E_ADS_IS_RUNNING](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1gac053cb32c9b2bee0305b0644ef76e933) if ADS server is running * [CoE SDO error code](error-codes_coe.html.md#df-d91-group-e-c-e-r-r-o-r-c-o-d-e-s-c-o-e) ### enum EC_T_COE_ODLIST_TYPE *Values:* ### enumerator eODListType_Lengths Lengths of each list type ### enumerator eODListType_ALL List contains all objects ### enumerator eODListType_RxPdoMap List with PDO mappable objects ### enumerator eODListType_TxPdoMap List with objects that can be changed ### enumerator eODListType_StoredFRepl Only stored for a device replacement objects ### enumerator eODListType_StartupParm Only startup parameter objects #### SEE ALSO - [`emonGetSlaveId()`](api_slave.html.md#_CPPv414emonGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emonCoeGetODListReq ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonCoeGetODListReq([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_MBXTFER](api_mbx.html.md#_CPPv412EC_T_MBXTFER) \*pMbxTfer, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_COE_ODLIST_TYPE](#_CPPv420EC_T_COE_ODLIST_TYPE) eListType, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwTimeout) Initiates retrieval of a list of object IDs that have so far been transferred to a slave and received by the EC-Monitor and returns immediately. #### NOTE The mailbox transfer object will receive the slave response containing the list type followed by the list itself. Therefore the buffer must be 2 bytes bigger than the expected list size. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **pMbxTfer** – [in] Mailbox transfer * **dwSlaveId** – [in] Slave ID * **eListType** – [in] Which object types shall be transferred * **dwTimeout** – [in] Timeout [ms] * **Returns:** * [EC_E_NOERROR](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga8c8419c32e88e73d940a4501fe427116) if successful * [EC_E_INVALIDSTATE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga2a6310e052fca1b94797e8e26f031739) if EtherCAT stack isn’t initialized * [EC_E_INVALIDPARM](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga1e10d9022db11a708658c71b0dead2fe) if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT * [EC_E_NOMEMORY](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga48c2a7b288dc6922a8c0eb116495e1fd) if the mailbox protocol queue of the slave is full * [EC_E_SLAVE_NOT_PRESENT](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga45555d5de25571188a82d2d76c02dd81) if slave not present * [EC_E_NOTFOUND](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga3113f3b6f82bb50e6ab3cde40268730a) if no slave matching dwSlaveId can be found * [EC_E_NO_MBX_SUPPORT](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga461eba97c1aa71d0d6bc72202035ad98) if slave has no mailbox support * [EC_E_INVALID_SLAVE_STATE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga9a3a38c9d24ba99a15c7fc3c953e1ff2) if slave is in an invalid state for mailbox transfer * [EC_E_MASTER_RED_STATE_INACTIVE](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1gae2870f20d370920995e27b2a78171a5e) if Master Redundancy is configured and master is inactive * [EC_E_ADS_IS_RUNNING](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1gac053cb32c9b2bee0305b0644ef76e933) if ADS server is running * [CoE SDO error code](error-codes_coe.html.md#df-d91-group-e-c-e-r-r-o-r-c-o-d-e-s-c-o-e) #### SEE ALSO - [`emonMbxTferCreate()`](api_mbx.html.md#_CPPv417emonMbxTferCreate10EC_T_DWORDP17EC_T_MBXTFER_DESC) - [`emonGetSlaveId()`](api_slave.html.md#_CPPv414emonGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emonNotify - eMbxTferType_COE_GETODLIST Notification of a detected CoE SDO information service transfer for an object dictionary list. **emonNotify - eMbxTferType_COE_GETODLIST** : **Parameter** : * `pbyInBuf`: [in] Pointer to a structure of type EC_T_MBXTFER * `dwInBufSize`: [in] Size of the transfer object 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 The transfer result is stored in [`EC_T_MBXTFER::dwErrorCode`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER11dwErrorCodeE). The object list stored in element [`EC_T_MBX_DATA::CoE_ODList`](api_mbx.html.md#_CPPv4N13EC_T_MBX_DATA10CoE_ODListE) of type [`EC_T_COE_ODLIST`](#_CPPv415EC_T_COE_ODLIST) is part of [`EC_T_MBXTFER::MbxData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER7MbxDataE) and may have to be buffered by the client. Access to the memory area [`EC_T_MBXTFER::MbxData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER7MbxDataE) outside of the notification caller context is illegal and the results are undefined. ### struct EC_T_COE_ODLIST ### Public Members ### [EC_T_COE_ODLIST_TYPE](#_CPPv420EC_T_COE_ODLIST_TYPE) eOdListType List type ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wLen Amount of object IDs ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wStationAddress Station address of the slave ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) \*pwOdList Array containing object IDs ## emonNotify - eMbxTferType_COE_GETENTRYDESC Notification of a detected CoE SDO information service transfer for an object entry description. **emonNotify - eMbxTferType_COE_GETENTRYDESC** : **Parameter** : * `pbyInBuf`: [in] Pointer to a structure of type EC_T_MBXTFER * `dwInBufSize`: [in] Size of the transfer object 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 The transfer result is stored in [`EC_T_MBXTFER::dwErrorCode`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER11dwErrorCodeE). The object entry description stored in element [`EC_T_MBX_DATA::CoE_EntryDesc`](api_mbx.html.md#_CPPv4N13EC_T_MBX_DATA13CoE_EntryDescE) of type [`EC_T_COE_ENTRYDESC`](#_CPPv418EC_T_COE_ENTRYDESC) is part of [`EC_T_MBXTFER::MbxData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER7MbxDataE) and may have to be buffered by the client. Access to the memory area [`EC_T_MBXTFER::MbxData`](api_mbx.html.md#_CPPv4N12EC_T_MBXTFER7MbxDataE) outside of the notification caller context is illegal and the results are undefined. ### struct EC_T_COE_ENTRYDESC ### Public Members ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wObIndex Index in the object dictionary ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byObSubIndex Sub index in the object dictionary ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byValueInfo Bit mask which information is included in pbyData. See [Value info flags](#df-db0-group-e-c-c-o-e-e-n-t-r-y-v-a-l-u-e-i-n-f-o). ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wDataType Object data type according to ETG.1000 ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wBitLen Object size (number of bits) ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byObAccess Access rights. See [Object access flags](#de-d21-group-e-c-c-o-e-e-n-t-r-y-o-b-j-a-c-c-e-s-s). ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bRxPdoMapping Object is mappable in a RxPDO ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bTxPdoMapping Object is mappable in a TxPDO ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bObCanBeUsedForBackup Object can be used for backup ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bObCanBeUsedForSettings Object can be used for settings ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wStationAddress Station address of the slave ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wDataLen Size of the remaining object data ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) \*pbyData Remaining object data: dwUnitType, pbyDefaultValue, pbyMinValue, pbyMaxValue, pbyDescription (see ETG.1000.5 and ETG.1000.6) **Value info flags** ### EC_COE_ENTRY_ObjAccess Object access ### EC_COE_ENTRY_ObjCategory Object category ### EC_COE_ENTRY_PdoMapping PDO mapping ### EC_COE_ENTRY_UnitType Unit type ### EC_COE_ENTRY_DefaultValue Default value ### EC_COE_ENTRY_MinValue Minimum value ### EC_COE_ENTRY_MaxValue Maximum value **Object access flags** ### EC_COE_ENTRY_Access_R_PREOP Read access in Pre-Operational state ### EC_COE_ENTRY_Access_R_SAFEOP Read access in Safe-Operational state ### EC_COE_ENTRY_Access_R_OP Read access in Operational state ### EC_COE_ENTRY_Access_W_PREOP Write access in Pre-Operational state ### EC_COE_ENTRY_Access_W_SAFEOP Write access in Safe-Operational state ### EC_COE_ENTRY_Access_W_OP Write access in Operational state #### SEE ALSO A more detailed description of the values can be found in the EtherCAT® specification ETG.1000, section 5 and 6.