LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Confusing Boolean Control

Solved!
Go to solution

Basically, a boolean control gives one result: true or false. So what's the difference between "cancel" and "stop", the two boolean controls in the palette of the front panel?

 

Mysteriously, I also saw "off" in some others' program. Where does it from? Is it equal to cancel or stop?

 

19697i263273D7C8129329

 

Any response will be appreciated.

Message 1 of 11
(6,914 Views)

They are just labels and labels that you can change to anything you want. Pick a label that is appropriate to the task you want the button to do. A label does not change the basic Boolean operation any more than it's appearance (i.e. radio button. check box, toggle, etc.) does.

0 Kudos
Message 2 of 11
(6,910 Views)

There is no functional difference. The difference is only the default Boolean text - i.e., the text inside the button. You can make it whatever you want, and you can define "Cancel" and "Stop" to mean whatever you want for your application, as long as the end-user knows what you mean.

 

What's probably confusing you is the glyph that's shown when you view the terminal as an icon. Ignore it. I actually have this option turned off, so all my Boolean controls look the same. Plus, they take up less space on the block diagram.

0 Kudos
Message 3 of 11
(6,908 Views)

@smercurio_fc wrote:

 

What's probably confusing you is the glyph that's shown when you view the terminal as an icon. Ignore it. I actually have this option turned off, so all my Boolean controls look the same. Plus, they take up less space on the block diagram.


Very much in agreement.  I wish the default behavior was to NOT view as icon.  Can we petition NI to make the default as the terminal instead of the icon?  Newbies post vi's here that have lots of icons that take lots of space.  That is one of the many contributing factors to their block diagrams being 10 screens high by 20 screens wide.

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 11
(6,893 Views)

 


@tbob wrote:

 Newbies post vi's here that have lots of icons that take lots of space.  That is one of the many contributing factors to their block diagrams being 10 screens high by 20 screens wide.

Agreed. It would be nice to get newbies like this guy to stop using icons.  Smiley Very Happy

 

http://forums.ni.com/t5/LabVIEW/Convert-UINT-into-single-bitstreams/m-p/1144508#M503761

 

Actually I tried to warn him of the consequences of that code.

Message 5 of 11
(6,886 Views)

Yes, the glyph confused me. I'm just wondering how it was created. Or maybe because of my version of Labview(2009)? But if it is the result of version, could I see glyph that is compatible only to other versions?

 

Whatever, I could use the boolean control without hesitance. Maybe the best way is just skip those questions.

 

Thank you.

0 Kudos
Message 6 of 11
(6,881 Views)
Solution
Accepted by topic author oPeY

Forget about the glyphs.  Right click on the block diagram glyph and uncheck the selection "View as icon".  This will show a smaller terminal without the label in the center.  Whatever boolean you choose, all the terminals look alike.  This will avoid confusion.

 

To make this change the default action, click on the menu bar at the top, Tools - Options.  In the options window, click on the category Block Diagram.  Uncheck the first box, Place front panel terminals as icons.  Click OK.  Now when you create a control or indicator, the glyph won't show up, but the smaller terminal will.

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 11
(6,871 Views)

That's cool.

 

Thank you all.

0 Kudos
Message 8 of 11
(6,864 Views)

Sometimes there are subtle differences between buttons. For example the "Cancel" and "OK" buttons from the system palette are not equivalent, because the OK button has a predefined key navigation.

 

(If you don't like this, vote for my idea here ;))

 

 


@oPeY wrote:

Basically, a boolean control gives one result: true or false. So what's the difference between "cancel" and "stop", the two boolean controls in the palette of the front panel?

 

Mysteriously, I also saw "off" in some others' program. Where does it from? Is it equal to cancel or stop?


What you are seeing is the boolean text (which is independent of the label). You can set it to anything you want, even different text for different states (true vs false).

 

 

While a boolean gives only one result, there is an entire additional dimension due to the fact that we are dealing with an user interface component. One important setting is the mechanical action. Most buttons are latch action, meaning they turn true until they are read once by the code, at which time they automatically reset to false. Switches are typically switch action, like a light switch. They retain the current state until changed manually. Another mechanical action is "switch until released". Here it acts like a car horn, turning true as long as it is pressed.

 

The mechanical action can be freely modified for each boolean control, so sometimes we see silly things such as a latch action switches or even LED indicators turned into controls. 😉

 

As a programmer, you need to make a few choices for each boolean control you place. Use the correct boolean text for clarity of the UI and the most appropriate mechanical action as required.

0 Kudos
Message 9 of 11
(6,852 Views)

It goes without saying, you could also vote to do away with the Icon View of terminals.

0 Kudos
Message 10 of 11
(6,840 Views)