Mang Profibus

  • Published on
    18-Dec-2014

  • View
    75

  • Download
    11

Embed Size (px)

Transcript

TRNG H S PHM K THUT TPHCM KHOA IN T

BI GING:

IU KHIN LP TRNH 2

BIN SON: GV GV ThS Nguyn Tn i ThS T Vn Phng

TP H CH MINH, THNG 01 NM 2008

Truong DH SPKT TP. HCM

http://www.hcmute.edu.vn

MC LCCHNG I: PLC S7-300 1.1 Gii thiu v PLC S7-300. 1.2 Cc Module ca PLC S7-300 1.3 Cc Module hot ng. 1.4 Cc kiu d liu. 1.5 Cu trc b nh. 1.6 Chu k qut ca PLC S7-300 1.7 Trao i d liu gia CPU v Module m rng. 1.8 Cu trc chng trnh ca PLC S7-300 1.9 Cc khi OB c bit CHNG II: TP LNH CA S7-300 1.1 Cu trc lnh v trng thi kt qu 1 1 4 5 5 7 8 9 10

T yen u q 1.3 Nhm lnh c bit Ban 1.4 Nhm lnh so snh1.2 Nhm lnh logic 1.5 Nhm lnh ton hc

ruo

H Su ng D

ph

yt am K

h

P. HC uat T

M12 12 14 20 23 28 29 30 40 47 47 48 49 49 50 51 52 53 53 54

1.6 Lnh chuyn i s BCD sang s nguyn 1.7 Lnh v Timer 1.8 Lnh v Counter. CHNG III: MNG PROFIBUS- DP 3.1 Tng quan 3.1.2 Kin trc giao thc v k thut truyn 3.1.3 Truy cp BUS 3.1.4 Dch v truyn d lu 3.1.5 Cu trc bc in 3.2 Profibus DP 3.2.1 Cu hnh h thng v thit b 3.2.2 c tnh vn hnh ca h thng 3.2.3 Trao i d liu gia Master v Slaver 3.2.4 ng b ho d liu vo /ra

Thu vien DH SPKT TP. HCM - http://www.thuvienspkt.edu.vn

Truong DH SPKT TP. HCM

http://www.hcmute.edu.vn

3.2.5 Tham s ho v chun on h thng 3.2.6 Giao tip trc tip gia cc Slave 3.2.7 Ch ng thi 3.3 Gii thiu Module EM-277 3.3.1 Gii thiu 3.3.2 Cc thng s ca EM-277 3.3.3 Cu trc vng nh ca Master v Slave 3.4 Kt ni mng vi module EM-277 3.4.1 Thit lp a ch mng cho khi EM-277 3.4.2 Truyn d liu gia trm ch v khi EM-277 3.4.3 Tp c s d liu ca thit b ( cc tp GSD) 3.4.5 ng dng mng Profibus DP iu khin thit b CHNG IV : MNG ASI 4.1 Gii thiu v mng ASI 4.1.1 Khi nim

55 55 56 57 57 57 58 61 61 61 64 64

T yen u q Ban 4.1.3 Hot ng ca mng ASI4.1.2 Giao tip ASI 4.1.4 ng dng mng ASI 4.2 Cc AS-I MASTER 4.2.1 Gii thiu 4.2.2 AS-I Master PLC S7-200 4.2.3 AS-I Master cho PLC S7-300 4.2.4 AS-I Gateway 4.3 Cc thnh phn mng ASI 4.3.1 Cp AS-I 4.3.2 Cc Module AS-I 4.3.3 Lp t Module AS-I 4.3.4 AS-I Repeater/Extender 4.3.5 B nh a ch 4.4 Ch AS-I MASTER

u DH S g n ruo

K pham

y th

P. HC uat T

M

75 75 75 77 82 84 86 86 86 89 91 92 92 93 97 97 99 100 100 102 108 108

4.4.1 Nguyn tc Master/Slaver trong AS-I 4.4.2 Chuyn i d liu 4.5 H thng AS-I 4.5.1 Thit lp h thng AS-I

Thu vien DH SPKT TP. HCM - http://www.thuvienspkt.edu.vn

Truong DH SPKT TP. HCM

http://www.hcmute.edu.vn

4.5.2 H thng truyn d liu AS-I 4.5.3 Cu trc bc in 4.6 AS-I MASTER MODULE CP 243-2 4.6.1 Gii thiu module CP 243-2 4.6.2 c tnh k thut ca Module CP 243-2 CHNG V: PHN MM WINCC 5.1 Gii thiu chung v WinCC 5.1.1 Khi nim 5.1.2 c im 5.1.3 u im ca Version WinCC 6.0 5.2 Cc Poject trong WINCC 5.2.1 Single-user Project 5.2.2 Multi-user Project 5.2.3 Client Project

