Set counter value
The counter value can be set to a predefined value at runtime and thus be used for synchronization with other processes. The preset can be activated in the following ways:
- PLC variable: the counter value can be set from the PLC application (“Set counter value”)
- Zero pulse C input: via the zero pulse C of the encoder (“Set counter on latch C”)
- Latch input: a positive or negative edge at the “Latch extern” input (“Set counter on latch extern on positive/negative edge”)
![]() | Multiple activation of “Set counter on ...” If several commands are activated to accept the preset counter value, only the command that is set first is accepted by the terminal. All other commands are ignored but remain activated, depending on the system.
|
Set counter value via a PLC variable (Set counter value)
The counter value can be set to a predefined value during runtime via the process data “Set counter” (0x70n0:03). In the PLC this bit can be linked to a digital input, for example, or used directly as a variable.
- Setting the counter value using the process data “Set counter value” (0x70n0:11)
- Activation of the counter value setting via the PLC variable: “Set counter” (0x70n0:03)
- To confirm, the “Set counter done” bit (0x60n0:03) is set to TRUE.
- The counter value setting can only be reactivated once the bit in the process data “Set counter” (0x70n0:03) has been set to FALSE.
Set counter value via input zero pulse C (Set counter on latch C)
The counter value can be set to a preset value during runtime via the process data by means of the zero pulse C.
- Setting the counter value using the process data “Set counter value” (0x70n0:11)
- Activation of the counter value setting via zero pulse C:
- Process data “Set counter on latch C” (0x70n0:08) = TRUE
At the next zero pulse, the counter value (Counter value) is set to the counter value specified in the process data “Set counter value” (0x70n0:11). - To confirm, the bit in the process data “Set counter done” (0x60n0:03) is set to TRUE.
- The count value preset can only be reactivated via the zero pulse C once the bit in the process data “Set counter on latch C” (0x70n0:08) has been set to FALSE.
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.
