B&R – PLC – Structured Text – TOF

Call Syntax

TOF(IN,PT,Q,ET)

Parameters

I/OParameterData TypeDescription
ININBOOLInput signal
INPTTIMEDelay Time
OUTQBOOLOutput signal, the falling edge of the input signal is delayed by PT
OUTETTIMEElapsed time

Time Diagram

This function block works on a 10 ms base, i.e. it is not precise down to 1 ms.

 

Example Code

TOF_01( IN:=input, PT:=T#1s200ms );

output := TOF_01.Q;

elapsedTime := TOF_01.ET;