LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to put in different rows

Solved!
Go to solution

I got a file where I swap from displaying the data in rows into columns by using transpose 2D array. The problem now is, it now shows everything in one row. How do I break it into several rows?

 

From:

simplex-link  duplex-link  
n1                n0
n0                n0
10               10
20               20
DropTail       DropTail
 

It should display:

simplex-link    n1    n0    10    20    DropTail 

duplex-link    n0    n0    10    20    DropTail 

 

But it gives me: 

simplex-link n1 n0 10 20 DropTail duplex-link n0 n0 10 20 DropTail

Any advice where I did wrong? 

Thanks 😄

 

 

 

 

 

 

 

 

Download All
0 Kudos
Message 1 of 8
(3,145 Views)
Try this
Tim
GHSP
0 Kudos
Message 2 of 8
(3,126 Views)
Solution
Accepted by topic author a01lida

Hi

 

I have LabVIEW 8.0 version. I try to understand your problem and make a new vi which reads all conc file.txt. I make vi which satisfied your requirement. You can have a look below imgaes

 

FP.JPG

 

BD.JPG

 

Thanks

Viru

Message 3 of 8
(3,124 Views)

Based on the files posted, all you need it this:

 

Message Edited by Dennis Knutson on 12-02-2009 03:48 PM
0 Kudos
Message 4 of 8
(3,101 Views)
Can you save it for 8.6?
0 Kudos
Message 5 of 8
(3,095 Views)

I'm now trying to add more functions to Viru's solution

I'd like to add a constant at the beginning and somewhere in the middle of each row

What I got in mind so far is by using concatenate strings, concatenate the file and a constant then wire it to spreadsheet string to array , but it won't add the constant in each row; but instead, it only add at the first line

 

If I use loop, it still won't work right? As far as I understand, the file is read in a go, not line by line

 

instead of simplex-link n4 n3 10 20 DropTail, I'd like to do:

$ns simplex-link $n4 $n3 10Mb 20ms DropTail

 

0 Kudos
Message 6 of 8
(3,084 Views)

Hi

 

I try to make a vi according to your requirement. I hope it works for you.

 

Please check the attachment.

Message 7 of 8
(3,037 Views)

 

Thanks 😄 

The only thing is that, it will loop for 6x6 which gives out 4 concatenation without the data from the file (only $ns $ $..)

But I got around it by wiring the first for loop to a.txt (where it has n0, n1 - so it's read as 2x1) ; which ends up will loop only 2 times at the first for loop  

 

I'm not sure if I'm making any sense here, but what I'm doing is, I have a file called a.txt which list out only n0, n1, another file, b.txt which only list out simplex-link, duplex-link etc. I then concatenate all the files giving me 

 

 simplex-link n0

 

 duplex-link n1

 

 then I do another concatenation as Viru pointed out giving me $ns simplex-link $n0 etc

 Is there another way that I could try so that the first for loop would only loop according to the column number, not row without reading the number of row in another file?

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