Rockwell Automation T7833 ICS Regent+Plus Math Package for Winternet User Manual

Page 4

Advertising
background image

Math Package for W

INTERPRET

(T7833)


4

Industrial Control Services

Arithmetic Operations

Table 1 shows the arithmetic operators recognized by floating
point math listed in their default order of precedence.

Table 1. Arithmetic Operators.

Operator

Operation

^

Exponentiation

*

Multiplication

/

Division

+

Addition

-

Subtraction

Multiplication and division have equal precedence from left to
right, as do addition and subtraction.

The exponent, X, in an exponential expression (Y^X) is always
evaluated as an integer (fractional portion is truncated). Do

not use the exponentiation operator to perform square root
calculations, instead use the SQRT(X) function described
below.

Parentheses may be used to clarify the order of operation:
operations within parenthesis are performed first. Inside the
parentheses, the usual order of precedence is maintained.

Functional Operators

A functional operator is used in an expression to perform a
predetermined operation that is to be performed on one or
more operands. The Regent’s floating point math has four
standard functions that reside in the system as shown in
Table 2.

Table 2. Functional Operators.

Operator

Operation

SQRT(x)

Returns the square root of x

EXP(x)

Raises e to the x power

LOG(x)

Returns the logarithm of x

LN(x)

Returns the natural logarithm of x

In each function you can enter a variable or arithmetic
expression within the parenthesis of the function. For
example the following statement is valid.

Note:

Note:

Advertising