Commissioning of a MTI channel

1. Synchronous or asynchronous operation?

Commissioning of a MTI channel 1:
Setting in CoE x80n0:12 Asynchronous operation

2. Setting the multi-timestamping factor (MTSF)

To facilitate choosing an appropriate MTSF one should estimate the frequency at which level changes, i.e. events, are expected at the input. The multi-timestamping factor (MTSF) can then be selected. The factor indicates how many events per cycle are transferred from the buffer to the controller. With asynchronous transfer one should note that, due to the handshake, only half the number of events are retrieved per time period.

In order to avoid the transfer of excessive quantities of process data, the following configuration recommendations apply:

Synchronous transfer: MTSF ≥ (expected maximum number of input events per EtherCAT cycle) + 1
Asynchronous transfer MTSF ≥ 2x (expected maximum number of input-events per EtherCAT cycle) + 1  

Example: At a cycle time of 1 ms, a maximum of 4 events/ms per channel are expected. All 8 channels of the EL1258 are to be used.

- Synchronous transfer: MTSF 5
Select "Multi-Timestamping 8 Ch. 5x" via the predefined PDO. If a somewhat larger number of events then occur in a cycle, these are buffered in the channel buffer; the buffer can then be emptied by the controller in the subsequent cycles.

Commissioning of a MTI channel 2:
Process data selection (predefined PDO) for synchronous transfer

  - Asynchronous transfer: MTSF 9
Select "Multi-Timestamping 8 Ch. 10x" via the predefined PDO.

Commissioning of a MTI channel 3:
Process data selection (predefined PDO) for asynchronous transfer

For example, the process data of an input channel are represented as follows for MTSF = 1x, 5x and 10x:

Commissioning of a MTI channel 4:
Different MTSF

For each event there is a bit in the input array (right-justified) and a timestamp.
These process data are placeholders that accept events if there are any to be transmitted.

If fewer channels are required, predefined PDOs are also available for 4, 2 or 1 channel(s), with an MTSF of 1x, 2x, 5x and 10x respectively.

If fewer events arrive at the input than defined by the MTSF, the remaining PDOs are set to 0, in order to highlight this.

Example: NoOfInputEvents = 3 for MTSF=5 means that the first three PDO events (input value + timestamp) are supplied, the remaining two PDOs are set to 0.

3. When should the filter in CoE be activated? (default: deactivated)

The filter can be used to hide short signal jumps (spikes). They are regarded as invalid.

Procedure:
- The filter can be activated via the CoE 0x80n0:01 EnableDigitalFilter.

- If the filter activated is, the object 0x80n0:14 DigitalFilterCounter is used to set the timeframe over which the signal is regarded as valid. The timeframe should be specified as number of microcycles. “1” is synonymous with a deactivated filter.

  - Finally you must check whether the macrocycle time achieved in the terminal with the selected settings is shorter than the EtherCAT cycle time.

- In online mode the current microcycle time can be viewed in the CoE.

Commissioning of a MTI channel 5:
Setting in CoE x80n0:01 & x80n0:14 for digital filter

Finally you must check whether the macrocycle time achieved in the terminal with the selected settings is shorter than the EtherCAT cycle time. This should generally be 20% longer than the macrocycle. The current macrocycle time can be read in the CoE directory 0xF900:08 CycleTime.

4. How can I test the input channel?

If an input channel is to be tested, the events are hardly visible in the System Manager, since in synchronous mode (default) they are immediately retrieved, and the process data always look "zeroed".

Remedy:
- Set the channel to asynchronous mode, so that the events are retrieved in handshake mode.
or
- Track event timestamp no. 1 in the online display:

Commissioning of a MTI channel 6:
Timestamp via online display

5. Processing of events in the PLC

The channel supplies 32-bit timestamp. The following function block can be used for scaling up to the convenient 64-bit format:

Commissioning of a MTI channel 7: Download (example file)