MasterTomson Posted September 5, 2011 Report Posted September 5, 2011 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
Groo Posted September 5, 2011 Report Posted September 5, 2011 What PLC. If S7-300 or S7-400 there is the INV_I instruction
MasterTomson Posted September 6, 2011 Author Report Posted September 6, 2011 (edited) 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 September 6, 2011 by MasterTomson
Joe E. Posted September 6, 2011 Report Posted September 6, 2011 I was going to suggest an XOR instruction, but you beat me to it.
MasterTomson Posted September 9, 2011 Author Report Posted September 9, 2011 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...:)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now