Application of Graphical Programming and Benefit of Virtual Instrumentation in Teaching

 

ZIDEK, Jan

Department of Electrical Measurement, Faculty of Electrical Engineering and Informatics, VSB - Technical University Ostrava, 17. listopadu, 708 33 Ostrava-Poruba, Czech Republic, jan.zidek@vsb.cz, http://www.vsb.cz

 

Abstract: National Instruments® pioneered virtual instrumentation more than 13 years ago with the introduction of LabVIEW(tm) – fully graphical development system. On several platforms they offer software products that deliver the proven productivity gains of virtual instrumentation.. Over eight years at the Department of Electrical Measurement VSB -Technical University Ostrava the students have taken advantage of the flexibility and open development model to solve applications in a wide variety of cases. A computer automated laboratory make researches cheaper and more productive and improves the way students learn. Rather than focusing on sometimes tedious methods of gathering data, educators and students can focus on results and concepts. Students still learn methodology, but spend the majority of their time executing their experiments instead of building them.

Keywords: measurement, graphical programming, virtual instrumentation

 

1 Introduction of the work place

First contact with National Instruments® products has run at the Departments of Electrical Measurement in 1991. National Instruments® sales office Dewetron Prague Ltd. has equipped a demonstration workplace with NI software and hardware products (GPIB PCIIA, LabPC DAQ board, LabWindows for DOS 1.2) at this year. This enabled to get familiar with NI products for workers from the Departments and brought starting point to introduction of virtual instrumentation based on NI products, not well known at this time at Czech Republic.

At 1993 closer co-operation between VSB-Technical University Ostrava and National Instruments® has started. Presidents of both institutions have signed agreement “Instrument Driver Development Program”. In the framework of the signed agreement ten University students who take part at the program spend four months studying stay at Austin at National Instruments® Headquarters. Nowadays the students work at the center that deals with writing instrument drivers for the instruments shipped to VSB-Technical University Ostrava in this objective. The center also serves as system integrator for National Instruments® customers at Czech Republic.

Virtual Instrumentation tools are used also for research work at the Department of Electrical Measurement. The virtual instrumentation was a part of one TEMPUS project financed by EU. We were solving VXI Measuring System project in the frame of INSTRUMENT – the research program financed by Ministry of Education of the Czech Republic. The results are presented at national and international conferences and seminars. One part of our development activity we are doing in the frame of Science and Technological Park Ostrava in the spin off ELCOM Company.

My colleague Daniel Kaminsky describes building International Network with World Leading Instrumentation Companies within Virtual Instrumentation Research & Development Project in another paper at this conference.

2 Introduction of Graphical Programming in LabVIEWTM

In 1986, National Instruments® introduced LabVIEW 1.0 with the goal of providing a software tool that empowered engineers to develop customized systems. It was the revolution that was changing instrumentation in both the test and measurement market and the industrial automation market. In the 13 years graphical programming has grown from an alternative programming methodology to an industry standard. Graphical programming system for data acquisition and control, data analysis and data presentation offers a new programming methodology how graphically assembles software objects called virtual instruments (VIs).

The parts of virtual instrument are:
  • Front panel

graphical user interface. On the front panel are controls and indicators displays as objects from Control Palette Menu including numeric displays, meters, gauges, thermometers, tanks, LEDs, charts, graphs and more. When VI is complete, it is possible to use front panel to control the program by clicking a switch, moving a slide, zooming in on a graph or entering a value from the keyboard.

  • Block diagram

to program the VI it is possible to construct the block diagram without worrying about the many syntactical details of conventional programming. The Block diagram is constructed from the objects (icons) of Function Palette Menu, form connections them with wires to pass data from one block to the next.

  • Icon and connector

LabVIEWTM VIs are modular in design, so any VI can run by itself or be used as part of another VI.

LabVIEWTM is a program development application, much like Pascal, C or BASIC. However, LabVIEWTM is different from those applications in one important respect. Other programming systems use text-based languages to create lines of code, while LabVIEWTM uses a graphical programming language, G, to create programs in block diagram form.

LabVIEWTM, like C or BASIC, is a general-purpose programming system with extensive libraries of functions for any programming task. LabVIEWTM includes libraries for data acquisition, GPIB and serial instrument control, data analysis, data presentation, and data storage. LabVIEWTM also includes conventional program development tools, so the students can set breakpoints, animate the execution to see how data passes through the program, and single-step through the program to make debugging and program development easier.

LabVIEWTM uses patented dataflow programming model that frees the user from linear architecture of text based languages. Because the execution order in LabVIEWTM is determined by flow of data between blocks, and not by sequential lines of text, it is possible to create diagrams that have simultaneous operations. Consequently, LabVIEWTM is multitasking and multithreading system – running multiple execution threads and multiple VIs.

3 Graphical programming in teaching of instrumentation at VSB – Technical University Ostrava

