John_R Posted November 28, 2015 Report Share Posted November 28, 2015 Hey All,Looking for some insight towards sequence programming, I know some people say that it is the prefered method, although in my years of dealing with PLCs (mostly other peoples work) I rarely see it.I have used sequences from time to time when I want to insure that a bit of code executes in an exact way. I'll use an MI as a sequence "Index", and when the Index equals X then I execute that net.My question is whether the prefered method of advancing the Index is by incrementing or storing a number to the Index.The times that I have done it I have put an Increment at the end of a given net so that when it completes the Index increments up a number, and then the next net starts with an Equal To that number, and so on until the end of the sequence where I end the net with a Reset to the Index MI to bring it back to the start.I have a machine where the OEM has a sequencing program (Allen Bradley, but the same process), and I've noticed that they use a Store (Move) at the end each net (rung) to change the Index number, and at the end of the sequence they Store (Move) the Index number back to the start.The only advantage to the Store method I see is that you can change the Index number by a larger amount (10, 20, 30, etc), and if you later want to insert another step you just give it a "in between" number (15, 25) and you dont have to go back through all the nets and change the Equal To number at the start of each net.Anybody have opinions on this, which method is considered "best practice"?RegardsJohnR Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.