Siemens Program Sample for Probing Holes Using Renishaw Probe

Sample Siemens Program to Probe Holes using Renishaw Probe: 

;90309_010

MSG(" ADVANCEDCNCSOLUTIONS.COM ")

MSG(" CREATED  09-20-11 ")

N10G17G40G64G70G90

N20M40

N50 STOPRE

N60T1

 

; WRITTEN BY ADVANCED CNC SOLUTIONS, A CONTRACT CNC PROGRAMMING PROVIDER

; PROGRAM USES A SIEMENS 840D CONTROL ON A 4-AXIS MACHINING CENTER TO PROBE

:   3 CORED HOLES (USING A CYCLE977 COMMAND) TO ESTABLISH 3 SETS OF X&Y

;   DEVIATIONS FROM NOMINAL X&Y COORDINATES, AND USES THESE DEVIATIONS TO

;   DICTATE X&Y LOCATIONS FOR BORING AND THREAD MILLING OPERATIONS

;

; ALSO DEFINES 4 SETS OF FIXTURE OFFSETS FOR EACH OF THE 90 DEGREE SIDES

;   OF A FIXTURE USING A COMMON XYZ ZERO POINT

 

; THE PROGRAM USES FIXTURE OFFSET G512 FOR B90 SIDE MACHINING

; WHEN SETTING FIXTURE OFFSETS IT IS REFERRED TO AS "12"

;  $P_UIFR[12,X,TR]=.....   = X COMPONENT OF FIXTURE OFFSET

;  $P_UIFR[12,Y,TR]=.....   = Y COMPONENT OF FIXTURE OFFSET

;  $P_UIFR[12,Z,TR]=.....   = Z COMPONENT OF FIXTURE OFFSET

;

; THE PROGRAM USES A SECONDARY FIXTURE OFFSET G522 "22" FOR THE

;   BORING AND THREAD MILLING ON THE B90 INDEX

;  

; THE X Y & Z COMPONENTS OF EACH OF THE OFFSETS USE A "TR"

;   MEANING A "COURSE" OR "TR" FOR TRANSFORMATION OFFSET

;

; OFFSET G522 ALSO USES A X,Y & Z  "FI", MEANING A "FINE" OFFSET

;

; THE SUM OF EACH "TR" AND "FI" PAIR MAKE UP THE TRUE OFFSET IN X,Y OR Z

;   FOR EACH OF THE DEFINED FIXTURE OFFSET VALUES

;

; REGISTERS R1 THROUGH R100 ARE TEMP VARIABLES AND CAN BE USED FREELY BY OPERATORS

;  

; DEVIATIONS ARE STORED IN R1 THROUGH R6:

;   THE PROBED X COORDINATE DEVIATION OF 1ST CORED HOLE IS STORED IN R1

;   THE PROBED Y COORDINATE DEVIATION OF 1ST CORED HOLE IS STORED IN R2

;   ...

;

; EACH HOLE USES A X,Y PAIR OF "R" VALUES: R1,R2  R3,R4  R5,R6

;

; R1 AND R2 VALUES ARE WRITTEN TO THE "FI" VALUE OF THE G522 FIXTURE OFFSET

;   WHEN NEEDED FOR THE 1ST HOLE FOR BORING AND THREAD MILLING OPERATIONS

;   AND LIKEWISE FOR THE RESPECTIVE "R" VALUES FOR THE 2ND AND 3RD HOLES

;

; IMPORTANT NOTE:

; THE PROGRAM MUST RE-STATE THE FIXTURE OFFSET (G522 IN THIS CASE) AFTER

;   ANY "TR" OR "FI" VALUES ARE MODIFIED!!

;  

; SIEMENS 840D CONTROL SUPPORTS PROBING OF:

;   HOLE, BOSS(SHAFT), GROOVE, WEB, RECTANGLE, AND X,Y OR Z EDGE

 

; DEFINE 4+1 SETS OF FIXTURE OFFSETS (B0, B90, B180, B270)

 

; BELOW GROUP DEFINES FIXTURE OFFSET G511 FOR B0 INDEX

MSG("B0 SIDE -- FRONT")

$P_UIFR[11,X,TR]=0

$P_UIFR[11,Y,TR]=5.875

$P_UIFR[11,Z,TR]=1.375

$P_UIFR[11,W,TR]=0

$P_UIFR[11,B,TR]=0

 

