Ðề: Xuất chương trình CAM dùng mã lệnh G91
machine fanuc15m
word order = ( OP N G3 G5 G1 G2 G6 G4 G7 )
word order = (+ H X Y Z B I J K D )
word order = (+ S M1 M2 MS T msg EM )
word order = (+ Q Q1 Z2 R2 ID F )
define word ID
address letter = "O"
end define
define format all
tape position = 0
end define
define format (X Y Z)
scale factor = 1
end define
define codes
change tool = M1 6
coolant on = M2 8
coolant off = M2 9
end define
define format (G1 G2 G3 M1 M2 H T)
leading zeros = true
end define
define format (I J K)
scale factor = -1
not modal
end define
spindle output = (2 1 1 0)
circle output = (1 1 1 1)
coolant output = (2 1)
comp output = (3 1 1 2)
message output = false
define block tape start
"START"
"%"
"G91G28Z0"
"G05.1Q0"
"G00G90G40G80G49"
"(DINHKHAI)"
end define
define block tool change first
M1 06 ; T Toolnum
"G05.1Q1"
"G91G28Z0"
G5 90 ; G1 00 ; G7 54 ; X FromX ; Y FromY
G6 43 ; G1 00 ; H Toolnum ; Z FromZ
end define
define block move rapid
S ; M1
G1 00 ; X ; Y ; Z
end define
define block move circle
G1 ; G2 ; G3 ; X ; Y ; Z ; I ; J ; K ; F
end define
define block tape end
G1 00 ;
M1
"M09"
"M05"
"G91G00G28Z0.0"
"G91G00G28X0.0Y0.0"
"G05.1Q0"
M1 30
"%"
end define
define block tool change
"M09"
"M05"
"G91G00G28Z0.0"
"G91G00G28X0.0Y0.0"
"G21"
"G90"
"M01"
"G05.1Q0"
"G00G90G40G80G49"
M1 06 ; T Toolnum
"G05.1Q0"
"G91G28Z0"
"G90G00G54X0.0Y0.0"
G6 43 ; G1 00 ; H Toolnum ; Z FromZ
end define
end
chào các đồng chí . bạn nào dùng hệ fanush thì thấy rỏ là g91 .trên là mật định của code ra máy cnc
dưới đay là chương trình khi làm xông và xuuất ra máy theo mật định sẻ như sau:
START
%
G91G28Z0
G05.1Q0
G00G90G40G80G49
(DINHKHAI)
M06T02
G05.1Q1
G91G28Z0
G90G00G54X0Y0
G43H02Z180.
S6500M03
X0Y0Z11.
X62.061Y-156.403
Z4.788
G01Z-.212F50
X62.808Y-156.468Z-.207F500
X65.138Y-156.407Z-.237
X67.435Y-156.116Z-.313
X69.624Y-155.695Z-.441
X71.863Y-155.117Z-.622
X74.612Y-154.108Z-.948
X76.226Y-153.506Z-1.171
X-67.348Y-156.133Z-.308
X-65.049Y-156.418Z-.234
X-62.628Y-156.462Z-.206
X-62.573Y-156.457Z-.207
G00Z11.
M09
M09
M05
G91G00G28Z0.0
G91G00G28X0.0Y0.0
G05.1Q0
M30
%
mình đả cắt bớt phần chương trình chỉ để phần nhận dử liệu và phần kết thúc của máy cnc .
thân chào . bạn nào có ý kiến thì mail nhé .
n.khai@rieker.net