Save counter value via the "Latch" input
If the ModuleGroup "ENC_L_G" is selected, the latch function enables the current counter value to be saved in the variable "Latch value", regardless of the cycle time.
You can use "Enable latch extern on positive edge" and "Enable latch extern on positive edge" in the process data to specify at which edges at the "Latch" input the counter value should be saved.
- "Enable latch extern on positive edge" = 1
At the first external latch pulse with positive edge, the current counter value is saved. - "Enable latch extern on negative edge" = 1
At the first external latch pulse with negative edge the current counter value is saved. - Both variables = 1
The current counter value is saved with the first external latch pulse, regardless of the polarity of the edge.
The saving of the counter value is confirmed via the bit "Latch extern valid".
The status of the input "Latch" can be recorded via "Status of extern latch".