Showing results for 
Search instead for 
Did you mean: 

Gauge Digital Display Not Zero

Hi All,


I have a problem with my gauge digital display. While the gauge needle is at zero, the digital display is showing -6.

Is there any simple way to make the digital display minimum value to zero?


Million thanks.



0 Kudos
Message 1 of 9

Interesting -- I thought this would be easy but it isn't.


Actually, I could not find a way to change the minimum on the digital display.  My suggest would be check the input before and set it to 0 if it's less than 0.  Anybody have any other ideas?



-Matt Bradley

************ kudos always appreciated, but only when deserved **************************

Message 2 of 9
A standard gauge digital display will display zero when the needle is at zero. It does so when I create a brand new gauge control. Are you saying this happens with any gauge that you create, or a specific one? If it's a specific one, then some properties must have been changed. If you post the VI with the aberrant gauge display then we can take a look.
0 Kudos
Message 3 of 9
Please attach the control. What is your LabVIEW version?
0 Kudos
Message 4 of 9

Hi Guys,


Thanks for replying.


Yes, it's true that my input is not zero but -6 but I thought there must be some way (property node or local variable) that I can set the minimium value

for the gauge digital display to zero without putting in additional comparator or selector.


I have attach my vi for your viewing. My labview version is 8.6. Pls advice if you can.



Message 5 of 9


You may use the In Range and Coerce function.

Refer to the In Range and Coerce VI in the labview\examples\general\functions\Comparison directory for an example of using the In Range and Coerce function.

Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 9

OSMAN wrote:

Yes, it's true that my input is not zero but -6

Ah. Mystery solved. Smiley Wink  There is a distinction between a gauge's needle display and its underlying value. The underlying value is by default a DBL, which means it can take on a value between (computer) -Inf and (computer) +Inf. It is no different than a regular numeric control that is a DBL. Thus, -6 is a perfectly acceptable value for the control to have. The needle display, however, has a different range. This is set by the "Scale" property. By default this has a range of 0 to 10. That is why you are seeing the needle say one thing while the digital display says something else.


The reason for this is that a gauge display is intended as a user interface control, and not really as an input to a VI. While it can be used as such, a programmer must consider what kind of value the control may receive. In this sense it is no different than any other control. As such, the question becomes: what is your program supposed to do if it receives an invalid input value (regardless of which input you're talking about)? As a programmer you basically have the following options: (a) accept the input as is, and let the code use the value as is (and not tell anybody); (b) coerce the value to a valid range (as suggested in the previous post) and continue with the coerced range (and not tell anybody); (c) generate an error and bypass execution of the VI. 


Note that you can set the data range for the gauge display just like you can with a numeric control so that its minimum value is zero, but this has no effect if someone uses the subVI and wires in a -6. The built-in coercion only applies to a user entering a value directly on the front panel. 

0 Kudos
Message 7 of 9

Hi t06afre and smercurio,


Thanks so much for the tips and detail explanation.


I did try using in range and coerce but that did not help. Finally, I just use greater than or equal to zero connect to a selector

with false value to zero. That did the job.


Appreciate your responses.



0 Kudos
Message 8 of 9

OSMAN wrote:

I did try using in range and coerce but that did not help.

What did you try, and what didn't work? This is a typical use of the In Range & Coerce:


Message Edited by smercurio_fc on 04-19-2009 07:56 AM
0 Kudos
Message 9 of 9