109 110 113 113 115 129 129 129 129 131 131 131

u DH S g n uo 5.3.1 Thit lp Driver kt ni gia WinCC Tr v PLC n e y qu Ban 5.3.2 nh ngha cc Tag5.3 S dng WINCC 5.3.3 To giao din ngi dng 5.3.4 To nh ng v hiu ng cho i tng 5.3.5 Biu din gi tr ca qu trnh Logging Editor 5.3.6 Thit lp cnh bo v thng bo li 5.3.7 To Function v Action 5.3.8 Thit lp Report 5.3.9 Chy chng trnh WinCC 5.4 iu khin v gim st qua mng PROFIBUS 5.4.1 Yu cu 5.4.2 Kt ni phn cng

K pham

y th

P. HC uat T

M

132 132 133 133 134 134 136 136 137 138 138 139 140 140 141 141 146

5.4.3 Khai bo phn cng trn SIMATIC MANAGER 5.4.4 Thit lp giao din trn WinCC v thit lp giao tip vi S&-300

Thu vien DH SPKT TP. HCM - http://www.thuvienspkt.edu.vn

Truong DH SPKT TP. HCM

http://www.hcmute.edu.vn

TI LIU THAM KHO[1] [2] [3] [4] [5] [6] [7] [8] Nguyn Don Phc, t ng ha vi Simatic S7-300, NXB KHKT, 2006 Hong Minh Sn, Mng truyn thng cng nghip , NXB KHKT, 2001. Trn Thu H, T ng ho trong cng nghip vi WinCC, NXB Hng c, 2007. TT Vit c - H S phm K thut Tp.HCM, SIMATIC S7-300 iu khin h thng. TT Vit_c - Trng H S phm K thut Tp.HCM, Ti liu hun luyn PROFIBUS - DP&FMS. Siemens, AS-Interface Introdution and Basic information, 2000. Siemens, S7-300 Programmable Controller Hardware and installation. Internet.u DH S g n ruo K pham y th P. HC uat T M

B

T yen u q an

Thu vien DH SPKT TP. HCM - http://www.thuvienspkt.edu.vn

Truong DH SPKT TP. HCM

http://www.hcmute.edu.vn

IU KHIN LP TRNH 2

CHNG 1

CHNG 1:

PLC S7-300

1.1 GII THIU V PLC S7-300: PLC S7-300 l thit b iu khin lo g i c k h t r n h c t r u n g b n h do hng S iemens sn xut vi kch thc nh, gn. Chng c kt cu theo kiu cc Module c sp xp trn cc thanh rack. Trn mi rack cho php t c nhiu nht 8 Module m rng (khng k CPU, Module ngui nui). Mt CPU S7-300 c th lm vic trc tip vi nhiu nht 4 rack. S7-300 c thit k da trn tnh cht ca PLC S7-200 ( c trnh by trong mn hc KLT 1) v b sung nhng tnh nng mi, c bit trong iu khin lin kt c h thng nhiu PLC, gi l mng PLC s c trnh by trong cc chng sau. 1.2 CC MODULE CA PLC S7-300: Nhm mc ch tng tnh mm do trong cc ng dng thc t, M cc i tng iu C H . P khin ca mt trm S7-300 c ch to theo Module. at Tu y th K Cc Module gm c: Module CPU, ngun, ng vo/ra am s, tng t, mng, S lng u ph S H Module nhiu hay t ty vo yu cu thc t, song ti thiu bao gi cng c mt D uong r T Module chnh l CPU, cc Module cn li nhn truyn tn hiu vi i tng iu yen u q khin, cc Module chc nng chuyn dng nh PID, iu khin ng c, chng c Ban

gi chung l Module m rng.

Cu hnh ca mt trm PLC S7-300 nh sau:

CPU

Hnh 1.1: Cc khi trn mt thanh rack ca trm PLC S7-300.

TRANG - 1Thu vien DH SPKT TP. HCM - http://www.thuvienspkt.edu.vn

Truong DH SPKT TP. HCM

http://www.hcmute.edu.vn

IU KHIN LP TRNH 2

CHNG 1

-

Module CPU: cha b vi x l, h iu hnh, b nh, cc b nh thi gian, b m, cng truyn thng (RS485) v c th c vi cng vo/ra s onboard. PLC S7-300 c nhiu loi CPU khc nhau, chng c t tn theo b vi x l c trong CPU nh CPU312, CPU314, CPU315, CPU316, CPU318 Nhng Module cng c chung b vi x l nhng khc nhau v cng vo/ra onboard, khc nhau v cc khi hm c bit c sn trong th vin ca h iu hnh c phn bit vi nhau trong tn gi bng cch thm cm t IFM (Intergrated Function Module). V d Module CPU314 IFM. Ngoi ra cn c cc loi Module CPU vi hai cng truyn thng, trong cng truyn thng th hai c chc nng chnh l phc v vic ni mng phn tn c km theo nhng phn mm tin dng c ci t sn trong h iu hnh. Cc loi CPU ny c phn bit vi cc CPU khc bng tn gi thm cm t DP (Distributted Port) trong tn gi. V d Module CPU 314C-2DP Hnh v sau minh ha mt s CPU ca PLC S7-300:P. HC uat T M

