Create a SFC diagram

The beginning diagram of a POU in SFC always consists of an action “Init” of a following Transition / Transition condition “Trans0” and a jump back to Init. We have to expand that.

Before we program the individual action and transitions let us first determine the structure of the diagrams. We need one step for each trafficsignal phase. Insert it by marking Trans0 and choosing “Insert” “Step transition (after)”. Repeat this procedure three more times.

If you click directly on the name of a transition or a step, then this is marked and you can change it. Name the first transition after Init “START”, and all other transitions “DELAY.OK”.

The first transition switches through when START is TRUE and all others switch through when DELAY in OK produces TRUE, i.e. when the set time period is finished.

The steps (from top to bottom) receive the names Switch1, Green2, Switch2, Green1, whereby Init of course keeps its Name. “Switch” should include a yellow phase, at Green1 TRAFFICSIGNAL1 will be green, at Green2 TRAFFICSIGNAL2 will be green. Finally change the return address of Init after Switch1. If you have done everything right, then the diagram should look like in the following image:

Program SEQUENCE, First Expansion Level, Instruction Part

../_images/262d51f8c8a8590f0a317f3420a09d15

Now we have to finish the programming of the individual steps. If you doubleclick on the field of a step, then you get a dialog for opening a new Action. In our case we will use IL (Instruction List).