In this post, we will see the concept of SFC (Sequential Flow Chart) language in PLC programming with a basic example program.
Table of contents
Types of Languages in PLC
The five types of languages used in PLC programming are as follows.
- Ladder (LD),
- Structured text (ST),
- Functional Block Diagram (FBD),
- Sequential Flow Chart (SFC) and
- Instruction List (IL).
SFC Language in PLC
A Sequential Flow Chart is a language used in PLC programming which is a graphical representation of the flowcharts or steps, which is similar to flowchart algorithms used in computer languages.
This language is a very useful tool in a condition where the process is very large and the functions are performed in steps.
Instead of writing the whole logic in a ladder diagram or even if you use functional block diagrams, the repetition rates and the overall viewing of the process can be made simpler by using SFC language.
Sequential Flow Chart Programming
Consider a simple example where you turn on or off a motor by pressing the start and stop buttons. Refer to the below image showing SFC language.
The black box represents action to be written inside the step. The brown line indicates the flow of the sequence.
The horizontal grey line in between indicates the transition condition.
In the first box, a start-up condition of 2 seconds timer is written for starting this action. This step executes on PLC cold start or warm start.
This means that the start and stop action will be executed after an initial delay of 2 seconds of PLC start-up. The first transition condition is set to true. The second step is written to reset the motor variable.
The second transition condition is written for checking the start pushbutton press. The third step is written to set the motor variable. The third transition condition is written for checking stop pushbutton press.
So, the sequence will work as follows. On PLC start-up, after a delay of 2 seconds, the motor will be turned off by default in the second step as written.
Now, if the start button is pressed, the motor will be turned on as per the second transition condition and third step. If the stop button is pressed, the motor will be turned off as per the third transition condition and the second step.
This means that the logic will be executed as per the flow sequence lines written. A transition condition can be defined as an interlock for executing a step or action. You can write a variable or even call a section in a step.
SFC Programming Example
The below image is an actual example of the language written in PLC software.
In the box, you can define the action and in the black line, you can define the variable condition to be written.
SFC’s are useful in breaking a very complex flow chart sequence in a simpler way to execute the logic. You have to properly define the conditions and arrange the blocks and flow sequence accordingly to perform the function.
Remember to not get trapped in a repetitive or infinite loop which will not break the logic and can instead confuse the programmer in writing the logic.
You must have written this simple logic in a ladder language. But, it must be noted that you can also use SFC language for such logic or other complex ones.
Due to the visual representation of flowchart-type logic in front of the programmer, he can easily troubleshoot logic and also reduce the downtime required for developing a logic.
You can also use branching in the SFC language. That means, after a step, you can execute other parallel running steps like a branch.
In branching logic is a sub-category named selective branching. That means each branch will have its own individual transition condition to execute that branch/step.
Similar to branching, convergence is also possible. It is the opposite of branching. That means, all the branches combine together to execute a single step.
SFC’s are a strong tool in designing logic and making the sequence more understanding and easier to use.
If you liked this article, then please subscribe to our YouTube Channel for Instrumentation, Electrical, PLC, and SCADA video tutorials.