Internet PLC Forum
General => Technical support => Topic started by: WLH on November 19, 2005, 04:56:31 PM
-
Is there a way to compute the Log (base 10) of a measured or computed value?
WLH
-
Since the PLC does not support floating point there is no simple function for computing logarithm. If the range of interest is small you can use a look up table with predefined values in a certain range to accomplish this. Alternatively, you may use a mathamatical formula such as Taylor or Maclaurin Series to compute for an approximae value but this can be quite computationally intensive, and you have to bear in mind that since the PLC does not support floating point, you have to use fixed point arithmetics to perform the computation to one or two decimal places of accuracy.
-
Thanks for the good advice. I think a look up table will work best for me. Please point me towards any app. notes on constructing a matrix table for two independent variables.
WLH
-
Please see the following thread:
http://www.tri-plc.com/yabbse/index.php?board=1;action=display;threadid=727;start=msg2048#msg2048