10-16-2015 08:37 PM - edited 10-16-2015 08:40 PM
Hi all,
I am having a mental block and hard time wrapping my head around this issue and how to do it. Let me explain.
I am using LabView to drive a Built-in-Self-Test (BIST) on our product. The device has a front panel touchscreen with serial control.
If you look at the attachment you will see a graphic (made in LabView) which will be displayed on the touchscreen.
The device BIST will feed me the bit-error-rate value (BER) such as 1e-5 errors.
I want to drop a dot on this graph for this error rate at a certain X value on the graph
My Y range is as follows: 1e-1 = 10 and 1e-9 = 300
Therefore, I have 290 pixels between the top and bottom of my scale.
290/8 = 36.25 pixels for each interval.
1e-1 = 10
1e-2 = 46.25
1e-3 = 82.50
etc...
I need to mathematically convert this number to show logarithmically on an x-y scale.
While writing this, I layed out 10 points from 1e-2 to 1e-1 (see Scsreenshot331).. I'm seeing the pattern but can't get the math right.
Plus I need to expand it down to 1e-9.
Thanks,
Peter
Solved! Go to Solution.
10-17-2015 03:00 AM
10-18-2015 09:14 AM
Why don't you just go to the properties dialog? Go to Scales and check the box for Log.
THat makes your x-scale logarithmic. No need for fancy math.
10-18-2015 01:44 PM
natasftw, you didn't understand. The device I need to write to is a simple x-y screen. I am not graphing in Windows and the LabView environment.
GerdW... That is exactly where I was going... close... but that doesn't work either.
I did figure it out though.
What complicated it for me was that all my Y-paramenters are <1. Log of anything less than 1 is a negative number.
It turns out that the formula is as follows.
pixel = (abs(log(y) -1)) * 36.25 +10
10-19-2015 01:55 AM
10-21-2015 10:22 PM
Hi Gerd,
Interesting.... I never think about simplifying.
My code is very clean and readable, but reducing unnecessary steps is something I fail to implement.
I guess if my program had speed critical constraints , I would probably need to be more diligent with that.
Peter