LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pressure acquisition

Solved!
Go to solution

Hi all,

I’m new and I have a dumb question.

I have two structures, one measuring the temperature at 1Hz and one measuring the pressure at 10KHz. I have two different cards of acquisition one for each structure, the problem is with the pressure acquisition, I want to write the pressure during 1 second to a file every 30s, how I can do that? I know how to read and write the signal from the measuring system but I cant make that the program write the file for 1s then stops and write another file of 1s 30s after the first measurement.

 

Thanks

 

Daniel M

0 Kudos
Message 1 of 4
(2,934 Views)
Solution
Accepted by topic author Dansu

Are you wanting to record just 1/30 of the pressure data, i.e. one second out of every thirty or do you want all thirty seconds of data recording at 10KHz?

 

Using the Express vi (Output/ Write LVM) for saving data is an easy way to achieve this as you can toggle the save data on/ off using a boolean, set the express vi to save the data to a new file for each write - Look at using a timed loop and divide down from the iteration loop counter to work out when to write the data - Mike

0 Kudos
Message 2 of 4
(2,923 Views)

Thanks Mike,

 

I finally could get it done thanks to your advice. I actually needed to record 1 second of data every 30s.

Now I’m facing a new problem, the program effectively writes the file automatically every 30s but there is a little error in the time; for example at the beginning it actually write the first measurement starting from 0s till 1s, but the second measurement starts at 29.78s till 30.78s, not 30-31s how I want, I don’t know were this error come from, do you have any idea?

 

Just to let you know I have a while loop that iterate every 1s and I command the program to write the file when the iteration time divide by 30 is a natural number…

 

Thanks

 

Daniel

0 Kudos
Message 3 of 4
(2,885 Views)

Probably down to using a Windows (or is it better named Windoze in this case) for the OS, if you need absolute timing control then use of a real-time based system would be a better option.

 

Make sure you have any screen saver options and auto defrag/ installer/ updates disabled on the PC you are using as all of these can mess up time based acquisitions when they rely upon software timing, is the start point of the recording really critical as its only 22mS out and the duration it records for is OK at one second, what time stamp do you get for the second, third, fourth write to file, is this also at XX.78 to YY.78 or does the mS value wander about - Mike

0 Kudos
Message 4 of 4
(2,876 Views)