Sign in to follow this  
Followers 0
Guest Tammy

Instruction Set? +P Instruction? Help!

8 posts in this topic

Hey there. I've been searching and searching and searching, but I cannot find an instruction set for the Mits A Series PLC's. I was thrown a PLC, MELSEC GPP and the code, and it's my job to decifer it. I don't have any documentation, besides the web. So far, I'm doing ok, but, what idoes the +P instruction do? I.e. -|m9036|--------|+P D1 D2| (I'm a industrial application/software developer by trade, but somehow I keep finding myself trying to wade through this stuff...) Thanks in advance!

Share this post


Link to post
Share on other sites
As much as I have never used this instruction. And the manual is in Jinglish It seems to be a binary addition of D2 + D1 with the result stored in D2 The example given is like this D2 5678bin (b15---b0) + D1 1234bin (b15----b0) = D2 6912bin (b15---b0) Hope that helps

Share this post


Link to post
Share on other sites
Thanks for looking it up, but i'm still really confused on how the +P instruction differs from regular decimal addittion. Using your example, 5678 + 1234 = 9612 in decimal, so I don't understand why this any different. This instruction is used a number of times in this PLC program I'm trying to figure out the nuts and bolts of (and will eventually convert to a Siemens PLC, as well...) I don't suppose anyone out there is PLC land knows if the instruction set is online anywhere?

Share this post


Link to post
Share on other sites
The only difference from normal mitsu maths that I can see is that the result is appended in the second register rather than using a third register for the result. Normally [+ D0 D1 D2] where D0 and D1 are added and the result stored in D2

Share this post


Link to post
Share on other sites
You can also use [+ D1 D2] to accomplish the same thing, add D1 and D2 and store the result in D2. Further investigation on my part (i.e. playing with different values) has shown that the +P instruction will return 0 if the result of the addittion is <= 0. i.e [+P K1 K-2 D2] will store 0 in D2. Thanks for your help!

Share this post


Link to post
Share on other sites
Any Melsec instruction which is suffixed P (i.e. +P MOVP INCP) Will execute the instruction on the rising pulse of the logic proceeding it, i.e. a one shot instruction rather than executing it on every scan

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