Sunteți pe pagina 1din 6

DATA LOGGING AND ANALYSIS BY VIRTUAL INSTRUMENTATION

Nicolae PATRASCOIU Adrian Marius TOMUS Department of Automation, Industrial Informatics and Computers University of Petrosani Universitii 20, Petroani, Romnia patrascoiu@upet.ro Abstract: Real-world data logging applications are typically more involved than just acquiring and recording signals, typically involving some combination of online analysis, offline analysis, display, report generation, and data sharing. In this paper we propose a virtual instrument (VI) that converts a PC into a data logger and also the same instruments are used to offline analysis of measured and recording data and to sharing data with another application like Excel. Measurement signals are converted into measurement data aid A/D converter CA3162E follow-up recording via LPT port. Keywords: data logging, A/D converter, LPT, data analysis, LabView 1. Introduction Basic elements of a data logging and analyzing system are presented in figure1. Acquiring is the process of actually measuring the physical parameters and bringing them into your logging system. Online analysis consists of any processing done to the data while are acquiring. It includes alarms, data scaling, and sometimes control, among others. Logging is an obvious requirement of Data Online every data logging system. Offline Logging Analysis analysis is everything done with the data after it has been acquired in order to extract useful information from it. The Display, Online final functional block is made up display, Acquire Sharing, Analysis reporting, and data sharing. These are all Reporting the miscellaneous requirements that fill Fig.1. Basic elements of a data logging and out the functionality of a data logging analysis system system [5]. 2. Analog-to-digital conversion In this paper we consider a stand-alone analogtodigital converter CA3162E product by Intersil Corporation. The CA3162E and CA3162AE are I2L monolithic dual slope analog-to-digital converters that provide a 3 digit multiplexed BCD output. They are used with the BCDtoSevenSegment Decoders/Drivers and a minimum of external parts to implement a complete 3digit display used in many digital multimeters (DMM). This analogtodigital converter generate at output not a binary code and we consider the output signal done by a 7 bits word respectively 4 bits for BCD code of digit (BCD OUTPUTS) and 3 bits for digit selection (MSD, NSD and LSD). With these 7 bits code is necessary to

+ 5V

3 x 100 kO
0,27 F 50 kO 14 9 12

4 3
CA3162

MSD NSD LSD

D6 D5 D4 D3 D2 D1

display measured value and to store consecutive values into properly file so that these codes are acquired through LPT port [1]. For this the ones 7 bits are connected to the data section (pins 2 to 9, D0 D7) of the LPT port like diagram presented in fig.2. 3. Virtual Instrument

5
8 Hold
+

Software is of critical importance in PCbased data logging systems, because wellV 2 1 11 INPUT written logging software determines how data is 2 D0 SIGNAL V 10 2 7 13 stored, how quickly data can be written to disk, and how efficiently disk space is used and gives 4 x 100 kO 10 kO different data management capabilities. The software use, in this paper, to create + 5V a PC-based data logger is LabVIEW and also the same LabVIEW programs, that are called Fig. 2. LPT converter connection virtual instruments or VIs, are used for offline analysis. Every VI uses functions that manipulate input from the user interface or other sources and display that information and every VI has two components front panel respectively diagram bloc. The VI that perform both basics function that are data logging and data analysis has two mains front panels ONLINE ACQUISITION respectively OFFLINE ANALYSIS selected by means of the Tab Control.
4

16 15

22
1 0

IN

IN

3.1. Acquisition Virtual Instrument The front panel corresponding to ONLINE ACQUISITION is presented in fig.3. and this front panel is used to control acquisition process and also to display the important parameters of the acquisition process like acquisition state or measured values and also record date and time. There are three components that are waveform graph in stack plot and two blocks Acquisition Control that control acquisition parameters like parallel port address number of acquisitions, number of points per acquisition respectively Acquisition Progress that show in different form current value acquired. Waveform graph display the filtered and non filtered form of the acquired signal. Fig.3. ONLINE ACQUISITION Front Panel

To ensure the read bits on data section on the LPT port is used a Sequence Structure where the first 3 sequences are used for LPT settings [3]. All other program elements are included into a While Loop that repeats the subdiagram inside it until the conditional terminal, an input terminal, receives a particular Boolean value so that

Fig.4. ONLINE ACQUISITION Diagram Bloc acquisition can be interrupt by user. After port settings is select the file where are storage the measured values and for that are used File Dialog respectively New File. The program can assure one ore more acquisition; number of these is selected by properly control and number of points of every this acquisition that mean number of values is also selected by properly control, both on the front panel. One of the most important sections of the diagram bloc is conversion section (fig.4.). In this section the 7 bits word acquired is converted into same numerical representation. To obtain the last one numerical respectively value acquired is used 3 Case Structure. One of these is selected by properly bit corresponding MSD, NSD and LSD analogtodigital converter outputs connected at D4, D5 and D6 bits of the LPT port and wired to the selected terminal. All that structures are included into a For Loop where controls value Points/Acquisition is the value wired to the count (N) terminal. Every structure contains a subdiagram (SubVI) BCD-NUM.vi [2] that computes the right value of the 4 last significant bits. These bits represent the corresponding BCD code for tenths, units respectively tens. The conversion in whichever structure, only when this are selected, in decimal number Nr is accomplished by relation: Nr = D 0 2 0 + D1 21 + D 2 2 2 + D 3 2 3 (1) were Di represent bits of the BCD output of the analogtodigital converter and the value V acquired has the form: V = D 4 10 1 Nr + D 5 Nr + D 6 10 Nr (2)

