Internet PLC Forum
General => Technical support => Topic started by: temp on June 18, 2005, 08:09:49 AM
-
On the T100MD I close and open a relay at a certain frequency as follows:
if pulseperiod(1) < 33000 then
setio out1
else
clrio out1
endif
how do I insert a delay (say 5 seconds) before the relay releases? I need a certain amount of hysteresis in the circuit.
-
You can use Out1 to trigger a timer (lets call it T1)
Then before you execute the CLRIO statement, perform a check:
.....
ELSE
IF TESTIO(T1) = 1
CLRIO OUT 1
ENDIF
ENDIF
This way, OUT1 will not be cleared unless T1 contact closes.