您好,欢迎来到意榕旅游网。
搜索
您的当前位置:首页外文翻译原文

外文翻译原文

来源:意榕旅游网
Communication PLC with Embedded systems

DUSAN HAVLIK

Department of Control Engineering

CTU in Prague, FEE

Karlovo namesti 13, 121 35 Prague 2

CZECH REPUBLIC

Abstract: This paper presents communication PLC and embedded systems. The paper presents centra-lized and decentralized network between PLC and embedded systems. Communication PLC and embeddedsystems is dependent on structure of network and is type master - slave. In the end of the paper is connectionbetween PLC and embedded systems.

Key-Words: PLC, embedded systems, communication, network

1.0 Introduction

Development new technology ables to existing newway of solution technology process. One of partialsolution in control of a technology process is usingof embedded systems collaboration with PLC. Thispaper presents communication between embeddedsystems and PLC.

2.0 Reason of using embedded system

We can see using of PLCs from Allen-Bradley,Siemens, Wago in the control of industrialtechnology process. Almost all PLCs is notconvenient to control of a real-time applicationbecause one scan cycle of the PLC is longer thentime to regulation action. Forasmuch as a solutionof control of technology process must containcontrol real-time application sometime, it isnecessary find technical solution which iscompromise between price and quality of control.Embedded systems is possible solution of thesituation.

In case, that configuaration of the PLC or

program into the PLC doesn't able to communi-cation with more embedded systems, the centralconfiguration network is used. Interface betweenPLC and embedded systems is special embeddedsystem which is master for other embedded systems.The centralized network contains network with oneembedded system.

In the configuration network, the PLC is

master which communicates only special embeddedsystem and which is connected to same network asPLC or is connected with serial channelRS485/RS422. The master embedded system (MES)receives commands from PLC. The MES decodescommands and sends other commands to slaveembedded systems (SESs). SESs receive these

3.0 PLC and embedded systems

3.1 Network between PLC and embeddedsystems

Network can be centralized or decentralizedbetween embedded systems and PLC. Life cycle ofcommunication is same for both type, but isdifferent in the detail which arise from configura-tion network.

commands, execute it and send acknowledge ofreceiving command or data with new informa-tion about their periphery. The MES receivesdata and saves it in the memory. When the PLCasks about data, the MES sends it him. Refreshinformation of periphery is indepen-dent onfrequency of communication between PLC andMES, but is not longer then one scan cycle ofthe PLC. It is necessary to refresh all data mustbe in one virtual scan cycle of PLC to consistentinformation.

The MES detects states of connection with

the PLC and slave embedded systems. If connectionis lost, the MES gives notice to SESs about losingconnecting with PLC. SES make several reaction tothe state. Some SES doesn't need make reaction andsome SES must make reaction and shut-down all his

periphery. After reconnection between PLC andMES, the MES sends information about reconne-ction and new data to SESs. If the MES lostconnection with some SES, the MES gives notice toother SES and the PLC. When the PLC receivesnotice, decises of resolution about reaction to faultconnection. If the MES reconnects to the SES, theMES sends new data to SES.

Fig. 1: Centralized network

The MES detects states of connection with

the PLC and slave embedded systems. If connectionis lost, the MES gives notice to SESs about losingconnecting with PLC. SES make several reaction tothe state. Some SES doesn't need make reaction andsome SES must make reaction and shut-down all hisperiphery. After reconnection between PLC andMES, the MES sends information about re-connection and new data to SESs. If the MES lostconnection with some SES, the MES gives notice toother SES and the PLC. When the PLC receivesnotice, decises of resolution about reaction to faultconnection. If the MES reconnects to the SES, theMES sends new data to SES.

If the PLC detects fault connection with the

MES, the PLC decises about reaction and givesnotice about lost connection to supervisor controlsystem. Communication between MES and SES isdetected by SES. If the SES detects fault connetion,SES shut-down his periphery or makes other action.

The second way is decentralized network.

No master embedded system in the network and aPLC direct communicates with all embeddedsystems. The PLC has seperated memory forcommunication with each embedded system. Allinformation about states and history ofcommunication is saved in the seperated memory.Number of packet, data which was received fromembedded system, data which was sent and will besent are saved in the seperated memory too.

If embedded systems not communicate

theirself, the PLC have to control communicationon the bus, otherside it is necessary use profibus,ethernet or control unit of bus to communication.

Fig. 2: Decentralized network

How it was said, if embedded systems not

communicate theirself, the PLC must communicateswith embedded system by embedded system toreceives and sends data. Question of thiscommunication is monitoring of state bus. Thisquestion have two main answer. First resolution,embedded system listen bus and state„Communication is OK“ is state, when theembedded system listens some communication.Second resolution, each embedded system mustcommunicates with the PLC to time-out. If the PLCnot communicates with the embedded system ontime, the embedded system sets information faultand makes reaction to losing communication. ThePLC makes similarly things. If embedded systemscommunicate theirself, control of bus is moredifficulty because each device needs connect to thebus. If profibus, ethernet are used, problem issolved, because these busses have standart protocol.If RS485 is used, it must be used Central ControlBus, which gives authentication to communication.Algorithm of giving authentication will bedependent on device's requirements of using bus.Example the PLC has authentication two-time oftenthan other devices. Cycle of giving authenticationmust contains time for refresh information aboutdevices which are connected to the bus.Disadvantage is losing of communication whensome device get into deadlock after gettingauthentication and device doesn't return control busto central control bus . One of ways, it can be usingtime-out. It means using limited time, when a devicemust return control of bus to Central Control Bus(CCB). If the device does not return control of bus,CCB sends to all devices cancel-packet and thanCCB refreshs information about devices. In caseCCB find wrong device, CCB sends information tothe PLC and other embedded systems. Afterrefreshing of information CCB gives authenticationsome device. The PLC and embedded systems mustdetect state of bus theirself too.

