02-25-2010 02:32 PM
02-25-2010 05:06 PM - edited 02-25-2010 05:07 PM
How about just placing a DAQmx Write inside a for loop with an array of values outside?

02-26-2010 08:18 AM
Thanks Dennis, This is helpful, but I forgot to mention that there are a total of 10 state changes and they happen from 5 to 30 seconds apart after a button has been pressed.
Any help will be appreciated.
02-26-2010 09:32 AM - edited 02-26-2010 09:33 AM
Then wire an array of delays through to the wait function. Either have a separate array or create a cluster that has a Boolean array and a numeric for the delay. You would then create an array with the cluster as elements. A cluster array would be preferable because then you would not have to worry about keeping the state array and the delay array the same size.
Arrays and clusters are basic elements in LabVIEW. If you are just starting out, I would recomend you do the basic tutorials. After that, take a class or purchase one of the LabVIEW books.

02-26-2010 02:20 PM
02-26-2010 02:55 PM
What version of LabVIEW are you using? If it's 2009, you can just drag the image to the block diagram. I can save back as far as 8.0 if you are using an older version. And if you want help with code that you have written, at least post an image of the block diagram. Even better is to attach the VI.
The starting point for my VI can be found in the examples that come with LabVIEW. Go to Help>Find Examples>Hardware Input and Output>DAQmx>Digital Generation. Write Dig Chan and Write Dig Port are about as simple as it gets. Write Dig Chan is the one I modified.
After you finish the LabVIEW tutorials, you should check out Getting Started with DAQmx.
02-26-2010 03:02 PM
I have version 8.6.1
can you please send me a copy of what you have.
02-26-2010 03:12 PM
03-01-2010 01:49 PM
Dennis,
Thank you for your help, with a bit of modification I was able to fit your solution into my application, and it worked.
![]()