- LIC b6 di~u khicn giam sat trong m(>t h~ thong dieu khien ph:1n quyen PLC km
b) lIinll thang uk cdng /ORIC
MWI! IIII(fOalch) la mQt m<;lch duqc Slr dlJ.ng d~ chuy~n lin hi~u dau ra tMnh mQt tin hi~u lien tl.JC nho hDi..lt d¢ng
khiJi xuemg cac tiep di~m. M<J.ch nh6' d~lt dUQ"c khi J~p trlnh tie'p die'm ket hQP voi cu(m driu ra song ~ong voi cac d,IU vuo bang cach luu nang IUC)'ng cho me)t
x400 X401
Y400
Y430
CU¢11 khi nguon V~1O dIT ngat. Ml!ch nuy
Hinh 3.23 : MWh IIhit
tJ! duy trt giu tr~ng thiii nang luqng nhu
dUQ'c n~p cho de'n khi m':lch nh~11 dUQ'c dau nMp khac( hlnh3.23). 3.3.4.2. Nh~p chu'(1ng trinh
Moi duang ngang (ntic clla lhang) the' hi~n mc)t dong trong chuang trlnh va tO~1ll be) thang c6 th~ chuy~n thanh me)t chuang trinh. Chuang trlnh c6 the n<:lp thu cong, ho~c D<;IP vuo bang ban rhfm co cac ki hi¢u danh cho cac thanh philn thang vii. bang chuang trinh, sau d6 uic kf hi9u n~IY dUQ"c chuyc"n thanh ngon ngu may va hru l~i trang be) nha clla PLC.
D6i vai rnQt PLC nha d~ nh~p me)t chuang tdoh thang vao trang PLC oguoi ta Slr dlJ.ng cac rna gC)'i tri nh6', rnoi rna LUang ling vai mQt thanh rhan thang. Vi
dl,l: voi cac PLCs 10<;lt f cuu Misubishi cac ma nay Iii.: LJ): OUT: AND: OR: I: ORI: ANI: LDI: ANB: ORB: RST: SHF: K: END:
fial dau nH)t nac v6'i rn¢t tiCp di~m mo. MQt dau fa.
Mc)t thanh phao noi tiep/ chi l¢nh logic AND. Cac thanh phan song song/ chi l~Dh logic OR.
Chi I~nh logic NOT, I duqc su dl,lng trang lien kct v6i cac chi l¢nh khac de hien thj SI! nguqc hJi.
Chuc nang logic OR NOT. Chuc nang logic AND NOT.
Kh6i d,lu rn¢t nac thang vai tiep di~m dong. AND duqc su dl,lng vai hai mi.lch nha. OR dUQ"c Slr dl,lng voi hai rn<;lch nho. D~t h.li thanh ghi djch chuy~n /b¢ demo Chuy~n djch
Chen mt)t hang s6 Ket thuc thang.
Mil thu~\t nha cua cac nh'l san xuat kh:ic nhau Iii. khae nhau nhLfTIg kh6ng khac nhieu. Ngay nay C.lc b¢ oieu khicn PLC dU'qc ctip kern th~o thiet bi l~p trlnh ( l~p trlnh thu cong, thie't hi l~p trinh cong nghi¢p, I<~p tdnh trcn co sa may tinh)
C(1e nU,lcll haln Thili gi(/I/, don/i (Mu, d6n (timer. marker and counter): Nhieu
cong \'i¢c can den trl hoan thai gian hO(lC dem Sl! ki~n. NhiIng yeu cau nay co the: thoa man dU'Qc bai cac m<;l.ch brim th(1i gian (timer), dem (counter), ho~c
danh dau (marker). Nhiing m'.lch nay t~o ncn d~c trLfTIg clla PLC. Chung co tht dUQ"c oieu khien bai cac ehi I¢nh logic va the hi¢n trcn bi~u do thang. H¢ thong d~nh 56 st'r dl.J.ng cho cae chuc nang nay khac nhau tuy theo cac nha. san xuat. Vi du, Timerrr. Markerf}.l, Counter/C.
lllU~t ngu diim (point) dUQ"e Slr dl,mg eho m9t diem du Ii¢u Iii. lhanh phao dem, ghi ho~c tri hoan thCri gian. Nhu v~y 16 diem (points) eho timer co nghia Iil. c6 16 m~eh timer.lllU~t ngu tri lIoan (delay-on) dU'qe Slr dl.J.ng cte' the' hi~n kieu m~ch bam gi(j cha cho den mQt thai gian tr~ ClJ. the tmac khi dUQ"c mO.
Mqch b(/m tlilti gian (timer)
M,!-ch ham thai gian (timer) Iii cac chi thi dau ra, dU'Q"c su dl}.ng de kieh ho;;;t
ho~c huy kich hO<;tt 1TI¢t thiet bi sau mQt khoang thoi gian hc·t hi¢u llfc. Mi,lch timer dUQ"c coi lil. m~ch dau ra ben trong PLC, dU'Q'c oinh bang khming du~"1C tioh thb'i gian va cac dicu ki~n kh6i dQng va/ho~c dung chuc nang timer. VI dlJ., m'.lch ham gia dUQc yeu cau dong m¢t 56 oau xm:tt sau 5 phut ke tu khi nh~n ouqc tIn hi¢u bat dau (start sign). Da so cac timer la lo~i tinh thoi gian gium dan (tinh thai gian giam dan den gia tri d~t). Hlnh 3.24 the' hi~n m(Jt m,)ch thang 3 bac
X400 Y430 BUGC Chi thl
0 LD X400 OUT Y430 Y430 T450 2 LD Y430 K~ 0 3 OUT T450 X400 Y431 4 K 50 5 LD T450 6 OLT Y43!
eho timer va cae dong l¢nh ella chuang trinh Wang u-ng. Khi tiep di~m X400 dong, dfiu ra Y 430 duqe cap nang luqng; khi dong kel hqp tiep di~m Y 430, kh6i dQng b¢ bam thai gian (timer) T450, no se oong tiep di~m T450 (blnh thlli'mg a
tr':lng thai rna) ch(lm 5 giay (k=50). Khi rna tiep di~m cua timer. Y 431 duqc dong m<;lch.
Mqch danh d(/II (marker):
Maker co th~ coi nhu mQt co (flag) ho~c m<)t rale trang (internal relay) Ptc. Cae m,:\-eh maker ouqe Slr dl;mg M xac dinh logic di~u khj~n, b6 sung de: thl!e hi¢n tuan tl! dong m~eh va oan gian hoa nhitng m<)eh logic phvc t<)p. MQt so maker duqe cap pin nu6i (baettery back-up) de khbi oQng ho~c dong an toan thiet bi trong trui'mg hqp kh!ln cap (loi nguon cap). Hlnh 3.25 th~ hi¢n sa do thang si'r dl,mg maker va cae khoi l¢nh chuang trinh Wang u-ng: khi tiep diem X400 dong, cUQn day rale trang M300 (dia chi ella mQt rale nu6i pin M300) duqe cAp nang luqng. Nhu vlj.y tiep diem M300 duqe oong va ngay ca khi X400
rna do co slf co nguon, tiep diem M300 vAn duqc cap nang luqng. Dicu nay co nghia rang, dau ra duqe dieu khi~n boi M300 duqe cap nang luqng eho diJ co SIf co ngu6n. 1 .... 30.: Y'3CJ :-II-I - - - - : : , : : BIIOC o 2 3 4 Chith! LD X400 OR M300 OUT M300 LD M300 OUT Y300
llinh3.25: Mahr va text ell/Mllg Trinh M(1ch (b(j) deln (Counter) o 1 2 3 4 5 6 Chi thi LD X400 RST C460 LD X401 OUT C460 K 10 LD OUT C460 Y430
Hinh 3.26: Counter ra Text chuallg Irillh
d(mg lic!"p xue (VI dl;! . IhuCmg hO<;l1 d()ng theo kit!u dc'm thu~n (down counler). ILIe dem tlr gia Ir! Ihiet I~p tmac den U. ItIe cae kc', qu:i cJlIQ"c 1[11 djn kh6i gia Ir! d.)!. Khi d~1 gia Ir! D. liep dicim counler thay doi tr<;lng lhai. Hinh 3.26 the' hi¢n sa
do Ihang Slr dl:mg counter va va cae kh6i J¢nh chuang Idnh tUC1ng LIng. Ngay ttic l-!. ',,,: khi lier di~m X43D d6ng. counler dugc d<~t m()t gia Iri. b¢ dcm sC dCIll sO
xung Ill' licp di~m X4DJ. Khi d'.it duge gi;i Iri d.)t (Iruang hqp nilY iii 10), lic-p
di~m eua counter dong. Dau ra Y 430 duqe b~1 sau khi X40 J da dat 10 'wng .
NtYu ngay khi lil!p di~m X400 dong khi bQ dcm dang dc"m. counter ~C d<:l1 h~i VC
10.
Cae rhanh ghi djch chuylll( shift l"{'giJters)
M91 s6 cae role h6 Ifq c6
the nh6m cung nhau d6 hinh Ihanh thanh ghi, eap vung hru cac bil dan. Nhu v~y thanh ghl 8 bit Ihi Slr dl,lng 8 thanh
ghi phu. Thanh ghi dich
chuyen duge sil dl;lng VI eac bit co the dich chuyen dQe Iheo tung bil m¢t ve ben Iral khi e6 m!)t lin hi~u thfch hqp
nh~p vao thanh ghi. M¢I thanh gili dich ehuyen IhLrong c6 3 dubng dic.u
khi~n sau (hinh 3.27):