EtherCAT Slave
 
Loading...
Searching...
No Matches

◆ EC_API_SLV_CiA402_registerStateMachine()

void EC_API_SLV_CiA402_registerStateMachine ( EC_API_SLV_SHandle_t *  pEcSlaveApi_p,
void *  pContext_p,
EC_API_SLV_CiA402_CBUsrApplSM_t  cbFunc_p 
)

Register the CiA402 state machine.

The state sachine is required for controlling the power drive system. This state machine (FSA SM) is different to the EtherCAT communication State machine (ESM). It handles different state, sortetd by the low level power states, the high level power states and the torque enabled states.

Parameters
[in]pEcSlaveApi_pEtherCAT DTK instance.
[in]pContext_pcallback context
[in]cbFunc_pCiA402 State Machine function.
Remarks
The DTK has a default CiA402 state machine. This DTK state machine is only used if no function is registered.
Example
#include <ecSlvApi.h>
* // required variables
// the Call
bool(* EC_API_SLV_CiA402_CBUsrApplSM_t)(void *pAppRunCtxt_p)
User defined function. Called as "application Cia402 StateMachine" in MainLoop.
Definition ecSlvApi.h:827
void EC_API_SLV_CiA402_registerStateMachine(EC_API_SLV_SHandle_t *pEcSlaveApi_p, void *pContext_p, EC_API_SLV_CiA402_CBUsrApplSM_t cbFunc_p)
Register the CiA402 state machine.
Definition ecSlvApi_CiA402Stub.c:189
struct EC_API_SLV_Handle EC_API_SLV_SHandle_t
EC_API_SLV_SHandle_t describes the EtherCAT Slave API.
Definition ecSlvApi.h:136
See also
EC_API_SLV_CiA402_registerApplication