Timer instructions
325
Part II IEC Instructions
Data type I/O Function
BOOL (IN) input internal timer on a falling edge
TIME (PT) input switch off delay
BOOL (Q) output signal output reset if PT = ET
TIME (ET) output elapsed time
Data types
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables which are used for programming the function block TOF are declared
in the POU header. This also includes the function block (FB) itself. By declaring the FB you create
a copy of the original FB. This copy is saved under copy_name. A separate data area is reserved
for this copy.
Body
If start is reset, this signal is transferred to signal_output with a delay corresponding to the period
of time set_value.
LD
ST
When programming with structured text, enter the following:
copy_name( IN:= start ,
PT:= set_value ,
Q=> signal_output ,
ET=> current_value );