<<

AvailableAvailable online onlineat www.sciencedirect.com at www.sciencedirect.com Procedia ProcediaProcedia Engineering Engineering 00 (2011) 29 (2012)000–000 1549 – 1553 www.elsevier.com/locate/procedia

2012 International Workshop on Information and Electronics Engineering (IWIEE) G Language Based Design of Virtual Experiment Platform for Communication with Measurement and Control

Baosheng Yanga*, Jianxin Lia , Qian Zhangb

aLaboratory of Intelligent Information Processing, Suzhou University, Suzhou 234000, China

bInformation Engineering School, Suzhou University, Suzhou 234000, China

Abstract

In order to explore more convenient ways to design the measure and control platform, and enhance the intelligent level of instrument, this paper used Graphical Programming Language LabVIEW to realize the kind virtual panel, and put the intelligent part of the equipment to process by computer. The paper designed the virtual test platform for communication with measurement and control. After testing, the platform has high speed of data acquisition, is able to effectively deal with parameters of the object for testing and output the result, as well as can well communicate with other devices.

© 2011 Published by Elsevier Ltd.

Keywords: Graphical Programming Language; LabVIEW; Communication; Measurement and control; Data acquisition

1. Introduction

At present, scientific instruments develop in the digital, intelligent, network-based, micro-orient. Virtual instrument (VI) as an important manifestation of these directions, it is a data acquisition system organized in accordance with the instrument needs[1]. It takes the general purpose computer as the core hardware platform, the design defined by the user. It has a virtual panel; the test function is performed by testing software[2]. G language (i.e. graphical programming language) based virtual instrument has a friendly front panel control[3,4]. It gives the intelligent part of ordinary apparatus to the computer to complete, easy-to-simulation, and enhance the flexibility and reliability etc. of the instrument. It is the leader in the field of measurement and control technology, also has a price advantage in integrated

* Corresponding author. Tel./ fax: +86-557-287-1028. E-mail address: [email protected].

1877-7058 © 2011 Published by Elsevier Ltd. doi:10.1016/j.proeng.2012.01.171 21550 B. BaoshengS. Yang et Yangal. / Procediaet al. / Procedia Engineering Engineering 00 (2011) 29 (2012)000–000 1549 – 1553 application[5]. This paper uses G language LabVIEW( Virtual Instrument Engineering Workbench) to realize a communication, monitoring and control virtual test platform.

2. Measurement and control software architecture based on LabVIEW

G language LabVIEW has object-oriented programming structures and tools. It can design complexity, more modular test application and change very little testing framework to integrate new test modules. So it is easy to expand their test applications. Like as other object-oriented languages (such as C++ and Java), LabVIEW includes class structure, encapsulation, inheritance and other concepts[6,7]. By constructing a class method, it can completely separate from the data between different modules, even separate the data and operation. This ensures that different modules can be completely independent of the development, testing[8]. Modification of a module will not affect any other modules. It can create more maintainable code, so the code changes do not affect the application of other code. As a compiled graphics programming language, LabVIEW usually used for scientific computing, process control, test areas[9]. It is mainly composed of three parts, namely the front panel, the block diagram and the icon / connector. The main feature is the use of engineering and technical personnel are familiar with the controls, icons and other graphical symbols instead of conventional text programming. In addition, it is rich in function and subroutine library, and there is a very user-friendly feature to help debug fixes[10]. LabVIEW program developed takes VI as the basic unit. Results of a design (e.g. VI) can be defined as a subroutine (SubVI), to facilitate repeat calls in a related programming[11,12]. LabVIEW is a development platform for scientists and engineers. In this paper, measurement and control software of enthalpy potential method experimental device of air conditioner is taken as an application example, use LabVIEW to achieve the composition, the basic module functions of control software and system test methods. The monitoring and control software based on G language LabVIEW is shown in Figure 1.

Fig. 1. Measurement and control Software module architecture.

3. Measurement and control software architecture based on LabVIEW

