• Keine Ergebnisse gefunden

Creating and Writing Programs

Organization of an NC program in HEIDENHAIN conversational format.

A part program consists of a series of program blocks. The figure at right illustrates the elements of a block.

The TNC numbers the blocks in ascending sequence.

The first block of a program is identified by “BEGIN PGM,” the program name and the active unit of measure.

The subsequent blocks contain information on:

■The blank form:

■tool definitions and tool calls,

■Feed rates and spindle speeds as well as

■Path contours, cycles and other functions

The last block of a program is identified by “END PGM,” the pro-gram name and the active unit of measure.

Defining the blank form — BLK FORM

Immediately after initiating a new program, you define a cuboid workpiece blank. This definition is needed for the TNC’s graphic simulation feature. The sides of the workpiece blank lie parallel to the X, Y and Z axes and can be up to 30 000 mm long. The blank form is defined by two of its corner points:

■MIN point: the smallest X, Y and Z coordinates of the blank form, entered as absolute values.

■MAX point: the largest X, Y and Z coordinates of the blank form, entered as absolute or incremental values.

The TNC can display the graphic only if the short side of the BLK FORM is longer than 1/64 of the long side.

4.3 Cr eating and W riting Pr ogr ams

Y

X Z

MAX

MIN Block:

10 L X+10 Y+5 R0 F100 M3

Path function Words Block number

35 HEIDENHAIN TNC 310

Creating a new part program

You always enter a part program in the Programming and Editing mode of operation.

Program initiation in an example:

Select the Programming and Editing mode of operation.

<

Call up the file manager: Press the PGM NAME soft key

File name =

<

3056 Enter the new program number and confirm your entry with the ENT key.

File name = 3056.H

<

Select the default setting for unit of measurement (mm): Press the ENT key, or

Switch to inches: Press the MM/INCH soft key and confirm with ENT.

4.3 Cr eating and W riting Pr ogr ams

36 4 Programming: Fundamentals of NC, File Management, Programming Aids

Define the blank

Open the dialog for blank definition: Press the BLK FORM soft key

Working spindle axis X/Y/Z ?

<

Enter the spindle axis.

Def BLK FORM: Min corner?

<

0 Enter in sequence the X, Y and Z coordinates of the MIN point.

0 -40

Def BLK FORM: Max-corner?

<

100 Enter in sequence the X, Y and Z coordinates of the MAX point.

100 0

The program blocks window shows the following BLK FORM definition

0 BEGIN PGM 3056 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 3056 MM

The TNC automatically generates the block numbers as well as the BEGIN and END blocks.

Program begin, name, unit of measure Tool axis, MIN point coordinates MAX point coordinates

Program end, name, unit of measure

4.3 Cr eating and W riting Pr ogr ams

37 HEIDENHAIN TNC 310

Programming tool movements in conversational format

To program a block, initiate the dialog by pressing a soft key. In the screen headline, the TNC then asks you for all the information necessary to program the desired function.

Example of a dialog

Initiate the dialog.

Coordinates ?

<

10 Enter the target coordinate for the X axis.

<

5 Enter the target coordinate for the Y axis, and go to the next question with ENT.

Radius comp. RL/RR/no comp. ?

<

Enter “No radius compensation” and go to the next question with ENT.

Feed rate ? F=

<

100 Enter a feed rate of 100 mm/min for this path contour; go to the next question with ENT.

Miscellaneous function M ?

<

3 Enter the miscellaneous function M3 “spindle ON”; pressing the ENT key will terminate this dialog.

The program blocks window will display the following line:

3 L X+10 Y+5 R0 F100 M3

Functions during the dialog Key Ignore the dialog question

End the dialog immediately

Abort the dialog and erase the block

4.3 Cr eating and W riting Pr ogr ams

38 4 Programming: Fundamentals of NC, File Management, Programming Aids Editing program lines

While you are creating or editing a part program, you can select any desired line in the program or individual words in a block with the arrow keys (see table at top right).

Scrolling through the program úPress the GOTO key

úEnter the block number and confirm with ENT, and the TNC will go to the indicated block, or

úPress one of the superimposed soft keys to scroll to another page (see table at top right.)

Looking for the same words in different blocks

To select a word in a block, press the arrow keys repeatedly until the highlight is on the desired word.

Select a block with the arrow keys.

The word that is highlighted in the new block is the same as the one you selected previously.

Inserting blocks at any desired location

úSelect the block after which you want to insert a new block and initiate the dialog.

Inserting the previously edited (deleted) block at any location úSelect the block after which you want to insert the block you have

just edited (deleted.)

úIf you wish to insert a block you have stored in the buffer memory, press the soft key INSERT NC BLOCK

Editing and inserting words

úSelect a word in a block and overwrite it with the new one. The plain-language dialog is available while the word is highlighted.

úTo accept the change, press the END key.

If you want to insert a word, press the horizontal arrow keys repeatedly until the desired dialog appears. You can then enter the desired value.

Selecting blocks or words Soft keys/keys Move from one block to the next

Select individual words in a block

Go to the previous page Go to the next page Jump to beginning of program Jump to beginning End

Erasing blocks and words Key Set the value of the selected word to zero

Erase an incorrect number

Clear a (non-blinking) error message Delete the selected word

Delete the selected block (cycle) Delete the program sections:

First select the last block of the program section to be erased, then erase with the DEL key.

4.3 Cr eating and W riting Pr ogr ams

39 HEIDENHAIN TNC 310