Parameter Declaration Data type Memory block Description
CU INPUT BOOL I, Q, M, D, L,
constant
Count up input
CD INPUT BOOL I, Q, M, D, L,
constant
Count down input
R INPUT BOOL I, Q, M, D, L,
constant
Reset input, R takes precedence
over LOAD.
LOAD INPUT BOOL I, Q, M, D, L,
constant
Load input, LOAD takes prece-
dence over CU and CD.
PV INPUT INT I, Q, M, D, L,
constant
Preset value
QU OUTPUT BOOL I, Q, M, D, L, Status of the up counter
QD OUTPUT BOOL I, Q, M, D, L, Status of the down counter
CV OUTPUT INT I, Q, M, D, L, Current count
Count up input:
A rising edge (with respect to the most recent SFB-call) at input CU increments the
counter.
Count down input:
A rising edge (with respect to the most recent SFB-call) at input CD decrements the
counter.
Reset input:
When input R is set to "1" the counter is reset to 0, irrespective of the status of inputs CU,
CD and LOAD.
Load input:
When the LOAD input is set to "1" the counter is preset to the value applied to PV, irre-
spective of the values of inputs CU and CD.
Preset value:
The counter is preset to the value applied to PV, when the LOAD input is set to 1.
Status of the up counter:
n QU = "1" if CV ≥ PV (Current count ≥ Preset value)
n else QU = "0"
Status of the down counter:
Parameters
CU
CD
R
LOAD
PV
QU
QD
VIPA SPEED7
Integrated Standard
System Function Blocks > SFB 2 - CTUD - Up-Down counter
HB00 | OPL_SP7 | Operation list | en | 18-30 732