Using floating point math statements, Mathematical operations – Rockwell Automation T3833 ICS Regent Math Package for Winterpret User Manual
Page 3
Math Package for W
INTERPRET
(T3833)
P D - 6 0 4 3 M a r c h , 0 6
3
Using Floating Point Math Statements
In floating point math function blocks you enter
mathematical equations and expressions in the form of
statements. Each line can contain one statement that
calculates the result of a mathematical equation. For
example, consider the quadratic equation below.
y = 1.6x2 +8x -22.4
Using floating point math the statement representing this
equation would be:
Y = 1.6*X^2 + 8*X - 22.4
You can also enter comments in any line by entering a
semicolon (;) and placing your comments after the semicolon
as shown below.
Y = 1.6*X^2 + 8*X - 22.4 ; This is a comment.
Floating point math also allows you to create conditional
statements using IF, ELSE, ENDIF, WHILE, ENDW, AND
and OR operations. Below is an example of using IF, ELSE
and ENDIF to calculate the absolute value of the difference
between two variables.
IF AI1 > AI2
DIFF = AI1 - AI2
ELSE
DIFF = AI2 - AI1
ENDIF
Using combinations of conditional statements and
mathematical operations allows you to configure floating
point function blocks to meet a wide range of control
requirements.
Mathematical Operations
The mathematical operators perform arithmetic and
functional operations.