# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Continous Knob control with limits

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.

Message 1 of 8
(343 Views)

## Re: Continous Knob control with limits

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.

Message 2 of 8
(317 Views)

## Re: Continous Knob control with limits

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

Message 3 of 8
(280 Views)

## Re: Continous Knob control with limits

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?

Message 4 of 8
(259 Views)
Solution
Accepted by topic author Spectra235

## Re: Continous Knob control with limits

@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 - https://forums.ni.com/t5/LabVIEW/How-can-I-create-a-knob-that-I-can-turn-multiple-times/m-p/135167#M...

Something like that may be:

Hope it helps

Message 5 of 8
(243 Views)

## Re: Continous Knob control with limits

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

Modify as needed....

Message 6 of 8
(239 Views)

## Re: Continous Knob control with limits

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.

Message 7 of 8
(226 Views)

## Re: Continous Knob control with limits

@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.)

Message 8 of 8
(218 Views)