LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analys spectrometer data read back from file

Solved!
Go to solution

Hey i need a bit of assistance from the all knowing labview board.....

 

i have attached the vi the data and a pic of the operation .

 

basicly im trying to search back through the data that was gathered from the spectromer. 

look for a particular range in that data.

 

and then to simply get the mean y axis value for that range.

 

i think i have been looking at it too long to see where i am going wrong.

 

Thanks in advance,

 

 

John

 

also if you know how to draw a line / shaded box on a graph that would give the user an indication of the areas being examined while another graph of live data was being drawn onto the same graph. .... or am i pushing my luck 🙂

Download All
0 Kudos
Message 1 of 7
(4,054 Views)

John,

 

Although you did an excellent job of commenting the code, it is still not entirely clear what you  are trying to do.  Which row is the y-axis value?  For which row are you setting the "range"?  I am assuming that one row is your "y-value" while the other is the "x-value that you are interested in?

 

One quick comment - the transpose that you have in there at the beginning forces the arrays that come out of the index array to be two 2 point arrays (the first and second columns of your spreadsheet) - is this what you intended or did you intend for the first row to be in the first array and the second in the second array?  

 

Peace,  Matt

0 Kudos
Message 2 of 7
(4,034 Views)

woops i should have included that detail.

in the spreadsheet the first row is the x axis values, and the second row is the y axis values.

i want to search the x axis values say for 640 to 660 (nano metres). 

get the y axis values for that range and then just simply get the Mean.

 

 

yeah my intention is that from the spreadsheet i want the first row to be the x array and the second row to be y array.

 

if that helps

 

im a little new to the world of labview

 

 

John

0 Kudos
Message 3 of 7
(4,021 Views)

This should work.  The first problem that you had was that you were transposing the matrix unnescessarily.  Second was that you are using a function to search for a discreet number rather than a "greater than or equal" (Search Array).  This implementation is probably not the fastest, but you should be able to figure out how to make it more efficient.

 

On another note, if you are relatively new, you can learn a lot from the debugging tools that Labview has available (execution trace, probes, etc).  These should have shown you right off the bat what some of the major issues you were having are.

 

Hope all this helps, 

 

Peace, Matt

0 Kudos
Message 4 of 7
(4,011 Views)

thank for the help. anychance of converting it to labview 8.6? i cant open it

 

Thanks again

 

John

0 Kudos
Message 5 of 7
(4,009 Views)
Solution
Accepted by topic author Canofsteam
Here ya go...
Message 6 of 7
(4,005 Views)

thanks it works a charm.

 

i wasnt even close with my attempt 😄

 

 

 

 

 

0 Kudos
Message 7 of 7
(3,996 Views)