Hi, what is the best way to implement analog input with non linear characteristic? I want to measure distance with Sharp GP2Y0A41SK0F sensor, then use this measurment to position leadscrew nut. I am using Automation Studio 4.12
Hello Bar,
in such a case, I use the âMTLookUpTableâ function block to linearize the characteristic curve.
Regards
Stephan
I think it could be necessary to limit the table to the red curve since the values below 3 cm are not clearly assignable:
Depending how accurate the values in between the points need to be you could also use âpolynomial fittingâ .
The sample uses the Gauss Elimination within a function which gets the same results if you put it in Excel.
PolynomialFitting.zip (136.4 KB)
Yeah that is true, producer says it measures 4-30 cm ![]()
If I can create my own arrays, I think it would be best solution, but I canât find this function block unfortunately using AS 4.12.6.106
Hi there,
try installing it ![]()
Also please note that the AS license doesnât remove functionality, so any time you donât find something, itâs not your license. It might limit usage, but not hide a function from you:
Thank you, solution was very easy, but still didnât think of it, thank you ![]()







