04-04-2013 02:20 PM
Hello,
In the attached Test Host TCP Read Three peaks New (Events Global).vi I am trying to display a data file in a series of scatter plots. The data is read from a functional global, then formatted based on the axis selections and displayed.
Each plot allows selecting the x and y axis from a drop down menu. I spent a lot of time troubleshooting the following software bug: Whatever I do, the program keeps displaying the old data along with the new data set(s).
The program is part of a larger application, where new data are constantly fed to the scatter plots and displayed together with the old data.
I would appreciate your assitance in troubleshooting this application. Thank you.
Best regards,
Peter
Solved! Go to Solution.
04-08-2013 07:23 AM - edited 04-08-2013 07:25 AM
Just a brief thought, but it may be due to an unintended consequence of a shift register. With shift registers, the new data is appended to the old array.
The data that is being plotted is the old as well as the new. Maybe the old data is being stored in a shift register and being added to the new data.
Maybe use something like this?
http://digital.ni.com/public.nsf/websearch/94A94F764B92971B86256C7700601CB6
04-08-2013 04:54 PM
Hello Eric-E,
Thank you for your reply. This information about shift register appending data to existing data is new to me. Thus, I wrote the attached test vi. The shift register does not append the data. Rather, it replaces the data from the first loop iteration with the data from the second loop iteration, as expected. Also I have a reset function (Clear Plot.vi) in one of the loops together with a boolean (Reset Data) to trigger it. However, the old data is still not cleared.
Or did I misunderstand something?
Please advise. Thanks.
Peter
04-09-2013 03:41 PM
Whoops. I think I was replying before I had my coffee. You're correct about shift registers. Back to the problem at hand: does the Clear Plot.VI actually function correctly when used on a simplified code? For instance, does the VI clear a plot when nothing else is happening besides plotting then clearing? Also keep in mind we cannot actually run your code becuase we are missing several VI's such as the Clear Plot.vi.
04-10-2013 07:49 PM
Hello Eric-E,
Thank you for your help. We have found the two bugs causing the problems we observed in the data display. Among other things, we had a runaway condition. The vi is working fine now. Thanks again for your help.
Peter
04-11-2013 11:04 AM
Thanks for the update. I'm glad this is working out for you now!