01-07-2013 05:25 AM
Hi everyone.
i hope you all doing well and happy new year.
im having maltab program that calculates for me the CCT for some mixture of light intensities. when i run matlab i get list of 32 CCT points.
i managed to get the values from matlab to lab view and stor it in control box. now i want to draw them over this graph on the line you see that is marked in the middle of the colored area. i want to draw these points one by one with different colors and keep the previous points on the graph as well.
please help me out and its urgent
thanks
Solved! Go to Solution.
01-07-2013 07:52 AM
First, I would highly recommend you run through the online LabVIEW tutorials, if you have not already done so.
Your problem is fairly easily solved using an XY graph. Do the following:
Good luck!
01-07-2013 07:57 AM
Hi, thanks for the reply
im new on labview, im really suffering hahah.
i just need your help in how to scale the xy graph coordinates to fit that available on the color space diagram?
thanks
01-07-2013 02:14 PM
You can make the size correct by dragging the outline of the XY graph around until it neatly surrounds the chromaticity chart. The axes values of the XY graph can be set by double clicking on the values (usually the start and end ones) on an axis and entering new values. Alternately, you can right click the graph and choose properties, then directly enter the values there. You can also use a property node to dynamically set them, but you should not need to do that.
01-07-2013 02:36 PM
thanks for helping me out, i have done that.
now im stuck in puting the points on the graph
the results that im going to obtail, i mean the x and y values are going to be writen in array form, i managed to use index array to extract them out, now how to use them to make point on the graph and keep all the points on the graph even when the points get updated?
thanks in advance.
01-08-2013 08:54 AM
Every time you write data to an XY graph, it clears the graph and writes only the data you give it. Every time you write data to the graph, you need to write all the data you want on the graph. This will require you to cache old data so you can rewrite it. Use a shift register in your loop to do this.
01-08-2013 07:16 PM
oh that sounds hard!
what if i just want to locate one point on the xy graph? the point coordinates will be available in array, is there any way i can use array index to draw these points on x,y graph?
01-09-2013 08:27 AM
Caching data in a shift register is actually fairly easy, it just sounds hard. Indexing a single point and graphing it is similar. The exact details of how you do it depends upon how your data is stored. The XY graph will accept data in three formats:
Options 1 or 2 would be best for your application. I don't know what format your data is actually in. If you have an array of X values and an array of Y values, option 1 is best. If you have an array of XY value pair clusters, option 2 is good. Let's look at option 1 first.
To display a single point, use Index Array on your X and Y value arrays to get a single point from each. Use Build Array to convert each single point into an array (which still has just a single point). You will have to collapse Build Array so it just has a single input. Use Bundle to create a cluster from your two arrays. Wire this to the XY graph.
For option 2, index out your points as in option 1. Use Bundle to create a cluster from them. Use Build Array to create an array of clusters from the cluster. Wire this to the XY graph.
Good luck.