- LIC b6 di~u khicn giam sat trong m(>t h~ thong dieu khien ph:1n quyen PLC km
5. 9,~u kh'~n lrue
3.4.3. L~p trlnh NC
ChUC1Ilg trinh NC la m¢t vari ban (text) co cau t<;LO hai cac Cilu chuO'I1g trlnh (I¢nh, tu, dja chi, gia tri) theo m¢t d<;lng thuc (format) xae djnh, chi th~ may cong Cl.] NC thl.Je hi¢n cac nguyen cong el.] the de gia cong m(H chi tiet.
3.4.3.1. Cae phuang phap lap trinh NC
.:. L~p trlnh thll cong
- Thl.Jc hi¢n t<;Ii b;;m giily. vai cong Cl.l t6i thi~u (giay, hULl.
- Chi I~p tdnh duqe cho may eong Cl.] NC el,l the (bo dieu khien Cl.] the). - Su dl,lng s6 tay ebng ngh¢. s6 tay toan hQe va kinh nghi¢m bim than . • :. L~p trlnh cong xui1ng (ban thll eong)
-L~p tdnh vai sl.J hD trg ella bang may (control panel) bO dieu khien Cl.] the. - SU dl.]ng b¢ so~n thao ehuC1Ilg tdnh "Programeditar".
- Sir dl;lng trg giup ella ky thu~t dO ho?, cae menu, h9i tho?! va kha nang rna ph6ng ella bO dieu khien .
- H¢ th6ng dtI<;1c Sll dl}ng d~ l~p trlnh lil h¢ th6ng CADINC (tuc ph<in rn~rn CAD/CAM), garn cac tlch hqp giao di¢n CAD va b¢ ti~n xii li (preprozessor), b¢ vi Xlc l( (processor), bQ h~u XlI H (postprocessor).
- XU<1t phat ttr CAD-3D, preprozessor chUiln bi thong tin hlnh hQc duai d,.mg cac t~p CAD (CAD- file) cho prozessor.
- Prozessor bien dich diI li¢u hinh hQC va cong ngh¢ thanh t¢p chuC1I1g tdnh NC ngu6n (NC source program).
- Postprozessor sinh chuang trlnh NC v6i ngon ngiI lUang thlch bQ dicu
khi~n cl! th€ thea postprozessor duqc chQn Iva.
3.4.3.2. M. G
Ma G \a cac chuc nang chuan bi, duqc gan bC1i chu G va 2 kf t\! s6. Day W. rna quan tf(;mg nhat trong l~p tdnh NC VI h¢ thong CNC co th~ xlI Ii tn!c tie'p du li¢u to~ dQ thea rna G. M(lt s6, vi dl,l nhu dinh vi nhanh, nQi suy chuy~n d¢ng
th~ng/tron, gia congkhoan da: duqc rna hoa cong nghi¢p (ISO 6983). Cac rna G
daqc phan thanh lo~i nhu sau:
- G-modal (hi~u qua cho den khi co G rnai duqc dQc) G-nonrnodal (hi¢u qua chi trong khai).
- Chia tMnh d.c nh6m, VI dl}: nh6rn chuyen dQng nQi suy, nh6m chQn rn~t phang, nh6rn l~oh chuy~n dong ...
Ghi cluj: ngoai rna G, thuang duqc str dl}ng l~p trlnh thu cong, rn¢1 s6 ngon ngCi: b$c cao khac duqc su dl}ng d~ l~p trloh cang xuemg nhu HEIDENHAIM. ANI LAM ...• hoac I~p trinh may nhu: APT. AUTOPOST. ADAPT. EXAP v ... v.
C(fu true ChllIJllg trinh NC
Tuy b¢ dii!u khi~n rna chuang tdnh NC co nhililg ca:u truc khai mang d.;tc diem rieng, tuy nhien cau truc rn¢t chtIO'Og trloh luon nhu sau:
• Chuang tfloh bao gam cac khai.
• Kh6i bao gam cae tu. vi dl}. NS Gl XlO YlS F60 M8, khai ll<l.y co 6 tlr.
• Tir gam rn9t dia chi va rnQt gia lri s6, vi dl}, XIO gam dia chi X va gia tri 10.
Clle fir duqc phan bi~t theo: - 56 hi¢u khai (con s6 ho~c N 1 v ... v.).
- Ma G (Gl,G2,G3 v ... v.). con dugc gQi \a chuc oang chuan bi, thuemg the hi~n d.C \¢nh hloh hQc.
- L~nh eong ngh¢ (F. S. T),
- Ma M (M3, M6 .. ,). con dUQ'e gQi la ehue nang bo sung, thuang [he hi¢n cae l¢nh may,
Cae dia chi thuang duqc Slt dl,lng tmng lap trlnh NC, rJuqe gan bOi cae chl1 crii theo tieu chu<ln DIN 66025 (tuO'ng Juang ISO 6983) dUQ'c li~t ke trung bang 3.1. MIT G va cac rna M thea tieu chudn DIN 66025 uuqc the thi¢n trung hang 3.2 va 3,3.
Bimg 3.} : Cae dia chi dUIlc su dl,lng trong I~p tdnh NC
£I!a chi Y nghia £Ita chi Y nghia
A Quay quanh tr~c X M Chue nang bo sung B Quay quanh tr~e Y N S6 kh61 (block)
C Quay quanh tr~c Z 0 -
D SU hi~u chlnh dao P Dich chuyen Ian 3 song song X E Llfqng ch<;iy dao Ian hai Q Dich chuyen Ian 3 song song Y F Lw;mg ch9y dao R Dich chuyen nhanh theo hlJemg Z ho~c
G Chuc nang chuan bi
Dich chuyen Ian 3 song song Z
H - S T6c d6 tn,Jc chfnh
I Tham s6 nQi suy hoac T Dl,lng cl,l
blfaC ren song song X U Dich chuyen Ian 2 song song trl,lc X
J Tham so nQi suy hoac V D'!ch chuyen Ian 2 song song trl,lc Y blfaC ren song song Y W Dich chuyen Ian 2 song song trl,lc Z K Tham s6 nQi suy ho~c X Chuyen dich thea huang t11,Jc X
blJGe ren song song Z Y Chuyen dich thea huang trl,lc Y
L - Z Chuyen dich thea huang truc Z
- - -
Bang 3 2· Mil G thea DI:"I 66025
MaG Y nghia
GOO N¢i suy chq.y thang nhanh
GOI N¢i suy an dao ch<;ly thJng
G02 N¢i suy eh~y vong, thea ehieu kim dong h6 (eW) G03 N¢i suy eh,w vong, nguqe chieu kim dong h6 (CeW) G04 Thai giaD duy lrl
Tiii) bdng 3.2
MaG Y nghla
GlO Chuy~n d¢ng thAng, djnh vj nhanh trang h¢ tQa d¢ ClJ"C
Gil N¢i suy ch~y thing lrong tQa d¢ ClJ"C
GI2 N¢i suy ch'.lY vang trong tQa do clJ"c, thea CW
Gil N¢i suy ch~y vang trong tQa dQ ClJ"c, C'CW
G20/G21 Chuy~n don vi do sang inch/ milimet G22 GQi chuang trlnh can
G23 Phrln chuang trlnh l~p l<;ti
G24 L¢nh nhay vo dicu ki¢n G25 Chuytin d¢ng tOi di~·m chuin G26 Chuy~n d<)ng toi vi [r£ thay dao G40 Tat l¢nh bi! daa
G41/G42 Bu. ban kfnh tniil Bu. ban kinh phai (CRC)
G50/G51 Mieu ta quy d~o cuoi cimg bat dau/ket thuc (cha ti¢n)
G5l Huy bi) d~ch chuyen di~m khong
G54 D\ch chuy~n di~m khong ( thea h¢ ta~ d¢ tuy~t doi)
G55 Djch chuy6'n di~m khong tuy¢t d6i Ian 1
G56 Djch chuy~n di~m kh6ng tuy¢t doi bin 2
G57 Dich chuyen di~m khOng tuy¢t d6i hln 3
G58 D~ch chuyen diem kh6ng tuy¢t doi ian 4 G59 Djch chuyen diem khong , gia so
G90 Do thea tuy¢t d6i
G91 Do thea gia so G92 Gioi h~n toc d¢ quay
G94 Toc dQ an dao tfnh bAng mm/phut
G95 Toc d¢ an dao tfnh hang mmfl yang quay
G96 Toc d¢ cat kh6ng d6i bWtat (chi cha ti~n)
ng .. ae u ve cae c uc nang
B.i 33 C' " , h' o sung
MaM Y nghla
MOO Dlrng chuang trlnh (vi dl;l, M do kiem chi tiet)
M02 Ket thuc chU"ang {dnh
MOl Dong m~ch tr~c chinh, quay theo chi€u kim dong h6
M04 Dong m~ch trl}.c chlnh, quay ngU"qc chieu kim dong ho
Tic!} hdn<.; 3,3
-~- - -- -
j\L) G Y nghl<l
~106 "J'hay dao dil dlTqc chuan bi san (khil. nang l~p truac)
M07 Bat bam ch.n him mat 56 I
I
~108 B~I bum chIit Jam mal so 2
M09 Tilt bO'm chiit HUl1 mat
\-130 Ket thuc l~p trlnh
M80 Huy tat ca cac <l6i xUTig
M81 Doi xUTig thea tfl,lC Y
M82 D6i xUTig thea tfl:IC X
M83 Thay d6i diu to<:l dQ tfl,lC Z
M84 Doi Xlmg qua tfl:lC Xva Y
MRS D6i xUTig qua tfl}C Y va doi dau tfl,lC Z
M86 Doi xUTig qua tfl}C Y va doi dau tfl,lC Z
M99 Ket thuc chlTO'ng trlnh con
3.4.3.3. Vi d1,l ve I~p tdnh NC <, 1 - - ' co .--f---~---, "-, r-- c - , e- O 0 ", , 0 -;:-- 40 / I";iJ/'O . , +-' -1- .~.~. ~--~---~-• , ~,---+--- -+--- ~ ---" I j ) . ~G
M0t vi d\l v~ l(IP trlnh NC cho chi tiet 6 hlnh 3.32 duqc thl!c hi~n v6i b(' di~u khien MiliPlus, voi cae dieu ki~n sau:
+ Kich {hune phoi: 150x 150x 15 + St'f dl,mg cae dl,mg cl,l gia eong sau: - \'1: dao phay m<"!.t dau <DIS
- 1'2: dao phay ngon cl> 10 - T3: mGt khoan cl>4 - T4: mGi khoan cl>5
+ Gii thiet Iii phoi da duqc phay pM ; cae \6 d6u bfing nhau va hang ~5. Chuang trlnh NC co th~ vie'l nhl1 sau: