Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 61

Concept V2.

5
 Lesson 19 Objectives:
 After completing this lesson, the learner will be
able to:
– Program control logic using the Sequential Function
Chart Editor.
– Test the processing of a Sequential Function Chart
section using the Animation Panel.
– Identify the components of a Sequential Function
Chart.
» Step
» Transition
» Jump
» Branch
Concept V2.5
Start

Up Limit SW Wait
Slow Speed Limit SW
Bottom Limit SW
Start Pushbutton Pressed
Start

Up Limit SW
Lower Fast, drill motor on
Slow Speed Limit SW
Bottom Limit SW

Slow Speed Limit SW reached


Start

Up Limit SW
Lower Slow, drill motor on
Slow Speed Limit SW
Bottom Limit SW

Bottom Limit SW reached


Start

Up Limit SW Raise Drill, drill motor on


Slow Speed Limit SW
Bottom Limit SW
Up Limit SW reached
Concept V2.5
 Drill Press Output Control
FBD LD
Lower_Fast.x Drill_Motor_on

Lower_Fast.x OR_BOOL Drill_Motor_on


Lower_Slow.x Lower_Slow.x
Raise_Drill.x

Raise_Drill.x

Lower_Fast.x AND_BOOL Drill_Lower_High_Speed


TRUE Lower_Fast.x Drill_Lower_High_Speed

Lower_Slow.x AND_BOOL Drill_Lower_Slow_Speed


Lower_Slow.x Drill_Lower_Slow_Speed
TRUE

Raise_Drill.x AND_BOOL Drill_Raise Drill_Raise


Raise.x
TRUE
Concept V2.5
Rotary Table Application

Supply Hopper

Drilling

Clamping

Loader Tester

Evacuation

Rotation
Concept V2.5
Initialization
Rotary Table SFC Control
Start & Initial Cond Drill Sequence Test & Eject Sequence

Loader Advances Clamp Advances Gage Lowered

Loader Ext & Part Pres Clamp extended LSW Gauge Down LT 5s Gauge Down GTE 5s

Loader Retracts Drill Lowers Gauge Raise Error Raise Gauge

Loader Retracted LSW Drill Lowered LSW Gauge Raised LSW Gauge Raised LSW

Drill Raises Unloader Advanced Wait for Operator

Loader Sequence Drill Raised LSW Unloader extended LSW Manual Reset Pushbutton

Clamp Retract Unloader Retracted

Clamp retracted LSW Unloader retracted LSW

Wait Wait Wait

True (1)

Rotate Plate

Rotated LSW
Concept V2.5
 What is SFC? Sequential Function Chart
 A Sequential Function Chart is a graphic method
of representing a sequential control system by
using a sequence of steps and transitions.
 Each step is a command or action that is either
active or inactive.
 The flow of control passes from one step to the
next through a conditional transition that is either
true or false.
Concept V2.5
 SFC - Elements

Step Transition Jump

S_2_1 S_2_1

Alternative Branch Parallel Branch

Alternative Joint Parallel Joint


Concept V2.5
 SFC Rules
1. A Sequential Flow Chart section
must have an Initial Step and
only one Initial Step.

2. A Transition must follow a Step.

3. A Step must follow a Transition.


Concept V2.5
 SFC - Elements: The Step
 Step types are the initial step or steps.
 A step becomes active when the prior
transition has been satisfied
 A step becomes inactive when the
succeeding transition has been satisfied
AND the step delay time has elapsed.
 None, one or multiple actions, with
qualifiers, can be declared for each step.
 A supervision time can be defined for
each step.
Concept V2.5
 Step type:
 Step or initial step
 One initial step per section must be defined in
each sequential chain
 This initial step starts the sequence when
initialized
 It is marked with double lines along its margins
Concept V2.5
 Step Name (IEC Like)
 The step name is automatically generated and can be
edited (free names)
 The default for steps and transitions is the IEC Like
naming.
 A step name must be unique throughout the entire
project
 Step name length: maximum 32 characters
 The automatically generated step name always has
the structure: S_n_m
• S = step
• n = number of section (consecutive number)
• m = number of step in the section (consecutive
number)
Concept V2.5
 Step Name (Dynamic Numbered)
 Instead of free names, alias names can be selected
for steps (and transitions):
 Structure of alias names: S_nn_sszz
