beautypg.com

Managing tasks – Xylem System 5000 User Manual User Manual

Page 28

background image

MANAGING TASKS

26

log(x)

Log base 10 of x, LOG(1000) = 3.0

ln(x)

Natural log of x, LN(1000) = 6.90775

exp(x)

Natural log base of 2.718282 raised to the power of x,

EXP(3) = 20.08554

Logarithmic Functions

abs(x)

Absolute value of x, ABS(-55.67) = 55.67

sqrt(x)

Square root of x, SQRT(100) = 10.0

Basic Math Functions

if(x,y,z)

If condition x is true then return y else return z

IF(Batt>12.5,10,-10) = 10.0 if Batt is greater than 12.5

= -10.0 if Batt is less than 12.5

Logical Functions

When a sensor is used in several applications it may be easier to build an equation into the

operating system for that sensor rather than have customers enter the equation every time

the sensor is used. The following temperature equations are for thermistor based temperature

probes. When using one of these temperature probes see the app note for its full details.

Built In Specific Sensor Functions

Convert the voltage on analog channel X (specified in Task AnalogX) from the H-377 thermistor

probe to temperature in degrees Celsius. The following is the actual equation used:

h377c (AnalogX)

Convert the voltage on analog channel X (specified in Task AnalogX) from the H-377

thermistor probe to temperature in degrees Celsius. This function uses the same equation as

the function above, but uses the following conversion from degrees C to degrees F:

h377f (AnalogX)

Convert the voltage on analog channel X (specified in Task AnalogX) to a temperature based

on the built in voltage to temperature equation TP20B. The following is the actual equation:

tp20b (AnalogX)