LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I convert 2 of 1D-array (XY graph)into subsequence strings (2 columns)for data logging in a text file (not speadsheet)

- Let say I have X_array (int): 1D-array (1,2,3,4,5)
- Then I have anotherone Y_array (double): 1D-array (12.34, 34.56,99.45,38.67, 52.65)
_ I would like to write them into a text file (not a spreadsheet) like this:
1 12.34
2 34.56
3 99.45
4 38.67
5 52.65

Anyone can help me on this? Thanks!
0 Kudos
Message 1 of 2
(2,188 Views)
Hi,
you may use the next scheme.
1. Convert your arrays of numbers into arrays of strings with correct formats. You can do it with "Format into string.vi" from "functions/String/..." or with the help of vis from "Functions/String/String|Number Conversion/...".
2. Concatenate the corresponding strings from your arrays with some delimeter and EOL symbol at the end. For example A[i]+Tab+B[i]+EOL;
3. Then write each string of this array of lines into the file.

Good luck.

The example is attached.

Oleg Chutko.
0 Kudos
Message 2 of 2
(2,188 Views)