ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to update a 1d array multiple scatter graph/plot

Solved!
Go to solution

 Hi, i am trying to append data to the single plot graph you see below.  It is a 1d array.  When i build another array to append to this, it becomes a 2d array and am not quite sure how to manipulate this data into another graph/chart.  I have a set x-scale from -10 to -100 and on each iteration, about 100 y values are inserted to say -10 and then -20 (x scale) and so on until -100.  The graph will be of scatter type.

Any suggestions? 

 

  1.JPG

 

 

 

 

 

 

 

0 Kudos
Message 1 of 11
(5,112 Views)
You can do "build array" and right click and choose concatanate inputs if you want a continous value graph. Or are you having trouble diaplaying a 2 d array as such?
Message 2 of 11
(5,099 Views)
Hi muks, i am using LabVIEW 8.5.  Have read about setting this and when i checked this - it is enabled and greyed out.  I can build the array but when it becomes a 2D then the graphs & charts just dont want to know.
0 Kudos
Message 3 of 11
(5,096 Views)

graphs & charts just dont want to know
Sorry but I am not getting this. Can you post a screen shot of your output?
0 Kudos
Message 4 of 11
(5,094 Views)

Hi Grant,

 

the main problem is you don't show us all of your code!

 

The shift register already contains a 2D array, that's why concatenation mode is enabled for the build array... Change the data in the shift register to 1D array!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 11
(5,090 Views)

Hi, the previously posted jpg is pretty much my current output. The (Array of Pts) Single Plot is a 1D array.  This works fine for one iteration.  ie For 1 x-scale value, i plot 100 y values on say x=-10.

 

My problem is that i want to loop this in my while loop and add more x values but retain previous results on the graph.  Now i thought that by using a build array would work but because it creates a 2D array, i dont know what is the best method of putting the new data into a graph.  Dont think build array is correct.

Thanks

 

0 Kudos
Message 6 of 11
(5,089 Views)
Hi, here is the vi.
0 Kudos
Message 7 of 11
(5,088 Views)
Solution
Accepted by topic author Grant_C

Hi Grant,

 

as said before: the build array is forced to create a 2D array by your shift register. Change the default constant to an 1D array!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 11
(5,084 Views)
Hi, i have changed the shift register to 1D and all is well.  Why does it automatically create a 2D.  Something so simple causing so much problem.
0 Kudos
Message 9 of 11
(5,083 Views)

Hi Grant,

 

it depends on the order of wiring. When you first set the shift register then all is fine Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(5,078 Views)