LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-turn Spin Knob Needed

How do I make a knob that does not stop turning, or is allowed to turn around multiple times to go from min to max, or at last resort at least turn 360 degrees (instead of max being ~10 degrees shy of min). I have found the Knob Property, Needle property, "Lock at minimum and maximum" which helps, but it is a problem for the value of the knob to change from large number to small number when rotating clockwise (or vice-versa). (A guage turns 360 but does not look at all like a spin knob.)
0 Kudos
Message 1 of 7
(5,872 Views)
Hover your mouse over the number that shows the max end of the knob.  The cursor should change to a mostly circular double ended arrow.  Drag the max end of the knob around until it meets the minimum end of the knob.
0 Kudos
Message 2 of 7
(5,870 Views)
Thanks. I did not see that because ticks/numbers were not shown to simulate our spin knob. Showing, dragging, and hiding worked. So that helps a little. Now to get multi-turns...
0 Kudos
Message 3 of 7
(5,861 Views)

Hi dwb,

 

catch value change events. When end-of-scale is reached you can simulate the multiturn behaviour by setting new scale min/max values…

Message Edited by GerdW on 08-28-2009 05:36 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(5,858 Views)
Try this.
PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
Message 5 of 7
(5,839 Views)

Hello d.w.b.,

I think that I understand the behavior of the knob that you wish to see.  I have attached an example VI which, at first, has a range of 0-10.  Whenever it rolls over 10, or 0, it dynamically changes the range to increment or decrement by 10, depending on which direction you are turning the knob.  Forgive me for not having the time to clean up the code more.

As our friends in this forum have already pointed out, you can use the Value Change event in order to perform this functionality, which is exactly what I did.  From there, it is just a case of logic to tell when the knob rolls over, and which direction it was moving when it rolled over, and using property nodes of the knob in order to change the range.

Try it out and let me know if you have any questions!

Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 6 of 7
(5,784 Views)

Here's a very old example (ca. 2004) that might give you some ideas. (TrimKnob.vi)

 

Of course you would want to wrap all this into an xcontrol. 😄

Message Edited by altenbach on 08-31-2009 11:21 AM
Message 7 of 7
(5,765 Views)