数控冲床的安全保护区功能的设定文档格式.docx
《数控冲床的安全保护区功能的设定文档格式.docx》由会员分享,可在线阅读,更多相关《数控冲床的安全保护区功能的设定文档格式.docx(20页珍藏版)》请在冰豆网上搜索。
$SC_PA_CONT_ORD[0,2]=R113
$SC_PA_CONT_ABS[0,2]=R101+R110+R112/2-R92
$SC_PA_CONT_TYP[0,3]=1
$SC_PA_CONT_ORD[0,3]=R113+R110+R111
$SC_PA_CONT_ABS[0,3]=R101+R110+R112/2-R92
IFR100==1GOTOFEND
$SC_PA_ACTIV_IMMED[1]=0
$SC_PA_T_W[1]=0
$SC_PA_ORI[1]=0
$SC_PA_LIM_3DIM[1]=0
$SC_PA_PLUS_LIM[1]=0
$SC_PA_MINUS_LIM[1]=0
$SC_PA_CONT_NUM[1]=4
$SC_PA_CONT_TYP[1,0]=1
$SC_PA_CONT_ORD[1,0]=R113+R110+R111
$SC_PA_CONT_ABS[1,0]=R102-R112/2-R110+R92
$SC_PA_CONT_TYP[1,1]=1
$SC_PA_CONT_ORD[1,1]=R113
$SC_PA_CONT_ABS[1,1]=R102-R112/2-R110+R92
$SC_PA_CONT_TYP[1,2]=1
$SC_PA_CONT_ORD[1,2]=R113
$SC_PA_CONT_ABS[1,2]=R102+R110+R112/2-R92
$SC_PA_CONT_TYP[1,3]=1
$SC_PA_CONT_ORD[1,3]=R113+R110+R111
$SC_PA_CONT_ABS[1,3]=R102+R110+R112/2-R92
IFR100==2GOTOFEND
$SC_PA_ACTIV_IMMED[2]=0
$SC_PA_T_W[2]=0
$SC_PA_ORI[2]=0
$SC_PA_LIM_3DIM[2]=0
$SC_PA_PLUS_LIM[2]=0
$SC_PA_MINUS_LIM[2]=0
$SC_PA_CONT_NUM[2]=4
$SC_PA_CONT_TYP[2,0]=1
$SC_PA_CONT_ORD[2,0]=R113+R110+R111
$SC_PA_CONT_ABS[2,0]=R106-R112/2-R110+R92
$SC_PA_CONT_TYP[2,1]=1
$SC_PA_CONT_ORD[2,1]=R113
$SC_PA_CONT_ABS[2,1]=R106-R112/2-R110+R92
$SC_PA_CONT_TYP[2,2]=1
$SC_PA_CONT_ORD[2,2]=R113
$SC_PA_CONT_ABS[2,2]=R106+R110+R112/2-R92
$SC_PA_CONT_TYP[2,3]=1
$SC_PA_CONT_ORD[2,3]=R113+R110+R111
$SC_PA_CONT_ABS[2,3]=R106+R110+R112/2-R92
END:
M17
%_N_DETECT_SPF
DETECTHOWMANYCLAMPERINSTALLED(R100)ANDTHEIRPOSITION(R101R102R103)
N05DEFINTNUM=0
N10DEFREALSTEP=-80,MAXIMUM=0
N11R100=0
R101=0
R102=0
R103=0
N15G17G53G90G01F30000X1250Y1250
N25STOPRE
N30G01G53G90X=MAXIMUMF10000MEAS=1
N35IF$AC_MEA[1]
N36R102=$AA_MM[X]
R102=TRUNC(R102)
R105=R102+R114-R112/2
N40NUM=1
N41G91X=STEP
N45ELSE
N46GOTOFLAB
N50ENDIF
N51STOPRE
N52G01G53G90X=MAXIMUMF10000MEAS=1
STOPRE
N53IF$AC_MEA[1]
N54R101=$AA_MM[X]
R101=TRUNC(R101)
R104=R101+R114-R112/2
N55NUM=2
N56G91X=STEP
N57ELSE
N58GOTOFLAB
N59ENDIF
STOPRE
N68LAB:
R100=NUM
N125CASER100OF1GOTOFLC12GOTOFLC23GOTOFLC3DEFAULTGOTOFERROR
N130LC1:
MSG("
ONE/1CLAMPER"
)
N135GOTOFEND
N140LC2:
TWO/2CLAMPERS"
N145GOTOFEND
N150LC3:
THREE/3CLAMPERS"
N155GOTOFEND
N180ERROR:
NOCLAMPERORTOOMANY,PRESSRESETTOABORT!
!
"
N181GOTOBERROR
N185END:
G1G53G90F30000X1250Y1250
M16
N190M17
%_N_PROTECT_SPF
ACTIVIATEPROTECTZONE
firstdeactiviateallprotectzones
N05CPROT(1,0,0,0,0)
N10CPROT(2,0,0,0,0)
N15CPROT(3,0,0,0,0)
N20NPROT(1,0,0,0,0)
N25NPROT(2,0,0,0,0)
N30NPROT(3,0,0,0,0)
readcurrenttoolradius
R89=currenttoolnumber
N40R110=R90
N41IFR110<
>
0GOTOFLAB1
N42ERROR:
PLEASECHECKTOOLRADIUS,PRESSRESETTOABORT!
callcontourdefinitionprogram
N45LAB1:
DEFINEAREA
activiateallprotectzones
N50CPROT(1,2,0,0,0)
N55CPROT(2,2,0,0,0)
N60CPROT(3,2,0,0,0)
M17
%_N_TL01_SPF
TOOL01
R89=1
R90=R87
R120=0
M71
DEFINEAREA
PROTECT
M53
M73
D1
G90G01C=R73F14000
$P_UIFR[1]=CTRANS(X,R72,C,R73)
G54
%_N_TL02_SPF
TOOL02
R89=2
R90=R88
M52
%_N_TL03_SPF
TOOL03
R89=3
%_N_TL04_SPF
TOOL04
R89=4
M72
%_N_TL05_SPF
TOOL05
R89=5
%_N_TL06_SPF
TOOL06
R89=6
R90=R86
R120=10
M74
%_N_TL07_SPF
TOOL07
R89=7
%_N_TL08_SPF
TOOL08
R89=8
%_N_TL09_SPF
TOOL09
R89=9
R90=R84
R120=50
M54
%_N_TL10_SPF
TOOL10
R89=10
G90G01C=R74F14000
$P_UIFR[1]=CTRANS(X,R72,C,R74)
%_N_TL11_SPF
TOOL11
R89=11
%_N_TL12_SPF
TOOL12
R89=12
%_N_TL13_SPF
TOOL13
R89=13
%_N_TL14_SPF
TOOL14
R89=14
%_N_TL15_SPF
TOOL15
R89=15
%_N_TL16_SPF
TOOL16
R89=16
%_N_TL17_SPF
TOOL17
R89=17
%_N_TL18_SPF
TOOL18
R89=18
%_N_TL19_SPF
TOOL19
R89=19
R120=0+R85
%_N_TL20_SPF
TOOL20
R89=20
%_N_TL21_SPF
TOOL21
R89=21
%_N_TL22_SPF
TOOL22
R89=22
%_N_TL23_SPF
TOOL23
M50
R89=23
%_N_TL24_SPF
TOOL24
R89=24
%_N_TL25_SPF
TOOL25
R89=25
%_N_TL26_SPF
TOOL26
R89=26
%_N_TL27_SPF
TOOL27
R89=27
%_N_TL28_SPF
TOOL28
R89=28
%_N_TL29_SPF
TOOL29
R89=29
%_N_TL30_SPF
TOOL30
R89=30