• S = step
• n = first characters of section name (number of
characters selectable)
• ss = Branch number on the section
• zz = Step number in a branch

 Choosing the alias can be activated in


Options > Preferences > Graphical Editors...
Concept V2.5
 Step name (Dynamic names) Example
Concept V2.5
 SFC - Elements: The Transition
 A transition is the condition that transfers
control from one step to another.
 Only transitions following active steps are
solved / evaluated.
 When a transition is True on the next scan:
• The preceding step(s) is deactivated
• The following step(s) is activated
• The True transition between the steps is no
longer solved
• The transition following the new active step
is solved
Concept V2.5
 A transition is a single control object of
data type BOOL and can be:
 a direct address Var_Lit_Dir

 a variable

 a literal (0 / FALSE or 1 / TRUE) Trans_Sect

 a transition section.
Concept V2.5
 Transition sections are special sections
that have:
 One single BOOL output

 Its output name is the same as the transition


section name.

 Only one section per transition

 Only functions, no function blocks can be used.


Concept V2.5
 Transition Sections:
 will be automatically created when opened.

 can be created for every transition.

 can be programmed in FBD, LD, IL or ST.

 In FBD the section automatically pre-assigns an


AND_BOOL function with the following:
• one output, preassigned the actual name of the
transition section
Concept V2.5
 SFC - Elements: The Jump
 The jump allows the program to
continue from a different location.

 A jump can be used in two ways:


• sequence jump
• sequence loop

 Jumps into or out of a parallel


sequence area are not possible.
Concept V2.5
 The Jump
Simple Sequence- Sequence-
Loop Loop Jump

S_6_1 S_6_3 S_6_6

S_6_2 S_6_4 S_6_3 S_6_7 S_6_8

S_6_1 S_6_5 S_6_8


Concept V2.5
 SFC - Elements: Alternative Branch
 The alternative branch offers
conditional programming of Alternative Branch
branches in the control flow of
the SFC structure.

 There can be only one branch


active at a time
Alternative Joint
 Left-to-right priority

 All alternative branches must


be joined back into one single
branch using alternative joints
or jumps.
Concept V2.5
 Alternative Branch
 Example:
 Alternative
sequences
Concept V2.5
 SFC - Elements: Parallel Branch
 Parallel branches split up the processing
into two or more sequences.
 One common transition directly above the Parallel Branch
parallel branch is allowed.
 The sequences are processed in parallel
and are processed independently of each
other.
Parallel Joint
 The parallel joint combines two or more
parallel branches to form one branch.
 One common transition is directly below
the parallel joint.
• This transition is evaluated only when
all directly preceding steps of the transition
have been set.
Concept V2.5
Example:
Parallel sequences
Concept V2.5

Select mode
Select column mode
Select row mode
Step creation mode
Transition creation mode
Parallel branch creation mode
Parallel joint creation mode
Alternative branch creation mode
Alternative joint creation mode
Jump creation mode
Link creation mode
Concept V2.5

Text creation mode


Toggles animation mode
Toggles presentation of animation panel
Step-Transition sequence creation mode
Structured parallel component creation mode
Structured alternative component creation mode
Transition-Step sequence creation mode
Concept V2.5
 Fast creation of Elements
Concept V2.5
 SFC Development

 Create a new SFC section.

 Create sequence with SFC elements.

 Define step properties.

 Define transition condition.


Concept V2.5
 SFC Programming
Concept V2.5
 Step Actions

 A step can be assigned none, one or multiple


actions.

 An action is a BOOL variable or direct address.

 An action can be assigned a qualifier.


Concept V2.5
 Step Programming
Concept V2.5
 Qualifiers
N None, action is active when the step is active.
S Set of the action (1), remains active even if
the step becomes inactive (saved/stored)
 R Reset of the action (0)
 L Time limited set of the action during the step
active period
 D Action will be delayed active during the step
active period.
 P Set of the action for one program scan (pulse)
 DS Delayed set of the action
Concept V2.5
 Actions, Qualifiers Timing Diagram
Step active
1
Step
0

Qualifier
1
N,NONE
0
1
S 0
1
R 0
1
L 0
1
D 0
1
P 0
1
DS 0

Step Activity
Concept V2.5
 The Transition Variable (Literal, direct address)

Var_Lit_Dir
Concept V2.5
 The Transition Section

