LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pressure Transducer Signal Jumping

I think what you're suggesting is exactly what will fix my problem, but I'm still stuck on two parts. First, you say to sample at 10ks/s but only read 1000 samples? Ive attached my code that I have reading and setting the sampling rate below, and Im not sure how to accomplish this unless there is a different timing/reading tool to use. Similarly with the averaging, what makes it average only a 1000 or only every second as opposed to just averaging everything continuously?

0 Kudos
Message 21 of 25
(882 Views)

You want a different instance of the polymorphic Read VI.  Now you are reading NChan 1Samp which means that you read 1 sample from each channel every time that VI executes.  What you want is probably NChan NSamp where the number of samples is set to 1000 or whatever number you decide to read on each iteration.

 

The averaging code (Mean.vi) only averages the data you place on its inputs.  If you send it an array of 1000 elements (the samples you just read), it will average 1000 values. If you want a contiunuous average just sum all the data and divide by the total number of points.  This method weights old data just as much as new. If the pressure changes after 10 minutes, it might take several minutes before you would see the change and longer before you had any confidence that you knew what the change was.

 

Lynn

Message 22 of 25
(874 Views)

Here's how it might look using the VI's mentioned. Depending on how many channels you have, you just index the 2D array and the apply the Mean.vi.

 

You could do the multiple Mean.vi's in a for loop, but they have been working well for me as shown - on pressure transducers.

 

means.jpg

Richard






0 Kudos
Message 23 of 25
(867 Views)

So is this the correct format to get the 1 update per second at 10Ks/s sampling?

0 Kudos
Message 24 of 25
(849 Views)

That will get you 10 updates per second.  You are reading 1000 samples at each read (per channel) and sampling at a rate of 10000 samples per second. Thus it takes about 0.1 second to acquire 1000 samples. If you want one update per second, change the samples to read to 10000.

 

Lynn

Message 25 of 25
(839 Views)