LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

different values for threshold array?

Hi, I am collecting measurements from 8 fluxmeters in an array of 8 elements and graph them in a multi line chart.

The fact is that some measurements return bad values due to bad transmission or bad reading from the (OLD) instrument. So, those wrong values are under or above the 50% of the real value (or the same, of the setpoint value).

Only a wrong value between 2 good values is collected (only a peak at time), so my goal will be:

if a > or < 50% of the real value (or the setpoint) is collected and both the value before and the value after this wrong reading are good I would replace the wrong with a correct value (say: with the previous or with the setpoint) in order to have a smooth chart shape.

I started to use threshold array vi but I need different threshold values for all 8 array positions because all 8 fluxmeters could have different setpoints.

Not able to solve...and probably I will need to collect at minimum 3 readings before filter wrong values, so I suppose I'd have to fill a 8x3 matrix (?)...Smiley Frustrated

0 Kudos
Message 1 of 3
(2,230 Views)

I don't think that the threshold array primitive is the right choice.  This function interpolates the array and finds the fractional index.  It assumes that the data has a slope.  It doesn't sound like your data would meet this criteria.

 

You just need to find the "bad" data points and replace the value with a reasonable value.  (maybe the average of the two data points on either side)

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 3
(2,214 Views)

You also might try the "Remove Outliers" function if you have the Professional Devel system.  As the name implies, it removes the outliers instead of replacing them.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 3 of 3
(2,211 Views)