# Servo Drive Profile according to IEC61491 over EtherCAT® (SoE) The SoE Service Channel (SSC) is equivalent to the IEC61491 Service Channel used for non-cyclic data exchange. The SSC uses the EtherCAT® mailbox mechanism. It allows accessing IDNs and their elements. For extended information about SoE see the IEC IEC61800-7-300 document 22G185eFDIS. The following services are available: - Write IDN: : With [`emSoeWrite()`](#_CPPv410emSoeWrite10EC_T_DWORD10EC_T_DWORD9EC_T_BYTEP9EC_T_BYTE9EC_T_WORDPK9EC_T_BYTE10EC_T_DWORD10EC_T_DWORD) the data and elements of an IDN which are writeable can be written. - Read IDN: : With [`emSoeRead()`](#_CPPv49emSoeRead10EC_T_DWORD10EC_T_DWORD9EC_T_BYTEP9EC_T_BYTE9EC_T_WORDP9EC_T_BYTE10EC_T_DWORDP10EC_T_DWORD10EC_T_DWORD) the data and elements of an IDN can be read. - Procedure command Execution: : With [`emSoeWrite()`](#_CPPv410emSoeWrite10EC_T_DWORD10EC_T_DWORD9EC_T_BYTEP9EC_T_BYTE9EC_T_WORDPK9EC_T_BYTE10EC_T_DWORD10EC_T_DWORD) also procedure commands can be started. Procedure commands are special IDNs, which invoke fixed functional processes. When processing is finished, a notification will be received. To abort a running command execution [`emSoeAbortProcCmd()`](#_CPPv417emSoeAbortProcCmd10EC_T_DWORD10EC_T_DWORD9EC_T_BYTEP9EC_T_BYTE9EC_T_WORD10EC_T_DWORD) has to be called. - Notification: : In case of a notification all registered clients will get this notification. A notification will be received when processing of a command has finished. To register a client [`emRegisterClient()`](api_general_functions.html.md#_CPPv416emRegisterClient10EC_T_DWORD12EC_PF_NOTIFYP9EC_T_VOIDP20EC_T_REGISTERRESULTS) must be called. - Emergency: : The main purpose of this service is to provide additional information about the SubDevice for debugging and maintenance. In case of an emergency, all registered clients will get notified. To register a client [`emRegisterClient()`](api_general_functions.html.md#_CPPv416emRegisterClient10EC_T_DWORD12EC_PF_NOTIFYP9EC_T_VOIDP20EC_T_REGISTERRESULTS) must be called. Abbreviations: - IDN: : identification number: Designation of operating data under which a data block is preserved with its attribute, name, unit, minimum and maximum input values, and the data. - SoE: : IEC 61491 Servo drive profile over EtherCAT® (SoE) - SSC: : SoE Service Channel (non-cyclic data exchange) ## SoE ElementFlags With the ElementFlags each element of an IDN can be addressed. The ElementFlags indicate which elements of an IDN are read or written. The ElementFlags indicate which data will be transmitted in the SoE data buffer. ### SOE_BM_ELEMENTFLAG_DATATSTATE Shall be set in case of Notify SoE Service Channel Command Execution ### SOE_BM_ELEMENTFLAG_NAME Name of operation data. The name consist of 64 octets maximum. ### SOE_BM_ELEMENTFLAG_ATTRIBUTE Attribute of operation data. The attribute contains all information which is needed to display operation data intelligibly. ### SOE_BM_ELEMENTFLAG_UNIT Unit of operation data ### SOE_BM_ELEMENTFLAG_MIN The IDN minimum input value shall be the smallest numerical value for the operation data which the slave is able to process ### SOE_BM_ELEMENTFLAG_MAX The IDN maximum input value shall be the largest numerical value for the operation data which the slave is able to process ### SOE_BM_ELEMENTFLAG_VALUE Operation data ### SOE_BM_ELEMENTFLAG_DEFAULT The IDN default value ## SoE IDN coding The parameter addressing area consists of 4096 different standard IDNs, each with 8 parameter sets and 4096 manufacturer specific IDNs, each with 8 parameter sets. ![SoE (Sercos over EtherCAT) mailbox protocol structure showing IDN-based parameter access encapsulated in EtherCAT mailbox frames](../Media/SoE.PNG) The Control unit cycle time (TNcyc) which is an standard IDN S-0-0001 equates to wIDN = 0x1 The first manufacturer specific IDN P-0-0001 equates to wIDN = 0x8001 ## emSoeWrite ### static [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) ecatSoeWrite([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIDN, const [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyData, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwDataLen, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) ### [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) emSoeWrite([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIdn, const [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyData, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwDataLen, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) Execute an SoE SSC Write service which downloads data to an EtherCAT slave device. The function returns after timeout expired or download is completed successfully (Write response is received). It can also perform an SoE SSC Procedure Command. After a procedure command has started, the slave generates a normal SSC Write Response, and the function returns. If the data to be sent with the write service exceeds the mailbox size, the data will be sent fragmented. The fragmented write operation consists of several Write SSC Fragment Services. Therefore the selected Timeout should be increasing with the count of fragments. 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 * **byDriveNo** – [in] Drive number to address inside slave device * **pbyElementFlags** – [in/out] SoE ElementFlags. Flag indicating elements to address. * **wIdn** – [in] IDN of the object to address * **pbyData** – [in] Buffer containing transferred data * **dwDataLen** – [in] Buffer length [byte] * **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 * [SoE error code](error-codes_soe.html.md#d2-d9d-group-e-c-e-r-r-o-r-c-o-d-e-s-s-o-e) #### SEE ALSO [`emGetSlaveId()`](api_slave_control.html.md#_CPPv412emGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emSoeWriteReq Requests an SoE SSC Write and returns immediately. ### static [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) ecatSoeWriteReq([EC_T_MBXTFER](mbx_tfer.html.md#_CPPv412EC_T_MBXTFER) \*pMbxTfer, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIDN, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) ### [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) emSoeWriteReq([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_MBXTFER](mbx_tfer.html.md#_CPPv412EC_T_MBXTFER) \*pMbxTfer, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIdn, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) Requests an SoE SSC Write and returns immediately. This function may be called from within the JobTask’s context. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **pMbxTfer** – [in] Mailbox transfer object * **dwSlaveId** – [in] Slave ID * **byDriveNo** – [in] Drive number to address inside slave device * **pbyElementFlags** – [in/out] SoE ElementFlags. Flag indicating elements to address. * **wIdn** – [in] IDN of the object to address * **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 * [SoE error code](error-codes_soe.html.md#d2-d9d-group-e-c-e-r-r-o-r-c-o-d-e-s-s-o-e) #### SEE ALSO - [`emSoeWrite()`](#_CPPv410emSoeWrite10EC_T_DWORD10EC_T_DWORD9EC_T_BYTEP9EC_T_BYTE9EC_T_WORDPK9EC_T_BYTE10EC_T_DWORD10EC_T_DWORD) - [`emGetSlaveId()`](api_slave_control.html.md#_CPPv412emGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emSoeRead ### static [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) ecatSoeRead([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIDN, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyData, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwDataLen, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) \*pdwOutDataLen, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) ### [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) emSoeRead([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIdn, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyData, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwDataLen, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) \*pdwOutDataLen, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) Execute an SoE SCC Read service which uploads data from an EtherCAT SoE slave device. The received data can consist of several fragments. The reserved data buffer (pbyData) must have space for all received data segments and the selected Timeout should be increasing with the count of fragments. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **dwSlaveId** – [in] Slave ID * **byDriveNo** – [in] Drive number to address inside slave device * **pbyElementFlags** – [in/out] SoE ElementFlags. Flag indicating elements to address. * **wIdn** – [in] IDN of the object to address * **pbyData** – [out] Buffer receiving transferred data * **dwDataLen** – [in] Buffer length [byte] * **pdwOutDataLen** – [out] Length of received data [byte] * **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 * [SoE error code](error-codes_soe.html.md#d2-d9d-group-e-c-e-r-r-o-r-c-o-d-e-s-s-o-e) #### SEE ALSO [`emGetSlaveId()`](api_slave_control.html.md#_CPPv412emGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emSoeReadReq ### static [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) ecatSoeReadReq([EC_T_MBXTFER](mbx_tfer.html.md#_CPPv412EC_T_MBXTFER) \*pMbxTfer, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIDN, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) ### [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) emSoeReadReq([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_MBXTFER](mbx_tfer.html.md#_CPPv412EC_T_MBXTFER) \*pMbxTfer, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIdn, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) Requests an SoE SSC Read and returns immediately. This function may be called from within the JobTask’s context. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **pMbxTfer** – [in] Mailbox transfer object * **dwSlaveId** – [in] Slave ID * **byDriveNo** – [in] Drive number to address inside slave device * **pbyElementFlags** – [in/out] SoE ElementFlags. Flag indicating elements to address. * **wIdn** – [in] IDN of the object to address * **dwTimeout** – [in] Timeout [ms]. Must not be set to EC_NOWAIT. * **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 * [SoE error code](error-codes_soe.html.md#d2-d9d-group-e-c-e-r-r-o-r-c-o-d-e-s-s-o-e) #### SEE ALSO - [`emSoeRead()`](#_CPPv49emSoeRead10EC_T_DWORD10EC_T_DWORD9EC_T_BYTEP9EC_T_BYTE9EC_T_WORDP9EC_T_BYTE10EC_T_DWORDP10EC_T_DWORD10EC_T_DWORD) - [`emGetSlaveId()`](api_slave_control.html.md#_CPPv412emGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emSoeAbortProcCmd ### static [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) ecatSoeAbortProcCmd([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIDN, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) ### [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) emSoeAbortProcCmd([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) byDriveNo, [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyElementFlags, [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIdn, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwTimeout) Abort SSC Procedure Command sequence. A Procedure Command takes up some time. After a procedure command has started, the slave generates a normal SSC Write Response. The end of a procedure command is indicated by the Notify SSC Command Execution Service. #### NOTE 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 * **byDriveNo** – [in] Drive number to address inside slave device * **pbyElementFlags** – [in/out] SoE ElementFlags. Flag indicating elements to address. * **wIdn** – [in] IDN of the object to address * **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) or error code #### SEE ALSO [`emGetSlaveId()`](api_slave_control.html.md#_CPPv412emGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emConvertEcErrorToSoeError ### [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) ecatConvertEcErrorToSoeError([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwErrorCode) ### [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) emConvertEcErrorToSoeError([EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwErrorCode) Convert master error code to SoE error code. * **Returns:** SoE error code ## emNotify - EC_NOTIFY_SOE_MBXSND_WKC_ERROR This error will be indicated in case the working counter of an SoE mailbox write command was not set to the expected value of 1. Detailed error information is stored in the structure [`EC_T_WKCERR_DESC`](api_diagnosis.html.md#_CPPv416EC_T_WKCERR_DESC) of [`EC_T_ERROR_NOTIFICATION_DESC`](api_diagnosis.html.md#_CPPv428EC_T_ERROR_NOTIFICATION_DESC). ## emNotify - EC_NOTIFY_SOE_WRITE_ERROR This error will be indicated in case an SoE mailbox write command responded with an error. Detailed error information is stored in the structure [`EC_T_INITCMD_ERR_DESC`](api_diagnosis.html.md#_CPPv421EC_T_INITCMD_ERR_DESC) of [`EC_T_ERROR_NOTIFICATION_DESC`](api_diagnosis.html.md#_CPPv428EC_T_ERROR_NOTIFICATION_DESC).