Rockwell Automation 8520-MUM 9/Series CNC Mill Operation and Programming Manual Documentation Set User Manual
Page 702
![background image](/manuals/580057/702/background.png)
Paramacros
Chapter 28
28-2
It may be necessary for mathematical expressions to be evaluated in a
complex paramacro. This requires that some form of mathematical
equation be written in a paramacro block. The following is a discussion of
the operators and function commands available for use on the control.
These operators and function commands are valid in any block within a
program, subprogram, paramacro, or MDI program.
This subsection lists the mathematical operators that are available on the
control. Use these operators to accomplish mathematical operations that
are necessary to evaluate the basic mathematical equation such as addition,
multiplication, etc. Table 28.A lists the operators and their meanings.
Table 28.A
Mathematical Operators
Operator
Meaning
+
Addition
-
Subtraction
*
Multiplication
/
Division
[ ]
Brackets
OR
Logical OR
XOR
Logical Exclusive OR
AND
Logical AND
MOD
Modulus
The control executes a mathematical operation in this order:
1.
Any part of the expression between the brackets [] is evaluated first.
2.
Multiplication, division, and MOD are evaluated second.
3.
All other operations are evaluated third.
If the same level of evaluation is performed, the left-most operation takes priority.
Example 28.1
Mathematical Operations
Expression entered
Result
12/4*3
9
12/[4*3]
1
12+2/2
13
[12+2]/2
7
12-4+3
11
12-[4+3]
5
28.2
Parametric Expressions
28.2.1
Basic Mathematical
Operators