LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wierd knob behaviour

Solved!
Go to solution

Attached is a very simple vi.  On the front panel are two knobs.  Each knob appears to be identical; they have five settings (0,1,2,3,4).  Using the text labels property I have assigned the values (0,2,4,8,16). 

 

If you try to move the first knob you will see that you can only move it to 0,1,and 2.  If you try to move the second knob you can move it to all the settings.

 

What is the difference?  For the first knob the Data Entry properties are set to minimum=0 and maximum=4.  For the second knob they are set to 0 and 5.  Everything else is the same.

 

This is so elementary that I must be missing something but cannot figure out what it is. 

 

David

0 Kudos
Message 1 of 5
(2,538 Views)

Untitled.png

 

Won't go past 4 (which is the value of position 2)


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(2,533 Views)

Yes, but if you look at knob 2 properties you will see that the maximum is set to 5.  So why does it work for values of 8 (knob position 3) and 16 (knob position 4)?

 

David

0 Kudos
Message 3 of 5
(2,524 Views)
Solution
Accepted by topic author David_Lieberman

because there is no 5 it never sees a 5 and never locks  edit the knob so that it has 1, 2, 5 8, 16 values and it locks at 5

alternatly coerce the out of range values (but make sure the values EXIST before you coerce them or you'll coerce to undefined value) 


"Should be" isn't "Is" -Jay
Message 4 of 5
(2,521 Views)

Thanks for your logical and very clear explanation.

 

David

 

0 Kudos
Message 5 of 5
(2,513 Views)