Sign in to follow this  
Followers 0
MasterTomson

Inverting bits in word

5 posts in this topic

Hi everybody Can anyone tell me how to invert all bits in Word…for example I have 0000_1111__0000_1010 and I would like to get 1111_0000_1111_0101… I would like to solve this exercise in LAD… My solution Add one to the first word and then multiply by -1 but it is not working for all example… Thank you very much for your help Best regards for everybody

Share this post


Link to post
Share on other sites
What PLC. If S7-300 or S7-400 there is the INV_I instruction

Share this post


Link to post
Share on other sites
I find solution on http://www.scribd.com/doc/60460550/12/SIMATIC-Logical-Operations-Instructions I hope it will be usefull for everyboy Best regards Edited by MasterTomson

Share this post


Link to post
Share on other sites
I was going to suggest an XOR instruction, but you beat me to it.

Share this post


Link to post
Share on other sites
It is good idea... Use WXOR for that...For one input we put our signal, for second for example 16#FFFF when we work with variable like word...We get in output Not our signal...:) Best regards...:)

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
Sign in to follow this  
Followers 0