I have a quesion about using the timer1 function. I am a complete virgin when it comes to programming, so please be kind. I have a project that is using an NCD relay controller to control linear actuators. I want one relay to turn on and then stay on for 10 seconds and then turn off. I set the timer1 properties to enable with an interval time of 10000. I am programming a button to turn on the relay then wait 10 seconds then turn the relay off. All that happens is the relay comes on then off immediatley. I have tryed to do this several different ways with the same results. It is though the timer1 is not getting recognized. So my main question is, what steps am I missing, and how do I get a delay of 10 seconds before the program recognizes the turnoffrelay command? Thank you for any help.

try to put this on method Timer1_Tick
if relay = on then
relay = off
else
relay = on
end if
hope it will help

Hi,

In the button event start the timer and switch the relay on.
In the timer event create a counter to count the seconds the relay is on and switch then the relay off.