Vai al contenuto

Diagnostic Structures Reference

This chapter describes the diagnostic structures offered by EtherCAT stack and published in the EtherCAT.pll:
  • A variable called sysEcatMasterStatus, type ECATMASTERSTATUS, allowing you to have a general view of the status of the EtherCAT network
  • A variable called sysEcatSlaveMonitor, type ECATSLAVEMONITOR, which can be placed in Watch on GF_ProjectVX Code to monitor the particular status of any slave
  • A set of variables associated with events that can be used by the PLC to react to changes in the status and errors of the EtherCAT network:
sysECATEventId, type ECATEVENTID, containing the ID of the last encoun- tered eventsysECATEmcyEvent, type ECATEMCYEVENT: this structure contains in- formation about the last Emergency event sent by a CoE slavesysECATErrorEvent, type ECATERROREVENT: this structure gives infor- mation about the last error event detected on the EtherCATsysECATNetworkRecoveryEvent, of type ECATNETWORKRECOVERY: this structure refers to the last event of NetworkRecoverysysECATNodeStatusChangedEvent, of type ECATNODESTATUSEVENT: this structure gives information about the last change of status of a slavesysECATDCStatusChangedEvent, of type ECATDCSTATUSEVENT: this structure gives information about the last variation of the master state, related to its synchronization with the Distributed Clockas shown in the overview, these variables can be consulted within the special tasks ECAT_Notify and ECAT_Resync, they can also be watched in GF_ProjectVX Code for more detailed information about events occured.
  • A set of functions to access the slave diagnostic structures, containing the same informa- tion as the SlaveMonitor; they can refer to the physical address of the node (ByAddress version), or to the location index of the node in the network, starting from index 0 (ByIndex version):
sysECAT_GetSlaveDiag [ByAddress | ByIndex]: Returns a pointer to the diagnostic structure (@ECATSLAVESTATUS), or NULL if the function failssysECAT_GetSlaveCfg [ByAddress | ByIndex]: Returns a boolean value whether the required slave has been configured or notsysECAT_GetSlavePres [ByAddress | ByIndex]: Returns a boolean value in- dicating the presence, if the slave is physically connectedsysECAT_GetSlaveState [ByAddress | ByIndex]: Returns the slave network status (ECATSTATE)
  • Two function blocks for read and write SDO; they can be used to read or write objects to perform checks from PLC, or to do auxiliary configurations after the network has entered the operating mode:
sysECAT_Sdo_ReadsysECAT_Sdo_WriteFor further details and descriptions of all the fields, please see the ”Properties” window inside GF_ProjectVX Code of each object of the EtherCAT.pll library.