Showing results for 
Search instead for 
Did you mean: 

Continous Knob control with limits

Go to solution

I am new to Labview, please help me in generating a Labview Block Diagram for the following task - We have a knob which can rotate 360 degrees and there is no locking you can rotate it as much you want. So this Knob is our control and we have 0 to 1000 as our limits for one rotation of knob. But after one rotation in positive direction it should count after 1000 and after two rotation it should count after 2000 and in this way we can rotate it till the value 20000 and even if we try to rotate it further it will only show 20000. Similarly if we move it in negative direction it should reduce the value and with each rotation in negative direction it should deduct 1000 from previous value and in this way it can reach a minimum of -2000 as a value. And we have to show these values in an numeric indicator. Also it should run continuously so try using loop.

0 Kudos
Message 1 of 8

We can help better if you show us your code with the knob. Who wrote it? How is it implemented?


Most likely, all you need an "in range and coerce" applied to the value.

0 Kudos
Message 2 of 8

I only wrote the code, knob has lower and upper limits of 0 and 1000 but on continous rotation it should show values upto 20000 and -2000.

I am taking modulus of values coming from knob and then checking if its greater than 500 or less than 500 for getting rotation direction of knob, then adding and subtracting 1000 for different cases to get values between -2000 to 20000


image (1).png



0 Kudos
Message 3 of 8

Sorry, pictures of code are NOT code. We cannot run, debug, edit, or test pictures! Please attach your VI!


Nobody here will waste their time to recreate code from a picture. If you don't help us, we cannot help you. Seriously!


Why do you have two pointless coercion dots?

0 Kudos
Message 4 of 8
Accepted by Spectra235

@altenbach wrote:

Sorry, pictures of code are NOT code. We cannot run, debug, edit, or test pictures! Please attach your VI!


It seems to be that Spectra235 needed kind of "multiturn" knob, you already answered the similar question twenty years ago -


Something like that may be:


Hope it helps

Message 5 of 8

Since we are dealing with integers here, here's what I would do:




Modify as needed....


0 Kudos
Message 6 of 8

Yes exactly like that, thanks so much for helping me out. I am very new to Labview as I used to code in C++ and sorry I forgot to share my VI.

Thanks a lot.

0 Kudos
Message 7 of 8

@Spectra235 wrote:

Yes exactly like that, ....

We don't know which post you are replying to. You can mark the relevant post as solution instead.


(While both version as based on my code, my blue solution above is significantly simpler and easier to maintain (all flat code, nothing hidden in cases, all integers, etc.)

0 Kudos
Message 8 of 8