Jump to content

C++ bit fields in LabVIEW?


c_w_k

Recommended Posts

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.