2 posts in this topic


I am converting an old code from CX programmer to sysmac studio code and I am having trouble in checking a specific bit in UINT variable. I am using TestABit and it is giving me following error 

'UINT' Type cannot be converted to ÁNY_BIT(except BOOL)'Type 



the original code I am trying to convert is 


Any Suggestions

Share this post

Link to post
Share on other sites

In the NJ, TestABit only works on data types of the following format: BYTE, WORD, DWORD & LWORD.


Perform a conversion of your UINT to a WORD first, then use TestABit with this, or just change your UINT variable to a WORD to begin with if you can.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now