Div_by_zero Posted December 20, 2013 Report Posted December 20, 2013 Does anybody have any examples on how to most efficiently code a simple sequencer in ladder logic? Start, stop, and pause/resume ability is necessary. Even if there only a couple outputs in the example, that will be fine. I have ways of doing it, but feel that they are inefficient and harder than necessary to follow. Thanks for any help!
panic mode Posted December 21, 2013 Report Posted December 21, 2013 did you check download section? there is plenty of code samples. plcs usually have sequencer or drum instruction. personally i like to just make my own using simple counter. nice thing about that is that it is platform independent - it is simple and works pretty much the same way on any plc. for me that was a key factor because customers would typically select platform. i made an example years ago for mitsubishi (called pick and place). example includes pdf for those who may not have the software.
TimWilborne Posted January 3, 2014 Report Posted January 3, 2014 I wrote this for a student but decided to post it. You might find it helpful as it shows several ways to sequence machines. http://www.theautomationstore.com/sequencing-machine-steps-in-an-allen-bradley-micrologix-plc/
Div_by_zero Posted January 3, 2014 Author Report Posted January 3, 2014 Unfortunately, (don't laugh) I have no way of opening that at the present time. Perhaps there's a .pdf? Thanks.
TimWilborne Posted January 3, 2014 Report Posted January 3, 2014 You mean you don't have the software? Here is how to install it for free. http://www.theautomationstore.com/rslogix-500-rslinx-and-emulate-500-installing-and-working-with-them/
Dylan Cramer Posted January 13, 2014 Report Posted January 13, 2014 What I have adopted, and will work among all PLC brands is very simple. Select a retentive memory location to be used as the "Step". Each rung uses a comparison instruction followed by logic that needs to take place before proceeding to the next step, then a move instruction (MOV). You can then add logic for pause, step, etc. Faults can reset the step and so. It is how I like to program more complex and involved pieces of logic that needs to interact with other things. I.e. step 0 ----<CMP D10 &0>--------<logic to be true>----------------<MOV &10 D10> step 10 ----<CMP D10 &10>------<logic to be true>-----------------<MOV &20 D10> and so on. Then with this, you may end up with 20-100 steps depending on how complex the machine is. You can compare the value of the step register to determine if certain outputs should be on or off during that step. Obviously my above text example of logic is very simple, but you get the idea. Very simple and it works very well.
panic mode Posted February 2, 2014 Report Posted February 2, 2014 may want to check this topic: http://forums.mrplc.com/index.php?showtopic=26366
larry818 Posted February 19, 2014 Report Posted February 19, 2014 What's your target platform? I came up with a 16bit wide sequencer that's simple code, and programmable by touchscreen. I did this on a Mitsubishi FX plc and F930 touchscreen.
BITS N BYTES Posted March 14, 2014 Report Posted March 14, 2014 Simple I think NOT!! The problem with using a single word to indicate the current state is that the address can only have a single name/symbol associated with it. For example D10 could be named StateMachine1. Whatever the value representing each state used in the program it still retains the Name/Symbol "StateMachine1". Very difficult to follow and troubleshoot unless the program is extremely well documented or a separate document outlining the state is available. Using BOOLEAN flags for each state is IMHO the best method since each state can be uniquely named. Following logic and troubleshooting far improved [Again providing program is documented]. Looks from your post that the instruction set may be using an OMRON PLC. This has STEP/SNXT functions that have been around for over 20 years and is an ideal method for state machine processing. My 2 Cents
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now