Detect counting direction

The terminal can be configured via Index 0x80n1:1C “Direction inversion hysteresis” as follows:

or

Detect counting direction

0x80n1:1C “Direction inversion hysteresis” = 0

Change in position

Direction of rotation

0x60n2:13 “Direction inversion detected

pos 2 – pos 1 > 0

Positive direction of rotation (CW)

0

pos 2 – pos 1 < 0

Negative direction of rotation (CCW)

1

pos 2 – pos 1 = 0

No change of direction of rotation

No state change

Counter overflow

No change of direction of rotation

No state change

Counter underflow

No change of direction of rotation

No state change

Detect counting direction 1:
Fig.37: Detection of the counting direction

Detect reversion of rotation

Detect counting direction 2:
Fig.38: Detection of reversion of rotation

Standstill monitoring

Detection of direction inversion can also be used for standstill monitoring. If an almost constant counter value is expected, the hysteresis (index 0x80n1:1C) can be used to monitor whether the value is within the window. A slight jitter of the counter value is therefore still accepted as a permissible value. If the limit is exceeded, the bit in the process data “Direction inversion detected” (0x60n2:13) is set during the next PLC cycle.

Detect counting direction 3:
Fig.39: Standstill monitoring with hysteresis and detection of reversion of rotation
Detect counting direction 4:

Drifting of the counter value

Reliable detection of a drifting counter value can only be guaranteed if the value in index 0x80n1:1C “Direction inversion hysteresis” is “1”. Or additional monitoring of the counter value in the PLC.