Basic arithmetic folder

Application

In the Basic arithmetic folder of the Insert NC function window, the control offers the functions FN 0 to FN 5.

You can assign numeric values to variables using the FN 0 function. You then use a variable instead of the fixed number in the NC program. You can also use pre-assigned variables, e.g. results from touch probe cycles. With the functions FN 1 to FN 5, you can make calculations with the variable values within the NC program.

Description of function

The Basic arithmetic folder contains the following functions:

Icon

Function

ProgramFn0Icon

FN 0: ASSIGN
e. g., FN 0: Q5 = +60
Directly assign value
Reset Q parameter value

ProgramFn1Icon

FN 1: ADDITION
e. g., FN 1: Q1 = -Q2 + -5
Calculate and assign the sum of two values

ProgramFn2Icon

FN 2: SUBTRACTION
e. g. FN 2: Q1 = +10 - +5
Form and assign difference between two values

ProgramFn3Icon

FN 3: MULTIPLICATION
e. g. FN 3: Q2 = +3 * +3
Form and assign the product of two values

ProgramFn4Icon

FN 4: DIVISION e.g., FN 4: Q4 = +8 DIV +Q2 Calculate and assign the quotient of two values Not permitted: Division by 0

ProgramFn5Icon

FN 5: SQUARE ROOT e.g., FN 5: Q20 = SQRT 4 Calculate and assign the square root of a value Not permitted: Square root of a negative value

To the left of the = sign, you define the variable to which you assign the value or result.

To the right of the = sign, you can use fixed or variable values.

The variables and numerical values in the equations can be entered with an algebraic sign.

Part families

For part families, you program the characteristic workpiece dimensions as variables, for example. To process the individual parts, assign a corresponding numerical value to each variable.

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

  • Change the following contents as needed:
  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions, e.g. with M91
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

11 LBL "Z1"

12 FN 0: Q1=30

; Assignment, Q1 contains the value 30

13 FN 0: Q2=10

; Assignment, Q2 contains the value 10

* - ...

21 L X +Q1

; Corresponds to L X +30

Example: Cylinder with Q parameters

8H000170

Cylinder radius:

R = Q1

Cylinder height:

H = Q2

Cylinder Z1:

Q1 = +30
Q2 = +10

Cylinder Z2:

Q1 = +10
Q2 = +50

Setting a variable to undefined

  1. To set a variable to the undefined status:
SF_4_NCFunktion_Einfuegen

  1. Select Insert NC function
  2. The control opens the Insert NC function window.

  1. Select FN 0
  2. Enter the number of the variable, e.g. Q5
  3. Select SET UNDEFINED

  1. Confirm your input
  2. The control sets the variable to the undefined status.

Notes

  • The control distinguishes between undefined variables and variables with the value 0.
  • You cannot divide by 0 (FN 4).
  • You cannot extract a square root from a negative value (FN 5).