Professional Documents
Culture Documents
User’s Guide
Triconex Corporation
A Siebe Group Company
Information in this document is subject to change without notice. Companies,
names and data used in examples herein are fictitious unless otherwise noted. No
part of this document may be reproduced or transmitted in any form or by any
means, electronic or mechanical, for any purpose, without the express written
permission of Triconex Corporation.
Glossary ................................................................................................................. 81
Index ....................................................................................................................... 85
iv
CHAPTER 1
Introduction
This chapter introduces the Cause & Effect Matrix Programming Language Editor
(CEMPLE), an optional editor in the TriStation 1131 Developer’s Workbench for
developing safety shutdown applications.The following topics are covered:
• About this manual
• Overview of CEM and CEMPLE
• User experience requirements
• Installing the CEMPLE add-on
• Document conventions
• How to contact Triconex
Chapter 1 Introduction
Overview of CEM and CEMPLE 7
answered the call. At that time, the R & D group at Triconex Headquarters in
Irvine, California was in the process of developing the leading-edge TriStation
1131 Developer’s Workbench which initially offered three standard programming
language editors as it moves toward the goal of hardware platform independence.
With the second major release of TriStation 1131, Triconex automates the CEM
methodology by adding the revolutionary Cause & Effect Matrix Programming
Language Editor (CEMPLE) to its existing suite of language editors.
CEMPLE Functionality
CEMPLE provides a matrix with two dimensions which are specifically intended
for the development of safety shutdown applications:
• Each Cause Row (horizontal dimension) maps a cause to one or more
effects.
• Each Effect Column (vertical dimension) maps one or more causes to an
effect.
In a CEM, causes are typically represented by BOOL program input variables and
effects are represented by BOOL program output variables. Once a CEM is
defined, it automatically generates an FBD program which implements the ESD
strategy.
CEMPLE Features
The main features offered by CEMPLE are:
• Invocation of pre-defined and user-defined functions and function blocks
for evaluation of cause and effect data.
• Support for up to 99 Cause Rows, 99 Effect Columns, and a maximum of
1000 active intersections in CEM
• Use of FBD as the intermediate language
• Use of CEM program instances in conjunction with FBD and LD program
instances
• Instance view monitoring with active causes, intersections and effects
displayed in your choice of colors
• Named views for specific sets of causes and effects
Chapter 1 Introduction
8 Overview of CEM and CEMPLE
CEMPLE Training
In addition to the how-to and reference material provided by this manual, Triconex
offers training classes internationally to speed the transition from manual and non-
interactive matrixes to state-of-the-art CEM programming with CEMPLE. For
information about training, please contact the Customer Satisfaction Group at
Triconex Headquarters in Irvine California. See “Technical Support” on page 12
for phone numbers.
Summary of Chapters
This manual is organized into the following chapters:
• Chapter 1, “Introduction” — Provides background information about CEM
methodology; briefly defines the CEMPLE product; lists requirements for
user experience; gives instructions for installing CEMPLE; and tells how to
contact Triconex.
• Chapter 2, “Functional Description” — Describes the main components of
CEMPLE; states the limits of CEM programs; and explains how they are
evaluated.
• Chapter 3, “CEMPLE Options & Editing Tools” — Describes the basic
options, tools and techniques that CEMPLE provides for editing of CEMs.
• Chapter 4, “Developing CEMPLE Programs” — Explains how to set CEM
default options and create CEM functions and function blocks; provides
step-by-step instructions for creating four types of matrixes; and shows how
to monitor the execution of a matrix.
• Chapter 5, “Advanced Techniques and Accessory Features” — Provides
information you need to define your own functions and function blocks;
explains how to share the values of cause state and effect state variables
elsewhere in your logic; and provides tips on using the View Manager,
viewing intermediate code and printing cross-reference listings.
• Appendix A, “CEM-Specific Error Messages” — Lists CEM-specific error
messages with causes and solutions.
• “Glossary” — Gives brief definitions of CEM-specific terms used in the
manual.
• Index
Chapter 1 Introduction
User Experience Requirements 9
Related Documents
The following Triconex manuals contain information that is relevant to the use of
CEMPLE:
• TriStation 1131 User’s Guide
• TRICON Planning & Installation Guide
• Triconex Libraries
The setup program on the CEMPLE CD installs all of the necessary components
for using CEMPLE with TriStation 1131. See the Getting Started manual for
installation instructions. Please contact Triconex for more information about the
available CEMPLE Add-on and TriStation 1131 Developer’s Workbench
products.
Chapter 1 Introduction
10 Document Conventions
Document Conventions
This manual uses the following conventions:
Chapter 1 Introduction
How to Contact Triconex 11
Regional Offices
Americas Sales & Service Middle East Sales & Service
Phone: +1-409-935-3555 Phone: +971-4-314-949
Fax: +1-409-935-3881 Fax: +971-4-314-780
European/African Sales & Service Great Britain
Phone: +33-1-34-43-26-26 Phone: +44-1753-684680
Fax: +33-1-34-43-26-27 Fax: +44-1753-686061
Asia-Pacific Sales & Service
Phone: +65-738-5488
Fax: +65-738-5188
Sales Department
Sales hours are 08:30 to 17:00 Pacific Standard Time (PST).
Sales Phone: +949-699-2107
Sales Fax: +949-768-6601
Chapter 1 Introduction
12 How to Contact Triconex
Technical Support
Before contacting Technical Support, please try to solve your problem by using
this manual or the on-line Help system for the CEMPLE programming language
editor.
Telephone
You can reach Triconex Technical Support by phone between 08:30 am. and 5:00
PST, Monday through Friday at:
• +800-325-2128
• +949-699-2100
When you call, you should be at your computer and have your documentation with
you. Be prepared to provide the following information:
• Product version number—found by selecting About TriStation 1131 in the
Help menu
• Type of computer
• Software version number of Windows NT
• Exact wording of any messages that have appeared on the screen
• What you were doing when the problem occurred
• How you tried to solve the problem
Fax
You can fax questions or comments regarding technical support to +949-768-6601.
Chapter 1 Introduction
How to Contact Triconex 13
Chapter 1 Introduction
14 How to Contact Triconex
Chapter 1 Introduction
CHAPTER 2
Functional Description
This chapter provides basic information about CEM functionality, covering the
following topics:
• Main components
• Limits of CEM programs
• How CEM programs are evaluated
16 Main Components
Main Components
The CEM editor window is divided into three panes, as shown in the illustration
below:
• Matrix
• Variable Detail Table
• FBD Network
Matrix
FBD Network
Variable Table
Matrix
CEMPLE provides a matrix with two dimensions which are specifically intended
for the development of safety shutdown applications:
• Each Cause Row (horizontal dimension) maps a cause to one or more
effects.
• Each Effect Column (vertical dimension) maps one or more causes to an
effect.
In a CEM program, causes are typically represented by BOOL program input
variables and effects are represented by BOOL program output variables. In the
FBD Network
For each Cause, active (non-empty) Intersection, and Effect in the matrix,
CEMPLE generates an FBD network. When you select a Cause, Intersection or
Effect, the FBD Network pane displays the applicable FBD network. In the
example below, the intersection of Cause Row 1 and Effect Column 1 is selected.
It invokes the TON function block, so the FBD Network displays the TON function
block and the variables that are connected to it.
Intersection
FBD Network
In the FBD Network, you can double-click variable names to bring up the
Properties dialog box, where you can change the Var Type and Data Type of
user-declared variables. See the next section called “Internal Variables” on page 18
for a description of the other variables that CEMPLE automatically declares.
Internal Variables
See page 33 for Each FBD network operates by means of internal BOOL variables which are
related definitions. automatically declared by CEMPLE. There are three kinds of internal variables, all
of which begin with underscore characters (as shown in the example below):
Open the ExCEM In the illustration that follows, network views for the first Cause Header,
project on your Intersection and Effect Header in a basic CEM show how the internal variables
TriStation 1131 operate. CEMPLE automatically moves the result of the Cause Header evaluation
CD, and display to the Cause Variable (_C01B), processed by the MOVE function, and saved in the
CemExample1 to Intersection Variable (_C01E01B). Then all of the Intersection Variables in the
see these networks.
column are OR’d together to generate the effect state which is automatically
transmitted by the internal Effect Variable (_E01B) to the Effect Header.
Cause Variable
Intersection Variable
Effect Variable
Since internal variables begin with underscores, you cannot directly access them
elsewhere in the CEM or pass their values to other program instances. However, if
you do want to access the value of an internal variable elsewhere, you can specify
a new variable into which CEMPLE will copy the internal variable’s value. For
more information, see “Sharing Cause States & Effect States” on page 71.
White cells in the Variable Detail Table are modifiable, but gray cells are not. As
shown in the illustration above, the Variable Detail Table contains the following
fields:
This chapter describes the basic options, tools and techniques that CEMPLE
provides for editing of CEMs. The following topics are covered:
• CEMPLE options
• CEMPLE menus and toolbar
• Editing the Matrix
• Editing the Variable Detail Table
• Editing the FBD Network
24 CEMPLE Default Options
Pop-up Commands
Properties for Brings ups the Properties dialog box for the selected
<element> element, which can be a function, function block or variable.
Edit/View Source Displays the source code for the selected element. For user-
created functions and function blocks only, the source code
may be edited.
Automatic Naming Displays the Automatic Naming dialog box for the selected
element.
Toggle Terminal Toggles the polarity of the selected function or function
Polarity block terminal. When the polarity is inverted, a small circle
will appear at the terminal connection.
Note For each toolbar button, a ToolTip description is displayed if you rest the
cursor on the button.
Shortcut Keys
In the CEMPLE main menu, underlined characters are shortcut keys to be used in
the typical manner of Windows applications:
• For a menu item, use ALT + <underlined character> to open the menu.
• For a command within a menu, type the <underlined character> of the
desired command.
View Manager Update Selected Function Cells Cascade TriStation 1131 Help
Zoom Annotate Instance Tile Horizontal Tip of the Day
Size/Hide Selected Columns Tile Vertical Keyboard Shortcuts
Size/Hide Selected Rows Close All Sample Projects
Show All Rows/Columns Arrange Icons Technical Support
Show Effects for Selected Causes Show Properties Sheet About TriStation 1131...
Show Causes for Selected Effects Show Message Bar TriStation 1131 Logo...
Hide Effects not for Selected Causes (Vertical Message Bar)
Hide Causes not for Selected Effects (Horizontal Message Bar)
Hide Message Bar
1 PROGRAM: <program name>
Edit Menu
Command Description
Delete Rows Deletes a specified number of rows, before or after
the row that you indicate.
Element Menu
Command Description
Save <element> Saves the open element but not the entire project.
View Menu
Command Description
View Manager Saves the current view of the matrix layout for later
loading. Each view includes the widths of columns
and the heights of rows. For more information, see
“Using the View Manager” on page 74.
Zoom Allows you to select the zoom view of your matrix
from preset and custom views.
Size/Hide Selected Adjusts the size of columns in your current matrix, to
Columns a number you specify, to the content of elements in
the matrix, or to the default size. Can also hide and
unhide the columns you specify.
Size/Hide Selected Adjusts the size of rows in your current matrix, either
Rows to a number you specify or to the default size. Can
also hide and unhide the rows you specify.
Show All Rows/ Shows all rows and columns that you have previously
Columns hidden.
Show Effects for Ensures that the effects of all the causes you have
Selected Causes selected are visible.
Show Causes for Ensures that the causes of all the effects you have
Selected Effects selected are visible.
Hide Effects not for Hides any effects that are not associated with the
Selected Causes causes you have selected.
Hide Causes not for Hides any causes that are not associated with the
Selected Effects effects you have selected.
Tools Menu
Command Description
Update Selected Updates selected out-of-date elements which are
Function Cells marked with a red X in the active window.
Annotate Instance Updates the Tagname column of the Variable Detail
Table with the tagnames connected to the selected
instance of this CEM.
After selecting a sheet template, use the Build command in the Element menu to
apply it to the matrix.
Note The only printable portion of a CEM is the matrix—neither the FBD
Network pane nor the Variable Detail Table can be printed. If a matrix does not
fit on a single sheet, multiple sheets will be printed.
Printer Setup
Editing a Matrix
This section explains how to edit the basic elements of a CEM matrix:
• Cause Headers
• Cause Rows
• Intersections
• Effect Headers
• Effect Columns
The section also explains how to define variable names and use editing gestures.
Effect
Column
Effect Header
Intersection
Cause Header
Cause
Row
Intersections
See page 68 for The Intersection of a Cause Header and an Effect Header is present in every matrix.
details about Inter- In the simplest type of matrix, Intersections consist only of the MOVE function
section Functions. (represented by an X), which moves the cause state results to the Effect Header for
processing. However, if you enable Intersection Functions, each Intersection cell
will provide access to:
• A drop-down list of pre-defined functions and function blocks
• Any user-defined function or function block which you have initialized
properly
Note See “Designing CEM Functions & Function Blocks” on page 68 for details
about the Cause Header Functions, Intersection Functions, and Effect Header
Functions mentioned above.
The Description fields give you a chance to annotate individual cause inputs and
effect outputs, whereas the Comments field allows you to summarize the results
of Cause Row evaluation.
Note You can change the default values of variables using the FBD Network
pane. For instructions, see “Editing the FBD Network” on page 42.
Editing Gestures
CEMPLE provides a complete set of gestures for selecting, editing, sizing and
hiding the various parts of a matrix. Details about these activities follow.
1 Select all cause headers Click upper left cell in Cause Header area
2 Select a single cause header Click leftmost cell in Cause Header row
3 Select all effect headers Click top left cell in Effect Header area
4 Select a single effect header Click top cell in Effect Header Column
5 Select all intersections Click top left cell in Intersection area
6 Select all intersections in row Click labelled cell at left of Intersection Row
7 Select all intersections in column Click labelled cell atop Intersection Column
3 4
7
1 5
2
Editing Cells
Editing of cells in a matrix can be accomplished using four gestures:
Enter edit mode Click directly over the text in an editable cell, then edit the
contents.
Note Clicking in the cell but away from existing text or the
dropdown button will select the cell but will not cause it to
enter edit mode.
Complete a cell entry Press the TAB key or ENTER key to complete a cell entry and
move the cursor to the next cell to the right.
Move to the next cell Press the TAB key or ENTER key to move the cursor to the
next cell to the right.
Delete contents of a Select a cell or group of cells (but do not place in edit mode)
cell or group of cells and press the DELETE key.
In general, the actions you can take to manipulate cell display are:
• Dragging boundaries to change their width or height or restore the default
size
• Double-clicking thickened boundaries to unhide hidden columns or rows
• Using the Size/Hide commands on the View menu to change the width or
height and hide or unhide selected cells
Dragging and double-clicking the boundaries must be done with the blank
selection buttons or the labelled buttons for rows and columns 1, using the double-
arrow cursor. This screen shows the blank and labelled buttons as well as the
thickened boundaries that demarcate some types of hidden rows and columns:
Blank selection
buttons
Thickened boundary
for hidden column EO4
1.
Labelled buttons for rows are called C01, C02, C03, etc. Labelled buttons for
columns are called E01, E02, E03, etc.
The following table provides details about sizing, hiding and unhiding cells using
the drag and double-click techniques.
Note Each action described in this table can also be performed using the Size/
Hide commands on the View menu. See “Table of CEMPLE Tools” on page 28 for
descriptions of these commands.
Editing Gestures
In the Variable Detail Table, white cells are editable, and gray cells are not. The
following table describes the gestures that allow you to edit the Variable Detail
Table:
Enter edit mode Click directly over the text in an editable cell.
Select cell without 1. Click in a cell but away from existing text or away from
entering edit mode the dropdown button.
2. Click in a cell using the right mouse button.
Display Properties Double-click away from text in an editable cell, or
dialog box anywhere in a static cell.
Display FBD Network Use the arrow keys or mouse to select any user-defined
for a variable variable for display in the FBD Network pane.
Resize a column In the heading row, use the double-arrow cursor to drag the
column boundary to the left or right.
Hide a column In the heading row, use the double-arrow cursor to drag the
column boundary to the left until the column disappears.
Unhide a column In the heading row, locate the double-arrow cursor on the
boundary behind which the column is hidden. Then
double-click to unhide it.
Limitations
Selection of multiple cells is not allowed in the Variable Detail Table.
CEMPLE allows you to edit the elements displayed in the FBD Network pane by
using the following gestures (see next page for limitations):
Limitations
Editing the elements displayed in the FBD Network pane is subject to these
limitations:
• The names of user-defined variables cannot be changed, though their data
type and variable type are modifiable.
Internal variable • The properties of internal variables which are automatically declared by
names begin with CEMPLE cannot be changed, and for that reason, the Properties dialog box
underscores, as in for these variables is always grayed out.
_C01E01B.
• Variables of the In/Out Var Type (VAR_IN_OUT) are not permitted in
CEM programs, function blocks that are invoked by CEM programs, or any
safety program or function block.
• Selection of multiple elements is not allowed.
• Wires cannot be selected.
• Double-click zoom functionality is disabled.
Programming with CEMPLE allows users to define process system alarms and
shutdown actions in a very simple, easy-to-understand manner. To help you
develop CEM programs that use many of the available features, this chapter
provides step-by-step instructions for creating four types of matrixes. The
instructions, based on the sample project called ExCemple.pt2 found on the
TriStation 1131 CD, cover the following topics:
• Setting CEM default options
• Creating a function
• Creating a function block
• Creating a simple matrix
• Creating a matrix with Intersection Functions
• Creating a matrix with Cause Header Functions
• Creating a matrix with Effect Header Functions
• Monitoring the execution of a matrix
Note If you installed CEMPLE on your hard disk using the default directories, the
ExCEM.pt2 sample project should be located under C:\Program
Files\Triconex\TS1131\_tricon\Examples.
46 Setting CEM Default Options
If you do not set these default options for the number of Cause Rows and Effect
Columns before you begin programming, you could end up having to use the Size/
Hide commands, or equivalent editing gestures, more than necessary. See “Sizing,
Hiding & Unhiding Cells” on page 36 for details.
Creating a Function
This section explains how to create a function called LVLALRM (shown below)
that will be invoked by matrixes described in upcoming sections.
User-created functions that will be invoked by matrixes can be created at any stage
during matrix development, but to work well with the step-by-step instructions in
this chapter, you should create this function now and invoke it from a matrix later.
Outputs to
Field
MOVE
Functions
Inputs from
Field
Steps to Follow
▼ These steps help you create a simple matrix that controls five unit alarms.
1 Assuming that you have already created a TriStation 1131 project, go to the
Project Directory and click the New button.
2 In the Name field, type CemExample1 as the name for the new matrix.
A CEM is always a 3 Select the Cause Effect Matrix editor, noting that the Program element is pre-
program—never a selected and cannot be changed.
function or function
block. 4 Select the Safety option rather than the Control option, because the purpose of
the matrix is to turn on unit alarms when necessary.
5 This matrix will have five causes and five effects, so it is useful to adjust the
number of cause rows and effect rows which are displayed. From the View
menu, select the command Size/Hide Selected Columns and complete the
dialog box as follows:
You should already
have set the default
to 10 Effect Col-
umns. See page 46.
6 From the View menu, select the command Size/Hide Selected Rows and
complete the dialog box as follows:
You should already
have set the default
to 10 Cause Rows.
See page 46.
7 Click the cause cell in the first cause row, type the input name LEVEL_1_HI
and press Enter.
8 Click the description cell in the first cause row, type the statement “TRUE =
Fluid level in Tank 1 is high” and press Enter.
9 Click the effect cell in effect column 1, type UNIT_1_ALARM and press
Enter.
10 Click the description cell in effect column 1, type “High level alarm indicator
for Tank 1” and press Enter.
11 Associate Cause C01 with Effect E01 by clicking the intersection cell so that an
X appears in the cell. At this time, the variable table and FBD Network pane
should display the data shown below:
The input and output to this MOVE function are local variables defined by
CEMPLE that you cannot change. (In more complex matrixes, the Variable
Detail Table contains elements that can be modified in various ways. See the
upcoming sections for instructions and examples.)
12 Repeat steps 7 through 11 for Cause Rows 2 through 5 and Effect Columns 2
though 5. When you are finished, the matrix should look like the one shown at
the beginning of this section.
13 Select the Build command from the Element menu. If you have followed the
above instructions correctly, the message bar will say there are no errors and no
warnings. If you do have errors, double-click on the error message to find the
error location.
Intersection
Functions
Steps to Follow
The matrix you will create in this section builds upon the simple one you created
in the previous section. The new matrix will add Intersection Functions and specify
the pre-defined TON function block.
▼ These steps help you create a matrix that controls five unit alarms with the
help of the pre-defined TON (Timer On) function block.
1 In your TriStation 1131 project, go to the Project Directory and select
CemExample1.
2 Select the Copy To command and type the name CemExample2 in the To New
Name field.
3 This program will specify the pre-defined TON function block to delay turning
on the Effect. Before you can specify TON, you need to enable Intersection
Functions. To do this, select the Element Options command from the Element
menu and click the Enable Intersection Functions option. The matrix now
includes a drop-down list of pre-defined functions and function blocks:
The default
Intersection
Function is MOVE.
4 Specify the TON function block for Cause Row 1 (CO1) and Effect Column 1
(EO1) by selecting TON from the drop-down list in the intersection cell. With
this intersection selected, the Variable Detail Table and FBD Network pane
should display this data:
5 The Cause Variable (_C01B) and the Effect Variable (_C01E013) shown above
are local variables created automatically by CEMPLE for this matrix only. In
addition, you need to define a variable name for the PT (time) input to the TON
function. To do this, place the cursor in the appropriate white cell of the Var
Name column, enter the input name ALRM_DELAY, and press ENTER. This
input name is now displayed in the Variable Detail Table and FBD Network
pane, as shown below:
7 Repeat steps 4 through 6 for the Intersections of the next four Cause Rows and
Effect Columns. When you are finished, the matrix should look like the one
shown at the beginning of this section.
8 Select the Build command from the Element menu. If you have followed the
above instructions correctly, the message bar will say there are no errors and no
warnings. If you do have errors, double-click on the error messages to find the
error locations.
Cause Header
Functions
Steps to Follow
The matrix you will create here builds upon the one you created in the previous
section, which included Intersection Functions. The new matrix will add Cause
Header Functions and specify the LVLALARM function you created earlier.
▼ These steps help you create a matrix that controls five unit alarms with the
help of the pre-defined TON (Timer On) function block and the user-defined
LVLALRM function, which allows two process inputs.
1 In your TriStation 1131 project, go to the Project Directory and select
CemExample2.
2 Select the Copy To command and type the name CemExample3 in the To New
Name field.
3 In the CemExample3 program, select the Element Options command from the
Element menu and check the box for Enable Cause Header Functions. The
matrix now includes the Function and Cause columns:
4 For each of the five Cause Rows, you need to select the LVLALARM function
from the drop-down list in the Function column, as shown here:
When you defined 5 Each input now contains a second, empty cell where you can specify a second
LVLALARM, you input to the LVLALARM function. In the empty cells for Inputs 1-5, type in the
specified two inputs variable names LEVEL_1_LOW through LEVEL_5_LOW respectively. The
(see page 47). Variable Detail Table and the FBD Network should now appear as follows,
assuming that the fifth Cause Row is selected:
Bypass inputs are 6 Notice that the BYP (Bypass) terminal of the LVLALARM function is
often used when a unconnected at this time. It is represented by a blank cell in the VarName
unit is undergoing column of the Variable Detail Table—the same is true for Cause Rows 1-4 as
maintenance. well. To connect the BYP terminals to variables, type the variable names
BYP_LEV_1 through BYP_LEV_5 in the blank VarName cells adjacent to the
BYP terminal for each Cause Row. CEMPLE applies the default Data Type of
BOOL and the default Var Type of Input to each of the new variables, as
shown here for Input 5:
7 Check to ensure that the matrix now looks like the one shown at the beginning
of this section.
8 Select the Build command from the Element menu. If you have followed the
above instructions correctly, the message bar will say there are no errors and no
warnings. If you do have errors, double-click on the error messages to find the
error locations.
Steps to Follow
The matrix you will create here builds upon the one you created in the previous
section, which included Cause Header Functions. The new matrix will add Effect
Header Functions and specify the SHUTDOWN function block with two outputs,
which you created earlier.
▼ These steps help you create a matrix that controls five unit alarms with the
help of TON, the LVLALRM function, and the user-created SHUTDOWN
function block which provides two output signals.
1 In your TriStation 1131 project, go to the Project Directory and select
CemExample3.
2 Select the Copy To command and type the name CemExample4 in the To New
Name field.
3 In the CemExample4 program, select the Element Options command from the
Element menu and check the box for Enable Effect Header Functions. The
matrix now includes the Effect and Function columns:
4 For each of the five Effect Columns, you need to select the SHUTDOWN
function block from the drop-down list in the Function column, as shown here:
When you defined 5 Each Effect Column now contains a second, empty cell where you can specify
SHUTDOWN, you a second output from the SHUTDOWN function block. In the empty output
specified two out- cells of Effect Headers 1-5, type in the variable names UNIT_1_DOWN
puts (see page 48). through UNIT_5_DOWN respectively. The Variable Detail Table and the
FBD Network should now appear as follows, assuming that the fifth Effect
Column is selected:
6 As you can see above, CEMPLE automatically connected your second output
variable to the STRT_SHUTDOWN terminal of the SHUTDOWN function
block. At the same time, CEMPLE automatically assigned the default Data
Type of BOOL and the default Var Type of Output to the UNIT_5_DOWN
variable, as shown below. CEMPLE also applied these properties to the other
four output variables that you defined.
7 Check to ensure that the matrix now looks like the one shown at the beginning
of this section.
8 Select the Build command from the Element menu. If you have followed the
above instructions correctly, the message bar will say there are no errors and no
warnings. If you do have errors, double-click on the error messages to find the
error locations.
6 Double-click any Cause Variable in the Variable Detail Table to bring up the
Properties dialog box.
Red is the default 7 In the Set Value field, enter the value “TRUE” or “1” and click the Confirm
color for active button—then watch the Cause Row and Effect Column go active and turn red,
areas. as shown below. Note that TRUE also appears in the Value column of the
Variable Detail Table for the LEVEL_1_HI input.
Instance
View
Active Areas
Shown in Red
Monitor Colors
Red is the default color for active areas of a matrix being monitored in an Instance
View, but you can select other colors using either of these facilities:
• Element Options dialog box for individual CEM programs
• CEM Editor tab of the TriStation 1131 Options dialog box to set initial
colors for all CEM programs that you create in a project
Note See the TriStation 1131 User’s Guide for details about the control panels
and enabling/disabling of variables.
This chapter describes the following advanced techniques for power programming
of complex CEMs:
• Designing CEM functions and function blocks
• Sharing cause states and effect states
The chapter also describes a few accessory features for added convenience:
• Using the View Manager
• Viewing intermediate FBD code and ST code
• Printing variable location lists
68 Designing CEM Functions & Function Blocks
Structural Requirements
To design a function or function block that will be invoked by a CEM program, you
need to know which part of the matrix will invoke it:
• A Cause Header
• An Intersection
• An Effect Header
After determining this, you need to structure your function or function block
according to the following requirements:
Type of Function
Usage Requirements
or Function Block
Cause Header Evaluates up to 9 process inputs of any 1. The topmost 1 to 9 input terminals
data types, in order to produce one may be specified to receive process inputs
BOOL output (the cause state). of any data types.
2. The topmost output terminal must be
of the BOOL data type.
Intersection Evaluates one BOOL input from a 1. The topmost input terminal must be of
Cause Row and produces one BOOL type BOOL.
output (the effect state).
2. The topmost output terminal must be
of type BOOL.
Effect Header Evaluates one BOOL input (the effect 1. The topmost input terminal must be of
state) and produce up to nine process type BOOL.
outputs which are directly related to the
2. The topmost 2 to 9 output terminals
effect state.
must be of type BOOL, DINT or REAL if
the Var Type is Output, or any data type
if the Var Type is Local.
Attribute Assignments
After you have designed the logic for a CEM function or function block, you need
to enable it for invocation by a Cause Header, an Intersection or an Effect Header.
To do this, you need to assign an appropriate attribute by following these steps:
• Open the function or function block
• Select the Declarations command from the Element menu
• Select the appropriate option(s) from the Attributes tab as shown below:
See the TriStation
1131 User’s Guide
for information
about the Applica-
tion Type attribute.
After assigning the necessary attribute(s), you should use the Build command on
the Element menu.
Number of Inputs
The number of inputs you select when enabling the Cause Header attribute refers
to the number of process input variables that will be displayed in a Cause Header.
It does not necessarily refer to the total number of input terminals that the function
or function block provides.
Number of Outputs
The number of outputs you select when enabling the Effect Header attribute refers
to the number of process output variables you wish to display in the Effect Header.
It does not necessarily refer to the total number of output terminals that the function
or function block provides.
In this example, you want to share the cause state—represented by the internal
variable named _C01B displayed in the FBD Network pane—elsewhere in the
program. To do this, you need to declare a new variable in the blank white cell
adjacent to the LVLARLM terminal. Place the cursor in the blank cell, type the
name CAUSE_STATE, and press ENTER. The new variable name then appears
under _C01B in the FBD Network pane and in the Cause column, as shown
below. This CAUSE_STATE variable is now ready for use elsewhere in the
matrix. To use this variable in another program instance, change its Var Type to
Output using the Properties dialog box.
In this example, you want to share the effect state—represented by the internal
variable named _E01F1 displayed in the FBD Network pane—elsewhere in the
program. To do this, you need to declare a new variable in the blank white cell
adjacent to the EFFECT terminal. Place the cursor in the blank cell, type the name
SHARED_EFFECT, and press ENTER. The new variable name then appears in the
Effect row and in place of _E01F1 in the FBD Network pane, as shown below.
This variable is now ready for use elsewhere in the matrix or in another program
instance. (Though the internal variable named _E01F1 is no longer displayed in the
FBD Network pane, it continues to operate internally for storage and transmission
of the effect state.)
Note The View Manager saves the format of the current matrix layout, but does
not save variable names or other data which may change.
Note Use the Print Preview command on the File menu to view a variable
location list without having to print it.
This appendix lists only the CEM-specific error messages that TriStation 1131
may generate. See the TriStation 1131 Help System for explanations of other error
messages.
CE0006 Matrix Error—The last row will not be deleted. The CEM must
have at least one row at all times.
Cause: Deletion of the only row in the matrix was attempted.
Solution: Ensure that at least one row exists in your matrix at all
times.
CE0007 Matrix Error—The last column will not be deleted. The CEM must
have at least one column at all times.
Cause: Deletion of the only column in the matrix was attempted.
Solution: Ensure that at least one column exists in your matrix at all
times.
Application Type The attribute of a program, function or function block that defines its use in a safety
and/or control application. See the TriStation 1131 Users’ Guide for details.
Cause Header The part of a Cause Row preceding the Intersection cells which always includes the
Cause and Description columns and may include the Input and Function
columns.
Cause Header A function or function block that may be selected from a drop-down list in the
Function Function column of a Cause Header.
Cause Row The horizontal dimension of a matrix which maps a cause to one or more effects.
Includes the Cause Header, Intersections and Comments.
cause state The TRUE or FALSE state resulting from evaluation by a Cause Header.
CEM Features The attribute of a function or function block that defines whether the element may
attribute be used in a Cause Header, Intersection or Effect Header.
CEMPLE A language editor in the TriStation 1131 Developer’s Workbench that allows you
to develop CEMs for safety shutdown applications.
CEM program A TriStation 1131 program created in the CEM language using the CEMPLE
editor. Also known as a matrix.
effect In CEM methodology, an effect is an action that must be taken to solve a cause
(problem).
Effect Column The vertical dimension of a matrix which maps one or more causes to an effect.
Includes the Effect Header and Intersections.
1.
The acronym stands for Cause & Effect Matrix.
82 Glossary
Effect Header The part of an Effect Column above the Intersection cells which always includes
the Description and Effect columns and may include the Function and Output
columns.
Effect Header A function or function block that may be selected from a drop-down list in the
function Function row of an Effect Header.
effect state The TRUE or FALSE state resulting from evaluation by an Effect Header.
FBD Network The lower right quadrant of a CEM display that shows the FBD network generated
pane by the selected part of the matrix.
instance view The view of a selected program instance which you can display using the Instance
View command or tool button in the Emulator Control Panel or TRICON
Control Panel.
intermediate The FBD program that TriStation 1131 automatically generates when it compiles
FBD code a CEM.
intermediate ST The ST source code that underlies the FBD program which TriStation 1131
code automatically generates when compiling a CEM.
internal variable A variable that is automatically defined by CEM and cannot be modified by the
user. Every internal variable begins with the underscore character and is displayed
only in the FBD Network pane.
Intersection A cell in a matrix where a Cause Row intersects an Effect Column. In the simplest
type of matrix, an intersection consists only of the MOVE function. If the Enable
Intersection Functions option is selected, an intersection consists of a pre-defined
or user-created function or function block selected from a drop-down list.
Intersection A function or function block that may be selected from a drop-down list in the
Function Intersection cell of a Cause Row and an Effect Column.
pre-defined 1. In CEM, functions or function blocks that may be selected from drop-down lists
functions, in the cells of the Function column in a Cause Header or Effect Header, or in
function blocks Intersection cells.
2. Functions and functions blocks in the Standard, Triconex and TRICON
Libraries that TriStation 1131 automatically makes available for project
development.
Variable Detail The lower-left quadrant of a CEM display that lists the inputs and outputs of the
Table FBD network generated by the selected part of the matrix.
variable location A sheet that lists the location of each variable in a matrix, which TriStation 1131
list includes automatically each time a CEM is printed. May be viewed with the Print
Preview command on the File menu.
View Manager A CEM dialog box that saves the current format of a matrix so that it may be
recalled later. May be helpful for very large matrixes that cannot be displayed on
the screen all at one time.
84 Glossary
Index
A selecting in matrix 35
Application Type 47, 48, 69, 81 selection of multiple 36, 40
attribute assignments 69 CEM
Attributes tab 47, 48, 69 definition 81
Automatic Naming dialog box 25 CEM Editor tab 65
CEM Features attribute 47, 48
definition 81
B
CEM methodology 6
boundaries
CEM program
between cells 37
definition 81
bulletin board
CEMPLE
of Triconex 12
basic functionality 7
BYP (Bypass) terminal 59
default options 24
bypass inputs 59
definition 81
installation 9
C list of features 7
cause toolbar 28
definition 81 training 8
Cause and Effect Matrix (CEM) CEM-specific error messages 77
definition 6 colors for monitoring 24, 46
Cause Header 68 Comments field 34
definition 33, 81 contacting Triconex
Cause Header attribute 69 bulletin board 12
Cause Header Functions 57, 58 Technical Support 12
definition 81 web site 13
Cause Header Functions option 71 conventions
Cause Row used in document 10
definition 33, 81
cause state 71, 81
D
Cause Variable 55
Declarations dialog box 47, 48
cells
default color 65
boundaries between 37
default Intersection Function 54
deleting from matrix 36
default options 24, 46
hiding and unhiding 38
deleting cells 36
manipulating display of 36
Description fields 34
86 Index
document conventions 10 H
hiding and unhiding cells 38
E
editing gestures 35 I
for FBD Network pane 42 In/Out Var Type 43
for Variable Detail Table 39 installing CEMPLE 9
effect instance view
definition 81 definition 82
Effect Column for monitoring 24
definition 33, 81 how to monitor 64
Effect Header 68 intermediate code
definition 33, 82 FBD and ST 29
Effect Header Functions 61, 62 intermediate FBD code 75
definition 82 definition 82
Effect Header Functions option 71 intermediate ST code 75
effect state 71 definition 82
definition 82 internal variable 43, 73
sharing 41 definition 41, 82
Effect Variable 55 Internet Web site 13
Element menu 54, 58, 62, 69 Intersection 68, 71
Element Options command 54, 58, 62 definition 33, 82
Element Options dialog box 65, 71, 72 Intersection Function 53, 54
Emulator Control Panel 64 default 54
Enable Cause Header Functions option 58 definition 82
Enable Effect Header Functions option 62, 72 intersection state 41, 71
Enable Intersection Functions option 54
error messages 77
L
ExCEM.pt2 sample project 45
labelled buttons
for selecting rows and columns 37
F logic sheets 31
FBD editor 47, 48 LVLALRM function 47, 57, 58, 59, 62
FBD Network pane
definition 42, 82
M
editing gestures for 42
main menu commands 26
limitations 43
matrix
FBD source 42
definition 82
function
how to edit 32
creating 47, 68
Mon (Monitor) column
function block
of Variable Detail Table 64
creating 48, 68
monitor colors 24, 46
Function column
default 65
of Cause Header 59
of Effect Header 63
Index 87
P Triconex
polarity bulletin board 12
of terminals 25 headquarters 11
pop-up menu 25 technical support 12
pre-defined function blocks 83 Web site 13
pre-defined functions 83 TriStation 1131 Options dialog box 65
printer setups 31
U
R unhiding cells 38
regional offices 11
right mouse button V
menu accessible from 25 VAR_IN_OUT variable type 43
used to select cell in matrix 36 Variable Detail Table 83
definition 39
S editing gestures for 39
Safety and Control attribute 47 limitations 40
sample project variable location list 83
on CD 45 printing 76
selection buttons variable names
for cells in matrix 35, 37 changing 40
sheet templates 31 defining 34
shortcut keys 26 variables
SHUTDOWN function block 48, 61, 62, 63 assigning to unconnected terminals 40
simple matrix changing names 40
creating 49 View Manager 30, 74, 83
sizing cells 38 View menu 74
software support 11
W
T Web site 13
tagnames 30 wires
technical support 11, 12 in FBD network 43
terminal polarity 25
terminals
unconnected 40
TON function block 53, 54
tools
for CEMPLE 28
traditional CEM methodology 6
88 Index