UY
BAN
NHAN
DAN
TINH KHANH
HOA
SS
Y
TE
•s.yj^
BAO CAO
Kfr QUH BE TAI
NCKH CAP
IINH
m
THIET BI CONG CONG TREN MANG MAY TINH
•
•
•
BfeNH VlfeN
TINH
KHANH HOA
Co'
quan
chii
tri
SOf
Y TE
KH^NIJ
HO^
Co"
quan thyc hien
BENH
VIENja^KHPA-TINH
Mai
Thj
Thanh
SOKH
Co
quan quan ly
CONG
NGHI
aS.NGUYEN MANH TIEN
HHOA
d^Oiu
^Qfu>fip
Muc luc
• •
Trang
Danh muc cac hinh anh 4
Dien Giai
Tir
Viet Tat Va Tieng Anh
6
Tieng viet
6
Tieng anh
6
CHtTONGI
8
TONG
QUAN 8
I. DAT VAN DE 8
n. TINH HINH NGHIEN
ClTU
TRONG VA NGOAI
NlTOC
11
1.
Tinh hinh nghien
ciru
ngoai
nirffc:
11
2.
Tinh hinh nghien
cihi
trong
niro'c
14
III.
NOI DUNG NGHIEN
ClTU,
PHU'ONG
PHAP NGHIEN
ClTU,
MUC
TIEU DE TAI. 15
1.
Muc tieu de tai: 15
2.
Noi dung: 15
3.
Phtfcng
phap nghien
ciiu
de tai: 15
4.
San pham de tai: 15
CHUONG II 16
KET QUA NGHIEN
ClTU
16
I. KET QUA DAT DUOC 16
1.
Van de nang cap Controller 16
1.1 Controller gian tiep
16
1.2 Controller true tiep
19
2.
Che tao mdi cac Bridge, Switch co tac dung md rong he thong dong thdi
tang them
hf
so khuech dai tin hieu
du-dng
truyen 22
3.
Chu-ffng
trinh viet
bSng
ngon
ngu-
Assembly cho Hub, Bridge, Switch,
Controller 25
4.
Xay
dyng
he thong: 25
5.
Xay dyng he thong bang ma hoa 27
6.
Chirong
trinh phan mem may tinh 27
Mot so
SO"
do thuat toan 31
7.
Phu-o-ng
phap bao ve 34
8. San pham ciia de tai 34
II.
Ban luan 54
1.
Danh gia ve
hf
thong 54
2.
Bo Controller 56
3.
Mach Bridge, Switch, Hub 57
4.
Ve mat
Icinh
te 57
5.
Ve mat cong nghe • 58
6. So sanh giira he thdng cu va he thong nghien cuu nang cap: 58
7.
Nhiing van de
chu-a
dat
du"0"c:
59
CHl/OTVGin
61
KET LUAN VA KIEN NGHI 61
2
I.
KET
LUAN 61
IL KIEN NGHI 62
PHU
LUC '. 64
1.
He thong kiem soat tren mang cua hang Jumboswith 64
2.
He thdng
kigm
soat
thiSt
bi tren mang XWEB3000 cua hang DIXELL. 66
3.
Controller E-CLASS cua hang DIXELL 67
4.
Cau hinh mang ao RS485 theo tieu chuan Ethernet 67
5 .
IC
Ddng ho thai gian thyc DS1307 70
5.1.
Sa
do dja chi RAM va RTC: 72
5.2. Che do che hoat dong ciia DS1307 : 74
6. IC cam bien nhiet do LM335: 77
6.1.
Mo ta chung: 77
6.2. Dac trung: 78
TAI LIEU THAM KHAO 79
1.
Sach: 79
2.
Website: 79
Danh muc cac
hinh
anh
Trang
Bang
1
: Mot so chuan ket noi thong dung hien nay 10
Hinh 1.1: He thong mang
ciia
hang DIXELL 12
Hinh 1.2 : He thong mang
cua
hang Smith 13
Hinh 1.3: He thong mang cua hang Jumboswitch 14
Hinh
2.1.
Mach ddng ho dung IC thdi gian thirc DS1307 17
Hinh 2.2. Mach cam bien nhiet do dung IC LM335 18
Hinh
2.3.
Mach cam bien dong va
bat tin
hieu ngat 18
Hinh 2.4: Mach vi dieu khien dieu khien thiet bi va luu trii
dii
lieu 20
Hinh 2.5: Mach dieu khien, mach do dong, nhiet do, mach nguon 21
Hinh
2.6:
Mach Switch 8 port 23
Hinh 2.7: Mach Bridge 8 port 24
Hinh 2.8: Cau
true 1
mang ST 26
Hinh 2.9: Bieu do nhiet do va dong dien hoat dong cua may dieu hoa tai phdng do
dien nao do 28
Hinh 2.10: Bieu do nhiet do va dong dien hoat dong cua may dieu hoa tai phdng
cap mau 29
Hinh
2.11:
Bieu do nhiet do va dong dien hoat dong
ciia
may dieu hoa tai phong
sieu am
1
30
Hinh 2.13a: So do ket noi toan he thong tai phong VTTB (lau
1
khu hau can) 35
Hinh
2.13b:
So dd ket noi he thong dieu khien may hut trung tam va may dieu hda
khoaHSCC
36
Hinh 2.13c: So dd
kdt
noi he thdng dieu khien may dieu hoa khoa Xet Nghiem
Huyet Hoc (tang
1
khu 3 tang) 37
Hinh
2.13d:
So
d6 kit
ndi he thong dieu khien may dieu hoa khoa Chan Doan Hinh
Anh 38
Hinh
2.13e:
So dd kk ndi he thdng
diSu
khiln may dieu hoa khu cip cuu (phdng
noi soi) 39
Hinh 2.14a: Mach
di6u
khiln, do dong chay, dong khdi dong, nhiet do va mach
ngudn sau khi ve
xon^
40
Hinh 2.14b: Mach dieu khiln, do dong chay, dong khdi dong, nhiet do va mach
ngudn sau khi lap rap 41
Hinh 2.15a: Mach vi dieu khien va hien thi
sau
khi ve xong 42
Hinh 2.15b: Mach vi dieu khien va hien thi sau khi lap rap 43
Hinh 2.15c: Bo Controller sau khi dugc ket noi 44
Hinh 2.15d: Bo Controller da hoan thanh va dong hop 45
Hinh 2.16a: Mach Bridge 8 port sau khi ve xong 46
Hinh 2.16b: Mach Bridge 8 port sau khi lap rap 47
Hinh 2.16c: Mach Bridge 8
port
hoan thanh va dong hop 48
Hinh 2.17a: Mach Switch 8 port sau khi ve xong 49
Hinh 2.17b: Mach Switch 8 port sau lap rap 50
Hinh
2.17c:
Mach Switch 8 port hoan thanh va dong hop 51
4
Hinh 2.18a: Mach HUB 16 port sau khi ve xong 52
Hinh 2.18 b: Mach HUB 8 port hoan thanh va dong hop 53
Hinh 2.19: He thing mang cua hang DIXELL 54
Hinh 2.20 He thdng mang XWEB5000 55
Hinh 2.21 He thong mang ST 56
Dien Giai Tu- Viet Tat Va Tieng Anh
CDHA
CCL
CNK
HSCC
MDH
Sd KHCN
UBND
DK
XNHH
XQ
Tieng
Viet
: Chan doan hinh anh
r
: Cap cuu luu
: Chong nhiem khuan
* ^
r
:
Hoi sue
cap cuu
: May dieu hoa
: Sd khoa hoc cong nghe
: Uy ban nhan dan
: dieu khien
: Xet nghiem huyet hoc
: X-Quang
ADC
And
ASCII
BCD
Board
Bridge
Controller
CPU
CT
EPROM
GND
Tieng anh
Analog Digital Converter; chuyen doi tuong tu sang so
Cong va
Americain Standard Code for Information Interchange
Binary Coded Decemal; he dem nhi phan
bang mach
cau
Bo dieu khien
Central Processing Unit; don vi (khdi) xu ly trung tam
Computer topography; cat lop bang may tinh
Eraser Programm ROM; Bo nha chi doc co the xoa
dugc
Ground; ndi dat
Hard lock
I/O
Intelligent Hub
KB
LAN
No
On-chip
PC
Port
R/W
RAM
Remote anything
ROM
Server
Slaver
SQL
Switch
TTL
Yes
: Khoa bang phan cung
:
Input/Output;
vao/ra
: Hub thong minh
: Kilo Bytes
: Local Area Network ; mang
cue
bg
:Sai
: Tren chip
: Personal Computer; may tinh ca nhan
: Cdng
: read/write; dgc/ghi
: Random Access Memory; bg nhd truy cap ngau nhien
: Chuong
trinh
ung dung dieu khien may tinh
tir
xa
: Read Only Memory; bg nhd chi dgc
:Chu
:Td
: Structured Query Language; Ngon ngil truy vin cc
true
: Chuyen mach
: Transistor Transistor Logic
: Dung
CHUONGI
TONG QUAN
L DAT VAN DE
Tai Benh Vien Da Khoa Tinh Khanh Hoa hien dugc trang bi nhieu may mdc
hien dai de phuc vu cong tac kham,
chiJa
benh, phuc vu nhu cau sinh hoat
cila
benh
nhan va nhan vien benh vien. Tuy nhien mot sd thiet bi cdng cong nam rai rac tai
cac khoa phong rat kho kiem soat qui trinh hoat dgng
ciia
chung,
din
den hu hong
thiet bi, anh huong den sue khoe
ciia
con ngudi,
thit
thoat dien nang nhu: thiet bi
dieu hoa nhiet do, he thdng say la, he thdng hut trung tam. Cu the:
- May dieu hoa tai cac khoa, phdng benh nhan, phdng may nhan vien thudng dieu
chinh che do lanh khdng hgp ly dan den may dieu hoa chay lien tuc, do chenh
lech giua mdi
trudng
ben trong phdng va ngoai phdng qua cao anh hudng den
sue
khoe, ddng thdi may dieu hoa kho dap ung dugc, dan den hdng thiet bi.
- Tram hut trung tam dung cho 4 khoa: Phdng md, Khoa Nhi, San, Hdi Sue Cap
Cuu, do ngudi dung lau lau quen dong van. Sau khi thuc hien hut hoac ddng
van khdng het, dan den hien tugng rd ri lam may hut chay lien tuc lam tdn that
dien nang, giam tudi thg
ciia
thiet bi va gay hu hdng.
- He thdng siy la cua Khoa Chdng Nhiem Khuan: Day la he thdng su dung
ngudn dien cdng suat
Idn,
neu quy trinh su dung khdng diing, thdi gian
sir
dung
keo dai dl
din
den hien tugng chay, chap dien.
-
Tir
nhu
clu
thuc tl do,
cin
phai nghien cuu dua thiet bi nay ket ndi vdi mot
may tinh tai trung tam
nhlm
tan dung nhiing uu diem cua may tinh kiem soat,
dilu khiln thilt bi
chSt
che hon, han
chi
nhiing tac ddng sai sdt neu tren, bao ve
thilt bi khdi hu hdng, nang cao tudi thg
ciia
thiet bi, tiet kiem dien nang.
Nam 2004, Benh vien da khoa tinh Khanh Hda da dugc UBND tinh, sd KHCN
cho tiln hanh nghien cuu dk tai: "Xay dung he thdng kilm soat va dieu khien thiet
bi cdng cong tren mang may tinh" dk tai da dugc hoi ddng
khoa
hgc tinh Khanh
Hda nghiem thu thang 03/2006 va dugc danh gia dat loai kha.
DI
tai da dat dugc
cac ket qua sau:
a. Kilm soat chat che thilt bi, nang cao muc an toan trong
sii
dung thilt bj
- Vdi mot sd thdng sd nhu nhiet do phdng
lam
viec, ddng chay
ciia
may dugc dua
vl vi
xii"
ly va may tinh da giiip cho ngudi
sii"
dung, can bg ky thuat cd day
dii
cac
ylu td
cin
thilt dl theo
do!
qua trinh hoat dgng
ciia
may. Tai trung tam, can bg ky
thuat cd
thi
phat hien kip thdi va dilu chinh lai thong
s6
nlu nhu ngudi
sii
dung
cai dat sai, khong phu hgp.
- Trong thdi gian ngan chay
thii
tai benh vien, he thdng da giiip dam bao cho toan
bd
15
phdng khoa Chan doan hinh anh, 7 phdng khoa Cap cuu luu duy tri nhiet do
tir
25°C
trd len.
- Vdi thdng sd ddng dien truyen tu he thdng
hiit
trung tam len may tinh so sanh vdi
bd thdi gian
ciia
chuong trinh, ngudi can bd ky thuat da co the kiem tra theo ddi
qua trinh hoat dgng
ciia
may
hiit.
Neu he thdng bi hd hoac ngudi su dung quen tat
cac van
hiit
tai cac khoa, can bg ky thuat se phat hien thay va tien hanh kiem tra he
thdng hoac cd the cat may neu thay can thiet.
- Vdi he thdng may say, la tai khoa Chdng nhiem khuan, can bd ky thuat cd the
giam sat dugc qua trinh boat dgng
ciia
may ddng thdi theo ddi dugc
miic
do tda
nhiet tu cap dan dien
ciia
he thong, qua do cd the
xii
ly dugc ngay neu cd
sir
cd xay
ra hoac ngudi
sii
dung
sii
dung sai muc dich (chay may trong thdi gian nang rao,
chay may ngoai thdi gian lam viec de phuc vu ca nhan). Vdi phuong phap ket ndi
nhu de tai toan bg he thdng bao ve cii van dugc
giU
nguyen ket hgp vdi mot sd bao
ve mdi nhu bao ve qua dong qua nhiet, he thdng se dugc bao ve an toan hon.
Qua thdng sd ddng hoat dgng
ciia
may, can bg ky thuat cd the chan doan sdm
mot sd benh
ciia
thiet bj nhu:
- Ddng may chay cao ma nhiet do phdng khdng xudng, may cd the bi do ban,
tac nghen dudng
din
gas. vv
- Ddng may chay binh thudng ma phdng khdng dat do lanh hoac cham dat do
lanh, may cd the bi do ban dan lanh.
- May chay ddng thap, may cd the bj thieu gas.
- May chay ddng cao do lanh dat binh thudng cd the nap du gas.v.v
b.
Nang cao hieu qua su dung thilt bj va hieu qua phuc vu benh nhan
- Trong qua trinh theo ddi sau khi
ISp
dat he thdng mdi, do dieu chinh dugc cac
thdng sd nhiet do
ciia
phdng may phu hgp (tu
25°C
- 28°C), may dilu hda
hoat dgng dn dinh, cd thdi gian nghi khdng nhu trudc day nhieu may chay
24/24 do thdng sd cai dat may qua thap gay ra
thit
thoat dien nang.
- Mot sd may dilu hoa khi
kit
ndi vao he thdng da phat hien ra tinh trang thilu
gas,
do dan ndng nen can bg ky thuat da
khic
phuc ngay dam bao cho may
dilu hda hoat dgng diing ehl do tranh tinh trang may chay mai ma nhiet do
phdng khdng ha xudng.
- Vdi nhiet do phong dugc duy tri tu
25°C
-
26°C,
ngudi
sii
dung va ngudi
benh se khong bi tinh trang qua ndng hay qua lanh.
- Vdi viec
sii
dung hgp ly diing cac thilt bj, ngoai tac dung nang cao tuoi thg,
giam hu hdng cho thiet bj cdn cd tac dung tiet kiem mot lugng dien nang
Idn.
c. Thuc hien tu ddng hda trong
sii
dung va bao quan thilt bi.
He thdng dilu hda
ciia
khoa CDHA va khoa CCL (gdm 29
may).
He thdng
hiit
trung tam, he thdng
sly,
la (2 may
sly,^
1
may la)
ciia
khoa CNK dugc ndi vao he
thdng cua de tai, bang phan mem da viet cac thilt bi nay se thuc hien dugc
chi
do
ddng md tu ddng khi can thiet. Tu ddng
ngit
khi cd
sir c6
va gui cac canh bao vl
trung tam de ngudi quan ly
nim bit
dugc kha nang hoat dgng
cila
thilt bj.
Vdi uu dilm vugt trdi
ciia
may tinh, he thdng kilm soat va dilu khiln thilt bi
tren mang may tinh cdn cd the dieu chinh kip thdi cac yeu cau theo diing nhu cau
ciia
ngudi
sii
dung mot
each
linh hoat, thuan tien, de dang hon cac he thdng don le
hien nay. Ve mat dien nang, ngudi quan ly cd the dieu hda giiia cung va cau mot
each
hai hda,hgp ly. Ndi chung de tai co ban da giai quyet dugc cac muc tieu de ra.
<•
Tuy nhien he thdng cdn mot sd van de han che va mot sd van de chua dugc
nghien
ciiu
can phai tiep tuc nghien
ciiu
nhu sau:
> Mot sd van de can nghien
ciiu
tiep:
- Mang da nghien
ciiu
chi trien khai tren dien hep khi md rdng se trd ngai ve
mat ky thuat ciing nhu tdn kem ve mat kinh te (phai tang nhieu may tinh va he
thdng trd nen rdi ram phiic tap khdng kha thi trong thuc te). Cu the:
+ 1 HUB da nghien
ciiu
hien nay chi cd 16 port
«
quan ly dugc 16 khu vuc
(phdng). Nhu vay neu sd khu vuc tang len thi HUB khdng dap
ling
dugc can phai
trang bi them may tinh va phai viet them chuong trinh bd sung. Nhu vay ca phan
cung
lln
phan mem chi ung dung dugc trong
1
pham vi nhat dinh vdi sd lugng khu
vuc han che.
+ Neu ap dung 1 sd chuan thdng dung hien nay thi ciing chi quan ly 1 sd lugng
thiet bi nhu sau:
PART
NUMBE
R
MAX481
MAX483
MAX485
MAX488
MAX489
MAX490
MAX49I
HALF/FU
LL
DUPLEX
Half
Half
Half
Half
Full
Full
Full
DATA
RATE
(Mbps)
2.5
0.25
2.5
0.25
0.25
2.5
2.5
SLEW-RATE
LIMITE
No
Yes
No
Yes
Yes
No
No
LOW-POWER
SHUTDOWN
Yes
Yes
No
No
No
No
No
RECEIVER/
DRIVER
ENABLE
Yes
Yes
Yes
No
Yes
No
Yes
QUIESCENT
CURRENT
(HA)
300
120
300
120
120
300
300
NUMBER OF
TRANSMITTERS
ON BUS
32
32
32
32
32
32
32
PIN
COUNT
8
8
8
8
14
8
14
Bang
1
:
M9t
so chuan ket noi thong dung hien nay
Nhu vay, khi triln khai he thdng tai benh vien theo chuan nay ciing khdng giai
quyet dugc van de da neu ra.
10
- Tat ca cac thdng sd
ciia
thilt bi trong he thdng da nghien
ciiu
tai benh vien da
khoa tinh Khanh Hda hien nay khi chuyin len may tinh
chi thiy
dugc
nhUng
gia tri
tiic
thdi khi ngudi
sii
dung md may tinh xem. Chua luu dugc thdng sd
ciia
thilt bi trong
1
khoang thdi gian
nhit
dinh
Vi vay dk dua vao
ling
dung mot
each
hieu qua
cin
tilp tuc nghien
ciiu
he
thdng vdi
dly dii
Bridge, Switch cung vdi chuong trinh
ciia
he thdng (tuong duang
1 mang LAN) va chuong trinh quan ly thdng sd cac thilt bi trong he thdng trong
qua trinh thiet bj hoat ddng
- Van de bao mat cua he thong chua dugc nghien
ciiu
> Mot sd van dk cdn ban ehl
cin
hoan thien :
- Cac hinh thiic canh bao chua dugc tdi uu.
- Cac
dO"
lieu dieu khien truyen xudng cac Controller tai cac khoa phdng khdng
luu tril dugc khi
mit
dien phai
mit
cdng cai dat lai.
- Phan mem chua hoan thien, chua tien ich
- Controller dat tai cac khoa thiet kl cdn don gian it tinh nang, kha nang
ling
dung chua cao
- Viec dat may tinh tai cac khoa qua thdi gian su dung bdc
Id
nhieu bat tien,
nhan vien tai khoa hay
sii
dung may tinh vao muc dich khac hoac tat may do
dd trung tam khdng truy cap vao he thdng cua khoa dugc
. - He thdng khdng ghi lai dugc cac dir lieu trong qua trinh hoat ddng do dd han
che viec danh gia tinh trang hu hdng cua thiet bj cung nhu nhung yeu td cd the
dan den hu hdng thiet bi mot
each
hieu qua, lam giam dang ke cac tien ich cua
he thdng
U.
TiNH HINH NGHIEN
ClTU
TRONG VA NGOAI
NU6C
1.
Tinh
hinh nghien cuu ngoai
nu-dc:
Hien nay d cac nude cd nen khoa hgc tien tien viec kiem soat cac thiet bi tren
may tinh da trd thanh phd bien. Cac thiet bi tai cac co sd san xuat, cac sieu thi, cac
CO
sd ddng lanh, trung tam dieu phdi giao thdng, dieu phdi dien nang vv deu
da dugc ket ndi vdi may tinh hoac lien ket thanh mang. Tat ca boat ddng
ciia
he
thdng dugc dilu khiln tai mot trung tam thdng qua may tinh hoac nhieu may tinh
trong he thdng mang. Thdng qua may tinh cac thiet bi dugc kiem soat chat che
ban, chinh xac hon va tam kiem soat dugc md rdng hon dap
ling
dugc day du cac
yeu cau ddi hdi
ciia
ky thuat va yeu cau
sii
dung thuc te. Cd the tham khao he
thdng
ciia
mot so hang cd cau tnic tuong tu cd kha nang dap
ling
dugc yeu cau ma
de tai da dua ra
11
•
He
thong mgng
h§ng
DIXELL
Hang DIXELL c6 nhieu
he
thong dieu khien co the ket noi vdi may tinh va
kiem
so^t dirge
tu trung tam nhu XJ500,
WebBOO,
WebSOO,
Web3000,Web5000
Trong do
he
thdng
WebSOOO
la san pham
mcri nhit ciia
hang. (Xem Hinh 1.1)
Intranet/Internet connection linking capabilities
RS485
NETWORK
XWEB
MODEM
wfth
interna) modem
OR
I
.
))
PROVIDER
^
PORTABLE
PHONE
0
M
PORTASLE
PHONE
I
»)
(« '«
0)
(«
£
'))
(«
LOCAL PC
STANDARD BRCWSER
SMARTPHONE
REMOTE PC
STANDARD BROWSER
Hmh 1.1:
He
thdng mgng cua hang DIXELL (hinh nguon tu dia chi
http
://www.
weissinstruments.
com/XWEB500 .pdf)
12
Theo tai lieu gidi thieu, he thdng XWeb5000 bao gdm:
-
01
mang RS485
kit
ndi cac Controller vdi bd XWeb5000
-
01 bd
XWeb5000
de
lien
ket vdi may
tinh thdng
qua
internet.
Tdi
da
XwebSOOO
kiem soat dugc 247 Controller
bd
Xweb5000
cd
clu true
tuong
duong mot may tinh cd tdc do
IGHZ,
d ciing
80GB.
- Mot may tinh lien
kit
vdi
XWebSOOO
'
f
\ r r
Cau tnic
ciia
he thdng nay ve ca ban gidng vdi cau tnic da thuc hien giai doan
1
(bd Xweb5000
tuong
duong 1 may tinh dat tai cac khoa)
do dd
neu trien khai
he
thdng nay tai benh vien
se
mac phai 1 sd van de da neu nhu gia thanh dat ngoai
ra
phai phu thugc vao phan mem lan phan ciing
ciia
hang, khdng tan dung dugc ket
qua
ciia
giai doan
1,
khdng trien khai dugc
1
sd ling dung theo y mudn
• He thdng mang
ciia
hang Smith
VIRTUAL RS485/422
EXAMPLE
VIRTUAL RS232/RS48S/RS42Z
NETWORK
RS23Z
RS485
RS422
RS232
DEVICE
or
RS485/RS4Z2
NETWORK
A
CARD READER
B
HOST/MASTER
j
J
CONTROLLER
'
Internet
Virtual
Connection
XPC0M1
RS48S
BRIDGE
LAN OR
WATi
using
ETHERNET
This
Could be
Internet
with 1000's
of miles distance
behveen
XPC0M1
units
TCP INTERNET BRIDGE
RS485/RS422
NETWORIt
B
ETHERNET LOCAL AREA
NETWORK
(LAN)
XPCOMl L I
L
XPCOMl LJ
UDP
NET
r—*
*-
UDP NET
r-|
4B5/422
[
485/422
[*
1
f
XPCOMl
UDP NET
485/422
y
RS48S
RS422
RS48S/RS422
NETWORK
c
XPCOMl
UDP
LAN NETWORK
Hinh
1.2
: He thdng mang
ciia
hang Smith (hinh ngudn
tu
dja chi
)
Hang Smith thilt
kl
cac Xpcoml
dl
kit
ndi vdi nhilu mang rs485/422 thdng qua
internet hoac thdng qua mang
cue
bd. He thdng mang nay
vl
qui
md
cd
the trien
13
khai rdng khdng ban che ve sd lugng, cau tnic mang don gian de thuc hien tuy
nhien khi
ling
dung tai benh vien
vln
gap phai 1 sd trd ngai nlu sd lugng tang len
vai tram thiet bi se lam cho mang benh vien bi cham tre
dan^
kl, kha nang bao mat
he thdng se rat khd, ngoai ra van bi phu thuoc ca
phin
mem va phan cung, khd
trien khai cac
ling
dung theo y mudn (Xem hinh
1.2)
• He thdng mang
ciia
hang Jumboswitch
Protective
Relay
/V7
11:1 13
RS-232
CD
TC3847-3
a
IEJC3
RS^as
' ~S
r
TC3847-3
TC3e47-3
PrDtective
Relay
Protective
Relay
RS-485
Typical
Teteprotection
Application using TC3847-3 Serial Data
Multiplexers
Protective
Relay
Hinh
1.3:
He thdng mang
ciia
hang Jumboswitch (hinh ngudn tu dia chi
Hang Jumboswitch thilt ke cac bd
tc3 847-3
cd 4 kenh rs485 nham thiet
lap
cac bd
tc3847-3
khac tao thanh mang dien rdng dieu khien, cai
dSt,
quan ly cac relay bao
ve thdng qua web, cau tnic he thdng mang nay gan gidng vdi hang Smith. (Xem
hinh 1.3)
2.
Tinh hinh nghien
cihi
trong
nude
Tai Viet Nam mot sd he thdng theo ddi, dilu khien giao thdng, cac sieu thj, cac
he thdng ddng lanh
Idn
ciing cd nhilu noi dugc ket ndi vdi he thdng may tinh trung
tam. Tuy nhien, cac thilt bj nay dlu nhap ngoai, chua thay tai lieu nao ndi ve mot
he thdng tuong tu do Viet Nam san xuat
• Trong lanh vuc y te:
Tai cac benh vien
Ion
nhu Benh vien Chg Ray, Benh vien Bach Mai,
Mdi chi
cd cac he thdng mang quan ly eo sd du lieu. Van de nghien
ciiu
quan ly thiet bi
cdng cdng dua vao kilm soat, dieu khien tren may tinh va mang may tinh chua
duoc dau tu.
14
in.
NOI DUNG NGHIEN
CtTU,
PHlTONG
PHAP NGHIEN
CLTU,
MUC
TIEU DE TAI.
1.
Muc tieu de tai:
Md rdng pham vi kiem soat thiet bi
ciia
he thdng
Bao dam kiem soat tu dgng hda toan bd he thdng
Nang cao va hoan thien phan mem dieu khien giam sat tap trung toan bd he
thdng
2.
Noi dung:
• Nghien
ciiu
phuong an md rdng he thdng, nghien
ciiu
giai phap cho mang
dien rdng.
- Nghien
ciiu
thiet ke phan ciing de nang cao kha nang md rdng viing kiem soat
dieu khien he thdng, bao gdm: Mach Controller, HUB, Bridge, Switch.
• Viet chucmg trinh cho Controller, HUB, Bridge, Switch bang ngdn ngii
assembly, viet chuong trinh cho he thdng bang ngdn ngir lap trinh Visual
basic,
viet chuong trinh phan mem quan ly ca sd dil lieu cho toan bd he thdng,
quan ly cac thdng tin
ciia
thiet bi.
- Nghien
ciiu
phuong an bao ve mang cho he thdng.
- Ket ndi he thdng mdi vdi he thdng
cii
da nghien
ciiu
thanh mot mang dien
rdng kiem soat bang mot may tinh duy nhat.
- Lap chay thu nghiem trong benh vien, danh gia hieu qua he thdng dugc nang
cap so vdi he thdng cii.
3.
Phu'cng
phap nghien
ciru
de tai:
Phuong phap phan tich nghien
ciiu thii
nghiem ky thuat
- Nghien
ciiu
cac tai lieu
sin
cd, phan tich so sanh vdi dac diem thuc te
tii
thiet
bi
sin
cd tai benh vien, dh ra giai phap thilt kl, phu hgp vdi tinh hinh thuc te
tai benh vien
- Tu nghien
ciiu
nhiing van de khdng ed tai lieu
- Thuc hien chay
thii
nghiem, phan tich so sanh tim ra giai phap tdi uu
4.
San pham de tai:
- Phan mem may tinh giam sat va dieu khien.
- Mot sd phan ciing dac hieu dung cho he thdng.
15
CHUOTVG
II
KET QUA NGHIEN
ClTU
I. KET QUA DAT
DUgfC
Sau mot nam nghien
ciiu
de tai da xay dung dugc mot he thdng mang chuyen
dung de kiem soat, dieu khien thiet bi (tac gia tam ggi la mang ST). He thdng mang
cd the ket ndi kiem soat va dieu khien khdng gidi ban cac thiet bi neu ket ndi nhieu
may tinh vdi nhau theo mang cue bd hoac mang internet. Mang ST cd the kiem
soat, dieu khien may dieu hda, may
sly,
tram
hiit
trung tam, cac ngudn dien, cac
relay bao ve, he thdng chieu sang cdng cdng, he thdng bao chay mot
each
linh
boat theo y mudn
eiia
ngudi
sii
dung thdng qua phan mem va
each
ket ndi thiet bi
vdi Controller ( bd dieu khien ) . He thdng nay cd kha nang truy cap theo ddi, dieu
khien tren may tinh thdng qua mang internet vdi mot phan mem
ling
dung nhu da
•
nghien
ciiu
trong giai doan mot. He thdng nay bao gdm:
• Cac Controller dat tai cac khoa phdng cd cdng dung kiem soat, dieu khien
thiet bi dieu hda, tram
hiit
trung tam, may say, bao chay
• Cac Switch, Brigde, Hub tao thanh mang dien rdng kiem soat dugc 3072
thiet bi cho mot may tinh (vdi cau tnic mang da lap tai benh vien) va len den
32768
thiet bi neu md rdng het kha nang
ciia
mang da nghien
ciiu
Mang ST
kit
ndi vdi nhau
bing
may tinh thdng qua mang Ethernet hoac
internet. Sd thilt bi dugc kiem soat bang sd thiet bi
ciia 1
mang ST nhan vdi
sd mang ST ket ndi vdi nhau
He thdng mang nay cd nhung ndi dung dugc nghien
ciiu
nang cap vdi nhiing
ndi dung dugc nghien
ciiu
mdi nhu sau:
1.
Vin
de nang
cSp
Controller
Controller dat tai cac khoa phdng dugc nghien
ciiu
va ehl tao
nang^cap
thanh 2
loai cd
thi
tam ggi la Controller gian tilp va Controller true tilp, mdi
ConUoller
gdm 2 board mach ed cac
dIu
cam biln nhiet dg va cam bien ddng, moi mot
Controller kilm soat dugc 3 thilt
bi,
2 thilt bi dilu hda nhiet do, 1 thilt bj bao
khdi. Controller nay cd
thi
dilu khiln cac thilt bi khac
bing
each thay ddi
each
kit
ndi thilt bi vdi cdng cd
sin ciia
Controller sau do khai bao lai tren phan
mem he thdng.
1.1 Controller gian tiep
Controller nay vl ca ban gidng Controller dugc nghien
ciiu
trong giai doan
mot, khi
kit
ndi vdi thilt bi thi
kit
ndi noi tilp, thilt bi se boat dgng dugc khi
•
16
cac thdng sd
ciia
ngudi
sii
dung va thdng sd
ciia
trung tam nam trong ciing 1
mien (da dien giai trong de tai trudc).
- Controller nay dugc nghien
ciiu
va lap dat them IC thdi gian thuc
DS1307
nham luu trii cac gia tri cai dat khi mat dien, luu trir dugc ngay gid he thdng
(Xem hinh
2.1)
to P2.6
32.768KHZ
Y3
SCL DS1307
- BT2
I
IT
BATTERY;
:C8
i .1UF
U17
X1
X2
SCL
VBAT
VCC
SDA
SQW/OUT
SDA
7 -
DS
307
R16\
2.2k<
R50
2.2k
to P2.7
VCC CIRCLE
DS1307
Hinh
2.1.
Mach ddng hd diing IC thdi gian thuc
DS 1307
- Cac vi dilu khiln
ciia
Controller dlu cd mot dia chi rieng nen thuan
ti$n
khi
cai dat va khdng phu thugc vao phuong phap ket ndi song song hay ndi tiep vdi
he thdng mang (ket ndi dugc theo chuan RS488)
-
DIU
cam biln nhiet do dugc thay
bing
IC LM335 (xem hinh 2.2) cd gia thanh
re hon hang tram
lln dlu
dd cua hang DIXELL ap dung trong dl tai trudc ma
do chinh xac van bao dam. (xem gidi thieu dae tinh IC
LM335
d
phin
phu luc)
17
DZ8
3V
D7
LM335/T0'32
•
R54
Ik
R56
33k
VR47
lOk
VR49
10k
R53
1,2k
10k
1;
VR48
«•
?
r
R55
200k
-9v
O
U2G
LW741
-^~6_
den kenh
1
ADC0e09
Hinh 2.2. Mach cam bien nhiet do
diing
IC LM335
- Mach do ddng dugc cai tien lai nhd ggn de lap dat, cudn do ddng dugc lap dat
ngay tren board mach (xem hinh 2.14b), mach do ddng mdi
cd
kha nang kiem
soat dugc ddng khdi dgng may dieu boa,
dir
lieu
ciia
ddng khdi ddng dugc ghi
lai,
luu tren vi dieu khien va luu vao co sd dir lieu tren may tinh.(Xem hinh 2.3)
m
•4,
^
CIO
lOOUF"
VRTI
tOOK.t/^
Tlil84
U2JB
s
R60
U21C
<
IK
;M^
\
R51
<
200
K
VR7
lOOK
D3
_L
CII
4.7V
-l
iriniir
\
mi
{
10k
021
CI8U
<lenker,h2«JC0309
Tin hieu bao ngat
Hinh 2.3. Mach cam biln ddng va bat tin hieu ngat
1.2
Controller
tr\rc
tilp
Controller true tiep dugc thiet ke mdi nhung van dua tren nen tang
ciia
Controller da nghien
ciiu
giai doan mot. Controller nay chi danh rieng de kiem
soat va dieu khien thiet bj may dieu hda. Controller nay cd mot mach ghi thdng
sd true tiep vao vi mach
ciia
may dieu hda cu
thi
la vao IC 24xx, ddng thdi
ciing dgc dugc thdng sd
ciia
ngudi
sii
dung cai dat trong vi mach. Vdi bd mach
nay trung tam cd the dieu khien dugc ca cac che do chay lanh, tdc do quat, canh
gid, cac mode
ciia
may dieu hda tir trung tam. Cac thdng sd truyen xudng vi
mach
ciia
may dieu hda va quyen kiem soat do chuong trinh trong may dieu hda
khdng che, trung tam chi theo ddi boat ddng thdng qua bd cam bien ddng, cam
bien nhiet do. Ngoai chiic nang khac biet tren Controller
true
tiep ciing cd cac
mach va chirc nang nhu mach dieu khien gian tiep nhu sau:
- Cd IC
DS1307
nham luu trir dugc cac gia tri cai khi mat dien, luu trir dugc
ngay gid he thdng
- Cac vi dieu khien cua Controller deu cd mot dia chi rieng
- Dau cam bien nhiet do dugc thay bang IC
LM335
- Mach do ddng dugc cai tien lai nhd ggn de lap dat, cudn do ddng dugc lap dat
ngay tren board mach
- Mach do ddng mdi cd kha nang kiem soat dugc ddng khdi ddng may dieu hoa,
dii lieu cua ddng khdi ddng dugc ghi lai, luu tren vi dieu khien va luu vao co sd
dir lieu tren may tinh. (Xem so dd tdng the Controller qua hinh ve 2.4 va 2.5)
19
LJ-
lUO
lOuF
SVWCItSHBUTlON
Qt^
=r:
r.s=p
c9
_„J1.
, 4 11
TTi7'-»
3Z_
.i\
I ••'i>i
—
T-»*«
;
•»o»i-^
rz
= ±i
7 ,
>
i»
z:^
1
> "0 _-
Lizt:
j-
I
r J-
~C7 I
DSI307
JIM
•"•••i
;;
4!.;-'
'*»
Vli_
a
Ik
C3
'HW
«
013B
-r_:.:^l"°°
>-•-
11
fi'
^
01
IT
i
^'
o„
^^ cieis
ISAIOlf
s;
l^
CIBIS I
R43
-J
_K Q1B
}SAtOI»
I
tV CI81&
QIS
2SA10I&
4
K OIB
ISA101S
^^UiKI-J^^
K
°"
23AI0I5
BU
•* C1B15 I
A3
•Doc*
JtU Ihuimmv
D^ima
a« JOM biwW
1
.rf
T"
Hinh 2.4: Mach vi dieu khien dieu khien thiet bi va luu trir
dii"
lieu
20
•I
I-
*«;.;[
1
I I
'-err.—rrvii^Ti^^T 1
>OU*CHKHa NGUON
KHOI
CAM
ttEN DONG NHIET
DO VA CAU BEN OQNC
A3
J«l«
ai
,iubL D«tir* 06 2008
BUM
of
r«»
Hinh 2.5: Mach dieu khien, mach do ddng, nhiet do, mach ngudn
2.
Che tao mdi cac Bridge, Switch cd tac dung md rpng he thdng ddng thdi
tang them he so khuech dai tin hieu
du-dug
truyen.
Cac Bridge, Switch (Xem hinh 2.6 va 2.7) cd cac dia chi rieng de cai dat va truy
cap de dang, thuan tien khi ket ndi vao he thdng, ngoai ra cac Bridge, Switch,
Hub edn cd nhiem vu tuong duong mot Repeater da port khuyech dai tin hieu.
Cac Bridge, Switch ket hgp vdi Hub, vdi Controller dat tai cac khoa phdng ciing
vdi phan mem tao thanh mot mang chuyen dung tam ggi la mang ST, cac mang
ST nay neu ket ndi voi nhau thdng qua may tinh nhu phuong phap giai doan mot
se kiem soat duac vd sd thiet bi.
22
FT'
I
'4^T-'-l
T
CWVSTAl.
I
swpusHaurTON
|
^
33>
1^
^
-^
ia*i::i(Li
CONNECTOR
DM
-±h
^;^?I£M
F,
g
l> »U.r7n
«,,_I.'
"k
(7"|
L-l
1
00.2
3
3k
U35
-1—1 Ll—I co«3
^
RK
1"
z
n
u^r
"T^
'
RIQO
UM
pi—,
J30
*
JRT
":_ "
"1
-*~-
CC5N3
.
?n u»
o
i/=
'fQ
AJ
Bo Uo
macn
SWITCH
•
B
Klxj
DocwTiaM
Ni«ntH<
Pn6ng
VTTB
8V
l«n
titiarti
Hoa
Thuidav 0«camb«
0*
KOn
Brwcf
of
1
P",
Hinh 2.6: Mach Switch
8
port
23
t^r\
T
E]
w:
JT-k
Q
:i:
2211 U36
J.
COM
3 1k
U3r
1]
S
,k_|
0
I
_i._J CON>
-4-:
h
3k ueo
C(.1NJ
—1 J31
ifn
i.^k^
:ii:r
CON;/
—1 (33
1
U_J
CON3
.<l 40
l ilM
n—I
^"
g
l>
"ln-m
A3
)•>•
So do
mach BniQa
•
S Ktu
PnMig
VTTB
8V IvVi Khann
Hoa
mmda.
n«:amba.tM TOM b«.«
r^,
ol t
Hinh 2.7: Mach Bridge 8 port
3.
Chu"0"ng
trinh viet
bing
ngdn ngfr Assembly cho Hub, Bridge, Switch,
Controller.
- Nang cap chuong trinh Hub, Bridge, Switch nhan va
xii
ly theo ma lenh mot
each
linh boat. Do dd
vi?c
ket ndi he thdng khdng phai cd dinh nhu trudc day,
khdng phu thugc vao each dau ndi song song hay ndi tiep
Ddi vdi chuong trinh vi dilu khiln tren Controller:
+ Cd ma dja chi rieng de truy cap tang tinh bao ve cho he thdng
+ Cd them chuong trinh nhap du: lieu vao vimg nhd
ciia
IC 24XX tren may dilu
hda giup he thdng cd the dieu khien may dieu hda hoan toan tren may tinh trung
tam.
+ Cd them chuong trinh nap tir may
tinh,
thdi gian, cac thdng sd nhiet do, ddng
khdi ddng,
ddn^
chay tren IC
DS1307
hoac IC 24xx giiip khdng bi mat dir lieu khi
mat dien
hoSe
tat he thdng.
+ Them chuong trinh dgc va ghi lai ddng khdi ddng, ghi lai
sir
cd truyen tin hieu
bao chay ve trung tam.
4.
Xay dung he thdng:
- Da thiet ke dugc cac Controller, HUB, Bridge, Switch tao thanh mang dien
rdng ST (Xem hinh 2.8) neu ket hgp vdi cac may tinh se tao ra mot mang
kiem soat khdng ban che sd lugng cac thiet bi. Vdi tdc do truyen la
1 lOKb/s
khoang each >
1,2km,
hien dang
thii
nghiem cac Bridge 8 port, HUB 16
port.
Switch 8 port. 01 Controller kilm soat 03 thilt bi nhu vay tdng sd thiet bj cd
dugc kiem soat la:
8 X 8x16x3-3.072 thilt
bi.
-
NIU
SU
dung
hit
8 kenh AD thi sd thiet bi kiem soat tang len:
8x8xl6x8-8.192thiltbi
-
NIU
he thdng tang cac port len 16 (sd port da
thii
nghiem) thi sd thiet bj kiem
soat dugc se la:
16x 16x16x3 =
12.288
thilt
bi
16
x
16 X
16x8 =
32.768 thilt
bi
-
NIU
mot he thdng hai may tinh
kit
ndi theo mang LAN nhu nghien ciru giai
doan 1 thi sd thilt bj cua he thdng se tang len
gip
ddi va neu tiep tuc ket ndi
he thdng vdi nhau nhu vay thi sd thilt bi kilm soat tang len khdng ban che.
25