beautypg.com

HEIDENHAIN IK 5394-3D User Manual

Page 358

background image

Chapter 4 Programming

4-86

Test conditions are constructed as formulas. Use the following information to
help construct useful test conditions.

Parantheses( )

Use parantheses to order mathematical equations. For example, in the follow-
ing equation

6*(4+2) = 36

the 4 and 2 are added together before being multiplied by the 6.

The same equation without the parantheses is as follows:

6*4+2 = 26

Here 6 is multiplied by 4 then added to 2.

Work from the innermost set of parantheses to the outermost set in equations
using multiple sets of parantheses.

For example,

((4+2)*(4+2)+1) = 37

Here the addition in the innermost parantheses is performed first, then the two
sums are multiplied and added to 1.

NOTE

The mathematical order of operations is always multiplication,

division, addition, subtraction.

Parantheses can also be used to call functions such a squares, square root, max,
min, etc. For example,

sqrt(100) = 10

the function (square root) is performed on the number in the parantheses
(100).

Brackets [ ]

Use brackets to recall previously measured features for a formula. For example,

[Circle 1]x

recalls the 'x' value of Circle 1.

A more complex equation might be

sqr([Circle 1]radius)*PI

Here the radius of Circle 1 is squared and multiplied by pi which produces the
area of Circle 1.

This manual is related to the following products: