Principles of the oversampling function
The EL5031-0011 EtherCAT Terminal is an interface for the direct connection of an EnDat 2.2 encoder. Thanks to the oversampling property, the terminal can read out the current position of the encoder several times per bus cycle.
Oversampling
A conventional encoder interface terminal records a position value ("position") with each bus cycle and passes it on to the higher-level controller in the next fieldbus cycle. The EL5031-0011 records the current position value several times between two fieldbus communication cycles in a configurable and time-equidistant manner.
The transfer of a package of n position values of 64 bits each (32 bits each in compact mode) to the higher-level controller takes place in the next fieldbus communication cycle. This procedure is referred to as oversampling.
Distributed Clocks (DC)
Oversampling requires a clock generator in the terminal that triggers the individual data sampling events. The local clock in the terminal, called Distributed Clock (DC), is used for this purpose (see Chapter Distributed Clock). In the EL5031-0011, the distributed clock is realized with a scope of 64 bits (sufficient for the next 584 years)
SYNC0 interrupt
Depending on the cycle time, an interrupt is triggered by the local clock in the terminal. This interrupt is called SYNC0. For each SYNC0 signal, the position value is recorded according to the set oversampling factor n. The values are stored one after the other in a buffer. By generating the SYNC0 pulse from the local synchronized clock in the distributed clock network, it is ensured that the position value is recorded at highly constant intervals.
All local clocks in the supporting EtherCAT slaves are synchronized. This enables EtherCAT slaves (here: terminals) to record measured values simultaneously, independent of the distance between them. The EtherCAT master, e.g. Beckhoff TwinCAT, configures the EL5031-0011 Terminals such that their SYNC0 pulses occur at the same time. This simultaneity is within the distributed clock precision range of < 100 ns.
Timestamp of the process data
With the "StartTimeNextLatch" process date, the EL5031-0011 provides a 64-bit timestamp for each process data block. This is already enabled in the "Process data" tab via the PDO assignment of 0x1A01 "FB Inputs NextSyncTime" in the factory setting (see chapter "Process data and configuration"). The data block consisting of sample value + timestamp, which is transferred in each cycle, is not related.
The temporal relationship is shown in the following example.
Example: Two EL5031-0011 Terminals with the same oversampling factor (n = 50)
The EtherCAT master, e.g. Beckhoff TwinCAT, configures both EL5031-0011 terminals such that their SYNC0 pulses occur at the same time.
Assumption: the EtherCAT bus cycle time TSYNC0 = 2 ms. This means that SYNC0 is triggered every 2 ms in all EL5031-0011.
- Both terminals work with a matching oversampling factor (e.g. n = 50),
- the SYNC0 pulse occurs at the same time in both EL5031-0011,
The sampling time here is therefore TSYNC0 / 50 = 40 μs. - The SYNC0 signal in the terminal fills the internal buffer with 50 position values.
- SYNC0 runs synchronously with the cycle time and triggers the provision of the filled buffer as process data. At the same time, the "StartTimeNextLatch" is retrieved from the local distributed clocks.
- The data array is compiled together with the SYNC0 time (Next SYNC0 time).
- The next EtherCAT cycle fetches this data.

![]() | Maximum sampling frequency, minimum cycle time Minimum sampling time (TSYNC0 / n), maximum sampling frequency (FSYNC0 * n) Minimum cycle time (TSYNC0) |