Академический Документы
Профессиональный Документы
Культура Документы
TABLE OF CONTENTS
January 1997 i
CONTENTS CG39-27
LIST OF FIGURES
3-1 Step Flag and Step Time Variables Used Within a Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
4-1 Transition Using Structured Text Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
4-2 Transition Using Transition Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
4-3 Algorithm List Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
4-4 Variable Declaration Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
LIST OF TABLES
ii January 1997
CG39-27 CONTENTS
Moore Products Co. assumes no liability for errors or omissions in this document or for the application and use of information
included in this document. The information herein is subject to change without notice.
The Moore logo, APACS, the APACS logo, QUADLOG, and 4-mation are trademarks of Moore Products Co.
All other trademarks are the property of the respective owners.
iv January 1997
CG39-27 INTRODUCTION
1.0 INTRODUCTION
This Guide provides reference information for the Sequential Function Chart (SFC) language of the 4-mation
configuration software. It is intended to be used in conjunction with the configuration procedures located in
Using the 4-mation Configuration Software (document number CG39-20).
C Section 1, Introduction
C Section 3, Steps
C Section 4, Transitions
1.1 DESCRIPTION
The Sequential Function Chart (SFC) language is one of the four configuration languages of 4-mation.
Sequential Function Charts (SFCs) are recommended for batch applications since they provide the ability to
configure a sequential process using a graphical top-down design. SFC elements are also used to partition
and, therefore, organize DFBs and UDFBs into a set of steps and transitions.
Document categories can be identified by the prefix (e.g. CGxx-xx) of the document number as listed here:
The following 4-mation and other APACS literature is available from Moore Products Co. Generally, all
needed documentation is supplied with your system. Refer to it as needed or as directed in text.
C Initial Steps
C Steps
C Transitions
C Simple Structured Text Statements (considered part of the transition)
C Actions
C Branches
C Comments
Initial Step
Step Non-boolean Action Boolean Action
The elements shown in Figure 2-1 form a representative SFC which can be used for reference purposes.
Individual SFC elements are detailed in the subsections to follow.
3.0 STEPS
A step is an SFC element that is used to associate a set of action blocks with a set of transitions. The set of
action blocks are connected to the right of the step element. This set may be empty when no action blocks are
shown attached to the step. The set of transitions are connected to the bottom of the step element. This set
may be empty if this is the last step of a non-loop chart.
Each step has a name which is displayed in the center of the step block. The step name is a 16 (maximum)
character identifier that must be unique for all connected steps. When a step is created the 4-mation software
will automatically generate a step number of the form:
S***
where:
*** is a three digit number that starts at 000 and is incremented
for every step placed within a sheet.
A step name may be edited by selecting the cell containing the step, then modifying the name in the edit line
at the top right hand side of the window.
Each step has a step flag represented by a boolean logic value that denotes the state of the step. This boolean
variable has a TRUE state when the corresponding step is active, and a FALSE state when it is inactive. The
name of the step flag variable is:
ChartName.StepName.X;
where:
ChartName is the name of the SFC that contains the step
StepName is the name of the step.
Similarly, each step has a step time represented by an associated time variable, StepName.T. This time
variable is of data type TIME and will contain the time elapsed since the step was made active. When a step
is deactivated, the value of the elapsed time will remain at the value it had when the step was deactivated.
The name of the step time variable is:
ChartName.StepName.T;
where:
ChartName is the name of the SFC that contains the step
StepName is the name of the step.
The step flag and step time are local variables in the DFB, UDFB or Program in which the step appears. A
step flag, or step time variable can be used directly anywhere within the SFC sheet, as shown in Figure 3-1, or
anywhere within the parent DFB or UDFB.
In CHART_1, the transition from STEP1 to STEP2 is based on the Step Time of STEP1 in CHART_1. In
CHART_2, the transition from STEP1 to STEP2 is based on the Step Flag of STEP1 in CHART_1.
CHART_1 CHART_2
:= TRANSIT1 := TRANSIT2
STEP1 STEP1
STEP2 STEP2
FIGURE 3-1 Step Flag and Step Time Variables Used Within a Chart
Each SFC will have exactly one initial step. In addition to all of the properties of other steps, the initial step
for an SFC is the step that will become active when the SFC is reset.
The name of an SFC is the name of its initial step. In order to highlight this difference between initial steps
and other steps, the default name for initial steps are generated of the form:
CHART***
where:
*** is a three digit number that is incremented for each chart in the same DFB,
UDFB, or program.
NOTE
Initial steps include all the properties of generic steps so they can have actions blocks associated with them.
These actions become active as soon as the chart is both active and in one of the modes that allows actions to
execute.
4.0 TRANSITIONS
A transition, as shown here, establishes the condition that needs to be satisfied before an SFC will evolve
from one step to another. Transitions require two cells. The first contains the graphic element, the second
contains the transition condition. The transition condition may be edited by clicking on either cell of the
transition, then editing using the edit line at the top right side of the screen.
:= TRUE
If the transition condition cannot be displayed in a single cell, it will display out to the right. If another
element is encountered before all of the transition condition can be displayed, the ending of the transition
condition is displayed preceded with ...
When a transition is created, 4-mation automatically defaults the transition condition to := TRUE.
Transition conditions are only evaluated if all of the steps that precede the transition are active.
A transition condition can be expressed using a boolean expression written in Structured Text (ST) language.
This expression must always start with the assignment operator :=.
If control was to be passed from one step to another only when variables A and B were both TRUE, for
example, the ST expression would be as shown in Figure 4-1.
:= A & B
The variables used in the ST expressions can also include the step flag, the step time, the action flag,
or the action time.
Examples:
:= CHART_NAME.STEP_NAME.X
:= CHART_NAME.STEP_NAME.T >= T#0d0h1m0s0ms
:= ACTION_NAME.Q
:= ACTION_NAME.T > T#0d0h0m30s0ms
Inversion of the transition expression is performed using NOT or a - sign. For example, to only
proceed to the next step if the Boolean variable PMP200 is FALSE, use := NOT PMP200" or := -
PMP200".
After a ST transition condition has been edited it will be validated. If the transition condition is a
valid ST Boolean assignment statement, it will be written to the Sheet. However, when the ST
transition is written it may be reformatted. The reformatting attempts to show the assignment
statement with the fewest number of characters. Included in this reformation is the replacement of
the NOT operator with the - operator. The & operator replaces the AND operator. Extra spaces are
removed as well as parenthesis where they are not strictly required to establish precedence (see Table
6-1 for precedence ordering).
A transition condition can be represented by a separate Sheet. In this case the transition condition is
a transition name (maximum 16 characters). The transition name refers to a separate Sheet whose
evaluation results in the assignment of a Boolean value to the transition name. That is, the separate
Sheet must write a Boolean value to a Boolean variable with the same name as the transition name.
The separate Sheet may be defined using Ladder Logic Diagrams, Function Block Diagrams
(Standard Function Blocks only), or Structured Text. This Sheet, however, may not contain other
SFCs, Actions, User Defined Function Blocks, or Derived Function Blocks. Figure 4-2 illustrates
the use of transition names.
TRANS78
( )
TRANS78
IMPORTANT
If the transition name does not exist, an Algorithm List dialog box will open as shown in Figure 4-3.
The transition name entered on the sheet will already be displayed in the Name edit box, however, the
Create option button must be selected to actually create the transition. A Variable Declaration dialog
box opens so the variable can be ADDed to the list. This variable is the Boolean variable that the
additional sheet must result in to assign the transition a value. The transition name may be up to 16
characters and may be upper or lower case. Note that 4-mation is case sensitive. The Variable
Declaration dialog box is shown in Figure 4-4.
00001097
SG13021.DS4
FIGURE 4-4 Variable Declaration Dialog Box
The Delete option button will eliminate the currently selected transition within the Algorithm List
dialog box only if the selected transition is not currently being used on a sheet.
The Rename option button will change the name of the currently selected transition within the
Algorithm List Box to the name entered in the Name Edit Box only if the selected transition is not
currently being used on a sheet.
All of the transition names (not Structured Text expressions) in the current DFB or UDFB will be
displayed in the Algorithm List box when the Transition option button is selected.
Once the transition name is defined and the sheet is downloaded, the contents of the transition can be
specified by double-clicking on the transition name with a mouse, or using the View, Body menu
item. The desired transition language type (Function Block Diagram, Ladder Logic Diagram or
Structured Text) is then selected.
The local scope of an Action is carried over to the variables. An Action shares the local variable list of the
Program Organization Unit (POUs include DFBs, UDFBs and programs) in which the Action is defined.
That is, all variables defined in an Action are in the local variable list of the POU, and any variable defined in
the POU may be used in the Action. Input and outputs of the POU are also available to the Action.
Each Action has an action flag represented by a Boolean variable, that denotes the activity of the Action.
This Boolean variable has a TRUE state when the corresponding Action is active, and a FALSE state when it
is inactive. This variable can be placed on a function block sheet or a ladder logic sheet for display or use,
however, the sheet must be local (or on the same hierarchical level) as the SFC. For example, the action flag
can be displayed or used inside another Action being configured as function block or ladder logic. The name
of the action flag for a specific Action is:
ActionName.Q
where:
ActionName is the name of the Action.
Similarly, each Action has an action time represented by a time variable. This time variable is of data type
TIME and will contain the time elapsed since the Action was made active. When an Action is deactivated,
the value of the elapsed time will remain at the value it had when the Action was deactivated. Action time
will be zero if the Action has never been active and for the first scan that an Action is enabled. Certain action
qualifiers (see Section 5.3) also have zero action time. The action time can be used in the same manner as the
action flag. The name of the action time variable for a specific action is:
ActionName.T
where:
ActionName is the name of the Action.
In order to utilize an Action, an action block must be placed on the sheet. An action block associates the
Action with an action qualifier and an enabling condition. An Action may be associated with many different
action blocks within a single POU. Before any Action can be executed, the status of all of the action blocks
on a Sheet must be determined. This means that the execution of an Action cannot be determined by where
an action block is placed. It must be assumed that any variables changed within the Action are not available
until the next scan of the sheet.
Action blocks may have either no input nubs, or a single input nub. The input nub is used to connect a
boolean expression or variable to be the enabling condition for the action block. In the SFC language, this
nub will be connected to a step. This means that the step flag is used as the enabling condition. In the
function block language, this nub may be connected to a boolean output of any function block, a boolean
variable, a boolean constant (TRUE or FALSE), or even a structured Test (ST) expression that evaluates to a
boolean. Also, in the function block language, the value of this input nub is passed through to an output nub.
An action block with no input nub must be placed underneath an action block with an input nub. An action
block with more than one input must be placed underneath so they form an unbroken stack of action blocks.
All action blocks placed in this manner will share a common enabling condition. No input action blocks
placed above such a stack are not considered part of the stack. If an action block with an input nub is placed
in such a stack, the stack is considered split at the point this action block is placed. All of the Actions above
this Action are in one stack and all of the Actions after this block, and including this block, are in a different
stack.
There are two types of Actions: Boolean actions and non-Boolean actions as described in the following
subsections..
Boolean Actions perform a setting or resetting operation on the Boolean variable created by the Action. All
information required is visible in the Boolean action block as shown in Figure 5-1 (i.e. no additional sheet, or
a body, is required).
a b
The a field holds the action qualifier and the b field holds the name of the boolean variable. For
example: If the purpose of this Action is to turn a pump on, the action qualifier would be N and the boolean
variable may be PMP101. This Action will set the variable to TRUE while the input to the action block is
TRUE.
Non-Boolean Actions allow very detailed portions of a configuration to be specified on a separate sheet in
any of the four configuration languages. Complex batch processes, for example, may not be able to fit every
detail of the sequence on one Sheet. To organize the sequence, the batch can be broken down into several key
steps. These steps in turn will activate Actions, and these Actions can, themselves, contain sequential
function charts, structured text, ladder logic diagrams or function block diagrams.
A non-Boolean Action, as shown in Figure 5-2, is similar to a DFB or UDFB, in that it is configurable in any
language. The key difference between them is that Actions are only executed when the Action is active.
DFBs or UDFBs are executed every controller scan. The fact that the action body is not always being
executed is important from both a control and computing capacity point of view. Control strategies that are
to be executed only under certain circumstances can be placed in an action body. Emergency shutdowns, for
example, should only be performed under certain conditions, such as alarms or failures. The conditions, as
well as the body of the non-Boolean Action are completely configurable.
a b c
The a field holds the action qualifier and the b field holds the name of the action body. Lastly, the c
field holds the name of a Boolean feedback variable. The Boolean feedback variable is optional since it is
used only for documentation purposes. The feedback variable is typically, but not necessarily, one of the
variables within the action body. Although this field is optional, the on-screen graphical symbol will always
include the c field. Creation of an action body is described in Using the 4-mation Configuration
Software (document number CG39-20).
CAUTION
Several examples of action blocks are presented in Figure 5-3. An action block can also be used as a
graphical element in either the sequential function chart, or function block language. Examples are shown in
Figure 5-4.
In the example shown in Figure 5-4, the value of PMP100 AND PMP200" is passed directly to the variable
OK1.
N COLD_WATER_VLV
S FILL_TANK_ACT
R FILL_TANK_ACT DONE
AND
PMP200 IN02
Associated with each action block is an action qualifier. The combination of an action qualifiers and enabling
conditions for all action blocks determine if an Action is to be executed. There are nine action qualifiers, as
shown in Table 5-1.
QUALIFIER EXPLANATION
N Non stored
S Set (stored)
R Overriding reset
P Pulse
L Time limited
D Time delayed
Five qualifiers require a time value to be evaluated. This time value is considered part of the qualifier.
Descriptions of how action qualifiers combine with enabling conditions for enabling Actions is presented in
the following subsections. In these descriptions:
T - Represents the length of time specified by the time value. This time value can be either an constant
or a time variable. If it is a time variable, the value is read and stored when the action block input
becomes TRUE.
When using the S, SL, SD, and DS action qualifiers, the qualifier must be used before the Action can be
enabled again. Note the qualified action block references the same action body as the S, SL, SD or DS action
block. Diving into (Double-clicking or using View, Body) the action body from either action block will show
the same Sheet. Editing the action body from either action block will have exactly the same effect.
5.3.1 N (Non-Stored)
The N (Non-Stored) qualifier determines that the Action is active only when the block input is TRUE as
shown in Figure 5-5.
Example:
It is desirable to perform ACTION_1 only when ALM1, ALM2, and ALM3 are all high. As soon as one of
the alarms clears, stop executing ACTION_1.
5.3.2 S (Set-Stored)
The S (Set-Stored) qualifier determines that the Action becomes active when the action block input becomes
TRUE as shown in Figure 5-6. The Action will continue being executed even after X has become FALSE. In
order to stop the execution of the Action, the input to an R qualified action block that references the same
Action (R) must become TRUE. If R never becomes TRUE, the Action continues to execute indefinitely.
Example:
Open water valve (WATER_VLV) for 5 seconds, THEN start MIXER. After mixer runs for 1 minute,
THEN close the water valve.
The use of the step time variable as a successor transition condition guarantees that: the previous step stays
active for a set amount of time.
WASH_MIXER
: = TRUE
STEP1 S WATER_VLV
: = WASH_MIXER.STEP1.T>=T#0d0h0m5s0ms
STEP2 N MIXER
: = WASH_MIXER.STEP2.T>=T#0d0h1m0s0ms
STEP3 R WATER_VLV
5.3.3 R (Overriding-Reset)
The R (Overriding-Reset) qualifier determines that the Action becomes inactive when the action block input
becomes TRUE, as shown in Figure 5-7. The R qualifier may be used for any active Action and must be used
if the last Action enabled action block involved as store (S, SL, SD and DS) before the Action can be enabled
again. If the R qualifier is used with a boolean variable, the boolean variable is set to FALSE even if no
other action block had set it TRUE.
5.3.4 P (Pulse)
The P (Pulse) qualifier determines that the Action is active for the single scan in which the block input
transitions from FALSE to TRUE as shown in Figure 5-8. For additional details, refer to Using the
4-mation Configuration Software (document number CG39-20).
Example:
Initialize a PID block.
STEP3 P FIC100_INIT
The L (Time Limited) qualifier determines that the Action becomes active when the action block input
becomes TRUE as shown in Figure 5-9. When either a set length of time T has elapsed, or when the block
input turns FALSE, the block becomes inactive.
Q
T T
Example:
When the level (LT300) is equal to or greater than 30 feet, open the solenoid valve VLV300 for 30 seconds
(T#0d0h0m30s0ms), or until the level falls below 30 feet, whichever is shorter.
L
%LT300 >= 30.0 %VLV300
T#0d0h0m30s0ms
The SL (Stored & Time Limited) qualifier determines that the Action becomes active when the action block
input turns TRUE, as shown in Figure 5-10. After a set length of time has elapsed, or an R qualified action
block that references the same Action becomes TRUE, the Action is disabled. Before this action block can be
used again, an R qualified action block must be used. If this is not done, the Action cannot be enabled.
Q
T T
Example:
When the level (LT300) is equal to or greater than 30 feet, open the solenoid valve VLV300 for 30 seconds,
or until the level is equal to or less than 20 feet, whichever is shorter.
The D (time Delayed) qualifier delays the enabling of an Action for a set time after the action block input first
turns TRUE, as shown in Figure 5-11. The Action is only enabled until the input becomes FALSE.
Q
T T
Example:
Open the solenoid valve immediately but do not start the pump until 20 seconds later in order to avoid
cavitation. Only keep the pump running until the STOP button is pressed (successor transition is TRUE).
STEP6 S %VLV300
D %PMP300
T#0d0h0m20s0ms
:= STOP
STEP7 N ACTION_7
The SD (Stored &Time Delayed) qualifier delays the enabling of an Action for a set time after the action
block input first turns TRUE, as shown in Figure 5-12. The Action stays enabled until an R qualified action
block that references the same Action becomes TRUE.
Before this action block can be used again, an R qualified action block must be used. If this is not done, the
Action will not be enabled.
Q
T
Example:
When the level (LT300) is equal to or greater than 30 feet, open the solenoid valve immediately but do not
start the pump until 20 seconds later in order to avoid cavitation. Keep the pump running until the level is
equal to or less than 20 feet.
SD
%PMP300
T#0d0h0m20s0ms
%LT300<=20.0 R %PMP300
The DS (Delayed & Stored) qualifier delays the enabling of the Action for a set time after the action block
input first becomes TRUE, but the input must remain TRUE for the set time in order for the Action to be
enabled, as shown in Figure 5-13.
Once enabled, the Action stays enabled until an R qualified action block that references the same Action
becomes TRUE.
Q
T T
Example:
When the level (LT300) is equal to or greater than 30 feet, open the solenoid valve VLV300 immediately.
Start the pump 20 seconds later (in order to avoid cavitation) ONLY IF the action block input is still TRUE.
Keep the pump running until the level is less than or equal to 20 feet.
DS
%PMP300
T#0d0h0m20s0ms
%LT300<=20.0 R %PMP300
Action blocks can be placed anywhere on a function block diagram, however, the input to an action block
must be a boolean value (a function block output, a boolean variable, or a boolean constant). The state of the
boolean input is propagated to the connecting output wire.
N MOTOR_OFF STOP
Note that the action block at the top of the stack (MOTOR_ON) is displayed with an output. The stacked
action blocks (MOTOR_OFF) below the top block, however, do not have outputs (see section 5.6).
The action blocks are obtained in the Function Block language by selecting the NEXT [F10] Icon from the
main Icon Bar, and then selecting the ACTIONS [F7] Icon from the next Icon Bar. See Figure 5-14.
It is permissible for an action block to be present on a Function Block Sheet, yet not be connected to a
Function Block or a Boolean variable. Action Blocks that are not connected to anything, however, will never
be executed.
Icon Bar
Icon Bar
Icon Bar
00001117
Each step in a sequential function chart (SFC) is capable of having an associated Action or Actions. The
Action associated with a step is shown within an action block to the right of the step that is connected to the
step by a line. This is shown in Figure 5-15. Note that the action blocks do not have outputs when being used
in SFCs.
S3 N MOTOR_ON START
N MOTOR_OFF STOP
The action blocks are obtained in the SFC language by selecting the ACTIONS [F5] Icon from the main Icon
Bar, as represented in Figure 5-16.
It is permissible for an action block to be present in the SFC language, yet not be connected to a step. Action
blocks that are not connected to steps, however, will never be executed.
Icon Bar
00001118
Action blocks located on either function block diagrams or sequential function chart networks can be
concatenated - meaning that more than one Action can accept the same boolean input value.
These Actions are stacked and can be moved to or placed anywhere on the sheet as long as the input is
connected to a block or step. Refer to the example of concatenation in Figure 5-15. If an action block is
removed from the middle of a stack, then the action blocks below it will cease to be associated. Another
action block must be manually inserted or the disassociated Actions must be repositioned.
Action blocks used for concatenation do not have inputs and must therefore be restricted to selections [F2]
and [F4] on the action block Icon Bar, as shown in Figure 5-17.
Icon Bar
00001119
When Actions are concatenated, the stacked Actions have multiple feedback variables, but only a single
boolean input variable which acts simultaneously on all of the concatenated blocks.
Executing an Action is not the same as executing an action block. Each action block is executed every scan in
the same order as any other graphical element. Executing an action block involves examining the action
qualifier and the enabling condition, and setting the action flag. After thesSheet or SFC network has been
completely evaluated, these action flags are examined to determine which Actions are to be executed.
There are two phases of Action execution. The first phase is known as action post-scan. During action,
post-scan Actions that have just this scan been disabled, are run. For Boolean Actions, it is during this post-
scan execution that the boolean variable is set from TRUE to FALSE. Non-Boolean Actions can use this
scan for executing resetting logic. This execution is marked by the action flag value being FALSE. After all
Actions that require post-scan have been executed, enabled Actions will be executed.
IMPORTANT
When action blocks are used within SFCs or within action bodies, additional terms are added invisibly to the
enabling conditions. Certain SFC modes, TRACE and OFF, force all action block enabling conditions within
the SFC to FALSE. The enabling conditions for action blocks within an action body that is disabled is set to
FALSE. This particular rule is important for understanding what may happen while post-scanning an Action.
Actions should be created to accomplish a single highly coherent purpose. If this is done, then Actions will
be independent of each other. This independence is important since Actions do not affect the execution of
the Sheet that contains the action block that enables the Action; Actions can and do effect other Actions that
are executed subsequently. The separation of post-scan execution from normal scan execution implies that
no ordering of Action will be absolute.
In Figure 5-18, when STEP1 becomes active, STEP1.X will become TRUE and the associated Action will be
scheduled to execute after the steps and transitions have been evaluated (but during the same scan cycle).
The transition following STEP1 will not be TRUE during the scan cycle that STEP1.X became TRUE (the
transitions are evaluated before the Actions are executed). The controller will, instead, complete the scan of
the sheet that the SFC is on, then the Actions will be executed. The next scan cycle that follows will set the
transition condition := %VALVE_101 to TRUE.
CHART_1
: = TRANSIT1
STEP1 N %VALVE_101
: = %VALVE_101
STEP2 N ACTION_2
The result of one Action will, however, affect any other Actions that are executed after it. An example of
this is shown in Figure 5-19.
CHART_2
: = TRANSIT1
: = VAR_1
.
.
.
In this example, the steps and transitions will be evaluated first and the Actions will be placed in a queue The
Boolean Action VAR_1 will be evaluated before the non-Boolean Action ACTION_1. As a result, the
VAR_1 Action would affect ACTION_1 if the VAR_1 variable was utilized in the body of ACTION_1 (note
that both Actions are active during the same scan).
The scanning sequence of Actions is particularly important to keep in mind for SFCs and ladder logic.
In the on-line mode, all action blocks that are associated with active Actions will be displayed in the
configured ON color. To define the ON and OFF color, refer to Using the 4-mation Configuration
Software(document number CG39-20).
The state of the input of the action block will change based on the state of the connection to the left of the
block. The state of the action block itself, however, updates based on the state of the action flag variable.
Example:
The Action input changes from FALSE to TRUE, and the action qualifier is P (Pulse). The on-line mode will
show the value of the action block input and output to be TRUE (remember that the state of the output is the
same as the state of the input - at all times). The action block itself, however, will only indicate the ON state
for one controller scan due to the pulse action qualifier. (Since the pulse is only on for one controller cycle,
the ON state may not be visible from 4-mation.)
P (Pulse):
In on-line 4-mation, action blocks in the ERROR state are displayed in red. Errors are caused by two or more
action blocks trying to enable one Action in the same scan. To clear the error from the Main Menu Bar, select
On-Line, Clear Action Error.
This section presents an Action example. The example is to perform an emergency shutdown sequence if, and
only if, certain conditions are TRUE. The conditions to test for are: FIC200 controller in Auto mode,
ALARM1 high due to high flow FT200, AND high level LT400. Once the shutdown Action is started, it
must continue until the shutdown is complete - it must not stop when one or more of the tested conditions
clear. The shutdown procedure must not be able to restart again until the EMERG_COND has cleared.
Since the shutdown sequence is to only be executed under certain conditions and not each controller scan, the
shutdown sequence must be configured as an Action or as an SFC with the above conditions used as the first
transition condition. Two functionally equivalent solutions are shown to demonstrate the flexibility of action
blocks. Solution A illustrates conditional execution using action blocks, while solution B uses action blocks
within an SFC.
Solution A:
Since the Action is to continue executing until complete, an action qualifier is used to begin the shutdown.
The reset of the Action can be triggered when the EMERG_COND has cleared and the DONE Boolean
variable indicates that the shutdown is complete. Note that if the clearing of the EMERG_COND is not used
as a condition to restart the shutdown sequence, the EMERG_SHUTDWN sequence would be performed
continuously as long as the EMERG_COND remains TRUE - This may not be a desirable feature. Figure 5-
20 represents the function block language configuration portion.
PID_EXTSP
IN03
%LT400>= 30.0
R %VLV_400
Figure 5-21 represents the body of the Action EMERG_SHUTDWN written in sequential function chart
language.
: = DIVERTED
OPEN_VLV S %VLV_400
: = %VLV_400
FINISH P DONE
.
Solution B:
Figure 5-22 represents the function block configuration portion of the solution.
FIC200
PID_EXTSP EMERG_DOWN
COND3
%LT400>= 30.0
Figure 5-23 represents the body of UDFB EMERG_DOWN written in the sequential function chart
language.
EMERG_DOWN
: = DIVERTED
OPEN_VLV S %VLV_400
FINISH R %VLV_400
.
: = TRUE
Note that the conditions 1, 2 and 3 have square brackets around the variable names. These brackets
indicate that the variables are passed via the inputs (COND1, COND2, COND3) to the User Defined
Block. If this SFC had been created as the body of an action block, the SFC would be on the same
hierarchical level as the action block and the square brackets around the condition variables would
not be required.