| As a subject for studying flow and deformation of materials, rheology is closely related to chemistry, especially polymer chemistry. With the development of manufacture of top 3 synthetic materials, the research on rheology develops very fast in recent years.It plays a great role not only in machinery manufacturing and light industry, but also in medical treatment.A rheometer, which is used to measure fluid properties of polymer, is widely used in experiments of rheology research. Early rheometer used a recorder to collect data, and computation was manual. So the precision of computation and controlling was difficult to ensure. With the development of computer technology, Intelligent rheometer which is controlled by a computer replaces the early rheometer because of its accurate calculation and automatic control. The system of new rheometer is made up of three parts: the SCM, the controller and PC. The temperature and displacement which are collected by SCM are sent to PC through serial ports. The software in PC calculates the rheology with these data, meanwhile, it can control the rheometer by adjusting the collecting parameters.The GUI designed for the new capillary rheometer is a MFC application on Windows. It has four function modules: Serial Communication, Data Manipulation, Parameters Setting and Rheology Calculation.Serial communication is a useful and convenient method for data exchange between PC and SCM. It is simple, the use of flexible and reliable data exchange, etc. Serial communication programming has a widespread application in the fields of remote monitoring and industrial automation. There are several implementations of serial communication in the Windows: such as Windows API programming, communication class and communication control which is widely used for its ease of use. Microsoft Communication Control (MSComm) provided by Microsoft Company is a ActiveX DLL. It has some interfaces and properties for simplifying serial communication programming. MSComm provides the following two ways for handling communications: Event-driven communication is a very powerful method for handling serial port interactions. We can use the MSComm control's OnComm event to trap and handle these communications events when a character arrives; Inquiring act communications: applications will check the value of CommEvent to decide whether some events occur. In SDI applications, we can not use MSComm as easily as dialog applications. We have to add some code for handling communication events by ourselves. In the function we add, we parse the data frame according to the communication protocol and get the useful temperature and displacement data, which will be stored in a array for other uses, such as drawing and calculation.Experiment parameters are saved in a XML file. A XML file which is a kind of text file is constitutive of marks and the elements marked. We can save the information in accordance with the definition of the content and XML Syntax. XML is an open standard, it does not depend on any software. XML is good description of the data structure and separates the data structure from user interface. For these features we can design our own markup language according to the requirements of our software system. At the beginning of the experiment, the user has to input the length of furnace, pressure, diameter, temperature, heating rate and other parameters with which the application will be initialized when the system starts up. We design a class which encapsulates the interfaces of MSXML.DLL used for parsing XML files. So the data application module is apart from data storage module, which embodies the characteristics of object-oriented programming.Real-time monitoring curve is a very important interface between the GUI of rheometer and users. The rheometer changes the temperature on two ways, that are constant temperature and rising the temperature with the average speed .During temperature rising, the user can observe the material and understand its property. During the other process, the shear stress and shear rate can be measured. Double buffering can solve the problem of twinkle of the curve caused by Windows redrawing with background color. There are two bitmaps, one for screen display and the other one for memory. At first the curve will be drawn in memory and then copied to the screen at the same time by calling BitBlt which is a member function of class CDC.We use ADO to access the database. There are three smart pointers in ADO: _ConnectionPtr, _CommandPtr and _RecordsetPtr. The encapsulation of these pointers and functions as members of a class also makes the separation of application and data storage. So the application module does not need very large changes when the database needs to be redesigned. Rheology calculation is a very important function module which reflects the value of rheometer in fields of manufacture and experiments. There are three rheology parameters: shear rate, shear stress and viscosity. After a whole experiment process, we can get a group of result with all the parameters input by the users and data sent from SCM. If we collect enough groups of the results, we can draw rheological map which will provide useful data about the material to the users.The GUI of rheometer is a Windows application based on OOD and OOP. This paper presents the design and realization of it. As a interface of new intelligent rheometer, it has some practical modules. But with the development of rheology studying, the software has to be improved to meet the requirements of users. |