LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Array to Excel File, Channel Output order?

Bear with me, I am not very good with LabView, we have this code and I have made it so it will output to a excel file, with a time column and 28 channels. The problem I am having is how to identify what channel is what. Some channels are reading pressures or temperatures and some are inactive. But in the output file, some columns are completely filled with constants (when they most likely should have been reading 0, assuming they are the inactive channels).

 

Anyways, I am wondering if anyone can steer me in a direction that will help me identify what column in the output file is associated with what channel in the code.

 

If I am being unclear in anyway, please let me know. I have attached the .vi and .xlsx files.

0 Kudos
Message 1 of 5
(2,819 Views)

You have 29 signals that output in the same order you requested them in the DAQ Assistant so:

SS-2010.10.20-17.02.14.png

In terms of programmatically writing to an excel sheet with the signal names in the column headers, this takes place in the Export Waveforms to Spreadsheet File VI (double click on it and explore it for fun sometime). You would have to change the Export Waveforms to Spreadsheet File VI to do your bidding. I might make a KB and a community example on this so for your patience I will present a solution.

Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(2,765 Views)

Aforementioned Community Example

http://decibel.ni.com/content/docs/DOC-13832

Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 3 of 5
(2,760 Views)

Seems to me that if you know what channels are what and they are not going to change during your aquisition

 

Just write the headers to the Excel file before you enter your DAQ loop

 

Or even right before you write the 2D data array, write a 1D array containing your headers.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 5
(2,750 Views)

Seems to me that if you know what channels are what and they are not going to change during your aquisition

 

Just write the headers to the Excel file before you enter your DAQ loop

 

Or even right before you write the 2D data array, write a 1D array containing your headers.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 5
(2,749 Views)