Trans_Sect

 contains the logic of the transition condition as


well as being automatically linked to the transition.
Concept V2.5
 The Transition Section
Concept V2.5
 The Transition Section

Modify, extend with


functions, links
....
close section

 Transition is activated if variable is TRUE (e.g. S_17 = TRUE)


Concept V2.5
 View: Normal / Expanded
Normal View Expanded View
Concept V2.5

Black Transition section is not in operation

Red Transition is not satisfied (monitored)

Green Transition is satisfied (monitored)


Concept V2.5
 Animation of the Steps
 In a running Quantum PLC, the displayed data is
automatically updated. If it has stopped, the static state of
the program is displayed from the Quantum PLC.
White Step is inactive

Green Step is active

Magenta Time overrange


The error display terminates
when the step becomes inactive.
Yellow Time underrange
The error display remains
even though the step has been inactivated.
Concept V2.5
 Displays the time that has passed since
the step became active.
 The time display in active steps is updated
continuously.
 After the step has become inactive, the time
display is maintained until the next activation of
the step. Each time the step becomes active, the
old time is reset and time begins from 0.

STEP_17
Green
123s340ms
Concept V2.5
 Supervision times
 Maximum supervision time:
• If the step is still active after this time has expired,
a bit is set and in animation mode there will be an
error message and a color change of the step
• must be greater than the minimum supervision Magenta
time and the step delay time.

 Minimum supervision time:


• If the step becomes inactive before this time has
expired, a bit will be set and in animation mode
there will be an error message and a color change
of the step Yellow
• Must be smaller than the maximum supervision
time and greater than the step delay time.
Concept V2.5
 Supervision times
 Step delay time:
• Defines the active step time, i.e. the minimum length of
time the step will remain active.
• Must be less than maximum and minimum supervision
time.
 Entry of Supervision and Step delay time:
• as literal (direct, fixed values) or as
• Variable of Data type SFCSTEP_TIMES:
– select SFCSTEP_TIMES Variable
Variable Declaration... enter Variable name
Data type SFCSTEP_TIMES Set... value
Step properties enter name of
SFCSTEP_TIMES typed variable
Concept V2.5
 Entry of Supervision times
Concept V2.5
 Entry of Supervision times
Concept V2.5
 Entry of Supervision times
Concept V2.5
 Learning Mode Supervision times
 Learning Mode for automatic determination of
supervision times is possible after "Connect" and
"Download":
Online Menu
Animate SFC section
Animation Panel
Learning Mode On
Waiting .....
Learning Mode Off
Continue/Accept
Concept V2.5
 Learning Mode Supervision times
Concept V2.5
 The Step Variable
 Each step is implicitly (automatically) assigned a (readonly)
variable from data type SFCSTEP_STATE.
 This step variable has the same name as the step.
 The step variable can be used everywhere as FFB input to
ask for the status.
 The step variable has the following structure:
• “Stepname”: SFCSTEP_STATE
• t: TIME
• x: BOOL
• tminErr: BOOL
• tmaxErr: BOOL
Concept V2.5
 The Elements have the following meaning:
 ’Stepname’.t Current retention time in the step

 ’Stepname’.x 1: Step active


0: Step not active

 ’Stepname’.tminErr 1: Lowlimit violation of minimum supervision time


0: No lowlimit violation of minimum supervision time

 ’Stepname’.tmaxErr 1: Upperlimit violation of maximum supervision time


0: No upperlimit violation of maximum supervision time

 Example for stepname = STEP_1:

STEP_1.t Current retention time in STEP_1


Concept V2.5
 Animation panel
 The animation panel allows you
to test the processing of an SFC
section. For example, steps can
be commutated, the processing
of the sequence can be
controlled (whether transitions
or actions are to be processed),
time errors can be reset or the
sequence can be reset to the
initialization state.
 The animation control panel
provides all available operator
options in a dialog box.
 SFC-Section animated,
Online, Animation panel
Concept V2.5
 Animation panel
 Section
• The name of the SFC section that the dialog
box is active for is displayed here.
 Processing Parameters:
 SetResetFlag
• To reset the sequence, you must activate
SetResetFlag. This will stop the sequence
and all actions will be reset. Operator
interventions are not possible.
• To start the sequence, you must first activate
and then deactivate SetResetFlag. The 1 >
0 edge will reset the sequence, i.e. the initial
step is activated.
 DisableTimeCheck