Data communication is the core of measurement and control software system, which is responsible for the communication of procedures and lower computer. Host computer Host computer can communicate properly with the lower computer or data acquisition equipment or not directly related to the normal real- time data acquisition. If it can not collect real-time data, then it will not be able to efficiently compute, BaoshengB. S. Yang Yang et et al. al. / Procedia/ Procedia Engineering Engineering 00 29 (2011) (2012) 000–000 1549 – 1553 15513 display, storage and other follow-up. The control system using the standard RS-232 serial interface bus communicate with general purpose interface bus GPIB and control external devices.

3.1. Serial Communication

Serial (RS-232) is a standard PC machine. It is used for serial data transmission. Its development and application is simple, it can be directly used in short distance communications and data transmission rate less demanding circumstances. Serial communication module uses Sequence structure to compile, the first using Serial Port Init node initialize the serial port, set the serial port parameters. Second, it applies Serial Port Write node to send a standard data acquisition machine language (SCPI) command. To ensure that the entire data acquisition device can return data to computer, it adds a delay after sending. Finally, the program will use the Serial Port Read node return data of data collection devices to display on the computer. The serial port Initializing and writing instruction block diagram is shown in Figure 2.

Fig. 2. The serial port Initializing and writing instruction.

3.2. GPIB Communication

The general purpose interface bus (GPIB) standard of connectivity and control programmable equipment connection developed by Hewlett Packard provides a number of necessary norms and agreements to management communicate. GPIB handshake can be used by other computers or instruments collected data into the computer. GPIB communication sub-module also uses Sequence (order) structure prepared. First, the use of GPIB Write node send SCPI commands to the instrument, the operation also provides overflow time. Secondly, the use of GPIB Read node returns data from the instrument back to the computer. The block diagram is shown in Figure 3.

Fig. 3. GPIB write commands. 41552 B. BaoshengS. Yang et Yangal. / Procediaet al. / Procedia Engineering Engineering 00 (2011) 29 (2012)000–000 1549 – 1553

4. The system test method of the platform

Enthalpy potential method experimental device of air conditioner use Keithley Company’s 2700 data acquisition instrument as the lower computer of control system. The 2700 type of instrument is a six-half high performance digital multimeter / data acquisition system, it can measure DC, AC / current, 2- wire / 4-wire resistance, thermocouple, thermistor, and 4-wire RTD temperature measurement, it can also measure frequency, period, and conduction. There are two slots at the hind panel of this type of collection instrument, it can be inserted into a variety of 7700 series modules. The two modules are the 7700 and 7702.7700 pole switch module has 20 channels input channels. It can be used for voltage, resistance, frequency, period and temperature measurements, and also provides 2 current channels. 7702 switch module has 40 channels, but also have 2 current channels. Any closed or scan channel module is able be measured by the 2700. For the scanning mode, each channel can defined measured function, range and resolution and other parameters, separately. The two switch modules can be directly connected to various sensors to realize associated measurements. The panel also has two standard communication interface: standard serial communication interface (RS-232) and general purpose interface bus (GPIB). This provides real data source for software. It can carry out a comprehensive test on the performance of the software.

4.1. Communication Module Test

Select a communication mode in the instrument's front panel to set the associated parameters. For serial communication, for example, press SHIFT key in the 2700's front panel, then press ENTER, so enter the serial communication interface. Use left and right, up and down arrow keys to enable serial communication, that is, RS-232 is "ON" state. Next set the serial port parameters: ⑴ Set the baud rate, using up and down, left and right arrow keys to select the baud rate, the baud rate is 300,600,1200,2400,4800,9600,19.2 K, instrument default value is 4800. Press ENTER to end; ⑵ Flow control, also using the arrow keys to select a flow control approach. Test using "XonXoff" mode, press ENTER to end; ⑶ Set the end character, the end character has "CR" (carriage return), "LF" (line feed), "CRLF" (carriage return + line feed), and "LFCR" (line feed + carriage return) in four ways. Test with "LFCR" approach, press ENTER key to end the parameter settings. After completion of instrument serial port parameters, the software must initialize the serial port. Baud rate, flow control and other parameters set to be consistent with the instrument, while the software serial port should be consistent with the actual serial port in use. The serial port initialization mainly complete by the Universal Serial Bus node initialization. When the software and hardware settings are finished, click the run arrow, the program started data collection. The data collected can be well displayed on the screen. The curve can be real-time rendering. GPIB communication can also be used to test in the same way.