MSG("B90 SIDE -- LEFT")

$P_UIFR[12,X,TR]=-1.375

$P_UIFR[12,Y,TR]=5.875

$P_UIFR[12,Z,TR]=0

$P_UIFR[12,W,TR]=0

$P_UIFR[12,B,TR]=0

 

MSG("B180 SIDE -- REAR")

$P_UIFR[13,X,TR]=0

$P_UIFR[13,Y,TR]=5.875

$P_UIFR[13,Z,TR]=-1.375

$P_UIFR[13,W,TR]=0

$P_UIFR[13,B,TR]=0

 

MSG("B270 SIDE -- RIGHT")

$P_UIFR[14,X,TR]=1.375

$P_UIFR[14,Y,TR]=5.875

$P_UIFR[14,Z,TR]=0

$P_UIFR[14,W,TR]=0

$P_UIFR[14,B,TR]=0

 

MSG("B90 SIDE -- LEFT PROBED HOLES")

$P_UIFR[22,X,TR]=-1.375

$P_UIFR[22,Y,TR]=5.875

$P_UIFR[22,Z,TR]=0

$P_UIFR[22,W,TR]=0

$P_UIFR[22,B,TR]=0

N70M01

 

MSG("RENISHAW PROBE * T1")

N80M06T1

MSG("PROBE 16 HOLES")

N90T2

MSG("PROBE 1ST HOLE -- X&Y DEVIATIONS = R1 & R2")

N100G90G0G17G512B90.

N110G58Z6.W-6.

N120G0X1.625Y3.687F50.0

N130Z8.75W0

N140 M50          ; TURN PROBE ON

N150 _SETVAL=1.5  ; CORED HOLE DIA

N160 _MVAR=101    ; PROBE HOLE

N170 _PRNUM=101

N180 _VMS=0

N190 _NMSP=1

N200 _FA=8

N210 _TSA=1

N220 _TZL=0

N230 _KNUM=0

N240G1Z5.9F50.0

N250 CYCLE977     ; PROBE CYCLE

N260 STOPRE

N270Z6.75

N280G0Z8.75

N290 IF $P_SEARCH==0

N300    R1=_OVR[17]   ; STORE X DEVIATION OF 1ST HOLE IN R1

N310    R2=_OVR[18]   ; STORE Y DEVIATION OF 1ST HOLE IN R2

N320 ENDIF

MSG("PROBE 2ND HOLE -- X&Y DEVIATIONS = R3 & R4")

N330G0X5.125Y3.687

N340G1Z5.9F50.0

N350 CYCLE977     ; PROBE CYCLE

N360 STOPRE

N370Z6.75

N380G0Z8.75

N390 IF $P_SEARCH==0

N400    R3=_OVR[17]   ; STORE X DEVIATION OF 2ND HOLE IN R3

N410    R4=_OVR[18]   ; STORE Y DEVIATION OF 2ND HOLE IN R4

N420 ENDIF

MSG("PROBE 3RD HOLE -- X&Y DEVIATIONS = R5 & R6")

N430G0X8.625Y3.687

N440G1Z5.9F50.0

N450 CYCLE977     ; PROBE CYCLE

N460 STOPRE

N470Z6.75

N480G0Z8.75

N490 IF $P_SEARCH==0

N500    R5=_OVR[17]   ; STORE X DEVIATION OF 3RD HOLE IN R5

N510    R6=_OVR[18]   ; STORE Y DEVIATION OF 3RD HOLE IN R6

N520 ENDIF

N530 M51          ; TURN PROBE OFF

N540 TRANS

N550 STOPRE

N560 SUPA G0Z60.W-8.M05

N570M01

 

MSG("2.218 TWIN BORE * T2")

N580M06T2

N590T3

MSG("BORE 1ST HOLE -- X&Y DEVIATIONS = R1 & R2")

N600 IF $P_SEARCH==0

N610    $P_UIFR[22,X,FI]=R1   ; WRITE (R1) X DEVIATION OF 1ST HOLE INTO G522 X FINE OFFSET

N620    $P_UIFR[22,Y,FI]=R2   ; WRITE (R2) Y DEVIATION OF 1ST HOLE INTO G522 Y FINE OFFSET

N630 ENDIF

N640G90G0G17G522B90.

N650G58Z6.W-6.

N660S1260M03M40

N670M07

N680G0X1.625Y3.687F12.0

N690Z8.75W0

