LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

build my own log scale numeric control

Solved!
Go to solution
Highlighted

build my own log scale numeric control

There isn't an easy, direct way of setting an alternate scale for a numeric control.  There is for graphs and charts, but not numeric slides.

 

I have a need for a numeric slide to sit next to a corresponding strip chart.  The chart has log scale with auto-divisions.  The purpose of the numeric is to show the current value being measured, as opposed to the historic data of the chart.  Just a different visual aid for the technician.  See below...

 

2018-04-16 09_33_07-c__..._SVN Checkouts_NG Tube RGA_CVI driver_SRS RGA driver.cws.png2018-04-16 09_33_15-c__..._SVN Checkouts_NG Tube RGA_CVI driver_SRS RGA driver.cws.png

I'm trying to come up with some clever way to rescale the numeric so that it "looks" log, even though it's a linear control.

 

Also realize that it will be placed next to the strip chart like this:

2018-04-16 09_38_48-c__..._SVN Checkouts_NG Tube RGA_CVI driver_SRS RGA driver.cws.png

 

 

So it's value needs to correspond with the strip chart values.  Another trick would be to get the number of divisions in the numeric to correlate with those of the strip chart, along with their labels.

 

I thought of switching over to a ring control, since there's some customization possible with index labels.  But then you can't get the resolution when you set the value.

 

Is any of this possible?

0 Kudos
Message 1 of 4
(325 Views)

Re: build my own log scale numeric control

I should add that I found this similar thread, but it seems to me like a very last resort.

0 Kudos
Message 2 of 4
(301 Views)
Solution
Accepted by topic author ElectroLund
04-23-2018 09:50 AM

Re: build my own log scale numeric control

Maybe too simplistic, but... do you actually need the scale of the numeric control? If it is placed just next to the strip chart you can simply hide it! Just place a numeric slide with proper scale settings and set its value to the logarithm of the measure shown on the stripchart:

Screenshot 2018-04-17 08.50.11.png

(here I have set the scale of the numeric to 0÷3)

 

If on the other hand they are not so close, the only workaround I can imagine is to have a dummy graph next to the numeric slide used only to show the Y-scale. Again, hide all elements of the numeric and set the logarithm on it.

Screenshot 2018-04-17 08.58.52.png



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 3 of 4
(292 Views)

Re: build my own log scale numeric control

Nice solution, Roberto!

 

In my case, I'm dealing with vacuum pressures, so the log scale of my strip chart is E-5 to E-12, max to min.  For my numeric control, I set it up for exponent display with -5 to -12, max to min, double type.  The benefit of this is that I can keep the divisions visible and it's still pretty clear:

 

2018-04-23 10_39_18-Main Panel.png

 

Then, as you pointed out, I use a log10(value) and simply display the logarithmic value.  This hadn't occurred to me before. Thanks.

0 Kudos
Message 4 of 4
(232 Views)