LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary tree to table

Highlighted

Hello,

 

I need some help here:

 

I have these tree, inputs are node number and incoming character, output are other nodes as shown in the attachement. I am trying to output a txt file for my memory. Please look at the attachement and here here the operation: Please take some time to understand this:

from the attachement my nodes start with node 100 to node 120. as you can see, each time after a node the is a character or several charaters, each of which shows another node as output.

for example  I have

100 ----->a------->112

100 ----->b------->131

100 ----->a------->143

.

.

.

so what we want is something like this

get the node number, convert it into binary and get the corresponding character, convert it into binary, and ccontatenate it to the node number and the output is the other node.

eg I have 100 which 0001100100 in binary, and we have "a" (01100001 in binary)  and the other node 112 (1110000 in binary)

so my text file will show 000110010001100001          1110000

we have to do this for all the node from 100 to 120.

Your help will really be appreciated

 

 

 

 

 

 

0 Kudos
Message 1 of 3
(1,046 Views)

Here the idea, some help is need to improve this please. in this cade I have my node numbers from 100 to 669, coming in one by one. when node number 100 is there, the corresponding characters are a to y and the characters should be coming in. at each character, compute. for example, if 100 is there and character a is in then translate  100 into binary and and translate a (wich is 97in ascii to binary) concatenate  both and add 101 (in binary) to it and that is the output.

 

But the problem I seem to have is that it seems not to switch to b, c,... with proper computation also the result from b, c...should be bellow the result from a not separate the way I did it.

 

also I am not sure if the way I did it, I will be able to read in 100 to 669 and do the proper operation as show on the tree. Note that the tree I posted here is just to 120 nodes, but my real tree is up to 669 node.

 

Please labview community I need some help building this. I need to generate a memory file...

0 Kudos
Message 2 of 3
(1,022 Views)

Hey Gembo,

 

I looked through your code, and I believe I found a place that you can begin to solve your problem.  If you place an indicator on the array wire coming out of the "Spreadsheet to String Array" for the list of numbers (100,101,102,103...), you see that only 100 comes out, and then the rest is blank. 

 

I hope this helps!

 

Jake

Regards,
Jake G.
National Instruments
Applications Engineer
0 Kudos
Message 3 of 3
(990 Views)