Hello,
I wondering how I can translate my C++ code that uses a "bit field", into LabVIEW code.....
I have a C++ structure that contains a field of data type short that is a bit field:
structure : status
short done; // completion flag, this is a bit field
// bit 0 is on when an acquistion is in progress
// bit 1 is on when the FIFO contains a complete coad
// bit 2 is on when a FIFO underrun has occured
I need to use the field in an if statement as follows:
if(ret == 0) && (status.done & 0x2)) -> this is the part I'm wanting to no how to do in LabVIEW......
{
//do whats needed....
}
Thanks
CK
Page 1 of 1
C++ bit fields in LabVIEW? C++ bit fields in LabVIEW?
#2
Posted 23 September 2009 - 11:08 PM
#3
Posted 24 September 2009 - 06:04 AM
Dan DeFriese, on 24 September 2009 - 12:08 AM, said:
Here are my approaches to bit twidding.
Dan
Dan
I think the middle picture is wrong, should be using an OR operation instead.
Here is another way of doing the bit manipulation
Bit manipulation.vi (7.4K)
Number of downloads: 24
/J
#4
Posted 24 September 2009 - 12:20 PM
#5
Posted 24 September 2009 - 01:24 PM
Page 1 of 1

Sign In
Register
Help

Back to top
MultiQuote