6 state machine interface, 1 l_etc_getmasterstate (fb), State machine interface – Lenze EtherCAT Controller-based Automation User Manual
Page 151: L_etc_getmasterstate (fb), State machine interface ( 151), L_etc_getmasterstate (fb) ( 151), 9function library l_iodrvethercat.lib
Lenze · Controller-based Automation · EtherCAT® Communication Manual · DMS 6.4 EN · 04/2014 · TD17
151
9
Function library L_IODrvEtherCAT.lib
9.6
State Machine Interface
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
9.6
State Machine Interface
The "State Machine Interface" provides function blocks for setting and maintaining the state of
master and slave.
9.6.1
L_ETC_GetMasterState (FB)
This function block detects the current state of the EtherCAT master.
Visualisation: VISU_L_ETC_GetMasterState
Inputs (VAR_INPUT)
Outputs (VAR_OUTPUT)
L_ETC_GetMasterState
BOOL xExecute
xDone BOOL
UDINT udiTimeOut
xBusy BOOL
xError BOOL
eErrorCode L_ETC_ERRORCODE
wState WORD
Identifier/data type
Meaning/possible settings
xExecute
BOOL
A positive edge (TRUE) detects the current EtherCAT master state.
udiTimeout
UDINT
Timeout in milliseconds (ms)
• The value 0 is not permissible and causes the error ETC_E_INVALIDPARM
(0x9811000B).
Identifier/data type
Meaning/possible settings
xDone
BOOL
• TRUE: An action has been executed successfully.
• FALSE: No action active / action is still being executed.
xBusy
BOOL
• TRUE: An action is currently being executed.
• FALSE: No action active
xError
BOOL
• TRUE: An error has occurred.
• FALSE: No error
eErrorCode
L_ETC_ERRORCODE
Error code of the incorrectly executed action (xError = TRUE).
General error codes (L_ETC_ERRORCODE) ( 183)
wState
WORD