EtherCAT SubDevice
 
Loading...
Searching...
No Matches

◆ EC_API_SLV_getState()

uint32_t EC_API_SLV_getState ( EC_API_SLV_SHandle_t pHandle,
EC_API_SLV_EEsmState_t pState,
uint16_t *  pAlErrorCode 
)

This is the function to read the EtherCAT Slave state machine.

Reads the EtherCAT Slave state machine

Parameters
[in]pHandleThe pointer to the EtherCAT API instance.
[out]pStateEtherCAT ESM state.
[out]pAlErrorCodeApplication Layer error code.
Returns
ErrorCode API Error Code
Example
#include <ecSlvApi.h>
uint32_t state = EC_API_SLV_getState(pHandle, &state, &err);
uint32_t EC_API_SLV_getState(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_EEsmState_t *pState, uint16_t *pAlErrorCode)
This is the function to read the EtherCAT Slave state machine.
Definition ecSlvApi.c:1674
Examples
ESL_cia402Demo.c, EtherCAT_SubDevice_CiA402.c, EtherCAT_SubDevice_Simple.c, and EtherCAT_SubDevice_Webserver.c.