LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make a device create an array of values of varying size of which I can take the median?

Solved!
Go to solution

I'm new at this whole LabVIEW thing, I know this is a pretty simple question, but:

 

I'm creating a fixture where we have two pressure transducers -- a low pressure and a high pressure transducer. The problem is there's noise in the signal that I want to reduce -- I don't have the full LabVIEW version (only base) so I can't use the handy median PtbyPt.vi to reduce the noise, but I wrote something that I thought would work (attached). The issue is twofold:

 

1) I'm not getting proper pressure readouts when I know the system is at vacuum.

 

2) The change in pressure is too slow for the application in which this is being used -- e.g. reading from atmospheric pressure to vacuum takes minutes when it should take seconds. I think I could solve this with a case structure that analyzes the array to see if the changes in pressure vary higher than a certain amount. If so, don't take the median.

 

Any help would be greatly appreciated!

0 Kudos
Message 1 of 4
(2,339 Views)

Hey there, I took a look at your program and the way you have it now it will only update your values whenever it exits the For Loop.  Is this the behavior you wanted?  

 

You can use either a case structure or just some logic and comparators to accomplish your second point.  Do you want to check the array for max and min values or use something else to select your case in the Case Structure?

 

Are you employing custom scaling to get the readouts to be correct when the system is at vacuum?

 

 

 

Scott A
SSP Product Manager
National Instruments
Message 2 of 4
(2,316 Views)
Solution
Accepted by topic author wnevis

Just make your own pt by pt mean. I made one here

Tim
GHSP
Message 3 of 4
(2,307 Views)

Thanks for the help, I ended up tweaking the VI such that it took N samples (n=500), converting the data to an array and taking the mean of that array.

 

Thanks again!

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