From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview custom gauge with varying spaced scale

Solved!
Go to solution

Hello,

 

I'm working on a few custom gauges for a project. Most are fairly straight forward with inputting a new background photo and modifying a few things. However, there is one gauge that is causing me a bit of a problem. Attached is a photo of the gauge. The issue is that the spacing on the scale is not uniform. I.e. An input value of approximately 3.5 or so would cause the needle to align to 5, an input value of 9 yields the gauge value of 10. The same for the lower portion. The 15 and 20 values match reasonably well.

 

Anyway, my question is whether there is a way to create a non-uniform scale in the gauge. The only options I know of are linear and logarithmic. Any suggestions?

 

Also, I am currently using labview 2011.

0 Kudos
Message 1 of 3
(2,670 Views)
Solution
Accepted by topic author flyingfisherman2

Hi flying,

 

please don't rename PNG files using suffix "JPG" - and please scale down your images just a little bit before uploading them… (Attachment is your picture scaled down to 640px and changed to grayscale.)

 

I suggest to use a simple interpolation (or lookup table) to convert "real" value to "value fitted for gauge". When using background images I often have to cope with non-linearities on those gauges (or images of them) and so use a small VI to adapt to this non-linearity…

You can expand that suggestion by creating an XControl that handles this conversion internally!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,656 Views)

Oops! Sorry about that. Working with a new camera and software and apparently I didn't save it correctly after doing some of the image editing on it.

 

The idea of using interpolation/lookup-tables to do that never even crossed my mind, but that sounds like a good method for handling that problem!

 

Thanks!

0 Kudos
Message 3 of 3
(2,636 Views)