Sign in to follow this  
Followers 0
Goody

How the 'heck' is '/ ' supposed to work

6 posts in this topic

When I have some spare time, I connect to a plc on my desk and try new instructions or methods so I was browsing instructions that I never use or don't fully understand how to impliment and came across the / instruction Which says 'reverse operation results' Fair enough, the opposite of what the logic says will happen! So as you can see, I placed the / after X0. But Y0 only came on after I forced M0 on. With M0 off Y0 was not on M0 was not affected by the / instruction. I then put ALT Y0 and Y0 went on and off with each scan until I forced off M0 So i seems ALT and / are fighting each other to do the (as far as I can see) same thing. I can't say I would ever use either instruction. I prefer my logic to say clearly what it is doing It's a FX3u I was playing with and I don't have the full instruction book - so I don't really know the paremeters for the / instruction or where to correctly place it and which bit it monitors to 'do the opposite' As I say, I have never used it - and as far as I can see I would have no need for it - but have any of you used it?

Share this post


Link to post
Share on other sites
I've attaceh the page from an older manual explaining the / inst. I assume it applies to FX3U as well. I don't know the interaction with the ALT inst. Invert_Instruction.pdf

Share this post


Link to post
Share on other sites
Hi Goody, This is inverse function (the equivalent of basic instruction, named INV). The command inverts the result of a last logic operation. It's more often uses if is need to build a long and complex logical chain, as you can see in example below: I'm not recommend to built such structures because the program loses its readability. The long chain may be divided into several simpler ones. And it is always better. Edited by Inntele

Share this post


Link to post
Share on other sites
The instructions aren't fighting each other. Take another look at the ALT instruction. For every scan the conditions are true, it switches the value of the output bit. That's what was happening. I usually use the pulsed version of the command (ALTP) as it will only switch value the first scan that it is true. The INV instruction is very useful for doing either/or (if/then/else) logic: |--|X0|-----------(Y0)--| | '--/----(Y1)--| If the monospacing works properly, the rung you see will turn Y0 on when X0 is on, and will turn Y1 on when X0 is off. EDIT: So monospacing didn't work, but hopefully you get the point. Edited by JRoss

Share this post


Link to post
Share on other sites
Short comment. When I worked with Siemens, I used "inverse" instruction very often , because it occupies 1 byte (compared with "load" or "load inverse" instruction , which occupies 3 byte). The given advantage is absent In Mitsubishi PLC (both type of commands occupy 1 step), a execution time is also equal.

Share this post


Link to post
Share on other sites
It's like putting a logical 'NOT' gate after an instruction.

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