Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I sequenially change the state of the digital I/O multiple times

I need a VI that will  sequenially change the digital IO states of my USB-6008
0 Kudos
Message 1 of 9
(5,341 Views)

How about just placing a DAQmx Write inside a for loop with an array of values outside?

 

 

 

Message Edited by Dennis Knutson on 02-25-2010 04:07 PM
0 Kudos
Message 2 of 9
(5,328 Views)

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.

0 Kudos
Message 3 of 9
(5,301 Views)

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.

 

Message Edited by Dennis Knutson on 02-26-2010 08:33 AM
0 Kudos
Message 4 of 9
(5,295 Views)
I'm affaird that I need a bit more help, I have tried, but at this point I've not been able to figure out how to implement the code. I know I'm asking alot but is it possible for you to point me to a working example.Thanks in advace.
0 Kudos
Message 5 of 9
(5,267 Views)

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.

 

 

0 Kudos
Message 6 of 9
(5,263 Views)

I have version 8.6.1

can you please send me a copy of what you have.

0 Kudos
Message 7 of 9
(5,259 Views)

Dennis,

 Thank you for your help, with a bit of modification I was able to fit your solution into my application, and it worked.

Smiley Happy

 

0 Kudos
Message 9 of 9
(5,223 Views)