B

T yen u q an

u DH S g n ruo

K pham

y th

CPU 312 IFM

CPU 314C-2PIP

CPU 314

CPU 314C-2DP

Hnh 1.2: Cc Module tch hp CPU ca PLC S7-300. Module m rng: chia lm 5 loi o o o o o PS ( Power Supply): Module ngun nui. C 3 loi 2A, 5A v 10A. SM (Signal Module): Module m rng cng tn hiu vo/ra, bao gm: DI (Digital Input): Module m rng cc cng vo s. S cc cng vo s m rng c th l 8, 16, hoc 32 tu thuc vo tng loi Module. DO (Digital Output): Module m rng cc cng ra s. S cc cng ra s m rng c th l 8, 16 hoc 32 tu thuc vo tng loi Module. DI/DO (Digital input/Digital output): Module m rng cc cng vo/ra s. S cc cng vo/ra s c th l 8 vo/8 ra hoc 16 vo/16 ra ty thuc tng loi Module. AI (Analog input): Module m rng cng vo tng t. Chng l b chuyn i tng t s 12 bits (AD). S cc cng vo tng t c th l 2, 4, 8 ty tng loi Module.

o

TRANG - 2Thu vien DH SPKT TP. HCM - http://www.thuvienspkt.edu.vn

Truong DH SPKT TP. HCM

http://www.hcmute.edu.vn

IU KHIN LP TRNH 2

CHNG 1

o

AO (Analog output): Module m rng cc cng ra tng t. Chng l nhng b chuyn i s tng t (DA). S cc cng ra tng t c th l 2, 4 hoc 8 ty thuc tng loi. AI/AO (Analog input/Analog output): Module m rng vo/ra tng t. S cng vo/ra tng t c th l 4 vo/2 ra hoc 4 vo/4 ra ty tng loi Module. IM (Interface Module): Module ghp ni. y l loi Module chuyn dng c chc nng ni cc nhm Module m rng li vi nhau thnh mt khi v c qun l chung bi mt CPU. Mt CPU c th lm vic trc tip nhiu nht 4 rack, mi rack ti a 8 Module m rng v cc rack c ni vi nhau bng Module IM. FM (Function Module): Module c chc nng iu khin ring, v d nh Module iu khin ng ng c bc, Module iu khin ng c servo, Module PID, iu khin m tc cao CP (Communication Module): Module phc v truyn thng trong mng gia cc b PLC vi nhau hoc gia PLC vi my tnh.u DH S g n ruo K pham y th HCM

o

o

o

o

P. Hnh sau minh ha mt s Module m rng ca PLC u S7-300: at T T yen u q an

B

a) Module ngun (PS)

b) Module vo s (DI)

c) Module ra analog (AO)

d) Module ra s (DO)

e) Module chc nng (FM) f) Module truyn thng

Hnh 1.3: Module m rng ca PLC S7-300

TRANG - 3Thu vien DH SPKT TP. HCM - http://www.thuvienspkt.edu.vn

Truong DH SPKT TP. HCM

http://www.hcmute.edu.vn

IU KHIN LP TRNH 2

CHNG 1

1.3 CC MODE HOT NG: PLC S7-300 c 4 mode hot ng, gm: o o o RUN_P: X l chng trnh, c th c v ghi c t PG. RUN: X l chng trnh, khng th c t PG. STOP: Dng, chng trnh khng c x l.

MRES: Chc nng reset h thng (Module Reset o Cc mode ny c chn da vo cng tc chn mt trc CPU nh hnh 1.4 Trong : 1. n bo trng thi 2. Card nh 3. Nt chn kiu lm vic 4. u ni 24V 5. Cng giao tip MPI 6. Ngn pinT yen u q an u DH S g n ruo K pham y th P. HC uat T M

B

Hnh 1.4: Mt trc CPU S7-300

-

Ngoi ra, CPU cn c cc n ch bo gip ngi s dng chn on c trng thi hin ti ca PLC. o o o o o o SF: bo li trong nhm, trong CPU hay trong cc Module. BATF: li pin, ht pin hoc khng c pin. DC5V: bo c ngun 5V. FRCE: bo t nht c mt ng vo/ra ang b cng bc hot ng. RUN: nhp nhy khi CPU khi ng v sng khi CPU lm vic. STOP: sng khi PLC dng, chp chm khi c yu cu reset b nh, chp nhanh khi ang reset b nh. Card nh: d