Geir

bitwise CX-Supervisor v 3.2 Educational bitwise problem

3 posts in this topic

Hi,

according to the manual one should reduce points by using the bitwise operator on an integer instead of making a point for each bit. I have tried making a test page with several squares and made a colour change action using Testword & 0x30, but the result seems quite random. 0x03 don'seem to work either.  I also tried making a script to load the bits from the PLC into a bool array and this action expresion: TestBool[3]  and even using "Rectangle_3.colour = red" in the script. This last attempt worked OK for the first two bits, but no response for the rest. Now i'm running out of ideas :(

Is this a bug or a limitation of the educational version? Anyone have a solution or a workaround?

Geir

 

Share this post


Link to post
Share on other sites

Hi Geir,

 

This optimisation is particularly advised for serial connections, and FINS connection, but not so critical in Ethernet and EIP protocol. 
 

Anyway there is no such limitations with the Educational version so this is not the reason. 

Testword & 0x30 should work fine e.g. when the value = 48 Have you used Point Maintenance to check its value when it is not working? This should be the normal solution 

Regards

BB

Share this post


Link to post
Share on other sites

Thank you, all sorted out once I realised the numbers after the x were hex :)

Geir

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