LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Intensity Charting/Graphing

How do you get an array with three columns of data to be 3 individual arrays and then graph them in an intensity graph/chart? I am pulling data from tcp and it is output as a comma separated string and a carraige return to denote an end of variables so the output in the data stream looks like:

 

(X,Y,Intensity)

6,80,9,

74,14,0,

51,69,1,

....

 

then i conver it to s spreadsheet style 2D array. I talked to the labview reps and they said I need to use something like Replace Array Subset. To do this. I have included the VI and an image of what my current setup results in. Basically I just want the intensity to be plot at the X and Y coordinate specified in the set. Thanks!

Download All
0 Kudos
Message 1 of 7
(3,005 Views)

If I understand correctly, you will want to initialize a 2D array of the correct size for your data filled with zeros.  As the data is read in, use the Replace Array Subset to replace a zero with the new data.  The X and Y coordinates will determine which element of  the 2D array to replace with the associated Z value.  Something like the attached maybe?

Randall Pursley
0 Kudos
Message 2 of 7
(2,986 Views)

In addition to Randall's suggestion consider the differences between the intensity graph and the other graph types. The intensity graph uses the indexes of the 2D array as the X and Y coordinates for the graph.  So the graph will have "something" at every position.  Unlike the X-Y graph you cannot make it plot "nothing" by using the NaN value.  If your data is sparse as your initial post suggests, consider the appearance of the "background."  This may affect the value with which you initialize the array.

 

Lynn

0 Kudos
Message 3 of 7
(2,979 Views)

That worked! Thanks a ton. Now all i need to do is get the intensity plot to change colors

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

Attached is a simple program with several color maps defined for both intensity graphs and image control.  Maybe one of them is what you are looking for.

Randall Pursley
0 Kudos
Message 5 of 7
(2,973 Views)

Thanks! Last problem that I'm enountering. My array is filling up and I believe it is maxing out plotting memory. Is it possible to plot the array value then clear the array and take in the next data point, plot it and clear it etc etc as long as data is coming in? 

0 Kudos
Message 6 of 7
(2,963 Views)

How big is your array?  If you have initialized it at the beginning, then it shouldn't be changing size at all.  Can you post your new code?

Randall Pursley
0 Kudos
Message 7 of 7
(2,946 Views)