Jump to content

Recommended Posts

Posted

Hi

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 

 

Error.thumb.jpg.797516a2644c5ae328d3a898

the original code I am trying to convert is 

59d5ac6431c90_OrignalCode.thumb.jpg.f287

Any Suggestions


Posted

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.

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
×
×
  • Create New...