Professional Documents
Culture Documents
Sequential Function Chart: Workshop User's Guide
Sequential Function Chart: Workshop User's Guide
FUNCTION CHART
Workshop User’s Guide
FAMIC Technologies Inc.
All rights reserved.
REPRODUCTION
1. Introduction ...................................................................................................................1-1
1.1. About the SFC Workshop ....................................................................................1-1
4. SFC Syntax.....................................................................................................................4-1
4.1. Introduction ..........................................................................................................4-1
i
SFC User’s Manual
ii
Table of content
5. Simulation ......................................................................................................................5-1
5.1. State of an SFC During Simulation ......................................................................5-1
5.2. Step and Transition States During Simulation......................................................5-2
5.3. Fault Management During Simulation .................................................................5-4
5.3.1. Sequence Duration Surveillance ..............................................................5-4
5.3.2. Step Duration Surveillance ......................................................................5-6
5.3.3. General Fault............................................................................................5-9
5.4. Windows Layout ................................................................................................5-10
5.5. Project Simulation ..............................................................................................5-10
5.5.1. Operator's Intervention...........................................................................5-11
5.5.2. Simulation of the SFC_PNEU_EN.PR4 or
SFC_HYDRO_EN.PR4 Projects ...........................................................5-12
5.6. Possible Causes of Problems ..............................................................................5-12
5.6.1. Structure Errors ......................................................................................5-12
5.6.2. Syntax Errors..........................................................................................5-15
6. Exercises .........................................................................................................................6-1
6.1. Exercise 1 – Command Circuit of a Drilling Machine .........................................6-1
6.1.1. Description of the Operative Part of the Circuit.......................................6-2
6.1.2. SFC...........................................................................................................6-2
6.2. Exercise 2 – Command Circuit of the Drilling Unit.............................................6-4
6.2.1. Description of the Operative Section .......................................................6-5
6.2.2. Description of the Wired Command Circuit ..........................................6-10
iii
SFC User’s Manual
A. Glossary .........................................................................................................................A-1
B. Index ..............................................................................................................................B-1
iv
List of figures
v
SFC User’s Manual
vi
List of figures
vii
SFC User’s Manual
viii
1. Introduction
This sequential function chart (SFC) workshop User’s Guide provides the information
required to use this workshop with Automation Studio. This includes technical specifications
for components, procedures for defining properties, the building and simulation of a circuit,
and examples of applications.
Automation Studio is a modular simulation software package to which various simulation
modules can be plugged in.
Each module, called a workshop, contains a library from which you can withdraw
components to create different types of circuits – SFC, electrical diagram, and others either
alone or combined.
The Automation Studio handles the following functions: editing, simulation, file and diagram
management, printing, and display.
1-1
2. Description of the SFC Editor’s Menus
This chapter covers the menus in the SFC Editor and those not included in the User’s Guide.
For a description of items with functionality common to all workshops, refer to the User’s
Guide.
2-1
SFC User’s Manual
Select
Allows the user to select every step, transition, structured text, comment, link, all that follows
a selected transition/step, and every item of an SFC.
The options available from the Select command in the Edit menu are as follows:
Figure 2–3: Options from the Select command in the Edit menu
2-2
Description of the SFC Editor’s Menus
Component Properties
Allows the user to access the properties of the selected component. See Building the SFC
section.
Document Properties
Allows the user to access the document properties: Page Setup, Information Summary, SFC,
and History.
2-3
SFC User’s Manual
A D E
C G
F
I
H
The options available from the Document Properties dialog box are as follows:
Section Description
A Name The default SFC name is displayed in this zone. This field is
modifiable. It is synchronized with the name of the document that
appears in the Project Explorer.
B Hierarchic This zone allows the modification of the SFC hierarchic level. The
Level level is 0 by default (highest level). The hierarchic level must be in the
0 999
2-4
Description of the SFC Editor’s Menus
Section Description
0 to 999 range.
C Class With the use of the drop-down list, to specify whether the SFC is an
explosion of a macro step or a standard SFC. The SFC is defined as
being STANDARD by default.
D Source Step The source macro step of the macro step SFC is defined in this zone.
E Unconditional This checkbox, checked by default, allows an unconditional running
SFC Run of the SFC.
If the checkbox is unchecked, a structured text must contain the SFC
execution condition. For example: SFC_Name.RUN IF CONDITION
F Comment Input a general comment for the SFC in this zone.
G Time This button gives the user access to the Sequence Time Supervision
Supervision dialog box. The sequence time is calculated from the start to the return
to the initial step.
To use this function, the SFC must have only one initial step
that must be step 1.
2-5
SFC User’s Manual
Section Description
Statements (action, Displays the SFC components’
condition), Level 2 statements (action and condition) (Level
2).
I Simulation Boolean Animation When this option is selected, the name
of the Boolean variables with a TRUE
condition is displayed in reverse video
during a simulation.
Numerical Animation When this option is selected, a field
containing the variable’s value is
displayed on the right of the numerical
variable’s name during a simulation.
Active Step Scrolling When this option is selected, the SFCs
are moved inside their own window in
order for the active steps to remain
visible on the screen. The display
priority is granted to the SFCs’ upper
left side steps. So, when two steps of a
single SFC are simultaneously active,
the top priority is granted to the one step
positioned in the furthest left and up of
the SFC.
J Options Fit Vergences Adjusts AND and OR links based on the
Automatically shortest path between the step/transition
components.
Automatic Jump-to Label Automatically replaces rising links by
on Rising Link jumps in order to simplify SFCs.
Automatic Open Properties Automatically opens the properties
Dialog Box dialog box of the component (SFC, step,
transition, comment, or structured text)
when created.
2-6
Description of the SFC Editor’s Menus
Figure 2–7: Options in the Links and Branches option from the SFC menu
• Base Fit Redraw: Redraws the selected link or branch based on the shortest path between
the components.
• Adjust: Adjust selected vergence containing jumps to the shortest path.
• Convert Link: Depending on the selected element, converts from either link to jump or
jump to link.
Convert Step
Lock Number
2-7
SFC User’s Manual
Unlock Number
Renumber
Insert
Grants the user access to the component insertion tool in the SFC. Components can be
inserted from the toolbar.
The options available from the Insert command in the SFC menu are as follows:
Figure 2–8: Options from the Insert command in the SFC menu
2-8
Description of the SFC Editor’s Menus
Errors
Allows identifying errors in the SFC. Error and/or warning messages are displayed in the
Messages Window (refer to the Message Window section of the User’s Guide).
B C D E F G H I J
A K
Figure 2–9: SFC toolbar
2-9
3. Creating an SFC
This example is intended for you to familiarize yourself with the software commands. It uses
a step by step method that allows you to construct your first SFC.
The Diagram Editor window displays the SFC management menus and commands. The
newly created window corresponds to a folder in the Project Explorer and containing the list
of diagrams and SFCs of this project.
To create a new SFC:
1 Choose File → New → SFC
In this case, new templates have not been created, so the only choice you have is
“None”
3. Click OK.
The Document Properties dialog box containing the SFC’s properties is displayed on the
screen.
4. For this SFC, enter GRA_001 in the Name field, the Hierarchy Level and Class fields
display 0 and Standard by default. Then in the Comments field, enter Creating a First
SFC.
5. Click on the Apply button to validate the changes.
6. Click on the Close button to shut the window and return to the diagram.
3-1
SFC User’s Manual
The SFC Editor adds all the necessary commands to the menu and toolbars to create an SFC.
The status bar provides the related information when browsing the SFC.
3-2
Creating an SFC
• Structured texts that correspond to autonomous actions which are not associated with a
step;
• Oriented links that connect steps and transitions.
3-3
SFC User’s Manual
3-4
Creating an SFC
3-5
SFC User’s Manual
1. Create a new project, place and name the components as per the hydraulic/pneumatic
circuit you previously opened.
You can copy and paste the components onto your new diagram.
The previous circuit is used to move a load from level 1 to level 2 and drop that load into the
left or right side bin depending on its weight. The load is first brought into the circuit with the
extension of cylinder 1. It is then brought to level 2 with the extension of cylinder 2. The
rotation direction of the motor will then determine into which bin the charge will be dropped.
3-6
Creating an SFC
Note that a component from the SFC workshop cannot be connected to a component
from another workshop. Push buttons appearing in the figures are part of another
diagram.
3-7
SFC User’s Manual
3. In the new diagram, place the pointer where the step is to be inserted and left click.
The Step Properties dialog box appears (see Figure 3-7). For this step:
4. Make sure that the number 1 is displayed in the Number field of that step.
5. Select Initial Step in the Type list.
6. Click on the OK button.
All steps are numbered based on the first available number in the sequence.
3-8
Creating an SFC
A B
C G
D E H
F
I
L
J K
M
O
N
3-9
SFC User’s Manual
Zones Description
Two steps in the same SFC cannot have the same number.
C Number Lock If this option is selected, the number of the step will not be
modified during an automatic renumbering of the SFC. When the
number has been locked, an asterisk (*) appears at the centre of the
left side of the exterior frame.
D Type A drop-down list permits the selection of the step type. The choices
are: initial, normal, macro, in, and out.
E Associated Macro If the step is defined as being a macro step, the associated SFC that
Step Graph will activate the macro step must be defined in this zone. This field
is deactivated if the step is not defined as a macro step.
F Actions This zone is used to edit the different actions associated with the
step. Here, all of the actions associated to a step can be visualized.
This zone is deactivated for macro steps and out steps. The user
may:
• Enter multiple actions by separating them with a semicolon;
• Enter multiple actions submitted to the same condition by
separating them with a comma. (ex.: Action1, Action2,
Action3 IF Condition1);
Write action to be executed by using the variables and operators
found in the Guided Mode dialog box.
G Guided Mode This button provides the user access to the Guided Mode dialog
box. This button is greyed out for macro steps and out steps.
H New Variable Access the Add a variable dialog box. For more details on creating
variables, see the variables section in the User’s Manual.
I External link Accesses the OPC settings dialog box to create external links
(OPC, etc.). For more details on creating external links, see the
variables section in the User’s Manual.
J Unconditional This checkbox determines whether the running of the actions of the
Action step is conditional to the running state of the SFC (see section 4.18
Managing SFC States and Faults)
K Break Point When checked, this option will stop the simulation when the step
has been activated.
3-10
Creating an SFC
Zones Description
L Time Supervision This button provides the user access to the Step Time Supervision
dialog box. The sequence time is calculated from the start to the
return to the initial step.
Minimum It is possible, in this zone, to input a
Activation Time minimum step activation time default. If the
step is active for a time lesser than the time
specified, the minimum step activation time
default will be set to TRUE (ex.:
GRA_001.SEQ_MIN_FAULT)
3-11
SFC User’s Manual
B
F
A C
G
H
D
E
I
J
The Variables list in the previous table contains all of the variables in the project
associated to the SFC. See the Variables Manager in the User’s Guide.
3-12
Creating an SFC
If during simulation an SFC calls for an undefined variable, a warning message will
appear in the messages window. The simulation will be executed but the erroneous
actions, transition conditions and structured texts will all be ignored. Transitions
with no transition condition or containing erroneous transition conditions will
always be false. To bypass the transitions, use the forcing option in the contextual
menu during simulation.
Zones Description
A Number Displays the step number during edition.
B Statement This text zone is used to enter the step’s action. The statement must
follow the SFC syntax defined in Chapter 4 SFC Syntax.
C Variables This drop-down list allows the selection of variables that are global (the
entire project) or local (current diagram).
D Variable This table contains the variable names with the selected association
Name type.
Double-clicking on a variable selects the variable and adds it to the
action statement. The left hand side column displays the variable name
and the right hand side column, if this is the case, the associated
component. See the Variables Manager in the User’s Guide.
E Syntax Describes the operator selected by a left-click in the examples list, or in
the calculator.
F Syntax This check box will activate syntax analysis during edition.
(check box)
G New variable Accesses the Add a variable dialog box. For more details on creating
variables, see the Variables Manager in the User’s Guide.
H External link Accesses the OPC Settings dialog box to create external links (OPC,
etc.). For more details on creating external links, see the Variables
Manager in the User’s Guide.
I More/Less Use this button to gain access to the advanced features of the operator
calculator.
J Operators These buttons are used to enter operators in the action statement. Click
on the corresponding button to enter an operator.
3-13
SFC User’s Manual
Zones Description
Upstream Upstream transitions that have been validated will appear in the same
transitions colour as active components. It is possible to select a transition in the
list. This list cannot be modified.
Downstream Downstream transitions that have been validated will appear in the
transitions same colour as active components. It is possible to select a transition in
the list. This list cannot be modified.
3-14
Creating an SFC
A B C
F
D G
H
I
E
J
3-15
SFC User’s Manual
Fields Description
G New Variable Accesses the Add a variable dialog box. For more details on creating
variables, see the Variables Manager in the User’s Guide.
H External Links Accesses the OPC Settings dialog box to create external links (OPC,
etc.). For more details on creating external links, see the Variables
Manager in the User’s Guide.
I Upstream This button permits the visualization of the complete list of steps
Steps preceding the transition.
J Downstream This button permits the visualization of the complete list of steps
Steps succeeding the transition.
3-16
Creating an SFC
Operators that are not available for transitions appear greyed out in the calculator
zone.
3-17
SFC User’s Manual
Zones Description
A Upstream Upstream steps that have been validated will appear in the same colour
steps as active components. It is possible to select a step in the list. This list
cannot be modified.
B Downstream Downstream steps that have been validated will appear in the same
Steps colour as active components. It is possible to select a step in the list.
This list cannot be modified.
For this transition:
1. Make sure that the number 1 is displayed in the Number field of that transition.
All transitions are numbered based on the first available number in the sequence.
3-18
Creating an SFC
Use the guided mode, the variables list and calculator buttons to speed up input and
prevent syntax errors:
3-19
SFC User’s Manual
SFC is now:
3-20
Creating an SFC
Once the two Standard steps with their variables have been inserted in the SFC, create the
link. To do so:
1. Click and hold transition 3 open connection and drag it to step 4.
A new link is inserted.
2. Repeat for step 5.
The link between transition 3 and steps 4 and 5 changes to a double line.
To enlarge an AND link just add a link on another step/transition. It is also possible
to move a step or transition and use the Adjust Convergence option from the link
contextual menu.
To move an AND link, left-click on a link and move it while keeping the button
pressed.
To rearrange an AND link, select the link and choose SFC Æ Links and Branches Æ
Base Fit Redraw. The link will automatically redraw and take the shortest route
between components.
3-21
SFC User’s Manual
Do the following:
3. Add transition 4 and input T/X4.X/T#1s/ in the Conditions window of the Transition
Properties dialog box.
4. Connect steps 4 and 5 to transition 4.
5. Add step 6.
The SFC is now:
3-22
Creating an SFC
3.6.6. OR Link
To create an OR divergence or convergence, the steps or transitions must first be created.
1. Add transition 5 and insert .1-1PBNO4.M_A in the Conditions window of the Transition
Properties dialog box.
2. Add transition 6 and insert .1-1PBNO5.M_B in the Conditions window of the Transition
Properties dialog box.
3. Click and hold step 6 open connection and drag it to transition 5.
4. Repeat for transition 6.
5. Add step 7 and create a new variable named OUT_C.
6. Add transition 8 and insert T/ X8.X/T#5s/ in the Conditions window of the Transition
Properties dialog box.
7. Add step 8 and create a new variable named IN_C.
8. Add transition 7 and insert T/X7.X/T#5s/ in the Conditions window of the Transition
Properties dialog box.
9. Add an OR link from transitions 7 and 8 to step 1.
3-23
SFC User’s Manual
10. On another diagram, from the electrical controls library, select five push-button
components and name them respectively PB_1, COM_A, COM_B, M_A and M_B.
These push buttons will be used to command the SFC.
To move an OR link, left-click and keep the link button pressed, then move the link.
To rearrange an OR link, select the link and the Links and ConvergenceÆ Rearrange
Convergence option from the SFC menu. The link will automatically be redrawn and
take the shortest route between components.
To rearrange an OR link containing jumps, select the jumps and choose SFC Æ
Links and Branches Æ Base Fit Redraw. The link will automatically be redrawn and
take the shortest route between components.
3-24
Creating an SFC
3-25
SFC User’s Manual
3-26
Creating an SFC
A B C
D G
H
E
3-27
SFC User’s Manual
Zones Description
G New variable This button accesses the Add a variable dialog box. For more details on
creating variables, see the Variables Manager in the User’s Guide.
H External Link This button accesses the OPC Settings dialog box to create external
links (OPC, etc.). For more details on creating external links, see the
Variables Manager in the User’s Guide.
3-28
Creating an SFC
A
B
3-29
SFC User’s Manual
For more detail, refer to the Messages Window section of the User’s guide.
3-30
4. SFC Syntax
4.1. Introduction
A functioning SFC will treat one or more expressions, each composed of variables, constants,
numbers and operators. The syntax defines the rules that must be respected for the
identification of symbols and the writing of expressions.
This chapter presents a detailed description of syntax while using SFC components, symbols
and processes. The following subjects are discussed:
• Identifier Nomenclature;
• Variables;
• Constants;
• Real and Integer Expression Operators;
• Boolean Expression Operators;
• Edge Detecting Operators;
• Relational Operators;
• Operator Priority;
• Assignment;
• Syntax Verification;
• Examples of Action-Steps;
• Example of A Transition;
• Structured Texts;
• Comments;
• Timing;
• Managing SFC State;
• Managing SFC Faults;
• Forcing Order.
4-1
SFC User’s Manual
4.2.1. Steps
When inserting a new step, the software will automatically assign to it a new number to it
within the 1 to 999 range. Each step will then have a unique number in an SFC.
By convention, if n represents the step number, the variable Xn.X represents the logical state
({inactive, active}or {0,1}) of step n. For example, X2.X represents the logical state of step 2.
4-2
SFC Syntax
The logical state of a step can be used in a logical expression by using its name Xn.X. If it is
used in another SFC, the logical state is given by “SFC_Name.Xn.X”.
In the same fashion, Xn.T will return the amount of milliseconds of time that have passed
since the last step activation. This value can be compared to other values with the help of the
operators.
Actions associated to a step are processed in the same order as they are declared.
However, if more than one step or structured text from multiple SFCs affects the
same variable, they are executed after the actions of the last SFC.
4.2.2. Transition
When a new transition is inserted in an SFC, the software automatically assigns a transition
number within the 1 to 999 range. Each transition will have a unique number within an SFC.
By convention, if n represents the number of a transition then the variable Yn.Y represents the
logical state of the transition ({Validated and passable, not validated}or {0,1}). For example,
Y2.Y represents the logical state of transition 2.
The “=1” notation associated to a transition indicates that the transition condition is
always TRUE;
4-3
SFC User’s Manual
By convention, the structured text is named STn, where n is the number of the structured text.
• Structured texts are processed in the order that they are numbered after the normal steps
of the SFC have been executed.
4.2.4. Comments
When a comment is inserted, the software will automatically assign to it a number within the
1 to 999 range. Each comment in the same SFC will have a unique number.
4-4
SFC Syntax
When you insert actions and transitions, the expressions they contain will be
displayed using a different colour if the expressions are not syntactically correct. See
Chapter 4-13 Syntax Error Prevention.
4.3. Variables
4.3.1. Variable Types
The variable type depends on the information it contains. Variable types are presented with
the Variables Manager in the User’s Manual. The following table lists the possible variable
types that can be used for internal logic.
Variable type Description
Boolean variable The value of a Boolean variable can either be 0 or 1, TRUE (ON), or
BOOLEAN FALSE (OFF).
Integer INTEGER This variable’s value is a whole number in the -2,147,483,648 to
+2,147,483,647 range.
Real variable This variable’s value is a real number as per IEC 559.
REAL
Time variable This variable’s value is a time duration in the following format:
TIME T#3d_18h_4m_15s_23ms where
d = days
h = hours
s = seconds
ms = milliseconds
4-5
SFC User’s Manual
4.4. Constants
Constants are fixed values that can be of the same type as variables.
4-6
SFC Syntax
automatically. The following table describes operator category, operand type and, if needed, a
brief description and/or example.
Operator Description and example
ABS Absolute value, real or integer
ABS(Ls1)
SQRT Square root, real numbers only
SQRT(Ls1)
LN Napierian logarithm, real numbers only
LN(Ls1)
LOG Base 10 logarithm, real numbers only
LOG(Ls1)
EXP Natural exponent, real numbers only
EXP(Ls1)
SIN Sine, real numbers only
SIN(Ls1)
COS Cosine, real numbers only
COS(Ls1)
TAN Tangent, real numbers only
TAN(Ls1)
ASIN Arc sine, real numbers only
ASIN(Ls1)
ACOS Arc cosine, real numbers only
ACOS(Ls1)
ATAN Arc tangent, real numbers only
ATAN(Ls1)
** Exponent, real or integer
Ls1 ** Ls2
4-7
SFC User’s Manual
4-8
SFC Syntax
4-9
SFC User’s Manual
4-10
SFC Syntax
Operator Description
AND Logical AND between strings or Boolean values.
E.g.: ls1 AND ls2
NOT Negation of a string or Boolean value
E.g.: NOT ls1
4-11
SFC User’s Manual
4-12
SFC Syntax
The only way to override these priorities is by using parenthesis. In that case, the expression
that is within the most parenthesis has the highest priority.
In this example:
• COIL is a Boolean variable that is global to the project;
• When step 4 is activated, COIL becomes TRUE and will retain that value until step 4 is
deactivated.
• When step 4 is deactivated, COIL returns to FALSE.
4-13
SFC User’s Manual
In this example:
• Variables A, B, C, D, and E are real numerical variables.
• When step 4 is active, variable A is assigned the value of the expression ( B + C ) / D.
• Variable A keeps the last value of ( B + C ) / D when step 4 is deactivated.
• When step 5 is active, the variable E is incremented by 1.
In this example:
• When step 4 is active the state of the Boolean variable COIL is the same as the state of
the R_TRIG(X1.X) expression;
• When step 4 is inactive, the Boolean variable COIL is FALSE.
4-14
SFC Syntax
In this example:
• When step 6 is active, variable B equals 3 if the expression NOT COIL is TRUE.
• When step 6 is inactive, B keeps its last value.
In this example:
• Variable A equals TRUE when step 5 is active and keeps this value after the deactivation
of step 5.
• Variable A equals FALSE when step 10 is active and keeps this value when step 10 is
deactivated.
4-15
SFC User’s Manual
If the Apply Colours to Syntax Elements is not checked, no syntax checking will be
performed during edition. However, if syntax is incorrect, it will be displayed in the same
colour as a faulty component on your SFC.
4-16
SFC Syntax
4-17
SFC User’s Manual
4-18
SFC Syntax
4.16. Comments
Comments are associated to the SFC in which they are declared.
Up to 999 comments can be inserted anywhere in an SFC.
4.17. Timers
There are four (4) types of timers:
• On-delay timer (T/, TON/).
• Off-delay timer (TOF/).
• Pulse delay timer (TP/).
• Step elapsed time (Xn.T).
Timers are Boolean operators that take time into consideration (delay, wait state, etc.). They
are written in the following forms « T/En/timelength/ », « TON/En/ timelength / », « TOF/En/
timelength /», « TP/En/ timelength / » where:
• T/ or TON/ or TOF/ or TP/ is the timer operator;
• En is the input variable, the name of the step or variable that will start the timing process;
• Timelength is a numerical variable specifying the duration of the countdown.
E.g.: T#3j21h45m30s454ms.
4-19
SFC User’s Manual
If during simulation the variable Var_a is activated, timing is started, the Boolean expression
“T/Var_a/ T#3s /” becomes FALSE, the Boolean expression “T/NOT Var_a / T#3s/”
becomes FALSE and the Boolean expression “NOT( T/Var_a / T#3s /)” becomes TRUE.
Three seconds following the activation of Var_a the Boolean expression “T/Var_a/T#3s/”
changes state from FALSE to TRUE and “NOT(T/Var_a/T#3s /)” from TRUE to FALSE.
They will both keep their values until the next deactivation of Var_a.
If, during the timing process, Var_a is deactivated, the timing is stopped and the Boolean
expressions “T/ Var_a /T#3s/” and “NOT (T/ Var_a / T#3s /)” change values respectively to
FALSE and TRUE.
Timers can be used to define delayed or time limited actions.
4-20
SFC Syntax
• Step 2: The Stop variable becomes TRUE if the variable Var_b remains activated for 3
seconds. Once step 2 is deactivated, the variable Stop becomes FALSE;
• Step 3: The variable Stop becomes TRUE if Var_b remains inactivated for 3 seconds.
Once step 3 is deactivated, the Stop variable becomes FALSE.
4-21
SFC User’s Manual
Moteur is TRUE until Var_a remains activated for 3 seconds. Moteur then changes to
FALSE. Once Var_a is deactivated, Moteur changes back to TRUE.
4-22
SFC Syntax
When the timer is no longer energized (Var_a), the timer will become inactive only if the
preset time has been reached. In this case, the counter is reset to zero (0) if the timer is
inactive and no longer energized.
4-23
SFC User’s Manual
Step timers can be used to defined delayed actions; time limited actions, transitions conditions
or action conditions with the help of the relational operators. E.g.:
4-24
SFC Syntax
4-25
SFC User’s Manual
Macro step SFCs cannot have sequence-running monitoring because they do not
have initial steps.
To monitor sequence time, an SFC must have only one initial step.
4-26
SFC Syntax
It is therefore possible for the user to use the states and faults to manage the running (RUN),
the initialization and/or the forcing states of the SFC. Example:
GRA_001.ESC IF EMRGENCY_STOP
GRA_001.RUN := NOT GRA_001.GEN_FAULT AND CONDITIONS
GRA_001.INIT := NOT GRA_001.GEN_FAULT AND PB_REARM
If these faults are used, it is important to foresee a mechanism so that the user can be warned
of the faults and can acknowledge them. It is possible to use a call light to warn and a push-
button to acknowledge.
For example, two structured texts of an SFC can perform the following actions:
• Signalling faults:
LT_AL_GRA_001 IF GRA_001.GEN_FAULT
• Acknowledging faults:
GRA_001.STEP_MAX_ACK_ACK,
GRA_001.STEP_MIN_ACK_ACK,
PB_ACK_ACK _GRA_001
GRA_001.SEQ_MAX_ACK_ACK,
GRA_001.SEQ_MIN_ACK_ACK IF
4-27
SFC User’s Manual
1 T/X1.X/T#1s/
2 M1
M1 is the Macro step SFC that explodes the
macro step 2 B0
2 a1 =1 AND b0 =1 2 M_A
3 B1 IF COM_B
3 a1 =1 AND b1 =1
24
The Y2 transition of the GRA_004 SFC can be passed if
step X2 of SFC GRA_004 is active AND step Step X24 of the M1 SFC is deactivated when the
X24 of the M1 SFC is active AND the condition of Y2 transition of the GRA_004 SFC is passed
transition Y2 of the GRA_004 SFC is TRUE
4-28
SFC Syntax
In this case, the SFC is forced and only steps 4 and 10 are active.
4-29
SFC User’s Manual
In this example, the SFC is forced so that only steps 4 and 10 are active as long as the Stop
variable is TRUE.
In this example, SFC GRA_001 is forced to an empty situation so that all of its steps are
deactivated. To reactivate the initial step, the SFC must be reinitialized (GRA_001.INIT).
4-30
SFC Syntax
LEVEL SFC
0 G0 G1
1 G2 G3
2 G4 G5
3 G6
4 G7
5 G8 G9
6 G10
Level SFC
0 G0 G1
1 G2 G3
2 G4 G5
3 G6
4 G7
5 G8 G9
6 G10
4-31
5. Simulation
This chapter regroups the particularities associated to the simulation of SFCs. Its purpose is to
familiarize the reader with the simulation mode of the workshop. For the various commands
related to the simulation of a project or a schematic, see the simulation functions in the User's
Guide.
5-1
SFC User’s Manual
An active macro step is displayed as a red rectangle in the upper part of the step symbol.
An active macro step, while the exit step of a macro step SFC is active, is displayed as a red
rectangle in the lower part of the step symbol.
The entry step of a macro step SFC is activated simultaneously with the macro step
of the parent SFC. It consists in fact of an implicit AND divergence.
5-2
Simulation
The exit step of a macro step SFC is deactivated simultaneously with the macro step
of the parent SFC. It consists in fact of an implicit AND convergence.
When a step with a break point is activated, the simulation is suspended including all
concurrent temporizations. When the step number is locked, it is not renumbered if
the renumbering function is executed.
The validation of a transition is a very ephemeral state that can only be visualised
through a step by step simulation.
The variables manager makes it possible to visualise in real time the current value of
each variables of an SFC. See the Variable Manager in the User’s Guide.
5-3
SFC User’s Manual
Sequence duration surveillance can only be applied to SFCs designed with only one
initial step or, in the case of macro steps, with only one entry step. Also, the initial
step has to be numbered with the no. 1 step in the SFC.
5-4
Simulation
SFC_Name.SEQ_MIN_ACQ_MEM IF SFC_Name.SEQ_MIN_ACK
OR
(SFC_Name.SEQ_MIN_ACQ_MEM
AND SFC_Name.SEQ_MIN_FAULT)
Detection of the minimum sequence duration fault.
SFC_Name.SEQ_MIN_FAULT IF: (SFC_Name.RUNNING AND NOT
SFC_Name.SEQ_TMIN_Q AND X01.X
AND NOT INIT)
OR
(SFC_Name.SEQ_MIN_FAULT AND
NOT
SFC_Name.SEQ_MIN_ACQ_MEM)
For visual acknowledgement purposes, this fault can be assigned to a display light in
the Electrical workshop. This assignation can be done inside an SFC or a structured
text.
5-5
SFC User’s Manual
For visual acknowledgement purposes, this fault can be assigned to a display light in
the Electrical workshop. This assignation can be done inside an SFC or a structured
text.
5-6
Simulation
5-7
SFC User’s Manual
For visual acknowledgement purposes, this fault can be assigned to a display light in
the Electrical workshop. This assignation can be done inside an SFC or a structured
text.
5-8
Simulation
For visual acknowledgement purposes, this fault can be assigned to a display light in
the electrical workshop. This assignation can be done inside an SFC or a structured
text.
The external security condition ESC can be assigned inside an SFC or structured
text.
5-9
SFC User’s Manual
5-10