JDR15

Manual Mode to Auto Mode Logic

4 posts in this topic

This is driving me nuts, cannot seem to figure out what's going on here.

When the machine is in Manual Mode, and you press the HMI button "Master.SelectAuto" (circled in the pic below), most of the time it will go into "Master.AutoMode" and out of manual mode.  But, sometimes it doesn't, it will go out of Manual Mode, but won't go into Auto Mode.  I've made sure multiple times that all other conditions are true for Auto Mode, and watched the logic when pushing the Auto Mode button, only to see this exact thing happen.

My only thinking that makes sense, is that "AllStationsHome" will go off when "Master.ManualMode" goes off.  But before that happens, wouldn't "Master.AutoMode" seal in??

Thanks in advance for any help.

Edit: Tried to paste a picture but wouldn't work, will attach

 

 

 

 

2021-12-15 07_54_28.jpg

Edited by JDR15

Share this post


Link to post
Share on other sites

It's possible you have an race condition between signals that sometimes causes problems. You could insert a rung right ABOVE the one that turns on Master.AutoMode. In that rung, use an XIC Master.SelectAuto in series with an XIO for each of the other conditions that will latch a bit. Next time AutoMode fails to seal in, see which bit is set. That will tell you which other condition is keeping it from working. Then you can do something similar for that bit if you can't see what's going on.

1 person likes this

Share this post


Link to post
Share on other sites

On the simple systems, I just program Manual to be NOT Auto.  Then all the logic to enter/leave auto is in the auto rung. It has some seal in branch and the manual PB breaks the seal. This avoids any possible races.

 

I have had customers that want 3 modes, MANUAL, OFF, AUTO.  For multiple modes I have found a series of latches seems to work best. Each button latches in it's mode and unlatches all the others.

Share this post


Link to post
Share on other sites

i think your example is just too complicated. i am not fan of branched rung being folder either.

to me, mode selection and permissives are two completely different things and my advice is to keep them separate (break up the long rungs).

i like to think that mode selection is just mode selection - no IFs and BUTs. like a selector switch -you choose mode and machine is immediately in that mode - always and unconditionally.

what you can do with that mode will depend on permissives... and that can come later...

in this example i tried restructuring it a bit but externally this should be compatible with rest of your program.

note that chain of contacts in rungs with permissives is very simple - just a chain. even when such rung is long, such chain folds nicely.

mode.png

1 person likes this

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