|
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 fulfills the countdown function.
Table 84. VAR_INPUT
|
Name |
Data Type |
Initial Value |
Description, parameter values |
|---|---|---|---|
|
|
|
|
Rising edge at |
|
|
|
|
|
|
|
|
|
Start value (upper limit) for counting down |
Table 85. VAR_OUTPUT
|
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.