0

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.

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Luc001
0

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

-1

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.