From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-13-2013 11:59 PM
Hi,
I have a lamp which can turn on/off based on the value of a boolean variable.
There are two modes in which I can control the lamp.
1) Manual mode in which the push button is to be used as a control to change the value of the boolean variable.
2)Auto mode in which the value of the variable is changed programmatically. Push button should turn to an indicator to show the value of the boolean variable.
I should be able to swith bw Manual and Auto mode during runtime and the push button should change to control and indicator respectively.
For those who might wonder why this is needed: there is a panel that has to be controlled in manual/auto mode. in manual mode, operator will manually use the buttons as controls to update control variables, in auto mode, my control algorithm will update the variables, and the operator has to be able to see which button is being pressed and when. so the button has to be the control for updating variables in manual mode, and has to be the indicator of changing variables in auto mode.
How can this be done?
A basic VI with the three objects are attached, and the boolean control variable is global.
Solved! Go to Solution.
11-14-2013 12:08 AM
Hello pcs82,
There is no way to turn a control into an indicator or vice-versa while the VI that contains it is running.
That being said, there are any number of ways to make a control "act like" an indicator. What you need is:
1) A way to update the value from the block diagram. Property nodes or Local Variables should probably be used here.
2) A way to prevent the user from entering new data when in "Auto" mode. This can be done by disabling the control via a property node or by rejecting changes to the control under certain conditions. If you want to reject user-entered changes, an event structure is probably the way to go.
You could also show or hide separate controls or indicators in the same location- using a button as an indicator and/or an LED as a button can be confusing and potentially very frustrating to the user. Be sure to carefully select a look that conveys what you are trying to tell the user and document the control/indicator properly with tooltips and context help to explain how the object will work in different situations.
Regards,
11-25-2013 12:21 AM
Did this.
11-25-2013 08:37 AM
OK, if you've fixed it, use the "solution" marker to indicate who you got the idea from, not you. You can fix this by editing from the "Options" box at the upper right of your post.
Cameron
11-25-2013 10:38 PM
Hi Cameron,
I found that idea, no one else. so I ve marked it as a solution.
cheers!