LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Could I change boolean button property in run-time? How?

Hi,

 

I am trying to change the boolean button property 'operation'( i.e. latch or switch when pressed) during run-time. I was exploring on the 'property node' but seemed not find any suitable one to realize that.

The result I want to achieve is that 'Engineer A could change the property of the button to control the program while operator A only presses the button.'

How should I realize that?  Could anyone give me an simple example about this?

 

Cheers,

SSR   

 

0 Kudos
Message 1 of 8
(3,187 Views)

Not really.

 

And why would you want to?  Your best bet would be to make the mechanical action Switch and simulate the Latch part of the action when needed by programmatically writing a False boolean to it by way of an event structure.

 

There is a way to change the action programmatically, but it requires scripting.  And it also requires the VI to not be running but in Edit mode.  I really don't think you should be trying to use that.

 

If you can give a clearer idea why you want the action to be switch sometimes and latch other times, there may be some other way to have that sort of behavior.

 

0 Kudos
Message 2 of 8
(3,176 Views)

Hi thx... I was trying to use is to control a case structure. The case structure has two states. My program is actually mainly in one state and the other empty one is set as the default case. Thus by triggering the button either latch or switch, the real program will be executed once or continuously. 

Thx. Then do you have any simpler idea?

 

 

0 Kudos
Message 3 of 8
(3,173 Views)

This idea comes from Oscilloscopes, even the way NI did it in its Virtual Bench software.

 

Have two buttons, one is set for switch and is called Run Continuous.  The other is set for Latch and is called Single Shot.  Put both functions through the OR boolean and feed that result to the case structure.  The user hits whichever button they need.

0 Kudos
Message 4 of 8
(3,158 Views)

Haha..thx a lot... actually what I did is the same.. I was wondering whether I could only use one button instead while gives the control over to the engineer. While due to the complexity of the change, I think I still use the two buttons method.

 

Thx a lot 

0 Kudos
Message 5 of 8
(3,147 Views)

Maybe you could simulate this by having the two buttons identical looking and on top of each other.  Then have a login or something to distinguish "Operator" from "Engineer" and have the appropriate buttons hidden and displayed depending on who logged in.

 

Bill

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 6 of 8
(3,123 Views)

billko wrote:

Maybe you could simulate this by having the two buttons identical looking and on top of each other.  Then have a login or something to distinguish "Operator" from "Engineer" and have the appropriate buttons hidden and displayed depending on who logged in.

 

Bill


you don't really need two buttons overlapping on each other for that. Another flag that tells what mode the one and only button should run in, will do the trick.

0 Kudos
Message 7 of 8
(3,101 Views)

NitinD wrote:

billko wrote:

Maybe you could simulate this by having the two buttons identical looking and on top of each other.  Then have a login or something to distinguish "Operator" from "Engineer" and have the appropriate buttons hidden and displayed depending on who logged in.

 

Bill


you don't really need two buttons overlapping on each other for that. Another flag that tells what mode the one and only button should run in, will do the trick.


I agree with you, but I was trying to work within the customer constraints - i.e. he settled on two buttons but would like a one-button solution if possible.  My suggestion was to make it appear to be one button, yet function as two.  🙂

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 8 of 8
(3,061 Views)