beautypg.com

Xl™ series – Xylem XL-BASIC Programming Guide User Manual

Page 5

background image

XL™ SERIES

XL-BASIC Programming Guide 23-5

Math Functions:

Basic Math Operations

+, -, *, /.

Standard Math operators

%

Modulo divide, returns the remainder from the standard division

^

Power operation, X^Y is X raised to the power of Y, for example 2^8 = 256

Trigonometry Operations (Degrees)

sin(x)

cos(x)

tan(x)

asin(x)

acos(x)

atan(x)

Trigonometry Operations (Radians)

sinr(x)

cosr(x)

tanr(x)

asinr(x)

acosr(x)

atanr(x)

Logarithmic Operations

log(x)

ln(x)

Misc Function Operations

abs(x)

Absolute value of x.

int(x)

Integer portion of x.

sqrt(x)

Square root of x.

int(x)

Integer portion of x.

h377f(anaX)

Convert voltage on analog channel X to a temperature in degrees (f) based
on math equation for a model H-377 temperature probe.

h377c(anaX)

Convert voltage on analog channel X to a temperature in degrees (c) based
on math equation for a model H-377 temperature probe.