Font Size: a A A

The Serial Communication And Implementation Of Monitoring System

Posted on:2007-10-25Degree:MasterType:Thesis
Country:ChinaCandidate:Y DaiFull Text:PDF
GTID:2178360182961091Subject:Ships and marine structures, design of manufacturing
Abstract/Summary:PDF Full Text Request
This Project mainly investigates software implementation of serial communication of PLC and PC. Visual C++6.0 is used to write the code under Windows XP. The requirements are as follows: The GUI is friendly and easy to handle to users; some basic operations to the devices such as Start-up, Stop and Parameter-setting, can be executed in the software; some data of the equipment, such as current and frequency, can be displayed graphically in curves. Also, the original database is set up in this project for equipment's data and parameter management.The PLC that we are working over is 200 series from SIMENS co. We choose PPI /PC cable to communicate PLC with PC. We choose RS232 as computer's serial interface. The format of the code is binary message of the PLC encapsulating inside and odd-even check is used for picking up faults.The substrate communication function is written via encapsulating Windows API function offered by Visual C++6.0. Also, a Dynamic Link Library (DLL) is created for application's use. The substrate communication function consists of: basic communication function and message communication function. The former encapsulates with some Windows API functions, such as CreateFileO, SetComO, ReadFileO, WriteFileO, CloseFileO and executes reading and writing operations of the data in serial interface. The latter "translates" the data that are read or written from computers into binary format of the PLC and is responsible for odd-even check.The basic frame of the main function is set up by MFC of Visual C-H-6.0. Meanwhile, the original database is established by Microsoft Access, in which the parameters of the equipments can be stored and the data of certain functions can be transferred. GUI includes interface for data inquiry, interface for PLC's new parameters addition and interface for PLC's control. We use many different kind of components offered by Visual C++6.0 to build interfaces, such as textbox, press-button, and spin etc. The functions, which are correspondent respectively to the components in the interface of dynamic curve, call the substrate communication function via DLL and execute serial communication control, including Start-up, Stop, Parameter's R/W and Dynamic curves drawing, of the current and frequency of the equipments. On the other hand, the functions , which are correspondent respectively to the components in interfaces of equipment's data inquiry controlling by PLC and newparameters addition, are associated to relative text in the database and hence, implement transfer and storage of data and parameters of the PLC and equipments.
Keywords/Search Tags:PLC, serial communication, Windows API, database, message communication
PDF Full Text Request
Related items