Status of the counter:
n "1", if CV £ 0
n else Q = "0"
Current count:
n possible values: -32 768 ... 32 767
14.2.3 SFB 2 - CTUD - Up-Down counter
The SFB 2 can be used as an Up-Down counter. Here you have the following characteris-
tics:
n If the signal state at the up count input CU changes from "0" to "1" (positive edge), the
counter value is incremented by 1 and displayed at output CV.
n If the signal state at the down count input CD changes from "0" to "1" (positive edge),
the counter value is decremented by 1 and displayed at output CV.
n If both counter inputs have a positive edge, the current counter value does not
change.
n When the count reaches the upper limit of 32767 any further edges are ignored.
n When the count reaches the lower limit of -32768 any further edges are ignored.
n When a "1" is applied to the LOAD input then the counter is set to preset value PV.
n The counter value is reset to zero if reset input R has signal state "1". Positive signal
edges at the counter inputs and signal state "1" at the load input remain without effect
while input R has signal state "1".
n Output QU has signal state "1", if CV ≥ PV.
n Output QD has signal state "1", if CV ≤ 0.
n When it is necessary that the instances of this SFB are initialized after a restart, then
the respective instances must be initialized in OB 100 with:
– when the counter is used as up-counter with R = "1"
– when the counter is used as down-counter with R = 0 and LOAD = 1 and PV =
preset value.
Q
CV
Description
VIPA SPEED7
Integrated Standard
System Function Blocks > SFB 2 - CTUD - Up-Down counter
HB00 | OPL_SP7 | Operation list | en | 18-30 731