04-02-2014 05:06 AM
Hello Friends,
I am new to LabView.
And I am working on an project where I have to control 6 relay via data acquision digital output lines.(USB-6353)
Each relay will be ON for 1 sec and OFF for 9 sec. But they all should be out of phase. So only 1 relay is ON at a time.
Can someone help me with doing this in Labview.
Thank you.
Solved! Go to Solution.
04-02-2014 09:59 AM - edited 04-02-2014 10:00 AM
04-03-2014 01:52 AM
Hi GerdW,
Thank you for your reply.
But for now I was busy with the this VI. The outputs a digital pulse 1sec on and 9 sec off. I copied it once to use 2 channels and was thinknig to delay it by 1 sec inside while loop.
But I just want the output on both the digital channel with just one button click, hopefully you can help me with it.
Thanks again.
04-03-2014 02:16 AM
04-03-2014 02:19 AM
Hi,
Here please find the LV2011 version.
Thanks,
Kind Regards
04-03-2014 02:28 AM
Hi sky,
did you notice the snippet I attached yesterday? It shows how to use an array to hold the status of 6 LEDs in just one wire…
You should do the same with your VI. Handling each single DO in it's own loop is pure overkill - some might say RubeGoldberg! DAQmx can handle more than one DO per task, so give it a try…
Btw. are you sure you need your "wait loops" to iterate once per millisecond?
04-03-2014 02:41 AM - edited 04-03-2014 02:43 AM
Hi,
Thanks for your reply.
If i could start both of the digital output with one button.
then I will use the wait loop in the 2nd output to be 1000ms, so when the 1st output goes low then 2nd will go high.
and if i add a third output then i will use the wait loop to be 3000ms, so it will go high when 2nd goes low.That's what I was thinking to do.
Do you maybe have a VI of the snippet you attached? And how can I use to output it to the digital channels ?
Thank you.
Kind regards,
04-03-2014 02:43 AM - edited 04-03-2014 02:45 AM
Hi sky,
instead of hardcoding each and every delay between the channels you should think about a simple state machine approach:
Have one state for the delay and another state(s) for switching the outputs…
Do you maybe have a VI of the snippet you attached?
Just copy the snippet to your harddisc, then drag&drop it into your block diagram. That's how snippets work…
And how can I use to output it to the digital channels ?
You just output the "LED" array with DAQmxWrite…
04-03-2014 02:46 AM
Hi,
Any example VI, to understand it better ?
Thank you,
Kind Regards,
04-03-2014 02:47 AM