• If activated, step time supervision is no
longer performed.
Concept V2.5
 Animation panel
 Disable Transitions
• If activated, the states of the
transitions are no longer analyzed.
The sequence remains in its current
state, regardless of the signals on the
transitions. Operation of the sequence
is only possible with the control
commands SetResetFlag,
StepUnconditional,
StepTransDependent.
 Disable Actions
• If activated, the actions of the steps
are no longer processed.
Concept V2.5
 Operations
 StepUnconditional
• Regardless of the state of the transition,
the next step will be activated, but not
until the Step delay time of the active
step has expired.
• In parallel branches, StepUnconditional
will always activate every branch
• In alternative branches, it will always
activate the left branch.
• Use StepTransDependent for process-
dependent activation of branches.
Concept V2.5
 Further Operations
 StepTransDependent
• When the transition condition is satisfied,
the next step will be activated.
• StepTransDependent is only recommended
for an active DisableTransitions.
• By freezing the transitions
(DisableTransitions), StepTransDependent
allows you to manually process the
elements of the sequence step by step.
Dependent on the transition condition, the
transitions proceed.
 ResetTimeErrors
• If ResetTimeErrors is activated, the display
of the error messages of the time
supervision in the SFC section will be reset.
Concept V2.5
 Further Operation
 ForceSelectedStep(s)
• Independent of the state of transitions and steps,
the selected step(s) is activated.
• In alternative branches, only one single step can
be activated.
• In parallel branches, exactly one single step per
parallel branch must be activated.
Warning:
 ForceSelectedStep(s) is not recommended for an
error search with controllers of machine tools,
processes or materials maintenance systems while
they are running.
 Since logic processing is no longer taking place, the
Quantum ignores all input information. This might
result in unsafe, dangerous, and destructive
operations of the tools or processes that are
connected to the Quantum controller.
Concept V2.5
 Further Operation
 Learning mode ...
 see "Supervision time..."
 Select active Step(s)
 The active step at this moment will be
marked on the section
Concept V2.5
 Animation Control with SFCCNTRL
 The function block offers the same
control actions that are available
through the menu commands of the
online menu and the animation panel.
SFC-SECTION
 The execution of a SFC section can be
influenced process dependent. SFCCNTRL
BOOL RESETSFC RESET BOOL
 SFCCNTRL has to be placed into a BOOL DISTIME TIME BOOL
BOOL DISTRANS TRANS BOOL
section that will be processed PRIOR to BOOL BOOL
DISACT ACT
the SFC section that is to be controlled. BOOL STEPUN MODECHG BOOL
BOOL STEPDEP STATECHG BOOL
 The assignment of SFCCNTRL to an BOOL RESETERR TIMEERR BOOL
SFC section is performed through the BOOL DISRMOTE
name of the instance.
Instance name = name of SFC_Section
Concept V2.5
 Parameter Description (Inputs)
Parameter Data Type Meaning

 RESETSFC BOOL 01: Reset sequence; 1 0: Standardized


start of sequence (set initial step)

 DISTIME BOOL 1: Disconnect watchdog

 DISTRANS BOOL 1: Disconnect evaluation of transitions

 DISACT BOOL 1: Disconnect processing of actions and


reset all actions of the sequence

 STEPUN BOOL 01: Activate next step independent of


transition

 STEPDEP BOOL 01: Activate next step when transition


condition satisfied
Concept V2.5
 Parameter Description (Inputs)
Parameter Data Type Meaning

 RESETERR BOOL 01: Disconnect display of timing errors


in the on-line image.

 DISRMOTE BOOL 1: Inhibits the control of SFC with the


on-line Animation Panel. The SFC Section
may still be controlled with the SFCCNTRL
Function Block
Concept V2.5
 Parameter Description (Outputs)
Parameter Data Type Meaning

 RESET BOOL 1: Sequence was reset

 TIME BOOL 1: Watchdog was disconnected

 TRANS BOOL 1: Evaluations of transitions disconnected

 ACT BOOL 1: Processing of actions has been


disconnected and all actions have been
reset

 MODECHG BOOL 1: Operating mode has been changed

 STATECHG BOOL 1: State of the sequence has been changed

 TIMEERR BOOL 1: Watchdog error has occurred


Concept V2.5

You might also like