08-12-2010 10:16 AM
Hello,
I have the following text array (please see file "array1" which can be opened with word pad):
Labview Automation
8/9/2010:8:08 PM
Desc. Temp: ROOM
TEST1 768.802500 MHz
Frequency Temp
100 -73.214
101.801 -73.543
103.634 -73.684
105.501 -74.01
107.401 -74.467
....
Labview Automation
8/9/2010:8:08 PM
Desc. Temp: ROOM
TEST1 768.802500 MHz
Frequency Temp
100 -73.214
101.801 -73.543
103.634 -73.684
105.501 -74.01
107.401 -74.467
....
Labview Automation
8/9/2010:8:08 PM
Desc. Temp: ROOM
TEST1 768.802500 MHz
Frequency Temp
100 -73.214
101.801 -73.543
103.634 -73.684
105.501 -74.01
107.401 -74.467
...
I would like to get the array in this form
Labview Automation Labview Automation Labview Automation Labview Automation
8/9/2010:8:08 PM 8/9/2010:8:08 PM 8/9/2010:8:08 PM 8/9/2010:8:08 PM
Desc. Temp: ROOM Desc. Temp: ROOM Temp: ROOM Temp: ROOM
TEST1 768.802500 MHz TEST1 768.802500 MHz TEST1 768.802500 MHz TEST1 768.802500 MHz
Frequency Temp Frequency Temp Frequency Temp Frequency Temp
100 -73.214 100 -73.214 100 -73.214 100 -73.214
101.801 -73.543 101.801 -73.543 101.801 -73.543 101.801 -73.543
103.634 -73.684 103.634 -73.684 103.634 -73.684 103.634 -73.684
105.501 -74.01 105.501 -74.01 105.501 -74.01 105.501 -74.01
107.401 -74.467 107.401 -74.467 107.401 -74.467 107.401 -74.467
109.335 -74.79 109.335 -74.79 109.335 -74.79 109.335 -74.79
111.304 -74.794 111.304 -74.794 111.304 -74.794 111.304 -74.794
Any help will be greatly appreciated.
Thanks,
hiNi
08-12-2010 10:35 AM
Do you have code so we can see what you are currently doing so that we can help?
08-16-2010 06:56 PM
Sorry,
I had the "Email me when someone replies" selection "OFF" so as I didn't get any emails, I just thought that my post did not go through...Sorry!
Anyways, please see the attached VI (in labview 8.2) as to the data that I am trying to modify.
I would like, (say after 3 runs), that the data appear as:
Labview Automation Labview Automation Labview Automation
8/9/2010:8:08 PM 8/9/2010:8:08 PM 8/9/2010:8:08 PM
Desc. Temp: ROOM Desc. Temp: ROOM Temp: ROOM
TEST1 768.802500 MHz TEST1 768.802500 MHz TEST1 768.802500 MHz
Frequency Temp Frequency Temp Frequency Temp
100 -73.214 100 -73.214 100 -73.214
101.801 -73.543 101.801 -73.543 101.801 -73.543
103.634 -73.684 103.634 -73.684 103.634 -73.684
105.501 -74.01 105.501 -74.01 105.501 -74.01
107.401 -74.467 107.401 -74.467 107.401 -74.467
109.335 -74.79 109.335 -74.79 109.335 -74.79
111.304 -74.794 111.304 -74.794 111.304 -74.794
Thanks,
hiNi.
08-16-2010 08:00 PM - edited 08-16-2010 08:01 PM
First, get rid of the local variables and sequence structure and place a while loop around your code. Do NOT use the run continous button.
In order to do what you want, after each write you would have to read back the entire file into a 2D string array. Then append the new data with header and write that back to file. You just can't write new columns to an existing file - just rows like you have now.
08-16-2010 08:54 PM
This would be a good text based scripting language versus LabVIEW challenge. As much as I love LabVIEW, I would write a script to solve that problem.