Upload
marlene-powers
View
219
Download
0
Embed Size (px)
Citation preview
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
Up Limit SW
Slow Speed Limit SWBottom Limit SW
Up Limit SW
Slow Speed Limit SWBottom Limit SW
Up Limit SW
Slow Speed Limit SWBottom Limit SW
Up Limit SW
Slow Speed Limit SWBottom Limit SW
Wait
Up Limit SW reached
Lower Fast, drill motor on
Start Pushbutton Pressed
Lower Slow, drill motor on
Slow Speed Limit SW reached
Raise Drill, drill motor on
Bottom Limit SW reached
Start
Start
Start
Start
Concept V2.5
Lower_Fast.x OR_BOOL
Lower_Slow.x
Raise_Drill.x
Drill_Motor_on
Lower_Fast.x AND_BOOL Drill_Lower_High_SpeedTRUE
Lower_Slow.x AND_BOOL Drill_Lower_Slow_SpeedTRUE
Raise_Drill.x AND_BOOL Drill_RaiseTRUE
FBD LDLower_Fast.x
Lower_Slow.x
Raise_Drill.x
Drill_Motor_on
Lower_Fast.x Drill_Lower_High_Speed
Lower_Slow.x Drill_Lower_Slow_Speed
Raise.x Drill_Raise
Concept V2.5
Drill Press Output Control
Supply Hopper
Loader
Rotation
Drilling
Clamping
12 3
4
50
Tester
Evacuation
Rotary Table Application
Concept V2.5
Rotated LSW
Rotate Plate
True (1)
Initialization
Start & Initial Cond
Loader Ext & Part Pres
Loader Retracted LSW
Loader Advances
Loader Retracts
Wait
Loader Sequence
Clamp extended LSW
Drill Lowered LSW
Drill Raised LSW
Clamp retracted LSW
Clamp Advances
Drill Lowers
Drill Raises
Clamp Retract
Wait
Drill Sequence
Rotary Table SFC Control
Gage Lowered
Gauge Raise
Unloader Advanced
Unloader Retracted
Wait
Error Raise Gauge
Wait for Operator
Gauge Down LT 5s
Gauge Raised LSW
Unloader extended LSW
Unloader retracted LSW
Gauge Down GTE 5s
Gauge Raised LSW
Manual Reset Pushbutton
Test & Eject Sequence
Concept V2.5
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.
Transition Jump
S_2_1
Step
S_2_1
Parallel Branch
Parallel Joint
Alternative Branch
Alternative Joint
Concept V2.5
SFC - Elements
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 Rules
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 stepOne initial step per section must be defined in
each sequential chain This initial step starts the sequence when
initializedIt 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 selectedfor 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 TransitionA 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
Var_Lit_Dir
Trans_Sect
Concept V2.5
A transition is a single control object of data type BOOL and can be:
a direct address
a variable
a literal (0 / FALSE or 1 / TRUE)
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 JumpThe 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.
Sequence-Loop
Sequence-Jump
S_6_3
S_6_4
S_6_5
S_6_3
SimpleLoop
S_6_1
S_6_1
S_6_2
S_6_6
S_6_7
S_6_8
S_6_8
Concept V2.5
The Jump
Alternative Branch
Alternative Joint
Concept V2.5
SFC - Elements: Alternative Branch The alternative branch offers
conditional programming ofbranches in the control flow ofthe SFC structure.
There can be only one branchactive at a time
Left-to-right priority
All alternative branches mustbe joined back into one singlebranch using alternative jointsor jumps.
Concept V2.5
Alternative BranchExample: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 theparallel branch is allowed.
The sequences are processed in paralleland are processed independently of eachother.
The parallel joint combines two or moreparallel branches to form one branch.
One common transition is directly belowthe parallel joint.
• This transition is evaluated only whenall directly preceding steps of the transitionhave been set.
Parallel Branch
Parallel Joint
Concept V2.5
Example:
Parallel sequences
Select modeSelect column mode
Select row modeStep creation mode
Transition creation modeParallel branch creation mode
Parallel joint creation modeAlternative branch creation mode
Alternative joint creation modeJump 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
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
Step Activity
Step
QualifierN,NONE
S
R
L
D
P
DS
10
10
10
10
10
10
10
10
Step active
Concept V2.5
Actions, Qualifiers Timing Diagram
Var_Lit_Dir
Concept V2.5
The Transition Variable (Literal, direct address)
Trans_Sect
Concept V2.5
The Transition Section
contains the logic of the transition condition as well as being automatically linked to the transition.
Concept V2.5
The Transition Section
Modify, extend with functions, links
....close section
Concept V2.5
The Transition Section
Transition is activated if variable is TRUE (e.g. S_17 = TRUE)
Normal View Expanded View
Concept V2.5
View: Normal / Expanded
Concept V2.5
Transition section is not in operation
Transition is not satisfied (monitored)
Transition is satisfied (monitored)
Black
Red
Green
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.
Concept V2.5
Step is inactive
Step is active
Time over rangeThe error display terminateswhen the step becomes inactive.
Time under rangeThe error display remainseven though the step has been inactivated.
White
Magenta
Green
Yellow
STEP_17
123s340ms
Concept V2.5
Displays the time that has passed sincethe 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.
Green
Concept V2.5
Supervision timesMaximum 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 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
• Must be smaller than the maximum supervision time and greater than the step delay time.
Magenta
Yellow
Concept V2.5
Supervision timesStep 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 timesLearning 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 VariableEach step is implicitly (automatically) assigned a (read only)
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 active0: Step not active
’Stepname’.tminErr 1: Low limit violation of minimum supervision time0: No low limit violation of minimum
supervision time
’Stepname’.tmaxErr 1: Upper limit violation of maximum supervision time0: No upper limit violation of maximum supervision
time
Example for stepname = STEP_1:
STEP_1.t Current retention time in STEP_1
Concept V2.5
Animation panelThe 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 panelDisable 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
OperationsStepUnconditional
• 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
RESETTIME
TRANSACT
MODECHGSTATECHG
TIMEERR
RESETSFCDISTIMEDISTRANSDISACTSTEPUNSTEPDEPRESETERRDISRMOTE
SFCCNTRL
BOOLBOOLBOOLBOOLBOOLBOOLBOOLBOOL
BOOLBOOLBOOLBOOLBOOLBOOLBOOL
SFC-SECTION
Concept V2.5
Animation Control with SFCCNTRL
The function block offers the same control actions that are availablethrough the menu commands of the online menu and the animation panel.
The execution of a SFC section can be influenced process dependent.
SFCCNTRL has to be placed into a section that will be processed PRIOR to the SFC section that is to be controlled.
The assignment of SFCCNTRL to an SFC section is performed through the name of the instance.Instance name = name of SFC_Section
Concept V2.5
Parameter Description (Inputs)
Parameter Data Type Meaning
RESETSFC BOOL 01: 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 andreset all actions of the sequence
STEPUN BOOL 01: Activate next step independent oftransition
STEPDEP BOOL 01: Activate next step when transitioncondition satisfied
Concept V2.5
Parameter Description (Inputs)
Parameter Data Type Meaning
RESETERR BOOL 01: Disconnect display of timing errorsin the on-line image.
DISRMOTE BOOL 1: Inhibits the control of SFC with the on-line Animation Panel. The SFC
Sectionmay still be controlled with the
SFCCNTRLFunction 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