Every values generates by For Loop are displayed under numerical value form and are logging and displayed also under graph form by the Acquisition Results window. At the same time are generating by Get Date/Time String the real time called record which will be associated to the stored data. Logging data are definite by using Circuit Interface Nod (CIN) Write File that writes data to an open file specified by refnum and after performance [6]. For cut the spikes inlays by analogtodigital converter is used Median Filter that applies a median filter of rank to the input data sequence. The result of this operation is to filter the signal represented by input data sequence and on the Front panel it can observe the difference. 3.2. Analysis Virtual Instrument The terms "data analysis" and "statistics" mean the same thing, the study of how we describe, combine, and make inferences from numbers. A lot of measured are scared of numbers, but statistics has got less to do with numbers, and more to do with rules for arranging them. There are three general areas that make up the field of statistics and one of these is descriptive statistics which fall into one of two categories: measures of central tendency (mean, median, and mode) or measures of dispersion (standard deviation and variance). LabVIEW offers many of built-in analysis functions that cover different areas and methods of extracting information from acquired data. With these functions it can be make Upper Failed Data a virtual instrument (VI) that front panel has two components switching by Lower Failed Data a proper Tab Control between SAMPLE RECORD and DATA Passed RECORD that mean Data analysis of every 2000 acquiring points (one sample) or all data representing acquiring points. The VI corresponding to one sample and to all data is presented in fig.5. On that panel are arranged the indicators elements that assure the visualization the results of the data analysis about measured and recorded values. Those elements Fig.5. OFFLINE ANALYSIS Front Panel indicate, at one time with

record time the limits values and statistical values. For the limit values are indicate also the time when these limits are accomplished. The statistical values represent the statistic parameters described above that is mean, standard deviation and variance computed Two Waveform Graphs are used to the graphical analysis. One of these display the graphical evolution of record data i.e. the measured signal and for this exist possibly to setup the lower and upper limits. Another display time period for that data is in excess of lower or upper limits. The base element of the diagram bloc (fig.6.) is While Loop that repeats the subdiagram inside while is processing all recorded data. At this loop, are attached elements by that are opened and closed corresponding file. The limits values are determined by Statistics.vi which determines maximum and minimum values and their associated time value for the recorded data waveform.

Fig.6. OFFLINE ANALYSIS Diagram Bloc The current statistic values are determined by the same Statistics.vi which computes the mean, standard deviation, and variance of the values in the input sequence X. For this bloc, the weighting input, which determines whether to calculate the population or the sample standard deviation and variance, is setting to the default value i.e. the statistic values are compute for a sample of measured values. The Mask and Limit Testing.vi perform limit testing on the input waveform i.e. recorded data. It compares the input signal with the upper and lower limits and 100 ignores the limit that is not wired. It 90 returns a TRUE if the signal is less 80 70 then or equal to the upper limit and 60 greater than or equal to the lower limit. 50 It returns a FALSE instead. The 40 outputs witch contains the results of 30 20 the comparison at each data point and 10 an array of waveforms containing the 0 upper limit and lower limit, the signal, Time 0 50 100 150 and the failures. Fig.7. Excel Data Representation
Measured Value

Use LabVIEW measurement data files To save measurement data files is use the Write LabVIEW Measurement File Express.vi generates. The LabVIEW data file is a tab-delimited text file that can open with a spreadsheet application like Microsoft Excel or a text-editing application. The recorded data with graph representation in Excel for the same acquisitions data sequences are presented in figure 7. In addition to the data an Express.vi generates, the .lvm file includes information about the data, such as the date and time the data was generated. 5. Conclusions Using data logging offer the possibility to follow up the evolution for a system or process variable for a long time. PC-based data logging systems provide the most flexibility, customization, and integration. The PC-based data logging systems propose in this paper can be simple making using a usual DMM from which is enough to ladle out the signals generate to display. This signal can be different from DMM to DMM but is so easy to adapt the VI to proper signals form. We are consider a difficult case where analogtodigital converter provide a 3 digit multiplexed BCD output but if digits are not multiplexed the solution for VI are simplest. We are consider also that LabVIEW which is a soft dedicated to data acquisition satisfy the requests for data logging software. Aid a virtual instrument can create applications that provide dialogs and interfaces that can use so that depending on their input, specific analysis routines are performed on any given data set. By building this type of application, users build a certain degree of interactivity into their applications. References Sisteme de achizitie de date pentru calculatoare personale. Ed. Albastra, Cluj-Napoca, 1998; pp 125 [2].PATRASCOIU, N. 2004Sisteme de achizitie si prelucrare a datelor. Instrumentatie virtuala. Ed. Didactica si Pedagogica, Bucuresti, 2004; pp 258 [3] PATRASCOIU, N. 2002. Modelarea i simularea prin utilizarea instrumentaiei virtuale. In Revista de Instrumentatie Virtuala.Cluj-Napoca, Romania, 2002; pp 5-8,ISSN 1453-8059 [4]. * * * .2001. A Review of PC-Based Data Logging and Recording Techniques. National Instruments, December.2001 [5] * * *. 2003. LabVIEW for Measurement and Data Analysis National Instruments, January.2003 [6]. * * *.2003. LabVIEW. User Manual. National Instruments, April 2003 Edition Part Number 320999E-01 [1].CIASCAI, I. 1998.

S-ar putea să vă placă și