Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

DWORD to BIT Outputs

2023-06-23
2023-06-23
  • westcountryewe - 2023-06-23

    Hi,

    I'm looking for a way to convert a DWORD into 4 BIT Outputs so I can use them all within my code. Can anyone help?

     
  • TimvH

    TimvH - 2023-06-23

    It is not clear what you want to do, because a DWORD contains 32 bits.
    If you just want to get a certain bit out of the DWORD, you could use e.g.:
    xBool := dwDword.0;

    If this is not what you want, then please specify which 4 bits you would like to have as output of the function.

     

Log in to post a comment.