LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subpanels, Waveform Charts, Async VIs

Solved!
Go to solution

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...


GCentral
Message 21 of 24
(841 Views)

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.

 

100 force redraw.JPG

 

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!

0 Kudos
Message 22 of 24
(828 Views)

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.

 

Spoiler

 

unDock_All.PNG

 

Screenshot.PNG

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 23 of 24
(819 Views)
Solution
Accepted by gsklyr

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.

112233

Message 24 of 24
(765 Views)