Programming and simulating a workpiece

Example task 1338459

1358459-00-a

Selecting the Editor operating mode

NC programs are always programmed in the Editor operating mode.

Requirement

  • It must be possible to select the icon of the operating mode
  • In order to be able to select the Editor operating mode, the control must have already progressed enough during booting that the operating mode icon is no longer dimmed.

Selecting the Editor operating mode

  1. To select the Editor operating mode:
ProgrammingMainIcon

  1. Select the Editor operating mode
  2. The control displays the Editor operating mode and the most recently opened NC program.

Configuring the control's user interface for programming

The Editor operating mode gives you several possibilities for writing an NC program.

 
Tip

The first steps describe the procedure when you are in the Klartext programming mode and the Form column is open.

Opening the Form column

You can open the Form column only if an NC program is open.

  1. To open the Form column:
editForm

  1. Select Form
  2. The control opens the Form column

Creating a new NC program

AS_4_11_7_Datei_Oeffnen_TNC_nc_doc
Open File workspace in the Editor operating mode
  1. To create an NC program in the Editor operating mode:
NewTabIcon-active

  1. Select Add
  2. The control displays the Quick selection and Open File workspaces.
fileIcon-drive

  1. Select the desired drive in the Open File workspace
folderIcon

  1. Select a folder
SF_4_Datei_Oeffnen_Neue_Datei

  1. Select New file

  1. Enter a file name (e.g., 1338459.h)
Ent

  1. Confirm with the ENT key
SF_4_Datei_Oeffnen_Oeffnen

  1. Select Open
  2. The control opens a new NC program and the Insert NC function window for definition of the workpiece blank.

Defining the workpiece blank

For the NC program you can define a workpiece blank that the control then uses for the simulation. When you create an NC program, the control automatically opens the Insert NC function window for workpiece blank definition.

 
Tip

If you close the window without selecting a workpiece blank, you can use the Insert NC function button to select the definition of the workpiece blank.

AS_4_24_11_NCFunktion_Einfuegen_PGM_1339889_BLKFORMQUAD
Insert NC function window for defining the workpiece blank

Defining a cuboid workpiece blank

blkform
Cuboid workpiece blank with minimum point and maximum point

You define a cuboid through a diagonal in space by entering the minimum point and maximum point relative to the active workpiece preset.

 
Tip
  • You can confirm the entries as follows:
  • ENT key
  • Right arrow key
  • Click or tap the next syntax element
  1. To define a cuboid workpiece blank:
ProgramBlkFormCyclIcon

  1. Select BLK FORM QUAD
SF_4_NCFunktion_Einfuegen_Einfuegen

  1. Select Paste
  2. The control inserts the NC block for definition of the workpiece blank.
editForm

  1. Open the Form column

  1. Select the tool axis (e.g., Z)

  1. Confirm your input

  1. Enter the smallest X coordinate (e.g., 0)

  1. Confirm your input

  1. Enter the smallest Y coordinate (e.g., 0)

  1. Confirm your input

  1. Enter the smallest Z coordinate (e.g., -40)

  1. Confirm your input

  1. Enter the largest X coordinate (e.g., 100)

  1. Confirm your input

  1. Enter the largest Y coordinate (e.g., 100)

  1. Confirm your input

  1. Enter the largest Z coordinate (e.g., 0)

  1. Confirm your input
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.
AS_4_24_11-6_Rohteildefinition_PGM_Formular_Z-0-0--40-100-100-0_Kommentar
Form column with the defined columns

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.

0 BEGIN PGM 1339889 MM

1 BLK FORM 0.1 Z X+0 Y+0 Z-40

2 BLK FORM 0.2 X+100 Y+100 Z+0

3 END PGM 1339889 MM

 
Machine

The control’s full range of functions is available only if the Z tool axis is used (e.g., PATTERN DEF).

Restricted use of the tool axes X and Y is possible when prepared and configured by the machine manufacturer.

Structure of an NC program

  • Using a uniform structure for an NC program offers the following advantages:
  • Improved overview
  • Quicker programming
  • Fewer sources of error

Recommended structure for a contouring program

 
Tip

The control automatically inserts the BEGIN PGM and END PGM NC blocks.

  1. BEGIN PGM with selection of the unit of measure
  2. Define the workpiece blank
  3. Call the tool, with the tool axis and the technological data
  4. Move the tool to a safe position, and switch the spindle on
  5. Pre-position the tool in the working plane, near the first contour point
  6. Pre-position the tool in the tool axis, turn coolant on if necessary
  7. Approach the contour, activate tool radius compensation if necessary
  8. Machine the contour
  9. Depart from the contour, turn coolant off
  10. Move the tool to a safe position
  11. Conclude the NC program
  12. END PGM

