LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the DAQ to input acquire a signal at one frequency while writing to file at another frequency

Solved!
Go to solution

Hello I am trying to read in a temperature from a thermocouple and display it on a waveform chart and simultaneously I would like to write the data to a file at a significantly lower frequency.  Currently I am sampling the DAQ at every .01s and I would like one sample to be written to the file every 2s.  I was thinking of toggling the enable to the relay every 2s, but I am not sure how to go about doing that and I wouldn't be surprised if there is a standard way of doing this but I haven't been able to find it.

 

Thank You,

Miguel 

TemperatureVi.PNG

 

0 Kudos
Message 1 of 3
(2,481 Views)
Solution
Accepted by topic author MiguelCSUN

If you are sampling every .01s and you want to write one sample every 2s, what about all the other samples taken?  Do you just wish to discard them?  So you will read 200 samples in 2 seconds.  But you only want to write one sample.  You can do this if you don't mind losing the other 199 samples.

 

You could use the elapsed timer function and wire the elapsed time output to a case structure.  Put your write function inside the True case.  Nothing in the false case.  Be sure the set the timer to reset automatically.  So every two seconds, the case will be true, and the write function will be called.

 

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 3
(2,467 Views)

Thank You, yeah I don't need to keep the other 199 samples so this works.

-Miguel

0 Kudos
Message 3 of 3
(2,434 Views)