02-28-2006 01:13 PM
02-28-2006 01:29 PM
First of all, check the current drain and voltage of the relay you are driving. Compare to the specs of the DIO device. If the relay draws too much current, you could damage the DIO. In this case, you would need a driver circuit. If the relay is not a 5 volt relay, you would need a driver circuit. A driver can be built with a ULN2003 IC.
For software, write your code to set the DIO output high (or low, whatever turns the relay on). Then create flat sequence structure that just has a time delay in it. Set the delay to whatever you want. Next, change the DIO output, and then another timer. Put the whole thing in a while loop to repeat, with a stop button to stop it. Be aware that the stop button will not stop the loop until the entire sequence of events inside the loop have finished executing.
Hope this helps.
02-28-2006 01:44 PM
Thanks..tbob
I have the I/o part worked out but I can't seem to create the software to control the on/off part. I have not had much exp with labview.
Im not sure what a flat sequence structure does and the help for LV confuses me even more.
I just need a simple adjustable on/of timer for LV-7.0
Thanks
Mully
02-28-2006 02:20 PM - edited 02-28-2006 02:20 PM
A picture is worth a thousand words:
Message Edited by tbob on 02-28-2006 01:20 PM
02-28-2006 02:39 PM
Wow thanks! tbob
I see how most of this should work ..I think ....but I do not understand the relay state control part?? I have to provide port and channel information to the I/O device. I used an array to select port 0 and write a 1 or 0 to turn ch0 of device on and off. Any thoughts??
thanks
Mully
02-28-2006 03:08 PM
02-28-2006 04:03 PM
Hey thanks again tbob !!!
Great help!!
I was able to mod your code to exactly what I needed..
Mully