4.2. Data analysis module test

When testing the module function does not need to use real data source, as long as using the software produce a signal generator to imitate. Or use the original hand calculation methods. Input parameters to controls, run the subroutine, compare the output results with the hand calculation. After testing, the program can calculate correctly. BaoshengB. S. Yang Yang et et al. al. / Procedia/ Procedia Engineering Engineering 00 29 (2011) (2012) 000–000 1549 – 1553 15535

5. Conclusion

G language LabVIEW can be effectively achieved a virtual panel in the personal computer. Virtual instrument panel has the virtual switches, buttons and knobs with the same function of real instrument. User operates the instrument through the friendly graphical interface, thus completing the measurement signal acquisition, analysis, judgment, display, and data access. In summary, the communication and control system has the following functions: on-line monitoring of experimental process and achieve multi- window screen displays. It can automatically detect, calculate and display temperature, humidity, pressure, instantaneous flow of various points of the experimental device, as well as calculate the cold heat, wind, energy efficiency, capacity ratio etc. the results of the various collection points. And it is able to display in a variety of ways text, tables, instruments, and curves. Save the data in a timely manner, and can query the historical data and print. It can communicate through the serial port data logger, PLC and other intelligent instruments.

Acknowledgements

This work was supported by Anhui Provincial Natural Foundation of China under Grant No. 10040606Q64, Suzhou University Intelligent Information Processing Laboratory Open Subject Foundation under Grant No. 2010YKF13 and 2011YKF09.

References

[1] Tucker J.L.. Evaluating data acquisition specifications. Evaluation Engineering 2000; 39(5) : 50+ 53-54+57+59-60. [2] Lou Z.F., Wang L.D., Ma Y., etc. Data acquisition and control system of double-disc involute measurement instrument. Chinese Journal of Scientific Instrument 2009; 30(1): 61-64. [3] Essel H.G., Kurz N.. General purpose data acquisition system MBS. IEEE Transactions on Nuclear Science 2000; 47(2 I): 337-339. [4] Kalashnikov A.N., Challis R.E., Unwin M.E., etc. Effects of frame jitter in data acquisition systems. IEEE Transactions on Instrumentation and Measurement 2005; 54(6): 2177-2183. [5] Nelson R.O., Bourke M.M., Bowling P.S., etc. LANSCE data acquisition system and SMARTS. IEEE Transactions on Nuclear Science 2000; 47(2 I): 75-79. [6] Du T.Y., Zhao B.H.. Implementation of Petri nets controller based on LabVIEW. Journal of Jiangsu University (Natural Science Edition) 2011; 32(1):75-78+83. [7] Orquín I., García-March M., Pedro F., etc. Introductory quantum physics courses using a LabVIEW multimedia module. Computer Applications in Engineering 2007; 15(2): 124-133。 [8] Zhang H.L., Yu S.J., Zhao Y., etc. Approach to performance evaluation of solar array based on Labview. Acta Energiae Solaris Sinica 2007; 28(9): 996-999. [9] Zhang Q, Li S.Y.. Performance monitoring and diagnosis of multivariable model predictive control using statistical analysis. Chinese Journal of Chemical Engineering 2006; 14 (2): 207-215. [10] Zhao W.D. , Yi H., Ni Z.H., Xing Y.. Research on remote monitoring and control of CNC system based on Web and field bus. Journal of Southeast University (Natural Science Edition) 2003; 33(1): 45-48. [11] Zhang H.. Research on control strategy of intelligent monitoring system for greenhouse environment. Lecture Notes in Electrical Engineering 2011; 87: 713-720. [12] Yang B.S., Ma X.H.. Temperature prediction and analysis based on BP and Elman neural network for cement rotary kiln. Proc. SPIE 2010; 7997 (2I): 1-6.