Set counter value and lock via PLC variable
Set counter value via a PLC variable
You can set the counter value at runtime via the process data. Proceed as follows:
- 1. Enter the desired counter value in "ENC Outputs Channel n" > "Set counter value".
- 2. Apply a rising edge to "ENC Outputs Channel n" > "Control" > "Set counter".
- The counter value is applied.
- The status bit "ENC Inputs Channel n" > "Status" > "Set counter done" goes to 1 for confirmation.
Lock counter value via a PLC variable
The counter value can be locked or unlocked via the PLC application.
- Lock counter: Set the process data value "ENC Outputs Channel n" > "Set software gate" to 1.
The bit "Software gate valid" goes to 1 for confirmation. - Unlock counter: Set the process data value "ENC Outputs Channel n" > "Set software gate" to 0.
The bit "Software gate valid" goes to 0 for confirmation.
![]() | Lock counter value via gate input If the ModuleGroup "ENC_L_G" is selected, the counter value can be locked via an edge at the gate input. See chapter Lock counter value. |