LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a column header for an acquired data

Solved!
Go to solution

Hello,

I need to write a column header multiple columns of data of different type (integers, time stamps, string...etc). the data is going to be dynamic (data acquired). The challenge is I do Not won't to use the "Write to Measurement" vi. I want to use the low level "write to text file"

 

 

Thanks

M. Hadi 

0 Kudos
Message 1 of 6
(1,552 Views)

Can you be more specific about where you're running into trouble? What have you done so far?

0 Kudos
Message 2 of 6
(1,545 Views)

I attached a screenshot, I made the header now but I failed to wire the data to the second "write to text" since they are different types.

0 Kudos
Message 3 of 6
(1,539 Views)
Solution
Accepted by topic author Eng.Hadi

You need to turn your numerical data into strings that you can write to the file, and there are several ways to do that. The "Array to Spreadsheet String" function is probably the easiest, or the functions in the "Number/String Conversion" subpalette of the Strings palette, or "Format into String" which is my favorite but less straightforward. If you want to combine your date and time strings with your numeric data on a single line, I'd suggest using "Number to fractional string" to convert each of the numbers to strings, then combining them all using "Concatenate Strings" like you did to create the header line.

0 Kudos
Message 4 of 6
(1,527 Views)

It worked like a charm. Thank you!

Before that I tried to combine the data into a cluster and then write to text file but I could not wire the cluster to the 'Write to text" 

Thanks again.

M. Hadi

0 Kudos
Message 5 of 6
(1,519 Views)

You can also right-click a cell in the Table Layout area and click Add > Columns To > Header. The Add Columns to Header dialog box appears. Type the number of columns to add in the Count text box. Click OK  Hyvee Huddle App

0 Kudos
Message 6 of 6
(153 Views)