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.
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.
06-16-2016 03:57 PM
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
Solved! Go to Solution.
06-16-2016 04:11 PM
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
06-16-2016 04:31 PM
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
06-16-2016 04:48 PM
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 ...).
Bob Schor
06-16-2016 04:59 PM
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
06-18-2016 07:04 PM
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
06-18-2016 07:37 PM
Finally managed to find a community post covering this.
Check this post fior details: