SFCs aid program development and maintenance

A graphic outline often helps a programmer organize thoughts; maintain an internal logic to program development; and troubleshoot problems during debug, run-off, and validation. Sequential function charts (SFCs) are defined in IEC 61131 as a program organizing method writing programs for logic controllers.


A graphic outline often helps a programmer organize thoughts; maintain an internal logic to program development; and troubleshoot problems during debug, run-off, and validation. Sequential function charts (SFCs) are defined in IEC 61131 as a program organizing method writing programs for logic controllers.

Mathematicians had developed modeling tools for discrete events called Petri Nets. Grafcet grew from work on Petri Nets and was designed to model logic controllers. Controller manufacturers saw an opportunity to provide a graphical organizing and modeling tool and developed SFCs.

SFCs consist of 'steps' and 'transitions.' A step is represented by a rectangular box with a label. Transitions are represented by a single horizontal line. Steps are 'wired' together via a vertical line with a transition line intersecting it between steps.

Steps are either active or inactive. A step will become active with its internal algorithms or program executed until it is finished. At this time, logic within the transition becomes true, the previous step becomes inactive, and the next step is activated.

Applications that readily lend themselves to SFC programs include machining lines, certain batch processes, material handling, and packaging lines. Consider an automated line with a pallet containing an engine block to be machined. On Start, the conveyor moves the pallet to Op 1 station. A proximity switch goes true, enabling a pallet stop and activating the Step for Op 1-say a drilling operation.

Op 1 algorithm controls the drill process end point by setting a bit in transition code; dropping the pallet stop; and allowing the pallet to move to Op 2, where the process is repeated, this time for a reaming operation. The process repeats through the final operation and unloading.

The process could just as easily have been a filling line; in which a container moves along a conveyor under mixers where the program steps control material mixing and dispensing. Final packaging is completed on a step and transition basis.

Programming within steps and transitions under the standard can be accomplished with any of the IEC 61131-3 languages-structured text (ST), instruction list (IL), ladder diagram (LD), and/or function block diagram (FBD). Some programming editors will also support C.

For instance, a transition could be a rung of ladder diagram with a couple of contacts. When the contacts go 'True,' then the transition occurs, deactivating the previous step and enabling the next step. Boolean logic in ST could also be used.

Should an OEM have some specialized algorithms that are important intellectual property granting a competitive edge, then the ability to write the algorithm in C and compile it within a Step becomes very beneficial. In this case, it would be important to search for an editor and a controller that support this feature.

Branching SFCs

SFCs can contain branches that either are parallel 'AND' branches or selective 'OR' branches. Consider the accompanying diagram. After the initial step is completed and transition 003 is True, the controller will execute Step 004 through 014 branch and Step 005. When both are complete, transition 015 goes True, deactivating both 014 and 005.

Notice that after Step 004 there are two branches and two transitions. The controller scan will look at both transition 006 and 007 after completing Step 004. The first transition that goes True will determine which branch will become active. This is similar to OR logic.

Different editors and controllers will have different rules on how the steps and transitions are scanned and in what order events happen. Good programmers will always be aware of this order and write the program accordingly.

The graphic nature of SFCs lends itself to troubleshooting during the debug and validation phases. Programmers or technicians can watch progress of the program as steps become active then are deactivated. When trouble occurs, simply clicking on the step will lead directly to the code problem. Since these are the critical phases of an automation project where profits for an OEM are often won or lost, every helpful tool is a tremendous asset. SFCs can be one of those important tools.

A good reference document from PLCopen (Zaltbommel, Netherlands) can be found at www.plcopen.org/training_education/SFC-textual.doc .

Gary A. Mintchell, senior editor gmintchell@reedbusiness.com

No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Additive manufacturing benefits; HMI and sensor tips; System integrator advice; Innovations from the industry
Robotic safety, collaboration, standards; DCS migration tips; IT/OT convergence; 2017 Control Engineering Salary and Career Survey
Integrated mobility; Artificial intelligence; Predictive motion control; Sensors and control system inputs; Asset Management; Cybersecurity
Featured articles highlight technologies that enable the Industrial Internet of Things, IIoT-related products and strategies to get data more easily to the user.
This article collection contains several articles on how automation and controls are helping human-machine interface (HMI) hardware and software advance.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Mobility as the means to offshore innovation; Preventing another Deepwater Horizon; ROVs as subsea robots; SCADA and the radio spectrum
Future of oil and gas projects; Reservoir models; The importance of SCADA to oil and gas
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me