Distributed Clocks Diagnosis
Target/actual comparison of arrival times
This dialog lists the results of a target/actual comparison. It indicates the quality of the EtherCAT DC deviation. Within EtherCAT frames, data is sent at a certain time and then expected at a certain time. Deviations that correlate with an expected arrival time of the data and an actual arrival time of the data are displayed here. The smaller these deviations are, the better the quality of the DC communication.
DC quality in Run mode
In Run mode TwinCAT offers the opportunity to derive preliminary information about the actual DC quality. When a task is called, it calculates the expected time of its next call based on the current time and its own cycle time. It compares this expected time of its next call with the actual time at which this task is called for the next cycle. This dialog shows the DC quality in Run mode.
EtherCAT DC deviation
- A cyclic EtherCAT frame is synchronized by a Sync Unit.
- In Config mode, a cyclic EtherCAT frame can be synchronized by an unreferenced default Sync Unit.
- A Sync variable is required in Run mode.
- A Sync variable assigns a synchronizing task to a Sync Unit.
- A synchronizing task is also referred to as a Sync Task.
- In Run mode, a Sync Unit synchronized with a Sync Task causes the master device to send data in a cyclic EtherCAT frame at a certain time.
- The time period that data in a given EtherCAT frame take to pass through a configured EtherCAT ring can be precalculated fairly accurately.
- Data in a transferred EtherCAT frame is expected back by the master device at a certain time at which it should have passed through the EtherCAT ring.
- There is usually a small difference between the actual measured runtime of a given EtherCAT frame in a configured EtherCAT ring and the corresponding actual arrival time of the EtherCAT frame at the master device, and between the precalculated expected arrival time of the EtherCAT frame at the master device.
- This deviation is determined by the master device, which measures the runtime with its inherent master clock.
- Each EtherCAT network with one or several DC slave devices has a reference clock.
- This reference clock in the EtherCAT network is different from the master clock in the master device.
- Drift between the reference clock and a local clock of a DC device is compensated on a regular basis. For this purpose, runtime differences to DC subscribers are measured, and local clocks are reset. When determining the drift, the runtime differences caused by delays on the configured lines are taken into account.
- Any drift between the master clock in the master device and the reference clock in the EtherCAT network is compensated on a regular basis. The master clock is regularly synchronized with the reference clock.
- This synchronization depends on the current delay of the EtherCAT signal between the master clock in the master device and the reference clock in the EtherCAT ring. The synchronization takes into account the runtime differences caused by delays of the EtherCAT signal on the configured lines.
- This synchronization shifts the master time in the master device relative to the reference time in the EtherCAT ring.
- A synchronizing task is called by the master device.
- A shift of the master time in the master device results in a shift of the call of a synchronizing task.
- The asymmetry of positive and negative deviations between the actual time of the next synchronizing task call and the expected time of the next synchronizing task call reflects the drift between the master clock in the master device and the reference clock in the EtherCAT ring.
Distributed Clocks Diagnosis
Deviation (µs)
The "Deviation (µs)" column shows steps of deviations between the actual time of the next task call and the expected time of the next task call. In the first table row, cycles are counted in which this deviation amounts to less than one microsecond. In the second table row, cycles are counted in which the deviation lies in the interval [1µs, 2µs[. In the third line of the table, the deviation is in the interval [2µs, 5µs[, and so on.
Count(neg)
The "Count(neg)" column counts negative deviations between the actual time of the next task call and the expected time of the next task call.
Percent(neg)
The "Percent(neg)" column contains the value from "Count(neg)" column as a percentage of the total number of counted cycles.
Percent(pos)
The "Percent(pos)" column contains the value from "Count(pos)" column as a percentage of the total number of counted cycles.
Count(pos)
The "Count(pos)" column counts positive deviations between the actual time of the next task call and the expected time of the next task call.
Asymmetry
An asymmetry of positive and negative deviations between the actual time of the next synchronizing task call and the expected time of the next synchronizing task call is required. It maps the drift ratio between the master clock in the master device and the reference clock in the EtherCAT ring. At a ratio of 0:100 or 100:0 the distributed clock system is out of service.
Distribution of the deviation
The counter values should mainly be in low deviation steps. If only values ">=500µs" occur, the distributed clock system is out of service.