Basic principles
Each MTI channel (multi-timestamp input) has inputs and outputs in the cyclic process image, which have to be linked with the PLC/task.
The representation in the System Manager depends on the number of configured channels and the respective multi-timestamp factor (MTSF).
MTI inputs provide information on the events:
- Status
- NoOfInputEvents: Number of events provided in this process data cycle with timestamp.
- InputState: Current state of input 0/1 when the process data are collected via EtherCAT. This corresponds to the classic Bool input and can be used in the same way
- InputBufferOverflow = TRUE: Indicates that more events arrived at the input than can be stored in the buffer. In CoE 0x80n0:13 there is an option to select whether further new events arriving at the nput are:
- no longer stored in the buffer (default), or
- stored in the buffer while older events are deleted - InputCycleCounter: The 2-bit counter is used for input process data monitoring. With each process data exchange of the terminal it is incremented by one and is reset to zero when its maximum value of three is exceeded.
- EventsInInputBuffer: Number of saved events remaining in the buffer after the events transmitted for the current cycle have been removed
- InputOrderFeedback: Reflects the InputOrderCounter. Indicates whether the InputOrderCounter was received and processed by the terminal.
- InputBit-Array: Bit-by-bit input states as array to the corresponding timestamps
Bit 0: Input value after timestamp 1
Bit 1: Input value after timestamp 2
etc.
- InputEventTime x: List of 32-bit timestamps of the respective signal edge
MTI outputs are used for monitoring:
- Ctrl
- InputBufferReset TRUE: The channel buffer is cleared. This can make sense, e.g. in the case of a reported InputBufferOverflow, if the application requires this. Via the CoE setting 0x80n0:13 BufferOverflowBehavior the behavior on buffer overflow can be specified.
- InputOrderCounter: This counter is only for the asynchronous operation. Only if the counter is incremented by the controller, the channel outputs a new set of events to the fieldbus.
Each CoE channel (from 0x8000) has settings for operating mode selection:
0x80n0:0 MTI Settings Ch. n=0...7 | Name | Entry | Description |
---|---|---|---|
0x80n0:01 | Enable digital filter |
| Activation of the filter for hiding spikes. The filter length can be entered in 0x80n0:14 DigitalFilterCount. |
0x80n0:01 FALSE |
| Filter is deactivated | |
0x80n0:01 TRUE |
| Activation of the input filter | |
0x80n0:11 | Buffer reset behavior |
| Reset behavior in the event of a reset signal in the status register (PDO) |
0x80n0:11 FALSE | reset on rising edge | Reset is executed on rising edge. New data can then be buffered right away. | |
0x80n0:11 TRUE | reset on high level | Buffer is held in reset as long as the signal is active. Can be used for muting, for example. | |
0x80n0:12 | Buffer mode |
| Setting of asynchronous or synchronous operation |
0x80n0:12 FALSE | Asynchronous (Buffered) | Asynchronous operation. To load the buffer entries into the PDO, the PLC has to increment the InputOrderCounter. This handshake requires one cycle for processing. The data are retained in the event of telegram malfunctions. | |
0x80n0:12 TRUE | Synchronous | Synchronous operation. The first buffer entries are transferred cyclically to the PDO, as soon as data are available. | |
0x80n0:13 | Buffer overflow behavior |
| Configuration of the behavior if more than 32 events per channel have to be stored |
0x80n0:13 FALSE | Lock buffer | Overwriting of data is blocked, new events will be lost. | |
0x80n0:13 TRUE | Overwrite oldest event | The oldest data are overwritten, new events are retained. | |
0x80n0:14 | Digital filter count |
| Number of microcycles until an applied input level as evaluated as valid. In this way spikes are filtered out. |
Time consistency of the input data The status of the inputs is monitored with a high-priority task and edge changes are sorted into the buffer if necessary (microcycle). With each process data cycle the data is copied from the internal buffer into the process data and then sent via EtherCAT. If another microcycle is executed between copying and sending, the current InputState is still entered in the process image. However, the data from the buffer are no longer updated. In this way the InputState is always to be kept as current as possible. |