


Doing it this way makes sure we only use that input in one spot in our program, so if we ever have to change the physical location of that input, we only have to change our program in that one spot. Step 0 does nothing except that we will tell the rest of our program that CYL1 is in, with 'CYL1_STATUS_IN', which is a Boolean variable that is true if we are in step 0, and the input from the prox 'INPUT_CYL1_IN' is true.

On the right side of the steps, you see what is actually going to happen in that step. The transition from Step1 to Step 0 says, '/INPUT_PUSHBUTTON', which means 'NOT that input'. In case I need an 'OR', I use the '+' sign. That would be a whole lot to write down in your documentation though, so that is why I do it that way. Look at the transition from Step 0 to Step 1, it says, 'INPUT_PUSHBUTTON * CYL1_INTERLOCK' which in my world means: 'the input from the pushbutton needs to be there, AND the interlock needs to be satisfied'. This probably requires some explanation, because over the years, I have developed this way of notation, which does not necessarily follow the strict rules of IEC1131 or whatever other standards there may be, but I'm assuming that if you read this, you understand the concept of steps and transitions. It cannot move out in some interlocking conditions.There is only one proximity switch on this cylinder, telling me it is at the rest position, so I'll have to assume it's in the 'out' position if I don't see that input for a while.Once the pushbutton is released, the valve that operates the cylinder returns to its normal state, and the cylinder will move in (the rest position). Let us assume I have a simple cylinder (CYL1) that will have to move out, when a pushbutton is pressed. We are going to look at a little Grafcet first, so we get the idea of what is going on. This article uses RSLogix 5000, but it is the same concepts in any PLC, with some minor differences. Of course, there are numerous ways of programming a Grafcet in ladder logic, but it is good to have a standard way of doing it every time, and I will show you how I do it. The translated logic is the only thing that is slightly different. This also means that your Grafcet documentation for a certain machine does not change with the manufacturer of the PLC you are using. This means nobody has to buy the expensive SFC programming modules, it is easy to read and troubleshoot, and less skilled maintenance people that you often have to deal with are not completely lost in a pile of spaghetti. What is even better is that with a little bit of programming skills, it is possible to translate these Grafcets to ladder logic. I seriously believe that no machine cannot be programmed with this method, and if I would have the opportunity to make the decision every time (unfortunately the customer is often involved in this), I would never use anything else. After some getting used to that, I absolutely loved the way it enabled me to program and troubleshoot complex machinery, and ever since, I've tried to use this method whenever I could. There was absolutely no process in their PLC logic that was not documented by an SFC or as I like to call it, a Grafcet. I have worked for several machine builders, and one of them had given the term 'SFC logic' another meaning.

I often find that using SFC's or Grafcets is the easiest way to design industrial automation systems.
