LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TAKE ARNGE

Solved!
Go to solution

Dear Sir / Madam,

 

Dear sir I want to take a range from 1-D data file. Like file having value 0-90, I want to take values which have 0-10, 11-20, 21-30, 31-40, 41-50, 51,60, 61-70,  71-80, and 81-90,  Here I have attached file  image file of results.

Download All
0 Kudos
Message 1 of 13
(3,112 Views)

Ok, what have you tried?  Sounds to me that you will need a simple FOR loop with a shift register for each bucket.  Use a case structure to add to the proper array when in a certain range (the case structure does take numerics).


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,099 Views)

Or, a simply use the histogram.vi on the signal analisys palatte.  (Sorry no example I'm ugrading to dev suite 2012 this afternoon)  Crossrulz can you carry that one for me?


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 13
(3,096 Views)

I don't see how a histogram is going to give him what he wants.  The histogram VIs only give the counts of each bin, not the values that went into a bin.  Or am I missing something?


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
Message 4 of 13
(3,088 Views)

@crossrulz wrote:

I don't see how a histogram is going to give him what he wants.  The histogram VIs only give the counts of each bin, not the values that went into a bin.  Or am I missing something?


Just thinking a step ahead.  Why else bin the values?


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 13
(3,084 Views)

Here ,,

 

I have attached a program and file, is it correct?

Download All
0 Kudos
Message 6 of 13
(3,079 Views)

That looks like it should work.

 

But to save you a little on the read side, you can right-click on the Read Text File and tell it to read lines.  Then wire -1 to the count in order to read all of the lines.  You can then use a Fractional String to Number converter on the read array to get your 1D array of numbers.


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 7 of 13
(3,038 Views)

Dear Sir,

 

Thanks for positive response, please help me a little more,

 

This program is working fine fine for less range, but for larger ones, like 0-10, 10-20,20-30,,,,,,,,,,,. 350-360, this program makes lost in confusion please suggest me another way to take range form 1-d array file.

 

Thanks & Regards 

Prince.

 

 

0 Kudos
Message 8 of 13
(3,008 Views)
Sort array. threshold array in an autoindexed loop. mobile again so no example . anyone?

"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 13
(2,998 Views)
Solution
Accepted by topic author Julian_prince

Hi Jeff,

 

here you go:

check.png

I create an array of cluster of array to store 1D arrays of different length in an (kind of root) array...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 13
(2,990 Views)