beautypg.com

14 programming examples, Programming examples – HEIDENHAIN TNC 640 (34059x-05) Cycle programming User Manual

Page 560

background image

Touch Probe Cycles: Automatic Workpiece Inspection

16.14 Programming Examples

16

560

TNC 640 | User's Manual Cycle Programming | 1/2015

16.14

Programming Examples

Example: Measuring and reworking a rectangular
stud

Program sequence

Roughing with 0.5 mm finishing allowance

Measuring

Rectangular stud finishing in accordance with the
measured values

0 BEGIN PGM BEAMS MM
1 TOOL CALL 69 Z

Tool call for roughing

2 L Z+100 R0 FMAX

Retract the tool

3 FN 0: Q1 = +81

Length of rectangle in X (roughing dimension)

4 FN 0: Q2 = +61

Length of rectangle in Y (roughing dimension)

5 CALL LBL 1

Call subprogram for machining

6 L Z+100 R0 FMAX

Retract the tool, change the tool

7 TOOL CALL 99 Z

Call the touch probe

8 TCH PROBE 424 MEAS. RECTAN. OUTS.

Measure the rough-milled rectangle

Q273=+50

;CENTER IN 1ST AXIS

Q274=+50

;CENTER IN 2ND AXIS

Q282=80

;FIRST SIDE LENGTH

Nominal length in X (final dimension)

Q283=60

;2ND SIDE LENGTH

Nominal length in Y (final dimension)

Q261=-5

;MEASURING HEIGHT

Q320=0

;SET-UP CLEARANCE

Q260=+30

;CLEARANCE HEIGHT

Q301=0

;MOVE TO CLEARANCE

Q284=0

;MAX. LIMIT 1ST SIDE

Input values for tolerance checking not required

Q285=0

;MIN. LIMIT 1ST SIDE

Q286=0

;MAX. LIMIT 2ND SIDE

Q287=0

;MIN. LIMIT 2ND SIDE

Q279=0

;TOLERANCE 1ST CENTER

Q280=0

;TOLERANCE 2ND CENTER

Q281=0

;MEASURING LOG

No measuring log transmission

Q309=0

;PGM STOP IF ERROR

Do not output an error message

Q330=0

;TOOL NO.

No tool monitoring

9 FN 2: Q1 = +Q1 - +Q164

Calculate length in X including the measured deviation

10 FN 2: Q2 = +Q2 - +Q165

Calculate length in Y including the measured deviation

11 L Z+100 R0 FMAX

Retract the touch probe, change the tool