Nic

Help with STEP/SNXT programming

6 posts in this topic

Hi, I'm hoping to get some help with using STEP and SNXT in a program for an automated industrial process. I'm relatively new to this kind of programming so I might be missing something fundamental about how these instructions work. Essentially we have a machine that lifts, lowers, moves and stacks bins of fruit. It needs to follow a series of ordered steps and loop back to the start when finished. The conditions that allow the transition from one step to another are based on limit switches. I haven't used STEP/SNXT before so I made a bit of a practice program with just the basic steps (I wanted to attach it to this post but it seems I'm not able to).

My issue is that when certain conditions are met, the step program activates previous steps which have already been completed. For example, when Step 4 is active and the conditions for Step 2 and Step 3 are also still valid (but those steps have already been completed), if the condition for Step 3 is removed, Step 2 will become active again (while Step 4 continues to be active). This happens in the actual sequence of the machine at one point where a shuttle extends to move a bin forward, then retracts back to its starting position. The program re-activates the shuttle extending step because all of the limit switch conditions for it are valid while the limit switch conditions for the retracting step are no longer valid.

I'm not sure if this is the way STEP and SNXT are intended to work, it seems strange to allow previously completed steps to re-activate. I've tried various things to prevent it, like creating a completion flag for each step which I used as a condition on the SNXT for that step, then reset all the completion flags at the end of the program. This worked on the first run through, but then when the program looped back to the start the completion flags didn't seem to have any effect and the steps got re-activated anyway. I'm sufficiently confused!

What would be a simple/elegant way to ensure that previously completed steps are not re-activated, and that no two steps are active at the same time? If I haven't explained it well enough please ask me questions and I'll try to describe exactly what's happening. Thanks in advance!

Also - SFC is not available for my PLC.

Share this post


Link to post
Share on other sites

These can very easily jump backwards in steps, it is done this way to support branching but can cause you a lot of headaches. If you wish to keep using STEP and SNXT I suggest using short timers or even rising edges and of course a lot of interlocks.

I don't like telling people how to live their lives but I find state engines far easier to implement and program/troubleshoot. Replacing STEP and SNXT with a state engine would be a pretty quick change.

Share this post


Link to post
Share on other sites

Thanks for your help. It's good to know they are meant to work that way and I haven't done it drastically wrong. If that's the case I don't think STEP and SNXT are really what I am looking for because what I need is very much a one-way process. I'll have a look into implementing a state engine.

Share this post


Link to post
Share on other sites

I disagree! OMRON STEP/SNXT instructions has been around for many years and for me has been my preferred method of implementing sequenced control.

Tried to post some informational PDF's here but site will not allow attachments. I'll try pm you.

 

Share this post


Link to post
Share on other sites

Yeah the attachment issue is a bit annoying. I wanted to upload my code to show how the steps keep regressing, even when I put in conditions to stop them. If the problem is easy to solve I'd be happy to keep using STEP/SNXT but at the moment they just aren't behaving in a way I expect or understand. Please feel free to PM me if you have more info, I really do want to understand how to use them properly. Thanks!

Share this post


Link to post
Share on other sites

To each their own. If you do use the STEP/SNXT and don't need to branch you can use the actual step bit as an interlock for the next step and this should stop backwards travel in your sequence.

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