• Ei tuloksia

The measure instrument has experienced a significant shift from the hardware centered towards the software centered. With the development of computer technology, the virtual instrument performance has boosted enormously compared to the first time it released into the market. In the section, it introduces the software architecture of a virtual instru-ment, the widely used interface buses and discusses the advantages and disadvantages of virtual instrument.

2.2.1 Definition and Principle

Driven by the motivation lowering costs for measurement equipment and boosting the measurement speed, virtual instrument has witnessed fast development for the last few decades. The definition of a virtual instrument is based on a modern computer or a work-station that can provide powerful computation, perform robust data process and display complicated results. Meanwhile, a user could simplify the design, deployment, and us-age of programmable measurement system by utilizing a user-defined, virtual interface to acquire data.

The word "virtual" can be interpreted from two aspects:

1. virtual control panel

The physical control panel in the conventional instrument has been replaced by the software user interface on the computer and similar icons have substituted the button, the switch in term of appearance.

2. invisible measurement capacity

Compare to a traditional instrument, measurement functions in a virtual instrument are achieved by the development of software and it does provide better performance in many perspectives such as data collection and process.

Nowadays, a typical virtual instrument generally contains these necessary components:

sensors, a Data Acquisition (DAQ) [12] device and a computer that is equipped with a programmable software displayed in figure 2.4.

Figure 2.4. The composition of a virtual instrument includes three essential units. The sensors are acquiring the data and pass them to a DAQ device or board [13] where has an ability to process raw data. The processing is divided into two steps: signal conditioning and ADC converting. After that, the data can be sent to a computer via the communication made by drivers. Finally, customized software displays and further handles the measurement result into many forms.

Compared to the hardware-centered instrument, the main difference is that the virtual instrument adopts computers for data process. The computer must have an application software for data computation, representation and a driver software for device communi-cation. Plus, the field buses are used for the data transferring between the computer and

DAQ devices.

2.2.2 Software Structure

The customized application software that controls the instrument and handle the data is considered as one of the largest innovations in virtual instrument compared traditional instrument. Nowadays, as most application software has similar software design structure to enhance the efficiency of data transmission. Therefore, the structure of the application software from a virtual instrument could be categorized into five critical layers which can be described in a hierarchical order:

• User Interface

• Data Process and Analysis

• Instrument Driver

• Virtual Instrument Software Architecture (VISA)

• Input/Output (I/O) Interface

Figure 2.5. In a virtual instrument, the software structure is classified into five layers.

The top layer is interacting with user actions. Then the software algorithm reacts and processes the event by calling the instrument driver which either commanding or querying to the instrument. Most drivers communicate with the embedded system of the instrument by using VISA [14] via different I/O interfaces.

In figure 2.5, it displays the structure of the application software in the virtual instru-ment. The data transferring between the adjacent layers is bilateral that regulates the data transmission in the majority of virtual instrument systems. The user interface han-dles user events and displays the measured data. The data process & analysis makes use of algorithms for data computation. The third layer, instrument driver connects the

application software and the specific instrument to receive and send commands. VISA is designed above the I/O interface which solves the device coupling problem regardless of which I/O interface used in the virtual instrument.

Figure 2.6. The VISA API library provides many simple functions to communicate with different devices with various interfaces. It supports serial port interface, GBIP interface, VXI interface and PC bus interface, regardless of device manufacturers.

During the development of the virtual instrument, device coupling was one of the main challenges. In order to promote communication and improve the interoperability between a variety of instruments that are manufactured by various vendors, VISA was developed by VXIplug&play Systems Alliance [15]. VISA is a communication standard for instru-mentation configuring, programming which includes GPIB, VXI/PXI [16], serial or USB interface. VISA can support multi-platforms and multi-type controls. One of the greatest benefits it brings is that it provides simple and easy-use Application Programming Inter-face (API)s for users to establish robust communication with different periphery devices regardless of its I/O interface types. The VISA hierarchy is shown in the figure 2.6 below.

Basically, the sending and receiving data from instruments can be achieved by two API:

Visa Read and Visa Write. The Visa Read API reads the specified number of bytes from the instrument appointed by the Visa resource name and returns the data into ROM buffer. The Visa Write API writes data from the buffer into the device regulated by the Visa resource name. Furthermore, only serial communication requires to configure settings for the port which can be done by Visa configure serial port API. Therefore, it is very easy to configure, program and troubleshoot the whole system by using VISA.

2.2.3 Interface Bus

The figure 2.6 illustrates the most common I/O interfaces in the virtual instrument. There-fore, there are some popular interconnect buses dominating the industry which are known as:

• Serial Port Bus

• GPIB Bus

• VXI Bus

• PC Bus

This chapter details the background and properties of each I/O bus:

Serial port communication bus based on RS-232 protocol uses a transmitter for data ac-quisition between the instrument and a Personal Computer (PC). It is designed to send data one bit at a time over a single communication channel or a computer bus consec-utively. However, it has limits in terms of data transmission speed and distance(up to 19.2 Kbytes/second, recently 115 Kbytes/second, and 15 meters) [17] and it does not allow more than one device to connect it. Generally, serial communication is welcomed because nowadays most PC has at least one serial port which means it does not need an extra converter to run the system other than a cable.

GPIB bus is the first industry-standard bus for parallel communication and it is also known as IEEE-488 [18]. A typical GPIB system can communicate with maximally 15 instru-ments simultaneously with a GPIB bus. GPIB interface is a 24-pin [19]VMEbus eXten-sions for InstrumentationVMEbus eXteneXten-sions for Instrumentation connector which has 8 data lines used to transmit data and messages between devices on the same bus, one byte(8 bits) at a time. It also includes three handshake lines for message transfer. The data rate could be up to 1 Mbytes per second [17].

Generally, a VXI bus is composed of a mainframe substrate on which has a backplane connection for plug-in modules. The VXI bus provides more features on modules, iso-lation, shielding and so on. The communication speed among units based on the VXI standard can be more than 20 Mbytes/second [20]. However, the main disadvantage of this system is that the equipment is very expensive and it is suitable for well-financed teams.

Besides, due to the prosperity of the DAQ device, the PC bus has been widely adopted.

PC buses that include USB and Ethernet cables are commonly used for simple plug-in instrumentation. The main properties of the PC bus are the simplicity of connection and low cost, which makes them perfect for building a small and inexpensive data acquisition system.

2.2.4 Advantage and Disadvantage of Virtual Instruments

The advantages of a virtual instrument are obvious. For a runnable virtual instrument, the main costs come from two sides: the hardware instrument itself and the PC. The costs of instruments vary from device to device. Usually, modern PC or workstation can satisfy the majority of the requirement for running a virtual device. Therefore, the cost of a virtual instrument setup is predictable. In terms of performance, the virtual instrument has a good data process, display capacity based on the computing power of a computer.

Usually, users can customize the design of software to acquire desired results that also improves the performance.

However, there are still some disadvantages of a virtual instrument. First of all, the virtual instrument consumes a large amount the power. In most cases, the computer and exter-nal devices could run simultaneously for a few months that consistently needs a power supply. In addition, if data is transmitted wirelessly, the security of it cannot be guaranteed and it might be hacked during the transmission.