LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate column titles for y values when using Write to Measurement File Express VI with a tab delimited text-based .lvm file?

The .lvm file generated by the Write to Measurement File Express VI includes column heading titles for the y values, but they are a default value of "untitled".  See attached example of a sample file when opened in Excel, the values in question are highlighted.  Is there a way to specify the column titles when the file is written?
 
This is a similar question to this posting, which received a work around response to use the Write to Spreadsheet File.vi, rather than a solution when using this VI.
 

Message Edited by Hightop Raven on 05-02-2007 03:37 PM

0 Kudos
Message 1 of 4
(4,039 Views)
For each of the input waveforms, add an attribute called NI_ChannelName with a text value that is the name you want for this channel.


Message Edited by DFGray on 05-03-2007 08:29 AM

Message 2 of 4
(4,021 Views)

the attached screen shot shows the variables going into an array to be sent to the write to measurement vi

is it possible to add this NI_ChannelName attribute to the variables in this situation?

0 Kudos
Message 3 of 4
(4,000 Views)
Sorry for the late reply.  I was out of the office Friday.

You can do it, but the code can get rather ugly.  Under the hood, the dynamic data type (the dark blue wire) is an array of waveforms.  In your case, the scalar values you convert to a dynamic data type are being converted to an array of waveforms, each waveform having one element.  You have two options.
  1. Explicitly convert your scalars to one-element waveforms (t0=0, dt=1) and add the title before conversion to a dynamic data type.
  2. Convert your dynamic data type to an array of waveforms and loop through them to add the column labels.  The conversion blocks are in the Signal Manipulation Express palette.
I would recommend 2, since it is the easiest to add.  It is also the easiest to run only on the first iteration.  Just put a case selector around the loop, wire the selection to the While loop iterator, and set the case containing the label code to 0.  The default case simply passes through the dynamic data.

My apologies for not including a screen shot.  I am in the process of upgrading my machine and can't run LabVIEW.  If you need one, let me know and I can post one tomorrow.
0 Kudos
Message 4 of 4
(3,988 Views)