SF_CTD (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_CTD
is a counter block from the SafetyStandard
library. It is an extension of CTD
, a standard IEC 61131-3 function block. The SF_CTD
function block contains both standard data types and safety-related data types (prefix: SAFE
).
SF_CTD
fulfills the countdown function.

Name | Data Type | Initial Value | Description, parameter values |
---|---|---|---|
|
|
| Rising edge at |
|
|
|
|
|
|
| Start value (upper limit) for counting down |
Name | Data Type | Initial Value | Description, parameter values |
---|---|---|---|
|
|
| Becomes |
|
|
| Current counter value. From the start value, |
FB code
IF LOAD THEN CV := PV; ELSIF CD AND (CV > PVmin) THEN CV := CV-1; END_IF ; Q := (CV <= 0) ;
The numerical value of PVmin
is 0.