Programmable Logic Controllers
Pico Controllers
Counter Functions
High-Speed Counter “CH” for Pico GFX
The control relays and visualization devices provide a range of different high-speed counter functions. These counter function blocks can be connected directly to the digital inputs.
The following counter functions are possible:
- CF.. Frequency counters, frequency measurement
- CH.. High-speed counters, high-speed signal counting
- CI.. Incremental encoders, dual-channel incremental encoder signal counting
Inputs I 01...I 04 are designed for activating high-speed counters. The following wiring requirements must be observed:
- I 01 => CF 01, CH 01 or CI 01
- I 02 => CF 02, CH 02 or CI 01
- I 03 => CF 03, CH 03 or CI 02
- I 04 => CF 04, CH 04 or CI 02
Input assignment
Caution: Each I… input on the device can only be used once by a CF, CH, CI function block. If an input Ixx is used several times, only the high-speed counter is run that is positioned at the back in the order of processing in the function block diagram.
Example of an impermissible input assignment
- I 01 = High-speed counter CH 01
- I 01 = Frequency counter CF 02
- I 01 = Incremental encoder channel A CI 02
Example of a permissible input assignment
- I 01 = High-speed counter CH 01
- I 02 = Frequency counter CF 02
- I 03 = Incremental encoder channel A CI 02
- I 04 = Incremental encoder channel B CI 02

Symbol in the function
block diagram
General Information on the CH High-Speed Counter
The devices provide 4 high-speed counters (CounterH) CH01...CH 04.
These high-speed up/down counters are internally connected with the digital inputs I01...I04 and operate independently of the cycle time.
You can enter upper and lower threshold values (setpoints) as comparison values.
The appropriate function block contact (bit output) switches according to the actual value determined.
Function
The maximum counter frequency is 5 kHz.
Only square wave signals are permissible.
The mark-to-space ratio is 1:1.
The counter wiring must observe the following digital input assignment:
- I 01 counter input for counter CH 01
- I 02 counter input for counter CH 02
- I 03 counter input for counter CH 03
- I 04 counter input for counter CH 04
The Function Block and its Parameters
| Description | Note | |
|---|---|---|
| Function block inputs (DWord) |
||
| SH | Upper setpoint | The function block operates in the integrer range from -2147483648…+2147483647 |
| SL | Lower setpoint | |
| SV | Preset actual value | |
| Function block output (DWord) |
||
| QV | Actual value in RUN mode | |
| Contact (bit output) |
||
| OF | Status 1 if the actual value is greater than or equal to the upper setpoint (Overflow) | |
| FB | Status 1 if the actual value is less than or equal to the lower setpoint (Fall below) | |
| CY | Status 1 if the above value range is exceeded. | |
| ZE | Status 1 if the value of the QV function block output (i.e. the counter status) is zero | |
| Coil function (bit input) |
||
| EN | Enable for counter function block | |
| D_ | Count direction | 0 = up counting, 1 = down counting |
| SE | With a rising edge transfer the preset actual value | |
| RE | Reset the actual value to zero | |
| Parameter set | ||
| Call enabled | Function block parameters can be viewed on the device. | |
| Simulation | ||
| Not possible | Hardware-dependent function block | |
Memory Requirement
The function block requires 52 bytes of memory plus 4 bytes per function block input configured with an NU constant.
Retention
Counter relays can be run with retentive actual values. The number of counter relays can be selected in Project View in the Device Properties dialog. The retentive actual value requires 4 bytes of memory. If a counter relay is retentive, the actual value is retained when the operating mode is changed from RUN to STOP and when the power supply is switched off. When the device is restarted in RUN mode, the counter relay continues with the retentively stored actual value.
