Rockwell Automation 8520-GUM 9/Series CNC Grinder Operation and Programming Manual Documentation Set User Manual
Page 71

Chapter 2
Operating the Control
2-51
The control executes functions in Table 2.F from left to right in a program
block. These functions are executed before the control executes any
mathematical operators such as addition or subtraction. This order of
execution can be changed only by enclosing operations in brackets [ ].
Operations enclosed in brackets are executed first.
Example 2.2
Format for [CALC] Functions
This expression:
Evaluates the:
SIN[2]
sine of 2 degrees
SQRT[14+2]
square root of 16
SIN[SQRT[14+2]]
sine of the square root of 16
Example 2.3
Mathematical Function Examples
Expression Entered
Result
Expression Entered
Result
SIN[90]
1.0
FIX[12.7]
12.0
SQRT[16]
4.0
FUP[12.2]
13.0
ABS[-4]
4.0
FUP[12.0]
12.0
BIN[855]
357.0
LN[9]
2.197225
BCD[357]
855.0
EXP[2]
7.389056
ROUND[12.5]
13.0
ATAN[2]/[5]
21.801413
ROUND[12.49]
12.0
Important: Take precautions when performing calculations within the
brackets [ ] following a mathematical function. The control performs
operations within the bracket first, and then the mathematical function is
performed on this resultant.
For example:
If your mathematical function is:
Then the result is:
ROUND[2.8+2.6]
5.0
The values in the brackets are added together first and then rounded, not
rounded and then added together.