- C6 kha nang m9ng: Multipoint interface (MPI), PROFIBUS ho~c
b. Bang ky hi~u
Ky hi~u Dia chi Chu thich
Nang 10.0 Nut nh§n nang, thU'cmg ha Hc;1 10.1 Nut nh§n h9, thl.J'cmg ha Dung 10.2 Nut nh§n dung, thLI'ang d6ng
GH Tren 10.3 Cong tac hanh tr1nh tren, thLI'ang d6ng GH DLI'&i - 10.4 Cong tac hanh tr1nh dU'&i, thU'ang d6ng K1 Q0.0 Cuon day kh&i dong tu K1, nang gau K2 Q0.1 Cuon day kh&i donq tu K2, h9 qau
c. Bai t~p mau
Cac bai t~p m~u nay dU'Q'C giai v&i theo phan m§m STEP 7 Micro/win 32 V3.01.
1. Bai t~p 1: U'ng d1,mg cling logic, cac 1$nh ghi/x6a ti§p diem
Vi§t chU'D'ng tr1nh di§u khien thang may xay d1.,Png theo yeu cau sau::
- Khi nh§n nut nh§n nang, gau se dU'Q'C nang len d§n cong tac gi&i h9n tren th1 dung 19i. - Khi nh§n nut nh§n h9, gau se h9 xu5ng d§n cong tac gi&i h9n dU'&i th1 dung 19i.
- Khi dang nang hoc;1c h9, n§u nh§n nut nh§n dung th1 gau dung 19i.
Hay vi§t chU'O'ng tr1nh theo mo ta theo hai each: Cmg d1,mg cling logic va s& d1,mg cac 1$nh ghi x6a ti§p diem.
Kiem tra ho9t dong bang mo h1nh.
Bai giat
each 1: (mg d1,mg c6ng logic
ChLI'D'ng tr1nh dl.J'Q'C vi§t O' LAD:
Network 1 Nang,1D1.m,;_1 th;~ng may
10.0 10.2 10.3
QO□r I I
Network 2 Ha.1Dun,;_1 thang may
10.1 10.2 10.4
Q01r I I
ChLI'D'ng tr1nh dU'Q'C vi§t O' STL:
I I I Q0.1 I ! I QO.O I ! I
Khoa Di~n - Trucing TCN KTCN Hung Vuong
QO.O
( )
Q0.1
( )
~ETT.JORK 1 ;~/ I ;~/ I ;LD IO.O QO.O I0.2 I0.3 Q0.1 QO.O 0WETT.JORK 2 j / LD i~ ,. ~P. ~P1'T I0.1 Q0.1 I0.2 I0.4 QO.O QO.l
//Nang/ Dung than~r may
//Ha/Dung t.hang may
Cach 2: Si'.r dt,mg 1$nh Set/reset: ChU'O'ng tr1nh viet 6' LAD:
Network 1 Nang u-1ang may
10.0 Q0.1 Q0.0
I I I I ( s )
1
Network 2 Dung th3ing tnay khi den gioi han tren hoac an nut dung
Q0.0 R ) R )
Network 3 Ha thang may
10.1 Q0.0 Q0.1
I I I I ( s ) 1 1
Network 4 Dlmg thang may khi den gioi han duoi hoac an nut dung
ChU'D'ng tr1nh viet & STL:
NETWORK 1
lLD IO. 0
iAN QO .1 S QO. O, 1
NETWORK 2 //Dun,;, thang rnay khi den ,;;i-ioi han tren hoac an nut dun,;.r [LDN I0.2 .
~ON IO. 3 )R QO. O, 1 )R QO. O, 1
;NETWORK 3 // H,:s thang rnay
(//
riD IO. 1
1>.N QO. 0
ts QO .1, 1
(NETWORK 4 // Dung than,;, rnay khi den ,;;i-io i han duo i hoac an nut:. dung
\LDN IO. 2
ON IO. 4 'R Q0.1, 1 'R Q0.1, 1
Bai tap 2: SiP dt,mg Timer.
Viet chU'D'ng tr1nh di§u khien thang may xay dl,l'ng theo yeu c§u sau:
a/. Khi tin nut nang th1 gau dU'Q'C nang len, den gi&i h,;m tren th1 dl.l'ng 19i 5s, sau d6 tl,I'
d9ng h9 xu6ng. Ben gi&i h9n dU'&i th1 dl.l'ng.
Trang qua tr1nh nang len hoc;1c h9 xu6ng cOng c6 the dl.l'ng.
b/. Khi tin nut nang th1 gau dU'Q'C nang len, den gi&i h9n tren th1 dl.l'ng 19i 5s, sau d6 tl,I' d9ng h9 xu6ng den gi&i h9n dU'&i th1 dl.l'ng 19i 1 Os, sau d6 tl,I' d9ng nang len.
Thang cOng c6 the nang len khi chLI'a he 1 Os ch& tl,I' d9ng ma c6 ngLI'&i tin nut nang.
Giai:
Cau a: ChU'O'ng tr1nh vi§t & LAD:
Network 1 Nang thang may
10.0 Q0.1 Q0.0