分中宏程序

2022-03-30 14:11:48 浏览数 (2)

程序参考:

%O3941(分中)

#1=50.(Z抬高高度,如果是孔就输入0)

#100= 54(输入G54~G59,如果想测G54.1,就输入1~48)

M3 S500

#100=ABS[#100]

#100=FIX[#100]IF[#100 LE 48] AND [#100 GE 1] GOTO 30

IF[#100 LT 54] GOTO 40

IF[#100 GT 59] GOTO 10

M00(调到手轮,走到对X轴的一边,分中棒靠好后,再调到自动,按循环启动,以下类似)

(X 轴 1 点)

#101=#5021

G91G0Z#1

M00

(X Axis 2 Point)

#102=#5021

#[2500 #100-53.0]=[#101 #102]/2

G91G0Z#1

M00

(Y Axis 1 Point)

#101=#5022

G91G0Z#1

M00

(Y Axis 2 Point)

#102=#5022

#[2600 #100-53.0]=[#101 #102]/2

G91G28Z0

M30

N30(G54.1P)

(X Axis 1 Point)

#101=#5021

G91G0Z#1

M00

(X Axis 2 Point)

#102=#5021

#[7001 [#100-1]*20]=[#101 #102]/2

G91G0Z#1

M00

(Y Axis 1 Point)

#101=#5022

G91G0Z#1

M00

(Y Axis 2 Point)

#102=#5022

#[7002 [#100-1]*20]=[#101 #102]/2

G91G28Z0

M30

N10 M5

#3000 =1(#100 NO 54 TO 59)

N40 M5

#3000 =1(#100 NO 54 TO 59 OR G54.1 1 TO 48)

%

(来源:网络,仅供参考)

0 人点赞