06-18-2010 02:53 PM - edited 06-18-2010 02:54 PM
I'm trying to represent a switch in LabVIEW using a dial. However, I can't figure out how to customize my control to look the way I want. I would like it to have options like below
/
_
\
So, I inverted the numbers on my dial so the needle goes counter-clockwise. Then I got rid of all "decorations" so it doesn't look 3d, just flat. But, if I set the maximum to 3 it puts the three around the 7 o'lock position by default. I essentially want the three to be at the 1 o'clock position. So my next step was to make the maximum go up to 10 and hide the numbers past three. But, if I do that, the user still has the ability to set the control past 3. How do I get this working?
Thanks.
Solved! Go to Solution.
06-18-2010 03:11 PM
Have you specified the limits in the Data Entry Menu and selected coerce?
06-18-2010 03:17 PM
Like this?
06-18-2010 03:34 PM - edited 06-18-2010 03:35 PM
Should have been more clear. I'm using a Gauge which does not have the data entry tab in it's properties dialog. Tim your solution doesn't quite line up right if I add more switches. Maybe I will try customizing the knob and use Darin's solution. More suggestions?
06-18-2010 03:42 PM - edited 06-18-2010 03:43 PM
@for(imstuck) wrote:
Should have been more clear. I'm using a Gauge which does not have the data entry tab in it's properties dialog. Tim your solution doesn't quite line up right if I add more switches. Maybe I will try customizing the knob and use Darin's solution. More suggestions?
I've attached a VI that lines up pretty well. Drag the 2 around to change the endpoints. Obviously, you can change the number (2) to however many switches you want.
I was playing with the max set at 5, and I liked the result. Maybe I'm still misunderstanding what you want though..
06-18-2010 03:45 PM
Gonna have to make it 8.5
However, I have a solution. I customized the gauge went into edit mode and copied the needle to the clipboard. Then opened the knob and edited that, copying the gauge needle over the default knob needle.
After that, I resized the "large" part of the knob and to the same size of the "knob" on the gauge. Now it looks just like the gauge but I have the ability to use Darin's suggestion in the properties dialog. I coerced to my limits and voila. Works.
06-18-2010 03:50 PM
You could probably saved yourself some work and just used text labels set to 1,2,3. No need to coerce anything.
06-18-2010 03:50 PM
Apparently I need two characters to post.
06-18-2010 03:53 PM - edited 06-18-2010 03:57 PM
@Dennis Knutson wrote:
You could probably saved yourself some work and just used text labels set to 1,2,3. No need to coerce anything.
That's kinda my fault. I tried them and they weren't working quite how I wanted and I got tired of fooling around with them. Anyways, I'll try this and remark the solution when I find the easiest way. Can I have a text label example, I'm still struggling.
06-18-2010 04:07 PM - edited 06-18-2010 04:10 PM
Once i figured out how to rotate the control and "squeeze" the numbers in customize mode, I got it. It just took some playing around with my mouse. Thanks Tim