03-23-2010 05:29 AM
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 🙂
Solved! Go to Solution.
03-23-2010 07:53 AM
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
03-23-2010 09:02 AM
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
03-23-2010 09:53 AM
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
03-23-2010 09:56 AM
thank for the help. anychance of converting it to labview 8.6? i cant open it
Thanks again
John
03-23-2010 10:11 AM
03-23-2010 10:54 AM
thanks it works a charm.
i wasnt even close with my attempt 😄