topic Re: Converting large binary array to multiple decimal numbers in LabVIEW
https://forums.ni.com/t5/LabVIEW/Converting-large-binary-array-to-multiple-decimal-numbers/m-p/3582616#M1003137
<P>If this is, indeed, a LabVIEW Boolean Array of length 480, transforming it to an array of 30 U16 number is fairly simple. First, use Reshape Array to turn your Array into an Array with 30 rows and 16 columns. If you run this Array through a For loop, each "loop" will deal with a 1D Array of 16 Booleans, which can be run through the Boolean Array to Number function to give you a U16 quantity that, when brought out of the For Loop through an Indexing Tunnel, gives you 30 U32 quantities, just what you need. [If you would rather have I16, add a To Word Integer function somewhere on the U16 path, either inside or outside the For loop].</P>
<P> </P>
<P>Bob Schor</P>Sun, 12 Feb 2017 17:24:29 GMTBob_Schor2017-02-12T17:24:29ZConverting large binary array to multiple decimal numbers
https://forums.ni.com/t5/LabVIEW/Converting-large-binary-array-to-multiple-decimal-numbers/m-p/3582612#M1003135
<P>I have an array of 480 bits that I need to convert to 30 decimal numbers. Each number will be 16 bits. </P>
<P> </P>
<P>I've found example programs that use a for loop that multiplies the 0 or 1 by 2 raised to the power of the iteration number. The issue with this is that once the iteration reaches 15, I need it to restart to zero and repeat. I am not sure how to do this. Any help is much appreciated.</P>
<P> </P>
<P>Andy</P>Sun, 12 Feb 2017 17:07:21 GMThttps://forums.ni.com/t5/LabVIEW/Converting-large-binary-array-to-multiple-decimal-numbers/m-p/3582612#M1003135tricket2017-02-12T17:07:21ZRe: Converting large binary array to multiple decimal numbers
https://forums.ni.com/t5/LabVIEW/Converting-large-binary-array-to-multiple-decimal-numbers/m-p/3582616#M1003137
<P>If this is, indeed, a LabVIEW Boolean Array of length 480, transforming it to an array of 30 U16 number is fairly simple. First, use Reshape Array to turn your Array into an Array with 30 rows and 16 columns. If you run this Array through a For loop, each "loop" will deal with a 1D Array of 16 Booleans, which can be run through the Boolean Array to Number function to give you a U16 quantity that, when brought out of the For Loop through an Indexing Tunnel, gives you 30 U32 quantities, just what you need. [If you would rather have I16, add a To Word Integer function somewhere on the U16 path, either inside or outside the For loop].</P>
<P> </P>
<P>Bob Schor</P>Sun, 12 Feb 2017 17:24:29 GMThttps://forums.ni.com/t5/LabVIEW/Converting-large-binary-array-to-multiple-decimal-numbers/m-p/3582616#M1003137Bob_Schor2017-02-12T17:24:29Z