LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV Needing A Special Button Control With An Input

Hello,
I am using LabView 7.1 and currently has a need of a special button control. Below I am describing what the desired button control is and why people need it.
~Description of the button control with an input:
   This button is like any normal boolean switch/button control except that an input leg is needed to switch it back on or off without manually doing it on the Front Panel.
~Why need it? There are 2 scenarios in many applications that need such a button for their implementation in LabView. (Use a Classic Boolean - Round Push Button as example below)
  1.  After pressing the button (the text for "ON" set to "ON" or "Test In Progress..."), LabView begins the desired testing and the power is applied to the UUT (Unit Under Test). (The applied power can be domestic AC or HAC.) When LabView ends the successful or failed testing, we have no way to automatically switch the button back to OFF. This is confusing because the test is done but the text on the button still shows "Test In Progress", even after the tester manually press the STOP button.
  2.  When its default is set to off and we turn it on during the execution time (the text on the button showing "ON" or "Test In Progress..."), we can't set it back to the default (OFF) by clicking on the RUN icon (restart the execution). Then how is the default setting going to help in this case?

I have done some searching and experiments trying implementing this in a more "automation" way, but have not found a satistory solution yet. Perhaps some other engineers had the same problem and have had the solution for it.
Thanks!

Allen Tsai
Product Test Engineer
Paneltronics
(305)823-9777 Ext 258
0 Kudos
Message 1 of 16
(3,934 Views)
It's called using a local variable or a property node:



(I'm assuming you're using one of the "Switch When..." mechanical actions.)


Message Edited by smercurio_fc on 05-05-2008 12:07 PM
Message 2 of 16
(3,933 Views)
Property node is a better way to go as you can also use it to change the text value as long as you are displaying Caption text.
Message 3 of 16
(3,928 Views)
I was just showing both methods, but I agree with the statement. And, you can also use the error cluster to force data dependency.
0 Kudos
Message 4 of 16
(3,927 Views)


smercurio_fc wrote:
 And, you can also use the error cluster to force data dependency.


That was my thought exactly..  😉
 
It is a formal requirement within my company that forbids the use of Local Variables and Stacked Sequence Structures.
If caught using them..... it's the Boardroom...  😄
0 Kudos
Message 5 of 16
(3,889 Views)

@JoeLabView wrote:
 
It is a formal requirement within my company that forbids the use of Local Variables and Stacked Sequence Structures.

That's a bit excessive, in my opinion. Every programming construct has its use. It's their misuse due to inexperience that's the problem.

Remember GOTO in Basic? At the time that was the "evil" statement which was really the cause of all programming problems back then. It was never the crappy design. No, it was the GOTO. Smiley Wink
0 Kudos
Message 6 of 16
(3,876 Views)

I agree with you.. 

Having this rule forces you to come up with better alternatives and avoids becoming lazy while coding the solution 😄

 

0 Kudos
Message 7 of 16
(3,865 Views)
Well, I would debate the need for a rule to try to accomplish that, but this isn't really the place for that. Besides, I don't need a "verboten" rule to tell me that. Smiley Wink


Message Edited by smercurio_fc on 05-06-2008 09:50 AM
0 Kudos
Message 8 of 16
(3,860 Views)

Thanks, folks! Now I see what Proven Enthusiastic Veterans are and how enthusiastic they can be. You guys are making people's learning more fun, and that is very kind of you.

I have tried both local variable and property node. Of course they both worked.

Thanks again!

 

0 Kudos
Message 9 of 16
(3,841 Views)
Stick with the property node.. 😉
 
LOL!! 😄
 
Glad you're learning.
 
Strangely enough I had this discussion during lunch. 
0 Kudos
Message 10 of 16
(3,816 Views)