LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Logarithmic Knob Increments

In Labview 8.5, I have a knob/dial (is there a difference?) that I want to (1) scale logarithmically and (2) coerce specific values.  Specifically, the only allowable values should be 1E-6, 1E-5, 1E-4 ... 1E2.

I can do either of these, but I can't get both at once.  I tried setting the knob to -6, -5, -4 ... 2, forced increments of 1, with the intention of filtering the output so as to get the desired values; but I'd need to change the labels for that, and every time I change the labels it also changes the actual increment value.

Are there ways around either of these problems?  (Forgive me if this should be obvious; I'm new to Labview.)
0 Kudos
Message 1 of 4
(5,416 Views)
Is there a difference between a knob and a dial. Mostly visual. The knob has a depressesion to simulate rotating by putting your finger in the depression, sort of like is done in some instruments. The dial has a line.

As for doing what you want:

Right-click on the knob and select "Text Labels". Then, right-click on it again and select "Properties". In the "Data Range" tab set the underlying datatype that you want the knob to return. In the "Text Labels" tab uncheck "Sequential Values", and enter your text labels and corresponding values. So, you can have a knob position of "1E-6", and have it return whatever you need (based on your selected datatype).

That should be all you need to do.
0 Kudos
Message 2 of 4
(5,396 Views)

why not programatically round up? you use the knob with logaritmic scale. if the user would input any value out of the desired ones, you would change the control value (local variable for example):

be aware that in this case rounding will not be at half (i.e from 1 to 10 round will be around 3.1).

if you use a base different than 10, use the relevent functions Smiley Wink

Message Edited by Gabi1 on 09-27-2007 12:53 AM

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
Message 3 of 4
(5,396 Views)
Got it, thanks! Smiley Happy
0 Kudos
Message 4 of 4
(5,379 Views)