ECATWCStatus
Description
This function returns the current number of working counter errors for the Sync unit. The working counter errors are cleared to zero when the EtherCAT***EtherCAT is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs network is taken from Init to OP state.
- Value 0 means no working counter errors.
- When the value is non zero, the master will automatically reduce the count by 1 for every thousand good frames received.
- When the working counter error exceeds the Working Counter Error Limit, the EtherCAT network will be stopped.
Figure 7-198: ECATWCStatus function
Arguments
Input
SyncUnit | Description | Sync Unit Index (for future compatibility with multiple frames) |
Data type | INT | |
Range | 0 | |
Unit | N/A | |
Default | - |
Output
Count | Description | Working Counter error |
Data type | UDINT | |
Unit | N/A |
Related Functions
ECATDeviceStatus, ECATMasterStatus
Example
-
- See Checking for Working Counter Errors: in the EtherCAT Communication Diagnosis Steps section of the Troubleshooting chapter for an example of implementing this function.
Structured Text
(********************************************************)
(* read Ethercat Working counter value *)
(********************************************************)
wcErrorCounter := ECATWCStatus( 0 );
FBD
FFLD