![background image](http://html1.mh-extra.com/html/ifm/al4142/al4142_operating-instructions-manual_3906627012.webp)
AL4142
Remote I/O module 16 DI
12
•
If the counter module simultaneously detects a positive edge at pin 4 and pin 2 of the port, the
counter value of the main counter does not change.
•
If the main counter reaches the threshold value CT (m = CT), the counter value is reset (m = 0).
Due to the overflow detection, the value of the batch counter is incremented (b = b+1).
•
If the main counter falls below 0, the counter value is reset to the threshold value (m = CT-1). Due
to the underflow detection, the value of the batch counter is decremented (b = b-1).
•
If the batch counter reaches the threshold value CTb (b = CTb), the counter value is reset (b = 0).
•
If the batch counter falls below 0, the counter value is reset to the threshold value (b = CTb-1).
CTb
CT
0
0
t
Main Counter
Batch Counter
4.5.4 Counter mode CTDIR
In CTDIR (Count Direction) mode, the counter module operates either as an up counter with overflow
detection or as a down counter with underflow detection. The counting direction can be set.
Behaviour:
•
The initial value of the main counter is m = 0. The initial value of the batch counter is b = 0. The
main counter has a threshold value CT. The batch counter has a threshold value CTb.
•
The user can determine the counting direction. The counter module initially operates as an up
counter with overflow detection.
•
If the counter module detects a positive edge at pin 4 of the port and the counting direction of the
port is set to “up”, the value of the main counter is incremented (m = m+1).
•
If the main counter reaches the threshold value CT (m = CT), the counter value is reset (m = 0).
Due to the overflow detection, the value of the batch counter is incremented (b = b+1).
•
If the batch counter reaches the threshold value CTb (b = CTb), the counter value is reset (b = 0).
•
If the counter module detects a positive edge at pin 4 of the port and the counting direction at pin 2
of the port is set to “down”, the value of the main counter is decremented (m = m-1).
•
If the main counter falls below 0, the counter value is reset to the threshold value (m = CT-1). Due
to the underflow detection, the value of the batch counter is decremented (b = b-1).
•
If the batch counter falls below 0, the counter value is reset to the threshold value (b = CTb-1).
CTb
CT
0
0
t
Main Counter
Batch Counter
4.6 Modbus TCP
The device offers the following Modbus TCP functions: