This function block provides an EtherCAT diagnostic functionality for a PLC project. The fb checks the EtherCAT-Master, the EtherCAT-Kernle and for all EtherCAT-Slave. The internal mapping for the EtherCAT-slaves is done by the Node-ID. The fb checks during his initialization the EtherCAT-Master Firmware and the used EtherCAT-kernel version. The dataset-ID of the actual EtherCAT configuration can be checked optional during the initialization.
The clear text error messages are deposited in english language.
For the function block it's necessary to connect him with the interface to the EtherCAT-Master, EtherCAT-Slave and the EtherCAT-Kernel. This must be done by global defined input and output parameters which are connected to the fb.
The block is compatible up to EtherCAT master firmware 1427.0127.
Limitations:
- The EtherCAT diagnosis option is available from EtherCAT master firmware 1427.0114 and EtherCAT kernel version > 100
- The current number of slaves is internally limited to 256!
Recommended task: | Cyclic/Default |
Libraries used: | BM_TYPES_40bd04 or higher TECH_TYPES_40bd08 or higher |
Marking: | Data type: | Description: |
---|---|---|
_EctMasterKernel | ECM_KERNEL_DIAGNOSTIC | DP-RAM struct for EtherCAT-Kernel, for structure and hardware addressing, see the detailed description of the inputs |
_EctMaster | ECM_MASTER_STATUS | DP-RAM struct for EtherCAT-Master, for structure and hardware addressing, see the detailed description of the inputs |
_EctSlave | ECM_SLAVE_STATES | DP-RAM struct for EtherCAT-Slave, for structure and hardware addressing, see the detailed description of the inputs |
_EctMasterActState | ECT_DIAGNOSIS_ECM_STATE | actual state EtherCAT-Master |
a_EctSlaveActState | ARRAY_ECT_DIAGNOSIS_ECS_STATE | actual state of every EtherCAT-Slave, mapping is done by the Node-ID |
Marking: | Data type: | Description: |
---|---|---|
x_Enable | BOOL | TRUE: Enable FB |
x_Check_DatasetID | BOOL | TRUE: Check dataset-ID of EtherCAT configuration during initialization of fb |
t_ErrorInfo_Toggle | TIME | toggle time for error messages, default setting 1s, if input = 0s, maximum allowed value 10s |
a_DatasetID | DWORD_4_BMARRAY | required Dataset-ID of EtherCAT configuration, it can be set when parameterizing with the Engineering Framework ProMaster |
Marking: | Data type: | Description: |
---|---|---|
x_EctIsOK | BOOL | TRUE: collective message that fieldbus is ok |
u_EctSlavesConfigured | UINT | number of configured slaves in the EtherCAT-configuration |
u_EctSlavesFound | UINT | number of founded Slaves at the fieldbus |
u_EctSlavesInOperational | UINT | actual number of EtherCAT-slaves which are in Operational |
w_EctMasterKernelVersion | WORD | Version of the used EtherCAT-Kernel |
s_EctKernelErrorInfo | STRING | Clear text error messages EtherCAT-Kernel |
s_EctMasterErrorInfo | STRING | Clear text error messages EtherCAT-Master |
a_EctDatasetIdFound | DWORD_4_BMARRAY | Unique identifier (Dataset-ID) of the currently used EtherCAT configuration of the master, it can be set when parameterizing with the Engineering Framework ProMaster |
x_Active | BOOL | TRUE: EtherCAT diagnosis is active |
x_Error | BOOL | TRUE: fb has an error |
w_ErrorID | WORD | detailled error message of the fb, the meaning of the error can be read in the detailed description |