LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global Variable

Dear All

I have a VI Containing a sub VI. When I press a botton, the Sub VI opens and if I press another botton in the Sub VI's Front Panel, a boolean global variable turns ON but when I exit the Sub VI, the global variable returns OFF. How can I have a Global Variable that when I exit the Sub VI it still remains ON.

 

Regards

V.S

0 Kudos
Message 1 of 5
(3,448 Views)

Hi VS,

 

attach your VIs…

 

In the meanwhile you should not write a FALSE to your global variable when exiting the subVI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,432 Views)

Dear GerdW

Please check the attachment.

0 Kudos
Message 3 of 5
(3,419 Views)

Hi VS,

 

what happens when you call your subVI with "Enable2"=FALSE?

Have you ever debugged your VIs?

Have you even considered your subVI is also called with a FALSE input?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(3,410 Views)

Dear GerdW

Thanks for your valueable questions. I found my fault. I Conidered that when I switch Enable2 to false the Sub VI does not execute which is not correct.

 

Best Regards

V.S

0 Kudos
Message 5 of 5
(3,397 Views)