Zibb
Subscribe to Control Engineering
FirstLight
Email
Print
Reprint
Learn RSS

SFCs aid program development and maintenance

Gary A. Mintchell -- Control Engineering, 10/1/2002

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

Email
Print
Reprint
Learn RSS

Talkback

We would love your feedback!

Post a comment

» VIEW ALL TALKBACK THREADS

Related Content

Related Content

 

By This Author

Sponsored Links

 

Advertisement
SPONSORED LINKS

More Content

  • Blogs
  • Discussions
  • Webcasts
  • Podcasts
  • Videos

Blogs

  • Peter Welander
    Pillar to Post: Peter Welander's Blog

    November 26, 2008
    Cornell corners chemical car competition
    For a light bit of reading before your Thanksgiving holiday (assuming you can take the time off) you might want to know that Cornell won the 10th a......
    More
  • Matt Luallen and Steve Hamburg of Encari
    Industrial Cyber Security

    November 17, 2008
    NIST SP 800-82 Guide to Industrial Control Systems Security
    The National Institute of Standards and Technology has posted the Final Public Draft of NIST SP 800-82, Guide to Industrial Control Systems (ICS) S......
    More
  • View All BlogsRSS

Webcasts

Engineering-driven Ethernet
This Control Engineering Roundtable Webcast will address the engineering issues you should be aware of when exploring the adoption of Ethernet or when looking to expand its use in your facility.

Bridging gaps with wireless
Discover how you can create stronger, flexible and cost-effective wireless connections for your entire plant. Register today!

View All Webcasts
Advertisements





NEWSLETTERS

Get engineering industry news, trends, and business-critical information delivered directly to your inbox!

Click on a title below to learn more.

Weekly News (Weekly)
Process Instrumentation & Sensors (Monthly)
System Integration Monthly (Monthly)
Process & Advanced Control (Monthly)
Machine Control (Monthly)
Information Control (Monthly)
Automation Control (Monthly)
Product Review (Monthly)
Simplified Safety
Fieldbus Facts
PROFInews North American Edition
About Us   |   Advertising Info   |   Site Map   |   Contact Us   |   Useful Sites   |   FREE Subscription   |   RSS
© 2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy
Please visit these other Reed Business sites