From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write multiple measurements to file

 

I'm currently trying to use Lab View to record readings from a multimeter to a file. The current way I'm doing this is having 5 different files that are written to so I would like to try and send them all to one excel spread sheet, one column for each type of reading. Is this possible with write to measurement? 

0 Kudos
Message 1 of 16
(7,254 Views)

The problem I am seeing is that you are taking different types of measurements with the same DMM.  You therefore have to mke changes between measurements to do what you want.  Are you currently doing that?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 16
(7,211 Views)

Yes, currently. The vi I included has been made more functional but I'm still having issues getting all of the measurements into the same excel sheet. The switching of some things around before the next measurement could also be fixed as I have acess to a 6509 and matrix card.

0 Kudos
Message 3 of 16
(7,201 Views)

In that case, use a FOR loop to go through all of the measurements and use an autoindexing tunnel for the measurement.  This will give you and array of measurements that you can then write to the file as a row, giving each measurement its own column.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 16
(7,175 Views)

As in one loop per set of measurements? 

0 Kudos
Message 5 of 16
(7,165 Views)

Yes, that's exactly what he means.  I've never used Write to Measurement File, but I've done a lot of writing to (and reading from) .xlsx Workbooks using the Report Generation Toolkit, which is included with base LabVIEW starting with LabVIEW 2014 (and you seem to be using LabVIEW 2013, where it is an add-on Toolkit).

 

If you want to try the Excel option in your code, I recommend writing a tiny Demo program that, say, creates a 1D array of 5 random numbers (a sample from 5 channels) and does maybe 10 "writes" before stopping.  Look at what you get, and adjust your code accordingly.

 

Bob Schor

0 Kudos
Message 6 of 16
(7,158 Views)

Ok, I'm seeing the picture here.. Something similar to this?

0 Kudos
Message 7 of 16
(7,133 Views)

I was thinking something more like this.  You should also do the full setup for the test inside of the case structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 16
(7,117 Views)

Interesting, I added names to the columns and now it will only output one row of data instead of appending the file.

0 Kudos
Message 9 of 16
(7,071 Views)

Nevermind, it works. I'm putting in the process now to change the configuration.

0 Kudos
Message 10 of 16
(7,047 Views)