LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a Speedometer Gauge

How would I make a speedometer gauge?
 
The gauge runs from 0 to 15 MPH, but also needs the KPH scale to appear below it.
 
I can't seem to find anything on how to create a scale with multiple indicators.
 
The attached control has the tick marks above the MPH numbers, but I'd like the MPH numbers to be above the tick marks and have the KPH scale below it, with KPH appearing below the KPH tick marks.
 
Thanks,
~Joe

\
Angus Cattle from Pool Ranch and Steel Repairs via Joe's Welding.
0 Kudos
Message 1 of 6
(7,802 Views)
Related question: Also trying to get a fuel gauge.
 
The attached controls are saved in 8.2 format. The earlier control is 8.5 (sorry, I forgot).

\
Angus Cattle from Pool Ranch and Steel Repairs via Joe's Welding.
Download All
0 Kudos
Message 2 of 6
(7,799 Views)
Others on the forum will suggest to you that you look at a picture control.  However I have no experience with that, so I can't tell you where to begin.  But I can suggest that you you combinations of controls.
 
For your fuel gage, put your graphic image on your front panel.  Create a dial gage and customize it so that almost all of the elements are transparent (probably everything but the needle).  Get the min and max values located so that they will be in roughly the right locations.  Lay the transparent dial gage over top of your graphic image and shift things around until they look just right.  You may need to reorder the z-order of these elements to make sure the dial gage is in front and the graphic image is in the back.
 
For the speedometer you could probably do something similar where you overlay the km gage overtop the MPH gage and let most of the km graphic elements be transparent such as needle, border, ...  Just let the scale show and adjust the sizing so its postioned well with the MPG gage.
0 Kudos
Message 3 of 6
(7,779 Views)
As Ravens pointed out, the transparent indicator can work very well. I've uploaded a version for you.

I've generally found the 'classic' controls will allow you to set the transparency and border colors in a much simpler manner than trying to modify the 'system' or 'modern' controls.

0 Kudos
Message 4 of 6
(7,755 Views)

Raven: How do I get to the z-order property? I knew about this from HTML and VC programming, but I didn't know LV had it.

Phillip: That looks fantastic! Classic controls, huh? Thanks!

BTW: I had briefly thought about using a picture as a face for a gauge, but dismissed it. A picture with a transparent control sounds like the obvious next step - which I never took.

Thanks, gang!


\
Angus Cattle from Pool Ranch and Steel Repairs via Joe's Welding.
0 Kudos
Message 5 of 6
(7,751 Views)

On the toolbar on the front panel are 4 buttons to the right of the font button.

1.  Align objects.

2.  Distribute objects.

3.  Resize objects.

4.  Reorder (looks like two arrows forming a circle.)  It has choices to group and ungroup multiple objects, and also lock and unlock them.  But the key is the 4 choices of move forward or backward (moves object 1 step), or to front and to back.  (moves object all the way)

I don't know of any way to find out exactly what the z-order of an object is.  But by carefully manipulating the related objects, you should be able to force them into whatever order you need to.

0 Kudos
Message 6 of 6
(7,730 Views)