8 ent er ing f o rmulas dir ectly – HEIDENHAIN TNC 310 (286 140) User Manual

Page 186

Advertising
background image

10 Programming: Q Parameters

174

Mathematical function

Soft key

Arc sine
Inverse of the sine. Determine the angle
from the ratio of the opposite side to the hypotenuse.
Example: Q10 = ASIN 0.75

Arc cosine
Inverse of the cosine. Determine the angle
from the ratio of the adjacent side to the hypotenuse.
Example: Q11 = ACOS Q40

Arc tangent
Inverse of the tangent. Determine the angle
from the ratio of the opposite to the adjacent side.
Example: Q12 = ATAN Q50

Powers
Example: Q15 = 3^3

Constant ”pi” (3.14159)
e.g. Q15 = PI

Natural logarithm (LN) of a number
Base 2.7183
Example: Q15 = LN Q11

Logarithm of a number, base 10
Example: Q33 = LOG Q22

Exponential function, 2.7183

n

Example: Q1 = EXP Q12

Negate (multiplication by -1)
Example: Q2 = NEG Q1

Drop places after the decimal point
(form an integer)
Example: Q3 = INT Q42

Absolute value
Example: Q4 = ABS Q22

Drop places before the decimal point
(form a fraction)
Example: Q5 = FRAC Q23

1

0.8 Ent

er

ing F

o

rmulas Dir

ectly

Mathematical function

Soft key

Check the sign of a number
e.g. Q12 = SGN Q50
If result for Q12 = 1: Q50 >= 0
If result for Q12 = -1: Q50 < 0

Rules for formulas

Mathematical formulas are programmed according to
the following rules:

n

Higher-level operations are performed first
(multiplication and division before addition and
subtraction)

12 Q1 = 5 * 3 + 2 * 10 = 35

1st step:

5

3 = 15

2nd step:

2

10 = 20

3rd step:

15 + 20 = 35

13 Q2 = SQ 10 – 3^3 = 73

1st step:

10

2

= 100

2nd step:

3

3

= 27

3rd step:

100 – 27 = 73

n

Distributive law
for calculating with parentheses

a * (b + c) = a * b + a * c

Advertising
This manual is related to the following products: