LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to measurement file

Hello 

 

I have created an automated test for a power supply that works flawlessly, it may not be the most efficient way to do it, but it works. So i am not seeking help to the testing program itself.

 

However i want to save the measurements into a test report (excel file) and i just cant figure out how to do it, i've played around with the write to measurement file and file i/o but without luck.

 

How do i write the test results from test indicator #1-18 into an excel file?

0 Kudos
Message 1 of 6
(1,305 Views)

Hi Ignocia,

 

Excel can read a comma-delimited text file or a tab-delimited text file without any issues. 

There's an example project "Tab-Delimited Data.lvproj" that shows how to write tab-delimited files; it's pretty simple code so I'd advise having a look through this. You can manipulate the strings to match your VI as needed.

 

Alternatively if you have the Report Generation Toolkit, you can find a significant amount of examples around this in the NI Example Finder by searching for "Excel".

 

Cheers,

Nick

0 Kudos
Message 2 of 6
(1,241 Views)

I tried doing this with the write to measurement file. it almost does what i want. My problem now is that the signal index doesnt work as i want it to. I cant make new headers in the excel file. Can one of you help me understand how the headers work?

 

I attached the file

0 Kudos
Message 3 of 6
(1,227 Views)

First a little advice:

  1. Don't Use Express VI's
    1. Express VI's are intended for those 2 hour LabVIEW sales pitches to shoe non-programmer how fast you can just throw something together
    2. As you see for any "real" application they are to restrictive
  2. Don't use Dynamic Data types!
    1. Know and understand the data type you are working with

 

Write data to a file like this:

  1. Open a file
  2. Write your headers to the file
  3. Enter acquisition loop
  4. Acquire data
  5. Write it to the file
  6. Goto 4 until acquisition is complete
  7. Exit acquisition loop
  8. Close your data file
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 6
(1,213 Views)

Thanks for the response RTSLVU.

 

Could you give me an example? I have tried using the normal file i/o blocks but never figured out how to make excel sheets and write headers etc.

 

Also what do you mean by dynamic data types?

0 Kudos
Message 5 of 6
(1,200 Views)

Update: I figured out how to make headers and write numbers after the headers. Now how do i pull data from each of my cases and place them 1 by 1 in the excel sheet?

 

I attached my solution to creating the excel file and my measurement program.

Download All
0 Kudos
Message 6 of 6
(1,182 Views)