1 definition in the sm_ethercat.lib library, 2 the data type ecat_state, 3 variables – Lenze EtherCAT control technology User Manual
Page 119: Control technology | ethercat communication manual

DMS 3.1 EN 01/2011 TD17
L
119
Control technology | EtherCAT communication manual
EtherCAT function libraries
Function blocks and functions for diagnosing the network
9.7.8.1
Definition in the SM_EtherCAT.lib library
9.7.8.2
The data type ECAT_STATE
The data type ECAT_STATE describes all possible states of the EtherCAT bus system:
9.7.8.3
Variables
The variables of the EtherCAT master structure ECAT_MASTER provide additional
information besides the state of the EtherCAT bus system:
Note!
Only one EtherCAT master instance can be executed on an IPC. (The global
variable g_ecatMaster[1] contains the master state for the ECAT1 interface.)
g_EcatMaster: ARRAY[1.._ETC_NUMBER_OF_MASTERS] OF ECAT_MASTER;
Status
Identifier
Unknown
SMC_ECATSTATE_UNKNOWN
Initialization
SMC_ECATSTATE_INIT
Pre-Operational
SMC_ECATSTATE_PREOP
Bootstrap Mode (Is currently not supported.)
SMC_ECATSTATE_BOOT
Safe-Operational
SMC_ECATSTATE_SAFEOP
Operational
SMC_ECATSTATE_OP
Identifier/data type
Meaning/possible settings
eCATState
ECAT_STATE
Current state of the EtherCAT bus system as an ECAT_STATE value (see chapter "
"
)
stState
STRING
Current state of the EtherCAT bus system as a character string
• Contains the types of ECAT_STATE as a character string.
(E.g. "SMC_ECATSTATE_INIT")
diFrameRCounter
DINT
Number of response frames received by the master
diCycWKCFrameRCounter
DINT
Number of frames with WKC error
diNo_of_Slaves
DINT
Number of slaves participating in the communication via the EtherCAT bus
bEmergencyOccured
BOOL
FALSE: No emergency message has occurred.
TRUE: At least one emergency message has occurred.
diEmergencyNo
DINT
Number of emergency messages
aEcatSlaveEmergency
ARRAY
Numbers of the emergency messages