Sign in to follow this  
Followers 0
DLB

Mode Control with Delays

4 posts in this topic

I'm running Unity Pro and need some help writing some ladder to control the mode of some equipment (via DO) with delays in place to stop mode switching happening too fast. I essentially need the program to decide what mode it should be in (based on inputs) and then switch the PLC to that mode (by setting specific outputs), providing it has not been in the previous mode for less than a given amount of time. On paper this seems like an extremely simple task yet I can't seem to put together something that works. I'm relatively new to writing my own PLC code but I am familiar with it. I've spent more time looking at other peoples code for one reason or another and discussing the design, but haven't had much experience designing my own logic from scratch. I think it would really help me if someone could give me a simple and general example to cover what I'm trying to do. Maybe something that switches between 3 modes based on a combination of 3 inputs, but won't switch until the current mode has been in place for X seconds. Thanks in advance for any help.

Share this post


Link to post
Share on other sites
After each mode switch, start a timer. Then do not allow another mode change until that timer has completed.

Share this post


Link to post
Share on other sites
That's great. The example makes it really clear!

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