martes, 14 de junio de 2011

LAVIEW V Reading data from Excel and generate a graph

As the sentence in this exercise we will read data from an Excel file and they will generate a graph from the data read. It is therefore necessary to build an extension Excelcon. XLSX. Introduce three columns within Excel. Inside the columns introduce numbers which will serve to generate the graph.


Creating a LabVIEW VI will begin the new year. The first thing you need is an instruction can open a file.

Report can open a file. The function we need is Programming / Report Generation / New Report. This is the icon shown in the image above in the center. We can select a control file address and we define constants is an Excel file and it will open minimized.

After opening the Excel resource we will do something with it. With LabVIEW own instructions to work with Excel files will use an instruction which will help us to read the contents of Excel. In Addons / Office / Excel.lib / Excel Get Data ([str]). vi
saying the data type you want to read and from where to where we have to read show a two-dimensional array which I keep in the varibales READ THE EXCEL




By having the full array of Excel I can deal with functions of variables. Using a while loop and a function to read a particular cell of the desired cell array read. This reading is operated by two controls that make therow and column.

In the bottom do a bit of the same. I dig the use of Excel and dealing with the same function to read the content. In this case do not read the full Array only a particular cell. With a fixed variables read columns 1, 2 and 3. Instead the line to read is handled from a single control. These three read data representing the phase and amplitude Cycle introduce them in a wave generator and graphed.



 Dowload ejercices:
https://sites.google.com/site/franbc0100/GraficosconArrayenExcel.rar?attredirects=0&d=1

No hay comentarios:

Publicar un comentario