|
楼主 |
发表于 2013-10-31 22:43:05
|
显示全部楼层
%
o1225
#100=54 (COORDINATE)工件坐标系选择54-59
#1=300 (WIDTH) 工件宽度
#2=230 (LENGTH) 工件长度
#5=25 (Z-DEPTH) 下刀深度
加工模式 0 XY分中取数
1 X-Y-单边取数
2 X+Y-单边取数
3 X-Y+单边取数
4 X+Y+单边取数
5 X-单边取数 Y分中取数
6 X+ 单边取数 Y分中取数
7 X分中取数 Y-单边取数
8 X分中取数 Y+单边取数
#6=0 (0=X/2Y/2 1=X-Y- 2=X+Y- 3=X-Y+ 4=X+Y+ 5=X-Y/2 6=X+Y/2 7=X/2Y- 8=X/2Y+);
#7=150 (DATUM-X-LENGTH) X单边取数偏移数据
#8=150 (DATUM-Y-LENGTH) Y单边取数偏移数据
#9=0 (OFFSET-X-LENGTH) X测量点偏移数据
#10=-80 (OFFSET-Y-LENGTH)Y测量点偏移数据
M98 P9140
M30
:9140
(********)
#611=#5021
#612=#5022
#613=#5023
#11=5 (D) 分中棒或寻边器半径
#12=20 (A) 分中棒或寻边器半径到工件边的安全距离
#13=200 (Z) Z轴安全高度
(********)
G80 M5
M9
G69
G52 X0 Y0 Z0
G91 G28 G0 Z0
#14=15
IF[#6 EQ 0]GO 1
#14=3
IF[#6 EQ 1]GO 1
#14=10
IF[#6 EQ 2]GO 1
#14=5
IF[#6 EQ 3]GO 1
#14=12
IF[#6 EQ 4]GO 1
#14=7
IF[#6 EQ 5]GO 1
#14=14
IF[#6 EQ 6]GO 1
#14=11
IF[#6 EQ 7]GO 1
#14=13
IF[#6 EQ 8]GO 1
GO 3001
N1
#100=FI[#100]
#15=1
WH[#15 LE 6]DO 1
IF[#15+53 EQ #100]GO 2
#15=#15+1
EN 1
GO 3002
N2
G90 G53 X[#611+#1/2] Y[#612+#2/2]
G90 G53 Z[#613+#13]
M0
N10
M3 S500
IF[[#14 AN 1] EQ 0]GO 20
G90 G53 X[#611-#12] Y[#612+#2/2+#10]
G90 G53 Z[#613-#5]
#15=#5021
M1
(*MOVE X+*)
(*MOVE X+*)
IF[#5021 LE #15]GO 3003
#501=#5021
G90 G53 Z[#613+#13]
N20
IF[[#14 AN 2] EQ 0]GO 30
G90 G53 X[#611+#1/2+#9] Y[#612-#12]
G90 G53 Z[#613-#5]
#15=#5022
M1
(*MOVE Y+*)
(*MOVE Y+*)
IF[#5022 LE #15]GO 3003
#502=#5022
G90 G53 Z[#613+#13]
N30
IF[[#14 AN 4] EQ 0]GO 40
G90 G53 X[#611+#1/2+#9] Y[#612+#2+#12]
G90 G53 Z[#613-#5]
#15=#5022
M1
(*MOVE Y-*)
(*MOVE Y-*)
IF[#5022 GE #15]GO 3003
#503=#5022
G90 G53 Z[#613+#13]
N40
IF[[#14 AN 8] EQ 0]GO 50
G90 G53 X[#611+#1+#12] Y[#612+#2/2+#10]
G90 G53 Z[#613-#5]
#15=#5021
M1
(*MOVE X-*)
(*MOVE X-*)
IF[#5021 GE #15]GO 3003
#504=#5021
G90 G53 Z[#613+#13]
N50
#601=#0
#602=#0
GO[#6+100]
N100
#601=#504-#501-#11*2
#602=#503-#502-#11*2
#801=[#501+#504]/2
#802=[#502+#503]/2
GO 200
N101
#801=#501+#11+#7
#802=#502+#11+#8
GO 200
N102
#801=#504-#11-#7
#802=#502+#11+#8
GO 200
N103
#801=#501+#11+#7
#802=#503-#11-#8
GO 200
N104
#801=#504-#11-#7
#802=#503-#11-#8
GO 200
N105
#602=#503-#502-#11*2
#801=#501+#11+#7
#802=[#502+#503]/2
GO 200
N106
#602=#503-#502-#11*2
#801=#504-#11-#7
#802=[#502+#503]/2
GO 200
N107
#601=#504-#501-#11*2
#801=[#501+#504]/2
#802=#502+#11+#8
GO 200
N108
#601=#504-#501-#11*2
#801=[#501+#504]/2
#802=#503-#11-#8
GO 200
N200
#[4141+#100*20]=#801
#[4142+#100*20]=#802
M5
G91 G28 G0 Z0
M99
N3001
#3000=1(#6-MODE-ERROR)
N3002
#3000=2(#100-ERROR)
N3003
#3000=3(OPERATION-ERROR)
|
|