The Fast Counter function enables you to count pulses up to a frequency of 1 kHz.
The counter OUTPUT indicates whether:
The preset value has been reached (upcounting),
The value 0 has been reached (downcounting).
The fast counter inputs are implicitly connected to the I1 and I2 module inputs:
A pulse (rising edge) on the I1 input increments the counter,
A pulse (rising edge) on the I2 input decrements the counter.
Their use is not recommended on the wiring sheet.
The INITIALIZATION input can be used to reset the Fast Counter function to zero or to the preset value (depending on the parameter selected) during use.
The counter functions only if the ENABLE FUNCTION input is active.
Repetitive mode can be used with a time-delay value.
Note: If the current value of the counter exceeds the upper limit: +32767, it goes to -32768.
If the current value of the counter exceeds the lower limit: -32767, it goes to +32768.
Note: Note: This function block cannot be simulated.
Access
This function
is accessible from the FBD function bar.
Inputs/Outputs
The up/down counter uses:
An ENABLE FUNCTION Discrete-type input.
A discrete INITIALIZATION input.
2 inputs implicitly connected to the I1 and I2 module inputs.
The up/down counter provides:
A discrete OUTPUT,
The PRESET VALUE (1),
The CURRENT COUNTER VALUE (1),
The CURRENT TIMER VALUE for output (1).
(1) these integer values are displayed in Simulation and Monitoring mode.
Workshop Setting
Type of counting
Two modes are available:
Upcounting to the preset value: incrementation of the count value,
Downcounting from the preset value: decrementation of the count value.
Preset
This value is between 0 and 32767 (preset value).
Cycle type
Two modes are available:
Single cycle: the current counter value changes on an on-going basis.
The output is activated when the current value is greater than the preset value (counting mode) or when the current value is less than the preset value (counting mode),
Repetitive cycle: the current value of the counter is reinitialized during counting when the value reaches the preset value (counting mode) or 0 (counting mode).
The output is enabled following this reinitialization and remains active during a period of time that can be configured with the parameter: duration of pulse (from 1 to 32767 times 100ms) )
Latching
By default, after a power cut, the counter is set to the state that corresponds to program initialization.
To restore the state of the counter backed up on power loss, it is essential to activate latching.
Configuration from Front Panel
From the
PARAMETER menu, you can adjust:
The setpoint value,
The DURATION OF PULSE (for a repetitive cycle).
Illustration: parameter screen for a fast counter in Zelio entry / Front panel mode:
Description:
Number
Parameter
Description
1
Setpoint
Counter preset value.
2
Duration of pulse
Only if the cycle is repetitive
Note: This type of cycle cannot be modified from the front panel.
Parameter lock
The lock is positioned when the program is written to the module: Transfer\Transfer Program\PC > Module menu.
The
Write options window appears following compilation results and before the application is transferred onto the module.
Locking prevents locked parameters from being modified from the front panel of the module using the PARAMETERS menu.
Up-Counting Function in Single Cycle Mode
The following diagram shows the operation of the counter with initialization at 0:
Down-Counting Function in Single Cycle Mode
The following diagram shows the operation of the down-counter with initialization at the preset value:
Up-Counting Function in Repetitive Cycle Mode
The following diagram shows the operation of the counter with forcing to 0 of the current value on initialization, or when the count value has reached the preset value:
The output switches to the Inactive state when the predefined pulse duration value has run out. If the switch condition is Active before the switch to the Inactive state, the output pulse is prolonged by the DURATION OF THE PULSE (Timing).
Down-Counting Function in Repetitive Cycle Mode
The following diagram shows the operation of the down-counter with forcing to the preset value of the current value on initialization, or when the count value has reached 0:
The output switches to the Inactive state when the predefined pulse duration value has run out. If the switch condition is Active before the switch to the Inactive state, the output pulse is prolonged by the DURATION OF THE PULSE (Timing).