09-25-2019 01:06 PM
See my example project(s) attached to this thread: https://forums.ni.com/t5/LabVIEW/Subpanels-and-Occurences-Race-condition/td-p/3972885
They demonstrate using a subpanel and multiple clones successfully, even if they currently seem to be problematic. Might be the occurrence, might be something I failed to consider. I'd try using a different stop method but it's only a toy example...
09-25-2019 02:13 PM - edited 09-25-2019 02:15 PM
Ben, the VI is reenterant
Update:
When I force redraw every iteration of the plot loop in the posted code, the whole screen is continuously blinking showing me all 4 charts alternatively - Even though the other 3 subpanel's visible state is FALSE. There is no data loss when switching stations but needless to say having all 4 stations blinking in my face isn't going to work.
When I have the force redraw run every 100th loop, I have the screen blink only once in a while, redrawing all 4 stations. When I come back to a station, I see a choppy chart of older data.
Conclusion:
Waveform charts must be visible in order to draw data.
I will still welcome new ideas, old ideas, or feedback on posted code.
Appreciate all the help so far!
09-25-2019 02:38 PM
It has been a long times I had to go to this extreme but...
It used to be possible to force a chart update. I will outline the worse case situation where GUI performance was an issue.
BEFORE passing data to the chart, use a property node to "DeferFPUpdat" (defer updating the FP) = True
Chart property node >>> Visible = False (takes less time to update a chart that is not visible)
Present the new data to the chart
Chart Property >>> Visible = True (chart is marked as visible but the FP is not updated yet)
Chart Invoke node >>> Get Image (the updated charts image will be returned but you MUST do SOMETHING with the returned image or else LV will compile way the invoke node if the returned image data is not being used... LV does try to help us out after all).
Then finally underfer the FP update.
This is the process I named "Jiggle the Handle".
Play around with that outline.
The Invoke Node Get Image may be the only thing that is required. But back in about LV 8.2 or so, when I was plotting a zillion channels on multiple charts with an old PC, I had to do the entire song and dance.
Ben
02-18-2020 10:22 AM
Just wanted to close this post with an acceptable solution I found:
1. Main big sub-panel where the current station(async vi) is displayed
2. 4 little sub-panels hidden from sight. Each displays the remaining unseen stations
3. When a different station is selected, the sequence is - remove vi from main panel, insert that vi to the little sub-panel designated for it, remove the vi from one of the little sub-panels, insert it into the main sub-panel.
* This way the waveform chart keeps historical data (up to however much you allow it to in the "Chart History Length.." property.
** Have been running this setup for many days and there are no performance, CPU, or memory issues.
*** The "little" sub-panels are "out of the screen" but must remain visible.