LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Array Reference

Solved!
Go to solution

Hello All, 

 I am having the few boolean buttons. when I click on the "test start button ", other buttons have to disable. 

 

After the process ( data acquisition ) again the buttons have to come back to the original state. i have tried in few ways. post your guidelines and tips. I have attached a VI 

 

Thanks in advance !!!  

0 Kudos
Message 1 of 7
(4,504 Views)

ou need to use a for loop to loop through the disable property nodes of your buttons. You also need a while loop so that the application continuously runs. Finally, an event structure is the best way to control your UI.

Below is one way to implement what your mentioned.

 NI forum response (modified).png

Marc Dubois
0 Kudos
Message 2 of 7
(4,474 Views)

@Mrtechie wrote:

 I am having the few boolean buttons. when I click on the "test start button ", other buttons have to disable.  After the process ( data acquisition ) again the buttons have to come back to the original state. 


It is not clear (to me) what you want to happen.  One possibility is you want the user to press one-of-eight buttons, have something happen and have all the buttons "not available", and then present the buttons again for another choice (and another round of "button unavailability").  This is how I read your description.

 

If this is what you want, here is one way to do this:

 

Whoa, what is going on here?  What are these buttons?  They appear to be Boolean controls, but where is the Mechanical Action property?  I was going to say to make sure they are all Latch When Released, but when I went to check if this was so, I couldn't find this!  Is this NXG, and not LabVIEW?

 

What I was going to say was this:

  • Make all of the Controls Boolean, Latch When Released.  This causes them to automatically reset when they are read, so they are always in a consistent ("Off") appearance.
  • Place them in a sub-VI, and make the sub-VI a Modal Dialog. call it "Get Button".  This means the sub-VI pops up when called and must be attended to.  Inside the sub-VI, have an Event Structure with one Control per Case, and have a multi-value Enum whose values are the names of the Boolean Controls (Exit, Print, etc.).  Get each Event case to return the same-named Enum value, i.e. if the Print button is pressed, set the Enum to be "Print" (you could also do this with a String, but Enums, for me, are cleaner).  The sub-VI returns the Enum value.
  • So now your Main Program calls this Modal Dialog.  It pops up, the user pushes any button, the sub-VI's Event returns the Enum corresponding to that Button (and setting the Button back to False, if you built the Event structure properly), and disappears, hiding all the Buttons again.  The Buttons remain hidden until you call Get Button again.

If this isn't what you want to do, please explain again, in more detail.

 

Bob Schor

 

0 Kudos
Message 3 of 7
(4,456 Views)

Hello marcdub , 

I am having the 15.0 version. pls downgrade your version of the code and send me! your code is in 16.0 version 

0 Kudos
Message 4 of 7
(4,448 Views)

 

Hello bob , 

my purpose and intention was. " user click on the test start button means, data acquisition starts and complete within few seconds ( separate sub VI ).But during the data acquisition time, the user may click on some other buttons present on the screen . so that's why I have an idea to disable all other buttons except the stop button. 

After the data acquisition, all the buttons will be enabled

I have used event structuring logic in my program  

 

Got my idea ?? 

 

0 Kudos
Message 5 of 7
(4,438 Views)

If you perform the measurement inside the event structure, the default is 'Lock front panel' while executing. If you show a text message "measuring" user will probably understand why buttons are 'locked', else it's easy enough to gather the controls refs into an array and set "Disabled and greyed out"-property.

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(4,435 Views)
Solution
Accepted by topic author Mrtechie

Here is the LabVIEW 2015 version.

Marc Dubois
0 Kudos
Message 7 of 7
(4,425 Views)