LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization of output and input signal

Hi all,

 

I have 11 voltage steps and and each step needs to come on after 5 seconds. I want to generate a new txt file of the output data of a sensor everytime the voltage changes.

 

For the generation of voltage, I have an array with the voltage steps and a "wait" vi set to 5 seconds all inside a for loop. The daq assistant output is set to on demand samples.

For the data acquisition I need to generate a text file everytime the voltage changes so i have an elapsed time vi with 5 seconds of target wired to the reset input of the "write to measurement files". The write to measurements Vi is inside a case structure to stop after 55 seconds which should be the time duration after all the voltage steps have finished.

I am able to generate the correct number of files but as the procedure gets closer to the last voltage steps, it's not synchronized. Is there a way to solve this issue?

I am new to labview so any help is appreciated.

Thanks! 

0 Kudos
Message 1 of 2
(1,999 Views)

Hi aeroMD,

 

I would highly reccommend you take a look at the examples at help>>find examples>>Hardware Input and output>>DAQmx>>Analog Input, and use the DAQmx functions for your VIs instead of express VIs. I am also a little confused of what is the purpose of the for loop? Can't you just include the while loop inside the for loop that will run 11 times? And why are you using two DAQ assistant? Which one is actually aquiring the data?

 

Also take a look at this example: http://zone.ni.com/devzone/cda/epd/p/id/5007 a very better way to program. We have some basic tutorials for free online, and training for low cost. Let me know if you are interested.

 

 

National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(1,971 Views)