Rockwell Automation T3833 ICS Regent Math Package for Winterpret User Manual

Page 8

Advertising
background image

Math Package for W

INTERPRET

(T3833)


8

Industrial Control Services

Integer Constants

Integer constants are constants entered as whole numbers
that do not contain decimal points or commas. Entering an
integer constant greater than 7 numerals long is allowed but
the precision of the actual number stored and used in the
Regent is limited to 7 significant digits. For example, the
integer constants 12345678 and 12345679 may result in an
equal values when converted and stored in the Regent.

Floating Point Constants

Floating point constants are positive and negative numbers
represented in exponential form (similar to scientific
notation). A floating point constant consists of an optionally
signed integer or fixed point number (the mantissa) followed
by the letter "E" and an optionally signed integer (the
exponent). The "E" means "times ten to the power of."

For example:

33E-2

Here, 33 is the mantissa, and -2 is the exponent. This number
could be read as "thirty-three times ten to the power of
negative two." You could also write this number as 0.33 in
regular fixed point notation.

You can represent any number from -1.175494E-38 to
3.402823E38 as a floating point constant.

Variables

Variables are names representing values used in the floating
point math function blocks. All of the variables you use in a
floating point math function block must be shared variables,
I/O points, or local variables used by floating point math
function blocks only. For example, if you scale an analog
input value to a register, the register should be defined as a
shared variable register if you want to use the scaled result in
a floating point function block.

The floating point math compiler assumes that any local
variables found in the function block will be local floating
point registers. If a local variable is used in both a floating
point math and other type of function block, a local data
allocation error will be reported when you attempt to load the

Advertising