02-22-2011 06:55 PM
Hi,
I'm trying to make two XY plots in one graph but the data is not generated simultaneously, how can I add a new plot in the same XY graph without loosing the previous one.
I'm attaching my code to show you my problem...
Solved! Go to Solution.
02-22-2011 08:57 PM
see attached file which can demonstrate that.
when your plots dont have the same number of points then default values(0) will be added to plot which is having less number of points. you could write a code which adds NaN values to shorter array.
Secondly I will strongly recommend you to read some good programming practices, especially about Queued State machine. they can make your life much simpler. the current coding style you are having is bound to give you some problems in future.
Tushar Jambhekar
tushar@jambhekar.com
Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog
02-22-2011 10:09 PM
Wilderi,
The easiest solution is to first read back the data that is already plotted on the XY graph using one of a variety of mechanisms such as local variable, property node, or shift register on the main loop. Second, build the proper structure with the read back old data and the new data. Finally, update the plot with all of the data.
Dave
02-23-2011 12:40 PM
Thank you both!