Special way of communication is way,

when the PLC communicates with master embeddedsystem which is master for other embedded systemsin the decentralize network. Communication PLCwith embedded systems is same as in the centralizenetwork. This model has a adventure, if masterembedded system is wrong or is disconneted, master

embeded system may replace by other embeddedsystem. Signal to change is given by the PLC orsupervizor of embedded system.

3.2Communication PLC and Embeddedsystem

Communication PLC and embedded system is typemaster – slave. Master is PLC and Slave is

embedded system. The PLC starts communicationwith sending data to embedded system. Sended datamust contains head of packet, data and CRC.Content of packet head is dependent on

configuaration network between PLC and embedd-ed system.

Fig. 3: Structure of packet

If the PLC communicates with one embedd-ed system, head of packet contains only code ofmessage and number packet. If the PLC commu-nicates with more embedded systems, the head ofpacket contains address of device, code of messageand number packet. Code of message is used todecision of data processing in the embedded system.Number packet is inique number by defined time.

Second part of packet is data for embedded

system, which has variable number of data. Iftraffic is not too high on the bus, it may use definitenumber of data which is writen in the head odpacket.

The third part of packet is CRC of previous

data. Function XOR of previous data is simplefunction of CRC. Other fuction CRC may be cycliccode too. If length of packet is not too long, CRCis possible insert into data. i.e. make function CRCtwo previous byte and write to third byte.

Generally, method of CRC of packet is

compromise between data protection and computingtime for creating CRC of packet.

The PLC starts communication with em-bedded system because the PLC is master forembedded systems. Unique number is written in thehead of each packet which is sent to the embeddedsystem. The embedded system receives packet andpacket processing. If the PLC wants data fromembedded system, the embedded system createspacket, copys number PLC's packet into packet andsends it. The PLC waits for data from embeddedsystem and if data doesn't come to the PLC on time,the PLC makes reaction to losing connecting withthe embedded system. If the embedded system isimportant for all system, the PLC controls shut-down system or make signal to replace wrong

device. If the PLC receivea data on time and wantsnext data, increments number packet and sendsrequierement to the embedded system. Numberpacket must be unique by defined time. If we know,that number of packet is less 65000 by day, we usetwo byte for number packet and increment numberwith number of packet. And after 24 hour, we resetnumber packet. If number packet is used, it is easydetected losing communication. If the PLC detectslosing of communication, the PLC sends resetpacket and wait to acknowledge of reset packetfrom embedded system. If the PLC finishscommunication with embedded system, sends finishpacket and wait for acknowledge of finishcommunication.

Very important thing is testing of commu-nication when PLC mustn't data from embeddedsystem, because embedded system must know thatconnection is correct.

3.3 Connection PLC and embedded system

The embedded system can be connect to PLC withseveral way, but basic ways are Profibus, ethernet,wireless and serial channel RS485/RS422.

Profibus is used when embedded system has

profibus interface. If the embedded system has notthis interface, it is possible embedded systemconnect to the bus over transfomer profibus –RS485. Disadvantage of this connection is limitedrate of serial channel between transfomer andembedded system.

Fig. 4: Profibus with RS485

Other way is connection embedded system

and PLC with ethernet. This communication isfaster and it is possible fast transfer large data.Speed of communication is limited by dataprocessing in the program. If embedded system hasnot this interface, it is possible embedded systemconnect to the bus over transfomer ethernet –RS485. Disadvantage of this connection is limitedrate of serial channel between transfomer and

embedded system.

Fig. 5: Ethernet with RS485

Wireless connection is necessary used when

the PLC and embedded system is not possibleconnect together with wires. If the embeddedsystem is far from PLC, it is possible used GSMmodule and using public GSM network. If distanceis less 50 meters, it is possible used Bluetooth. If itis used wireless connection, it is necessary regarddata protection of communication.

Fig. 6: Wireless

4.0 Conclusion

The communication PLC with embedded

system is dependent on the structure of network. Inthe centralized network, the PLC communicateswith one embedded system which is master forother embedded system. In the decentralizednetwork, the PLC communicates with all embeddedsystems. Control of communication on the

decentralized network is more difficulty then on thecentralized network. History of the communicationis same as in the centralized network as in thedecentralized network, because communication istype master - slave, master is PLC and slave isembedded system. The communication must beprotect data from transfer error. Every packet mustcontains head of packet, data and check-sum.Address of device, packet number and code ofmessage are in the head of packet. Connection maybe with several busses include wireless.

5.0 ACKNOWLEDGEMENTS

This paper has been supported by Grant Agency ofthe Czech Republic, project number

102/05/0467 \"Architectures of Embedded SystemsNetworks\"

References:

[1] Elprotech Technologies ,105U-G Wireless gateway ,Datasheet,

URL:

[2] Janeček, Jan: Distributed system, CTU FEE, Prague November 2000

[3] Havlik, Dusan: Railway model,Master's thesis, CTU FEE, Prague 2004 [4] Electronic catalog Siemens,

URL:

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- yrrf.cn 版权所有 赣ICP备2024042794号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务