%_N_UGUD_DEF(定义全局变量) ;$PATH=/_N_DEF_DIR def nck real renc[50] def nck real rene[20] def nck real renp[66] def nck axis axv[5]
DEF NCK STRING[32] RENTL m17
%_N_L9700_SPF
;$PATH=/_N_SPF_DIR
; RENISHAW ERROR MESSAGE ; 40140358.0A STOPRE
CASE(RENP[4]) OF 1 GOTOF LN1 2 GOTOF LN2 3 GOTOF LN3 4 GOTOF LN4 STOPRE LN1:
L9701; ENGLISH GOTOF END LN2:
L9702; GERMAN GOTOF END LN3:
L9703; FRENCH LN4: END: RET
%_N_L9701_SPF
;$PATH=/_N_SPF_DIR
; RENISHAW ERROR MESSAGE IN ENGLISH STOPRE
CASE(RENC[15]) OF 500 GOTOF LN500 510 GOTOF LN510 520 GOTOF LN520 CASE(RENC[15]) OF 530 GOTOF LN530 540 GOTOF LN540 550 GOTOF LN550 CASE(RENC[15]) OF 560 GOTOF LN560 DEFAULT GOTOF LN1000 LN500: MSG(\STOPRE M00
GOTOF END
LN510: MSG(\STOPRE M00
GOTOF END
LN520: MSG(\STOPRE M00
GOTOF END
LN530: MSG(\STOPRE M00
GOTOF END
LN540: MSG(\STOPRE M00
GOTOF END
LN550: MSG(\STOPRE M00
GOTOF END
LN560: MSG(\STOPRE M00
GOTOF END ;
LN1000:
L9800; CLEAR INPUTS
CASE(RENC[15]) OF 40 GOTOF LN40 50 GOTOF LN50 60 GOTOF LN60 CASE(RENC[15]) OF 70 GOTOF LN70 80 GOTOF LN80 90 GOTOF LN90
CASE(RENC[15]) OF 100 GOTOF LN100 110 GOTOF LN110 120 GOTOF LN120 CASE(RENC[15]) OF 130 GOTOF LN130 140 GOTOF LN140 150 GOTOF LN150 CASE(RENC[15]) OF 160 GOTOF LN160 170 GOTOF LN170 180 GOTOF LN180 CASE(RENC[15]) OF 190 GOTOF LN190 200 GOTOF LN200 210 GOTOF LN210 CASE(RENC[15]) OF 220 GOTOF LN220 230 GOTOF LN230 240 GOTOF LN240 CASE(RENC[15]) OF 250 GOTOF LN250 260 GOTOF LN260 270 GOTOF LN270 CASE(RENC[15]) OF 280 GOTOF LN280 290 GOTOF LN290 300 GOTOF LN300 CASE(RENC[15]) OF 310 GOTOF LN310 320 GOTOF LN320 330 GOTOF LN330 CASE(RENC[15]) OF 340 GOTOF LN340 350 GOTOF LN350 360 GOTOF LN360 CASE(RENC[15]) OF 365 GOTOF LN365 370 GOTOF LN370 380 GOTOF LN380 CASE(RENC[15]) OF 390 GOTOF LN390 400 GOTOF LN400 LN5: STOPRE M00
GOTOB LN5
LN40: MSG(\STOPRE M00
GOTOB LN40
LN50: MSG(\STOPRE M00
GOTOB LN50
LN60: MSG(\STOPRE M00
GOTOB LN60
LN70: MSG(\STOPRE M00
GOTOB LN70
LN80: MSG(\STOPRE M00
GOTOB LN80
LN90: MSG(\STOPRE M00
GOTOB LN90
LN100: MSG(\STOPRE M00
GOTOB LN100
LN110: MSG(\STOPRE M00
GOTOB LN110
LN120: MSG(\STOPRE M00
GOTOB LN120
LN130: MSG(\STOPRE M00
GOTOB LN130
LN140: MSG(\STOPRE M00
GOTOB LN140
LN150: MSG(\STOPRE M00
GOTOB LN150
LN160: MSG(\STOPRE M00
GOTOB LN160
LN170: MSG(\STOPRE M00
GOTOB LN170
LN180: MSG(\STOPRE M00
GOTOB LN180
LN190: MSG(\STOPRE M00
GOTOB LN190
LN200: MSG(\STOPRE M00
GOTOB LN200
LN210: MSG(\STOPRE M00
GOTOB LN210
LN220: MSG(\STOPRE M00
GOTOB LN220
LN230: MSG(\STOPRE M00
GOTOB LN230
LN240: MSG(\STOPRE M00
GOTOB LN240
LN250: MSG(\STOPRE M00
GOTOB LN250
LN260: MSG(\STOPRE M00
GOTOB LN260
LN270: MSG(\STOPRE M00
GOTOB LN270
LN280: MSG(\STOPRE M00
GOTOB LN280
LN290: MSG(\STOPRE M00
GOTOB LN290
LN300: MSG(\STOPRE M00
GOTOB LN300
LN310: MSG(\STOPRE M00
GOTOB LN310
LN320: MSG(\STOPRE M00
GOTOB LN320
LN330: MSG(\STOPRE M00
GOTOB LN330
LN340: MSG(\STOPRE M00
GOTOB LN340
LN350: MSG(\STOPRE M00
GOTOB LN350
LN360: MSG(\STOPRE M00
GOTOB LN360
LN365: MSG(\STOPRE M00
GOTOB LN365
LN370: MSG(\STOPRE M00
GOTOB LN370
LN380: MSG(\STOPRE M00
GOTOB LN380
LN390: MSG(\STOPRE M00
GOTOB LN390
LN400: MSG(\STOPRE M00
GOTOB LN400 END: STOPRE MSG(\STOPRE RET
%_N_L9702_SPF
;$PATH=/_N_SPF_DIR
; RENISHAW FEHLERMELDUNGEN IN DEUTSCH STOPRE
CASE(RENC[15]) OF 500 GOTOF LN500 510 GOTOF LN510 520 GOTOF LN520 CASE(RENC[15]) OF 530 GOTOF LN530 540 GOTOF LN540 550 GOTOF LN550 CASE(RENC[15]) OF 560 GOTOF LN560 DEFAULT GOTOF LN1000 LN500: MSG(\STOPRE M00
GOTOF END
LN510: MSG(\STOPRE M00
GOTOF END
LN520: MSG(\STOPRE M00
GOTOF END
LN530: MSG(\STOPRE M00
GOTOF END
LN540: MSG(\STOPRE M00
GOTOF END
LN550: MSG(\STOPRE M00
GOTOF END
LN560: MSG(\STOPRE M00
GOTOF END ;
LN1000:
L9800; LOESCHE EINGABEN
CASE(RENC[15]) OF 40 GOTOF LN40 50 GOTOF LN50 60 GOTOF LN60 CASE(RENC[15]) OF 70 GOTOF LN70 80 GOTOF LN80 90 GOTOF LN90
CASE(RENC[15]) OF 100 GOTOF LN100 110 GOTOF LN110 120 GOTOF LN120 CASE(RENC[15]) OF 130 GOTOF LN130 140 GOTOF LN140 150 GOTOF LN150 CASE(RENC[15]) OF 160 GOTOF LN160 170 GOTOF LN170 180 GOTOF LN180 CASE(RENC[15]) OF 190 GOTOF LN190 200 GOTOF LN200 210 GOTOF LN210 CASE(RENC[15]) OF 220 GOTOF LN220 230 GOTOF LN230 240 GOTOF LN240 CASE(RENC[15]) OF 250 GOTOF LN250 260 GOTOF LN260 270 GOTOF LN270 CASE(RENC[15]) OF 280 GOTOF LN280 290 GOTOF LN290 300 GOTOF LN300 CASE(RENC[15]) OF 310 GOTOF LN310 320 GOTOF LN320 330 GOTOF LN330 CASE(RENC[15]) OF 340 GOTOF LN340 350 GOTOF LN350 360 GOTOF LN360 CASE(RENC[15]) OF 365 GOTOF LN365 370 GOTOF LN370 380 GOTOF LN380 CASE(RENC[15]) OF 390 GOTOF LN390 400 GOTOF LN400 LN5: STOPRE M00
GOTOB LN5
LN40: MSG(\STOPRE M00
GOTOB LN40
LN50: MSG(\STOPRE M00
GOTOB LN50
LN60: MSG(\STOPRE M00
GOTOB LN60
LN70: MSG(\STOPRE M00
GOTOB LN70
LN80: MSG(\STOPRE M00
GOTOB LN80
LN90: MSG(\STOPRE M00
GOTOB LN90
LN100: MSG(\STOPRE M00
GOTOB LN100
LN110: MSG(\STOPRE M00
GOTOB LN110
LN120: MSG(\STOPRE M00
GOTOB LN120
LN130: MSG(\STOPRE
M00
GOTOB LN130
LN140: MSG(\STOPRE M00
GOTOB LN140
LN150: MSG(\STOPRE M00
GOTOB LN150
LN160: MSG(\STOPRE M00
GOTOB LN160
LN170: MSG(\STOPRE M00
GOTOB LN170
LN180: MSG(\STOPRE M00
GOTOB LN180
LN190: MSG(\STOPRE M00
GOTOB LN190
LN200: MSG(\STOPRE M00
GOTOB LN200
LN210: MSG(\STOPRE M00
GOTOB LN210
LN220: MSG(\STOPRE M00
GOTOB LN220
LN230: MSG(\STOPRE M00
GOTOB LN230
LN240: MSG(\STOPRE M00
GOTOB LN240
LN250: MSG(\STOPRE M00
GOTOB LN250
LN260: MSG(\STOPRE M00
GOTOB LN260
LN270: MSG(\STOPRE
M00
GOTOB LN270
LN280: MSG(\STOPRE M00
GOTOB LN280
LN290: MSG(\STOPRE M00
GOTOB LN290
LN300: MSG(\STOPRE M00
GOTOB LN300
LN310: MSG(\STOPRE M00
GOTOB LN310
LN320: MSG(\STOPRE M00
GOTOB LN320
LN330: MSG(\STOPRE M00
GOTOB LN330
LN340: MSG(\STOPRE M00
GOTOB LN340
LN350: MSG(\STOPRE M00
GOTOB LN350
LN360: MSG(\STOPRE M00
GOTOB LN360
LN365: MSG(\STOPRE M00
GOTOB LN365
LN370: MSG(\STOPRE M00
GOTOB LN370
LN380: MSG(\STOPRE M00
GOTOB LN380
LN390: MSG(\STOPRE M00
GOTOB LN390
LN400: MSG(\STOPRE
M00
GOTOB LN400 END: STOPRE MSG(\STOPRE RET
%_N_L9710_SPF
;$PATH=/_N_SPF_DIR
PROC L9710(REAL _XX,REAL _YY,REAL _ZZ,REAL _FF) ; REN PROBE MOVE
IF _XX<>9999 GOTOF LN1 _XX=$AA_IW[AXV[1]] LN1:
IF _YY<>9999 GOTOF LN2 _YY=$AA_IW[AXV[2]] LN2:
IF _ZZ<>9999 GOTOF LN3 _ZZ=$AA_IW[AXV[3]] LN3:
RENC[49]=1; PROBE OPEN
IF $A_PROBE[ABS(RENP[7])]==1 GOTOF LN4 STOPRE
MEAS=RENP[7] G1 AX[AXV[1]]=_XX AX[AXV[2]]=_YY AX[AXV[3]]=_ZZ F=_FF STOPRE
RENC[49]=2; PROBE FAIL
IF $AC_MEA[ABS(RENP[7])]==0 GOTOF LN4 RENC[49]=0; NORMAL HIT LN4: STOPRE RET
%_N_L9721_SPF
;$PATH=/_N_SPF_DIR
PROC L9721(REAL _DD,REAL _QQ,REAL _RR,REAL _ZZ,REAL _SS) EXTERN L9726(REAL,REAL,REAL,REAL,REAL,REAL,REAL) EXTERN L9710(REAL,REAL,REAL,REAL) DEF REAL _REN[33] ; REN X DIAM
_REN[1]=$AA_IW[AXV[1]] _REN[2]=$AA_IW[AXV[3]] IF _ZZ==9999 GOTOF LN15
_REN[30]=RENP[0]*RENC[29]/RENC[7] IF _RR>0 GOTOF LN1
_REN[30]=-RENP[0]*RENC[29]/RENC[7] LN1:
_REN[32]=_DD/2+_REN[30]+_RR
L9710(_REN[1]-_REN[32],9999,9999,RENC[19]); PROTECT MOVE IF RENC[49]<>2 GOTOF LN3
L9710(9999,9999,_ZZ,RENC[19]*.6); PROTECT MOVE IF RENC[49]<>2 GOTOF LN3 LN15:
L9726(9999,9999,_REN[1]-_DD/2,9999,9999,_QQ,_SS); X MEASURE
G0 AX[AXV[3]]=_REN[2] AX[AXV[1]]=_REN[1]
IF RENC[49]<>0 GOTOF LN4 RENC[27]=RENC[24]
IF _ZZ==9999 GOTOF LN2
L9710(_REN[1]+_REN[32],9999,9999,RENC[19]); PROTECT MOVE IF RENC[49]<>2 GOTOF LN3
L9710(9999,9999,_ZZ,RENC[19]*.6); PROTECT MOVE IF RENC[49]<>2 GOTOF LN3 LN2:
L9726(9999,9999,_REN[1]+_DD/2,9999,9999,_QQ,_SS); X MEASURE G0 AX[AXV[3]]=_REN[2] IF RENC[49]<>0 GOTOF LN4
RENC[27]=(RENC[27]+RENC[24])/2 GOTOF LN4 LN3:
RENC[49]=1 LN4:
G0 AX[AXV[3]]=_REN[2] AX[AXV[1]]=_REN[1] STOPRE RET
%_N_L9722_SPF
;$PATH=/_N_SPF_DIR
PROC L9722(REAL _DD,REAL _QQ,REAL _RR,REAL _ZZ,REAL _SS) EXTERN L9726(REAL,REAL,REAL,REAL,REAL,REAL,REAL) EXTERN L9710(REAL,REAL,REAL,REAL) DEF REAL _REN[33] ; REN Y DIAM
_REN[1]=$AA_IW[AXV[2]] _REN[2]=$AA_IW[AXV[3]] IF _ZZ==9999 GOTOF LN15
_REN[30]=RENP[0]*RENC[29]/RENC[7] IF _RR>0 GOTOF LN1
_REN[30]=-RENP[0]*RENC[29]/RENC[7] LN1:
_REN[32]=_DD/2+_REN[30]+_RR
L9710(9999,_REN[1]-_REN[32],9999,RENC[19]); PROTECT MOVE IF RENC[49]<>2 GOTOF LN3
L9710(9999,9999,_ZZ,RENC[19]*.6); PROTECT MOVE IF RENC[49]<>2 GOTOF LN3 LN15:
L9726(9999,9999,9999,_REN[1]-_DD/2,9999,_QQ,_SS); Y MEASURE G0 AX[AXV[3]]=_REN[2] AX[AXV[2]]=_REN[1]
IF RENC[49]<>0 GOTOF LN4 RENC[28]=RENC[25]
IF _ZZ==9999 GOTOF LN2
L9710(9999,_REN[1]+_REN[32],9999,RENC[19]); PROTECT MOVE IF RENC[49]<>2 GOTOF LN3
L9710(9999,9999,_ZZ,RENC[19]*.6); PROTECT MOVE IF RENC[49]<>2 GOTOF LN3 LN2:
L9726(9999,9999,9999,_REN[1]+_DD/2,9999,_QQ,_SS); Y MEASURE
G0 AX[AXV[3]]=_REN[2] IF RENC[49]<>0 GOTOF LN4
RENC[28]=(RENC[28]+RENC[25])/2 GOTOF LN4 LN3:
RENC[49]=1 LN4:
G0 AX[AXV[3]]=_REN[2] AX[AXV[2]]=_REN[1] STOPRE RET
%_N_L9723_SPF
;$PATH=/_N_SPF_DIR ; REN ACT OFFSET STOPRE
RENC[16]=$P_TOOLL[1]*RENC[29]/RENC[7]; INC LEN, BASE, WEAR RENC[16]=0 STOPRE RET
%_N_L9724_SPF
;$PATH=/_N_SPF_DIR ; SETTINGS
RENC[7]=1; METRIC UNITS
;RENC[7]=1/25.4 ;INCH UNITS RENC[20]=1; SELECT OPTIONS RENC[14]=0; TOOL MANAGEMENT RENP[8]=3; PROBE AXIS G90G40
; ASSIGN AXIS ADDRESS
CASE(ABS(RENP[8])) OF 1 GOTOF PAX1 2 GOTOF PAX2 3 GOTOF PAX3 RENC[15]=400 L9700; ALARM AXIS PAX1: AXV[1]=Z AXV[2]=X AXV[3]=Y GOTOF PEND
PAX2: AXV[1]=Y AXV[2]=Z AXV[3]=X GOTOF PEND
PAX3: AXV[1]=X AXV[2]=Y AXV[3]=Z PEND:
;SET TOOL NUMBER
IF RENTL==\
R32=R20;STORE T NUMBER AS EDGE IF R32<=9 GOTOF LN1 STOPRE R32=1 LN1: STOPRE
R20=GETT(RENTL,RENC[14]) GOTOF LN3 LN2:
IF R20==9999 GOTOF LN3 STOPRE
R32=R20-TRUNC(R20) R32=ROUND(R32*10)
IF R32<>0 GOTOF LN3 STOPRE R32=1 LN3:
; INCH/METRIC
IF ($P_GG[13]==1)OR($P_GG[13]==3);G70/G700 INCH MODE RENC[29]=1/25.4 RENC[19]=200 G700
ELSE;IF ($P_GG[13]==2)OR($P_GG[13]==4);G71/G710 METRIC MODE RENC[29]=1 RENC[19]=5000 G710 ENDIF
IF (RENP[6]<=0) OR (RENP[6]>1) RENP[6]=.1 ELSE ENDIF STOPRE RET
%_N_L9725_SPF
;$PATH=/_N_SPF_DIR DEF INT CNT=35 ; OUTPUT CLEAR LN1:
RENC[CNT]=9999 CNT=CNT+1
IF CNT<=49 GOTOB LN1 STOPRE RET
%_N_L9726_SPF
;$PATH=/_N_SPF_DIR
PROC L9726(REAL _AA,REAL _DD,REAL _XX,REAL _YY,REAL _ZZ,REAL _QQ,REAL _SS) EXTERN L9710(REAL,REAL,REAL,REAL) DEF REAL _REN[33] ;REN XYZ BASIC MOVE IF _QQ<>9999 GOTOF LN1 _QQ=5*RENC[29] LN1:
IF _DD==9999 GOTOF LN2 ; A D INPUT XY PLANE ONLY
_XX=$AA_IW[AXV[1]]+((_DD/2)*COS(_AA)) _YY=$AA_IW[AXV[2]]+((_DD/2)*SIN(_AA)) _ZZ=$AA_IW[AXV[3]];-RENC[16] LN2:
_REN[31]=8*RENP[6]*RENC[29]; BACK OFF RENC[49]=0
_REN[1]=$AA_IW[AXV[1]] IF _XX<>9999 GOTOF LN3 _XX=_REN[1] LN3:
_REN[2]=$AA_IW[AXV[2]] IF _YY<>9999 GOTOF LN4 _YY=_REN[2]
LN4:
_REN[3]=$AA_IW[AXV[3]];-RENC[16] IF _ZZ<>9999 GOTOF LN5 _ZZ=_REN[3] LN5:
; CALC NRML DIR VEC _REN[11]=_XX-_REN[1] _REN[12]=_YY-_REN[2] _REN[13]=_ZZ-_REN[3]
_REN[10]=SQRT((_REN[11]*_REN[11])+(_REN[12]*_REN[12])+(_REN[13]*_REN[13])) IF _REN[10]==0 GOTOF LN6; NO MOVE _REN[11]=_REN[11]/_REN[10] _REN[12]=_REN[12]/_REN[10] _REN[13]=_REN[13]/_REN[10] ; CALC TARGET POS.
_REN[14]=_XX+(_QQ*_REN[11]) _REN[15]=_YY+(_QQ*_REN[12]) _REN[16]=_ZZ+(_QQ*_REN[13])
L9710(_REN[14],_REN[15],_REN[16],RENC[19]*0.6) CASE(RENC[49]) OF 1 GOTOF LN6 2 GOTOF LN7 ; CALC BACK OFF POS.
_REN[21]=$AA_MW[AXV[1]]-(_REN[31]*_REN[11]) _REN[22]=$AA_MW[AXV[2]]-(_REN[31]*_REN[12])
_REN[23]=$AA_MW[AXV[3]]-(_REN[31]*_REN[13]);-RENC[16]
G1 AX[AXV[1]]=_REN[21] AX[AXV[2]]=_REN[22] AX[AXV[3]]=_REN[23] F=RENC[19]; BACK OFF STOPRE
G4F.3; DWELL MP700 STOPRE
L9710(_REN[14],_REN[15],_REN[16],100*RENC[29]) CASE(RENC[49]) OF 1 GOTOF LN6 2 GOTOF LN7 RENC[49]=0; NRML MEAS RENC[24]=$AA_MW[AXV[1]] RENC[25]=$AA_MW[AXV[2]] RENC[26]=$AA_MW[AXV[3]] GOTOF LN8 LN6:
RENC[49]=1
RENC[24]=_REN[1] RENC[25]=_REN[2] RENC[26]=_REN[3] GOTOF LN8 LN7:
RENC[49]=2
RENC[24]=_REN[14] RENC[25]=_REN[15] RENC[26]=_REN[16] LN8:
G1 AX[AXV[1]]=_REN[1] AX[AXV[2]]=_REN[2] AX[AXV[3]]=_REN[3] F=RENC[19] STOPRE RET
%_N_L9731_SPF
;$PATH=/_N_SPF_DIR
PROC L9731(REAL _AA,REAL _YY,REAL _XX) DEF REAL _REN[33]
; REN RENP[9] LOAD/ATAN IF _XX<>9999 GOTOF LN6
_REN[3]=ROUND(_AA/30); ANG NO _REN[4]=0; COUNT _REN[5]=0 LN1:
IF _REN[5]==1 GOTOF LN2 RENP[9]=RENP[0] _REN[5]=1 GOTOF LN3 LN2:
RENP[9]=RENP[1] _REN[5]=0 LN3:
IF _REN[4]>12 GOTOF LN4
IF ABS(_REN[3])==_REN[4] GOTOF LN10 _REN[4]=_REN[4]+3 GOTOB LN1 LN4:
IF _REN[3]<0 GOTOF LN5
RENP[9]=RENP[9+_REN[3]-(TRUNC(_REN[3]/3)*1)] GOTOF LN10 LN5:
RENP[9]=RENP[9+12+_REN[3]-(TRUNC((12+_REN[3])/3)*1)] GOTOF LN10 LN6:
_XX=(ROUND(_XX*10000))/10000 _YY=(ROUND(_YY*10000))/10000 IF _XX<>0 GOTOF LN7 RENC[18]=90
IF _YY >= 0 GOTOF LN10 RENC[18]=-90 GOTOF LN10 LN7:
IF _YY<>0 GOTOF LN8 RENC[18]=0
IF _XX >= 0 GOTOF LN10 RENC[18]=180 GOTOF LN10 LN8:
RENC[18]=ATAN2(ABS(_YY),ABS(_XX)) IF _XX >= 0 GOTOF LN9 RENC[18]=180-RENC[18] LN9:
IF _YY >= 0 GOTOF LN10 RENC[18]=-RENC[18] LN10: STOPRE RET
%_N_L9732_SPF
;$PATH=/_N_SPF_DIR
PROC L9732(REAL _TT,REAL _DD,REAL _CC,REAL _ZZ,REAL _SS,REAL _WW) DEF REAL _REN[33] ; REN OFFSET TYPE
IF _WW==1 GOTOF LN20 ; UPDATE LENGTH
IF _ZZ==9999 GOTOF LN10 ; LEN GEOM
;$TC_DP3[TRUNC(_TT),_DD]=$TC_DP3[TRUNC(_TT),_DD]-_CC ; LEN WEAR
$TC_DP12[TRUNC(_TT),_DD]=$TC_DP12[TRUNC(_TT),_DD]-_CC GOTOF LN50 LN10:
; RAD GEOM
;$TC_DP6[TRUNC(_TT),_DD]=$TC_DP6[TRUNC(_TT),_DD]-_CC ; RAD WEAR
$TC_DP15[TRUNC(_TT),_DD]=$TC_DP15[TRUNC(_TT),_DD]-_CC ; RAD
RENC[18]=$TC_DP6[TRUNC(_TT),_DD]+$TC_DP15[TRUNC(_TT),_DD] GOTOF LN50 LN20:
IF _SS==9999 GOTOF LN50 ; ZERO OFFSETS UPDATE
_REN[4]=$P_UIFR[$P_UIFRNUM,AXV[1],TR]; CURRENT ZERO OFFSET _REN[5]=$P_UIFR[$P_UIFRNUM,AXV[2],TR] _REN[6]=$P_UIFR[$P_UIFRNUM,AXV[3],TR] IF RENC[40]==9999 GOTOF LN30 IF _SS==1000 GOTOF LN25 IF _SS>=0 GOTOF LN22
$P_UIFR[ABS(_SS),AXV[1],TR]=_REN[4]+RENC[35]; SET TO PROGRAM ZERO GOTOF LN30 LN22:
$P_UIFR[ABS(_SS),AXV[1],TR]=_REN[4]+RENC[40]; SET TO PROGRAM POSITION GOTOF LN30 LN25:
_REN[4]=$P_UBFR[AXV[1],TR]
$P_UBFR[AXV[1],TR]=_REN[4]+RENC[40];SET BASE ZERO LN30:
IF RENC[41]==9999 GOTOF LN40 IF _SS==1000 GOTOF LN35 IF _SS>=0 GOTOF LN32
$P_UIFR[ABS(_SS),AXV[2],TR]=_REN[5]+RENC[36]; SET TO PROGRAM ZERO GOTOF LN40 LN32:
$P_UIFR[ABS(_SS),AXV[2],TR]=_REN[5]+RENC[41]; SET TO PROGRAM POSITION GOTOF LN40 LN35:
_REN[5]=$P_UBFR[AXV[2],TR]
$P_UBFR[AXV[2],TR]=_REN[5]+RENC[41];SET BASE ZERO LN40:
IF _ZZ==9999 GOTOF LN50
IF RENC[42]==9999 GOTOF LN50 IF _SS==1000 GOTOF LN45 IF _SS>=0 GOTOF LN42
$P_UIFR[ABS(_SS),AXV[3],TR]=_REN[6]+RENC[37]; SET TO PROGRAM ZERO GOTOF LN50 LN42:
$P_UIFR[ABS(_SS),AXV[3],TR]=_REN[6]+RENC[42]; SET TO PROGRAM POSITION GOTOF LN50 LN45:
_REN[6]=$P_UBFR[AXV[3],TR]
$P_UBFR[AXV[3],TR]=_REN[6]+RENC[42];SET BASE ZERO LN50: STOPRE RET
%_N_L9800_SPF
;$PATH=/_N_SPF_DIR ; REN R PARAM CLEAR STOPRE R0=1 LN1:
R[R0]=9999 R0=R0+1
IF R0<=27 GOTOB LN1 RENTL=\R0=9999 STOPRE RET
%_N_L9801_SPF
;$PATH=/_N_SPF_DIR
PROC L9801 SAVE DISPLOF
EXTERN L9726(REAL,REAL,REAL,REAL,REAL,REAL,REAL) EXTERN L9732(REAL,REAL,REAL,REAL,REAL,REAL) ; REN CAL PROBE LENGTH
IF ($P_SEARCH)OR($P_SIM)OR($P_DRYRUN) GOTOF LN5 L9724
IF R20<>9999 GOTOF LN1 RENC[15]=160
L9700; T INPUT MISSING LN1:
IF R26<>9999 GOTOF LN2 RENC[15]=190
L9700; Z INPUT MISSING LN2:
L9725; CLEAR OUTPUTS R10=$AA_IW[AXV[3]]
L9726(9999,9999,9999,9999,R26,R17,0) IF RENC[49]<>0 GOTOF LN3 R3=RENC[26]-R26
L9732(R20,$P_TOOL,-R3,R26,9999,9999) GOTOF LN5 LN3:
G0 AX[AXV[3]]=R10
IF RENC[49]==2 GOTOF LN4 RENC[15]=370
L9700; PROBE OPEN LN4:
RENC[15]=380
L9700; PROBE FAIL LN5:
L9800; CLEAR INPUTS STOPRE
RET
%_N_L9802_SPF
;$PATH=/_N_SPF_DIR
PROC L9802 SAVE DISPLOF
EXTERN L9721(REAL,REAL,REAL,REAL,REAL) EXTERN L9722(REAL,REAL,REAL,REAL,REAL) ; REN CAL XY OFFSET
IF ($P_SEARCH)OR($P_SIM)OR($P_DRYRUN) GOTOF LN5 L9724
IF R7<>9999 GOTOF LN1 RENC[15]=110
L9700; D INPUT MISSING LN1:
L9725; CLEAR OUTPUTS R10=$AA_IW[AXV[1]] R12=$AA_IW[AXV[2]]
IF R26==9999 GOTOF LN2 IF R18<>9999 GOTOF LN2 R18=5*RENC[29] LN2:
L9721(R7,R17,R18,R26,RENP[0]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN3 G0 AX[AXV[1]]=RENC[27]
RENP[2]=(R10-RENC[27])*RENC[7]/RENC[29]
L9722(R7,R17,R18,R26,RENP[1]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN3
RENP[3]=(R12-RENC[28])*RENC[7]/RENC[29] GOTOF LN5 LN3:
G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 IF RENC[49]==2 GOTOF LN4 RENC[15]=370
L9700; PROBE OPEN LN4:
RENC[15]=380
L9700; PROBE FAIL LN5:
G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 L9800; CLEAR INPUTS STOPRE RET
%_N_L9803_SPF
;$PATH=/_N_SPF_DIR
PROC L9803 SAVE DISPLOF
EXTERN L9721(REAL,REAL,REAL,REAL,REAL) EXTERN L9722(REAL,REAL,REAL,REAL,REAL)
EXTERN L9732(REAL,REAL,REAL,REAL,REAL,REAL) ; REN CAL STYLUS RAD
IF ($P_SEARCH)OR($P_SIM)OR($P_DRYRUN) GOTOF LN7 L9724
IF R7<>9999 GOTOF LN1 RENC[15]=110
L9700; D INPUT MISSING LN1:
L9725; CLEAR OUTPUTS R10=$AA_IW[AXV[1]] R12=$AA_IW[AXV[2]]
IF R26==9999 GOTOF LN2 IF R18<>9999 GOTOF LN2 R18=5*RENC[29] LN2:
L9721(R7,R17,R18,R26,RENP[0]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN4 G0 AX[AXV[1]]=RENC[27]
L9722(R7,R17,R18,R26,RENP[0]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN4 G0 AX[AXV[2]]=RENC[28]
L9721(R7,R17,R18,R26,RENP[0]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN4
RENP[0]=(ABS(R7/2-ABS(RENC[24]-RENC[27])))*RENC[7]/RENC[29] L9722(R7,R17,R18,R26,RENP[1]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN4
RENP[1]=(ABS(R7/2-ABS(RENC[25]-RENC[28])))*RENC[7]/RENC[29] RENC[40]=RENC[27]+(RENP[2]*RENC[29]/RENC[7])-R10 RENC[41]=RENC[28]+(RENP[3]*RENC[29]/RENC[7])-R12 IF R19==9999 GOTOF LN7
L9732(9999,9999,9999,9999,R19,1) GOTOF LN7 LN4:
G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 IF RENC[49]==2 GOTOF LN5 RENC[15]=370
L9700; PROBE OPEN LN5:
RENC[15]=380
L9700; PROBE FAIL LN7:
G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 L9800; CLEAR INPUTS STOPRE RET
%_N_L9810_SPF
;$PATH=/_N_SPF_DIR
PROC L9810 SAVE DISPLOF
EXTERN L9710(REAL,REAL,REAL,REAL) ; REN PROT POSN
IF ($P_SEARCH)OR($P_SIM)OR($P_DRYRUN) GOTOF LN9 L9724
IF R9<>9999 GOTOF LN3
IF RENC[17]<>9999 GOTOF LN2 RENC[15]=60
L9700; NO FEED RATE LN2:
R9=RENC[17] LN3:
RENC[17]=R9
RENC[48]=0 LN4:
L9710(R24,R25,R26,R9); PROTECT MOVE IF RENC[49]<>2 GOTOF LN8 GOTOF LN9 LN8:
RENC[48]=7
IF R13==1 GOTOF LN9 RENC[15]=50
L9700; PATH OBSTRUCTED LN9:
L9800; CLEAR INPUTS STOPRE RET
%_N_L9811_SPF
;$PATH=/_N_SPF_DIR
PROC L9811 SAVE DISPLOF
EXTERN L9710(REAL,REAL,REAL,REAL)
EXTERN L9726(REAL,REAL,REAL,REAL,REAL,REAL,REAL)
EXTERN L9730(REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL) EXTERN L9732(REAL,REAL,REAL,REAL,REAL,REAL) ; REN XYZ MEASURE
IF($P_SEARCH)OR($P_SIM)OR($P_DRYRUN) GOTOF LN25 L9724
IF R19==9999 GOTOF LN1 IF R20==9999 GOTOF LN1 RENC[15]=330
L9700; ST INPUT MIXED LN1:
IF R19==9999 GOTOF LN2 IF R11==9999 GOTOF LN2 RENC[15]=320
L9700; SH INPUT MIXED LN2:
IF R20==9999 GOTOF LN3 IF R13==9999 GOTOF LN3 RENC[15]=340
L9700; TM INPUT MIXED LN3:
L9725; CLEAR OUTPUTS
R10=$AA_IW[AXV[1]]; X START R12=$AA_IW[AXV[2]]; Y START R16=$AA_IW[AXV[3]]; Z START
L9710(R10-(RENP[2]*RENC[29]/RENC[7]),R12-(RENP[3]*RENC[29]/RENC[7]),9999,RENC[19]); PROTECT MOVE IF RENC[49]<>2 GOTOF LN22 R30=-1; DIR FLAG
IF R24<>9999 GOTOF LN5 IF R25<>9999 GOTOF LN7 ; Z MOVE
IF R26==9999 GOTOF LN225
IF $AA_IW[AXV[3]] L9726(9999,9999,9999,9999,R26,R17,0) IF RENC[49]<>0 GOTOF LN21 RENC[35]=R10 RENC[36]=R12 RENC[37]=RENC[26]; Z POS RENC[38]=RENC[37] IF R8==9999 GOTOF LN45 RENC[38]=RENC[38]+(RENE[R8]*RENC[29]/RENC[7]); SIZE LN45: RENC[42]=RENC[37]-R26; Z ERROR RENC[43]=RENC[38]-R26; SIZE ERROR RENC[45]=ABS(RENC[42]); T P ERR RENC[46]=RENC[43]*R30; METAL CON GOTOF LN9 LN5:; X MOVE IF R25<>9999 GOTOF LN225 IF R26<>9999 GOTOF LN225 R6=RENP[0]*RENC[29]/RENC[7] IF $AA_IW[AXV[1]] L9726(9999,9999,R24,9999,9999,R17,RENP[0]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN21 RENC[35]=RENC[24]+R6+(RENP[2]*RENC[29]/RENC[7]); COR SKIP POS RENC[36]=R12 RENC[37]=R16 RENC[38]=RENC[35] IF R8==9999 GOTOF LN65 RENC[38]=RENC[38]+(RENE[R8]*RENC[29]/RENC[7]); ACT SIZE LN65: RENC[40]=RENC[35]-R24; X ERROR RENC[43]=RENC[38]-R24; SIZE ERROR RENC[45]=ABS(RENC[40]); T P ERROR RENC[46]=RENC[43]*R30; METAL CON GOTOF LN9 LN7:; Y MOVE IF R26<>9999 GOTOF LN225 R6=RENP[1]*RENC[29]/RENC[7] IF $AA_IW[AXV[2]] L9726(9999,9999,9999,R25,9999,R17,RENP[1]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN21 RENC[35]=R10 RENC[36]=RENC[25]+R6+(RENP[3]*RENC[29]/RENC[7]); Y SKIP POS RENC[37]=R16 RENC[38]=RENC[36] IF R8==9999 GOTOF LN85 RENC[38]=RENC[38]+(RENE[R8]*RENC[29]/RENC[7]); ACT SIZE LN85: RENC[41]=RENC[36]-R25; ERROR RENC[43]=RENC[38]-R25; SIZE ERROR RENC[45]=ABS(RENC[41]); TP ERROR RENC[46]=RENC[43]*R30; METAL CON LN9: RENC[47]=R30 IF R23==9999 GOTOF LN10 L9730(9999,9999,9999,R11,9999,9999,R13,9999,9999,R19,R20,R23,R24,R25,R26) LN10: IF R21==9999 GOTOF LN11; U UPPER TOL IF ABS(RENC[43])>=R21 GOTOF LN23 IF RENC[45]>=R21 GOTOF LN23 LN11: IF R11==9999 GOTOF LN13 IF ABS(RENC[43]) IF RENC[20]==4 GOTOF LN13 IF ABS(RENC[43]) L9700; OUT OF TOL LN13: IF R13==9999 GOTOF LN15 IF ABS(RENC[45]) IF RENC[20]==4 GOTOF LN15 IF ABS(RENC[45]) L9700; OUT OF POSITION LN15: IF R20==9999 GOTOF LN19 IF R22==9999 GOTOF LN155 IF ABS(RENC[46]) IF R9<>9999 GOTOF LN16 R9=1 LN16: L9732(R20,R32,RENC[46]*R9,R26,9999,9999) LN19: IF R19==9999 GOTOF LN24 L9732(9999,9999,9999,R26,R19,1) GOTOF LN24 LN21: IF RENC[49]<>2 GOTOF LN22 G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 RENC[15]=380 L9700; PROBE FAIL LN22: G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 RENC[15]=370 L9700; PROBE OPEN LN225: G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 RENC[15]=210 L9700; XYZ INPUT MISSING LN23: RENC[48]=3 IF RENC[20]==4 GOTOF LN24 G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 RENC[15]=540 L9700; UPPER TOL EXCEEDED LN24: G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 LN25: RENC[39]=11 L9800; CLEAR INPUTS STOPRE RET %_N_L9812_SPF ;$PATH=/_N_SPF_DIR PROC L9812 SAVE DISPLOF EXTERN L9721(REAL,REAL,REAL,REAL,REAL) EXTERN L9722(REAL,REAL,REAL,REAL,REAL) EXTERN L9730(REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL) EXTERN L9732(REAL,REAL,REAL,REAL,REAL,REAL) EXTERN L9710(REAL,REAL,REAL,REAL) ; REN WEB POCKET MEASURE IF ($P_SEARCH)OR($P_SIM)OR($P_DRYRUN) GOTOF LN25 L9724 LN1: IF R24==9999 GOTOF LN2 IF R25==9999 GOTOF LN2 RENC[15]=300 L9700; XY INPUT MIXED LN2: IF R24<>9999 GOTOF LN3 IF R25<>9999 GOTOF LN3 RENC[15]=200 L9700; XY INPUT MISSING LN3: L9725; CLEAR OUTPUTS R10=$AA_IW[AXV[1]]; X START R12=$AA_IW[AXV[2]]; Y START L9710(R10-(RENP[2]*RENC[29])/RENC[7],R12-(RENP[3]*RENC[29]/RENC[7]),9999,RENC[19]); PROTECT MOVE IF RENC[49]<>2 GOTOF LN22 R30=-1 IF R26==9999 GOTOF LN6 IF R18<>9999 GOTOF LN5 R18=5*RENC[29] LN5: IF R18<0 GOTOF LN6 R30=1 LN6: IF R25==9999 GOTOF LN7 R7=R25 L9722(R7,R17,R18,R26,RENP[1]*RENC[29]/RENC[7]) G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 IF RENC[49]<>0 GOTOF LN21 RENC[36]=RENC[28]+(RENP[3]*RENC[29]/RENC[7]); Y COR POS RENC[38]=(ABS((RENC[25]-RENC[28])*2))-((RENP[1]*RENC[29]/RENC[7])*R30*2); SIZE IF R8==9999 GOTOF LN65 RENC[38]=RENC[38]+(RENE[R8]*RENC[29]/RENC[7]); COR SIZE LN65: RENC[41]=RENC[36]-R12; Y POS ERROR RENC[45]=ABS(RENC[41]); TP ERROR GOTOF LN8 LN7: R7=R24 L9721(R7,R17,R18,R26,RENP[0]*RENC[29]/RENC[7]) G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 IF RENC[49]<>0 GOTOF LN21 RENC[35]=RENC[27]+(RENP[2]*RENC[29]/RENC[7]); X COR POS RENC[38]=(ABS((RENC[24]-RENC[27])*2))-((RENP[0]*RENC[29]/RENC[7])*R30*2); SIZE IF R8==9999 GOTOF LN75 RENC[38]=RENC[38]+(RENE[R8]*RENC[29]/RENC[7]); COR SIZE LN75: RENC[40]=RENC[35]-R10; X POS ERROR RENC[45]=ABS(RENC[40]); TP ERROR LN8: RENC[43]=RENC[38]-R7; ERROR OF SIZE RENC[46]=RENC[43]*R30/2; METAL CON LN9: IF R23==9999 GOTOF LN10 L9730(9999,R7,2,R11,9999,9999,R13,9999,9999,R19,R20,R23,R10,R12,9999) LN10: IF R21==9999 GOTOF LN11 IF ABS(RENC[43]) >= R21 GOTOF LN23 IF RENC[45] >= R21 GOTOF LN23 LN11: IF R11==9999 GOTOF LN13 IF ABS(RENC[43]) IF RENC[20]==4 GOTOF LN13 IF ABS(RENC[43]) L9700; OUT OF TOL LN13: IF R13==9999 GOTOF LN15 IF ABS(RENC[45]) IF RENC[20]==4 GOTOF LN15 IF ABS(RENC[45]) L9700; OUT OF POSITION LN15: IF R20==9999 GOTOF LN19 IF R22==9999 GOTOF LN155 IF ABS(RENC[46]) IF R9<>9999 GOTOF LN16 R9=1 LN16: L9732(R20,R32,RENC[46]*R9,9999,9999,9999) IF R26<>9999 GOTOF LN19 IF RENC[18] IF RENC[20]==4 GOTOF LN19 IF RENC[18] G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 RENC[15]=530 L9700; DIA OFFSET TOO LARGE LN19: IF R19==9999 GOTOF LN24 L9732(9999,9999,9999,9999,R19,1) GOTOF LN24 LN21: IF RENC[49]<>2 GOTOF LN22 G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 RENC[15]=380 L9700; PROBE FAIL LN22: G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 RENC[15]=370 L9700; PROBE OPEN LN23: RENC[48]=3 IF RENC[20]==4 GOTOF LN24 G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 RENC[15]=540 L9700; UPPER TOL EXCEEDED LN24: G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 LN25: L9800; CLEAR INPUTS STOPRE RET %_N_L9814_SPF ;$PATH=/_N_SPF_DIR PROC L9814 SAVE DISPLOF EXTERN L9721(REAL,REAL,REAL,REAL,REAL) EXTERN L9722(REAL,REAL,REAL,REAL,REAL) EXTERN L9730(REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL) EXTERN L9732(REAL,REAL,REAL,REAL,REAL,REAL) ; REN BORE BOSS MEASURE IF ($P_SEARCH)OR($P_SIM)OR($P_DRYRUN) GOTOF LN25 L9724 LN1: IF R7<>9999 GOTOF LN2 RENC[15]=110 L9700; D INPUT MISSING LN2: L9725; CLEAR OUTPUTS R10=$AA_IW[AXV[1]]; X START R12=$AA_IW[AXV[2]]; Y START R30=-1 IF R26==9999 GOTOF LN6 IF R18<>9999 GOTOF LN5 R18=5*RENC[29] LN5: IF R18<0 GOTOF LN6 R30=1 LN6: L9722(R7,R17,R18,R26,RENP[1]*RENC[29]/RENC[7]) IF RENC[49]<>0 GOTOF LN21 G0 AX[AXV[2]]=RENC[28] L9721(R7,R17,R18,R26,RENP[0]*RENC[29]/RENC[7]) G0 AX[AXV[2]]=R12 IF RENC[49]<>0 GOTOF LN21 RENC[35]=RENC[27]+(RENP[2]*RENC[29]/RENC[7]); X COR POS RENC[36]=RENC[28]+(RENP[3]*RENC[29]/RENC[7]); Y COR POS RENC[38]=(ABS((RENC[24]-RENC[27])*2))-((RENP[0]*RENC[29]/RENC[7])*R30*2); SIZE IF R8==9999 GOTOF LN7 RENC[38]=RENC[38]+(RENE[R8]*RENC[29]/RENC[7]); COR SIZE LN7: RENC[40]=RENC[35]-R10; X POS ERROR RENC[41]=RENC[36]-R12; Y POS ERROR RENC[43]=RENC[38]-R7; ERROR OF SIZE RENC[45]=SQRT((RENC[40]*RENC[40])+(RENC[41]*RENC[41])); TP ERROR RENC[46]=RENC[43]*R30/2; METAL CON LN9: IF R23==9999 GOTOF LN10 L9730(9999,R7,2,R11,9999,9999,R13,9999,9999,R19,R20,R23,R10,R12,9999) LN10: IF R21==9999 GOTOF LN11 IF ABS(RENC[43]) >= R21 GOTOF LN23 IF RENC[45] >= R21 GOTOF LN23 LN11: IF R11==9999 GOTOF LN13 IF ABS(RENC[43]) IF RENC[20]==4 GOTOF LN13 IF ABS(RENC[43]) L9700; OUT OF TOL LN13: IF R13==9999 GOTOF LN15 IF ABS(RENC[45]) IF RENC[20]==4 GOTOF LN15 IF ABS(RENC[45]) L9700; OUT OF POSITION LN15: IF R20==9999 GOTOF LN19 IF R22==9999 GOTOF LN155 IF ABS(RENC[46]) IF R9<>9999 GOTOF LN16 R9=1 LN16: L9732(R20,R32,RENC[46]*R9,9999,9999,9999) IF R26<>9999 GOTOF LN19 IF RENC[18] IF RENC[20]==4 GOTOF LN19 IF RENC[18] L9700; DIA OFFSET TOO LARGE LN19: IF R19==9999 GOTOF LN24 L9732(9999,9999,9999,9999,R19,1) GOTOF LN24 LN21: IF RENC[49]<>2 GOTOF LN22 RENC[15]=380 L9700; PROBE FAIL LN22: RENC[15]=370 L9700; PROBE OPEN LN23: RENC[48]=3 IF RENC[20]==4 GOTOF LN24 RENC[15]=540 L9700; UPPER TOL EXCEEDED LN24: G0 AX[AXV[1]]=R10 AX[AXV[2]]=R12 LN25: L9800; CLEAR INPUTS STOPRE RET