Contour approach and departure

When you program a contour, you need a starting point and end point outside the contour.

The following positions are necessary for contour approach and departure:

Help graphic

Position

8D000_01

Starting point

  • The following preconditions apply for the starting point:
  • No tool radius compensation
  • Approachable without danger of collision
  • Near to the first contour point

The graphic shows the following information:

If you define the starting point to be in the dark gray area, the contour will be damaged when the first contour point is approached.

8D000_03

Approaching the starting point in the tool axis

Before approaching the first contour point, you must position the tool to the working depth in the tool axis. If there is a danger of collision, approach the starting point in the tool axis separately.

First contour point

The control moves the tool from the starting point to the first contour point.

You need to program tool radius compensation for the tool movement to the first contour point.

8D000_04

End point

  • The following preconditions apply for the end point:
  • Approachable without danger of collision
  • Near to the last contour point
  • In order to make sure that the contour will not be damaged, the optimal ending point should lie on the extended tool path for machining the last contour element

The graphic shows the following information:

If you define the end point to be in the dark gray area, the contour will be damaged when the end point is approached.

8D000_05

Departing from the end point in the tool axis

Program the tool axis separately when departing from the end point.

Identical starting and end points

Do not program any tool radius compensation if the starting point and end point are the same.

In order to make sure that the contour will not be damaged, the optimal starting point should lie between the extended tool paths for machining the first and last contour elements.

Programming a simple contour

beispiel_gerade_fase
Workpiece to be programmed

The following texts show you how to mill once at a depth of 5 mm around the contour shown here. You have already defined the workpiece blank.

Defining the workpiece blank

After you have inserted an NC function, the control shows an explanation about the current syntax element in the dialog bar. You can enter the data directly in the form.

 
Tip

Always write an NC program as if the tool were moving. This makes it irrelevant whether a head axis or a table axis performs the motion.

Calling a tool

AS_4_24_11-6_TOOLCALL_PGM_Formular_T16_S6500
Form column with the syntax elements of the tool call
  1. To call a tool:
ToolCall

  1. Select TOOL CALL

  1. Select Number in the form
  2. Enter the tool number (e.g., 16)

  1. Select the tool axis Z

  1. Select the spindle speed S
  2. Enter the spindle speed (e.g., 6500)
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

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.

3 TOOL CALL 12 Z S6500

 
Machine

The control’s full range of functions is available only if the Z tool axis is used (e.g., PATTERN DEF).

Restricted use of the tool axes X and Y is possible when prepared and configured by the machine manufacturer.

Moving the tool to a safe position

AS_4_24_11-6_L-Bahnfunktion_PGM_Formular_M3
Form column with the syntax elements of a straight line
  1. To move the tool to a safe position:
L

  1. Select the path function L
