Laboratory Exercise 4:
SFC Programming and Process Control

Purpose

The purpose of this laboratory exercise is to develop
fundamental skills in SFC programming.   Control of a dye mixing system
will be developed using IEC standard SFC methods.  The notation used conforms to the CEI
61131-3 International Standard and to the extension proposals as defined by the
AFCET’s SFC group and by the PR NF EN 60848 standard
project.

Objectives

After completing this exercise, you should be able to
perform the following activities:

Define
SFC

Identify
SFC functions and syntax

Develop
the pneumatic circuitry for a dye mixing system

Develop
the SFC program control for color intensity of the system

Implement
timers for delay between STEPS

Implement
the use of a counter to count a total of 5 cycles.

Develop
an HMI interface

Run a
simulation to verify program execution

Develop
written documentation of the steps involved for SFC control methods.

Generate
a written laboratory report.

SFC Background and Overview

Sequential Function Charts (SFC) is a programming method
that consists of STEPS and TRANSITIONS.
A STEP is simply an action block of code or directive that is acted upon
when a TRANSITION condition is met.
SFC is based on the European standard IEC 1131 and is not only limited
to sequential control of industrial applications but also has evolved into many
business applications.  SFC is also
referred to as GRAFCET programming language.  The main advantage of SFC is the
flexibility to define actions (STEPS) in on/off conditions or scripting
statements that resemble “C” programming.  TRANSITIONS are basically Boolean type
conditions that when true, control is passed to the next logical STEP.   A general concept of SFC logic and
an example of SFC code is shown below.

Figure 1: SFC Conceptual Diagram
Figure 2:  SFC Code

Branching is permissible within SFC as either OR structures
or AND structures.  Examples of
these structures are shown in the diagrams below.

Figure 3:
SFC OR Condition

Figure 4:  SFC AND
Condition

Example:

The SFC code show below controls
the pneumatic cylinders such that the system will start the cycle upon
depressing of Push Button 1 (PB1).
Note:  Initially, both
cylinders are retracted, thus A0 and B0 proximity switches are
“true”.  Upon activating
PB1, Cylinder B extends until proximity switch B1 is “true” then
retracts until B0 is true once again.
After cylinder B extends a second time, Cylinder A extends until
proximity switch A1 is true.  At
this point, both cylinders A and B retract simultaneously.  Refer to the diagram below showing when
the control solenoids are energized for extension and retraction of the pneumatic
cylinders.  Note also that +
represents extension, and – represents retraction.

Figure 5:  Solenoid Controlled Pneumatic Cylinders

Figure 6:  SFC Control for Two Pneumatic Cylinders

Timers

Time delays can also be inserted to
provide dwell times between logical steps.
In this case, the transition condition is based on a timer
function.  The following diagram
represents an example of how timers can be incorporated into SFC
programming.  Note that transition 2
controls the delay between steps 2 and 3.

The basic syntax for timers is as
follows:

Type of
Timer/Conditions for Enabling Timer/Time Value.  An example would be as shown in
TRANSITION 2, and the corresponding syntax is:

TON/1-1S4.B1/t#3s/

Where:

TON = Timer type (in this case, an on-delay timer)

1-1S4.B1 = The internal TAG of the function
enabling the TON

(B1 Proximity Switch)

t#3s = Time value for 3 seconds delay.

Figure 7:  SFC Control Example Using Time Delay

Laboratory Problem.

For this laboratory exercise, a SFC
control method will be employed to control the mixing of red and blue dye to
create a purple mixture.  The
process begins by the operator depressing the start switch. The formula calls
for two “shots” of blue and one “shot” of red for the
required color intensity desired by the customer.  Further, the blue nozzle must be held
open for 3 seconds on the first shot and 1 second on the second shot.  The red nozzle is activated by extension
and retraction of cylinder 1 with no delay between extension and retraction.  After dispensing both blue and red dye,
an agitator is activated to provide for mixing inside the tank.  The nozzles dispersing respective colors
of dye are determined by the extension of cylinders 1 and two.  These cylinders are controlled by
solenoids as show in the system diagram.
For example, energizing solenoid A+ causes cylinder 1 to extend, and A-
will cause cylinder 1 to retract.
Cylinder 2 is controlled in the same manner using solenoids B+ and B-.

For this exercise, a batch total of
5 is assumed.  In other words, the
process should repeat for 5 complete cycles and display the count value of
cycles processed.  At the count of
5, the system will stop, and the operator must depress the reset button to
clear the counter prior to the next batch of processing.

An example of how a counter can be
integrated into SFC is shown in Figure 8.
Notice that in STEP 8, a tag named Count_Value is indexed by adding a
second variable Count_Index.
Count_Index has been assigned a value of 1.

Figure 8:  SFC Counter Example

System Diagram

Figure 9:  System Diagram for Dye Dispensing System

Figure 10:  HMI Control Panel for Dye Dispensing
System

Procedure:

The following steps should be
taken in carrying out this laboratory exercise.

1.      Based
on the examples and methods presented in class,  develop the system shown

in the diagram
including the HMI control panel.

2.      Open
the Variable Manager and created the required TAGS for the project.

3.      Create
a new blank SFC diagram.

4.      Develop
the required SFC control program for the system.

5.      Run
a simulation to verify the control functions according to system requirements.

6.      Have
the instructor check and verify by signing off on your successful simulation.

7.      Following
the usual format, create a thorough and complete laboratory report.

8.      Submit
your report at the beginning of the next class period.