LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

trying to set a range for my data

Solved!
Go to solution

Hello I am trying to set an upper limit and a lower limit for my array of data. I am not getting the results I want so I am wondering if i am using this correctly?

0 Kudos
Message 1 of 13
(3,413 Views)

Use scalers (not arrays) or your Uppper Limit and Lower Limit.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 13
(3,389 Views)

based on ploy morphology you can make code like this poly.jpg

0 Kudos
Message 3 of 13
(3,346 Views)

You ask "I wonder if I am using this correctly".  To which I say, "I don't know, as you haven't told us what you want to do".  There are a few subtlies with this function, which are (fairly) clearly spelled out in the Detailed Help -- I hope you read that.  You can specify arrays as the upper and lower limits, but if all of the array elements are the same, it certainly is "neater" to use a scalar.  The values you are coercing are Floats, so the distinction between the open and closed diamond symbols may not be as important as for Integers (because of the potential uncertainty of equality checks for floats), but this is also something you should consider.

 

So, what are you trying to accomplish?  Do you want to "clip" your data and replace "out of range" numbers with "edge" values?  Do you want to simply know that the data are all in-range?  Do you want to remove out-of-range values from the array?  And finally, what are the "results I want"?

 

Bob Schor 

Message 4 of 13
(3,309 Views)

Sorry Bob I seem to not explain myself completely at times. I would like to remove the out of range time values from the array. So if I have a time range from 0-8000 on the x-axis, I would set the range from 2000-5000 which corresponds to the x-axis values. Then I would use my peak detector function on those values. The reason why I am doing this because on my modules i get values that I do not want at the beginning of the array. Thank you I hope this makes better sense on what Im trying to accomplish and what type of results I should get.

0 Kudos
Message 5 of 13
(3,297 Views)
I did not open your zip file and I don't understand your use of the In Range function. It seems what you want is the Array Subset. You can easily get the index values for the time range you want.
0 Kudos
Message 6 of 13
(3,276 Views)

So all I would have to do is put the starting point in the length node of the array subset.

0 Kudos
Message 7 of 13
(3,270 Views)
No, you put the first point you want as the start and the number of points in the length.
0 Kudos
Message 8 of 13
(3,267 Views)

So index is starting point and the length is how far I want it to go?

0 Kudos
Message 9 of 13
(3,249 Views)
Solution
Accepted by topic author reggie2016
Yes. Don't forget that arrays are zero based in LabVIEW.
Message 10 of 13
(3,240 Views)