Showing results for 
Search instead for 
Did you mean: 

Generating a sequenced output for NI 9474

I'm fairly green to labview and could use much help as possible. I am trying to make a VI that control a solenoid for a valve endurance test. The test is going to bias a valve back and forth repeatedly. It'll bias the valve in sets of 250 cycles, wait 5 hours between each cycle, and wait 24 hours in between each set. Just to state it another way, let's say there's in total 1000 cycles. Once it starts it'll look like [bias>wait 5 hours>repeat all previous 250 times>wait 24 hours>repeat all previous 4 times]. I have an NI 9474 that should work with the solenoid I'll be using and need it to send out a signal that'll be in time with the set I just stated. I've tried using the DAQ Assistant, but (specifically with the NI 9474) it asks for 1-D digital waveform input data and I've been having a lot of difficultly trying to convert a timed signal to that data type. My main question is how do I send out a signal with the a NI 9474 DAQ card? And if you could help me make the code meet my timing sequence that would help me so much, I'm thinking of using a few while loops but I'm hoping there is a better way that I'm not aware of. I'm using LabVIEW 2012 and thank you for any help in advance.

0 Kudos
Message 1 of 4

Hi Rob,


have you thought about using a state machine for those steps (=states) you want to repeat?

The state to wait for 5h or 24h can be the very same with just an additional parameter...

Best regards,

using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 2 of 4

I haven't, how would that work with the DAQ Assistant? Would it work within a while loop?

0 Kudos
Message 3 of 4

I do most of my DAQmx advice in threads where I advocate for the use of hardware-timed DAQ.


Your case is exactly the opposite.  The first most important thing to do is *NOT* use hardware timing for your DAQ task.  Use on-demand mode instead so that you can write 1 value that the DAQ hardware will hold indefinitely until it's time to write a different value.


This will fit in very nicely with the state machine approach that was already suggested by GerdW.



-Kevin P

0 Kudos
Message 4 of 4