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: 

Changing column heading in log file

Solved!
Go to solution

Hi folks,

 

I have a small program running to collect and log data to a file. 

The file logs to a csv file correctly, but the column headings show as 'Untitled'.

 

How do I set these to something meaningful?

 

Had a hunt around but can't find the settings.

 

Any help gratefully received!

 

Cheers

Duncan

0 Kudos
Message 1 of 7
(3,605 Views)

Without knowing where the data comes from and how it's written, it's hard to know.

If it's waveform data from DAQmx, the channels are defined in the task.

Please attach your vi.

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 7
(3,595 Views)

Apologies, I don't have the vi with me, will post it tonight. 

 

Data comes from a serial stream, broken into doubles with a 'scan from string' block.

Values then fed into a 'write to measurement file' block.

 

Is there somewhere in the 'write to measurement' function that headings can be set?

 

Cheers

Duncan

0 Kudos
Message 3 of 7
(3,588 Views)

Duncan,

 

     As already noted, when you fail to attach your VI, we can't tell (a) what you are trying to do, (b) what Version of LabVIEW you are using, nor can we judge your level of expertise to know what you "need to know".

 

     Nevertheless, I got to thinking about writing header information in a spreadsheet-like data file (a .CSV file, to be precise), using LabVIEW 2015's Write Delimited Spreadsheet function.  This little demo writes 5 rows of three columns of random numbers, with a header row having the labels "One", "Two", and "Three" (yes, yes, not very imaginative ...).  The "trick" is that the calls to write the data rows use the "Append to File" form of the call.  Consider this a "Proof of Concept" (I don't use the CSV functions, myself ...).

CSV with Headers.png

Bob Schor

0 Kudos
Message 4 of 7
(3,584 Views)

You say you are using Write to Measurement File, but in your original post, you described writing a csv file (which led me to assume you were using the Write Spreadsheet functions).  At least in LabVIEW 2015, Write to Measurement File does not have a csv option ... (but I'm not an expert -- this is another function I don't use ...).

 

Bob Schor

0 Kudos
Message 5 of 7
(3,579 Views)

Sorry for any confusion, I have tried a few different options.

 

I am currently using 'Write To Measurement File', with file format set to Microsoft Excel.

This is given me column headings, but they are set to 'Untitled', 'Untitled 1', 'Untitled 2'.

 

How do I change these?

 

vi snippet and sample log file are attached.

 

Thanks for any advice!

Duncan

 

 

 

Download All
0 Kudos
Message 6 of 7
(3,542 Views)
Solution
Accepted by topic author duncannz

Finally managed to find a community post covering this.

 

Check this post fior details:

https://decibel.ni.com/content/docs/DOC-10694

0 Kudos
Message 7 of 7
(3,538 Views)