N700 MCALL CYCLE81(8.75,6.25,.5,4.85)

N710X1.625Y3.687

N720 MCALL

N730Z7.25

MSG("BORE 2ND HOLE -- X&Y DEVIATIONS = R3 & R4")

N740 IF $P_SEARCH==0

N750    $P_UIFR[22,X,FI]=R3

N760    $P_UIFR[22,Y,FI]=R4

N770 ENDIF

N780G522

N790X5.125Y3.687

N800G0Z8.75

N810 MCALL CYCLE81(8.75,6.25,.5,4.85)

N820X5.125Y3.687

N830 MCALL

N840Z7.25

MSG("BORE 3RD HOLE -- X&Y DEVIATIONS = R5 & R6")

N850 IF $P_SEARCH==0

N860    $P_UIFR[22,X,FI]=R5

N870    $P_UIFR[22,Y,FI]=R6

N880 ENDIF

N890G522

N900X8.625Y3.687

N910G0Z8.75

N920 MCALL CYCLE81(8.75,6.25,.5,4.85)

N930X8.625Y3.687

N940 MCALL

N950M09

N970 TRANS

N980 STOPRE

N990 SUPA G0Z60.W-8.M05

N1000M01

 

; BELOW TOOL USES CUTTER RADIUS COMPENSATION

;   TO CONTROL THREAD PITCH DIAMETER

MSG("2.0 X 11.5 NPT THREADMILL * T3")

N1010L106(3)

N1020T1

Msg("THREADMILL 1ST HOLE -- X&Y DEVIATIONS = R1 & R2")

N1030 IF $P_SEARCH==0

N1040    $P_UIFR[22,X,FI]=R1

N1050    $P_UIFR[22,Y,FI]=R2

N1060 ENDIF

N1070G90G0G17G522B=DC(90)

N1080G58Z6.W-6.

N1090S711M03

N1100M07

N1110G0X1.625Y3.687F12.0

N1120Z8.75W0

N1130Z6.5

N1140G1Z5.4062F50.0

N1150G41G1X1.9102Y3.4018F12.0

N1160G3X2.1954Y3.687Z5.4171I0J.2852F6.0

N1170Z5.504I-.5704J0

N1180X1.9102Y3.9722Z5.5149I-.2852J0

N1190G40G1X1.625Y3.687F12.0

N1200G0Z6.5

N1210Z7.25

Msg("THREADMILL 2ND HOLE -- X&Y DEVIATIONS = R3 & R4")

N1220 IF $P_SEARCH==0

N1230    $P_UIFR[22,X,FI]=R3

N1240    $P_UIFR[22,Y,FI]=R4

N1250 ENDIF

N1260G522

N1270X5.125Y3.687

N1280G0Z8.75

N1290Z6.5

N1300G1Z5.4062F50.0

N1310G41G1X5.4102Y3.4018F12.0

N1320G3X5.6954Y3.687Z5.4171I0J.2852F6.0

N1330Z5.504I-.5704J0

N1340X5.4102Y3.9722Z5.5149I-.2852J0

N1350G40G1X5.125Y3.687F12.0

N1360G0Z6.5

N1370Z7.25

Msg("THREADMILL 3RD HOLE -- X&Y DEVIATIONS = R5 & R6")

N1380 IF $P_SEARCH==0

N1390    $P_UIFR[22,X,FI]=R5

N1400    $P_UIFR[22,Y,FI]=R6

N1410 ENDIF

N1420G522

N1430X8.625Y3.687

N1440G0Z8.75

N1450Z6.5

N1460G1Z5.4062F50.0

N1470G41G1X8.9102Y3.4018F12.0

N1480G3X9.1954Y3.687Z5.4171I0J.2852F6.0

N1490Z5.504I-.5704J0

N1500X8.9102Y3.9722Z5.5149I-.2852J0

N1510G40G1X8.625Y3.687F12.0

N1520G0Z6.5

N1530Z7.25

N1540M09

N1550M97

N1560 TRANS

N1570 STOPRE

N1580 SUPA G0Z60.W-8.M05

N1590M01

 

N1600 STOPRE

N1610 IF $P_SEARCH==0

N1620    $P_UIFR[22,X,FI]=0

N1630    $P_UIFR[22,Y,FI]=0

N1640 ENDIF

 

N1650B=DC(0)

N1660G90

N1670M60

N1680M30

Return to News