Rockwell Automation 8520 9/Series CNC Lathe User Manual

Page 679

Advertising
background image

Paramacros

Chapter 28

28-5

Example 28.3

Format for Functions

SIN[2]

This evaluates the sine of 2 degrees.

SQRT[14+2]

This evaluates the square root of 16.

SIN[SQRT[14+2]]

This evaluates the sine of the square root of 16.

LN[#2+4]

This evaluates the logarithm of the value of parameter #2 plus 4.

Example 28.4

Mathematical Function Examples

Expression Entered

Result

SIN[90]

1.0

SQRT[16]

4.0

ABS[-4]

4.0

BIN[855]

357

BCD[357]

855

ROUND[12.5]

13.0

ROUND[12.4]

12.0

FIX[12.7]

12.0

FUP[12.2]

13.0

FUP[12.0]

12.0

LN[9]

2.197225

EXP[2]

7.389056

Important: Precaution must be taken when performing calculations within

the brackets [] following a mathematical function. The operations within

the bracket are performed first, and then the function is performed on this

resultant.

Example 28.5

Precaution for Order of Operation

N1#1=1.6;

Parameter #1 is set at 1.6

N2#2=2.8;

Parameter #2 is set at 2.8

N3#3=ROUND[#1+#2];

Parameter #3 is set at 4.0

Note that the values composing parameter #3 are added together first and

then rounded, not rounded and then added together.

Advertising