LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"use default range" gray for gauge/knob

Hi there - the "use default range" checkbox is gray in the gauge/knob properties in my VI. How do I change this? I am trying to implement a compass sort of thing that displays a heading that is coming in as a value from 0-360. (0 = N, 90 = E, 180 = S, 270=W). I want to change how many ticks there are, and where numbers are displayed. My understanding was that I would need to change the data range, but I can't seem to figure out how to.
 
What am I doing wrong?
 
Thanks!
0 Kudos
Message 1 of 7
(4,268 Views)
You don't need to change the default data limits, just the scale range (min and max). Are you using text labels?
0 Kudos
Message 2 of 7
(4,267 Views)
Well - I want the data range to be from 0 to 360 degrees. But I want to be able to set the number of ticks between 0 and 360. So I think I need to be able to set the data range parameters, right?
0 Kudos
Message 3 of 7
(4,262 Views)
You are dealing with an indicator where the data range has no meaning. The data range determines what values are allowed to be set by the operator and what should happen if the entered value is out of range.
 
You are interested in the scale range. You can easily set the desired ticks with the "Scale.markervals[]" property. To make the scale fill 360 degrees, set the "Scale.sclPosrange" to 2*pi. Ensure in the code that the displayed value is always between 0 and 360 using e.g. "quotient&remainder" or "In range&coerce"
 
Attached is a simple program that shows the above ideas (LV 8.0). Modify as needed.
Message 4 of 7
(4,252 Views)

Hi that really helps to clear things up. A couple more things, however: Is it possible to choose how large tick marks are? Like - have large tick marks for 0, 90, 180, and 270, slightly smaller for 45, 135, 225, and 315, and so on. Also - how do I add text labels to specific points (ie N, NW, etc.). Also - how do I get rid of the numbers being displayed? I don't actually want numbers to be displayed - I only want to have text direction labels and ticks. So ideally - I would like to be able to put text labels at various points, have no numbers be displayed, and have ticks of various sizes. Is that all possible?

Thanks!

0 Kudos
Message 5 of 7
(4,243 Views)

Take a look at this thread.

 

 

Try changing you scale style to get different sized markers.

You may also be interested in this Nugget  or this Nugget by tst.

Ben

Message Edited by Ben on 05-13-2007 10:57 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 7
(4,232 Views)
  1. Is it possible to choose how large tick marks are? I don't think there is a good way to specify variable tick lenght. Maybe I am wrong.
  2. how do I add text labels to specific points (ie N, NW, etc.). While you can use text labels for scales, the scale becomes noncontinuous and you cannot point to intermediary values. This might not be useful. I would simply not display the marker values, but add free labels as needed.
  3. how do I get rid of the numbers being displayed? Choose a scale style without numbers.
  4. I don't actually want numbers to be displayed - I only want to have text direction labels and ticks. Attached is a quick modification, implementing some of the above.

For even more control (pun!), you could use the control editor.

Message Edited by altenbach on 05-13-2007 09:20 AM

Download All
0 Kudos
Message 7 of 7
(4,227 Views)