Gate/Latch combination input
The terminal provides an external Gate/Latch combination input for 24 VDC signals with a min. pulse duration of tON > 1 µs. This can be used as follows:
- Set counter value: set the counter value to a predefined counter value via a positive or negative edge (Set counter on latch extern on positive/negative edge)
- Counter value reset: reset the counter value to the value set in index 0x80n0:1B "Reset counter value" (default setting: zero) (Enable extern reset)
- Save counter value: save the counter value in separate process data via a positive or negative edge (Enable latch extern on positive/negative edge)
- Lock counter value: lock the counter value via a positive or negative edge (Enable pos/neg. gate)
![]() | Simultaneous use of Gate and Latch When using index 0x80n0:04 "Gate polarity" (1 = "Enable pos. gate") and simultaneously activating index 0x70n0:02 "Enable latch extern on positive edge", the current counter value is initially stored in index 0x60n0:12 "Latch value" when a positive edge is detected at the Gate/Latch input. The counter value is then blocked. The same applies to the use of index 0x80n0:04 "Gate polarity" (2 = "Enable neg. gate") and simultaneous activation of index 0x70n0:04 "Enable latch extern on negative edge" at a negative edge at the Gate/Latch input. |
Set counter value via gate/latch combination input (Set counter on latch extern on positive/negative edge)
The terminal offers the option of using the Gate/Latch input as a latch input (external latch). To do this, the gate should be deactivated.
![]() | Deactivation of the gate Set the "Gate polarity" bit (index 0x80n0:04) to "0 - Disable gate" in order to be able to use the Latch extern input without locking the counter value after the latch event. |
The counter value can be set to a preset value during runtime via the process data by the positive or negative edge at the gate/latch combination input.
- Counter value specification via object 0x70n0:11 "Set counter value"
- Activation of the counter value setting via
- the positive edge at the external gate/latch combination input: index 0x70n0:0A "Set counter on latch extern on positive edge"
- the negative edge at the external gate/latch combination input: index 0x70n0:0B "Set counter on latch extern on negative edge"
- If the bit is set (TRUE) in index 0x70n0:0A or 0x070n0:0B, the counter value is set to the specified value at the next rising or falling edge at the gate/latch combination input.
- For confirmation the "Set counter done" bit (index 0x60n0:03) is set to TRUE.
- The counter value specification cannot be reactivated until index 0x70n0:0A/0B "Set counter on latch extern on positive/negative edge" is set to FALSE.
Reset counter value via gate/latch combination input (Enable extern reset)
The counter value can be set to zero via the external gate/latch combination input.
- Presetting of the reset value via index 0x80n1:1B "Reset counter value", (Default: 0)
- To activate this function set the bit in index 0x80n0:02 "Enable extern reset".
- Index 0x80n0:10 "Extern reset polarity" can be used to specify at which edge the gate/latch combination input is active.
- 0: "Fall" - the counter is set to zero with a falling edge
- 1: "Rise" - the counter is set to zero with a rising edge
There is no status message via the process data.
Save the counter value via a positive/negative edge at the gate/latch combination input (Enable latch extern on positive/negative edge)
- Save the counter value at the external gate/latch combination input via:
- Index 0x70n0:02 "Enable latch extern on positive edge" = TRUE
At the first external latch pulse with positive edge the current counter value is stored in index 0x60n0:12 "Latch value". - Index 0x70n0:04 "Enable latch extern on negative edge" = TRUE
At the first external latch pulse with negative edge the current counter value is stored in index 0x60n0:12 "Latch value". - Simultaneous activation of 0x70n0:02 and 0x70n0:04
The current counter value is stored in index 0x60n0:12 "Latch value", at the first external latch pulse, independent of the edge polarity. - Specification whether it is necessary to reactivate the command to save the counter value via:
- "Enable continuous latch extern" Index 0x80n0:22 = FALSE
The following pulses at the gate/latch combination input have no influence on the latch value in index 0x60n0:12 “Latch value” when the bit in index 0x70n0:02 or 0x70n0:04 is set".
A new counter value can only be written to the gate/latch combination input in index 0x60n0:12 "Latch value" if index 0x60n0:02 "Latch extern valid" is FALSE. - "Enable continuous latch extern" Index 0x80n0:22 = TRUE
The counter value is written to index 0x60n0:12 "Latch value" at every parameterized edge at the gate/latch combination input.
There is no need to reactivate index 0x70n0:02 or 0x70n0:04. - Saving of the counter value in index 0x60n0:12 "Latch value" is confirmed via the "Latch extern valid" bit (index 0x60n0:02).
- The status of the gate/latch combination input can be monitored via index 0x60n0:0C "Status of input gate".
Lock counter value via a positive/negative edge at the gate/latch combination input (Enable pos./neg. gate)
- The level at the gate/latch combination input at which the counter value is locked during runtime can be specified via index 0x80n0:04 "Gate polarity".
- 0: Disable gate
The gate/latch combination input is deactivated to disable the counter. It can still be used as external latch input for storage. - 1: Enable pos. gate
The counter value is locked with HIGH level at the gate/latch combination input. - 2: Enable neg. gate
The counter value is locked with LOW level at the gate/latch combination input - The current level at the gate/latch combination input is displayed via process record 0x60n0:0C "Status of input gate".