LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

outputing voltage from an excel data sheet

I have an excel data sheet with a starting time of 20 seconds and ending in 30 seconds. There are about 700 data points "Voltage" versus time. I would like to take the time and voltage and output to a DAQ module. I tried to read the excel sheet. But no luck. I am trying to increase pressure from 20 PSI to 300 PSI in 20 seconds. Our custumer has a strang graph of the inlet pressure. I am trying take the data and re create the same conditions the custumer saw at his site. I am trying to plot the second colum versus the third colum.

 

Any Ideas?

 

Thanks

 

Philip Nielsen

0 Kudos
Message 1 of 11
(3,791 Views)

pnielsen@gplains.com wrote:

 I tried to read the excel sheet. But no luck.


What did you try? Are you using the Read From Spreadsheet File VI, or are you using ActiveX? The former will not work since you have an Excel workbook, not a text file, which is what the Read From Spreadsheet File VI works with. For a simple example on reading an Excel workbook using ActiveX, see the VI in this message. That VI returns the data as strings, but you can easily change the datatype to DBL in the code. 

 

For more examples you can look over the Excel thread (please note that thread is meant as a repository of links - do not post questions to that thread).

0 Kudos
Message 2 of 11
(3,783 Views)

That makes sense. I was trying to read from the excel worksheet. I will read the links that you provided me for more understanding.

 

Thank You,

 

Philip

 

 

Oh how do I add Kudos?

0 Kudos
Message 3 of 11
(3,775 Views)
Just click on the Kudos glyph on the message you want to Kudo.
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 4 of 11
(3,766 Views)

I was able to pull ecell data from a worksheet using 2009 labview. I created a 2d array. I plotted the data on a waveform chart.This was to prove I was grabbing the data correctly. The scaling was off. But after some time I was able to duplicate the excel graph exactly. In 10 seconds I plotted a 150 data points onto a waveform chart. I used an index array to pull single data points from the data array. But now I have a150 data points that I am trying to output to a DAQ "A0". How do I plot the data points versus time? I am trying to duplicate a condition that our custumer saw.

 

Thank You

 

Philip

 

 

Download All
0 Kudos
Message 5 of 11
(3,717 Views)
I assume when you ask to plot it against time you're referring to the absolute time that's in the Excel file. You need to convert Excel time to LabVIEW time. This comes up quite often in the forums. In fact, there was a question about it just a couple of days ago. Here's an example of going from LabVIEW time to Excel time: http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=389006#M389006. You just need to do the reverse.
Message 6 of 11
(3,706 Views)

Thanks for the link. I need to look over the block diagram for awhile. I am still a little confused.

 

Thank You,

 

Philip

0 Kudos
Message 7 of 11
(3,693 Views)
What does that spreadsheet show? Is that the one you're trying to read? I see no time information in there.
0 Kudos
Message 8 of 11
(3,682 Views)

I sent the wrong excel worksheet. The fist column is time in seconds. 20 seconds.  The seond column is pressure. The time scale is deffinitly wrong as you stated in your earlier email.

I massage the data in the waveform graph to get the graph to match the 10 second interval. 

 

 

Philip

0 Kudos
Message 9 of 11
(3,668 Views)
Have you tried an XY chart? If I understood you correctly, I believe that will give you what you want. (In the attached figure I use Read From Spreadsheet File as I exported the sheet from Excel to a tab-delimited text file.)
Message 10 of 11
(3,657 Views)