Andrei Blagaila

Incrementation problem

18 posts in this topic

So I have a software written by somebody else that I am supposed to check a problem on. D5013 and D5014 need to be incremented to 60 that in turn will increment two D's that count the minutes. When it reaches a certain number of minutes it need to do something. The problem is that as you can see the previous programmer inserted SM401 in the conditions. Although L682 is abilitated it doed not increment D5013 and D5014. The printscreen is in simulation mode. I tried doing a small program that contains only this part and that one works. Why does this one not increment? PLEASE HELP!!! 

1.jpg

Share this post


Link to post
Share on other sites

L682 has been named periodical purge so it sounds like somewhere in the code this is used to clear something.
 

Share this post


Link to post
Share on other sites

So the only place where this is used is where it is abilitated. It's a function of the machine that if you press a button on the HMI it goes in TRUE. You press it again it goes in FALSE. As you can see underneath. Any ideas? 

1.jpg

Share this post


Link to post
Share on other sites

Put an inc instruction to a free D register on the first rung to see if it's being activated. below movp K0 D5012

 

Share this post


Link to post
Share on other sites

Tried it. Does not increment. My suspicion is with the D5013 and D5014 Registers that they are being continuously written with 0 from somewhere but i searched them. They are being used only in 4 places. I did a print of that. It's starting to become a mystery :(

1.jpg

Share this post


Link to post
Share on other sites

IF all else fails try blocking each mov with a SM401.

Share this post


Link to post
Share on other sites

I found it. It was a stupid L at the beginning of the program. Basically if the function was not activated it would GOEND and not run it. Now it works. Thanks for you help and suggestions. One last question. On my second prinscreen there is a B1750. How do I see where it is called (i searched it and did not find it)

Share this post


Link to post
Share on other sites

I suspect this PLC is in a Melsectnet network or CC-link. SO It's probably coming from another PLC.
Check your network parameters (auto refresh settings)

Share this post


Link to post
Share on other sites

Sorry I don't know where that is. New to Mitsubishi. It has a CC-Link Network. 

1.jpg

Share this post


Link to post
Share on other sites

Here X and Y are used. Can you check the ethernet/CC IE /Melsecnet parameter?

Share this post


Link to post
Share on other sites

Hmm Then it probably comes from HMI or SCADA or something like that.

Share this post


Link to post
Share on other sites

I think so. I hope once the hardware arrives I have more answers for my questions. Meanwhile I have a new issue that I cannot understand. What does the XCALL function do in the case underneath? Calls P130 and then turns Y1107 ON? What are FY0 and FY1 and what does P130 actually do? Can you help me?

1.jpg

2.jpg

Share this post


Link to post
Share on other sites

It should Run Subroutine P130 and substitute FY0 with Y1107

Share this post


Link to post
Share on other sites

And Why does it Reset FY1? I saw cases where it was XCALL P10 Y10 Y11 .... Does it work in the same way? Substitutes the Y's with the FY0?

 

Share this post


Link to post
Share on other sites

Instead of |M1| - - |M2|------|XCALL P1 Y1| isn't it simpler to just put the Y1 in this case instead of Xcall? I don't see how it helps

Share this post


Link to post
Share on other sites

It just for saving code you can run the same program but with different IO's

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