International Journal of Computer Applications (0975 8887) Volume 40No.16, February 2012 11 Developing a LabVIEW and MATLAB-based Test Bed for Data Acquisition, Analysis and Calibration of Frequency Generators over GPIB Shehryar Humayun Institute of Space Technology, Islamabad Maria Mehmood Institute of Space Technology, Islamabad Faran Mahmood Institute of Space Technology, Islamabad ABSTRACT This paper focuses on methods of interfacingLabVIEW with MATLAB package for applicationswhichneed extensive computation as well as automation and control. It aims to integrate MATLAB and LabVIEW together,and develop a calibration software for frequency generators supporting the IEEE-488 bus standard. Different approaches have been explored that can be used to combine the data acquisition features of LabVIEWand computational power of MATLABin presenting the results. General Terms GPIB bus protocol, calibration Keywords LabVIEW, MATLAB, GPIB 1. INTRODUCTION LabVIEW (Laboratory Virtual Instrumentation Engineering Workbench) is based on a dataflow programming language while MATLAB (Matrix Laboratory) isa fourth-generation programming language for performing numerical and computational tasks. LabVIEW‟s dataflow programming is graphical in nature and is often referred as „G‟. The routines made with this G language are called VIs (Virtual Instruments). The programming interface is based on a “Front Panel”, the part which serves as user interface and “Block Diagram”, the part where various components are joined in a graphical manner to form astructure. Front Panel takes input and gives output. There is also another important feature called as “Connector Panel”. It is used for calling one VI in block diagram of another VI. The initial focus of LabVIEW was towards measurement, automation and control but with time it incorporated more features, transforming it into a full-fledged software developing environment. The key advantage of using G is its capability of parallel execution [1]. MATLAB is often referred as 4GL (fourth generation Language) as it was developed for a specific purpose, which was obviously matrix operations involving rigorous numerical tasks, which if performed by simple languages like C, C++ etc. can be exhaustive for both the programmer and the computer. The MATLAB was intended originally for complex matrix computations. It also kept on integrating different features toease various engineering disciplines. For example, addition of Simulink was a major step towards graphical modeling in MATLAB. Using LabVIEW or MATLAB for any specific function depends on the programmer‟s comfort with the software. But there are occasions when we require a routine written in one environment to be employed in the other. Such as, a code written in MATLAB can exploit inherit parallel execution of Genvironment. This paper deals with one such case where the calibration of a signal generator is analyzed by combing the two packages via three different approaches. 2. LITERATURE SURVEY In [2], [3], [4], the author has demonstrated the use of Mathscript RT module to deploy MATLAB source files on NI platforms. In [5], the author proposed solutions of using LabView for real-time control with MATLAB engine running at the back end. GPIB is discussed in detail in [6], where the author advocates the use of GPIB interface as a preferred choice for instrumentation control. 3. IMPLEMENTATION A wide variety of protocols are availableto connect and communicate with different laboratory instruments present. These protocols range from simple serial communication to GPIB, USB, and Ethernet etc. LabVIEW provides the simplest solutionfor communicating with any of these protocols. MATLAB has been traditionally used as anaccepted platform for mathematical manipulation of data. In this paper we are discussing one of the possible options for using LabVIEW for communication purposes. Data is acquired through GPIB protocol. Once data is acquired, we will use the powerful mathematical features of MATLAB for handling that data. The procedure followedin the paperis that first the data is acquired from the instrument under test and then it is correlatedwith software generated waveforms to find offset errors. LabVIEW interface is used for acquisition of data from the Agilent Oscilloscope via GPIB interface. Due to the high computation power available, the waveform is generated internally with the help of MATLAB at a high sampling rate. This waveform is importedin LabVIEW with the help of three different techniques. These techniques are implemented to be used for the same purpose and then compared to conclude which approach is the best. 4. THE SYSTEM 4.1 Signal Generator Signal generator is used as input. We used a number of different generators to ensure proper readings. For example: 1.Aeroflex Signal GeneratorFrequency Range: 10 kHz-550 MHz, Resolution: 10 Hz; Digital Readout , Switching Time: 200 ms.