LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array manipulation

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 5
(2,879 Views)

Do you have code so we can see what you are currently doing so that we can help?

Tim
GHSP
0 Kudos
Message 2 of 5
(2,873 Views)

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.         

0 Kudos
Message 3 of 5
(2,828 Views)

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. 

0 Kudos
Message 4 of 5
(2,820 Views)

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.

0 Kudos
Message 5 of 5
(2,807 Views)