LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

naming column headers for a 1D data array

Hi all,
 
I have created a simple VI using LV 8.5.1 (see attached) to monitor a single levitated liquid droplet (see attached).  I am using vision VIs make measurements of the chaging droplet size (i.e.: elliptical diameters, 2D area) over time and I'm simultaneously collecting temperature data inside the levitation chamber close to the droplet using a PCI MIO-16E-4 DAQ board with a SCB-68 block and a K-type thermocouple.  The camera is set in MAX at 35 fps and the experiments can last from 30 minutes up to 24 hours.  As I don't need to record a set of data points (3 size +1 temperature measurement) for every frame taken, I have let the operator control the rate at which data is sampled to file (the bottom while loop) using the Write to Measurement File VI.  This works fine to collect the data in four untitled columns.  How can I rename these columns in the output file?  I could not seem to find an appropriate solution on the NI website.  Any suggestions for a new user? 
 
On another note, I have noticed that whenever I first run the VI, the first temperature reading is usually incorrect.  The first temperature value charted is apparently 1260 deg C while the rest are room temperature values.  If I stop the VI and quickly restart it, then this does not occur.  If I stop the VI and wait approximately 30 s to restart, then this always occurs.  Any thoughts?
 
Neil Draper
0 Kudos
Message 1 of 8
(4,192 Views)
Hi Neil,

If you just want some column headings on the first line of your file then you could something like this....

EDIT - This image has changed - I realised my first solution wouldn't work about 2 min after I posted it!




Hope this helps
Dave


Message Edited by DavidU on 07-11-2008 08:45 AM

Message Edited by DavidU on 07-11-2008 08:50 AM -


Message Edited by DavidU on 07-11-2008 08:51 AM
0 Kudos
Message 2 of 8
(4,171 Views)
Hi Neil,

Scratch my previous post! - It doesn't work.Smiley Sad I really should test these things first!Smiley Wink

Sorry,
Dave
0 Kudos
Message 3 of 8
(4,160 Views)
Right, how about this?

Since you are creating a text based file you could use the write to spreadsheet file instead. Then you can add column headings, and a header, easily.



It does mean you can't use the read measurement file express vi to read the file though, you would have to use the read from spreadsheet file vi and handle the format yourself.


I expect there is a way to set column titles (after all they already have some called untitled 1, untitled 2, etc!) in a measurement file, but I'm stumped too!

Dave


Message Edited by DavidU on 07-11-2008 09:29 AM
0 Kudos
Message 4 of 8
(4,157 Views)

Thanks for the column-naming advice, Dave.

 

In regards to the strange first temerature reading phenomenon I observe, it disappears when I use the same K-thermocouple and SCB-68 block plugged into a PCI 6221 DAQ board in lieu of the MIO-16E-4.

 

Neil

0 Kudos
Message 5 of 8
(4,132 Views)

Hi there,

 

Im having a similar issue with the headers. I want to put headers on ma matrix but i need to save it to a excel file(tdms format) i could use the spreadsheet array  to string function and put the headers but when i pass to array of strings the headers are gone. Can u help me plz. i really need to pass to a excel. i gonna attach the subvi's.

Download All
0 Kudos
Message 6 of 8
(3,739 Views)

Let see if I properly understand you. You are planning to write a matrix containing both, headers and numeric data, to a TDMS file to later import it into excel with the add on?????

If I am correct, you are not able to attach strings to a numeric array. As you can see in the picture of the previous post they are writing to the file the headers and then the numeric data.

 

Similarly to what are they doing, you can specify the channels names in the TDMS VIs separately. Take a look to the help file below.

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/tdms_file_write/

 

If you need an example about how to use this VIs please take a look to the next example.

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

 

Regards,

 

Richard.

0 Kudos
Message 7 of 8
(3,711 Views)

Hi there,

 


I kown i can put headers in tdms via channel names. i actually have that on ma other aquisition Vi. In this one im getting two Daq express, one for freq and other for current channels, and im using a timed loop to adquire an amount of samples with sample by request method. With this system the Daq doesnt recognize the channels names, that's why i want to input then other way. My question is, is ur solution viable for this situation?

 

Complements

0 Kudos
Message 8 of 8
(3,699 Views)