3 properties of function blocks, 4 the ec_t_state structure, Properties of function blocks – Lenze EtherCAT control technology User Manual
Page 98: The ec_t_state structure, Control technology | ethercat communication manual

Control technology | EtherCAT communication manual
EtherCAT function libraries
Properties of function blocks
98
L
DMS 3.1 EN 01/2011 TD17
9.3
Properties of function blocks
The function blocks are equipped with inputs and outputs for the activation of the POU,
the display of the current POU status, and for the output of error messages:
9.4
The EC_T_STATE structure
The ECAT_STATE structure describes all possible states of the EtherCAT bus system:
Input/output
Data type
Action
bExecute / bEnable
BOOL
bExecute and bEnable are edge-controlled:
In the case of a positive edge, the function block is executed.
bBusy
BOOL
As long as a function block is executed, bBusy is TRUE and bDone is FALSE.
bDone
BOOL
If a function block has been executed, bDone is set to TRUE and bBusy is set
to FALSE.
If bExecute/bEnable has been reset, bDone is only active during the function
block call. If bExecute/bEnable is TRUE, then bDone remains TRUE as long as
bExecute/bEnable is reset.
bError
BOOL
If an error has occurred, bError is set to TRUE.
dwErrorCode
DWORD
If an error has occurred (output bError = TRUE), a hexadecimal error code (see
) is displayed at the output dwErrorCode.
The error code is only available during the function block call (if
bDone = TRUE).
Note!
The identifiers itemised here cannot be found in IEC 61131. For all state inputs
and outputs, always the numerical values are indicated.
Status
Identifier
Value (DINT)
Unknown
eEcatState_UNKNOWN
0
Initialization
eEcatState_INIT
1
Pre-Operational
eEcatState_PREOP
2
Bootstrap Mode
(Is currently not supported.)
eEcatState_BOOT
3
Safe-Operational
eEcatState_SAFEOP
4
Operational
eEcatState_OP
8