Z

  1. Select Z
  2. Enter a value (e.g., 250

  1. Select tool radius compensation R0
  2. The control applies R0, which means there is no tool radius compensation.

  1. Select the FMAX feed rate
  2. The control adopts FMAX for rapid traverse.
  3. If needed, enter a miscellaneous function M, such as M3 (turn spindle on)
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

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.

4 L Z+250 R0 FMAX M3

Pre-positioning in the working plane

  1. To pre-position in the working plane:
L

  1. Select the path function L
X

  1. Select X
  2. Enter a value (e.g., –20
Y

  1. Select Y
  2. Enter a value (e.g., –20

  1. Select the FMAX feed rate
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

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.

5 L X-20 Y-20 FMAX

Pre-positioning in the tool axis

  1. To pre-position in the tool axis:
L

  1. Select the path function L
Z

  1. Select Z
  2. Enter a value (e.g., –5

  1. Select the feed rate F
  2. Enter the value for the positioning feed rate (e.g., 3000)

  1. If needed, enter a miscellaneous function M, such as M8 (turn coolant on)
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

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.

6 L Z-5 R0 F3000 M8

Approaching the contour

beispiel_gerade_fase
Workpiece to be programmed
AS_4_24_11-6_CT-Bahnfunktion_PGM_Formular_X5-Y5-R8-RL_F700
Form column with the syntax elements of an approach function
  1. To approach the contour:
ApprDep

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

  1. Select APPR
ProgramApprCtIcon

  1. Select an approach function (e.g., APPR CT)
SF_4_NCFunktion_Einfuegen_Einfuegen

  1. Select Paste
  2. Enter the coordinates of starting point 1 (e.g., X 5 Y 5)

  1. For the center angle CCA, enter the approach angle (e.g., 90)

  1. Enter the radius of the circular arc (e.g., 8

  1. Select RL
  2. The control applies tool radius compensation to the left.

  1. Select the feed rate F
  2. Enter the value for the machining feed rate (e.g., 700)
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

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.

7 APPR CT X+5 Y+5 CCA90 R+8 RL F700

Machining a contour

beispiel_gerade_fase
Workpiece to be programmed
  1. To machine the contour:
L

  1. Select the path function L
  2. Enter the coordinates of contour point 2 that differ (e.g., Y 95)
SF_4_Formular_Bestaetigen

  1. Conclude the NC block with Confirm
  2. The control applies the changed value and retains all of the other information from the previous NC block.
L

  1. Select the path function L
  2. Enter the coordinates of contour point 3 that differ (e.g., X 95)
SF_4_Formular_Bestaetigen

  1. Conclude the NC block with Confirm
Chf

  1. Select the path function CHF
  2. Enter the chamfer width (e.g., 10
SF_4_Formular_Bestaetigen

  1. Conclude the NC block with Confirm
L

  1. Select the path function L
  2. Enter the coordinates of contour point 4 that differ (e.g., Y 5)
SF_4_Formular_Bestaetigen

  1. Conclude the NC block with Confirm
Chf

  1. Select the path function CHF
  2. Enter the chamfer width (e.g., 20
SF_4_Formular_Bestaetigen

  1. Conclude the NC block with Confirm
L

  1. Select the path function L
  2. Enter the coordinates of contour point 1 that differ (e.g., X 5)
SF_4_Formular_Bestaetigen

  1. Conclude the NC block with Confirm

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.

8 L Y+95

9 L X+95

10 CHF 10

11 L Y+5

12 CHF 20

13 L X+5

Departing from the contour

AS_4_24_11-6_DEPCT-Bahnfunktion_PGM_Formular_CCA90-R8-F3000_M9
Form column with the syntax elements of a departure function
  1. To depart from the contour:
ApprDep

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

  1. Select DEP
ProgramDepCtIcon

  1. Select a departure function (e.g., DEP CT)
SF_4_NCFunktion_Einfuegen_Einfuegen

  1. Select Paste

  1. For the center angle CCA, enter the departure angle (e.g., 90)

  1. Enter the departure radius (e.g., 8

  1. Select the feed rate F
  2. Enter the value for the positioning feed rate (e.g., 3000)

  1. If needed, enter a miscellaneous function M, such as M9 (turn coolant off)
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

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.

14 DEP CT CCA90 R+8 F3000 M9

Moving the tool to a safe position

  1. To move the tool to a safe position:
L

  1. Select the path function L
Z

  1. Select Z
  2. Enter a value (e.g., 250

  1. Select tool radius compensation R0

  1. Select the FMAX feed rate
  2. Enter a miscellaneous function M if required
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

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.

15 L Z+250 R0 FMAX M30

Programming a machining cycle

The following texts show you how to mill the circular slot of the example task at a depth of 5 mm. You have already defined the workpiece blank and created the outside contour.

Example task 1338459

After you have inserted a cycle, you can define the associated values in the cycle parameters. You can program the cycle directly in the Form column.

Calling a tool

  1. To call a tool:
ToolCall

  1. Select TOOL CALL

  1. Select Number in the form
  2. Enter the tool number (e.g., 6)

  1. Select the tool axis Z

  1. Select the spindle speed S
  2. Enter the spindle speed (e.g., 6500)
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

16 TOOL CALL 6 Z S6500

Moving the tool to a safe position

AS_4_24_11-6_L-Bahnfunktion_PGM_Formular_M3
Form column with the syntax elements of a straight line
  1. To move the tool to a safe position:
L

  1. Select the path function L
Z

  1. Select Z
  2. Enter a value (e.g., 250

  1. Select tool radius compensation R0
  2. The control applies R0, which means there is no tool radius compensation.

  1. Select the FMAX feed rate
  2. The control adopts FMAX for rapid traverse.
  3. If needed, enter a miscellaneous function M, such as M3 (turn spindle on)
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

17 L Z+250 R0 FMAX M3

Pre-positioning in the working plane

  1. To pre-position in the working plane:
L

  1. Select the path function L
X

  1. Select X
  2. Enter a value (e.g., +50
Y

  1. Select Y
  2. Enter a value (e.g., +50

  1. Select the FMAX feed rate
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block.

18 L X+50 Y+50 FMAX

Defining a cycle

AS_4_24_11-6_Zyklus_254
Form column with possibilities for entering cycle information
  1. To define the circular slot:
CyclDef

  1. Select the CYCL DEF key
  2. The control opens the Insert NC function window.
CyclDef

  1. Select Cycle 254 CIRCULAR SLOT
SF_4_NCFunktion_Einfuegen_Einfuegen

  1. Select Paste
  2. The control inserts the cycle.
editForm

  1. Open the Form column
  2. Enter all input values in the form
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control saves the cycle.

19 CYCL DEF 254 CIRCULAR SLOT ~

Q215=+0

;MACHINING OPERATION ~

Q219=+15

;SLOT WIDTH ~

Q368=+0.1

;ALLOWANCE FOR SIDE ~

Q375=+60

;PITCH CIRCLE DIAMETR ~

Q367=+0

;REF. SLOT POSITION ~

Q216=+50

;CENTER IN 1ST AXIS ~

Q217=+50

;CENTER IN 2ND AXIS ~

Q376=+45

;STARTING ANGLE ~

Q248=+225

;ANGULAR LENGTH ~

Q378=+0

;STEPPING ANGLE ~

Q377=+1

;NR OF REPETITIONS ~

Q207=+500

;FEED RATE MILLING ~

Q351=+1

;CLIMB OR UP-CUT ~

Q201=-5

;DEPTH ~

Q202=+5

;PLUNGING DEPTH ~

Q369=+0.1

;ALLOWANCE FOR FLOOR ~

Q206=+150

;FEED RATE FOR PLNGNG ~

Q338=+5

;INFEED FOR FINISHING ~

Q200=+2

;SET-UP CLEARANCE ~

Q203=+0

;SURFACE COORDINATE ~

Q204=+50

;2ND SET-UP CLEARANCE ~

Q366=+2

;PLUNGE ~

Q385=+500

;FINISHING FEED RATE ~

Q439=+0

;FEED RATE REFERENCE

Moving the tool to a safe position and concluding the NC program

  1. To move the tool to a safe position:
L

  1. Select the path function L
Z

  1. Select Z
  2. Enter a value (e.g., 250

  1. Select tool radius compensation R0

  1. Select the FMAX feed rate
  2. Enter a miscellaneous function M, such as M30 (program end)
SF_4_Formular_Bestaetigen

  1. Select Confirm
  2. The control concludes the NC block and the NC program.

21 L Z+250 R0 FMAX M30

Configuring the control's user interface for simulation

In the Editor operating mode you can test NC programs graphically. The control simulates the active NC program in the Program workspace.

In order to simulate the NC program you must open the Simulation workspace.

 
Tip

For the simulation you can close the Form column to get a better view of the NC program and the Simulation workspace.

Opening the Simulation workspace

You can open additional workspaces in the Editor operating mode only if an NC program is open.

  1. To open the Simulation workspace:
  2. In the application bar, select Workspaces
  3. Select Simulation
  4. The control then additionally displays the Simulation workspace.
 
Tip

You can also open the Simulation workspace with the Test Run operating mode key.

Configuring the Simulation workspace

You can simulate the NC program without needing to enter any special settings. However, an adjustment to the simulation speed is recommended for best viewing of the simulation.

  1. To adjust the speed of the simulation:
  2. Use the slider to select the factor (e.g., 5.0 * T)
  3. The control then performs the subsequent simulation at five times the speed of the programmed feed rate.

If you use different tables, such as tool tables, for program run and the simulation, then you can define the tables in the Simulation workspace.

Simulating an NC program

You test the NC program in the Simulation workspace.

Starting the simulation

AS_4_24_11-12_PGM_1339889_T16_FMAX_Line13
Simulation workspace in the Editor operating mode
  1. To start the simulation:
SimStart_small

  1. Select Start
  2. The control asks whether the file should be saved.
SF_4_Programmieren_Editor_Speichern

  1. Select Save
  2. The control starts the simulation.
  3. The control uses the Control-in-operation symbol to show the simulation status.

Definition

Control-in-operation:
The control uses the Control-in-operation symbol to show the current simulation status in the action bar and on the tab of the NC program:

  • White: no movement command
  • Green: active machining, axes are moving
  • Orange: NC program interrupted
  • Red: NC program stopped