LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subpanels, Waveform Charts, Async VIs

Solved!
Go to solution

Hi All, 

 

I am starting 4 VIs with Async call and inserting each one into a subpanel in 4 tabs (each tab has a subpanel).  It is the same VI I am using 4 times.  The VI has a waveform chart in it.  When tabbing through the 4 tabs, the waveform chart in each subpanel resets and starts plotting new data as soon as I tab into it.  Any idea why?  All other parameter/timers/counters do not reset and run asynchronously as expected.

1.JPG2.JPG

0 Kudos
Message 1 of 24
(3,975 Views)

It would really aid us in helping you if you attached the subvi


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 24
(3,964 Views)

Scarce little to go on but I will throw out an idea based on the fact you said you are using a Waveform Chart and I see globals in the code.

 

A chart that uses a Waveform data type will reset (clear the plot) and start plotting from the beginning when ever a new update is not consistent with what is already plotted.

 

Examples;

The channel names change

The T0 of the new data is older that data already in the chart

 

So if your tabbing is introducing a timing issue that results in the charts getting a new set of channel names or old T0 timestamps... it would explain what you described.

 

You may want to skip putting them in the subpanels and just showing the FPs to see if that make a difference.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 24
(3,902 Views)

Ben, thank you for the insight.  Going to investigate that route soon.

Message 4 of 24
(3,891 Views)

I'm not sure I understand what you are doing, and (of course) without your code I can't really find out, but I'm puzzled by your description of four tabs (which sounds like a Tab Control) each with four sub-Panels.  You also seem to have (I don't know how many) detached asynchronous routines doing I'm-not-sure what.

 

I had a project that involved recording analog data from multiple stations.  I wrote a single sub-VI that acquired the data from one station and displayed the result on a Waveform Chart on its front panel.  Let's say I had 10 of these running simultaneously.  My main routine would launch all 10 clones and have them update their own front panels.  In the Main routine, I could select which of the 10 I wanted to view, and all I had to do was to put it in the single sub-Panel and I could see its evolving Chart.  I could switch between them as fast as I could change the selector.  Very simple, easy to program, easy to organize.

 

I'm looking forward to seeing your code to understand what you are doing.  Maybe there's a simpler way ...

 

Bob Schor

0 Kudos
Message 5 of 24
(3,859 Views)

Could be a UI thing, where the data is there but not drawn.  Try changing one of the scales to force a redraw.

0 Kudos
Message 6 of 24
(3,828 Views)

@gsklyr wrote:

Ben, thank you for the insight.  Going to investigate that route soon.


With respect to Ben's insights...

 

I Hate Tabs. subpanels on tab containers that display charts are not going to play nicely.  That's just the way tab containers work....you "refresh" the data on the Tab Pane when you activate the view of a specific tab.

 

User viewable data updates on hidden tab views is generally ignored by the OS (the USER has chosen to pay no attention to the data behind the screen by selecting a different view from the tab containers view control)

 

A control with a history display e,g, a chart....makes no sence on a tab and double nonsense in a subpanel on a hidden tab view.

 

That being said,  does the subvi have a panel actvation Event?


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 24
(3,820 Views)

Why not 1 sub panel and a set of radio buttons to switch views? Seems like it would easy to implement/change your current VI.

 

mcduff

Message 8 of 24
(3,797 Views)

I agree with McDuff (how did he know I was using Radio Buttons to choose which of my Asynchronous Clones had the display I wanted to see?)(See my earlier reply -- sorry I wasn't as succinct as McDuff).

 

Bob Schor

0 Kudos
Message 9 of 24
(3,787 Views)

@Bob_Schor wrote:

I agree with McDuff (how did he know I was using Radio Buttons to choose which of my Asynchronous Clones had the display I wanted to see?)(See my earlier reply -- sorry I wasn't as succinct as McDuff).

 

Bob Schor


Because mcduff has read the same posts by me as you have and assumes.  

 

Tab containers are hateful 


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 24
(3,782 Views)