The teaching subject Electrical Measurement is the base course of measurement and instrumentation and is mandatory for all electrical lines students at Faculty of Electrical Engineering and Informatics VSB-Technical University Ostrava in the second year of their study. One block of lectures in the frame of this course is donated to virtual instrumentation. The students are learning here the basics of hardware components and development systems for instrumentation inclusive the new methodology of programming.

Staff members of the department built a laboratory of electrical measurements with 12 prepared tasks where the students learn about basic methods of measuring active and passive electrical quantities. The students use instruments to perform the measurement and transfer the measurement data to a computer, or get familiar with virtual instruments built around multifunction data acquisition board plugged into a PC.

The VSB-Technical University Ostrava, Faculty of Electrical Engineering and Informatics has been developing also such study branches as Measuring and Control Techniques and Informatics. The Department of Electrical Measurement prepared for the students above-mentioned branch a line of subjects providing them with new approaches towards the measuring issue – philosophy of virtual instrumentation. The background for those subjects teaching is our experience having been acquired during out long term cooperation with National Instruments Company while their products applying.

Now after quite difficult beginning eight years ago we are very well equipped both in terms material and human resources. Two computer classrooms are available for our students, each of them comprising eight workplaces, other systems being located in particular laboratories. All Pentium-based workplaces are interconnected to the network covered by a server and installed software, the National Instrument software being given the highest priority.

Each workplace can utilize also any of hardware components being quite widely available within Department of Electrical Measurements:

The lab for software systems of measurement automation is equipped with three VXI measurement systems and one PXI measurement system – the modular instrumentation platform delivering high performance, flexible and easy to use measurements. A few measuring instruments at the department are equipped with GPIB communication interface (HP scopes and multimeters mainly).

With above described equipment we can change our approach to teaching of instrumentation. Through the power of computer-based tools our students can build their own solutions exactly suited to their needs rather than being confined to a limited, inflexible and expansive selection of fixed-function, traditional instruments. With every new advance in mainstream PC technology, computer based measurement systems become more dynamic and powerful. The students can transform the personal computer into an infinite number of virtual instruments. The key point of such type measurement systems isn´t a special hardware with low level firmware, but open architecture of common personal computer with powerful and flexible software application.

Basic experience and knowledge of text oriented development environment and graphical programming can our students acquire in special subjects offered by Department of electrical measurement:

A diploma preparation is a final study task for the students. As a tool for solution of their diploma, students often choose graphical programming having been learnt by them in full detail during their study. Being open, complete in terms and conception and efficient this graphical programming enables a wide variety of problems to be resolved offering time saving and possibility to be fully concentrated on the problem under solving, instead of need to spend time for routine activities.

4 Case studies of using of graphical programming and virtual instrumentation

Although the main purpose of LabVIEWTM is instrumentation the graphical programming language can be used for solving variety of tasks. The G programming language feature as is self documenting predestines LabVIEWTM also for tutorial.

4.1 Simple electrical circuit simulation

In the first part of University studies the students are learning many subjects where they study the behavior of simple electrical circuits during the transitions as are switching processes. All these problems lead to solving of differential equation. Solving of these equations is time consuming and in some cases the complexity doesn´t enable to student to understand the physical fundamentals of the phenomena. By creating adequate model of electrical circuit it is possible to observe the behavior of circuit when changing the parameters and initial conditions. This leads to deepen of modeling advancement as expedient human activity that serves for acquiring of information about one system by means of another system e.i. model.

With the wide spread of personal computers the change over analog to discrete models is more and more frequent. For modeling the special programming languages have been developed. Such languages enable to describe each part of model e.i. its connections and behavior. Teaching of such languages is not a part of basic electrical engineering curricula what is the main problem of their practical usage in education process and mostlu in technical practice. So the aim was to use the advantages of LabVIEWTM also for modeling and simulation.

Such method of modeling is described in reference 3 - Electrical Drives Simulation in Graphical Programming System.

4.2 Using of simulated data in teaching of instrumentation

With functions for signal generation from advanced analysis library of LabVIEWTM it is possible to teach the students the structure of real measurement systems without expensive measuring instruments. The students can use in the block diagram of developed system the instrument driver functions with simulated data structures instead of results of real measurement. Such approach to the teaching of instrumentation shows the example selected from standard examples library of development environment LabVIEWTM .

The problem is defined as measuring the frequency response of unit under test. The stimulation of unit under test is executed by function generator and measuring of response is executed by digital multimeter (DMM). Both instruments are controlled by personal computer through GPIB interface.

The described situation shows next block scheme:

Figure 1. Measuring of frequency response

The graphical user interface defined in graphical development system LabVIEWTM for this case study shows the next picture:

Figure 2. Front panel of application

On the front panel students place the controls and data displays for developed application by choosing objects from Controls palette, including numeric displays, meters, gauges, thermometers and more. When the VI is complete, the students can use the front panel to control the system.

