# SubDevice status functions ## emonGetNumConfiguredSlaves ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetNumConfiguredSlaves([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID) Returns the number of slaves which are configured in the ENI. * **Parameters:** **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **Returns:** Number of slaves ## emonGetNumConnectedSlaves ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetNumConnectedSlaves([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID) Get number of currently connected slaves. * **Parameters:** **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **Returns:** Number of connected slaves ## emonGetSlaveId ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveId([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wStationAddress) Determines the slave ID using the slave station address. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **wStationAddress** – [in] Station address of the slave * **Returns:** Slave ID or INVALID_SLAVE_ID if the slave could not be found or the stack is not initialized ## emonGetSlaveIdAtPosition ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveIdAtPosition([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wAutoIncAddress) Determines the slave ID using the slave auto increment address. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **wAutoIncAddress** – [in] Auto increment address of the slave * **Returns:** Slave ID or INVALID_SLAVE_ID if no slave matching wAutoIncAddress can be found ## emonGetSlaveState ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveState([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) \*pwCurrDevState, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) \*pwReqDevState) Get the slave state. The slave state is always read automatically from the AL_STATUS register whenever necessary. It is not forced by calling this function. This function may be called from within the JobTask’s context. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **dwSlaveId** – [in] Slave ID * **pwCurrDevState** – [out] Current slave state * **pwReqDevState** – [out] Requested slave state * **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 or the output pointers are EC_NULL * [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 the slave is 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 #### SEE ALSO - [`emonGetSlaveId()`](#_CPPv414emonGetSlaveId10EC_T_DWORD9EC_T_WORD) - [emonNotify - EC_NOTIFY_SLAVE_STATECHANGED](notification_status.html.md#emonnotify-ec-notify-slave-statechanged) ## emonIsSlavePresent ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonIsSlavePresent([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) \*pbPresence) Returns whether a specific slave is currently connected to the Bus. This function may be called from within the JobTask. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **dwSlaveId** – [in] Slave ID * **pbPresence** – [out] EC_TRUE if the slave is currently connected to the bus, EC_FALSE if not * **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 * [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 #### SEE ALSO - [`emonGetSlaveId()`](#_CPPv414emonGetSlaveId10EC_T_DWORD9EC_T_WORD) - [emonNotify - EC_NOTIFY_SLAVE_PRESENCE](notification_status.html.md#emonnotify-ec-notify-slave-presence) ## emonGetSlaveProp ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) emonGetSlaveProp([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId, [EC_T_SLAVE_PROP](#_CPPv415EC_T_SLAVE_PROP) \*pSlaveProp) Determines the properties of the slave device. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **dwSlaveId** – [in] Slave ID * **pSlaveProp** – [out] Slave properties * **Returns:** EC_TRUE if the slave exists, EC_FALSE if no slave matching dwSlaveId can be found ### struct EC_T_SLAVE_PROP ### Public Members ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wStationAddress Configured station address or INVALID_FIXED_ADDR ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wAutoIncAddr Configured auto increment address or INVALID_AUTO_INC_ADDR ### [EC_T_CHAR](api.html.md#_CPPv49EC_T_CHAR) achName[MAX_STD_STRLEN] Configured name of the slave device (NULL terminated string) #### SEE ALSO [`emonGetSlaveId()`](#_CPPv414emonGetSlaveId10EC_T_DWORD9EC_T_WORD) ## emonGetProcessVarInfoNumOf, emonGetProcessVarInfoEx ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetProcessVarInfoNumOf([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_VAR_DIRECTION](#_CPPv418EC_T_VAR_DIRECTION) eVarDirection, [EC_T_VAR_SOURCE](#_CPPv415EC_T_VAR_SOURCE) eVarSource, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) \*pdwProcessVarInfoNumOf) Get process variables information. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **eVarDirection** – [in] INPUTs, OUTPUTs, … . See [EC_T_VAR_DIRECTION](#d0-dd4-group-e-c-t-v-a-r-d-i-r-e-c-t-i-o-n) . * **eVarSource** – [in] Slave, Master, … . See [EC_T_VAR_SOURCE](#db-db7-group-e-c-t-v-a-r-s-o-u-r-c-e) . * **bFixedAddress** – [in] Use station address if EC_TRUE. Otherwise use AutoInc address. * **wSlaveAddress** – [in] Slave address according to bFixedAddress * **pdwProcessVarInfoNumOf** – [out] Process variables count * **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 ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetProcessVarInfoEx([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_VAR_DIRECTION](#_CPPv418EC_T_VAR_DIRECTION) eVarDirection, [EC_T_VAR_SOURCE](#_CPPv415EC_T_VAR_SOURCE) eVarSource, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_PROCESS_VAR_INFO_EX](#_CPPv424EC_T_PROCESS_VAR_INFO_EX) \*aoVarInfoEx, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwMaxVarInfoCnt, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) \*pdwVarInfoCnt) Get process variables information. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **eVarDirection** – [in] INPUTs, OUTPUTs, … . See [EC_T_VAR_DIRECTION](#d0-dd4-group-e-c-t-v-a-r-d-i-r-e-c-t-i-o-n) . * **eVarSource** – [in] Slave, Master, … . See [EC_T_VAR_SOURCE](#db-db7-group-e-c-t-v-a-r-s-o-u-r-c-e) . * **bFixedAddress** – [in] Use station address if EC_TRUE. Otherwise use AutoInc address. * **wSlaveAddress** – [in] Slave address according to bFixedAddress * **aoVarInfoEx** – [out] The read process variable extended information entries * **dwMaxVarInfoCnt** – [in] Maximum number of variables that can be stored at aoVarInfoEx * **pdwVarInfoCnt** – [out] Number process variable entries that have been stored in aoVarInfoEx * **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 The following example demonstrates how to get all process data variables: ### **emonGetProcessVarInfoEx() Example** ```cpp EC_T_DWORD dwProcessVarInfoNumOf = 0; dwRes = emonGetProcessVarInfoNumOf(dwInstanceId, eVarDirection_All, eVarSource_All, EC_FALSE, 0, &dwProcessVarInfoNumOf); /* ... */ EC_T_PROCESS_VAR_INFO_EX* aoVarInfoEx = (EC_T_PROCESS_VAR_INFO_EX*)OsMalloc(dwProcessVarInfoNumOf * sizeof(EC_T_PROCESS_VAR_INFO_EX)); dwRes = emonGetProcessVarInfoEx(dwInstanceId, eVarDirection_All, eVarSource_All, EC_FALSE, 0, aoVarInfoEx, dwProcessVarInfoNumOf, EC_NULL); /* ... */ OsSafeFree(aoVarInfoEx); ``` **EC_T_VAR_DIRECTION** ### enum EC_T_VAR_DIRECTION *Values:* ### enumerator eVarDirection_Undefined Undefined Direction ### enumerator eVarDirection_INPUT INPUTs ### enumerator eVarDirection_OUTPUT OUTPUTs ### enumerator eVarDirection_All INPUTs and OUTPUTs ### enumerator eVarDirection_BCppDummy **EC_T_VAR_SOURCE** ### enum EC_T_VAR_SOURCE *Values:* ### enumerator eVarSource_Undefined Undefined Source ### enumerator eVarSource_All Slaves and Master/Monitor/Simulator ### enumerator eVarSource_AllSlaves All Slaves ### enumerator eVarSource_Slave Slave ### enumerator eVarSource_Master Master ### enumerator eVarSource_Monitor Monitor ### enumerator eVarSource_Simulator Simulator ### enumerator eVarSource_BCppDummy ## emonGetSlaveInpVarInfoNumOf ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveInpVarInfoNumOf([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) \*pwSlaveInpVarInfoNumOf) Gets the number of input variables of a specific slave. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **pwSlaveInpVarInfoNumOf** – [out] Number of found process variable entries * **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 or the output pointer is EC_NULL * [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 bFixedAddressing / wSlaveAddress can be found #### SEE ALSO - [`emonGetSlaveInpVarInfo()`](#_CPPv422emonGetSlaveInpVarInfo10EC_T_DWORD9EC_T_BOOL9EC_T_WORD9EC_T_WORDP21EC_T_PROCESS_VAR_INFOP9EC_T_WORD) - [`emonGetSlaveInpVarInfoEx()`](#_CPPv424emonGetSlaveInpVarInfoEx10EC_T_DWORD9EC_T_BOOL9EC_T_WORD9EC_T_WORDP24EC_T_PROCESS_VAR_INFO_EXP9EC_T_WORD) ## emonGetSlaveInpVarInfo ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveInpVarInfo([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wNumOfVarsToRead, [EC_T_PROCESS_VAR_INFO](#_CPPv421EC_T_PROCESS_VAR_INFO) \*pSlaveProcVarInfoEntries, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) \*pwReadEntries) Gets the process variable information entries of a specific slave. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **wNumOfVarsToRead** – [in] Number process variable entries that have been stored in pSlaveProcVarInfoEntries * **pSlaveProcVarInfoEntries** – [out] The read process variable information entries * **pwReadEntries** – [out] The number of read process variable information entries * **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 ### struct EC_T_PROCESS_VAR_INFO ### Public Members ### [EC_T_CHAR](api.html.md#_CPPv49EC_T_CHAR) szName[MAX_PROCESS_VAR_NAME_LEN] [out] Name of the found process variable ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wDataType [out] Data type of the found process variable (according to ETG.1000, section 5). See also EcType.h, DEFTYPE_BOOLEAN. ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wFixedAddr [out] Station address of the slave that is owner of this variable ### [EC_T_INT](api.html.md#_CPPv48EC_T_INT) nBitSize [out] Size in bits of the found process variable ### [EC_T_INT](api.html.md#_CPPv48EC_T_INT) nBitOffs [out] Bit offset in the process data image ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bIsInputData [out] Determines whether the found process variable is an input variable or an output variable ### MAX_PROCESS_VAR_NAME_LEN Maximum length of a process variable name: 71 characters ## emonGetSlaveInpVarInfoEx ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveInpVarInfoEx([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wNumOfVarsToRead, [EC_T_PROCESS_VAR_INFO_EX](#_CPPv424EC_T_PROCESS_VAR_INFO_EX) \*pSlaveProcVarInfoEntriesEx, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) \*pwReadEntries) Gets the input process variable extended information entries of a specific slave. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **wNumOfVarsToRead** – [in] Number process variable entries that have been stored in pSlaveProcVarInfoEntries * **pSlaveProcVarInfoEntriesEx** – [out] The read process variable extended information entries * **pwReadEntries** – [out] The number of read process variable information entries * **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 or the output pointer is EC_NULL * [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 bFixedAddressing / wSlaveAddress can be found ### struct EC_T_PROCESS_VAR_INFO_EX ### Public Members ### [EC_T_CHAR](api.html.md#_CPPv49EC_T_CHAR) szName[MAX_PROCESS_VAR_NAME_LEN_EX] [out] Name of the found process variable ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wDataType [out] Data type of the found process variable (according to ETG.1000, section 5). See also EcType.h, DEFTYPE_BOOLEAN. ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wFixedAddr [out] Station address of the slave that is owner of this variable ### [EC_T_INT](api.html.md#_CPPv48EC_T_INT) nBitSize [out] Size in bits of the found process variable ### [EC_T_INT](api.html.md#_CPPv48EC_T_INT) nBitOffs [out] Bit offset in the process data image ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bIsInputData [out] Determines whether the found process variable is an input variable or an output variable ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wIndex [out] Object index ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSubIndex [out] Object sub index ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wPdoIndex [out] Index of PDO (process data object) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wWkcStateDiagOffs [out] Bit offset in the diagnostic image (API GetDiagnosisImagePtr) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wMasterSyncUnit [out] Master Sync Unit ID (ENI: Slave/ProcessData/RxPdo[1..4]@Su, Slave/ProcessData/TxPdo[1..4]@Su, comment at Cyclic/Frame/Cmd) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwTaskId [out] ID of task where process variable is located ### EC_T_CYC_COPY_INFO CopyInfo [out] Copy Info if applied to the variable ### MAX_PROCESS_VAR_NAME_LEN_EX Maximum length of an extended process variable name: 127 characters ## emonGetSlaveOutpVarInfoNumOf ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveOutpVarInfoNumOf([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) \*pwSlaveOutpVarInfoNumOf) Gets the number of output variables of a specific slave. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **pwSlaveOutpVarInfoNumOf** – [out] Number of found process variables * **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 - [`emonGetSlaveOutpVarInfo()`](#_CPPv423emonGetSlaveOutpVarInfo10EC_T_DWORD9EC_T_BOOL9EC_T_WORD9EC_T_WORDP21EC_T_PROCESS_VAR_INFOP9EC_T_WORD) - [`emonGetSlaveOutpVarInfoEx()`](#_CPPv425emonGetSlaveOutpVarInfoEx10EC_T_DWORD9EC_T_BOOL9EC_T_WORD9EC_T_WORDP24EC_T_PROCESS_VAR_INFO_EXP9EC_T_WORD) ## emonGetSlaveOutpVarInfo ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveOutpVarInfo([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wNumOfVarsToRead, [EC_T_PROCESS_VAR_INFO](#_CPPv421EC_T_PROCESS_VAR_INFO) \*pSlaveProcVarInfoEntries, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) \*pwReadEntries) Gets the output process variable information entries of a specific slave. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **wNumOfVarsToRead** – [in] Number of found process variable entries * **pSlaveProcVarInfoEntries** – [out] The read process variable information entries * **pwReadEntries** – [out] The number of read process variable information entries * **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 [`EC_T_PROCESS_VAR_INFO`](#_CPPv421EC_T_PROCESS_VAR_INFO) ## emonGetSlaveOutpVarInfoEx ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveOutpVarInfoEx([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wNumOfVarsToRead, [EC_T_PROCESS_VAR_INFO_EX](#_CPPv424EC_T_PROCESS_VAR_INFO_EX) \*pSlaveProcVarInfoEntriesEx, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) \*pwReadEntries) Gets the output process variable extended information entries of a specific slave. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **wNumOfVarsToRead** – [in] Number of process variable information entries * **pSlaveProcVarInfoEntriesEx** – [out] The read process extended variable entries * **pwReadEntries** – [out] The number of read process variable information entries * **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 [`EC_T_PROCESS_VAR_INFO_EX`](#_CPPv424EC_T_PROCESS_VAR_INFO_EX) ## emonGetSlaveInpVarByObjectEx ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveInpVarByObjectEx([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wIndex, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSubIndex, [EC_T_PROCESS_VAR_INFO_EX](#_CPPv424EC_T_PROCESS_VAR_INFO_EX) \*pProcessVarInfoEntry) Gets the input process variable extended information entry by object index, subindex of a specific slave. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **wIndex** – [in] Object index * **wSubIndex** – [in] Object sub index * **pProcessVarInfoEntry** – [out] Process variable extended information entry * **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 [`EC_T_PROCESS_VAR_INFO_EX`](#_CPPv424EC_T_PROCESS_VAR_INFO_EX) ## emonGetSlaveOutpVarByObjectEx ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetSlaveOutpVarByObjectEx([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wIndex, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSubIndex, [EC_T_PROCESS_VAR_INFO_EX](#_CPPv424EC_T_PROCESS_VAR_INFO_EX) \*pProcessVarInfoEntry) Gets the input process variable extended information entry by object index, subindex of a specific slave. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **wIndex** – [in] Object index * **wSubIndex** – [in] Object sub index * **pProcessVarInfoEntry** – [out] Process variable extended information entry * **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 [`EC_T_PROCESS_VAR_INFO_EX`](#_CPPv424EC_T_PROCESS_VAR_INFO_EX) ## emonReadSlaveRegister ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonReadSlaveRegister([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wRegisterOffset, [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) \*pbyData, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wLen, [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwTimeout) Reads data from the ESC memory that have so far been transferred to a slave and received by the EC-Monitor. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **wRegisterOffset** – [in] Register offset. I.e. use 0x0130 to read the AL Status register. * **pbyData** – [out] Buffer receiving transfered data * **wLen** – [in] Number of bytes to receive * **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 or the command is not supported or the timeout value is set to EC_NOWAIT * [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 the slave is 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 bFixedAddressing / wSlaveAddress can be found * [EC_E_TIMEOUT](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_1ga2d09527654c655e159d26d36143674cb) if dwTimeout elapsed during the API call * [EC_E_BUSY](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_1ga7c1a3a6dafef1469c97b8e6c4f3868a5) if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state * [EC_E_NOTREADY](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_1ga4033f6f3b33aa2550d6e46e808a92f37) if the working counter was not set when sending the command (slave may not be connected or did not respond) * [EC_E_INVALIDSIZE](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_1gacd9f0baea7a294f85c3f5bde1543d1d0) if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. ## emonGetCfgSlaveInfo ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetCfgSlaveInfo([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_CFG_SLAVE_INFO](#_CPPv419EC_T_CFG_SLAVE_INFO) \*pSlaveInfo) Return information about a configured slave from the ENI file. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **pSlaveInfo** – [out] Information about the slave * **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 ### struct EC_T_CFG_SLAVE_INFO ### Public Members ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId [out] Slave’s ID to bind bus slave and config slave information ### [EC_T_CHAR](api.html.md#_CPPv49EC_T_CHAR) abyDeviceName[ECAT_DEVICE_NAMESIZE] [out] Slave’s configured name (80 Byte) (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwHCGroupIdx [out] Index of Hot Connect group, 0 for mandatory ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bIsPresent [out] Slave present on bus ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bIsHCGroupPresent [out] Slave’s Hot Connect group present on bus ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwVendorId [out] Vendor identification (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwProductCode [out] Product code (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwRevisionNumber [out] Revision number (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSerialNumber [out] Serial number (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wStationAddress [out] Slave’s configured station address (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wAutoIncAddress [out] Slave’s auto increment address (may differ from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdOffsIn [out] Process input data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdSizeIn [out] Process input data bit size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdOffsOut [out] Process output data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdSizeOut [out] Process output data bit size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdOffsIn2 [out] 2nd sync unit process input data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdSizeIn2 [out] 2nd sync unit process input data bit size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdOffsOut2 [out] 2nd sync unit process output data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdSizeOut2 [out] 2nd sync unit process output data bit size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdOffsIn3 [out] 3rd sync unit process input data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdSizeIn3 [out] 3rd sync unit process input data bit size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdOffsOut3 [out] 3rd sync unit process output data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdSizeOut3 [out] 3rd sync unit process output data bit size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdOffsIn4 [out] 4th sync unit process input data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdSizeIn4 [out] 4th sync unit process input data bit size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdOffsOut4 [out] 4th sync unit process output data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdSizeOut4 [out] 4th sync unit process output data bit size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwMbxSupportedProtocols [out] Mailbox protocols supported by the slave (from ENI file). Combination of [Supported mailbox protocols](#d6-d4d-group-e-c-m-b-x-p-r-o-t-o-c-o-l-s) flags. ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwMbxOutSize [out] Mailbox output byte size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwMbxInSize [out] Mailbox input byte size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwMbxOutSize2 [out] Bootstrap mailbox output byte size (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwMbxInSize2 [out] Bootstrap mailbox input byte size (from ENI file) ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bDcSupport [out] Slave supports DC (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wNumProcessVarsInp [out] Number of input process data variables (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wNumProcessVarsOutp [out] Number of output process data variables (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wPrevStationAddress [out] Station address of the previous slave (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wPrevPort [out] Connected port of the previous slave (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wIdentifyAdo [out] ADO used for identification command (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wIdentifyData [out] Identification value to be validated (from ENI file) ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byPortDescriptor [out] Port descriptor (ESC register 0x0007) (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wWkcStateDiagOffsIn[EC_CFG_SLAVE_PD_SECTIONS] [out] Offset of WkcState bit in diagnosis image (ENI: ProcessData/Recv[1..4]/BitStart): 0xFFFFFFFF = offset not available. WkcState bit values: 0 = Data valid, 1 = Data invalid. ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wWkcStateDiagOffsOut[EC_CFG_SLAVE_PD_SECTIONS] [out] Offset of WkcState bit in diagnosis image (ENI: ProcessData/Send[1..4]/BitStart): 0xFFFFFFFF = offset not available. WkcState bit values: 0 = Data valid, 1 = Data invalid. ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) awMasterSyncUnitIn[EC_CFG_SLAVE_PD_SECTIONS] [out] Sync Unit (ENI: ProcessData/TxPdo[1..4]@Su) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) awMasterSyncUnitOut[EC_CFG_SLAVE_PD_SECTIONS] [out] Sync Unit (ENI: ProcessData/RxPdo[1..4]@Su) ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bDisabled [out] Slave disabled by API SetSlaveDisabled / SetSlavesDisabled. ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bDisconnected [out] Slave disconnected by API SetSlaveDisconnected / SetSlavesDisconnected. ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bExtended [out] Slave generated by API ConfigExtend ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bDcReferenceClock [out] Slave is reference clock (from ENI file) ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bDcPotentialRefClock [out] Slave can be used as a reference clock (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwDcCycleTime0 [out] Cycle time of Sync0 event [ns] (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwDcCycleTime1 [out] Calculated value dwDcCycleTime1 [ns] = Cycle time of Sync1 event - Cycle time of Sync1 event + Shift time of Sync0 event (from ENI file) ### [EC_T_INT](api.html.md#_CPPv48EC_T_INT) nDcShiftTime [out] Shift time of Sync0 event [ns] (from ENI file) ### [EC_T_CHAR](api.html.md#_CPPv49EC_T_CHAR) szProductRevision[24] [out] Slave’s ProductRevision (ENI:Slave/Info/ProductRevision), e.g. “EK1100-0000-0018”. Empty string if not present in ENI. **Flags EC_MBX_PROTOCOL_** ### EC_MBX_PROTOCOL_AOE ### EC_MBX_PROTOCOL_EOE ### EC_MBX_PROTOCOL_COE ### EC_MBX_PROTOCOL_FOE ### EC_MBX_PROTOCOL_SOE ### EC_MBX_PROTOCOL_VOE ## emonGetCfgSlaveSmInfo ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetCfgSlaveSmInfo([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_CFG_SLAVE_SM_INFO](#_CPPv422EC_T_CFG_SLAVE_SM_INFO) \*pSlaveSmInfo) Return SyncManager information of a configured slave from the ENI file. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **pSlaveSmInfo** – [out] Information about the slave. * **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 ### struct EC_T_CFG_SLAVE_SM_ENTRY ### Public Members ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wPhysAddr [out] ESC (0x800 + y \* 8) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wLength [out] ESC (0x802 + y \* 8) ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byOpMode [out] Bits 0..1 ESC (0x804 + y \* 8) ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byDirection [out] Bits 2..3 ESC (0x804 + y \* 8) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdBitOffs [out] Process input data bit offset (from ENI file) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPdBitSize [out] Process input data bit size (from ENI file) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wWkcStateDiagBitOffs [out] Offset of WkcState bit in diagnosis image ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wMasterSyncUnit [out] Sync Unit (ENI: ProcessData/TxPdo[1..4]@Su) ### struct EC_T_CFG_SLAVE_SM_INFO ### Public Members ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId [out] Slave ID ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSmInfoNumOf [out] Number of available sync managers ### [EC_T_CFG_SLAVE_SM_ENTRY](#_CPPv423EC_T_CFG_SLAVE_SM_ENTRY) aoSmInfos[ECREG_SYNCMANAGER_MAX_NUMOF] [out] Sync managers info ### Example ```default /* get information about slave's sync managers configured in ENI file */ EC_T_CFG_SLAVE_SM_INFO oSlaveSmInfo; OsMemset(&oSlaveSmInfo, 0, sizeof(EC_T_CFG_SLAVE_SM_INFO)); dwRes = emonGetCfgSlaveSmInfo(dwInstanceId, EC_TRUE, 1001, &oSlaveSmInfo); ``` ## emonGetBusSlaveInfo ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) emonGetBusSlaveInfo([EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwInstanceID, [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bFixedAddressing, [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wSlaveAddress, [EC_T_BUS_SLAVE_INFO](#_CPPv419EC_T_BUS_SLAVE_INFO) \*pSlaveInfo) Return information about a slave connected to the EtherCAT bus. * **Parameters:** * **dwInstanceID** – [in] Instance ID (Multiple EtherCAT Network Support) * **bFixedAddressing** – [in] EC_TRUE: use station address, EC_FALSE: use AutoInc address * **wSlaveAddress** – [in] Slave address according bFixedAddressing * **pSlaveInfo** – [out] Information from the slave * **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 * [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 bFixedAddressing / wSlaveAddress can be found ### struct EC_T_BUS_SLAVE_INFO ### Public Members ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveId [out] The slave’s ID to bind bus slave and config slave information ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) adwPortSlaveIds[ESC_PORT_COUNT] [out] The slave’s ID of the slaves connected to ports. See [Port slave ID’s](#df-dfc-group-e-c-s-l-a-v-e-i-d-s). ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wPortState [out] Port link state. Format: wwww xxxx yyyy zzzz (each nibble : port 3210) wwww : Signal detected 1=yes, 0=no xxxx : Loop closed 1=yes, 0=no yyyy : Link established 1=yes, 0=no zzzz : Slave connected 1=yes, 0=no (zzzz = logical result of w,x,y) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wAutoIncAddress [out] The slave’s auto increment address ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bDcSupport [out] Slave supports DC (Bus Topology Scan) ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bDc64Support [out] Slave supports 64 Bit DC (Bus Topology Scan) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwVendorId [out] Vendor Identification stored in the EEPROM at offset 0x0008 ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwProductCode [out] Product Code stored in the EEPROM at offset 0x000A ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwRevisionNumber [out] Revision number stored in the EEPROM at offset 0x000C ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSerialNumber [out] Serial number stored in the EEPROM at offset 0x000E ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byESCType [out] Type of ESC (Value of slave ESC register 0x0000) ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byESCRevision [out] Revision number of ESC (Value of slave ESC register 0x0001) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wESCBuild [out] Build number of ESC (Value of slave ESC register 0x0002) ### [EC_T_BYTE](api.html.md#_CPPv49EC_T_BYTE) byPortDescriptor [out] Port descriptor (Value of slave ESC register 0x0007) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wFeaturesSupported [out] Features supported (Value of slave ESC register 0x0008) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wStationAddress [out] The slave’s station address (Value of slave ESC register 0x0010) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wAliasAddress [out] The slave’s alias address (Value of slave ESC register 0x0012) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wAlStatus [out] AL status (Value of slave ESC register 0x0130) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wAlStatusCode [out] AL status code. (Value of slave ESC register 0x0134 during last error acknowledge). This value is reset after a slave state change. ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSystemTimeDifference [out] System time difference. (Value of slave ESC register 0x092C) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wMbxSupportedProtocols [out] Supported Mailbox Protocols stored in the EEPROM at offset 0x001C ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wDlStatus [out] DL status (Value of slave ESC register 0x0110) ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wPrevPort [out] Connected port of the previous slave ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wIdentifyData [out] Last read identification value see [EC_T_CFG_SLAVE_INFO.wIdentifyAdo](#d5/dca/struct_e_c___t___c_f_g___s_l_a_v_e___i_n_f_o_1a5972bcd59947447718549523d67d828d) ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bLineCrossed [out] Line crossed was detected at this slave ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveDelay [out] Delay behind slave [ns]. ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwPropagDelay [out] Propagation delay [ns]. ESC register 0x0928. ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bIsRefClock [out] Slave is reference clock ### [EC_T_BOOL](api.html.md#_CPPv49EC_T_BOOL) bIsDeviceEmulation [out] Slave without Firmware. ESC register 0x0141, enabled by EEPROM offset 0x0000.8. ### [EC_T_WORD](api.html.md#_CPPv49EC_T_WORD) wLineCrossedFlags [out] Combination of [Line crossed flags](#db-d4d-group-e-c-l-i-n-e-c-r-o-s-s-e-d-f-l-a-g-s) ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwCyclicWkcErrorCnt [out] Counter for Cyclic WC Error ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwSlaveAbsentCnt [out] Counter for Absent/Not Present Slaves ### [EC_T_DWORD](api.html.md#_CPPv410EC_T_DWORD) dwUnexpectedStateCnt [out] Counter for Abnormal State Change **Port SubDevice ID’s** ### MASTER_SLAVE_ID ### SIMULATOR_SLAVE_ID ### MASTER_RED_SLAVE_ID ### EL9010_SLAVE_ID ### FRAMELOSS_SLAVE_ID ### JUNCTION_RED_FLAG **Flags EC_LINECROSSED_** ### EC_LINECROSSED_NOT_CONNECTED_PORTA ### EC_LINECROSSED_UNEXPECTED_INPUT_PORT ### EC_LINECROSSED_UNEXPECTED_JUNCTION_RED ### EC_LINECROSSED_UNRESOLVED_PORT_CONNECTION ### EC_LINECROSSED_HIDDEN_SLAVE_CONNECTED ### EC_LINECROSSED_PHYSIC_MISMATCH ### EC_LINECROSSED_INVALID_PORT_CONNECTION ### EC_LINECROSSED_UNEXPECTED_CABLE_RED