SF_CTU (FB)
Description of the function block
Tip
The version of the function block as described here corresponds to the latest version of the function block in Version list of function blocks.
Tip
SF_CTU
is a counter FB from the SafetyStandard library. It is an extension of CTU
, a standard IEC 61131-3 function block. The SF_CTU
function block contains both standard data types and safety-related data types (prefix: SAFE
).
Its function is the counting up of a counter to a defined upper limit.

Name | Data Type | Initial Value | Description, parameter values |
---|---|---|---|
|
|
| Rising edge at |
|
|
|
|
|
|
| Upper limit for counting up |
Name | Data Type | Initial Value | Description, parameter values |
---|---|---|---|
|
|
|
|
|
|
| Current counter value. Increments until |
FB code
IF R THEN CV := 0 ; ELSIF CU AND (CV < PVmax) THEN CV := CV+1; END_IF ; Q := (CV >= PV) ;
The numerical value of PVmax
is 32767
.