Logic Developer - PC: SFC Instructions: Initial Step
Logic Developer - PC: SFC Instructions: Initial Step
SFC instructions are the building blocks an SFC is composed of. Each
instruction can be inserted in a cell with a specific tool, dragged from the SFC
drawer of the Toolchest or by typing a mnemonic when using the Quick
Edit method.
Note: Additional mnemonics are available that do not correspond directly to a single SFC
instruction.
Additional Mnemonics
The following mnemonics are also available to provide enhanced flexibility
when using the Quick Edit method.
A Branch Diverge splits a single SFC execution path into two or more optional
paths, only one of which will be executed when the SFC is solved. Each
optional path must begin with a Transition. The left Transition is evaluated
first and the left path will be executed if the Transition is True. Otherwise, the
next path to the right will be executed (if the initial Transition for that path is
True) and so on. A BD instruction can only be placed immediately after a
multiaction instruction.
Notes:
Properties
● P (Pulsed) - the action execute only once per activation of the Initial
Step it resides in.
● N (Normal) - the action executes each scan that the Initial Step it
resides in is active and executes once with negative power flow when
the Initial Step is deactivated.
A STEP variable ('Stepn') can be automatically created (if the Auto-edit option
is False) when you insert an Initial Step. A text description of the Initial Step
is associated with the STEP variable and is displayed above the instruction if
the Show Description option is True.
Notes
Tips
Variable Name
The name of the STEP variable associated with an Initial Step instruction.
+Variable
The complete set of properties for a variable.
Qualifier (1 of 4)
Specifies when the associated action will execute. If the qualifier is:
● P (Pulsed) - the action executes only once per activation of the Initial
Step it resides in.
● N (Normal) - the action executes each scan that the Initial Step it
resides in is active.
Action (1 of 4)
The name of an action included in an Initial Step.
Jump (JU)
Properties
● To choose or change the destination of the Jump click it and choose a step variable from the
smart list that appears.
● To edit a description, click it.
Jump Properties
The following properties specify the parameters for a Jump instruction.
Destination
The name of the STEP variable associated with a Jump instruction. This
functions as a specifier for the destination of the Jump. That is, execution is
transferred to the instruction associated with the same STEP variable.
Macro End (ME)
Properties
● P (Pulsed) - the action executes only once per activation of the Macro
End it resides in.
● N (Normal) - the action executes each scan while the Macro End it
resides in is active and will execute with negative power flow when the
Macro End is deactivated.
A STEP variable ('Stepn') can be automatically created (if the Auto-edit option
is False) when you insert a Macro End. A text description of the Macro End is
associated with the STEP variable and is displayed above the instruction if the
Show Description option is True.
Note: A Macro End must be the last instruction in a macro .
Tips
Variable Name
The name of the STEP variable associated with an Macro End instruction.
+Variable
The complete set of properties for a variable.
Qualifier (1 of 4)
Specifies when the associated action will execute. If the qualifier is:
● P (Pulsed) - the action executes only once per activation of the Macro
End it resides in.
● N (Normal) - the action executes each scan that the Macro End it
resides in is active.
Action (1 of 4)
The name of an action included in an Macro End.
Macro Start (MS)
Properties
● P (Pulsed) - the action executes only once per activation of the Macro
Start it resides in.
● N (Normal) - the action executes each scan while the Macro Start it
resides in is active and will execute with negative power flow when the
Macro Start is deactivated.
A STEP variable ('Stepn') can be automatically created (if the Auto-edit option
is False) when you insert a Macro Start. A text description of the Macro Start
is associated with the STEP variable and is displayed above the instruction if
the Show Description option is True.
Notes
Tips
Variable Name
The name of the STEP variable associated with a Macro Start instruction.
+Variable
The complete set of properties for a variable.
Qualifier (1 of 4)
Specifies when the associated action will execute. If the qualifier is:
● P (Pulsed) - the action executes only once per activation of the Macro
Start it resides in.
● N (Normal) - the action executes each scan that the Macro Start it
resides in is active.
Action (1 of 4)
The name of an action included in an Macro Start.
Macro Step (MA)
Properties
A Macro Step places the specified macro inline for execution in an SFC. The
macro executes (one step per scan) until a Macro End is reached. An active
Macro End repeats each scan until the Transition following the Macro Step is
True, then the Macro End is solved once with negative power flow before
execution continues with the instruction following the Transition.
A Macro Step has a STEP variable associated with it:
Tips
● To choose or change the named macro, click the macro name box.
● To choose or change the associated STEP variable, click the step name box
● To edit a description, click it .
Macro Step Properties
The following properties specify the parameters for a Macro Step instruction.
Variable Name
The name of the STEP variable associated with the Macro Step instruction.
+Variable
The complete set of properties for a variable.
Macro Name
The name of the SFC macro that is placed inline for execution by the Macro
Step.
Parallel Converge (PC)
A Parallel Diverge splits an SFC execution path into two or more paths that
will execute simultaneously (during the same scan) when the SFC is solved.
That is, the left path is solved, then the next path to the right and so on). A
Parallel Diverge must be preceded by a Transition. The first instruction on
each divergent path must be a Step or Macro Step.
Note: All paths created by a Parallel Diverge must converge.
Tip: To add an additional path (more than the two initially inserted) to a Parallel Diverge, insert
another Parallel Diverge in the cell beside the original.
Step (SP)
Properties
● P (Pulsed) - the action executes only once per activation of the Step it
resides in.
● N (Normal) - the action executes each scan while the Step it resides in
is active and will execute with negative power flow when the Step is
deactivated.
A STEP variable ('Stepn') can be automatically created (if the Auto-edit option
is False) when you insert a Step. A text description of the Step is associated
with the STEP variable and is displayed above the instruction if the Show
Description option is True.
Notes
Step properties
The following properties specify the parameters for a Step instruction.
Variable Name
The name of the STEP variable associated with a Step instruction.
+Variable
The complete set of properties for a variable.
Qualifier (1 of 4)
Specifies how the associated action will execute. If the qualifier is:
● P (Pulsed) - the action executes only once per activation of the Step it
resides in.
● N (Normal) - the action executes as each scan the Step it resides in is
active.
Action (1 of 4)
The name of an action included in an Step.
Text (TE)
The Text instruction is used to create cells in an SFC where you can type
descriptions or commentary. Any unoccupied cell can be converted to a Text
cell.
Transition (TR)
or
A Transition is a conditional instruction that determines if the preceding
instruction repeats or the following instruction is solved by the controller.
Each Transition has a BOOL variable or ST BOOL Transition logic associated
with it. The instruction following a Transition executes only if the BOOL
variable or the Transition logic resolves to ON(1). A text description of the
Transition is associated with the BOOL variable or the Transition logic and is
displayed above the instruction when the Show Description option is set to
True.
Notes
● Initial Step, Step, Macro Start and Macro Step instructions (multi-action instructions) must
be followed by a Transition.
● A Transition cannot be the first instruction in an SFC or Macro.
Tip: To choose or change the BOOL variable or ST BOOL logic assigned to a Transition, click on
the lower right of the instruction (where the variable name or Transition logic appears).
Transition Logic
Structured Text Transition logic must always resolve to a BOOL value. The
logic can also contain DINT variables or LREAL variables but not both.
Warning: Comparing LREAL values may produce unexpected results. For example, a calculation
may result in 1.99999999999, which is not equal to 2.00000000000.
Example 1
myBOOL AND myBOOL2
Example 2
NOT(myDint > myDint2 OR myDint3 <= myDint4)
Note: Transition logic can't contain:
❍ Semicolon ';'.
❍ Assignment ':=' operator.
Transition Properties
The following properties specify the parameters for a Transition instruction.
Variable Name
The name of a BOOL variable associated with a Transition instruction. If ST
BOOL Transition logic is used, a BOOL variable is automatically created and
stores the result of the Transition logic.
+Variable
The complete set of properties for a variable.
Vertical (VE)