LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

split hex code after every 4096 bytes

Solved!
Go to solution

separatehex.PNGHi, so I am trying to split my byte into 4096 in the for loop. The data size is 117824, but the substring doesnt print out all my data(it only prints out some of the data), however my substring2 will print out the whole hex code is I set the offset from 0 to 117823. Why is this happening?

0 Kudos
Message 1 of 4
(3,585 Views)
Solution
Accepted by topic author keatwk

As expected, substring shows only the data of the current iteration of the loop. Connect the wire to the right border of the for loop to build an array.

Your code could be simplyfied like this :

 

Split array.png

 

In your current code, the last elements (incomplete block) are ignored.

Message 2 of 4
(3,567 Views)

like JB mentioned.

The substring indicator only shows the value of the last iteration. 

I attached you a small vi which simplyfied the requirements in the for loop 

 

0 Kudos
Message 3 of 4
(3,559 Views)

Or another way of doing it

 

string array.png

 

Craig 

LabVIEW 2012
0 Kudos
Message 4 of 4
(3,510 Views)