I can,t use Library Expressions like Bitoperators

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
lyy65432123
Posts: 2
Joined: Tue Jun 11, 2019 3:25 am

I can,t use Library Expressions like Bitoperators

Post by lyy65432123 »

These three pictures are my configuration. Is there any problem with my use?
Software version:2.40 sp2
Attachments
3.PNG
3.PNG (151.54 KiB) Viewed 6682 times
2.PNG
2.PNG (195.54 KiB) Viewed 6682 times
1.PNG
1.PNG (278.54 KiB) Viewed 6682 times

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: I can,t use Library Expressions like Bitoperators

Post by AMitchneck »

"(value & 0x1) == 0x1" returns a Boolean value of true or false. My guess is iX is not able to properly convert this back to an integer value and thus returns 0, hence why this value is always blue.

Try removing the == 0x1 portion so the bit0IsSet has the formula "value & 0x1". This will result in an integer value of 0 or 1.

For other bits, you can add a bit shift. Ex: bit1IsSet would have the formula "(value & 0x2) >> 1".
Adam M.
Controls Engineer
FlexEnergy

lyy65432123
Posts: 2
Joined: Tue Jun 11, 2019 3:25 am

Re: I can,t use Library Expressions like Bitoperators

Post by lyy65432123 »

Thanks for your answer,I later discovered that it can only be used on PCs and not on touch screens.

Post Reply