LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Mechanical Action

Solved!
Go to solution

Please could someone give me the correct answer to this question taken from a CLAD exam paper.


What mechanical action of a Boolean would you use to mimic a button on a Windows dialog?

a. Switch until released
b. Switch when released
c. Latch until released
d. Latch when released

 

The following is a straight cut and paste from the LabView help window 'Changing the Mechanical Action of a Boolean Object'

 

Latch when releasedChanges the control value only after you release the mouse button within the graphical boundary of the control. When the VI reads it once, the control reverts to its default value. This behavior works in the same manner as dialog box buttons and system buttons. You cannot select this behavior for a radio buttons control.

 

Suggesting to me that the answer is 'D'. No other descriptions in Labview help mention dialog or system buttons.

 

However the answer has been given as 'B' Switch when released which I don't believe is correct.

 

The correct definitive answer would be most welcome as my exam is rapidly approaching.

 

Thanks again in advance.

0 Kudos
Message 1 of 14
(6,903 Views)
Solution
Accepted by topic author IanR

I would go with D.

0 Kudos
Message 2 of 14
(6,899 Views)

Thanks Altenbach, much appreciated although I would have been miffed on the day to be marked down for it.

0 Kudos
Message 3 of 14
(6,888 Views)

Actually, I believe "B" to be correct - and the cited NI documentation incorrect.  I draw this conclusion from a simple test.  On any typical Windows App, click and HOLD the mouse button on an application button of your choice.  You will note that nothing happens until you let the mouse button go.  Of course, the button will depress, but the event doesn't fire until "mouse-up."  In fact, if you mistakenly click a button, you can always hold it down and move your cursor to a "safe" place and "mouse-up."  The button event will not fire.  The reason why I say "safe" place is because if you "mouse-up" over another button that event will fire!

 

[edit]

read it wrong.  D is correct.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 14
(6,887 Views)

Thanks Bilko. I just created an event state machine activated by a boolean with a 'Latch When Released' mechanical action and it behaved exactly as your description. I think if the question comes up I will go with 'D' and hope NI have corrected the error.

 

Thanks again all.

0 Kudos
Message 5 of 14
(6,875 Views)

If the "button" in question is e.g. a tick-box, then the answer is B. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 14
(6,821 Views)

A tick-box is not a button. 😉

 

(If the button is a car horn, the answer would be A :D)

Message 7 of 14
(6,807 Views)

Does anyone else find it "interesting" that a certification exam would rely on knowledge of the workings of a different software application?

 

Yes, Windows is "fairly" common and familiar to all, even die-hard Mac OS users. I have been using computers since the IBM PC-XT days and have never been a Mac person except when forced to use them for certain college courses. But I don't know the exact behavior of dialog buttons!

 

Jeff

Jeffrey Zola
0 Kudos
Message 8 of 14
(6,770 Views)

So the switch/latch clearly happens when the button is released, but which is it?  My experience is that it switches.  Normally the dialog window closes right away, and the distinction is irrelevant, but when something is slow it seems the button remains pressed.  Of course it is always hard to distinguish between a button remaining pressed and a UI not being refreshed...

 

The real question is, what should you use (not what Windoze may or may not do).  I would say switch when released, B.

0 Kudos
Message 9 of 14
(6,762 Views)

@Darin.K wrote:

Of course it is always hard to distinguish between a button remaining pressed and a UI not being refreshed...


In LabVIEW, the latch action button remains ON until it is read by the code, so if things are slow, it could also be that the buttons has not been read yet by the code due to some other slow process.

 

DIalogs often have also an [Apply] button, which keeps the dialog open. Here it is more easy to tell that it is latch action.

 

Sidenote: A more interesting distinction is between "latch when released" and "latch when pressed". Latch when released allows a small safety net. If you press down and immediately notice that you pressed it by mistake, you can move the mouse off it and it will not trigger. With "latch when pressed", once you press down, you can no longer change your mind about firing that nuclear missile. ;).

Message 10 of 14
(6,747 Views)