LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reduce 32-bit data to 23-bit data

OS: LabVIEW 7.1, Windows XP
System: 6U 8-slot cPCI chassis, cPCI board
Question: I'm trying to read data from my cPCI board. I'm using "VISA Open" icon to open the board (PXI5::10::INSTR), and "VISA In 32" icon to read the 32-bit data. Now, since I only need the first 23 bits of the 32 bits (0-22 bits, 23-31 bits are all hamming code and other error checking codes that I don't need) and display the 23-bit data on an intensity graph in LabVIEW. How could I do that?
 
Thanks,
Manson Chan
Ball Aerospace
Boulder, CO
0 Kudos
Message 1 of 5
(2,987 Views)
If you boolian AND with a FFFFFF on the lower input you can mask out the unneeded information.  From 32 bits the next lower representation would be 16 bits so thats not feasible as you would lose information.
 
 

Message Edited by Chaos on 07-27-2005 04:07 PM

0 Kudos
Message 2 of 5
(2,987 Views)

Hi Chaos,

Is FFFFFF a hex notation? What does it represent?

So there is no way that I can get a 23-bit data from 32-bit?

Thanks,

Manson Chan

Ball Aerospace

Boulder, CO

 

0 Kudos
Message 3 of 5
(2,981 Views)
To blank everything except the lower bits, use the logical AND of your U32 value with 0x007FFFFF (hexadecimal representation, the same as 00000000011111111111111111111111 in binary, or 8388607 in decimal).
 
In your case, you can do it on the entire 2D U32 array at once. 🙂
 

Message Edited by altenbach on 07-27-2005 05:31 PM

Download All
0 Kudos
Message 4 of 5
(2,979 Views)
That helps!
 
Thanks altenbach:)
 
Manson 
0 Kudos
Message 5 of 5
(2,937 Views)