libing0254
級(jí)別: 論壇先鋒
精華主題: 0
發(fā)帖數(shù)量: 115 個(gè)
工控威望: 1072 點(diǎn)
下載積分: 4833 分
在線時(shí)間: 34(小時(shí))
注冊(cè)時(shí)間: 2020-09-03
最后登錄: 2022-11-11
查看libing0254的 主題 / 回貼
樓主  發(fā)表于: 2020-09-14 08:54
初學(xué)者,現(xiàn)在有CNC的編程程序,這程序大概是什么意思,指令大概了解,但是合起來(lái)就不怎么白,G04  P50?   G00 Y#501?    



O0001
G04 P50
G00 Y#501
G00 X#500
#1=1
WHILE[#1==1]DO1
G04 P50
IF[#1006==0]
{
WHILE[#515>#517]DO2


IF[#514>#516]
{
M88 P8 L0
G00 X#502
G00 Y#503
M89 P1 L1
G04 P#518
M89 P1 L0
G00 Y#501
G00 X#500
M89 P3 L1
G04 P400
#2=[#517]MOD2

IF[#2==0]
{
#3=#504-#512*#516
G00 X#3
#4=#505-#513*#517
G00 Y#4
M89 P2 L1
G04 P#519
M89 P2 L0
G00 Y#501

M88 P8 L1
M89 P3 L0
#516=#516+1
G00 X#500
}

IF[#2||0]
{
#3=#506-#512*#516
G00 X#3
#4=#507-#513*[#517-1]
G00 Y#4
M89 P2 L1
G04 P#519
M89 P2 L0
G00 Y#501

M88 P8 L1
M89 P3 L0
#516=#516+1
G00 X#500
}
IF[#516>=#514]
{
#516=0
#517=#517+1
}
}
END2
IF[#517>=#515]
{
#517=0
#1=0
}
}
G04 P20
IF[#1007==0]
{
WHILE[#515>#517]DO3

IF[#514>#516]
{
M88 P8 L0
G00 X#502
G00 Y#503
M89 P1 L1
G04 P#518
M89 P1 L0
G00 Y#501
G00 X#500
M89 P3 L1
G04 P400

#2=[#517]MOD2
IF[#2==0]
{
#3=#508-#512*#516
G00 X#3
#4=#509-#513*#517
G00 Y#4
M89 P2 L1
G04 P#519
M89 P2 L0
G00 Y#501

M88 P8 L1
M89 P3 L0
#516=#516+1
G00 X#500
}

IF[#2||0]
{
#3=#510-#512*#516
G00 X#3
#4=#511-#513*[#517-1]
G00 Y#4
M89 P2 L1
G04 P#519
M89 P2 L0
G00 Y#501

M88 P8 L1
M89 P3 L0
#516=#516+1
G00 X#500
}
IF[#516>=#514]
{
#516=0
#517=#517+1
}

}
END3
IF[#517>=#515]
{
#517=0
#1=0
}
}
END1

M99
%