Font Size: a A A

Study Of Communication Between Transducer And Computer

Posted on:2004-10-05Degree:MasterType:Thesis
Country:ChinaCandidate:L S LuFull Text:PDF
GTID:2168360092997791Subject:Control theory and control engineering
Abstract/Summary:PDF Full Text Request
This project mainly investigates software implementation of serial communication of transducers. Visual C++ 6.0 is used to write the code under "Windows 98. The requirements are as follows: The GUI is friendly and easy to handle to users; some basic operations of the transducer, such as Start-up, Stop and Parameter-setting, can be executed in the software; some data of the transducer, such as current and frequency, can be displayed graphically in curves. Also, the original database of the transducer is set up in this project for transducer's data and parameter management.The transducer that we are working over is type IMF from S ANKEN co. We choose IS I serial basic printed board, which is from S ANKEN as well, for s communications to computers. For the sake of long-distance and multi-transducers control, we choose RS485 as computer's serial interface. The format of the code is ASCII of the transducer 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 main function's use. The substrate communication function consists of two parts: basic communication function and code communication function. The former encapsulates with some Windows API functions, such as CreateFile(), ReadFile() and WriteFile() 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 ASCII format of the transducer and is responsible for odd-even check.The basic frame of the main function is set up by MFC of Visual C++ 6.0. Meanwhile, the original database of the transducer is established by Microsoft Access, in which the parameters of the transducer can be stored and the data ofcertain functions can be transferred. GUI includes interface for transducer's data inquiry, interface for transducer's new parameters addition and interface for transducer's control. We use many different kind of components offered by Visual C++ 6.0 to build interfaces, such as textbox and press-button, etc. The functions, which are correspondent respectively to the components in the interface of transducer's control, 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 transducer. On the other hand, the functions, which are correspondent respectively to the components in interfaces of transducer's data inquiry and transducer's new parameters addition, are associated to relative text in the database and hence, implement transfer and storage of data and parameters of the transducer.
Keywords/Search Tags:transducer, serial communication, Windows API function, database
PDF Full Text Request
Related items