4 l_etc_readerrcnt (fb), L_etc_readerrcnt (fb), L_etc_readerrcnt (fb) ( 145) – Lenze EtherCAT Controller-based Automation User Manual
Page 145: 9function library l_iodrvethercat.lib
Lenze · Controller-based Automation · EtherCAT® Communication Manual · DMS 6.4 EN · 04/2014 · TD17
145
9
Function library L_IODrvEtherCAT.lib
9.4
Diagnostic Interface
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
9.4.4
L_ETC_ReadErrCnt (FB)
This function block reads the frame error counters of the connected slaves.
On the basis of the values in the RedErrCnt array, the wiring quality (EMC sensitivity) of the EtherCAT
bus can be evaluated.
Visualisation: VISU_L_ETC_ReadErrCnt
Inputs (VAR_INPUT)
Outputs (VAR_OUTPUT)
Note!
• We recommend executing the L_ETC_ReadErrCnt function block cyclically in greater
distances (e.g. every 10 minutes) in order to evaluate the bus state.
• For executing the function block, the EtherCAT master and the slave must be at least
in the "Pre-Operational" state.
L_ETC_ReadErrCnt
BOOL xExecute
xDone BOOL
UINT uiDevice
xBusy BOOL
xError BOOL
eErrorCode L_ETC_ERRORCODE
RedErrCnt L_ETC_SLAVE_PORTS
GreenErrCnt L_ETC_SLAVE_PORTS
Identifier/data type
Meaning/possible settings
xExecute
BOOL
A positive edge (TRUE) reads the error counter of the slave given by uiDevice.
uiDevice
UINT
The EtherCAT address of the slave
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)
RedErrCnt
L_ETC_SLAVE_PORTS
Error counter for errors detected in the slave for the first time
Error counters of the EtherCAT slaves ( 172)
GreenErrCnt
L_ETC_SLAVE_PORTS
Error counter for forwarded errors, i.e. errors that have been detected in a previous
slave