Latch input (Latch extern)
A latch input (Latch extern) for 24 V DC signals with a minimum pulse duration of tON > 1 µs is available and can be used as follows:
- Reset counter value:
Reset the counter to the value set in index 0x80n1:1B “Reset counter value” (default setting: “0”) (index 0x80n0:02 “Enable extern reset”) - Set counter value:
Set the counter value to a predefined counter value via a positive or negative edge (output process data “Set counter on latch extern on positive/negative edge” (0x70n0:0A/0B)) - Save counter value:
Save the counter value, in separate process data, via a positive or negative edge (output process data “Enable latch extern on positive/negative edge” (0x70n0:02/04))
Counter value reset via the “Latch extern” input (Enable extern reset)
The counter value can be set to “0” via the “Latch extern” input.
- Setting 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 “Latch extern” input is active.
- 0: “Fall” - the counter is set to “0” with a negative edge
- 1: “Rise” - the counter is set to “0” with a positive edge
There is no status message via the process data.
Set counter via the “Latch extern” input (Set counter on latch extern on positive/negative edge)
The counter value can be set to a preset value during runtime via the process data by the positive or negative edge at the “Latch extern” input.
- Setting the counter value via the process data “Set counter value” (0x70n0:11)
- Activation of the counter value setting via
- the positive edge at the “Latch extern” input:
Process data “Set counter on latch extern on positive edge” (0x70n0:0A) - the negative edge at the “Latch extern” input:
Process data “Set counter on latch extern on negative edge” (0x70n0:0B) - If the bit is set (TRUE) in the process data “Set counter on latch extern on positive edge” (0x70n0:0A) or “Set counter on latch extern on negative edge” (0x70n0:0B), the counter value (Counter value) is set to the value specified in the process data “Set counter value” at the next positive or negative edge at the Latch extern input.
- To confirm, the bit in the process data “Set counter done” (0x60n0:03) is set to TRUE.
- The counter value setting cannot be reactivated until the process data “Set counter on latch extern on positive/negative edge” (0x70n0:0A/0B) has been set to FALSE.
Save the counter value via a positive/negative edge at the latch input (Enable latch extern on positive/negative edge)
- The counter value at the “Latch extern” input can be saved via:
- Process data “Enable latch extern on positive edge” (0x70n0:02) = TRUE
At the first external latch pulse with positive edge, the current counter value is stored in the process data “Latch value” (0x60n0:12). - Process data “Enable latch extern on negative edge” (0x70n0:04) = TRUE
At the first external latch pulse with negative edge the current counter value is stored in the process data “Latch value” (0x60n0:12). - Simultaneous activation of the bits in the process data “Enable latch extern on positive edge” (0x70n0:02) and “Enable latch extern on negative edge” (0x70n0:04)
The current counter value is stored in the process data “Latch value” (0x60n0:12), 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 “Latch extern” input have no effect on the latch value in the process data “Enable latch extern on positive edge” (0x70n0:02) and “Enable latch extern on negative edge” (0x70n0:04) when the bit in the process data “Latch value” (0x60n0:12) is set.
Only when the bit in the process data “Latch extern valid” (0x60n0:02) is set to FALSE can a new counter value be written to the latch input in the process data “Latch value” (0x60n0:12) - “Enable continuous latch extern” Index 0x80n0:22 = TRUE
The counter value is written to the process data “Latch value” (0x60n0:12) each time a configured edge occurs at the “Latch extern” input.
There is no need to reactivate the process data “Enable latch extern on positive edge” (0x70n0:02) and “Enable latch extern on negative edge” (0x70n0:04). - Saving of the count value in the process data “Latch value” (0x60n0:12) is confirmed by the bit in the process data “Latch extern valid” (0x60n0:02).
- The status of the “Latch extern” input can be monitored using the process data “Status of extern latch” (0x60n2:14).