LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1D Array Modification

Hi,

How would I go about  converting a  8 bit  number (binary) and change its orientation as follows,

0 1 2 3 4 5 6 7
 
TO
0
1
2
3
4
5
6
7

As these would be fed out to digital I/O lines after converting them to boolean representation.


0 Kudos
Message 1 of 4
(2,385 Views)
The attached vi should do the trick. It's self explanatory 😉
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 2 of 4
(2,380 Views)
Thanks for the binary vi. Had a look at it, I did suspect using the Reverse Array function, but wasnt sure.
But one question still remains. After converting the 8 bit binary number into vertical boolean representations, how would I go about allocating each of these 8 boolean bits to one digital I/O line each, i.e. 0 - 7 boolean forms distributed to 0-7 digital I/O lines. I am using the 7833R series FPGA board.


0 Kudos
Message 3 of 4
(2,366 Views)

You can pass a U8 value directly to a digital port on the FPGA. Or you can use the Array Index function to extract each of the individual elements from the Boolean array and pass them to individual digital lines. See attached VI.

 

 

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 4 of 4
(2,344 Views)