05-20-2019 03:20 AM
Hi
I have created an application for a customer based on the modified Continuous Mesurement project template provided in this forum topic:
Problem: the charts lag and hang.
Description: The panel of the main VI contains nine charts that plot a total of 21 waveforms. The chart history length is 1024. The sampling rate is 50 S/s/ch. The acquisition loop and the chart population loop run uniterrupted. The notifier that provide data to the charts gets approximately two samples per acquisiton loop iteration. After a short while the charts start to visually lag or to not update as smoothly as expected. After some minutes one or more of the charts completely hangs, while the others continue to present new data. I have found a trick to make the hanged charts come alive again. If I scroll the mouse wheel or click the mouse buttons, the charts start moving again. If it is really bad, it can take a number of scrolls or clicks to make the charts to "catch up". This means that buttons of the panel becomes unresponsive or takes several seconds to respond. The problem appears regardless of using real hardware, simulated hardware or streaming from TDMS. The CPU load is between 50-70 %, see the screenshot of the task manager.
Mitigation: I seems that having smaller chart history lengths and a smaller x axis ranges (max - min) minimizes the risk for this behavior.
Example code: Since I cannot share the customer's code, I have created and attached code based on the project template mentioned above with a minimum amount of edits to recreate the problem.
The attached video shows a scenario where three of the charts have hanged. The video zooms in on one chart. The chart comes alive when the mouse wheel is scrolled.
Any ideas on the cause of this problem and how to avoid it?
Thanks
Sebastian
05-20-2019 11:24 PM
I just tried this in NXG 3.0, and yeah, it's slow. Some things you could try:
05-21-2019 02:52 AM
Thanks for your reply and suggestions. Greatly appreciated.
Sebastian