LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you mask bit in uint32 words that are being read from a DMA FIFO?

Have an host.vi application that is reading /writing binary Uint32 data streams to and from a DMA FIFO. I need to mask (AND) each Uint32 in the stream with 0x3fff3fff. I do not know how much data will be sent in each stream. When I try to use a constant and AND.vi the constant becomes an array constant. I dont want an constant array and I will not know how long the constant array would have to be.  I just  want to AND each value from the FIFO with a single fixed constant (0x3fff3fff).

Any help would be greatly appreciated,

Dave

0 Kudos
Message 1 of 2
(4,846 Views)

Hi Dave,

Your on the right track.  The standard AND function will do this. When you have an array as one input the second input automatically becomes an array as well but you should find you can still wire just a constant to this and the function will adapt to it.

Because this is a native function in LabVIEW it should also be the most efficient way of doing this.

Hope this helps!

James McN

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 2 of 2
(2,645 Views)