To program the VI students construct the block diagram without worrying about the many syntactical details of conventional programming. They select objects (icons) from Functions palette and connect them with wires to pass data from one block to the next. The next picture shows the block diagram for described case study.

Figure 3. The block diagram of described case study

Inside the sequence programming structure inside the LOOP cycle are the icons of two functions for simulated communication with next instruments:

Figure 4. Front panel of function for communication with function generator

 

Figure 5. Front panel of DMM

Both functions are using the simulated data. This allows the students learning the structure and functions of automated test system without have the real instruments.

4.3 Development of simulators in graphical programming system

One of the task given to students was training for medical personnel aimed towards complex medical instrumentation usage. A background for the problem resolving comprises following factors:

A defined objective to have been achieved was to create application enabling in interactive form to introduce the operators to the particular medical apparatus using, and, simultaneously, to introduce the nursing personnel to typical illness symptoms requiring a respective apparatus using as well as the most optimum setting of the apparatus in certain situation. This training should utilize computing devices and lead the operators to a result of routine gaining in order to use the apparatus in accurate, correct and optimum way. Examples, mistakes control and written protocol elaboration from a training course was emphasized in that procedure.

To practice a general methodology, a case of forced lungs ventilation was chosen, this being a typical situation requiring as quick and optimum servoventilator using as possible regarding to a patient status, being usually critical when servoventilator requiring, not allowing too many experiments for particular parameters setting.

The LabVIEWTM development environment was chosen as the optimum tool for a particular application creating. The results and structure of this application was described in reference 2 - Simulator for Medical Personnel Training.

4.4 PC based instruments development

The power network analyzer BK500 PLUS is real the virtual instrument using the advatages of portable PC, fast National Instruments Plug&Play DAQ board AT MIO 16E-10 and special input signal conditioning modules that extend the input ranges of DAQ board to possibility of both voltage and current measurement with anti-alliasing filter capabilities.

The software application has been designed and developed using LabVIEWTM using most of the benefits concerning graphical programming including buffered DAQ, parallel running of VIs, dynamic loading of VIs. The final sophisticated application is the solution, that results to the instrument ideal for power network measurements according to IEC standards.

Power network analyzer BK500 PLUS is the new product, developed jointly by ELCOM Prague Ltd. and Department of electrical Measurement of FEI VSB TU Ostrava. Power network analyzer has a modular structure of the software, is running in the MS Windows 95/98 or Windows NT operating system. The instrument fully follows the standard  EN 61000-4-7, which is dealing by electromagnetic compatibility issues (IEC 1000). The part 4 – Testing and measurement techniques and its section 7 is focused into General guide on harmonics and interharmonics measurements and instrumentation, for power supply systems and equipment connected thereto.

Power network analyzer BK 500 PLUS is very sophisticated application – there are six instruments integrated into this analyzer:

The structure and functions of this analyzer are in detail described in reference 4, 5, 6, 7.

5 Conclusions

Described principles of virtual instrumentation and new programming methodology have several advantages:

References

JOHNSON, GARY. LabVIEW Graphical Programming. NewYork: McGraw Hill Publishing (800) 722-4726, 1995, ISBN 0-07-032915-x

ZIDEK, JAN. Simulator for Medical Personnel Training. In: NI Week95 User Symposium Proceedings. Austin: National Instruments, 1995, Part Number 320967A-01, p. 3-23-3.30

ZIDEK, JAN. Electrical Drives Simulation in Graphical Programming System. In: Sbornik vedeckych praci Vysoke skoly banske - Technicke univerzity Ostrava. Ostrava: VSB – Technická univerzita Ostrava, 1996, rocnik II, cislo 1, rada elektrotechnicka, clanek c. 11, ISSN – 1210 – 048X

KAMINSKY, D., KORENC, V., ZIDEK,J. Joint FFT Analyzer and Energy Monitor BK 500 Based on Portable PC, AT-MIO-16E-10 and LabVIEW Application Software. In: NI Week96 User Symposium Proceedings. Austin: National Instruments, 1996, Part Number 320967A-01

KAMINSKY, D., KORENC, V., ZIDEK,J. Virtual Instrumentation in Power Quality Measurements - Joint FFT Analyzer and Energy Monitor designed according with IEC 1000-4-7. In: Power Quality 97 Conference Proceedings. Nurnberg: PQ97, 1997

KAMINSKY, D., KORENC, V., ZIDEK,J. Nova podoba analyzatoru siti BK 500. In: Elektro-odborny casopis pro elektrotechniku, Praha: rocnik 8, 1998, c.11, str. 6-9, ISSN 1210-0889

ZIDEK, JAN. Virtual Flickermeter. In: : Sbornik vedeckych praci Vysoke skoly banske - Technicke univerzity Ostrava. Ostrava: VSB – Technická univerzita Ostrava, 1999, rocnik V, cislo 1, rada elektrotechnicka