Lock counter value
The gate function enables locking of the counter (0x60n0:11).
The counter is locked at the first pulse at the “Gate” input. Subsequent pulses have no influence on the counter value. This allows a timeframe to be defined in which counting signals are acquired. The gate function can be triggered by:
- Gate input: a positive/negative edge at the “Gate” input (Enable pos./neg. gate),
- PLC variable: the counter can be locked from the PLC application (Set software gate).
The “Gate” input may be used as a second latch input (Latch extern 2).
Lock counter value via a positive/negative edge at the gate input (Enable pos./neg. gate)
- The level at the gate input at which the counter value is locked during runtime can be specified via index 0x80n0:04 “Gate polarity”.
- 0: Disable gate
The “Gate” input is disabled. It can still be used as “Latch extern 2” input. - 1: Enable pos. gate
The counter value is locked with a HIGH level at the “Gate” input. - 2: Enable neg. gate
The counter value is locked with LOW level at the “Gate” input. - The current level at the “Gate” input is displayed via process data “Status of input gate” (0x60n0:0C).
![]() | Simultaneous use of Gate and Latch extern 2 When using the index 0x80n0:04 “Gate polarity” (1 = “Enable pos. gate”) and simultaneous activation of the output process data “Enable latch extern 2 on positive edge” (0x70n0:0C), a positive edge on the “Gate” input first stores the current counter value in the input process data “Latch value 2” (0x60n0:22). After that, the counter value is locked. The same applies to the use of index 0x80n0:04 “Gate polarity” (2 = “Enable neg. gate”) and the simultaneous activation of the output process data “Enable latch extern 2 on negative edge” (0x70n0:0D) when a negative edge occurs at the “Gate” input. |
Lock counter value via a PLC variable (Set software gate)
The counter value can be locked from the PLC application.
