Save counter value

The latch function enables the current counter value to be stored in separate process data, independent of the cycle time. The latch function can be triggered as follows:

Index 0x80n0:22 "Enable continuous latch extern" can be used to parameterize whether the function is executed at every parameterized external edge at the latch input or only once after every activation.

Save counter value 1:

Multiple activation of the latch function

If several commands are activated simultaneously to save the counter value in the "Latch value" process data (index 0x60n0:12), only the command that is set first is accepted by the terminal.

  • The counter value is stored in the "Latch value" (index 0x60n0:12) at the next occurring event and confirmed with the corresponding bit.
  • All other activated events are ignored.
  • The counter value storage cannot be reactivated until all activated commands for latching the value have been deactivated. This also applies if they were activated after confirmation by the occurring event.

Save counter value via a positive/negative edge at the Latch input (Enable latch extern on positive/negative edge)

Save counter value 2:

Activation of gate and latch functions via the same edge at the gate/latch input in two-channel mode 2xAB

When the gate function and a latch function is activated via the same edge at the gate/latch input, the latch function is always executed first, after which the counter value is disabled via the gate function.

Example:

Index 0x80n0:04 "Gate polarity" (1 = "Enable pos. gate") and

Index 0x70n0:02 "Enable latch externally on positive edge" =1

With a positive edge at the gate/latch input the current counter value is first stored in index 0x60n0:12 "Latch value". The counter value is then blocked.

The same applies to index 0x80n0:04 "Gate polarity" (2 = "Enable neg. gate") and simultaneous activation of index 70x0n0:04 "Enable latch extern on negative edge".