LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to control two waveform graphs with boolean switch?

Hi NI Community,

I’m trying to figure out how to control two different waveform graphs using a Boolean switch. Specifically, I want the Boolean switch to determine which graph is displayed: when the switch is on, it should show one waveform graph, and when the switch is off, it should show the other.

I would appreciate any tips or suggestions on how to set this up!

Thanks in advance!

0 Kudos
Message 1 of 7
(158 Views)

Hi engineer,

 


@electronicengineer wrote:

I want the Boolean switch to determine which graph is displayed: when the switch is on, it should show one waveform graph, and when the switch is off, it should show the other.


THINK DATAFLOW: when you want to have "different code in cases" then this code belongs "into cases"…

 

Why do you need two graph indicators? Would it make sense to show one or more plots on just one graph?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(147 Views)

I understand your suggestion about dataflow and using case structures, which could be useful if I was working with a single graph. However, in this case, the college practical assignment requires two graphs, so that's why I need to manage both of them with the Boolean switch.

0 Kudos
Message 3 of 7
(141 Views)

Hi engineer,

 


@electronicengineer wrote:

I understand your suggestion about dataflow and using case structures,

that's why I need to manage both of them with the Boolean switch.


When you understand my suggestion then it is no problem to handle both graphs…

Best regards,
GerdW


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

Although @GerdW's native language isn't English, he made a wonderful pun.  Try saying his suggestion 

     THINK DATAFLOW: when you want to have "different code in cases" then this code belongs "into cases"…

 

and as you approach the last clause, be sure to say each syllable clearly.

 

Bob Schor

0 Kudos
Message 5 of 7
(92 Views)

You can right click on top of the graph indicator and create a Property Node - VIsible. THen you can wire teh boolean swith to change the property to visible or not. Do the same for both graphs and you will have what you need. 

 

LVNinja_0-1747168010208.png

 

Message 6 of 7
(77 Views)

One example among many:

Yamaeda_0-1747213074374.png

The simplest solution is to send both to the same graph and show Visibility checkbox

Yamaeda_1-1747213129853.png

Yamaeda_2-1747213175379.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(55 Views)