LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with exporting to an Excel spreadsheet

Greetings!


I would first like to say that I am a student working on a data acquisition system for a company I have an internship with.  I have used LabVIEW in classes a lot but have very limited experience in creating VIs on my own (this is the first time Im doing this without a specific guide as I had in class).  This VI will be used to monitor the efficiency of an air pollution control system so it will be running continuously for a few days at a time so there will be a lot of data points.  The company I work for would like the VI to record the data from each signal every 30 secs or so to the same excel file with the time/date the reading was taken included in each row. So far the VI uses the DAQ assistant to take in data from temperature, humidity, and pressure thermocouples and displays the readings on the front panel.  That part is fine, but as you know it doesnt export the data.  The only thing I have tried that has worked is the "Write to Measurement File"  way of doing this, but the format it puts the data in is not practical for analysis as it has a lot of extraneous information included with every reading.  Another problem that I have run into is trying to split up the VI so I can have real-time readings on the front panel, but have the delay of taking samples that are exported to the text file.  My idea is to put the signals and front panel gauges in its own while loop and then the file exporting part of the VI inside its own while loop with the "Time Delay" icon.  To me all of this seems like it should be very simple to fix, but my lack of experience with LabVIEW is really hampering my progress.  Hopefully someone can help.  Thank you!

 

~Dustin

 

The following is the VI I have worked on so far.  Thanks again

0 Kudos
Message 1 of 9
(3,574 Views)

This should get you significantly closer to your goal.

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
Message 2 of 9
(3,564 Views)
Thank you very much for your help, however, I only have access to LabVIEW 8.0 for the next few weeks.  If you could repost the VI readable for 8.0 that would be wonderful.  Thanks again and sorry for not mentioning the version I have.

~Dustin
0 Kudos
Message 3 of 9
(3,558 Views)
 
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 9
(3,553 Views)
 
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 5 of 9
(3,554 Views)
Matthew had some very valid additions, namely slowing down the loop and integrating the file I/O into your DAQ loop, rather than having two.

One additional recommendation I would make would be to use the Elapsed Time Express VI to see whether 30 seconds has elapsed, as the millisecond timer can roll over to 0, invalidating the calculation.

Best of luck in your application!
-Sam F, DAQ Marketing Manager
0 Kudos
Message 6 of 9
(3,521 Views)
One additional thing to note is that the latest code that was posted didn't actually write to an Excel file. It wrote to a file that you can open with Excel - after wading through a dialog box that tells Excel how to read it. Depending on what you are wanting to do with the data next, this is a potentially significant distinction.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 9
(3,515 Views)
Thank you all for your generous advice/help.  I'm going to try to work with the new file today and see how everything pans out.  Thanks again!

~Dustin
0 Kudos
Message 8 of 9
(3,464 Views)
If you give the file a .CSV (Comma Separated Value) file extension Excel will automatically open the file with no dialogs.
 
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 9 of 9
(3,437 Views)