IF NOT fb_coe_write.bBusy THEN
index := index + 1;
IF index <= (NumOfFilterCoeff) THEN
fb_coe_write(bExecute := FALSE);// Prepare the next CoE access
wState := 1;// Write next value
ELSE
wState := 255;// Done
END_IF
END_IF
END_IF
100:
; // Error handling
255:
; // Go on..
END_CASE
4.3.5
Sample program 6 (interlacing of measured values)
Program description / function
Note on this chapter: The use of EL3751/ELM3xxx terminals also applies accordingly to EPP35xx.
In some use cases a particularly fine temporal resolution of the signal is desired, e.g. so that many
measuring points are available for an FFT. Two ways to do this are shown below:
• Use of an analog input terminal with the correspondingly high sampling rate, e.g. 20 ksps.
• Use of two analog input terminals with half the sampling rate, i.e. 10 ksps, and so-called interlacing of
measured values; the result is likewise a 20 ksps sampling of the signal.
The second way is described in this sample: Use of two EL3751 EtherCAT Terminals, each with a maximum
sampling rate of 10 kSps (and thus a conversion time of 100 µs in this case, cf. Continuative documentation
for I/O components with analog in and outputs [} 245], chapter "Temporal aspects of analog/digital or
digital/analog conversion"). Due to their parallel connection, both terminals are fed the same signal
simultaneously and are configured by Distributed Clocks in such a way that they sample not at the same
time, but offset by half the conversion time (in this case: 50 µs). If the two measured data streams are now
combined alternately in the controller, i.e. "interlaced", the result is a net measured data stream of 20 ksps.
Fig. 26: Process of interlacing the input data
The following configuration is used for this purpose:
EPP3504-0023
Version: 1.2
Commissioning
97