Technology
Table of contents |
---|
• Procedure for sampling digital inputs |
The EL1258, EL1259 and EL2258 EtherCAT terminals make up a family of terminals whose members feature a similar range of functions. These are digital input and output terminals that read in or output 24 V signals. The EL1258 can read in eight channels, while the EL2258 can output eight channels. The EL1259 is the mixed version with 8 input and 8 output channels on an overall width of 12 mm. A characteristic feature of these terminals is the multi-timestamp capability, as an extension to the conventional timestamp function.
It is often of great interest when inputs are read in or outputs are switched in a running application. Three general procedures for considering inputs and outputs are described below:
Procedure for sampling digital inputs
- Standard sampling
Standard sampling is used for “normal” digital input/output terminals. For the input this means that a 24 V signal (TRUE) or 0 V signal (FALSE) is applied by a sensor (e.g. light barrier). This channel information is queried in the next EtherCAT cycle and transferred to the controller.
In addition it means that this signal was applied to the input within the last cycle time and is still present at the time of sampling. However, no statement can be made as to the precise point in time when this edge arrived at the input, or whether short pulses were already present before that. - In Fig. Query of input channel information, standard pulses A and B are not picked up, only pulse C lasts long enough to be present during sampling (blue), so that the "1" is picked up by the bus cycle. This mode of operation is also called frame-triggered.
The time frame for the sampling is thus the task/EtherCAT cycle time employed of e.g. 10 ms or 1 ms. To sample processes in the machine at finer intervals, the cycle time usually has to be reduced to the required or smallest possible value, e.g. 100 µs. However, this entails limitations with regard to the then maximum available computing time and possibly also the EtherCAT data volume within this cycle time.
Two technologies are available to remedy this situation: Oversampling and timestamp.
In principle, the EtherCAT Terminals EL1258, EL1259 and EL2258 can be used for standard sampling. - Oversampling
Within the specified (configurable) cycle time the input terminals read the input status n times and store the states in an array, which is transferred to the controller based on the bus cycle. The correspondingly finer time frame, the microcycle, thus enables a slow bus cycle time with nevertheless extremely fine sampling.
For example, the input terminal EL1262 is capable of 1000-fold oversampling at a 1 µs microcycle. - In Fig. Query of input channel information, oversampling pulses A and B are also picked up, compared with standard sampling. Over the known microcycle time each individual pulse can be determined from the resulting data stream. However, a constantly high volume of data is transferred with each EtherCAT cycle, even if there are no edge changes at all at the input.
- Timestamp
In this mode the input terminal operates only event-based. The edge changes are registered at the input channel. Internally two pieces of information are stored for each event, i.e. the input state 0/1 after the edge change and the exact time of edge change, the timestamp. The time is derived from the synchronized EtherCAT distributed clocks system, which synchronizes all capable EtherCAT devices in the network to a time accuracy of << 1 µs without special configuration (for further information see Basic EtherCAT documentation). - In Fig. Query of input channel information, with timestamp the rising and the falling edge of pulse A is picked up as event with timestamp and transferred to the controller during the EtherCAT cycle. The time resolution is 1 ns here – an ‘infinitely’ fine time resolution in mechanical terms. The EL1252 can “only” store one falling and one rising edge per cycle – if several edge changes occur, e.g. a rising edge of pulse C, the first or last event is stored, depending on the configuration (see EL1252 documentation).
In summary, the oversampling and timestamp procedures provide a significantly finer image of the machine sequence than standard sampling of the digital input.
Procedure for sampling digital outputs
The principles described above can be transferred to digital outputs accordingly.
- Standard sampling
A frame-triggered standard output can only switch with the time of each EtherCAT cycle if it receives a new target output state: - In Fig. Output of output channel information, standard the number of switching events is limited to the cycle time and cannot be changed at the actual switching time. For high-speed or high-precision machines this has a significant effect on the maximum possible production speed and manufacturing tolerances. The oversampling and timestamp technologies help here as well.
- Oversampling
The controller calculates the array of digital 0/1 output data in advance and sends it to the output channel. This successively clocks out the target output states in the fixed microcycle. - This procedure enables a significantly finer time resolution to be achieved for the actuator control, even below the actual cycle time.
The digital output terminal EL2262 can achieve a time resolution of 1 µs with 1000-fold oversampling. - Timestamp
With the timestamp principle the controller calculates an exact time at which the output is to switch to a new state 0/1. After this switching order has been transferred, the terminal waits until this time is reached and then switches automatically, independent of the bus cycle. Here too the distributed clocks function is decisive. It synchronizes the local clock that runs in the output terminal. - At (A) the controller transfers a switching order consisting of output state and switching time to the output channel; the order is executed at (B) independently of the cycle. The controller can then send a new switching order (C). The ‘infinitely’ fine time resolution of 1 ns applies here as well.
In general the digital output terminal EL2252 with oversampling requires two cycles for activating a switching order.
Multi-timestamp
The multi-timestamp capability opens up new application options for digital inputs and outputs:
Inputs EL1258, EL1259
- 8 multi-timestamp channels on an overall width of 12 mm
- All channels operate completely independently of one another
- Each channel is capable of sampling not only one, but up to 32 signal edges (“events”) per cycle
- Each channel has its own buffer. Events are held in the buffer, if more signal edge changes arrive at the input during a cycle than are retrieved via the process data. The buffer can be sent continuously to the controller via the cyclic process data. A handshake mode is also possible – thus no signals to the controller are lost in the event of communication errors.
- The process data size can be configured individually for each channel, i.e. how many timestamped events per cycle are to be retrieved from the channel by the PLC
- These functions require a process image that differs from the previous EL1252. For reasons of compatibility with the existing user software the terminal can be switched to a compatible process image (without the new functions).
- Sampling of the input state 0/1 takes place based on a microcycle of several µs, depending on the selected setting, i.e. significantly faster than the EtherCAT bus cycle time
- The timestamp allocated to a signal edge detected in this way is the start time of the microcycle in which it was picked up.
- An adjustable digital filter can be activated for each channel which blanks signals that are too short (spikes).
- In this way significantly more signal changes can be sampled with timestamp during each cycle, and no event information is lost in the buffer.
Outputs EL1259, EL2258
- 8 multi-timestamp channels on an overall width of 12 mm
- All channels operate completely independently of one another
- Each channel has a buffer and can therefore store not just one switching order, but up to 32 events. Thus several precisely timed switching events can also be specified within a cycle.
- In order to transfer switching orders to the channel as quickly as possible, the multi-timestamp function operates with AutoActivation: new switching orders are taken over in each cycle without special activation; however, an optional handshake procedure is also possible here.
- The process data size – i.e. the number of time-stamped switching orders that can be sent by the controller to the channel per cycle – is configurable for each channel.
- These functions require a process image that differs from the previous EL2252. For reasons of compatibility with existing user software the terminal can be switched to a compatible process image (without the new functions).
- The query whether an executable switching order is present in the buffer takes place based on a microcycle of several µs, depending on the selected setting, and is therefore significantly faster than the EtherCAT bus cycle time. Thus several timestamp switching orders are also possible per bus cycle.
- In order to test the actuator connected to the output channel, the output can also be switched manually via the CoE, i.e. without timestamps.
- Thus virtually any desired number of switching orders can now be output per channel within the framework of the microcycle, both ‘immediately’ for the following cycle (A) and also through the buffer for later cycles (B).