11-15-2011 09:15 AM
Hi Guys
I have signal which consists of some numbers .......they are reported seperately to Labview as x , y , z.
So I need a way to package 3 such elements into an array (for example) as x refes to a data point number , y is the voltage and z is the current.
I would then like to split the "array" off into an X-Y graph to eventually plot I vs V.
Any suggestions ???
Rgards
B
Solved! Go to Solution.
11-15-2011 09:25 AM
It depends. If you are getting your x,y,z one at a time, then I would parse the string (you can use Scan From String or Spreadsheet String to Array) and build the x and y arrays dynamically. You can either build 2 arrays and bundle them for the XY graph, or bundle each XY pair, and build them into an array.
If you are getting the entire set of data at once, then use Spreadsheet String to Array and get the array subsets for x and y. Bundle them to plot to th XYGraph.
11-15-2011 10:13 AM
Hi Matthew
Thanks for the quick reply and the info.
I am getting the x,y,z one at a time ....so each 'x' has a 'y' and a 'z' associated with it..Giving one set {x,y,z} , then {x1,y1,z1} e.t.c......but coming off sequentially as x,y,z,x1,y1,z1 e.t.c
I think the Spreadsheet String to Array idea could work, allowing me to build an array dynamically and then unbundle to feed into an X-Y graph.
I will give it try and get back to you .
Thanks again
Regards
B
11-16-2011 03:56 AM
Hi Matthew
I am having no luck with the Spreadsheet string to array route.
Do you any suggestions ?
Regards
B
11-16-2011 04:36 AM
Hi Matthew
I attach a picture of what I am trying to do.
The string indicator labelled data shows the string. I convert this string to number and then try and pump this into an array with 1 row and 3 columns.
Regards
B
11-16-2011 04:55 AM
Hi Barrys,
I am not very clear about your doubt. I assume that if you can make an array of your x y z values, then you can proceed on your own. Check the attached example. I have made an array of a set of values. Instead of the constant i used, you can directly read it from your spread sheet. Hope this helps.
Regards,
NitzZ
(Give kudos to good Answers, Mark it as a Solution if your problem is Solved;))
11-16-2011 08:59 AM
Hi All
Thanks for all your input.
I solved the problem by chnaging the delimiter on the instrument so I get now sets of {x,y,z},{x1,y1,z1} e.t.c
I then used Spreadsheet string to array and turned th array into a Matrix which I was able to extract each element sepertely and feed into an X-Y graph
NitzZ your solution is more elegant...
Thanks again
Barry