04-04-2001 03:35 PM
04-04-2001 04:40 PM
04-04-2001 06:04 PM
07-06-2010 09:54 AM
Good afternoon.
The hyperlink doesn't work , could you please explain me how did you do, i hav the ame problem and i do not know how change default controls.
Best regards,
Thank you
07-06-2010 10:41 AM
The link worked fine for me, so you might want to try again. I am surprised it worked since the thread is 9 years old.
07-06-2010 11:00 AM
Hi,
YEs, i did not see, 9 years old !
Could you please tell me what do you use "vertical switch" or other.. and how do you change the OnOff action to OnOffOn .. ? I've tried, but without result.
07-06-2010 11:18 AM
You cannot use a boolean switch. Booleans have only two states, on-off. You are asking for three states, on-off-on. You can use a vertical pointer slide control (look in numerical palette). Right click and bring up the properties page. Go to the Data Entry tab. Uncheck Use Default Limits. Set minimum to 0 and maximum to 2. Click OK. On the control, double click on the top number of the scale, change it to 2. Now you can move the slider to 3 positions, 0-1-2. These 3 values can be used to represent on-off-on.
07-06-2010 12:18 PM
@tbob wrote:
You cannot use a boolean switch. Booleans have only two states, on-off. You are asking for three states, on-off-on.
Well, two of the states have the same value, so a boolean datatype would still work (unless the code needs to know which one of the two ON is currently in use ;)).
I would probably make an Xcontrol with a boolean datatype and some logic (for some ideas, have a look here).
07-06-2010 12:37 PM
@altenbach wrote:
Well, two of the states have the same value, so a boolean datatype would still work (unless the code needs to know which one of the two ON is currently in use ;)).
Typically an on-off-on switch has 3 values. The text happens to be the same for the on's, but they have different meanings. Maybe it should be labled on1-off-on2. It would serve no purpose to use an on-off-on switch if the two on's served the same purpose. Consider a situation where one motor opens a valve and another motor closes the valve. One switch could supply voltage to both motors, but only one at a time. Then the labels would be close-off-open. However, in switch terminology, they are typically called on-off-on.
07-06-2010 12:50 PM
The original thread is about 9 years old, so Dennis's answer is a bit stale. The version posted is also too old to open in modern LabVIEW versions.
If you really want three distinct states, use a radiobutton control with three custom buttons. (Dennis's file name gives a hint, but I don't think the stock radiobuttons were available back in 2001). 😄
The radiobutton control is like a specialize container, exclusively for booleans. Remove the existing controls, and place your own buttons. Arrange vertically or horizontally. The datatype is an enum with the states named after the boolean labels.
(Note that there is the annoying restriction that a radiobutton control cannot be empty, meaning you have to add the custom buttons first, before removing the last existing one. I guess nobody else is bothered by this, because my idea does not seem to be very popular. 😞 Otherwise, please vote for it! :D)