ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Toggle between waveform charts

I have 3 waveform charts showing different data but I'm trying to create a front end where I can toggle between the 3 graphs so I can see one graph at a time. I would preferable like to use a button that can toggle between the charts. Is there any way to do this or have an example of anything that does this?

0 Kudos
Message 1 of 13
(1,641 Views)

The simplest solution would be to use a Tab Control, with each graph being in its own tab page.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 13
(1,621 Views)

What if I wanted the displays to be on one tab but toggle through them?

0 Kudos
Message 3 of 13
(1,617 Views)

Use exactly one chart with three traces and expose the visibility checkbox in the legend.

 

(Or tie visibility to a radio button control if only exactly one trace should show)

0 Kudos
Message 4 of 13
(1,576 Views)

@altenbach wrote:

(Or tie visibility to a radio button control if only exactly one trace should show)


 

 

Here's how that could look like:

 

altenbach_0-1708202054802.png

 

altenbach_0-1708202167901.png

 

0 Kudos
Message 5 of 13
(1,573 Views)

I have a new requirement where the waveform chart has to display 2 graphs at the same time. So total 6 graphs 2 on each chart.

 

Is there anyway I can change the above VI to implement the new requirement?

0 Kudos
Message 6 of 13
(1,461 Views)

Hi AJ,

 


@AJcpt wrote:

I have a new requirement where the waveform chart has to display 2 graphs at the same time. So total 6 graphs 2 on each chart.

 

Is there anyway I can change the above VI to implement the new requirement?


So before you had 3 PLOTS and you wanted to show one of them.

Your "new" requirement is to manage 6 plots and make two of them visible.

 

In which way is this a "new" requirement? It's basically the very same requirement…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 13
(1,454 Views)

I'm just not sure how to change the VI above to only show 2 at a time. I have tried build array and other methods but nothing seems to work.

 

Any suggestions?

0 Kudos
Message 8 of 13
(1,418 Views)

Hi AJ,

 


@AJcpt wrote:

I'm just not sure how to change the VI above to only show 2 at a time.

Any suggestions?


Altenbach's VI uses a FOR loop inside an event case.

  • This loop is set to 3 iterations because of 3 available plots: set the number of iterations to 6 when there are 6 plots now.
  • Inside the loop one plot is set to visible, the others to invisible: change the condition according to your requirements so you set two plots visible…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 13
(1,409 Views)

I'm not sure how to edit the for loop to make for this change. Everything I have tried does not seem to work.

0 Kudos
Message 10 of 13
(1,400 Views)