Professional Documents
Culture Documents
Developers Guide For Trident, TriStation v3.1
Developers Guide For Trident, TriStation v3.1
Developer’s Guide
for Trident Systems
Version 3.1
Assembly No. 9700071-002
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.
Configuration ........................................................................................... 13
Program Instances ............................................................................ 13
Trident Point Connections ................................................................. 14
Trident Hardware Allocation .............................................................. 14
TriStation Tools ............................................................................................ 15
The Project Directory ............................................................................... 15
Language Editors .................................................................................... 16
Multiple Languages in a Project ........................................................ 16
Properties Dialog Box .............................................................................. 17
Basic Editing Tools .................................................................................. 17
Pop-up Menu .................................................................................... 17
Main Menu and Project Toolbar ........................................................ 19
Access Keys ..................................................................................... 19
Table of Editing Tools ....................................................................... 21
Enlarged View of Elements ............................................................... 25
List Options ....................................................................................... 26
Help System ............................................................................................ 27
Configuration Editor ................................................................................. 27
Control Panels ......................................................................................... 28
Diagnostic Panel ..................................................................................... 28
Developing a TriStation Project .................................................................. 29
Typical Development Approach .............................................................. 29
Designing a Control Strategy .................................................................. 31
Sample Project Diagrams ................................................................. 32
Determining the Number of Programs .............................................. 34
Determining Whether to Use Program Instances or Copies ............. 35
When to Create Function Blocks ...................................................... 35
When to Create Functions ................................................................ 35
Definition of Safety or Control Application ........................................ 36
Creating Executable Elements ................................................................ 37
Defining Safety or Control Attributes ................................................. 37
Writing the Logic for Executable Elements .............................................. 38
Selecting Elements & Connecting Wires .......................................... 38
Assigning Properties to Elements ..................................................... 40
Giving Instance Names to Function Blocks ...................................... 40
Including Comments & Annotation .................................................... 41
The Completed Logic ........................................................................ 42
Defining the Project Configuration ........................................................... 43
Basic Methods .................................................................................. 43
Configuring the Trident System ........................................................ 44
Declaring Program Instances ............................................................ 45
Giving Tagnames to Points ............................................................... 45
Connecting Inputs and Outputs to Tagnames .................................. 46
Building, Testing, and Downloading the Project ...................................... 46
Related Documentation
The following Triconex books contain related information:
• TriStation 1131 Triconex Libraries Reference
• CEMPLE User’s Guide for Triconex Systems
• Trident Planning and Installation Guide
• Trident Safety Considerations Guide
• Trident Communication Guide
• SOE Recorder User’s Guide
Note If you require emergency support and are not an SMP participant, please
have a purchase order or credit card available for billing.
Telephone
Toll-free number 866-PHON IPS (866-746-6477), or
Toll number 508-549-2424
Fax
Send your request to the Technical Support Manager.
Toll-free number 800-325-2134, or
Toll number 949-885-3375
E-mail
ips.csc@invensys.com
Training
In addition to this documentation, Triconex offers in-house and on-site training.
For information on available courses, please contact your regional customer center.
A TriStation Project
This chapter describes the elements of a TriStation project and the tools you can
use, and discusses methods for developing a project.
Topics include:
“Programming Languages” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
“TriStation Tools” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
“Developing a TriStation Project” . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Elements of a Project
When you use TriStation to develop an application for process control, the first step
is to create a new project—this is a database file that contains all of the elements
you create during application development. Each project file has the extension
PT2. The main elements of a project include the following:
• Programs
• Function blocks
• Functions
• Data types
• Shared libraries
• Configuration
Upcoming sections in this chapter provide brief definitions and other useful
information about these elements. Refer to the diagram on the following page for
an overview of the main elements found in a TriStation project.
Programming Languages
The TriStation 1131 Developer’s Workbench supports four programming
languages for developing, testing and documenting process control applications
that execute in the Trident controller.
• Function Block Diagram (FBD)
• Ladder Diagram (LD)
• Structured Text (ST)
• Cause & Effect Matrix (CEM)
Three of these languages (FBD, LD and ST) comply with the IEC 61131-3
International Standard on Programming Languages for Programmable
Controllers.
This section provides basic information about the available programming
languages. Refer to Chapter 2, Chapter 3, and Chapter 4 for detailed information
about the language editors. This section also provides an overview of the Cause &
Effect Matrix (CEM) methodology and Triconex’s optional Cause & Effect Matrix
Programming Language Editor (CEMPLE). For detailed information, see the
CEMPLE User’s Guide.
Triconex automates the CEM methodology by adding the revolutionary Cause &
Effect Matrix Programming Language Editor (CEMPLE) to its existing suite of
language editors. 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
• Choice of energize-to-trip (OR’d intersections) or de-energize-to-trip
(AND’d intersections) matrix evaluation
• Support for up to 99 Cause Rows, 99 Effect Columns, and a maximum of
1000 active intersections in CEM
• Multiple levels of undo and redo selectable from an edit transaction list,
limited only by the size of your hard disk
• 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
For details about using CEMPLE, see the CEMPLE User’s Guide.
Programs
A program is the highest-level executable element within a TriStation project. It is
an assembly of programming language elements and constructs that work together
to allow a programmable control system to achieve control of a machine or process.
In each program, you can define a maximum of 2,000 variables (inputs, outputs and
locals). A program can invoke functions or function blocks but cannot invoke
another program, as shown in the following chart for order of evaluation:
PROGRAMS
Invoke
Invoke
Invoke
Functions
Program Instances
In TriStation, programs are not executed directly. In this regard, it helps to think of
a program as a program type. To download and execute a program type, you
declare one or more executable copies of the program which are known as program
instances. Each program instance must have a unique instance name. For a
TriStation project, you can download as many as 250 program instances to the
Trident controller. For more information, refer to “Program Instances” under the
upcoming section called “Configuration.”
Function Blocks
A function block is an executable element which yields one or more values and is
identified by an instance name. A function block retains the values calculated
during one evaluation for use in the next evaluation. Therefore a given set of input
values to a function block will not always yield the same output values, as shown
in the following example. This example uses the Standard Library’s TP (Time
Pulse) function block and is based on a scan time of 50 milliseconds. The transition
of output Q is a function of the input IN and the pulse duration PT, based on the
calculated elapsed time ET which is incremented and retained from scan to scan
until its expiration.
Evaluation X: Evaluation X + 1:
Creating a function block can be helpful when you are writing logic to control a
number of identical process units, especially if the amount of logic required is
small. You can declare a maximum of 400 variables (inputs, outputs, and locals) in
each function block.
Function blocks can be used to implement standard or repetitive algorithms that
yield more than one result, such as the Proportional Integral Derivative (PID). In
another example, you may need to comply with a standard for processing First-Out
Alarms. In this case, you could consolidate the logic for alarm processing into a
function block to ensure that the alarm sequencing is performed identically for each
group of alarms. Refer to the section called “Designing a Control Strategy” on
page 31 for more information.
Functions
A function is an executable element which yields exactly one result. Unlike a
function block, the values in a function are not retained from one evaluation to the
next—they only exist during each evaluation. The Standard Library’s AND
function (shown below) provides examples of various evaluations. For each
evaluation, the output value of the AND function depends solely on the current
values of the inputs.
A function is directly executed and does not need to be instanced. You can declare
a maximum of 400 variables (inputs, outputs and locals) in each function.
Note Creating a function and invoking it each time it is needed can reduce the
amount of memory required for your logic as well as making it easier to read.
Data Types
Two kinds of data types are applicable to TriStation projects:
• Elementary
• Generic
Of the data types listed above, only variables of the following types can be declared
as Trident points. These variables point to hardware addresses in the Trident and
are accessible to all programs in a TriStation project.
• BOOL
• DINT
• REAL
See the upcoming section called “Defining the Project Configuration” for more
information.
For more information, see the sections on declaring the properties of functions and
function blocks in the FBD and LD chapters.
Shared Libraries
For every project, TriStation provides three standard libraries which contain
functions and function blocks you can use for application development:
• The Standard Library (STDLIB) which complies with the IEC 61131-3
standard
• The Triconex Library (TCXLIB) for all Triconex controllers
• The Trident Library (TRDLIB) specifically for the Trident controllers
In addition, you can share the programs, functions and function blocks that you
develop with other projects by using TriStation’s shared library feature. For more
information, refer to Chapter 12, “Libraries.”
Configuration
A configuration is the element of a TriStation project that supports the installation
of your application into the Trident controller. A configuration consists of the
following elements, as shown in the diagram below:
• One or more program instances
• Trident point connections
• Trident hardware allocation
TriStation Project
CONFIGURATION
Program
Instance 3
Program Instances
In TriStation, program instances are executable copies of a program type that
define which Input, Output, and Memory points will interact with the program’s
input and output variables. For example, if your project needs to control several
Firewater Deluge Pumps, using program instances could help. The operation of the
pumps is simple and unlikely to change as time goes by, and the amount of logic
needed to control each one is small. Therefore it would make sense to create one
program type and declare an instance of that type for each pump being controlled.
The maximum number of program instances you can declare in a Trident
configuration is 250.
TriStation Tools
This section describes the main tools available for developing and downloading a
TriStation project:
• Project Directory
• Language editors
• Properties box
• Options menu for lists
• Trident Configuration editor
• Control panels
• Trident Diagnostic Panel
• Help system
With the Project Directory open, you can add, copy and delete various elements
of your project. Four categories of elements are accessible by means of the tabs in
the Project Directory:
• User Defined — for opening, adding, copying or deleting programs,
functions or function blocks
• Shared Libraries — for viewing elements in your project library, importing
libraries to your project, and verifying the version numbers of libraries
attached to your project
• Platform — provides access to the Configuration editor, Trident Control
Panel, Emulator Control Panel, Diagnostic Panel, and downloaded elements
• Other — for viewing, opening, and copying project engineering drawing
templates
Language Editors
After opening a TriStation project, you can choose to create programs, functions
and function blocks using any of four languages:
• Ladder Diagram (LD)
• Function Block Diagram (FBD)
• Structured Text (ST)
• Cause & Effect Matrix (CEM)
When you are in the Project Directory and decide to create a new element, you
can accept the default language (FBD) or select another language for that particular
element. You can also choose to set a different default language for your project.
To do this, select Project Options from the Project menu and select the Language
tab.
If you click the push pin icon in the upper left corner, the Properties box will stay
Push pin on top of all other displays and reflect each successive element you select, as long
as the push pin appears pressed down (as shown above).
Pop-up Menu
Pressing the right mouse button while using a TriStation control panel or editor
displays a pop-up menu either for a selected element or for any empty area. All of
the commands in the pop-up menu are accessible from the toolbar and main menu
as well, with certain exceptions which are explained in the chapters about control
panels and editors.
Pop-up menu
for any empty area
Project Toolbar
The diagram on the following page lists the main menu commands which are
common to all TriStation views. Refer to other chapters for information about main
menu commands which are unique to specific editors and control panels.
Access Keys
In all of TriStation’s menus, underlined characters are access 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.
For more information, see Appendix A, “Keyboard & Mouse Shortcuts.”
New Project... Commands differ for each Edit Configuration Directory... Commands differ for each
Open Project... editor and control panel. Build Configuration Description... editor and control panel.
Save Project... Rebuild Configuration Security...
Save As... Compile All Project Elements History...
Close Project Emulator Control Panel Project Options...
Backup Project Trident Control Panel TriStation 1131 Options...
Restore Project Trident Diagnostic Panel
1 <previously opened project> View Download History...
2 <previously opened project> Change State to
Print... Download All
Print Preview...
Print Reports...
Print Setup...
Exit
Commands differ for each Commands differ for each Commands differ for each New Window TriStation 1131Help
editor and control panel. editor and control panel. editor and control panel. Cascade Tip of the Day...
Tile Horizontal Keyboard Shortcuts
Tile Vertical Sample Projects
Close All Technical Support
Arrange Icons About TriStation 1131...
Show Properties Box TriStation 1131 Logo...
Show Message Bar
(Vertical Message Bar)
(Horizontal Message Bar)
Hide Message Bar
1 PROGRAM: <program name>
Note On any TriStation toolbar, the tooltip (name of a tool) is displayed if you
rest the cursor on a toolbar button.
File Menu
Command Description
New Project Creates a new project. Allows you to select the controller
platform supported by the project.
Open Project Opens existing projects. Displays all elements in the project.
Save Project Saves open project and any project elements (programs,
functions, function blocks) that have been opened and/or
edited.
Save As Saves a project under another filename.
Close Project Closes the current project.
Backup Saves the current project and creates a backup file named
Project <project_name>.BT2.
Restore Opens a backup file named <project_name>.BT2 and saves
Project it as a project file named <project_name>.PT2.
Print Prints the sheet(s) displayed in the current window.
Print Preview Previews the printing of the sheet(s) displayed in the current
window.
Print Reports Allows you to generate a report database and select reports
for printing.
Print Setup Allows you to select a printer and document properties.
Exit Closes the current project and exits TriStation.
Trident Menu
Command Description
Edit Opens the Configuration editor where you allocate
Configuration hardware, create program instances, and define Trident
point connections for program variables.
Build Compiles and links programs and any dependent elements
Configuration that have changed since the last build.
Project Menu
Command Description
Directory Opens the Project Directory dialog box which allows
you to open existing elements of the project or create new
elements.
Description Displays the Project Description dialog box for viewing
or editing.
Security Opens the Project Security dialog box for viewing or
editing of users, privileges and level names.
Window Menu
Command Description
New Window Opens a new window of the current element.
Cascade Cascades all open windows and displays the title bar for
each. To bring a window to the top, select it from the list
of open windows on the menu or click the window’s title
bar.
Tile Horizontal Displays any open windows horizontally on the screen.
Useful for showing several windows simultaneously.
Tile Vertical Displays any open windows vertically on the screen.
Useful for showing several windows simultaneously.
Close All Closes all open windows. Prompts you to save any
elements that have been changed since they were opened.
Arrange Icons Arranges any minimized windows.
Show Properties Displays the Properties dialog box which allows you to
Box declare or view the properties of the selected element.
Click the push pin in the dialog box to continuously
display the Properties box.
Show Message Displays compiler messages in a rectangular box during
Bar the building of elements. By default, the message bar is
displayed horizontally across the bottom of the screen.
Vertical Message If the message bar is displayed horizontally across the
Bar bottom of the screen, you can choose to display it
vertically along the right side of the screen.
Help Menu
Command Description
TriStation 1131 Opens the TriStation 1131 online help system.
Help
Tip of the Day Displays a tip for effective use of TriStation, randomly
selected from a database based on users’ suggestions.
Keyboard Provides keyboard information and shortcuts for the tasks
Shortcuts involved in writing logic, such as placing, selecting and
editing executable elements.
Sample Projects Displays a dialog box that shows the sample projects
included with TriStation, which you can duplicate and
edit.
Technical Provides information on how to contact Triconex for
Support technical support.
About Displays the current version number of TriStation and
TriStation 1131 registered owner information.
TriStation 1131 Displays the splash screen that appears when you start up
Logo TriStation.
Current
View Rectangle
List Options
The column headings in TriStation can be altered in the following ways:
• Change the position of the columns displayed across the screen by clicking
and dragging each column to the desired position:
– Click inside the title bar of the column (not on the boundary).
– Drag the column to the left or right until the white down-arrow is
positioned at the desired location, then release the mouse button.
• Partially hide a column by dragging its right boundary to the left until you
reach the minimum column width.
• Restore a partially hidden column by dragging its right boundary to the
right until you reach the desired column width.
• Sort the columns alphanumerically in ascending or descending order by
clicking the title bar of the desired column.
In the following example, the list for Trident Points is sorted alphanumerically by
Tagname, designated by the arrow in the column heading, and in ascending order,
designated by the direction of the arrow.
Note TriStation automatically saves the list options, so the next time you open
the window, the column positions and sort order are preserved.
Help System
TriStation’s easy-to-use Help System provides online information about the
following topics:
• TriStation features and capabilities
• Language editors
• Standard Library functions and function blocks
• IEC 61131-3 reference
• Sample projects
• Configuration, downloading and diagnostics for the control system
• Error messages
You can access the Help system from the Help menu or:
• Press the F1 key
• Click the Help button when in a dialog box
Configuration Editor
The Configuration editor, accessible from the Trident menu or the Platform tab
in the Project Directory, performs the following functions:
• Declares program instances
• Gives tagnames to Trident points
• Connects inputs and outputs to tagnames
• Allocates Trident hardware
Various views of elements in the Configuration editor are opened and closed by
means of the directory tree on the left side of the window.
Control Panels
TriStation provides two kinds of control panels for monitoring the behavior of
variables as your application runs:
• Emulator Control Panel
• Trident Control Panel
The control panels are accessible from the Trident menu or the Platform tab in the
Project Directory. The operation of both control panels is identical, but their
purposes differ. The Emulator Control Panel helps you test your application off-
line. The Trident Control Panel lets you download your application to the Trident
controller, then control and monitor it online.
A control panel has a tree panel on the left and a monitor panel on the right. You
can drag variables from the tree to the monitor panel for viewing during execution
of the application, using the Run, Single Step, Pause and Halt commands to
control execution.
Diagnostic Panel
The Diagnostic Panel, accessible from the Trident menu or the Platform tab in the
Project Directory, has the following purposes:
• Displays the status of all I/O modules and other system components of the
Trident system, including the current project
• Helps you diagnose faults in the Trident system so you can replace faulty
modules or take other corrective actions
• Enables/disables and monitors Output Voter Diagnostics (OVD) for output
modules
The chart on the following page shows which TriStation component corresponds
to each functional step. Upcoming sections discuss each step in more detail.
Create Executable
FBD Editor
Elements
LD Editor
ST Editor
CEM Editor
Write Programs
Configuration Editor
MP Setup
Configure the
Trident Controller I/O Module Allocation
Memory Allocation
Declare Tagnames
Trident Points
TO BURNER 2
TO BURNER 3
TO BURNER 4
COMBUSTION
SUPPLY
AIR
HEADER DAMPER
TO BURNER 2
TO BURNER 3
TO BURNER 4
BURNER 1
FUELGAS
AIR DAMPER
VIA HEADER
FUELGAS
HEADER B TSOV
IGNITER IGNITER 1
HEADER TSOV
TO IGNITER 2
TO IGNITER 3
TO IGNITER 4
A TriStation project can be partitioned into as many as 250 program instances. The
logic for the sample project called FURNACE has been partitioned into several
different programs, as indicated by the following diagram:
Program 1:
Safe_Atmosphere
Instance 1:
Safe_Atmosphere
Program 2:
Start_Condition
Program 8:
Instance 1: Igniter_Start
Start_Conditions Instance 1:
Igniter_1
Instance 2:
Program 3: Igniter_2
Minimum_Stop
Instance 3:
Instance 1: Igniter_3
Minimum_Stop Instance 4:
Igniter_4
Program 4:
Igniter_Header
Program 9:
Instance 1: FuelGas_Burner
Igniter_Header
Instance 1:
Program 5: FuelGas_1
FuelGas_Header
Instance 2:
Instance 1: FuelGas_2
FuelGas_Header Instance 3:
FuelGas_3
Instance 4:
Program 6: FuelGas_4
Process_Trips
Instance 1:
Process_Trips
Program 10:
Air_Damper
Program 7: Instance 1:
Burner_Start Air_Damper_1
Instance 1: Instance 2:
Burner_1 Air_Damper_2
Instance 2: Instance 3:
Burner_2 Air_Damper_3
Instance 3: Instance 4:
Burner_3 Air_Damper_4
Instance 4:
Burner_4
Programs
• A program can be defined with the Safety attribute or the Control attribute.
• A Safety program can use only functions and function blocks with the
Safety and Control attribute, and its variables can be connected only to
safety tagnames or tagnames that are shared for read access.
Control is the • A Control program can use functions and function blocks with the Control
default Application attribute, as well as the Safety and Control attribute. Its variables can be
attribute for all user- connected only to control tagnames or tagnames that are shared for read
defined elements. access.
Function Blocks
• A function block can be defined with the Control attribute or the Safety
and Control attribute.
• A Control function block can use functions and function blocks that have
either the Control attribute or Safety and Control attribute.
• A Safety and Control function block can use only functions and function
blocks that have the Safety and Control attribute.
Functions
• A function can be defined with the Control attribute or the Safety and
Control attribute.
• A Control function can use functions that have either the Control attribute
or Safety and Control attribute.
• A Safety and Control function can use only functions that have the Safety
and Control attribute.
After placing elements on your sheet, you need to connect them with appropriate
wires. Refer to Chapter 2, “Function Block Diagram (FBD)” and the online Help
system for more information about connecting logic elements with wires.
Comments
A comment consists of descriptive text and selected macros for the project, element
or sheet. Place a comment box on the page by using the Comment tool on the
toolbar or the Insert Comment command on the Tools menu. A comment box is
sizable for width and height and can be positioned in various ways with regard to
your program variables. For more information, refer to the sections on comments
in Chapter 2, Chapter 3, and Chapter 4 about the language editors.
Variable Annotation
An annotation is a special kind of comment box that is attached to the bottom of an
input, output or input/output variable. The annotation box contains selected
information about the Trident point to which a program input or output variable is
attached. In the FBD and LD editors, the Configuration editor, and the control
panels, you can display an annotated view of any program instance. The example
below shows a variable annotation in an FBD logic sheet.
The annotation box is sizable for width and height and moves wherever the
associated variable is moved. For more information, refer to the sections about
variable annotation in either the FBD or LD chapter.
Basic Methods
To begin configuring a project, go to the Configuration editor (accessible from the
Trident menu or the Platform tab in the Project Directory). There you will find
a directory tree view on the left side of the screen. Click the plus (+) and minus (-
) icons of the tree to open and close the various subdirectories of elements. Double-
click on particular elements to access the screens where you actually specify
configuration information.
In many cases, double-clicking an element displays the Properties box, which
prompts you to select or enter pertinent information. Some Properties boxes have
two or more tabs which you click on to access various aspects of configuration.
Note If you are following the typical steps for developing a TriStation project,
you should do a syntax check on your program logic with the Build command
before attempting project configuration. If there are no errors or warnings, proceed
to the Configuration editor.
Hardware Allocation
The Hardware Allocation branch of Trident System Configuration graphically
displays the hardware allocated for your Trident system and allows you to
configure the MPs and install I/O modules.
I/O modules are installed by graphically placing and arranging icons that represent
the I/O modules in your Trident system. Double-clicking on an installed I/O
module allows you to specify its IOP location and enter a description.
See “Allocating I/O Modules” on page 194 for more information.
TriStation automatically installs the MPs and their baseplate. Double-clicking
MP/IOP1 under the Hardware Allocation branch allows you to configure the
following system parameters:
• The Node name, called TriNode, of the Trident you will use for your
TriStation project
• The scan time for evaluations of your project as it executes in the Trident
• Operating parameters for the MPs, such as requiring a password to connect
to a Trident node, automatically restarting on power-up, disabling remote
changes, and allowing the disabling of input and output points
• Network and serial port connections
See “Configuring Main Processors” on page 214 for more information.
Memory Allocation
Click on one of the following point types under the Memory Allocation branch of
Trident System Configuration to allocate additional memory if needed:
• Memory point
• Input points
• Output points
Clicking on the desired point type displays graphs that provide several categories
of information about the memory allocation. Double-clicking on a graph brings up
a dialog box that allows you to change the memory allocation. See “Changing
Memory Allocation” on page 234 for more information.
This chapter describes basic methods of writing logic in the FBD language and
provides details on the use of FBD editing tools.
Topics include:
“Basic Methods for Writing Logic” . . . . . . . . . . . . . . . . . . . . . . . . . 48
“FBD Editing Tools” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
“Creating Executable Elements” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
“Using Logic Sheets” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
“Declaring Input, Output & Local Variables” . . . . . . . . . . . . . . . . . . 62
“Declaring Constants” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
“Declaring Functions and Function Blocks” . . . . . . . . . . . . . . . . . . 72
“Specifying Wire Properties” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
“Using Network Dividers” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
“Comments, Variable Annotation and Macros” . . . . . . . . . . . . . . . . 82
“Printing Logic Sheets” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Pop-up Menu
Pressing the right mouse button while viewing an FBD logic sheet displays a pop-
up menu either for a selected element or when no particular element is selected. All
of the commands in the pop-up menu are accessible from the FBD toolbar and main
menu as well, except for the Size/Alignment commands described below.
Pop-up menu
for any empty area
Size/Alignment Commands
The pop-up menu’s Size/Alignment commands help you arrange multiple
elements on an FBD logic sheet, as shown in the example below.
For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.
Access Keys
In the FBD editor menus, underlined characters are access 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.
For more information, see Appendix A, “Keyboard & Mouse Shortcuts.”
Grid Display Update Selected Blocks Sheet Title... New Window TriStation 1131 Help
Zoom... Automatic Naming... Next Sheet Cascade Tip of the Day
Zoom to Fit... Annotate Instance... Previous Sheet Tile Horizontal Keyboard Shortcuts
Zone Display Select Tool (Arrow) Find Sheet... Tile Vertical Sample Projects
Network Numbers Insert... Append Sheet Close All Technical Support
IEC Display Mode Insert Sheet Arrange Icons About TriStation 1131...
Delete Sheet Show Properties Sheet TriStation 1131 Logo...
Sheet Template... Show Message Bar
Function (Block)...
(Vertical Message Bar)
Local Variable
Input Variable (Horizontal Message Bar)
Output Variable Hide Message Bar
Constant 1 PROGRAM: <program name>
Wire
Comment
Horizontal Network Divider
Vertical Network Divider
Edit Menu
Command Description
Undo Reverses the last action performed when editing a project
element (program, function, or function block).
Redo Reverses the last Undo command. This must be done
before any other editing is done.
Edit Session Opens a dialog box which displays a sequential list of
Journal actions undertaken during the most recent edit session.
Any previous state during the current edit session can be
recovered and displayed by selecting from the list.
Cut Cuts (deletes) selected items from the current sheet and
places them on the clipboard, erasing the previous
contents.
Copy Copies selected items from the current sheet and places
them on the clipboard.
Paste Pastes the current contents of the clipboard into the
current element.
Find Finds specific text within the current program, function or
function block. An options menu lets you select names
and types of various elements, text in comments and
captured elements, and sensitivity.
Replace Replaces specific text within the logic elements of the
current project element.
Select Network Selects all logic elements within a network for the current
Contents project element. At least one element (input, output,
variable) must already be selected.
Select Sheet Selects all elements on the current sheet.
Contents
Element Menu
Command Description
Save Element Saves the open element but not the entire project.
View Menu
Command Description
Grid Display Changes the background of the active window to
display or not display an editing grid for precise
placement of program elements.
Zoom Allows you to select the zoom view of your logic sheet
from preset and custom views.
Zoom to Fit Displays the entire logic sheet within the current
window.
Tools Menu
Command Description
Update Selected Updates selected out-of-date elements marked with a red
Blocks X in the active window.
Automatic Allows you to select a numeric pattern for the automatic
Naming naming of program elements.
Insert:
Function Block Opens the Select Element dialog box and allows you to
select a function block of your choice and place it on the
logic sheet.
Local Variable Allows you to place a Local variable element on your
logic sheet.
Wire Allows you to connect your logic elements with the wire
tool.
Sheets Menu
Command Description
Sheet Title Allows you to edit the title of the current sheet (displayed
in the title block, window caption bar and Window Menu
list).
Next Sheet Displays the next sheet (for logic elements with multiple
sheets).
Previous Sheet Displays the previous sheet (for logic elements with
multiple sheets).
Find Sheet Allows you to find and select sheets by sheet title and
provides access to dialog boxes for insertion, deletion, and
appending of sheets.
Append Sheet Adds a new sheet to the end of the current project element.
Insert Sheet Inserts a new sheet before the current sheet or before a
horizontal network boundary (if selected).
Delete Sheet Deletes the sheet that is currently displayed.
Sheet Template Selects a sheet template for the current sheet from a list of
available templates.
Current
View Rectangle
To create a new executable element in the FBD editor, select the Function Block
Diagram option, and then select the type of element to create (Program, Function
Block, or Function). See the following section for help on selecting the element’s
Application Type attribute.
Programs
• A program can be defined with the Safety attribute or the Control attribute.
• A Safety program can use only functions and function blocks with the
Safety and Control attribute, and its variables can be connected only to
safety tagnames or tagnames that are shared for read access.
Control is the • A Control program can use functions and function blocks with the Control
default Application attribute, as well as the Safety and Control attribute. Its variables can be
attribute for all user- connected only to control tagnames or tagnames that are shared for read
defined elements. access.
Function Blocks
• A function block can be defined with the Control attribute or the Safety
and Control attribute.
• A Control function block can use functions and function blocks that have
either the Control attribute or Safety and Control attribute.
• A Safety and Control function block can use only functions and function
blocks that have the Safety and Control attribute.
Functions
• A function can be defined with the Control attribute or the Safety and
Control attribute.
• A Control function can use functions that have either the Control attribute
or Safety and Control attribute.
• A Safety and Control function can use only functions that have the Safety
and Control attribute.
You cannot change the Safety and Control attributes unless you successfully
build the element (have zero errors).
! CAUTION
If you change the attributes from Safety to Control or Safety & Control to
Control and do not successfully build the element, a non-safety user will still be
able to open and modify the element.
Naming
Use the Properties box to name a selected variable as shown in the example above,
or name several variables automatically using the Auto Name feature. A variable
name or identifier can have up to 31 alphanumeric and underscore characters. All
identifiers must begin with an alpha character (A to Z) and must not include any
imbedded spaces. Identifiers are not case-sensitive.
Width
The plus (+) and minus (-) icons of the Selected tab expand or shrink the width of
the selected variable symbol so you can use a longer name or fit the symbol into a
smaller space.
Annotation
The Annotation checkbox of the Selected tab allows you to apply variable
annotation on a per-variable basis. A variable annotation is a special kind of
comment box attached to the bottom of a variable which can display the value of
the variable during execution, macros and descriptive text. The values of the
variable and the macros are displayed only in an instance view of your program
logic. Refer to the section called “Comments, Variable Annotation and Macros”
for more information.
Automatic Naming
The Auto Name feature, accessible from the Selected tab, is helpful when you
have several similar variables and want to name them according to a convention.
For example, you have 50 gas detector inputs, and you want to call them
GAS_DETECT_1, GAS_DETECT_2, GAS_DETECT_3, etc. Automatic naming
lets you select the desired prefix and the increment you wish to use. In this
example, you would enter GAS_DETECT_%0 to start the automatic names at 1.
Data Type
An elementary data type defines the size and characteristics of a variable. Use the
Data Type drop-down list under the Declarations tab of the Properties box to
select an appropriate data type for a variable. The list below describes all available
data types. See the next section called “Restrictions” for applicability.
Restrictions
In functions and function blocks, you can select any data type from the list above
for any variable type (Input, Output, In/Out and Local). In programs, you can select
any data type for Local variables, but your selection for Input, Output and In/Out
variables is restricted to the following data types:
• BOOL
• DINT
• REAL
This limitation applies because Input, Output and In/Out variables must be
connected to Trident points (hardware addresses).
Variable Type
Use the Var Type field under the Declarations tab of the Properties box to select
one of the following variable types:
• Input
• Output
• In/Out
• Local
An Input is a variable used to supply a value to program, function block or function.
An Output is a variable used to return the result of an evaluation by a program,
function block or function.
An Input/Output is a variable that serves as both an Input and an Output.
A Local is a variable for internal logic only which cannot be connected to a Trident
point.
After placing a variable on your logic sheet, you can change its type through the
Properties box by selecting the desired variable type. For example, there is no tool
or command that allows you to place a variable of type In/Out on the logic sheet.
So you have to place another type of variable on the sheet, then go to the
Declarations tab of the Properties box and change the variable’s type to In/Out.
Initial Value
The Initial Value field under the Declarations tab is enabled for all variable types
in functions and function blocks, but only for local variables in programs. During
a Download All, the Trident sets the values of all variables either to zero or to the
initial value you have declared as a property of the variable.
Description
The Description field under the Declarations tab allow you to enter descriptive
text about a selected variable. Copy the %DESCRIPTION macro to the text box
under the Annotation tab if you want this descriptive text to be displayed in a
comment or annotation. For details, refer to the section called “Inserting Macros
into Comments or Annotations” later in this chapter.
Declaring Constants
Constants are usually limited to a single data type within a program, function block
or function. Place a constant symbol on your logic sheet using either the Constant
button in the Tools menu or the Constant command in the Tools...Insert menu.
Then double-click the constant symbol to display the Properties box, which has
two tabs: Constant and Annotation. This section covers the properties of a
constant in the order of their appearance in the tab pages.
Width Field
The plus (+) and minus (-) icons expand or shrink the width of the constant symbol
so you can use a longer name or fit the symbol into a smaller space.
Annotate Checkbox
Click the Annotation checkbox of the Constant tab to turn on the annotation
feature for a selected constant. Refer to the section below called “Properties under
the Annotate Tab” for more information.
Properties box displayed on top as you move from element to element declaring
properties.
The properties of functions can be understood in terms of the rules that govern
them:
• The inputs of most functions have a generic data type called ANY_NUM
according to the IEC 61131-3 standard.
• All of the inputs to a function must have the same data type.
• A function has only output, which must have the same data type as the
inputs.
• Some functions are extensible, which means you can add as many as 50
inputs to the function.
Inputs List
The names and data type of the inputs to a function are displayed in the Inputs list
of the function’s Properties box. All of the inputs to a function must have the same
data type. If they do not, TriStation generates a type mismatch error when you use
the Build Element (compile) command.
Some functions have inputs of type BOOL, but most inputs have the generic data
type called ANY_NUM according to the IEC 61131-3 standard. The ANY_NUM
data type includes ANY_REAL and ANY_INT data types. For more information
about generic data types, refer to the “Data Types” section in Chapter 1, “A
TriStation Project.”
Extensible Functions
Some functions are extensible, which means you can add as many as 50 inputs to
the function in one of two ways:
• Enter the desired number in the Number of Inputs field of the function’s
Properties box and press Confirm.
• Click and drag on the double line at the bottom of the function symbol until
the desired number of inputs appears.
The example on the preceding page shows the ADD function with the number of
inputs extended from two (the default) to seven.
If the number of inputs for a particular function cannot be changed, TriStation
displays a message to this effect in place of the Number of Inputs field on the
function’s Properties box.
Output of a Function
A function has only one output which must have the same data type as the inputs
to the function.
A circle on an input terminal means that the ON or OFF value of the input will be
inverted before being processed by the function. A circle on an output terminal
creates a NOT condition—in other words, the ON or OFF output value resulting
from processing by the function is inverted as it exits.
Width
The plus (+) and minus (-) icons expand or shrink the width of the function symbol
as desired.
Double-Space Option
Clicking on the Double-space option under the Terminals field makes the
function symbol twice as long and spaces the terminals for connecting variables
further apart. This makes room for additional inputs, variable annotation or
comments.
EN/ENO Parameters
Note The use of EN and ENO parameters is optional for the FBD language and
required for the LD language.
EN and ENO are type BOOL input and output parameters that detect and isolate
errors in LD and FBD logic. The EN (enable) input parameter enables invocation
of the function and carries power from the left power rail. The ENO (enable out)
output parameter indicates whether the function has detected an error and connects
either to the EN input of the next function or to the ground rail. When you click the
EN/ENO option in the Terminals field of a function’s Properties box, EN and
ENO parameters are displayed on either side of the function, as shown in the
following example:
If EN is False (0), the function has not been called, and the value of ENO is reset
to False (0). If EN is True (1), the function has been called, and ENO indicates
whether the function has detected an error.
If ENO is True, the function has not detected any errors. If ENO is False, the
function has detected an error, and evaluation of the network stops—the return
value is not written to any variable.
If EN/ENO is visible on any function in a network, then EN/ENO must be visible
on every function in the network. If there is more than one function with EN/ENO
visible in a network, then for every function except the last function, you must
connect the ENO output directly to the EN input of the next function. You must
not connect an ENO output to more than one EN input.
The ExENO.pt2 sample project on the TriStation CD demonstrates the use of
EN/ENO to detect and isolate errors in LD and FBD logic.
Instance Name
The Instance Name field of the Selected tab is used to identify each instance of a
function block as a separate variable in your program. When you place a function
block from the library onto the logic sheet, three asterisks (***) appear at the top
of the function block and in the Instance Name field, as shown in the example
above. You must replace the asterisks with a name or identifier which has up to 31
alphanumeric and underscore characters. All identifiers must begin with an alpha
character (A to Z) and must not include any imbedded spaces. Identifiers are not
case-sensitive.
Width
The plus (+) and minus (-) icons expand or shrink the width of the function block
symbol so you can use a longer name or fit the symbol into a smaller space.
EN/ENO Parameters
The option for EN (enable input) and ENO (enable output) parameters is not active
for function blocks in the FBD language.
Double-Space Option
Clicking on the Double-space option under the Terminals field makes the
function symbol twice as long and spaces the terminals for connecting variables
further apart. This makes room for additional inputs, variable annotation or
comments.
Including Comments
Comments are used to describe specific operations or tasks performed by a
program, function block or function within a project. There is no limitation on the
number of comment boxes per program or their placement on a logic sheet. You
can even draw comment boxes around, or on top of, any logic element.
Place a comment box on your logic sheet with either the Comment Tool on the
toolbar or the Insert...Comment command in the Tools menu. Double-click on the
comment box to bring up the Properties dialog box where you can enter comment
text, select macros for inclusion in the comment, and adjust the placement of the
comment box with regard to your logic elements.
Resize the comment box by clicking on the edge of the box, holding down the
mouse button and dragging, as you would resize any window in a Windows
application.
The Properties dialog box for comments has four tabs whose features are
described in the following sections.
Comment Tab
The Comment tab, as shown below, lets you adjust comment text in three ways:
• Left, right or center alignment
• Text size from 3 points to 24 points
• Single, double or no border around the comment box
Style Tab
There are three fields under the Style tab that allow you to edit a comment in
various ways:
Expand Macros
Click this option to display the actual values of the macros you have included in
the selected comment box.
Pickup-Drop Tab
This feature allows a comment box to capture logic elements so that they become
part of the comment. To “pickup” one or more elements, move the comment box
so that it entirely covers the elements to be captured (resizing the comment box if
necessary), then press Pickup. Press Drop to release the logic element from the
comment box.
Logic elements captured in a comment box are not executable, but if you later
release them from the comment box, they can be made executable.
The following is an example of an instance view with the monitor value turned on
and the default macro displayed for an input and output variable respectively:
There are two main ways to use variable annotation in a program or function block:
• Turn on the feature for your entire project as soon as you open a new project
• Turn on the feature for individual variables in your logic, one at a time
The Style box allows you to adjust the alignment of text in annotation boxes and
the borders around them, as well as the text size for each of the sheet template styles
(Sheet Template A, B, C or D).
The Default Macros or Text box allows you to set default macros for each class
of variable which automatically display information about the variables when you
select an instance view.
Program Variables are variable classes in programs whereas Non-program
Variables are variable classes in functions and function blocks. Refer to “Default
Macros for Annotation Boxes” under the upcoming section called “Using Macros”
for more information.
The sample instance view below was invoked from the FBD editor. The variable
annotations include the monitor value and expanded values of the default macro
called %PGM_INPUT which includes the:
• Tag Name
• I/O module type
• Trident point connection (hardware address) and Alias number
Using Macros
Macros, used in comments and variable annotations, are placeholders for the
insertion of text defined or calculated elsewhere in TriStation. There are two types
of macros, all of which begin with a percent (%) sign:
• A system macro has expanded values supplied by TriStation and cannot be
modified.
• A user-modifiable macro has expanded values supplied by the user—it can
include one or more system macros that you copy into it.
Examples of the two types of macros are shown in the Edit Macros dialog box that
follows. The sample dialog box also shows some default macros for variable
annotation and some platform descriptor macros. The default macros for variable
annotation are user-modifiable, whereas the platform descriptor macros are system
macros. All of these types of macros are described in the upcoming sections:
• Inserting macros into comments or annotations
• Working with user-modifiable macros
• Default macros for variable annotation
Note When you change the value of a macro, you are changing it for all
comments and annotations in which the macro is used throughout your project.
When a new project is created, these default macros for variable annotation are set
to the default values shown in the table below. You can modify the default values
of these macros to meet your specific requirements using the Edit Macros dialog
box. After the default values are modified, they will appear under the Variable
Annotations tab of the Project Options menu.
Sample Expanded
Macro Default Value
Macro
%PGM_INPUT %PPD_TAGNAME%PPD_CLASS P1.WATER_LOW
%PPD_LOCATION%PPD_ALIAS DI 03.04.13 10018
%PGM_OUTPUT %PPD_TAGNAME%PPD_CLASS P1.VALVE_ON
%PPD_LOCATION%PPD_ALIAS DO 02.03.07 00016
%PGM_IO %PPD_TAGNAME%PPD_CLASS P1.PROCESS_STATU
%PPD_LOCATION%PPD_ALIAS S MI 40252
%PGM_LOCAL %WHERE_USED PROCESS_COUNT
1(C7) 3(D5) 4(A2)
Sample Expanded
Macro Default Value
Macro
%FB_INPUT <no default> <no default>
%FB_OUTPUT <no default> <no default>
%FB_IO <no default> <no default>
%FB_LOCAL <no default> <no default>
There are four macros beginning with%PPD which are expanded by the Trident
platform descriptor and are not user-modifiable:
This chapter describes basic methods of writing logic in the LD language and
provides details on the use of LD editing tools.
Topics include:
“Basic Methods for Writing Logic” . . . . . . . . . . . . . . . . . . . . . . . . . 98
“LD Editing Tools” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
“Creating Executable Elements” . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
“Using Logic Sheets” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
“Links” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
“Power Rails” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
“Declaring Contacts and Coils” . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
“Declaring Local, Input and Output Variables” . . . . . . . . . . . . . . . 123
“Declaring Constants” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
“Declaring Functions and Function Blocks” . . . . . . . . . . . . . . . . . 133
“Using Network Dividers” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
“Comments, Variable Annotation and Macros” . . . . . . . . . . . . . . . 142
“Printing Logic Sheets” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
LD Editing Tools
To help you write and edit logic in the LD language, TriStation provides tools that
you can select from a pop-up menu, main menu and toolbar.
Pop-up Menu
Pressing the right mouse button while viewing an LD logic sheet displays a pop-up
menu either for a selected element or when no particular element is selected. All of
the commands in the pop-up menu are accessible from the LD toolbar and main
menu as well, except for the Size/Alignment commands described below.
Pop-up menu
for any empty area
Size/Alignment Commands
The pop-up menu’s Size/Alignment commands help you arrange multiple
elements on an LD logic sheet, as shown in the example below.
For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.
Access Keys
In the LD editor 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.
For more information, see Appendix A, “Keyboard & Mouse Shortcuts.”
Grid Display Update Selected Blocks Sheet Title... New Window TriStation 1131 Help
Zoom... Automatic Naming... Next Sheet Cascade Tip of the Day
Zoom to Fit... Annotate Instance... Previous Sheet Tile Horizontal Keyboard Shortcuts
Zone Display Select Tool (Arrow) Find Sheet... Tile Vertical Sample Projects
Network Numbers Insert... Append Sheet Close All Technical Support
IEC Display Mode Insert Sheet Arrange Icons About TriStation 1131...
Delete Sheet Show Properties Box TriStation 1131 Logo...
Sheet Template... Show Message Bar
Function (Block)...
(Vertical Message Bar)
Contact
Coil (Horizontal Message Bar)
Right Power Rail Hide Message Bar
Local Variable 1 PROGRAM: <program name>
Input Variable
Output Variable
Constant
Link
Comment
Horizontal Network Divider
Vertical Network Divicer
Edit Menu
Command Description
Undo Reverses the last action performed when editing a project
element (program, function, or function block).
Redo Reverses the last Undo command. This must be done
before any other editing is done.
Edit Session Opens a dialog box which displays a sequential list of
Journal actions undertaken during the most recent edit session.
Any previous state during the current edit session can be
recovered and displayed by selecting from the list.
Cut Cuts (deletes) selected items from the current sheet and
places them on the clipboard, erasing the previous
contents on the clipboard.
Copy Copies selected items from the current sheet and places
them on the clipboard.
Paste Pastes the current contents of the clipboard into the
current element.
Find Finds specific text within the current program, function or
function block. An options menu lets you select names
and types of various elements, text in comments and
captured elements, and sensitivity.
Replace Replaces specific text within the logic elements of the
current project element.
Select Network Selects all logic elements within a network for the current
Contents project element. At least one element (input, output,
variable) must already be selected.
Select Sheet Selects all elements on the current sheet.
Contents
Element Menu
Command Description
Save <element Saves the open element but not the entire project.
name>
Description Displays identifying information about the project
creator, creation date, etc. and allows you to select
read/write status and enter descriptive text.
Comment Allows you to select macros for use in comments within
Macros your logic.
Declarations Lists all of the variables on your logic sheet and allows
you to manipulate them in various ways. Can also be used
to declare variables before you place the variable
elements on the logic sheet.
Build Element Updates and compiles the current project element
(program, function, function block) without linking it to
the project.
Intermediate Displays source code that is generated in the Structured
Code Text language when the current element is compiled.
View Menu
Command Description
Grid Display Changes the background of the active window to
display or not display an editing grid for precise
placement of program elements.
Zoom Allows you to select the zoom view of your logic sheet
from preset and custom views.
Zoom to Fit Displays the entire logic sheet within the current
window.
Tools Menu
Command Description
Update Selected Updates selected out-of-date elements marked with a
Blocks red X in the active window.
Automatic Allows you to select a numeric pattern for the automatic
Naming naming of program elements.
Sheets Menu
Command Description
Sheet Title Allows you to edit the title of the current sheet
(displayed in the title block, window caption bar and
Window Menu list).
Next Sheet Displays the next sheet (for logic elements with
multiple sheets).
Previous Sheet Displays the previous sheet (for logic elements with
multiple sheets).
Find Sheet Allows you to find and select sheets by sheet title and
provides access to dialog boxes for insertion, deletion,
and appending of sheets.
Append Sheet Adds a new sheet to the end of the current project
element.
Insert Sheet Inserts a new sheet before the current sheet or before a
horizontal network boundary (if selected).
Delete Sheet Deletes the sheet that is currently displayed.
Sheet Template Selects a sheet template for the current sheet from a list
of available templates.
Current
View Rectangle
To create a new executable element in the LD editor, select the Ladder Diagram
option, and then select the type of element to create (Program, Function Block,
or Function). See the following section for help on selecting the element’s
Application Type attribute.
Programs
• A program can be defined with the Safety attribute or the Control attribute.
• A Safety program can use only functions and function blocks with the
Safety and Control attribute, and its variables can be connected only to
safety tagnames or tagnames that are shared for read access.
Control is the • A Control program can use functions and function blocks with the Control
default Application attribute, as well as the Safety and Control attribute. Its variables can be
attribute for all user- connected only to control tagnames or tagnames that are shared for read
defined elements. access.
Function Blocks
• A function block can be defined with the Control attribute or the Safety
and Control attribute.
• A Control function block can use functions and function blocks that have
either the Control attribute or Safety and Control attribute.
• A Safety and Control function block can use only functions and function
blocks that have the Safety and Control attribute.
Functions
• A function can be defined with the Control attribute or the Safety and
Control attribute.
• A Control function can use functions that have either the Control attribute
or Safety and Control attribute.
• A Safety and Control function can use only functions that have the Safety
and Control attribute.
You cannot change the Safety and Control attributes unless you successfully
build the element (have zero errors).
! CAUTION
If you change the attributes from Safety to Control or Safety & Control to
Control and do not successfully build the element, a non-safety user will still be
able to open and modify the element.
Links
In an LD program, links for interconnecting your logic elements are accessible by
means of the Link tool or the Link command in the Tools...Insert menu.
Links may be horizontal or vertical, as shown in the example below. The state of a
link is either ON or OFF (1 or 0), depending on power flow and its position within
the logic.
A horizontal link transmits the state of the element on its immediate left to the
element on its immediate right.
A vertical link intersects one or more horizontal link elements on each side, as
shown above. The state of a vertical link represents the Inclusive OR of the ON
states of the horizontal links on its left side:
• A vertical link is OFF if the states of all attached horizontal links to its left
are OFF.
• A vertical link is ON if the state of one or more attached horizontal links to
its left is ON.
The state of a vertical link is copied to all attached horizontal links on its right, but
is not copied to any attached horizontal links on its left.
Power Rails
Left and right power rails are the delimiters of LD networks. Whenever TriStation
presents you with a blank logic sheet for an LD element, the left power rail is
automatically supplied on the left side of the sheet. As shown in the example
below, the first element in every network must be linked to the left power rail,
which is considered ON at all times. The right power rail has an undefined status,
and may be explicit or implied. To create an explicit right power rail, use the Right
Power Rail Tool on the LD toolbar or select the Right Power Rail command
under the Tools...Insert menu.
Naming
Use the Properties box to give a variable name to a selected contact or coil as
shown in the example above, or name several contacts or coils automatically using
the Auto Name feature. A variable name or identifier can have up to 31
alphanumeric and underscore characters. All identifiers must begin with an alpha
character (A to Z) and must not include any imbedded spaces. Identifiers are not
case-sensitive.
Width
The plus (+) and minus (-) icons of the Selected tab expand or shrink the width of
the selected contact or coil symbol so you can use a longer name or fit the symbol
into a smaller space.
Annotation
The Annotation checkbox of the Selected tab allows you to apply annotation on
to an individual contact or coil. An annotation is a special kind of comment box
attached to the bottom of a contact or coil which can display the value of its
variable name during execution, macros and descriptive text. The values during
execution and the macros are displayed only in an instance view of your program
logic. Refer to the section called “Comments, Variable Annotation and Macros”
later in this chapter for more information.
Contact Type
If you are declaring properties for a contact, the Selected tab of the Properties
dialog box will include a field for Contact Type. The following types of contacts
are available for selection in a drop-down list (pictured below):
Coil Type
If you are declaring properties for a coil, the Selected tab of the Properties dialog
box will include a field for Coil Type. The following types of coils are available
for selection in a drop-down list (pictured below):
Automatic Naming
The Auto Name feature, accessible from the Selected tab, is helpful when you
have several similar contacts or coils and want to name them according to a
convention. For example, you have 50 gas detector inputs, and you want to call
them GAS_DETECT_1, GAS_DETECT_2, GAS_DETECT_3, etc. Automatic
naming lets you select the desired prefix and the increment you wish to use. In this
example, you would enter GAS_DETECT_%0 to start the automatic names at 1.
Variable Type
Use the Var Type field under the Declarations tab to select one of the following
types for the variable name associate with a contact or coil:
• Input
• Output
• In/Out
• Local
An Input is a variable used to supply a value to program, function block or function.
An Input variable must be connected to a Trident point.
An Output is a variable used to return the result of an evaluation by a program,
function block or function. An Output variable must be connected to a Trident
point.
An Input/Output is a variable that serves as both an Input and an Output. An
Input/Output variable must be connected to a Trident point.
A Local is a variable for internal logic only which cannot be connected to a Trident
point.
Description
The Description field under the Declarations tab allow you to enter descriptive
text about a selected contact or coil. Copy the %DESCRIPTION macro to the text
box under the Annotation tab if you want this descriptive text to be displayed in a
comment or annotation. For details, see “Inserting Macros into Comments or
Annotations” on page 151.
Naming
Use the Properties dialog box to name a selected variable as shown in the example
above, or name several variables automatically using the Auto Name feature. A
variable name or identifier can have up to 31 alphanumeric and underscore
characters. All identifiers must begin with an alpha character (A to Z) and must not
include any imbedded spaces. Identifiers are not case-sensitive.
Width
The plus (+) and minus (-) icons of the Selected tab expand or shrink the width of
the selected variable symbol so you can use a longer name or fit the symbol into a
smaller space.
Annotation
The Annotation checkbox of the Selected tab allows you to apply variable
annotation on a per-variable basis. A variable annotation is a special kind of
comment box attached to the bottom of a variable which can display the value of
the variable during execution, macros and descriptive text. The values of the
variable and the macros are displayed only in an instance view of your program
logic. Refer to the section called “Comments, Variable Annotation and Macros”
later in this chapter for more information.
Automatic Naming
The Auto Name feature, accessible from the Selected tab, is helpful when you
have several similar variables and want to name them according to a convention.
For example, you have 50 gas detector inputs, and you want to call them
GAS_DETECT_1, GAS_DETECT_2, GAS_DETECT_3, etc. Automatic naming
lets you select the desired prefix and the increment you wish to use. In this
example, you would enter GAS_DETECT_%0 to start the automatic names at 1.
Data Type
An elementary data type defines the size and characteristics of a variable. Use the
Data Type drop-down list under the Declarations tab of the Properties dialog box
to select an appropriate data type for a variable. The list below describes all
available data types. See the next section called “Restrictions” for applicability.
Restrictions
In functions and function blocks, you can select any data type from the list above
for any variable type (Input, Output, In/Out and Local). In programs, you can select
any data type for Local variables, but your selection for Input, Output and In/Out
variables is restricted to the following data types:
• BOOL
• DINT
• REAL
This limitation applies because Input, Output and In/Out variables must be
connected to Trident points (hardware addresses).
Variable Type
Use the Var Type field under the Declarations tab of the Properties box to select
one of the following variable types:
• Input
• Output
• In/Out
• Local
An Input is a variable used to supply a value to program, function block or function.
An Output is a variable used to return the result of an evaluation by a program,
function block or function.
An Input/Output is a variable that serves as both an Input and an Output.
A Local is a variable for internal logic only which cannot be connected to a Trident
point.
Initial Value
The Initial Value field under the Declarations tab is enabled for all variable types
in functions and function blocks, but only for local variables in programs. During
a Download All, the Trident sets the values of all variables either to zero or to the
initial value you have declared as a property of the variable.
Description
The Description field under the Declarations tab allow you to enter descriptive
text about a selected variable. Copy the %DESCRIPTION macro to the text box
under the Annotation tab if you want this descriptive text to be displayed in a
comment or annotation. For details, see “Inserting Macros into Comments or
Annotations” on page 151.
Declaring Constants
Constants are usually limited to a single data type within a program, function block
or function. Place a constant symbol on your logic sheet using either the Constant
button in the Tools menu or the Constant command in the Tools...Insert menu.
Then double-click the constant symbol to display the Properties box, which has
two tabs: Constant and Annotation. This section covers the properties of a
constant in the order of their appearance in the tab pages.
Width Field
The plus (+) and minus (-) icons expand or shrink the width of the constant symbol
so you can use a longer name or fit the symbol into a smaller space.
Annotate Checkbox
Click the Annotation checkbox of the Constant tab to turn on the annotation
feature for a selected constant. Refer to the section below called “Properties under
the Annotate Tab” for more information.
The properties for functions can be understood in terms of the rules that govern
them:
• The inputs of most functions have a generic data type called ANY_NUM
according to the IEC 61131-3 standard.
• All of the inputs to a function must have the same data type.
• A function has only output, which must have the same data type as the
inputs.
• Some functions are extensible, which means you can add as many as 50
inputs to the function.
• The EN and ENO parameters must be connected to enable inputs and
outputs to and from the function.
Inputs List
The names and data type of the inputs to a function are displayed in the Inputs list
of the Properties dialog box. All of the inputs to a function must have the same
data type. If they do not, TriStation generates a type mismatch error when you use
the Build Element (compile) command.
Some functions have inputs of type BOOL, but most inputs have the generic data
type called ANY_NUM according to the IEC 61131-3 standard. The ANY_NUM
data type includes ANY_REAL and ANY_INT data types. For more information
about generic data types, see “Data Types” in Chapter 1, “A TriStation Project.”
Extensible Functions
Some functions are extensible, which means you can add as many as 50 inputs to
the function in one of two ways:
• Enter the desired number in the Number of Inputs field of the function’s
Properties box and press Confirm.
• Click and drag on the double line at the bottom of the function symbol until
the desired number of inputs appears.
The example on the preceding page shows the ADD function with the number of
inputs extended from two (the default) to seven.
If the number of inputs for a particular function cannot be changed, TriStation
displays a message to this effect in place of the Number of Inputs field on the
function’s Properties box.
Output of a Function
A function has only one output which must have the same data type as the inputs
to the function.
A circle on an input terminal means that the ON or OFF value of the input will be
inverted before being processed by the function. A circle on an output terminal
creates a NOT condition—in other words, the ON or OFF output value resulting
from processing by the function is inverted as it exits.
Width
The plus (+) and minus (-) icons expand or shrink the width of the function symbol
as desired.
Double-Space Option
Clicking on the Double-space option under the Terminals field makes the
function symbol twice as long and spaces the terminals for connecting variables
further apart. This makes room for additional inputs, variable annotation or
comments.
EN/ENO Parameters
Note In FBD logic, the use of EN and ENO is optional. To display the EN/ENO
parameters of a function in FBD, click the checkbox labeled EN/ENO in the
Properties dialog box.
EN and ENO are type BOOL input and output parameters that detect and isolate
errors in LD and FBD logic. The EN (enable) input parameter enables invocation
of the function and carries power from the left power rail. The ENO (enable out)
output parameter indicates whether the function has detected an error and connects
either to the EN input of the next function or to the ground rail. The EN and ENO
parameters are displayed on the left and right sides of a function respectively, as
shown in this example:
If EN is False (0), the function has not been called, and the value of ENO is reset
to False (0). If EN is True (1), the function has been called, and ENO indicates
whether the function has detected an error.
If ENO is True, the function has not detected any errors. If ENO is False, the
function has detected an error, and evaluation of the network stops—the return
value is not written to any variable.
If EN/ENO is visible on any function in a network, then EN/ENO must be visible
on every function in the network. If there is more than one function with EN/ENO
visible in a network, then for every function except the last function, you must
connect the ENO output directly to the EN input of the next function. You must
not connect an ENO output to more than one EN input.
The ExENO.pt2 sample project on the TriStation CD demonstrates the use of
EN/ENO to detect and isolate errors in LD and FBD logic.
Instance Name
The Instance Name field of the Selected tab is used to identify each instance of a
function block as a separate variable in your program. When you place a function
block from the library onto the logic sheet, three asterisks (***) appear at the top
of the function block and in the Instance Name field, as shown in the example
above. You must replace the asterisks with a name or identifier which has up to 31
alphanumeric and underscore characters. All identifiers must begin with an alpha
character (A to Z) and must not include any imbedded spaces. Identifiers are not
case-sensitive.
Inputs List
A function block selected from the TriStation library can have multiple inputs. The
names and data type of the inputs are displayed in the Inputs list of the function
block’s Properties dialog box. The only property of a function block input that you
can modify is inversion, if the input is of type BOOL. Refer to the upcoming
section called “Inverting Inputs or Outputs” for more information.
Outputs List
A function block selected from the project library can have multiple outputs. The
names and data type of the outputs are displayed in the Outputs list of the function
block’s Properties dialog box. The only property of a function block output that
you can modify is inversion, if the output is of type BOOL. Refer to the upcoming
section called “Inverting Inputs or Outputs” for more information.
Width
The plus (+) and minus (-) icons expand or shrink the width of the function block
symbol so you can use a longer name or fit the symbol into a smaller space.
Double-Space Option
Clicking on the Double-space option under the Terminals field makes the
function symbol twice as long and spaces the terminals for connecting variables
further apart. This makes room for additional inputs, variable annotation or
comments.
The Declaration... dialog box, accessible from the Declaration tab, allows you to
manipulate variables in a number of different ways. For more information, refer to
the section called “Declaration Dialog Box” earlier in this chapter.
Including Comments
Comments are used to describe specific operations or tasks performed by a
program, function block or function within a project. There is no limitation on the
number of comment boxes per program or their placement on a logic sheet. You
can even draw comment boxes around, or on top of, any logic element.
Place a comment box on your logic sheet with either the Comment Tool on the
toolbar or the Insert...Comment command in the Tools menu. Double-click the
comment box to bring up the Properties dialog box where you can enter comment
text, select macros for inclusion in the comment, and adjust the placement of the
comment box with regard to your logic elements.
Resize the comment box by clicking on the edge of the box, holding down the
mouse button and dragging, as you would resize any window in a Windows
application.
The Properties dialog box for comments has four tabs whose features are
described in the following sections.
Comment Tab
The Comment tab, as shown below, lets you adjust comment text in three ways:
• Left, right or center alignment
• Text size from 3 points to 24 points
• Single, double or no border around the comment box
Style Tab
There are three fields under the Style tab that allow you to edit a comment in
various ways:
Expand Macros
Click this option to display the actual values of the macros you have included in
the selected comment box.
Pickup-Drop Tab
This feature allows a comment box to capture logic elements so that they become
part of the comment. To “pickup” one or more elements, move the comment box
so that it entirely covers the elements to be captured (resizing the comment box if
necessary), then press Pickup. Press Drop to release the logic element from the
comment box.
Logic elements captured in a comment box are not executable, but if you later
release them from the comment box, they can be made executable.
The following is an example of an instance view with the monitor value turned on
and the default macro displayed for an input and output variable respectively:
There are two main ways to use variable annotation in a program or function block:
• Turn on the feature for your entire project as soon as you open a new project
• Turn on the feature for individual variables in your logic, one at a time
The Default Macros or Text box allows you to set default macros for each class
of variable which automatically display information about the variables when you
select an instance view.
Program Variables are variable classes in programs whereas Non-program
Variables are variable classes in functions and function blocks. Refer to “Default
Macros for Annotation Boxes” under the upcoming section called “Using Macros”
for more information.
Using Macros
Macros, used in comments and variable annotations, are placeholders for the
insertion of text defined or calculated elsewhere in TriStation. There are two types
of macros, all of which begin with a percent (%) sign:
• A system macro has expanded values supplied by TriStation and cannot be
modified.
• A user-modifiable macro has expanded values supplied by the user—it can
include one or more system macros that you copy into it.
Examples of the two types of macros are shown in the Edit Macros dialog box that
follows. The sample dialog box also shows some default macros for variable
annotation and some platform descriptor macros. The default macros for variable
annotation are user-modifiable, whereas the platform descriptor macros are system
macros. All of these types of macros are described in the upcoming sections:
• Inserting macros into comments or annotations
• Working with user-modifiable macros
• Default macros for variable annotation
Note The Edit Macros dialog box is accessible from the Comment tab of the
Properties dialog box for comments, or from the Comment Macros command
under the Elements menu.
Note When you change the value of a macro, you are changing it for all
comments and annotations in which the macro is used throughout your project.
When a new project is created, these default macros for variable annotation are set
to the default values shown in the table below. You can modify the default values
of these macros to meet your specific requirements using the Edit Macros dialog
box. After you modify the default values, they will appear in their modified state
under the Variable Annotations tab of the Project Options menu.
Sample Expanded
Macro Default Value
Macro
%PGM_INPUT %PPD_TAGNAME%PPD_CLASS P1.WATER_LOW
%PPD_LOCATION%PPD_ALIAS DI 03.04.13 10018
%PGM_OUTPUT %PPD_TAGNAME%PPD_CLASS P1.VALVE_ON
%PPD_LOCATION%PPD_ALIAS DO 02.03.07 00016
%PGM_IO %PPD_TAGNAME%PPD_CLASS P1.PROCESS_STATU
%PPD_LOCATION%PPD_ALIAS S MI 40252
%PGM_LOCAL %WHERE_USED PROCESS_COUNT
1(C7) 3(D5) 4(A2)
Sample Expanded
Macro Default Value
Macro
%FB_INPUT <no default> <no default>
%FB_OUTPUT <no default> <no default>
%FB_IO <no default> <no default>
%FB_LOCAL <no default> <no default>
There are four macros beginning with %PPD which are expanded by the Trident
platform descriptor and are not user-modifiable:
This chapter describes basic methods of writing logic in the ST language and
provides details on the use of ST editing tools.
Topics include:
“Basic Methods for Writing Logic” . . . . . . . . . . . . . . . . . . . . . . . . 158
“ST Editing Tools” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
“Creating Executable Elements” . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
“Declarations” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
“Expressions” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
“Statements” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
“ST Language Examples” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
“Implementation Exceptions” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
“Printing Logic Sheets” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
3 Use the Build command in the Element menu to compile the logic. Correct any
errors displayed in the Message Bar and build again until there are no errors.
4 Test your logic in the Emulator Control Panel, returning to the logic to make any
necessary modifications.
5 When testing of the logic is finished, it is time to create your project
configuration, as explained in Chapter 5, “Configuration Editor—Basic
Concepts.”
ST Editing Tools
To help you write and edit logic in the ST language, TriStation provides tools that
you can select from a pop-up menu, main menu, and toolbar.
Pop-up Menu
Pressing the right mouse button while viewing an ST logic sheet displays a pop-up
menu. All of the commands in the pop-up menu are accessible from the ST toolbar
and main menu.
For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.
Access Keys
In the ST editor menus, underlined characters are access 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.
For more information, see Appendix A, “Keyboard & Mouse Shortcuts.”
Edit Menu
Command Description
Undo Reverses the last action performed when editing a project
element (program, function, or function block).
Redo Reverses the last Undo command. This must be done
before any other editing is done.
Edit Session Opens a dialog box that displays a sequential list of
Journal actions undertaken during the most recent edit session.
Any previous state during the current edit session can be
recovered and displayed by selecting from the list.
Cut Cuts (deletes) selected items from the current sheet and
places them on the clipboard, erasing the previous
contents.
Copy Copies selected items from the current sheet and places
them on the clipboard.
Paste Pastes the current contents of the clipboard into the
current project element.
Find Finds specific text within the current program, function or
function block. A dialog box lets you select search criteria
for the text.
Replace Searches for and replaces specified text in the current
project element.
Read from file Reads text from an external file into the current structured
text project element.
Write to file Opens the Save As dialog allowing you to write the
contents of the current structured text project element to
an external text file.
Element Menu
Command Description
Save Element Saves the open element but not the entire project.
View Menu
Command Description
Read Only Designates the current project element as “Read Only”
for all users. Changing the element from “Read Only”
to one that can be edited can only be done by the owner
of the project element.
Overstrike Mode Allows you to overwrite (as opposed to inserting) text
in the current project element.
To create a new executable element in the ST editor, select the Structured Text
option, and then select the type of element to create (Program, Function Block,
or Function). See the following section for help on selecting the element’s
Application Type attribute.
Programs
• A program can be defined with the Safety attribute or the Control attribute.
• A Safety program can use only functions and function blocks with the
Safety and Control attribute, and its variables can be connected only to
safety tagnames or tagnames that are shared for read access.
Control is the • A Control program can use functions and function blocks with the Control
default Application attribute, as well as the Safety and Control attribute. Its variables can be
attribute for all user- connected only to control tagnames or tagnames that are shared for read
defined elements. access.
Function Blocks
• A function block can be defined with the Control attribute or the Safety
and Control attribute.
• A Control function block can use functions and function blocks that have
either the Control attribute or Safety and Control attribute.
• A Safety and Control function block can use only functions and function
blocks that have the Safety and Control attribute.
Functions
• A function can be defined with the Control attribute or the Safety and
Control attribute.
• A Control function can use functions that have either the Control attribute
or Safety and Control attribute.
• A Safety and Control function can use only functions that have the Safety
and Control attribute.
You cannot change the Safety and Control attributes unless you successfully
build the element (have zero errors).
! CAUTION
If you change the attributes from Safety to Control or Safety & Control to
Control and do not successfully build the element, a non-safety user will still be
able to open and modify the element.
Declarations
This section explains how to declare programs, function blocks, functions, input
and output variables, local variables and function block instances, as well as how
to invoke functions and functions block instances.
Declaring Programs
A program is the basic programming unit within a TriStation project. Each
program begins with a declaration statement simply “declaring” that it is a
program. The declaration statement defines the program name, task, program type,
and program inputs and outputs. The end of the program is designated by the
END_PROGRAM statement.
Example:
PROGRAM Example_Program1
(*Input variable declarations*)
VAR_INPUT
I1 : DINT ;
I2 : DINT;
END_VAR
(* Output variable declarations *)
VAR_OUTPUT
Q1 : DINT ;
END_VAR
(* Program Body *)
Q1 := I1 + I2 ;
END_PROGRAM
Any function block previously declared can be used in the declaration of another
function block or program. The scope of an instance of a function block is local to
the function block or program that declares the instance.
Declaring Functions
Functions begin with a declaration statement simply “declaring” that they are
functions using the FUNCTION Name statement. Declaration statements define
functions in terms of the instance name, task, and function inputs and outputs. The
end of the function is designated by the END_FUNCTION statement.
The values of variables declared in a function do not persist between invocations
of the function and exist only during each execution of the function. In other words,
multiple invocations of the same function with the same arguments always yield
the same result. TriStation allows a maximum of 400 variables (input and local) to
be declared in each function. Unlike function blocks, functions are executed
directly and do not need to be instanced.
In user-derived functions, if no value is assigned to the function output, the return
value is the default initial value. If there is no statement that assigns a value to the
function output, a compiler error occurs.
Example:
FUNCTION Result: DINT
VAR_INPUT
(* Variable Declarations *)
IN1 : DINT ;
IN2 : DINT ;
The name of the END_VAR
(Result) is also the (* Function Body *)
name of the return Result := IN1 + IN2 ;
variable. END_FUNCTION
Example:
FUNCTION_BLOCK REF_COUNTER
(* Variable Declarations *)
VAR_INPUT
COUNTDOWN : BOOL ;(* 1 = reset, 0 = calculate *)
LOAD : BOOL;
PRESET : INT;
END_VAR
VAR_OUTPUT
STATUS : BOOL ; (* State => 1 = resetting, 0 = calculating
*)
CountValue : INT;
END_VAR
VAR
COUNTER : CTD; (* Declares COUNTER as a CTD function block
*)
END_VAR
(* Function Block Body *)
COUNTER(CD := CountDown, LD := Load, PV := Preset);
CountValue := COUNTER.CV;
END_FUNCTION_BLOCK
Expressions
An expression is a sequence of variable or constant operands and operators that
compute a value. For example, an expression to calculate the total area of two
rectangles could be written as follows:
(RectA_width * RectA_height) + (RectB_width * RectB_height)
Order of Evaluation
Expressions are evaluated in a specific order, depending on the precedence of the
operators and/or sub-expressions. Parentheses are used to isolate sub-parts of an
expression and prioritize the evaluation of expressions. Expressions within
parentheses have the highest precedence and are always evaluated first. Other
operators are subsequently evaluated based on their precedence. When operators
have equal precedence, they are evaluated from left to right.
The following table shows the order of evaluation or precedence for the Arithmetic
and Boolean operators:
Statements
The ST language uses various constructs and statements for invoking functions and
function blocks, performing conditional evaluation of statements, and repeating
specific sections of code (iteration). ST supports the following types of statements.
• Assignment statements
• Conditional statements
• Function and function block control statements
• Selection statements
Assignment Statements
An assignment statement replaces the current value of a variable by evaluating an
expression. An assignment statement consists of a variable reference on the left
side of the assignment operator and an expression to be evaluated on the right side
of the assignment operator. In the following example, the value of variable V1 is
replaced by the current value of variable E1.
V1 := E1;
In the following example, the function return variable SIMPLE is replaced by the
result of the expression A * B/C.
FUNCTION SIMPLE : REAL
(* Variable Declarations *)
VAR_INPUT
A : REAL;
B : REAL;
C : REAL;
END_VAR
SIMPLE := A * B / C; (* Assign function return value*)
END_FUNCTION
Note The variable and the expression must have the same data type.
Conditional Statements
Conditional statements specify that a statement or group of statements will execute
when certain conditions exist (for example, if an associated boolean expression is
true). If the condition is false, the statement or group of statements will not execute;
or other, optional statement groups will execute (for example, ELSE or ELSIF
statements).
Statements can be executed depending on the value returned by a boolean
expression by using IF..THEN or IF..THEN..ELSE statements.
Format:
IF RESET THEN
SUM := 0 ;
SAMPLE_CNT := 0 ;
XOUT := 0 ;
ELSE
SUM := SUM + CURRENT_VALUE ;
SAMPLE_CNT := SAMPLE_CNT + 1 ;
XOUT := SUM / SAMPLE_CNT;
END_IF;
STATUS := RESET;
Selection Statements
Selection statements select one statement or a group of component statements for
execution based on specific conditions. These include IF statements.
Example:
D := B * B - 4 * A * C ;
IF D < 0.0 THEN NROOTS := 0 ; (* Selection statement begins
here *)
ELSIF D = 0.0 THEN
NROOTS := 1;
X1 := -B/ (2.0 * A) ;
ELSE
NROOTS := 2 ;
X1 := ( - B + SQRT (D)/(2.0 * A) ;
X2 := ( - B - SQRT (D)/(2.0 * A) ;
END_IF;
ST Language Examples
The following examples demonstrate some of the capabilities and structures of the
ST language that were described on the preceding pages.
Invoking a Function
The following ST example invokes a function called AVG_Function:
FUNCTION AVG_Function : REAL
(* External Interface *)
(* Put your input variable declarations here *)
VAR_INPUT
Input1 : REAL ;
Input2 : REAL ;
Input3 : REAL ;
END_VAR
VAR
SUM : REAL ;
END_VAR
(* Function Body *)
SUM := Input1 + Input2 + Input3 ;
AVG_Function := SUM / 3.0 ;
END_FUNCTION
Implementation Exceptions
Currently TriStation does not allow the following kinds of statements in ST
elements:
• CASE statements
• Control statements such as RETURN and EXIT
• Iteration statements
Configuration Editor—
Basic Concepts
This chapter explains what a configuration is and gives basic instructions for
creating one.
Topics include:
“What is a Configuration?” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
“Using Configuration Tools” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
“Developing a Configuration” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
“Allocating I/O Modules” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
“Allocating Memory Points” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
“Declaring Tagnames for Trident Points” . . . . . . . . . . . . . . . . . . 198
“Declaring Program Instances” . . . . . . . . . . . . . . . . . . . . . . . . . . 201
“Connecting Program Instance Variables to Trident Points” . . . 204
“Connecting Program Instance Variables to System Attributes” 208
“Building the Configuration” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
What is a Configuration?
Before you can download an application to the Trident controller, you must define
its configuration using the Configuration editor. A configuration consists of:
• The I/O modules that the application requires and their positions within the
Trident controller
• Tagnames for the Trident I/O points and memory points that your
application is going to access
• Program instances for programs that you will download
• Connections between your programs’ inputs and outputs and the Trident
points with tagnames
BOILER_1 is an instance of the program type BOILER. Unlike the inputs and
outputs of a function block, a program’s inputs and outputs can only be connected
to points that have tagnames. In this example, INPUT_PNT_1 through
INPUT_PNT_3 are tagnames for Input points; and OUTPUT_PNT_1 through
OUTPUT_PNT_3 are tagnames for Output points.
For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 1
Access Keys
In the Configuration editor menus, underlined characters are access 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.
For more information, see Appendix A, “Keyboard & Mouse Shortcuts.”
Expand One Level Program Instances Compare to Instance View New Window TriStation 1131 Help
Expand Branch Memory Points Last Download Connections Wizard Cascade Tip of the Day
Expand All Input Points Select Tool Tile Horizontal Keyboard Shortcuts
Collapse Branch Output Points Select and Insert Tile Vertical Sample Projects
Memory Allocation Module Close All Technical Support
Hardware Allocation Insert Module Arrange Icons About TriStation 1131...
SOE Blocks Show Properties Box TriStation 1131 Logo...
Show System Attributes Show Message Bar
Zoom... (Vertical Message Bar)
Zoom to Fit (Horizontal Message Bar)
Hide Message Bar
1 PROGRAM: <name>
Edit Menu
Command Description
Undo Reverses the last edit of a variable, function or function
block.
Redo Reverses the last Undo command. This must be done
before any other editing is done.
Edit Session Opens a dialog box which displays a sequential list of
Journal actions undertaken during the most recent edit session.
Any previous state during the current edit session can
be recovered and displayed by selecting from the list.
Cut Cuts (deletes) selected items from the current
configuration and places them on the clipboard, erasing
the previous contents.
Element Menu
Command Description
Save Configuration Saves the current configuration.
Tree Menu
Command Description
Expand One Level Expands a selected tree node by one level.
Expand Branch Expands a selected tree node to all levels.
Expand All Expands the whole tree to all levels.
Tree Menu
Command Description
Collapse Branch Collapses a selected branch of the tree.
View Menu
Command Description
Program Instances Displays the Program Instance view.
Commands Menu
Command Description
Compare to Last Allows you to do an off-line comparison of the current
Download configuration with the last configuration that was
downloaded to the Trident.
Tools Menu
Command Description
Instance View Opens a read-only annotated view of the program logic
for a selected program instance.
Select and Insert Opens the Insert Module dialog box and allows you to
Module select a module from the list and place it on the
hardware allocation workspace.
Insert Module Allows you to place the previously selected module on
the hardware allocation workspace. If no module was
previously selected, the Insert Module dialog box
opens so you can select the desired module from a list.
Note TriStation automatically saves the list options, so the next time you select
the view, the column positions and sort order are preserved.
Developing a Configuration
One of TriStation’s main benefits is flexibility of development methods, including
the methods for developing a configuration. You can do configuration tasks in any
order that turns out to be effective, assuming that you have already written your
programs and other executable elements. These are the basic steps for developing
a configuration:
1 Allocate I/O modules for the Trident controller.
2 Declare tagnames for Input, Output and Memory points.
3 Declare program instances.
4 Connect program instance variables to points with tagnames.
5 Connect program instance variables to system attributes.
6 Build the configuration.
The chart on the following page shows which TriStation component or components
correspond to each functional step. Upcoming sections discuss each step in more
detail.
Configuration Editor
Hardware Allocation
Memory Allocation
Connect Program
Instance Variables Connect to Attributes
to System Attributes Dialog Box
Hardware
Allocation View
The Trident V1.0 controller supports a maximum of six I/O modules in any
combination. See the Trident Planning & Installation Guide for I/O module
specifications, status indicator tables, physical installation instructions and other
information concerning the use of I/O modules.
Note When you start a new project, TriStation automatically pre-installs the
Main Processors (MPs) in the configuration. For the Trident V1.0 controller, only
the MPs have user-configurable parameters. See “Configuring Main Processors”
on page 214 for instructions.
Note To enlarge your view of the hardware allocation workspace, use the Zoom
tool on the toolbar. See “Enlarged View of Elements” on page 25 for more
Zoom button information.
Note Click the push pin icon in the upper left corner of the Properties box to
keep it on top of all other views and reflect each successive module you select.
Memory
Allocation View
Note Memory allocation is fixed at Download All time, so you must make
adjustments beforehand.
Note Trident points with tagnames are also known as global variables in IEC
61131-3 standard terminology.
Examples
A Trident point that could be accessible to all program instances within a TriStation
project is an Input point that represents a general alarm in the plant. In each
program instance, you could declare an Input called GENERAL_ALARM, and
connect it to the point which is also called GENERAL_ALARM. All of the
program instances can be connected to the same Trident point, but for safety
reasons, you should restrict which program instances can write to the point.
However, Trident points do not necessarily correspond to physical points in the
Trident controller. For example, you could declare an Aliased Memory point
whose sole purpose is to make certain values accessible to an external device. The
program variable that supplies these values would be connected to the Trident point
using the methods described in “Declaring Program Instances” on page 201.
Steps to Follow
▼ To declare the tagname of a Trident point:
1 Open a project which contains at least one Digital Input or Analog Input
module, or add such a module using the Insert Module dialog box.
2 Go to the Configuration editor.
3 Expand the Trident Points branch of the configuration tree to display all the
types of available points (Memory, Input and Output).
The available points correspond to I/O modules that have already been installed.
See“Changing Memory Allocation” on page 234 for details.
4 For this example, click Input Points on the configuration tree to display the
named and {not yet named} points.
5 Double-click a {not yet named} point to display the Declaration tab of the
Properties dialog box, as shown below:
Declaring the
Tagname for a
Trident Point
See “Specifying Point Properties” beginning on page 238 for information on the
point properties fields, as well as different methods for declaring tagnames,
assigning aliases, selecting a point’s safety or control (non-safety) attribute, and
changing a point’s True and False state colors.
Move Tagname
Options Dialog
Box
Input/Output Con-
nections View
The next step is to connect the program instance variables to Trident points with
tagnames, using one of these facilities:
• The Connect to Points dialog
• The Connect to Instances dialog
• The Connections Wizard
In the example shown below, the name of the program instance is P2.
4 Double-click a program instance variable to open the Properties dialog box.
This is P1.CAUSE_1 in the example below.
Note Click the push pin icon in the upper left corner of the Properties box to
keep this dialog box on top of other views.
Push Pin
Connecting Vari-
ables to Points
with Tagnames
9 If you haven’t yet declared the point to which you want to connect a program
instance variable, double-click ? <New Tagname> to open Quick Tagname
Setup:
Quick Tagname
Setup Dialog Box
Connecting a Tag-
name to a Variable
9 The Properties box will stay open if you select other tagnames in the same
point view for connection to program instance variables.
10 Click the Go To button to find the connection for a selected tagname in the
Program Instances view.
6 For this example, select 01:02: D03401_01_02 (the Digital Output module
installed in IOP 1, Slot 1 of your hardware allocation) in the Display box.
7 Also in the Display box, select the View Module Attributes option.
8 In the Attributes list, click the attribute called D03401_01_02.LockLeft.
9 Click the Connect button.
10 Close the Properties box and click away from the selected program instance
variable to see the newly connected attribute and it properties displayed in red.
Connecting a
Program Instance
Variable to a
Module Attribute
If there are any error messages in the Message Bar, double-click on each one and
TriStation will highlight the areas where the errors have occurred so you can begin
debugging. Click the right mouse button to display a menu (shown at right above)
of options for dealing with errors, including the Jump to Source command which
jumps directly to an error source.
Configuration Editor—
Advanced Topics
This chapter explains how to use the advanced features of the Configuration editor.
Topics include:
“Configuring Main Processors” . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
“Configuring the Communication Module” . . . . . . . . . . . . . . . . . . 222
“Configuring the Pulse Input Module” . . . . . . . . . . . . . . . . . . . . . . 231
“Changing Memory Allocation” . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
“Allocating Memory for Peer-to-Peer Operations” . . . . . . . . . . . . 237
“Specifying Point Properties” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
“Exporting and Importing Point Properties” . . . . . . . . . . . . . . . . . . 255
“Compare to Last Download” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
“Using the SOE Capability” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
“Using the Connections Wizard” . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Node Name
The Node Name parameter specifies the TriNode (Trident node or controller) to
which you will download your TriStation project. For the TriNode, you have the
following choices:
Write access depends on whether controls are configured to allow it. For more
information, see “Overview of Write Controls” on page 372.
The parameters that you set on the Operating Parameters tab are as follows.
Restart on Power Up
This parameter is used to specify whether you want the Trident system to
automatically restart on power-up. By default, this option is unchecked.
To configure a serial port, select the following properties as needed. The properties
you select for each serial port must match the characteristics of the Modbus device
it is connected to.
Port Selection
The Port Selection setting identifies the MP serial port to which the communication
cable is connected. Select Left, Middle, or Right, depending on which serial port
your cable is physically connected to. For a diagram of the MP Baseplate including
the serial ports, see the Trident Communication Guide.
Click the Copy Current Setup to other Serial Ports button to copy the current port
configuration options to the other serial ports on the MP Baseplate.
Modbus Protocol
The Modbus Protocol setting identifies the type of protocol to be used. For an MP
serial port, Slaveport RTU is the only choice. For information about the RTU
mode, see the Trident Communication Guide.
Baud Rate
The Baud Rate identifies the transmission speed.
Select 1200, 1400, 2400, 4800, 19200, 38400, 57600, or 115200.
Data Bits
The Data Bits setting is fixed at 8 Bits. You cannot select 7 Bits.
Stop Bits
The Stop Bits setting identifies whether 1 Bit or 2 Bits is transmitted after each
character.
Parity
The Parity setting indicates whether to use parity checking on the transmitted data.
Odd and Even parity counts the number of 1 bits in a 1-byte data item then sets the
parity bit (9th bit) to 0 or 1 to result in an Odd or Even total number of 1 bits.
Mark and Space parity (also called high/low parity) sets the parity bit to 1 or 0
regardless of the number of 1 bits in the data item.
Settings include:
• Odd sets the parity bit to 0 or 1 to make the total number of 1 bits odd.
• Even sets the parity bit to 0 or 1 to make the total number of 1 bits even.
• Mark sets the parity bit to 1 for each data item.
• Space sets the parity bit to 0 for each data item.
• None deletes the parity bit.
Transceiver Mode
The Transceiver Mode identifies the type of physical connection.
Modes include:
• RS-232 for point-to-point communication over distances up to 50 feet
• RS-485 for multi-point communication over distances up to 4,000 feet
Handshake
The Handshake setting is fixed at None for MP serial ports.
Wire Type
The Wire Type setting is fixed at 4 Wire for MP serial ports.
Modbus Range
The Modbus Range identifies the numeric range used by your Modbus master. The
defaults are 0 for Min and 32,767 for Max.
Commonly used Min and Max values are 0 to 32,767 for a generic operator
workstation, and 0 to 9,999 for a Honeywell DHP. TriStation allows Min limits as
low as –32,768 and Max limits as high as 32,767. For more information, see the
user’s manual for your Modbus master.
The Modbus Range operates in conjunction with the MinSpan and MaxSpan limits
that apply to individual REAL points, according to the following linear
transformation formula:
( Real Value – MinSpan ) + ( Modbus Max – Modbus Min )
Modbus Value = ---------------------------------------------------------------------------------------------------------------------------------------------- + Modbus Min
( MaxSpan – Minspan )
For information about transmitting real values as Modbus integers, see the Trident
Communication Guide.
Delays
The RTS Post-delay and CTS Pre-delay settings are fixed at 0 (zero). You cannot
adjust the timing of data transmission for an MP serial port.
On the Module tab, use the Description property to give a user-defined name to
the module if desired. Use the Install In property to specify whether the CM
Baseplate includes a CM in the left slot, the right slot, or in both slots. Then click
the Setup button on the Module tab to select properties for the network ports or
serial ports on the CM.
Slot Selection
The Slot Selection identifies which slot is being configured; either right or left.
Privilege
This option determines whether external devices connected to Open Network ports
have Read or Read/Write access to Trident points.
If set to Read, external devices cannot write to any points no matter what other
write access controls are used. This setting protects safety-critical points from
writes by external devices on an open network.
If set to Read/Write, external devices can write to points depending on the settings
of other write access controls.
Read is the default setting.
For more information, see “Overview of Write Controls” on page 372.
Transceiver Port
The Transceiver Port option identifies the type of connection used. If you have
attached your communication cable to an RJ-45 connector on the CM Baseplate,
use the default which is RJ-45.
If you have attached an MII MAU to a 40-pin subminiature D connector or an AUI
MAU to a DB-15 connector on the CM Baseplate, use the MAU option. You might
have to set the physical address of a MAU before attaching it to a CM port. You
must purchase MAUs from a third-party manufacturer. For more information, see
the Trident Communication Guide.
Transceiver Mode
The Transceiver Mode identifies the speed of the physical connection. If your cable
can auto-negotiate to either 10 or 100 megabits per second, select Auto mode.
If your cable operates at only one speed, select the appropriate speed from the list
under Transceiver Mode.
Time Synchronization
The Time Synchronization option identifies whether time synchronization is used
in the network. The following options are available:
• On NET1: Synchronizes the time with the master node on the network that
is connected to NET1
• On NET2: Synchronizes the time with the master node on the network that
is connected to NET2
• None: Time synchronization is not performed by a Trident controller, but
can be performed by an external device (such as an OPC client)
Port Selection
The Port Selection area identifies the serial port to which the communication cable
is connected. Select Port 1, 2, or 3 for the Left Slot or Port 6, 7, or 8 for the Right
Slot, depending on which serial port you have connected your cable to. For a
diagram of the CM Baseplate including the serial ports, see the Trident
Communication Guide.
Modbus Protocol
The Modbus Protocol option identifies the type of protocol to be used. The
following are available:
• Slaveport ASCII
• Slaveport RTU
• Masterport (RTU only)
• Masterslaveport (RTU only)
Baud Rate
The Baud Rate identifies the data transmission speed. Select 1200, 1400, 2400,
4800, 19200, 38400, 57600, or 115200.
Data Bits
The Data Bits option identifies whether you are using 7 or 8 data bits. This option
is available if you are using the Slaveport_ASCII mode.
If you are using the Slaveport_RTU, Masterport, or MasterSlavePort mode, 8 data
bits is the only choice.
Stop Bits
The Stop Bits option identifies whether 1 Bit or 2 Bits are transmitted after each
character.
Parity
The Parity setting indicates whether to use parity checking on the transmitted data.
Odd and Even parity counts the number of 1 bits in a 1-byte data item then sets the
parity bit (9th bit) to 0 or 1 to result in an Odd or Even total number of 1 bits.
Mark and Space parity (also called high/low parity) sets the parity bit to 1 or 0
regardless of the number of 1 bits in the data item.
Settings include:
• Odd sets the parity bit to 0 or 1 to make the total number of 1 bits odd.
• Even sets the parity bit to 0 or 1 to make the total number of 1 bits even.
• Mark sets the parity bit to 1 for each data item.
• Space sets the parity bit to 0 for each data item.
• None deletes the parity bit.
Transceiver Mode
The Transceiver Mode identifies the type of physical connection.
Modes include:
• RS-232 for point-to-point communication over distances up to 50 feet
• RS-485 for multi-point communication over distances up to 4,000 feet
Handshake
The Handshake setting identifies whether CTS, RTS, and DCD signals are used to
establish a valid connection.
Select Hardware for the following configurations:
• Any 2-wire configuration
• A multi-point configuration that uses the RS-485 transceiver mode
• A point-to-point configuration that uses an external modem with RS-232
transceiver mode
Select None for configurations that do not allow or require Hardware Handshake.
Wire Type
The Wire Type setting applies only to RS-485 transceiver mode.
Settings include:
• 2-Wire (half duplex) if you are using one pair of wires for Modbus reads
and writes.
• 4-Wire (full duplex) if you are using two pairs of wires—one pair for
Modbus reads and the other pair for Modbus writes.
Modbus Range
The Modbus Range identifies the numeric range used by your Modbus master. The
defaults are 0 for Min and 32,767 for Max.
Commonly used Min and Max values are 0 to 32,767 for a generic operator
workstation, and 0 to 9,999 for a Honeywell DHP. TriStation allows Min limits as
low as -32,768 and Max limits as high as 32,767. For more information, see the
user’s manual for your Modbus master.
The Modbus Range operates in conjunction with the MinSpan and MaxSpan limits
that apply to individual REAL points, according to the following linear
transformation formula:
( Real Value – MinSpan ) + ( Modbus Max – Modbus Min )
Modbus Value = ---------------------------------------------------------------------------------------------------------------------------------------------- + Modbus Min
( MaxSpan – Minspan )
Signal Delays
For configurations that use Hardware Handshake, the Signal Delays setting is used
to adjust the timing of data transmission to Modbus devices that have slow
throughput or other limitations.
Type the values required by your Modbus device for one or both of the following
delay settings:
• RTS Post-Delay (ms)—can be 0 to 10,000 milliseconds
• CTS Pre-Delay (ms)—can be 0 to 10,000 milliseconds
The Request to Send (RTS) wire in the serial port opens and closes the data
transmission channel. Post-delay specifies the period after the channel is opened
and before data is transmitted.
The Clear to Send (CTS) wire signals the transmitting station that it is ready to
receive data. Pre-delay specifies how long the channel stays open after data is
transmitted.
The following is a sample timing diagram.
RTS CTS
Post-delay Pre-delay
RTS
Data
Field Power
The Field Power setting identifies whether field power is connected to the PI
Baseplate for use by the field sensors:
• Select Field Power Absent if field power is not connected to the PI
Baseplate. This setting is typically chosen when all of the field sensors are
passive.
• Select Field Power Present if field power is connected to the PI Baseplate.
This setting is typically chosen when some or all of the sensors are active.
Type values in the Min Field and Max Field to specify a tolerance range for
the baseplate power supply. The default values are 0 volts (Min Field) and
33 volts (Max Field).
Point Configuration
The Point Configuration area displays six points of the REAL Input (Read
Aliased) data type. You must assign global variable names (tagnames) to these
REAL points using the procedures described in “Declaring Tagnames for Trident
Points” on page 198. To configure a point, select its global variable name
(tagname) in the Point Configuration area, then select the Point Type and other
settings that apply.
Note For each PI point, TriStation provides status attributes that report whether
the signal is stable and within the valid range. For more information, see “PI
Points—Signal Status” on page 320.
Point Type
The Point Type identifies the type of engineering units to be applied to pulse input
signals.
Select the global variable name (tagname) for a point, then select the Speed or RPM
option. Speed refers to pulses per second, minute, or hour. RPM means revolutions
per minute of the shaft that connects a gear to the rotating equipment.
Triggering Mode
The Triggering Mode identifies whether the input signal is triggered on the Rising
Edge or the Falling Edge of the waveform. For asymmetrical waveforms, choose
the mode that corresponds to the sharper edge.
Scale
Scale is a factor used to convert pulse input signals into the desired engineering
units. The scale factor must be a positive real number. The default value is 1. The
following table shows the correct scale factor to use for converting pulse input
signals into seconds, minutes, and hours.
Speed Measurement
The following formula is used to convert speed measurement to different
engineering units. The default is pulses per minute.
Speed = (Pulses / Minute) • Scale
RPM Measurement
The following formula is used to scale RPM measurements under special
circumstances. For example, Scale can be used to adjust the RPM measurement
when the measuring shaft rotates at a different rate than the output shaft.
Speed = ((Pulses / Minute) / Number of Gear Teeth) • Scale
Note When you add an I/O module, TriStation allocates a suitable number of
Input or Output points for that module. When you delete an I/O module, TriStation
reduces the number of points available for that point type.
Memory
Allocation
Window
To change the memory allocation, double-click the graph for a particular point
type, such as Unaliased BOOLs (shown above). Move the slider in the dialog box
up or down to increase or decrease the memory allocation, using the mouse, arrow
keys, or the PAGE UP and PAGE DOWN keys.
Bytes Allocated
for Application
Data
You cannot directly change the memory allocation for Application Data.
However, TriStation will change the size as you add and remove variables from
your programs and rebuild your configuration.
Downloading Considerations
When you do a Download All of your configuration, TriStation freezes the
memory allocation for all point types. You cannot change the memory allocation
when you do Download Changes of the configuration, so any changes you make
will have to fit within the limits of your existing memory allocation.
Use the arrows in the scroll boxes to set the following parameters:
• Maximum Number of Peer-to-Peer Send
• Maximum Number of Peer-to-Peer Receive
Manual Naming
Manual naming of a Trident point is precise because you assign a unique name to
a specific hardware address in the Trident. This method is valuable if your project
has been finely partitioned down to the module and point level.
To manually name a Trident point, open the Trident Points view of the
configuration tree and select the type of points you want to name. For unnamed
points, a {not yet named} placeholder is displayed, as shown on the next page.
Double-click on the desired placeholder and use the Properties box to assign a
tagname and other properties.
As shown in the example on the next page, the BOOL Outputs branch under
Output Points is selected in the configuration tree. Clicking BOOL Outputs
displays the placeholders for BOOL variables in the {not yet named} state. If you
double-click a {not yet named} variable, the Properties box is displayed. There
you can enter a Tagname for the point and describe its other properties.
Note To show or hide system attributes, select Hide (Show) System Attributes
on the View menu. You cannot change system attribute tagnames which are
displayed in red.
4 Enter the desired prefix, start value and increment in the Automatic Tagnames
dialog (shown on the next page).
For example, you would enter the following for naming the gas detector inputs:
• GASDTCT%0 as the Formatted Name to automatically name all selected
points as GASDTCT
• 1 as the Start Value to start the automatic names at 1
• 1 as the Increment to increase the number successively by 1
5 Click OK.
Importing Tagnames
The Import Wizard, accessible from the Import Trident Points command on the
Edit menu, provides a convenient method for importing tagnames and other point
properties which have been exported from other TriStation projects or user-defined
databases. For more information, see “Importing Point Properties” on page 260.
Assignment of Aliases
This section describes the use of Modbus Alias numbers for Trident points whose
values must be accessible to external devices. There are two ways that aliases can
be assigned to Trident points:
• TriStation assigns them automatically
• You assign them individually or in groups using the Configuration editor
The following sections provide more information about the use of aliases in your
project configuration.
User-Assigned Aliases
The Configuration editor allows you to assign or change aliases for any data points
or system attributes that support aliases. The Properties dialog box for tagnames
allows you to:
• Change the alias of an individual tagname in one of two ways:
– Manually enter any alias number in the Allowable Alias Range.
– Use the next default alias in the Default Alias Range by clicking the Get
Default button on the Declarations tab.
• Auto-assign aliases to a group of tagnames, choosing one of the options
shown below:
– TriStation finds the first available alias in the applicable Default Alias
Range.
– TriStation finds a contiguous block of aliases.
– First, TriStation tries to find a contiguous block of aliases. If this fails,
then TriStation tries to find available aliases starting from the first
available alias in the Default Alias Range to make up the block.
– TriStation removes aliases from the selected group of tagnames.
• Choose Control if you want to connect the tagname only to a control (non-
safety) program which has write access.
• Choose Safety if you want to connect the tagname only to a safety program
that has write access.
• Choose Shared for Read if you want to connect the tagname to either a
safety or control program which has read-only access.
Note To modify safety and control attributes for tagnames, you must have
permission to modify safety and control elements. See “Privileges” on page 398 for
details.
MinSpan and MaxSpan can help you convert Real values into Integers if you are
using a 16-bit integer protocol which does not support Real values, such as the
Modbus protocol or Honeywell protocol. To set the Min and Max limits for the
Modbus Range of a serial port, use the Serial Ports tab of the MP Configuration
dialog box.The following formula shows how the Minspan/MaxSpan and
Modbus Range operate mathematically upon the real values in your application:
Modbus Value =
(Real Value – MinSpan) (Modbus Max – Modbus Min) Modbus Min
(MaxSpan – MinSpan )
Note Trident points are 32-bit integer (DINT) and real values (REAL). However,
when external devices request aliased values, the Trident transfers these values as
16-bit integers. The highest integer value that Trident can transfer in 16 bits is
32,767. If the value is higher, the Trident transfers only the least significant 16 bits
of the integer. Real values are scaled as integers according to the lower and upper
limits specified in the desired engineering units.
Viewing Points
▼ Follow these steps to view the tagnames for points on a Trident module:
1 In the Configuration editor, expand the Hardware Allocation branch in the
configuration tree.
2 Double-click the icon for the desired module to open its Properties dialog box.
Or double-click the name of the module in the configuration tree.
3 Select the Points tab to view the Trident points (named and un-named) that have
been declared for this module, as in the example above.
Note To go to a point in the Trident Points window, select the point and click the
Go To button.
Viewing Attributes
▼ Follow these steps to view the system attributes that TriStation supplies for
a selected Trident module:
1 Expand the Hardware Allocation branch in the configuration tree of the
Configuration editor.
2 Double-click the icon for the desired module to open its Properties dialog box.
Or double-click the name of the module in the configuration tree.
3 Select the Attributes tab to view the system attributes that TriStation supplies
for this module, as shown below:
Note To go to a an attribute in the Trident Points window, select the attribute and
click the Go To button.
Filename
Database or File Format
Extension
dBASE .dbf
Microsoft Access .mdb
Microsoft Excel .xls
Comma-delimited ASCII text records *.txt
*.csv
Note You must limit the export filename (excluding the extension) to eight
characters if you are going to modify this file and use it to import Trident point
properties back into TriStation.
The upcoming sections give the facts you need to know to export point properties
efficiently, covering the following topics:
• Selecting point types for export
• Exporting to a database or Excel file
• Exporting to a text file
• Sample steps to follow
4 Select the Export Trident Points command from the Edit menu.
5 Use the Windows dialog box to select the mdb file type and type in the name
“All_Pnts” for the export file. Click the Export button.
6 Open your export file in Microsoft Access to verify the presence of the desired
Trident point properties from the TdBoiler.pt2 project.
Filename
Database or File Format
Extension
dBASE .dbf
Microsoft Access .mdb
Microsoft Excel .xls
Comma-delimited ASCII text records *.txt
*.csv
Note The name of an import file must be eight or fewer characters in length. If
the filename exceeds eight characters, TriStation will generate an error message
when you select the file for an import.
The upcoming pages explain how to import point properties effectively, covering
the following topics:
• Rules for database or Excel files
• Rules for text files
• Required values for Trident point properties
• Sample steps to follow
• Input record processing
• A table must contain a minimum of three columns of data, which you must
map to these point properties:
– Tag Name
– Tag Type
– Tag Class
• Data in the columns must meet the requirements described in “Required
Values for Point Properties” on page 263, or they must be blank.
When you import Trident point properties from a text file, TriStation automatically
applies the default column headings F1, F2, etc. up to the maximum number of
fields defined in the text file. These default column headings appear in the Format
Data Source dialog box of the Import Wizard, as shown in this example for 19
fields:
For more information, see the upcoming section called “Sample Steps to Follow”
on page 265.
Note The property names listed in this table are displayed in the Format Data
Source dialog box of the Import Wizard, described on page 265.
Min/Max Accuracy Decimal places for displaying the values of Real variables
(This field is NULL for other types, such as DINT and BOOL)
Note The MinSpan, MaxSpan and Min/Max Accuracy fields are for REAL
values only. These fields are left blank for data types other than REAL, such as
DINT or BOOL.
After the Link All, the Import Wizard displays the mapped items in the right
side of the Format Data Source dialog box, as shown below:
For details about 8 In the Select Import Options dialog box, select these options and click the
updates and adds, Next button:
see page 269.
• Do validation only
• Update existing Trident points as well as add new entries
9 Review your import options, then click the Finish button.
10 Examine your results in the Data Import Validation Result dialog box:
If the import results
in errors, the Show
Errors Only option
is selected by
default. See
page 267 for
details.
11 To check an individual import record for errors or warnings, click on the record
and read the messages in the Detailed Errors/Warnings box, as shown above.
12 Ensure that the desired Show... option is selected (Show All in the example
above), then click the View Details button to see a report of errors or warnings
for the selected Trident points, as shown in this example:
Print and save the
View Details report
to help document
the development of
your project.
13 Click the Close box in the upper right corner of the report file display to return
to the Data Import Validation Result dialog box.
14 Click the Commit Records button in the lower left corner of the dialog box to
complete the import of the validated point properties.
15 Click the Close button to exit the Import Wizard.
16 Click Trident Points on the Configuration editor tree to view the point
properties you just imported.
IGNORED The import record is mapped to an existing point that has the same
properties, so the import record is being ignored.
ADDED A new record is being added to the configuration.
ERROR The import record has been rejected due to one or more errors.
UPDATED The import record is updating properties of an existing point.
3 Click the Link button to map the selected fields to the properties on the right.
Input/Output Points:
• The input record must contain an <IOP.Slot.Point> address.
• If only the <IOP.Slot.Point> address is provided, TriStation looks for an
allocated point whose address matches the one supplied. If no match is
found or the point is already being used, the import record is rejected.
• If the Alias number is also provided and TriStation finds a match to the
<IOP.Slot.Point> address. Then TriStation imports the Alias number and
issues a warning if the Alias number is different from that of the target
point.
Other Imports
Imported data that does not meet the criteria specified in “Adding New Trident
Points” on page 270, TriStation rejects it as an error.
Note To comply with TÜV guidelines, you should first use the Upload and
Verify command in the Trident Control Panel before you use the Compare to Last
Download command. See page 356 for details.
Details Display
The following tabs in the Compare Configurations dialog box include a Details
button that displays additional information:
The Split-Window
View of FBD
Element
Differences
As shown in the window’s title bar, the current version of the element is in the left
pane and the downloaded version is in the right pane. A list of differences appear
in the Message Bar at the bottom of the screen. Double-click on a message to jump
to and highlight the network (or line of Structured Text) where there are
differences.
There are three types of messages about the differences:
• No Current Network(s) match Downloaded Network(s) #->#
One or more new networks were added after the program was downloaded.
For Structured Text, • Current Network(s) #-># do not match Downloaded Network(s) #->#
the messages will
have the term One or more networks were modified after the program was downloaded.
Line(s) instead of • Current Network(s) #-># do not match any Downloaded Network(s)
Network(s).
One or more networks were deleted after the program was downloaded.
The commands in the View menu change how the element differences windows are
displayed:
• Show First View shows a single-pane view of the current version of the
elements
• Show Second View shows a single-pane view of the downloaded version of
the elements
• Show Both Views shows a split-window view of both the current and
downloaded versions of the elements
• Toggle Orientation switches the split-window view between a side-by-side
and over-and-under format
Click the Close button to exit the element differences display and return to the
Compare Configurations dialog box.
In the print preview, standard Crystal Report tools are available for page scrolling,
enlargement and reduction of the view, and printing.
Overview
The Connections Wizard is helpful when you want to automatically connect your
program instance variables to tagnames that are automatically created using the
naming conventions you specify. To use the Connections Wizard, you must first
declare at least one program instance for each program in your project that you
intend to download. The Wizard is accessible from the Commands menu and from
the Instance Properties box which is displayed when you double-click on a
program instance name.
You can enter the Wizard as many times as you like to fine-tune the settings of
selected points or all points in one or more program instances. Upon entering the
Wizard, the main choice you make is whether to manually connect your program
variables to Trident points or automatically connect them using various parameters
that you select. Manual connection is straightforward, but as shown in the options
flowchart on the following page, automatic connection involves a number of
choices in the following areas:
• Using another program instance as a pattern for making connections
• Naming the Trident points with prefixes or suffixes
• Preserving or removing existing point connections
• Automatically creating new points of a selected type
CONNECTIONS WIZARD
Manual connections
dialog
AUTO-CREATE:
New Unaliased Memory global variables.
New Read Aliased Memory global variables.
New Read/Write Aliased Memory global variables.
New I/O global variables.
Do not create any new global variables (Leave disconnected).
Finish
* This option is available only if you select one or more variables from
a Program Instance display before opening the Connections Wizard.
Manual Connection
Manual connection is a very precise way to connect program variables to Trident
points. With this method, the Connections Wizard lets you select a specific
program variable and connect it to a specific point. This is the method you would
normally use when testing is done and you are preparing to download your project
for real-time execution in the Trident. See the upcoming section called “Automatic
Connection” for a quick method you can use when preparing for testing.
When you enter the Wizard for the first time after declaring your program
instances, Trident points will be available for manual connection only if you have
manually named them first by double-clicking on {not yet named} points in the
Trident Points view, as described on page 239. If you have used the Wizard before
to automatically name and connect Trident points, these connected points will
automatically display in the manual connection window from that time onward.
You can then decide whether to connect more than one program variable to
already-connected points, or disconnect the previously existing connections.
Steps to Follow
This section is based on the AIR_DAMPER_4 instance of the AIR_DAMPER
program in the FURNACE project, as shown in the illustration that follows. Take
these steps to manually connect a program variable to a Trident point:
1 Enter the Connections Wizard from the Tools menu.
2 Select the option called All program variables in One instance and select
AIR_DAMPER_4 in the scroll box at the right, and then click Next.
3 Select the option called Manually connect each program variable, and then
click Next.
4 The Wizard displays a dialog box which lists the program variables from
AIR_DAMPER_4 on the left and named Trident points on the right.
5 Select the program variable AIR_DAMPER_4.AIR_DAMPER_ALARM in the
list on the left. Text underneath the scroll box tells you that the variable is “not
connected.”
6 Select the Output variable type in the upper right corner (Memory, Inputs or
Outputs) to display available, named Trident points of the Output type.
7 Select the point name called MP.SET_PROG_ALARM_ON in the list on the
right.
8 Select Connect at the top middle of the dialog box. Note the change in status by
reading the text underneath the Input/Output Variable list on the left.
9 Click Next, and then Finish to connect the variable and exit the Connections
Wizard.
Automatic Connection
Automatically connecting your program variables to unaliased Trident memory
points is a quick way to prepare for testing with the Emulator Control Panel when
some of the information you need to complete your project is temporarily missing.
For example, you may have to begin a project without knowing the instrument
tagnames or Alias numbers for communication over the DCS. But you can still
write the logic, declare program instances, and use the Connections Wizard to
connect your program variables to Trident points which are automatically named
according to parameters you select.
With automatic connection, you cannot control exactly which Trident points are
connected to which program variables. The Connections Wizard simply selects
points sequentially from the relevant I/O modules. In many cases, this is acceptable
for the purpose of testing your logic. Later, when you have received all of the
information needed to complete your project, you can fine-tune your point
connections using the manual method.
Automatic Naming
Even if you have not manually named any points in the Trident Points view, the
Wizard can automatically name these points according to a naming convention you
select. To do this, the Wizard uses your program variable names and attaches a
prefix or suffix of your choice. The choices for automatic naming conventions are:
• Prefixing with the instance name
• Prefixing with characters of your choice
• Suffixing with characters of your choice
• No prefix or suffix
Prefixing is useful mainly when you have multiple instances of programs, because
the Trident points for the various instances need to have identifiers.
Another option related to automatic naming is to Preserve connections and auto-
rename Trident points. This is useful if your point names currently have prefixes
but you want them to have suffixes instead, or vice versa.
Prefixing is usually just an intermediate step in project development, when you do
not yet know which physical points you will actually be connecting to. When your
instructions for point connection become available, chances are you will want to
re-name the Trident points as the instrument tagnames they correspond to.
System Attributes
This chapter explains how to use system attributes for monitoring and controlling
your Trident system.
Topics include:
“What are System Attributes?” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
“Using System Attributes” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
“Description of System Attributes” . . . . . . . . . . . . . . . . . . . . . . . . 301
“Using SYS_ Function Blocks” . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
1. See “Summary of Output Voter Diagnostics (OVD)” on page 391 for more
information.
• Individual I/O modules for digital inputs, digital outputs, analog inputs and
relay outputs.
Modules of the
Trident V1.0
System
The name of each module serves as the prefix for the associated attributes:
Module Attribute Prefix Sample Attribute Name
MP MP MP.BAT_OK_LEFT
IOP IOP1 IOP1.LOCKED_RIGHT
I/O String IOP1.IO_ IOP1.IO_FLD_PWR1_OK
System System System.DAY_OF_WEEK
DI DI<model>_01_<slot> DI3301_01_01.NO_FLTS
DO DO<model>_01_<slot> DO3401_01_02.TMR
AI AI<model>_01_<slot> AI3501_01_03.GE_DUAL
RO RO<model.>_01_<slot> RO3451_01_04.PASS_RIGHT
System Attributes
for Modules and
Points
See “Description of System Attributes” on page 301 for a complete listing of the
module and point attributes associated with each Trident module.
Methods of Access
TriStation allows access to the system attributes in the following ways:
• In the Configuration editor, you can directly connect selected program
instance variables to your choice of system attributes. This method is
helpful when your program logic needs to access individual system
attributes. See “Connecting Program Instance Variables to System
Attributes” on page 208 for instructions.
• An external device can access specific system attributes if you define an
alias number for each attribute. See “Assigning Modbus Aliases” on
page 294 for instructions.
• In your program logic, you can use the SYS_ function blocks to access
multiple status bits for any module in your Trident system. The parameters
of the SYS_ function blocks provide the same information as individual
status attributes in the Configuration editor. See “Monitoring OVD Status”
on page 322 for more information.
If you only need to use a few system attributes, choosing the direct connection
method is wise. Using several SYS_ function blocks in order to access a small
number of system attributes would increase your execution time needlessly.
Connecting a
Program Instance
Variable to a
System Attribute
Properties Box
Tab for Module
Attributes
Individual Assignment
▼ To assign an alias to an individual system attribute:
1 Select the desired system attribute in any Trident Points view.
2 Double-click to open the Properties dialog box and select the Declaration tab.
3 Type an alias in the Modbus Alias field, selecting a value in the specified Alias
Range that is displayed above the Confirm Alias button (shown below).
Use the Get Default button to let TriStation select an alias for you.
Individual Alias
Assignment
4 Click the Confirm Alias button to see the new alias number displayed in the
Alias column of the Trident Points view.
Group Assignment
▼ To assign aliases to a group of system attributes:
1 Select the desired group of system attributes in any Trident Points view.
2 Open the Properties dialog box by selecting the Properties Box tool on the
toolbar (shown at left).
3 On the Declarations tab, select the Auto Assign Aliases button as shown
below.
4 Select one of the options in the Automatic Assigning Aliases dialog box
(shown above). For more information about the options, see “User-Assigned
Aliases” on page 245.
5 Click OK to see the new alias numbers displayed in the Alias column of the
Trident Points view.
General Information
The purpose of OVD is to test the Trident system’s output voter circuitry for stuck-
on and stuck-off (that is, failswitch) fault conditions, and its side-effects are
momentary glitches to the attached load. For devices that are too sensitive to
tolerate these glitches, you have to turn off OVD for an extended period of time.
At the end of this time period, you must either shut down the plant or bypass the
outputs and turn OVD back on for testing, to see if the output voter circuitry is
working properly. If it is working properly, you can disable OVD again for another
3-6 months.
By default, OVD is enabled for all points on all DO modules in the Trident system.
You can disable OVD for individual points by connecting the tagname for each
point to the SET_OVD_OFF control attribute, as shown in “Using the
SET_OVD_OFF Attribute” on page 297.
You can monitor the OVD status of DO points using one of these methods:
• Connect the tagname for each point to the OVD_RUNNING status
attribute (see “Using the OVD_RUNNING Attribute” on page 299).
• Use a parameter of the SYS_DO16_STATUS function block in
conjunction with the UNPACK16 function block (see “Monitoring OVD
Status” on page 322).
3 In the configuration for this project, each of the output variables called
DO_OVD_1 through DO_OVD_2 is connected to a SET_OVD_OFF point
control attribute. To see this, go to the Configuration editor and click the P1
program instance.
4 In the Input/Output Connections view, double-click the P1.DO_OVD_1
program instance variable to bring up the Properties dialog box.
5 Select the Connect to Attributes tab.
6 On the left side of the tab, select the module called 01.02: DO_3401_01_02 and
the View Point Attributes option, as shown below:
Connecting a
Variable to a Point
Attribute
3 In the configuration for this project, each of the input variables called
PT_01_OVD_RUNNING through PT_16_OVD_RUNNING is connected to
an OVD_RUNNING point status attribute. To see the connections, go to the
Configuration editor and click the P1 program instance.
4 In the Input/Output Connections view, double-click the program instance
variable named PT_01_OVD_RUNNING to bring up the Properties dialog
box.
5 Select the Connect to Attributes tab.
6 On the left side of the tab, select the module called 01.02: DO_3401_01_02 and
the View Point Attributes option, as shown below:
Connecting a
Variable to a Point
Attribute
Note A Trident system is subject to external faults and internal faults, which are
reported by the Diagnostic Panel and the system attributes. For details, see “Types
of Faults” on page 386. Faults are also reported by status indicators on the front
panels of Trident modules. See the Trident Planning & Installation Guide for
status indicator tables that describe corrective actions.
Data
Attribute Name Description Type
System.IO_FLD_PWR1_OK I/O Field Power 1 is OK. BOOL
System.IO_FLD_PWR2_OK I/O Field Power 2 is OK. BOOL
System.IO_GE_DUAL Every point in the I/O Subsystem is supported by at least two BOOL
channels. See also System.IO_GE_SINGLE and
System.IO_TMR.
System.IO_GE_SINGLE Every point in the I/O Subsystem is supported by at least one BOOL
channel. See also System.IO_GE_SINGLE and
System.IO_TMR.
System.IO_LOGIC_PWR1_OK I/O Logic Power 1 is OK. BOOL
System.IO_LOGIC_PWR2_OK I/O Logic Power 2 is OK. BOOL
System.IO_NO_ACTIVE_FLTS None of the active modules in the I/O subsystem requires BOOL
operator intervention.
System.IO_NO_FLD_FLTS No field faults have been detected on any module in the I/O BOOL
subsystem. Field faults do not include field power faults.
System.IO_NO_FLTS None of the modules in the I/O subsystem requires operator BOOL
intervention.
System.IO_NO_VOTER_FLTS No voter faults have been detected on any module in the I/O BOOL
subsystem.
System.IO_TMR Every point in the I/O subsystem is supported by three BOOL
channels. See also System.IO_GE_DUAL and
System.GE_IO_SINGLE.
2. For Trident V1.0 systems, an I/O string is equivalent to the I/O subsystem.
MP—Module Status
The MP attributes in the table below apply to the Application Processor on the MP
module. They provide information about:
• Health status of the MP modules, batteries and power supplies
• Trident system performance parameters such as scan time
• Operational state of the downloaded application
Physically, the Application Processor is part of the MP module, as shown in the
diagram on page 287.
Note For Trident V1.0 systems, TriStation provides redundant sets of health
status attributes (Active, Installed, Locked, Logic Power 1 and 2, and Pass) for the
MP modules. One set of attributes is prefixed with the MP identifier and the other
set is prefixed with the IOP1 identifier. Examples of redundant attributes for the
MP modules are MP.ACTIVE_LEFT and IOP1.ACTIVE_LEFT.
Data
Attribute Name Description
Type
MP.ACTIVE_LEFT The Left MP module is active. BOOL
MP.ACTIVE_MID The Middle MP module is active. BOOL
MP.ACTIVE_RIGHT The Right MP module is active. BOOL
MP.ACTUAL_SCAN_TIME The actual scan time in milliseconds. This value includes DINT
the requested scan time plus overhead at the end of the
scan, for synchronization among active legs.
MP.APP_LOCKED Application changes are locked out. This includes BOOL
Download All, Download Change and operational
commands from the Control Panel.
MP.APP_RUNNING The application is running. This attribute is useful only for BOOL
aliased variables whose values are accessed by external
devices.
MP.APP_STATE Current state of the application, where 0=Running, DINT
1=Halted, 2=Paused and 3=Trapped. This attribute is use-
ful only for aliased variables whose values are accessed by
external devices.
MP.BATT_OK_LEFT The Left MP module’s battery is OK. BOOL
Data
Attribute Name Description
Type
MP.NET_OK_LEFT The left TriStation port is receiving messages. BOOL
MP.NET_OK_MID The middle TriStation port is receiving messages. BOOL
MP.NET_OK_RIGHT The right TriStation port is receiving messages. BOOL
MP—Operational Modes
Use the MP attributes in the table below in your application program to control and
monitor the operational mode of the Trident system. Some of the control attributes
are paired with status attributes, such as MP.SET_PROG_ALARM_ON to turn on the
programmatic alarm and MP.PROG_ALARM_ON to indicate that it is on.
To use a control attribute, you must connect it to a program output variable using
the Trident Configuration editor. When the output variable turns on, TriStation
implements the desired operational mode. For instructions, see “Connecting
Program Instance Variables to System Attributes” on page 208 and “Methods of
Access” on page 289.
! WARNING
If your application uses this attribute
to lock out changes, you must include
programming to turn it off. Triconex
recommends connecting
MP.SET_APP_LOCK to a digital
input point that is hardwired to a
secured manual switch.
Data
Attribute Name Description
Type
MP.BAD_MSGS_PORT_LEFT The number of bad messages received by the Left Serial Port. DINT
MP.BAD_MSGS_PORT_MID The number of bad messages received by Middle Serial Port. DINT
MP.BAD_MSGS_PORT_RIGHT The number of bad messages received by Right Serial Port. DINT
MP.BRDCSTS_PORT_LEFT The number of broadcast messages received by the Left Serial DINT
Port.
MP.BRDCSTS_PORT_MID The number of broadcast messages received by the Middle DINT
Serial Port.
MP.BRDCSTS_PORT_RIGHT The number of broadcast messages received by the Right DINT
Serial Port.
MP.ELAPSED_PORT_LEFT Milliseconds since last message was received by Left Serial DINT
Port.
MP.ELAPSED_PORT_MID Milliseconds since last message was received Middle Serial DINT
Port.
MP.ELAPSED_PORT_RIGHT Milliseconds since last message was received by Right Serial DINT
Port.
MP.MSGS_PORT_LEFT The number of messages received by the Left Serial Port. DINT
MP.MSGS_PORT_MID The number of messages received by the Middle Serial Port. DINT
MP.MSGS_PORT_RIGHT The number of messages received by the Right Serial Port. DINT
MP.RSPNS_PORT_LEFT The number of response messages received by the Left Serial DINT
Port.
MP.RSPNS_PORT_MID The number of response messages received by the Middle DINT
Serial Port.
MP.RSPNS_PORT_RIGHT The number of response messages received by the Right Serial DINT
Port.
Data
Attribute Name Description
Type
CM_L.ACTIVE The module is active BOOL
CM_L.BAD_MSGS_SERIAL_1 The number of bad messages received on Serial Port 1 DINT
CM_L.BAD_MSGS_SERIAL_2 The number of bad messages received on Serial Port 2 DINT
CM_L.BAD_MSGS_SERIAL_3 The number of bad messages received on Serial Port 3 DINT
CM_L.BRDCSTS_SERIAL_1 The number of broadcast messages received on Serial Port 1 DINT
CM_L.BRDCSTS_SERIAL_2 The number of broadcast messages received on Serial Port 2 DINT
CM_L.BRDCSTS_SERIAL_3 The number of broadcast messages received on Serial Port 3 DINT
CM_L.CM_TEMP The current temperature of the CM DINT
CM_L.ELAPSED_SERIAL_1 Milliseconds since last message was received on Serial Port DINT
1
CM_L.ELAPSED_SERIAL_2 Milliseconds since last message was received on Serial Port DINT
2
CM_L.ELAPSED_SERIAL_3 Milliseconds since last message was received on Serial Port DINT
3
CM_L.INSTALLED The CM is plugged into the baseplate BOOL
CM_L.LOCKED The CM is locked BOOL
CM_L.LOGIC_PWR1_OK Logic power 1 is OK BOOL
CM_L.LOGIC_PWR2_OK Logic power 2 is OK BOOL
CM_L.MSGS_SERIAL1 The number of messages received on Serial Port 1 DINT
CM_L.MSGS_SERIAL2 The number of messages received on Serial Port 2 DINT
CM_L.MSGS_SERIAL3 The number of messages received on Serial Port 3 DINT
CM_L.NET1_OK The NET1 Ethernet port is receiving messages BOOL
CM_L.NET2_OK The NET2 Ethernet port is receiving messages BOOL
CM_L.NO_FLTS No faults have been detected on the installed CM modules BOOL
Data
Attribute Name Description
Type
CM_L.PASS The module has no failures BOOL
CM_L.PRNTR_BYTES_FREE The number of free bytes in the print buffer DINT
CM_L.PRNTR_BYTES_USED The number of bytes used in the print buffer DINT
CM_L.PRNTR_NO_OVRFLW The CM buffer for this printer has not overflowed BOOL
CM_L.PRNTR_READY The left CM port has an active connection to a print server BOOL
CM_L.RESET_STATS_SERIAL_1 Reset statistics for Serial Port 1 BOOL
CM_L.RESET_STATS_SERIAL_2 Reset statistics for Serial Port 2 BOOL
CM_L.RESET_STATS_SERIAL_3 Reset statistics for Serial Port 3 BOOL
CM_L.RSPNS_SERIAL_1 The number of response messages sent on Serial Port 1 DINT
CM_L.RSPNS_SERIAL_2 The number of response messages sent on Serial Port 2 DINT
CM_L.RSPNS_SERIAL_3 The number of response messages sent on Serial Port 3 DINT
CM_L.STATS_RESET_SERIAL_1 Statistics reset for Serial Port 1 BOOL
CM_L.STATS_RESET_SERIAL_2 Statistics reset for Serial Port 2 BOOL
CM_L.STATS_RESET_SERIAL_3 Statistics reset for Serial Port 3 BOOL
CM_R.ACTIVE The CM is active BOOL
CM_R.BAD_MSGS_SERIAL_1 The number of bad messages received on Serial Port 1 DINT
CM_R.BAD_MSGS_SERIAL_2 The number of bad messages received on Serial Port 2 DINT
CM_R.BAD_MSGS_SERIAL_3 The number of bad messages received on Serial Port 3 DINT
CM_R.BRDCSTS_SERIAL_1 The number of broadcast messages received on Serial Port 1 DINT
CM_R.BRDCSTS_SERIAL_2 The number of broadcast messages received on Serial Port 2 DINT
CM_R.BRDCSTS_SERIAL_3 The number of broadcast messages received on Serial Port 3 DINT
CM_R.CM_TEMP The current temperature of the CM DINT
CM_R.ELAPSED_SERIAL_1 Milliseconds since last message was received on Serial Port DINT
1
CM_R.ELAPSED_SERIAL_2 Milliseconds since last message was received on Serial Port DINT
2
Data
Attribute Name Description
Type
CM_R.ELAPSED_SERIAL_3 Milliseconds since last message was received on Serial Port DINT
3
CM_R.INSTALLED The CM is plugged into the baseplate BOOL
CM_R.LOCKED The CM is locked BOOL
CM_R.LOGIC_PWR1_OK Logic power 1 is OK BOOL
CM_R.LOGIC_PWR2_OK Logic power 2is OK BOOL
CM_R.MSGS_SERIAL1 The number of messages received on Serial Port 1 DINT
CM_R.MSGS_SERIAL2 The number of messages received on Serial Port 2 DINT
CM_R.MSGS_SERIAL3 The number of messages received on Serial Port 3 DINT
CM_R.NET1_OK The NET1 port is receiving messages BOOL
CM_R.NET2_OK The NET2 port is receiving messages BOOL
CM_R.NO_FLTS No faults have been detected on the installed CM modules BOOL
CM_R.PASS The CM has no failures BOOL
CM_R.PRNTR_BYTES_FREE The number of free bytes in the print buffer DINT
CM_R.PRNTR_BYTES_USED The number of bytes used in the print buffer DINT
CM_R.PRNTR_NO_OVRFLW The print buffer has not overflowed BOOL
CM_R.PRNTR_READY The right CM port has an active connection to a print server BOOL
CM_R.RESET_STATS_SERIAL_1 Reset statistics for Serial Port 1 BOOL
CM_R.RESET_STATS_SERIAL_2 Reset statistics for Serial Port 2 BOOL
CM_R.RESET_STATS_SERIAL_3 Reset statistics for Serial Port 3 BOOL
CM_R.RSPNS_SERIAL_1 The number of response messages sent on Serial Port 1 DINT
CM_R.RSPNS_SERIAL_2 The number of response messages sent on Serial Port 2 DINT
CM_R.RSPNS_SERIAL_3 The number of response messages sent on Serial Port 3 DINT
CM_R.STATS_RESET_SERIAL_1 Statistics reset for Serial Port 1 BOOL
CM_R.STATS_RESET_SERIAL_2 Statistics reset for Serial Port 2 BOOL
CM_R.STATS_RESET_SERIAL_3 Statistics reset for Serial Port 3 BOOL
IOP1 Status
The IOP1 attributes described in the following table provide information about:
• The health status of IOP1 and its logic power supplies
• The safety status of IOP1
• Analog and discrete3 poll time for the I/O string governed by IOP1
The left, middle and right modules mentioned in this table are the Left, Middle and
Right MP modules. In Trident V1.0 systems, IOP1 is physically part of the MP
module set, as shown in the diagram on page 287.
Note For Trident V1.0 systems, most of the system attributes prefixed with the
IOP1 identifier are redundant with attributes that are prefixed with the MP
identifier. Examples of redundant attributes are IOP1.ACTIVE_LEFT and
MP.ACTIVE_LEFT; IOP1.TMR and MP.TMR.
Data
Attribute Name Description Type
IOP1.ACTIVE_LEFT The Left MP module is active. BOOL
IOP1.ACTIVE_MID The Middle MP module is active. BOOL
IOP1.ACTIVE_RIGHT The Right MP module is active. BOOL
IOP1.ANALOG_POLL_TIME The time it takes IOP1 to collect all analog data from the DINT
Analog Input modules on the I/O string.
IOP1.DISCRETE_POLL_TIME The time it takes IOP1 to collect all discrete data from the DINT
Digital Input modules on the I/O string.
IOP1.GE_DUAL At least two IOPs are operating without any fatal faults. See BOOL
also IOP1.GE_SINGLE and IOP1.TMR.
IOP1.GE_SINGLE At least one IOP is operating without any fatal faults. See also BOOL
IOP1.GE_DUAL and IOP1.TMR.
IOP1.INSTALLED_LEFT The Left MP module is plugged into the baseplate. BOOL
IOP1.INSTALLED_MID The Middle MP module is plugged into the baseplate. BOOL
IOP1.INSTALLED_RIGHT The Right MP module is plugged into the baseplate. BOOL
Data
Attribute Name Description
Type
<Module Name>.ACTIVE_LEFT The left module is active. BOOL
<Module Name>.ACTIVE_RIGHT The right module is active. BOOL
<Module Name>.FLD_PWR1_OK Field Power 1 is OK. BOOL
<Module Name>.FLD_PWR2_OK Field Power 2 is OK. BOOL
<Module Name>.GE_DUAL Every point on the module is supported by at least BOOL
two channels. See also <Module
Name>.GE_SINGLE and <Module Name>.TMR.
PI Points—Signal Status
For each PI point, TriStation provides status attributes that report whether the
signal is stable and within the valid range. If the input frequency of a PI speed point
is greater than or equal to 0.5 hertz, TriStation sets the Signal_Present attribute to
one. If a PI point configured for RPM freezes due to loss of the input signal or noise
conditions, TriStation sets the Input_Stable attribute to zero.
These attributes are presented in the following format:
<User-assigned Tagname>.<Point Attribute Name>
A sample name for a PI status attribute is PI_07.Signal_Present.
Data
Attribute Name Description
Type
<Tagname>.SIGNAL_PRESENT Pulse input frequency is greater than BOOL
or equal to 0.5 hertz
<Tagname>.INPUT_STABLE The measured input is stable BOOL
For detailed information, see the TriStation Help System and the Triconex Librar-
ies manual. See the Safety Considerations Guide regarding safety-critical function
blocks. These manuals supply the following categories of information about each
function block:
• Detailed description
• Input and output parameters
• Runtime error code, if any applies
• Attributes
• Related functions and function blocks
Sample Network
that Monitors OVD
Status
Control Panels
Control Tools
To help you test and monitor your application with the Emulator Control Panel and
Trident Control Panel, TriStation provides control tools on a pop-up menu, main
menu and toolbar. The same tools are available for both control panels, although
the main purpose of each control panel differs. Refer to the section called “Using
a Control Panel” on page 332 for more information.
Pop-up Menu
Press the right mouse button while viewing a control panel to display a pop-up
menu, either for a selected element or for any empty area. All of the commands in
the pop-up menu are accessible from the control panel’s toolbar and main menu as
well, except for the Size/Alignment commands described below.
Size/Alignment Commands
The pop-up menu’s Size/Alignment commands help you arrange multiple
elements on the monitor sheet in a control panel, as shown in the example below.
For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.
Access Keys
In the Control Panel menus, underlined characters are access 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.
For more information, see Appendix A, “Keyboard & Mouse Shortcuts.”
Expand One Level Program Instances Compare to Instance View New Window TriStation 1131 Help
Expand Branch Memory Points Last Download Connections Wizard Cascade Tip of the Day
Expand All Input Points Select Tool Tile Horizontal Keyboard Shortcuts
Collapse Branch Output Points Select and Insert Tile Vertical Sample Projects
Memory Allocation Module Close All Technical Support
Hardware Allocation Insert Module Arrange Icons About TriStation 1131...
SOE Blocks Show Properties Box TriStation 1131 Logo...
Show System Attributes Show Message Bar
Zoom... (Vertical Message Bar)
Zoom to Fit (Horizontal Message Bar)
Hide Message Bar
1 PROGRAM: <name>
Element Menu
Command Description
Save <control Saves the open control panel but not the entire project.
panel>
Description Displays the creation and modification dates of the
control panel. Lets you select ownership, dependencies
and read/write status; and enter descriptive text.
Comment Macros Allows you to select macros for use in comments about
control panel elements.
Tree Menu
Command Description
Expand One Level Expands a selected tree node by one level.
Tree Menu
Command Description
Expand Branch Expands a selected tree node to all levels.
Expand All Expands the whole tree to all levels.
Collapse Branch Collapses a selected branch of the tree.
View Menu
Command Description
Grid Display Changes the background of the control panel to display
or not display an editing grid for precise placement of
logic elements.
Zoom Select the zoom view of your control panel from preset
and custom views.
Zoom to Fit Displays the entire control panel within the current
view.
IEC Display Mode Changes the display characteristics of elements in the
control panel to IEC format.
Tools Menu
Command Description
Delete Red X Deletes invalid elements (each marked with a red X) on
Elements This the current sheet that may be left over from previous
Sheet builds or editing.
Delete All Red X Deletes all invalid elements (each marked with a red X)
Elements that may be left over from previous builds or editing.
Applies to all sheets that have been defined for the
control panel.
Instance View Allows you to select an instance of a program for
viewing of variable values and annotations during
execution. For details, see the section called “Using the
Program Instance Monitor” on page 335.
Select Tool (Arrow) Changes the mouse cursor into an arrow so you can
select the desired item.
Tools Menu
Command Description
Insert Comment Places a comment box on the current control panel
sheet so you can enter descriptive text.
Commands Menu
Command Description
Connect... For the Emulator Control Panel, establishes
communication between TriStation and the Emulator.
For the Trident Control Panel, establishes
communication between TriStation and a Trident
controller, assuming that the PC is physically connected
to the Trident.
Disconnect Disconnects TriStation from the Emulator or a Trident
node with which communication was previously
established.
Download All Downloads the entire configuration for your application
to the Emulator or Trident system, totally rebuilding the
configuration first.
Download Changes Makes on-line changes to an application that is already
executing in the Emulator or the Trident system
following a Download All.
Run Starts continuous scanning (execution) of your
application in the Emulator or the Trident system.
Single Step Causes your application to execute for one scan only in
the Emulator or the Trident system.
Set Calendar Clock Sets the Trident calendar clock to your current
Windows time.
Set Programming Enables or disables programming and control
Mode operations such as Download Changes, scan time, etc.
Enable All Enables all Trident points that you have previously
Disabled Points disabled using the Disable button in the Properties box
for selected program variables.
List Disabled Displays a list of all Trident points that you have
Points previously disabled using the Disable button in the
Properties box for selected program variables.
Upload and Verify After you connect your application to the Trident, this
command compares the configuration running in the
Trident with the last downloaded configuration.
Continuous Continuously displays the current values of variables in
Refresh your monitor window.
Sheets Menu
Command Description
Sheet Title Allows you to edit the title of the current sheet (displayed in
the title block, window caption bar and Window Menu list).
Next Sheet Displays the next sheet (for logic elements with multiple
sheets).
Note For the Trident Control Panel only, you must disable input and output
points before testing. See “Disabling Points” on page 362 for instructions.
After you start execution with the Run or Single Step command, you can manually
change the value of any logic element for test purposes. Double-click the element
to bring up the Properties box and use the Set Value field to enter a new value, as
shown in the following example for an input variable:
For functions and function blocks with multiple parameters, select the desired
parameter in the Variable List before setting the value in the Set Value field:
Zoom Selection
View
Current
View Rectangle
Note To use color monitoring in an instance view, you must select the Enable
Color Monitoring option during FBD program development. You may select
custom colors on the Monitor Colors tab of the Project Options dialog box.
True value
in red
Power Flow in an
LD Program
Red for
Power-on
Green for
Power-off
4 Go to the Annotation tab and select the Include monitor value in annotation
option as shown below:
Note The Include monitor value in annotation option is available for program
elements only. It is not available for function or function block elements.
For detailed instructions on disabling and enabling points, see “Disabling Points”
on page 362.
▼ Follow these steps to set up variables and function blocks in the Emulator
Control Panel and begin testing:
1 Access the Emulator Control Panel command on the Trident menu.
2 Use the Connect command to logically connect to the Emulator.
3 Use the Download All command to download your configuration to the
Emulator. (At this time, TriStation may send a message that your configuration
needs to be rebuilt—choose yes to proceed.)
4 The program instances are now displayed in the tree. Click the plus (+) icon of
the AIR_DAMPER_1 instance to display the program variable names.
5 Click and hold down the NOT_ON_MIN_STOP variable, and drag it to the
right pane.
6 Click, hold down and drag all of the other variables shown in the
AIR_DAMPER_1 instance, arranging them in the order shown in the
illustration. Hold down SHIFT or CTRL to make multiple selections.
7 Add comments with the Insert Comment command in the Tools menu or the
Comment tool on the toolbar.
8 Select the Run or Single Step command to begin executing your configuration
in the Emulator.
9 To modify the value of a variable, double-click on the variable name to bring up
the Properties box. On the Variables tab, enter the desired status in the Set
Value field.
10 For functions and function blocks with multiple parameters, select the desired
parameter in the Variable List (on the Variables tab) before setting the value
in the Set Value field.
11 Make adjustments as needed—add or delete variable names, modify their
respective values in the Set Value field, and continue testing as long as
necessary.
12 Use the Pause or Halt command to stop testing.
13 Use the Disconnect command to disconnect your configuration from the
Emulator.
This step is necessary if you want to change any aspect of your configuration
and rebuild it. It is also necessary when you have completed all testing and are
ready to use the Trident Control Panel for actual downloading to the Trident
controller.
Note Using the Run command to begin execution initializes all variables to the
initial values you specified for their Tagnames in the Configuration editor. Using
the Halt command initializes the variable to their first-scan state.
Command Description
Poke Write a value to an aliased variable in the emulated application.
Request Read the value of an aliased variable from the emulated application.
Advise Read the value of an aliased variable from the emulated application
and update the display whenever the value changes.
Downloading an Application
Downloading is the final step in developing a TriStation application. Upon
downloading, your application will execute in the Trident controller in real time,
until you decide to halt execution or shut down the controlled process for
maintenance purposes. TriStation offers two types of download capability:
• Download All for initial loading and execution of your application
• Download Change for on-line modifications to your application
The sections that follow describe:
• Checking for correct installation
• Use of the Download All feature
• Use of the Download Change feature
• Recommendations for controlling and changing an application
• Download states
• Upload and Verify command
• Download history of an application
Dialog Boxes of
TS1131 Install
Check Program
Note For safety-critical applications, Triconex recommends that you run TS1131
Install Check before downloading. See the Safety Considerations Guide for more
information.
Download All
The Download All command is normally used at these two times:
• The first time you download your application to the Trident controller
• After you make major updates to the application which cannot be handled
with a Download Change
– You will typically perform this type of Download All during a planned
process shutdown
The sections that follow describe typical preparations for a Download All and the
possibility of a configuration mismatch upon downloading.
Steps to Follow
▼ To prepare for a Download All:
1 Complete all testing with the Emulator Control Panel.
2 Select the Rebuild Configuration command from the Trident menu.
3 Ensure that your TriStation PC is physically connected to a Main Processor port
with an 802.3 cable, and ensure that DLC protocol has been installed on the PC.
See the Getting Started manual for installation procedures.
Removing and 4 Remove all three MPs from their baseplate and wait for one minute.
replacing the MPs
clears the Trident’s 5 Replace the MPs and wait until the PASS indicators on each MP illuminate.
memory. 6 Go to the Trident Control Panel (accessible from the Trident menu).
7 Choose Connect on the Commands menu to logically connect your TriStation
project to the Trident controller.
8 If the desired TRINODE number is already selected in the Connect To... dialog
box (shown below), go to step 9.
To select a different TRINODE number, use the Properties dialog box for the
Main Processors in the Configuration editor (see page 215 for instructions).
9 Select Left, Middle or Right for the Main Processor Module Port, depending
on where your TriStation cable is physically connected.
If you need to change your Network Adapter number, use the Communica-
tions tab of the Project Options dialog box. See page 408 for details.
10 Enter the password if TriStation requests it.
If a password-protected application is already running, you must know its
password in order to do a Download All.
11 Select the Download All command from the Commands menu.
If a configuration mismatch occurs, read the next section for instructions.
12 If desired, drag selected elements from the program instances tree to the monitor
sheet for later observation of the elements’ behavior.
Note To set up elements on the monitor sheet, a shortcut is to copy from the
Emulator Control Panel the elements you may already have organized there.
Configuration Mismatch
Use the Trident If you download a logical configuration which does not match the Trident’s actual
Configuration editor physical configuration, TriStation displays the Module Configuration
to create logical Exceptions list. Mismatched modules are highlighted with red asterisks in the
configurations. leftmost column of the list, as shown in the sample list that follows. In this case,
the logical configuration for Slot 01 contains a Digital Input Module—but
physically, Slot 01 of the Trident controller contains a Digital Output Module.
Therefore a red asterisk appears beside Slot 01 in the Module Configuration
Exceptions list. In such a case, your only choice is to click Cancel and correct the
configuration problem before attempting a Download All again.
If the physical slots of your Trident system are empty, TriStation still displays the
Module Configuration Exceptions list, as shown below. However, there are no
red asterisks and TriStation allows you to proceed with the Download All if desired
for test purposes.
Download Change
The Download Change feature is a convenient means of making simple
modifications to an off-line system during the application development phase. To
help you use Download Change effectively, this section covers the following
topics.
• Guidelines
• Steps to follow
• Allowable changes
• Additional tips
! WARNING
Download Change is intended for off-line use during application development.
You must exercise extreme caution if you use Download Change to modify a
safety-critical application that is running on-line, because an error in the modified
application or system configuration might cause a trip or unpredictable behavior.
If you must make on-line changes to a Trident system, you should always follow
the guidelines provided in this section and fully understand the risks you are taking
by using the Download Change command.
Guidelines
• Before attempting a Download Change, run TS1131 Install Check to
verify that TriStation is correctly installed on your PC and no associated
files are corrupted. See page 343 for instructions.
• Modify only one program for each Download Change that you perform.
• Always use the Emulator Control Panel to test your changes to the program
logic before using the Download Change command.
• Use the Upload and Verify command in the Trident Control Panel to verify
that the configuration running in the Trident matches the last downloaded
configuration. See page 356 for details.
• Always use the Configuration Differences report in the Configuration
editor to check for inadvertent changes as well as intended changes to the
configuration of your application. This report is obtainable when you use
the Compare to Last Download command (see page 272).
• Before a Download Change, use the Diagnostic Panel to ensure that you
have enough Scan Surplus available in the Trident. How much Scan
Surplus you need depends on the application you are running and the types
of changes you are making. As a rule, Scan Surplus should be at least 10%
of the scan time to accommodate execution of newly added functions,
function blocks and networks. A reasonable Scan Surplus helps you avoid
the scan-time overruns that could result from a Download Change.
• After using the Download All or Download Change command, it is a good
practice to make a backup copy of the .PT2 file using the Backup Project
command on the File menu. The original backup file will be named
<project name>.BT2.
• As an added precaution, you should copy the backup file (<project
name>.BT2) to a CD or other storage medium.
Steps to Follow
▼ These are typical steps to follow when preparing for a Download Change:
See “Allowable 1 Make the allowed changes to your program logic and configuration and use the
Changes” on Build Configuration command on the Trident menu.
page 350.
2 Test the application in the Emulator Control Panel (accessible from the Trident
menu) to validate your changes.
3 Go to the Trident Control Panel and select the Connect command on the
Commands menu.
4 Enter the password that TriStation requests for any application that is password-
protected.
5 Select the Upload and Verify command on the Commands menu.
6 In the Upload and Verify dialog box, click on each tab and validate that the
configuration in the Trident matches the configuration that was last
downloaded.
7 Go to the Configuration editor and select the Compare to Last Download
command on the Commands menu.
8 In the Compare Configurations dialog box, click the Print button.
9 Print a hardcopy of the Configuration Differences report and validate your
current configuration against a snapshot of the last downloaded configuration.
10 Return to the Trident Control Panel and select the Download Change command
on the Commands menu.
Allowable Changes
The following table describes the elements of an application that can be changed with a Download
Change operation. For any element that cannot be changed with a Download Change, you must do a
Download All.
Note If you change the initial value of an existing variable, the change will not take
effect until the next time the application is stopped or restarted. This includes power
failures followed by restarts.
Changing the name of a variable creates a new variable declaration, but does not
remove the old variable declaration.
Function Blocks New function blocks can be added, but existing function blocks cannot be modified and
cannot be deleted from the Project Directory.
Functions New functions can be added, but existing functions cannot be modified and cannot be
deleted from the Project Directory.
Libraries Not supported. Libraries cannot be added, updated or deleted.
CONFIGURATION ELEMENTS:
Program Instances Program instances can be added, deleted or re-ordered for execution.
Trident Points Tagnames can be changed, removed or connected to different points.
The Type, Location, Alias, Initial Value, Retentive capability, DP (Decimal Point),
MinSpan, MaxSpan, Description, Group1 and Group2 properties can be changed.
Memory Not allowed. Memory allocation cannot be changed—this is fixed at Download All
Allocation time. However, you may allocate extra memory before doing a Download All to save
room for other types of Download Changes in the future.
Additional Tips
This section provides additional tips about application elements that you can
change with a Download Change. The following topics are covered:
• Addition of modules
• Addition of functions and effect on scan time
• Changing memory variable types
• Enabling disabled points
• Saving application after downloading
Addition of Modules
You can add new modules if the Memory Allocation data in the Configuration
editor indicates there is enough memory available for the desired point types.
(Allocating additional memory requires a Download All.)
See Chapter 7 for When you add an I/O module, the system attributes listed below turn off for as
details about using many as 8 – 16 scans. If you are using these attributes in your Trident application
system attributes. or DCS, then you must include appropriate logic to handle their turning off when
you add a module. The affected system attributes are available for connection to
Trident points with tagnames using the Configuration editor:
• IOP1.GE_DUAL
• IOP1.IO_GE_DUAL
• IOP1.IO_TMR
• IOP1.TMR
• System.GE_DUAL
• System.IO_GE_DUAL
• System.IO_TMR
• System.TMR
See Triconex The same system attributes are available as parameters of these function blocks:
Libraries for details
about SYS_ • SYS_IO_STATUS
function blocks.
• SYS_IOP_STATUS
• SYS_SYSTEM_STATUS
! CAUTION
Do not attempt a Download Change if you have a negative Scan Surplus. Adjust
the scan time (using the Scan Time parameter for the Main Processors) to make
the surplus value greater than or equal to zero before doing a Download Change.
! CAUTION
In an online system, it is not a good practice to do any of the following actions and
then use the Download Change command: (1) Change a memory variable type; (2)
Change an aliased memory variable to unaliased or vice-versa; or (3) Change the
alias number of a memory variable. If you must do any of these actions, Triconex
strongly recommends using the Download All command.
Download States
At any given time, an application is in either a Download All state or a Download
Change state. After you have done a Download All, your application will be in a
Download Change state on the assumption that the next kind of download you will
want to do is a Download Change. (Download All is also permissible from the
Download Change state.) The download state is noted in the message bar at the
bottom of the TriStation window.
Some TriStation operations are disabled when the application is in the Download
Change state. See “Allowable Changes” on page 350 for details. In a few cases,
TriStation prompts you to change the state to Download All so that you can
perform the desired operation, as shown in the dialog box pictured below.
To change an application’s state to Download All, the Trident menu (common to
all TriStation views) provides a command called Change State to Download All.
Use this command at your own risk, because doing a Download All usually means
that you must shut down the controlled process for a period of time.
! WARNING
After using the Change State to Download All command, you cannot return to the
Download Change state but must do a Download All the next time you download
your application to the Trident. If you backed up the project using the Backup
Project command before the last download, you can use this backup copy in case
you did not want to change the state to Download All.
The Upload and Verify dialog box has tabs for these categories of information:
• System parameters
• Modules installed on Trident baseplates
• Elements of the project
• Instances of programs and function blocks
• Trident Points
• Point Connections
In each tab, there is a column of the last downloaded information beside a column
of the information uploaded from the Trident, as shown on the System parameters
tab below. If any item is different from the previously downloaded configuration,
a red asterisk (“*”) is displayed to its left.
Details Display
In the following three tabs of the Upload and Verify dialog box, click the Details
button to display additional information:
In each Detail for <instance number> dialog box, compare the columns that are
displayed to see if there are any differences.
Download History
To view the Download History of your application and every downloaded element
within it, select the View Download History command on the Trident menu from
any control panel or editor. As shown in the example below, the Download History
dialog box lists the following items:
• All downloaded versions of your application
• All downloaded elements and their attributes
Download History
Dialog Box
Changing the state to Download All would change the version number to:
2.0
If you do a Download All, the version number remains:
2.0
Another Download All would change the version number to:
3.0
State (St) Icon Download All (downward arrow icon with bar on top)
Download Change (downward arrow icon with three dots on top)
Element Name Name of library element, program variable or internal function
ID Number (Id#) For Triconex use only
Version Number Major and minor version numbers
Size In bytes
Library of Name of library containing listed element or user-created
Origin application containing listed program, function or function block
Disabling Points
! WARNING
Triconex recommends that you disable points only during initial on-line testing,
before operating the Trident system on an active process. Although your TriStation
application cannot write to disabled points, external devices such as Modbus
masters can still write to disabled points unless you disable external device writes
as explained in “Overview of Write Controls” on page 372). For safer real-time
operation, the Safety Considerations Guide provides recommendations on bypass
logic to include in your application.
In the Trident Control Panel only, you can disable Input, Output and Memory
points for two main purposes:
• Testing an application as it executes in the Trident
• Plant maintenance without system shutdown—for example, disabling a
water valve so the water tank can be repaired
When a point is disabled, it cannot be affected by the project executing in the
Trident. Instead, you can manually change the value of the point using appropriate
commands in the Properties box, according to the instructions that follow.
Note Use of TriStation’s point disabling capability may have a negative impact
on the available scan time of an application executing in the Trident.
Before building and downloading your TriStation application, you must decide
whether or not to allow point disabling. If you do plan to disable points, mark the
Allow Disabling of Points option in the Operating Parameters dialog box for the
Main Processors. If you do not plan to disable points, make sure the Allow
Disabling... option is not marked. This option can only be changed if your
application is in a Download All state. See “Download States” on page 355 for
information.
When setting up your Trident Control Panel, it may be helpful to place all program
instance variables for points to be disabled on the same sheet. Assuming that your
control panel is already set up and your project is downloaded to the Trident, follow
these steps to disable points:
1 Go to the Trident Control Panel.
2 Enable programming and control operations using the Set Programming Mode
command.
3 Select the Connect command on the Commands menu or the toolbar.
4 If necessary for testing or maintenance actions, change the execution mode
(Run, Single Step or Halt) using the Commands menu or the toolbar.
5 Double-click a program instance variable for a point you would like to disable
in order to display the Properties box.
You can only disable one point at a time.
6 Click the Disable button in the Properties box for the selected program
instance variable. TriStation will display a Query box with the Trident point
name to which the program instance variable is connected. Click Yes to disable
the point. The value of each disabled point will be displayed in red with a frame
around it, as shown in the example below:
Note A disabled point retains the value it had before you disabled it, until you use
the Set Value field and the Confirm button to change its value. However, the
Trident system does not maintain the disabled status of points after a power failure
and restart—upon restart, all points are enabled. For information about Retentive
and Non-retentive points and the Initial Value property, see “Other Properties of
Trident Points” on page 248.
Enabling Points
To enable a specific input or output point on the Trident Control Panel, double-
click on the point to bring up the Properties box and click the Enable button. The
value of the selected point will no longer displayed in red with a frame around it.
To enable all of the disabled points in your Trident Control Panel, select the Enable
All Points command on the Commands menu.
Note After a power failure and restart of the Trident system, all disabled points
are enabled. For information about Retentive and Non-retentive points and the
Initial Value property, see “Other Properties of Trident Points” on page 248.
Description of Modes
The following table describes the Trident functionality associated with each
operational mode. A Trident system can operate with any combination of modes,
except that RUN and STOP are mutually exclusive. The actual operational state of
a Trident system is represented by the MODE indicators on the Main Processor
modules. For more information, see the Trident Planning & Installation Guide.
Operational
Trident Functionality
Mode
RUN The application is running normally with read-only capability.
PROGRAM TriStation programming and control operations are allowed,
including:
• Download All and Download Change
• Setting the Main Processors’ operating parameters
• Changing the values of variables
STOP TriStation has halted the application. This means that TriStation has
stopped reading inputs from the field and has forced non-retentive
digital and analog outputs to zero1. The STOP mode is recommended
for installation and service of process-related equipment, but is not
required for service of the Trident system.
REMOTE Remote (external) devices such as a DCS, Modbus master, or DDE
server can write to Read/Write aliased variables in the TriStation
application. By default, writes by external devices are not allowed.
1. Retentive outputs return to the value they had before the STOP command was
executed.
Operational
How to Control
Mode
STOP In the Trident Control Panel, use the Halt button on the toolbar or the
Halt command on the Commands menu.
Connect the MP.SET_APP_HALT control attribute to a program output
which turns on to halt execution, as explained on page 369.
PROGRAM Use the Set Programming Mode dialog box in the Control Panel to
select one of the modes shown below:
! WARNING
If your program logic uses this attribute to lock out
changes, then the logic must include a way to turn
it off. Triconex recommends connecting
MP.SET_APP_LOCK to a digital input point that
is hardwired to a secured manual switch.
To use a control attribute, you must connect it to a program output variable in the
Trident Configuration editor. When the output variable turns on, TriStation
implements the desired operational mode. For detailed instructions, see
“Connecting Program Instance Variables to System Attributes” on page 208 and
“Methods of Access” on page 289. See also “MP—TriStation Port Status” on
page 307 for information about the status attributes that complement the control
attributes.
Halting Execution
Connecting a program output to the MP.SET_APP_HALT control attribute is an
alternative to using the Halt command or Halt button in the Trident Control Panel.
In your program, set up the conditions under which you’d like your application to
stop executing in the Trident controller, then connect an appropriate output
variable to MP.SET_APP_HALT. When the program sets this variable to True,
TriStation halts execution upon completion of the scan in progress.
Sample Logic
In the sample logic shown below, the local variable called “ProgramHaltCondi-
tions” represents a set of plant conditions under which you’d like to halt the
TriStation application that is executing in the Trident system.
Sample Logic
In the sample logic shown below, the local variable called “AllowRemoteAccess-
Conditions” represents a set of conditions under which remote (external) devices
are allowed to write values into aliased points:
Sample Logic
In the sample logic shown below, the local variable called “ProgramAlarmCondi-
tions” represents a set of plant conditions under which you’d like to activate the
Program Alarm.
This chapter explains how to monitor a downloaded project and identify faults in a
Trident system using the Trident Diagnostic Panel.
Topics include:
“Diagnostic Tools” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
“Overview with Typical Steps” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
“System Overview” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
“Module Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
“Fault Identification” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
“Diagnostic Monitoring” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
“System Performance & Project Information” . . . . . . . . . . . . . . . . 389
“Summary of Output Voter Diagnostics (OVD)” . . . . . . . . . . . . . . 391
“Firmware Version Information” . . . . . . . . . . . . . . . . . . . . . . . . . . 392
“Collecting System Events” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Diagnostic Tools
To help you monitor a Trident system and identify faults, the Trident Diagnostic
Panel provides diagnostic tools in a main menu and toolbar.
For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.
Access Keys
In the Diagnostic Panel menus, underlined characters are access 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.
For more information, see Appendix A, “Keyboard & Mouse Shortcuts.”
Tree Menu
Command Description
Expand One Level Expands a selected tree node by one level.
Expand Branch Expands a selected tree node to all levels.
Expand All Expands the whole tree to all levels.
Collapse Branch Collapses a selected branch of the tree.
Commands Menu
Command Description
Connect Establishes communication between the Diagnostic
Panel and a Trident controller, assuming the PC
running TriStation is physically connected to the
Trident.
Disconnect Logically disconnects the Diagnostic Panel from the
Trident controller with which communication was
previously established.
Clear Faults on All Clears all fault flags in TriStation and clears the fault
Modules indicators on modules in the Trident. You should
identify the causes of the faults and correct them before
using this command.
Display Firmware Displays the firmware version numbers for all modules
Versions in a selected Trident System. When available, the
following information is also displayed:
- Six-digit PCB assembly number
- Hardware revision level
- Eight-digit serial number
All information is displayed in the message bar. You
can print it from there using the Print command from
the pop-up menu accessed with the right mouse button.
Collect System Collects historical diagnostic information from the
Events Trident controller so that faults can be analyzed.
Refresh Panel Updates the system performance parameters and
module status. (TriStation automatically updates the
status whenever you move to the Diagnostic Panel.)
Continuous .For Trident V1.0 systems, continuously updates the
Refresh faults status of all modules in the IOP.
In future releases, will continuously update the alarm
status of all IOPs in the Trident system.
Typical Steps
▼ The following are typical steps for using the Trident Diagnostic Panel with an
active Trident system:
1 Ensure that the TriStation PC is physically connected to the Trident controller
by means of a communication port and cable.
2 Start TriStation if it is not already started. Open the project which has been
downloaded to the target Trident. If this is not possible, create an empty project
based on instructions in “In the Connect To... dialog box, select the following
options:” on page 388.
3 Select the Trident Diagnostic Panel command on the Trident menu.
4 Connect to the Trident controller by selecting the Connect command on the
Commands menu.
5 In the Connect To... dialog box, select the Node Name of the target Trident and
the Main Processor port to which the TriStation cable is connected, as shown in
this example:
Trident V1.0
systems have only
one IOP.
8 If you see a red ALARM ON message, then at least one of the modules in the
IOP is faulting. Expand the System Overview tree and click MP/IOP1 to
display all of the modules in the IOP.
9 You should see at least one slot with a red frame around it. Double-click the
graphic icon for one of these slots to display the Properties dialog box (or select
the graphic icon and click the Properties box tool on the toolbar).
In the example below, the Properties box is displayed for the faulting module
in Slot 2. The Left Module tab is selected because the yellow Field Pwr
indicator on the left module in the slot is illuminated.
Displaying the
Properties Box for
a Faulting Module
10 Open the Properties box for any other slots in the IOP with red frames.
11 Click the Right Module or Left Module tab to read the fault cause(s), as shown
in the example above.
12 For corrective actions (such as replacing a module with a spare), see the
maintenance guidelines in the Trident Planning & Installation Guide.
13 After correcting all faults, select the Clear Faults on All Modules command on
the Commands menu.
System Overview
When you use the Connect command under the Commands menu to establish
communication with a selected Trident, the System Overview is displayed. This
view provides an icon for each IOP in the Trident system which states whether the
system alarm is on or off. IOPs with the Alarm Off message are displayed in green,
while IOPs with the Alarm On message are displayed in red (shown below).
IOP Displayed in
System Overview
When the system alarm is on, you should expand the tree on the left side of the view
to find out which modules are faulting. It’s easy to identify a faulting module,
because each one has a red frame around it, as shown on the next page. For more
information see “Fault Identification” on page 385.
Expanding the
Tree to See
Faulting Modules
Module Status
The Diagnostic Panel provides status information about Trident modules using:
• Various colors for slots and modules
• Graphic icons that replicate actual status indicators
• Red frames around modules that have faults
Selected Baseplate
Highlighted in Blue
Selected Base-
plate with Empty
Slot and Faulting Red Frame
Module Indicating Fault
Installed Module
Displayed in Gray
The following table describes the colors of Trident modules in the various
conditions that can be displayed by the Diagnostic Panel:
The Legend tab of the Properties dialog box also briefly explains the diagnostic
colors for modules, slots and status indicators:
• The Lock indicator turns red (on) only if the module is unlocked from its
baseplate.
Some Trident modules have other indicators in addition to the four basic ones
mentioned above:
• The Main Processors have Mode, Alarms and Communication indicators.
See page 371 for – The blue Prog Alarm indicator illuminates if it is connected to the
instructions. MP.ProgAlarm control attribute and the alarm relays are activated.
• Digital Input modules have Field Pwr indicators.
• Digital Output modules have Pwr/Load indicators.
• Analog Input modules have Field Pwr indicators.
For each type of Trident module, the Trident Planning & Installation Guide
provides details about all possible combinations of status indicators and the
corrective actions that are necessary.
Fault Identification
See page 386 for When a module experiences a fault, the Trident system illuminates appropriate
possible fault types. status indicators and displays a red frame around the module. To identify the cause
of the fault, double-click the red-framed module to bring up the Properties dialog
box, as shown for the Digital Input module below:
Displaying the
Properties Box for
a Faulting Module
The Properties box for a selected baseplate supplies the following tabs, which list
Current Faults and the Fault History for each module on the baseplate:
• Left Module
• Middle Module (for Main Processors only)
• Right Module
• Legend
Types of Faults
A Trident system is subject to external faults and internal faults, which are reported
by:
• Status indicators on the front panels of Trident modules
• The Diagnostic Panel in TriStation
• System attributes in TriStation’s Configuration editor
External Faults
A Trident system may experience the following types of external faults:
• Logic power faults
• Field power faults
• Load or fuse faults in the field termination wiring
Whenever an external fault occurs, the Trident system illuminates the yellow
indicator on the faulting I/O module and the Field Power or Logic Power alarm
indicators on the Main Processors. The Diagnostic Panel identifies the faulting
module by displaying a red frame around it. When these conditions occur, you need
to examine the faulting module’s power supplies and wiring.
Internal Faults
Internal faults are usually isolated to one of the Trident’s three channels (A, B or
C). When an internal fault occurs on one of the three channels, the remaining two
healthy channels maintain full control. Depending on the type of fault, the Trident
system either remains in TMR mode or degrades to dual mode for the system
component that is affected by the fault.
A Trident system may experience the following types of internal faults:
Minor A fault that is usually transient in nature and has no impact on system
operation. An example is a CRC error in one message.
Major A fault that degrades system operation, but does not affect the correct voting
of system inputs or outputs. An example is a fault that inhibits diagnostics on
one TMR channel.
Voter On Digital Output modules only, a voter fault occurs if the OVD circuitry
becomes defective. An output switch stuck high or stuck low is considered a
voter fault. More than one voter fault on a single point may lead to loss of
control over the outputs. For details about OVD, see “Summary of Output
Voter Diagnostics (OVD)” on page 391.
Fatal Channel A, B or C of an I/O module has a fatal fault if it is unable to read at
least one input point, or unable to control at least one output point. Loss of
communication with one channel of an I/O module is an example of a fatal
fault. Triconex recommends immediate replacement of any module that has
a fatal fault. However, many applications allow the system to run in dual
mode for a specified time period before shutting down, thereby providing a
grace period for module replacement.
When a major, voter or fatal fault occurs, the Trident illuminates the red Fault
indicator on the faulting I/O module and the System alarm on the Main Processors.
Whenever an internal fault occurs, you need to replace the faulting module.
Diagnostic Monitoring
You can monitor a TriStation project that is running in a Triconex controller using
any existing project or an empty project.
7 If an IOP displays a red ALARM ON message, then at least one of the modules
in the IOP is faulting.
8 Expand the System Overview tree and click MP/IOP1 to display all of the
modules in the IOP for fault identification.
Note If you are monitoring a Trident system with the Diagnostic Panel,
continuously updating the system performance and project information is a good
practice. To do this, turn on the checkmark for the Continuous Refresh command
on the Commands menu. A beeping sound notifies you if a chassis alarm turns on.
Item Description
Project The name and version number of the project which has been downloaded to the Trident
system you are monitoring. The version number is incremented each time the program is
downloaded.
Calendar The current time of the Trident system you are monitoring, expressed as
day/date/hour/minute/second. (This is not the time according to the PC on which you are
running TriStation.)
Poll Time The maximum time it takes for the Trident to obtain data from the input modules. The
poll time should not exceed the scan time—if it does, you should increase the scan time
using the Scan Rate parameter for the Main Processors in the Configuration editor.
Maximum The maximum amount of memory space that the Trident originally made available to
Memory your TriStation project. Free Memory shows how much memory space is left for
expanding your project.
Status The current operational state of the TriStation project. Possible states are:
• RUNNING (Programming Enabled)
• RUNNING (Programming Disabled)
• HALTED (Programming Enabled)
• HALTED (Programming Disabled)
• PAUSED (Programming Enabled)
• PAUSED (Programming Disabled)
• OFFLINE [not connected yet]
• IDLE [no project is downloaded]
Item Description
Scan Requested/ Gives the requested scan time and the actual scan time. Scan time is the time it takes the
Actual Trident controller to evaluate the application program plus the time required for system
overhead.
Requested: You have requested the desired scan time using the Scan Time parameter
for the Main Processors in the Configuration editor. If you request a scan time that is too
low, then scan-time overruns may occur.
Actual: Tells how much time the last scan actually took. The actual scan time will
always be greater than the requested scan time.
Free Memory Amount of memory space the Trident has available for expanding the size of your
TriStation project. The first number shows how much space is left. The second number
shows the maximum space that was available.
Scan Surplus Tells how much of the requested scan time is left after the executable elements have been
processed. The Scan Surplus must be positive—if it is negative, then adjust the scan
time using the Set Scan Time command in the Control Panel1 to make the surplus value
greater than or equal to zero.
Always set the scan time to a value that allows ample execution time for all executable
elements in your application—including conditional statements and print statements. If
the scan time is not long enough, then the Scan Surplus goes negative and scan
overruns occur, causing the Trident to set the relevant status attributes as follows:
• Increments MP.SCAN_OVERRUNS once for each time that a
longer scan time is needed.
• Sets MP.SURPLUS_SCAN_TIME to a negative number to indicate
the additional time period used by the scan overruns.
See “MP—Module Status” on page 305 for more information about the MP status
attributes for scan time.
1. The Scan Time parameter for the Main Processors applies only when you do a Download All or Download Change.
! WARNING
When OVD detects a failure, you should replace the failed module immediately, so
that the Trident's fault tolerance and Triple Modular Redundancy (TMR) remain in
effect. If you disable OVD, the first failure would go undetected, and a second
undetected failure would endanger the integrity of the system.
By default, OVD is enabled for all points on all DO modules in the system. To
disable OVD for an individual point, you must connect it to the SET_OVD_OFF
point control attribute using the Configuration editor. To display the disabled or
enabled status of DO points, use the OVD_RUNNING point status attribute or the
OVD RUNNING 01 parameter of the SYS_DO16_STATUS function block. For
instructions, see “Disabling and Monitoring OVD” on page 296 and “Monitoring
OVD Status” on page 322.
Note A DO module does not continue to run OVD once an OVD fault or
load/fuse error has been found.
7 Click the Stop button to stop TriStation from collecting System events.
8 Send the .tel file to the Triconex Customer Satisfaction Group in Irvine,
California.
Project Administration
Setting Up Security
In TriStation, you can create a security system that defines users and their
privileges with regard to editing, library changes, Trident state changes and other
operations. By selecting the Security command on the Project menu, you can
access the elements that make up a security system:
• Users
• Level Names
• Privileges
Upcoming sections describe these security elements in detail, but first you should
read the next section about initial log-in to TriStation.
Initial Log-in
When you create a new project, TriStation automatically sets up a default Level 01
(fully privileged) user name and password called MANAGER and PASSWORD
respectively. Triconex strongly recommends that you assign personalized level
names and passwords during project creation—otherwise, anyone who is familiar
with the defaults can use them to access your project.
Users
On the Users tab in the Project Security dialog box, you can add new users, delete
unwanted users, or modify the attributes of existing users, as shown in the example
that follows. A password defined for a user here is verified when that person opens
a TriStation project and logs in.
If the default names associated with the security levels (shown above) are not
appropriate for your circumstances, go to the Level Names tab and make
adjustments:
Privileges
Under the Privileges tab of the Project Security window, you can assign security
levels to TriStation and Trident operations that are listed under the Category drop-
down list box, as shown below:
Level 01 is the highest security level, providing access to all TriStation and Trident
operations. Level 10 is the lowest security level, providing access to the fewest
operations. Each level allows access to its own operations and the operations
associated with all lower levels. For example, A user with security level 03 has
access to operations for security levels 04, 05, 06, 07, 08, 09 and 10.
Trident Operations
The following table describes the Trident operations to which you can assign the
desired security levels. If the default security levels are not appropriate for your
circumstances, go to the Level Names tab and make adjustments.
Operation Description
Configuration: Change State to Permits a state change from Download Change to
Download All Download All, as indicated in the Message Bar.
Configuration: Modify Permits use of the Configuration editor and the
Configuration Build Element, Build Configuration, and
Rebuild Configuration commands.
Configuration: Open Permits you to open the Configuration editor.
Configuration
Diagnostics: Clear Trident Permits you to clear Trident faults in the
Faults Diagnostics Panel.
Diagnostics: Open Trident Permits use of the Diagnostic Panel.
Diagnostics Panel
Emulator: Open Control Panel Permits use of the Emulator Control Panel.
Trident: Change Point Values Permits use of the Set Value button in the
Properties box for program variables in the
Emulator and Trident Control Panel.
Trident: Download All Permits use of the Download All command in the
Emulator and Trident Control Panel.
Trident: Download Change Permits use of the Download Change command in
the Emulator and Trident Control Panel.
Trident: Enable/Disable Points Permits use of TriStation’s point disabling feature
in the Trident Control Panel.
Trident: Halt Application Permits use of the Halt command in the Emulator
or Trident Control Panel.
Trident: Halt/Run Mismatched Permits use of the Halt, Download All and Run
Application commands when the project executing in the
Trident does not match the application that is
currently open in TriStation.
Trident: Modify Control Panel Permits use of the Trident Control Panel.
Trident: Open Control Panel Permits you to open the Trident Control Panel.
Operation Description
Trident: Pause/Single Step Permits use of the Pause and Single Step
Application commands in the Emulator and Trident Control
Panel.
Trident: Run Application Permits use of the Run command in the Emulator
or Trident Control Panel.
Trident: Set Operating Permits the setting of parameters like Allow
Parameters Disabling of Points in the MP Configuration
dialog box.
Operation Description
Elements: Change Access Permits changes to element access from Read
Attributes Only, Read Write, or Locked status to another
access state.
Elements: Change Owner Permits changing the owner of an element, using
the Change Owner button on the Element
Description dialog box.
Elements: Modify Control Permits creation, modification and deletion of
Elements programs, functions and function blocks which
are defined for control applications.
Elements: Modify Safety Permits creation, modification and deletion of
Elements programs, functions and function blocks which
are defined for safety applications.
Elements: View Elements Permits Read-Only viewing of programs,
functions an function blocks.
Libraries: Export Permits exporting of elements to a shared library,
using the Export button on the User Defined tab
of the Project Directory dialog box.
Libraries: Import Permits importing of shared libraries, using the
Import button on the Shared Libraries tab of the
Project Directory dialog box.
Printing: Print Reports Permits printing of reports using the Print
Reports... dialog box.
Printing: Update Report Database Permits use of the Update Data button in the
Print Reports... dialog box.
Project: Change Options Permits changes to all options accessible from the
Project Options dialog box.
Project: Clear History Logs Clears all actions recorded in the Project History
dialog box.
Security: Add/Modify Users Permits addition, modification and removal of
users on the Users tab of the Security dialog box.
Operation Description
Security: Change Level Permits changes to the names associated with
Descriptions security levels on the Level Names tab of the
Security dialog box.
Security: Change Level Privileges Permits changes to the privileges associated with
security levels on the Privileges tab of the
Security dialog box.
Workbench: Change TriStation Permits changes to all options in the TriStation
1131 Options 1131 Options dialog box.
Level Names
Under the Level Names tab of the Project Security window, you can assign user
titles to security levels 1 though 10, as shown in the example that follows. Level 01
users have the greatest privileges—they have access to all TriStation and Trident
operations. Level 10 users have the fewest privileges with access to the fewest
operations.
Each security level allows access to its own operations and the operations
associated with all lower levels. For example, A user with security level 03 has
access to operations for security levels 04 through 10.
Any adjustments you make to the level names under the Level Names tab will
thereafter be displayed under the Users and Privileges tabs.
Element Attributes
The Element Description dialog box is accessible from the Element menu or by
clicking the Description button in the Project Directory dialog box. The attributes
in the top block of the Element Description dialog box are automatically logged
by TriStation as you create and modify an element. The Internal ID is for Triconex
use only—Customer Support personnel may ask for this number if you call for
assistance. Owned by normally refers to the password-protected user who created
the current element. Category and Description are entered by the user.
The middle block of the Element Description dialog box lists the Application,
CEM, and Usage attributes that have been assigned to the element:
• Application attributes define whether an element can be used in a safety or
a control (non-safety) application. See “Defining Safety or Control
Attributes” on page 37 for information.
• CEM attributes define whether, and where, a function block or function
may be used in a Cause & Effect Matrix (CEM). See the CEMPLE User’s
Guide for more information.
• Usage attributes suggest how the instances of a function block may be used
in a program. See “Description of Attributes for Library Elements” on
page 434.
Access Attributes
TriStation offers three choices for protecting access to an element:
• Read Only
• Read/Write
• Locked
Any user can change the access status of an element from Read Only to
Read/Write. Any element from which you can access the Element Description
dialog box can be locked to prevent editing by unauthorized users. Once an element
has been locked by a password-protected user, only that user or someone else with
the same security level can unlock it.
Change Owner
Normally the owner of an element is the user who created it. If the owner of an
element locks it, other users cannot unlock it unless they have the same security
level as the owner.
The owner names that are displayed when you click Change Owner are the ones
that have been defined for the Change Element Owner operation on the Privilege
tab of the Security command. You will only be able to change the owner names if
you have the appropriate security level.
Dependencies
Pressing the Dependencies button causes the Message Bar to display a list of all
elements on which the current element is dependent. As shown in the example
below, an alphanumeric list of all functions and function blocks invoked by a
certain program is displayed.
Language
The Language tab lets you select the default language and element types for your
project. These defaults apply to the New command in the Project Directory where
you create new programs, functions and function blocks. Your new element can
use any of the four available languages regardless of what the default language is.
However, you can only create new elements of the types which are selected in the
Enabled Features box of the Language tab, as shown below.
Allowable
Elements
Selections for
New command
in Project Directory
Variable Annotations
A Variable Annotation option allows you to describe a variable and display the
description in a box attached to the bottom of a variable, as shown below:
The Variable Annotation option works automatically if you select the feature as
soon as you open a new project, before creating any logic elements or control
panels. To select the Variable Annotation option, go to the Project Options menu,
select the Variable Annotations tab (shown below), and check one or both of the
following options in the General box:
• Annotation on by default
• Monitor value on by default
Monitor Colors
The Monitor Colors tab lets you change the default colors of wires displayed in
an instance view of an FBD or LD program, and to change the default colors for
CEM headers and intersections.
See “Using the Program Instance Monitor” on page 335 for additional information
on displayed colors in instance views. See the CEMPLE User’s Guide for details
about CEM header and intersections.
Note To use color monitoring, it must first be enabled on the Elements Options
dialog box, which is accessed from the Element Options command on the
Element menu of the FBD and LD editors.
Communications
The Communications tab in the Project Options dialog box allows you to select
the following options:
• Default Connection of TriStation to a Trident controller using a serial port
or network (Ethernet) port
• Trident Node Definitions for specifying TCP/IP addresses other than the
Triconex defaults
• Debug Message Options for use by Triconex engineers when they analyze
communication problems
Default Connection
This option allows you to set the default type of port used to connect the TriStation
PC to a Trident controller. The choices are:
• Main Processor
• Communication Module
The option you select here will be displayed in the Connect to... dialog box when
you use the Connect command from the Trident Control Panel or the Trident
Diagnostic Panel.
TriStation Options
As you develop various projects, you can use the default settings for TriStation’s
graphical interface features or change them according to your needs. Do this by
selecting the TriStation 1131 Options command from the Project menu and
clicking on one of these tabs:
• Directories
• Message Bar
• Drawing Colors
• FBD Editor
• LD Editor
Note Option settings for TriStation’s graphical interface features apply to all
projects that you access. They are not specific to particular projects.
Directories
The Directories tab under the TriStation 1131 Options dialog box identifies the
pathnames in your system where TriStation can find project files, shared libraries
and report templates. The default directories are:
Pop-Up Menu
With the cursor in the message bar area, press the right mouse button to display a
pop-up menu, as shown in the example above. The commands in the pop-up menu
are also accessible from the toolbar or main menu, with the exception of Jump to
Source (described above).
Selecting Attributes
Use the Message Bar tab in the TriStation 1131 Options dialog box to select the
following attributes for the message bar:
• Horizontal position at the bottom of the screen
• Vertical position on the right side of the screen
• Position of tabs at top, bottom, left or right of the message bar
• Size relative to the main window
• Auto-maximizing of active window when the message bar is displayed
Drawing Colors
The Drawing Colors tab in the TriStation 1131 Options dialog box lets you
select standard or customized colors for the attributes of your logic drawings.
2 Click the Change Color button to display a Windows common dialog box for
color selection, as shown on the next page:
3 To add a standardized color, select the desired color from Basic Colors and
click OK.
4 To define a custom color, click the Define Custom Colors button to display the
color matrix, as shown below:
FBD Editor
Use the FBD Editor tab to select the following options for logic elements written
in the FBD language:
• Double space function (block) terminals by default
• Enable EN/ENO terminals on functions by default
• Left-handed wire tool
For more information about FBD editing tools, refer to Chapter 2, “Function Block
Diagram (FBD).”
LD Editor
Use the LD Editor tab to select the following options for logic elements written in
the LD language:
• Double space function (block) terminals by default
• Compiler warning when right power rail is missing
• Left-handed link tool
For more information about LD editing tools, refer to Chapter 3, “Ladder Diagram
(LD).”
Printing
Logic Sheets
TriStation allows you to print the logic sheets for programs, functions and function
blocks developed in the FBD, LD and ST languages. In a language editor, use the
following File menu commands for printing:
• Print Preview
• Print Setup
• Print...
Standard Reports
To access standard reports, select the Print Reports... command in the File menu.
Before you can print reports, you have to click Update Data to generate the report
databases. Then select the name of the report you want to preview or print. The
available types of reports are listed in the Print Report dialog box as shown below:
Note Whenever you modify a project, you must update the report databases
again, because TriStation does not update them automatically.
Custom Reports
To design custom reports, use the Crystal Reports package or any other dBASE-
compatible report generator. For instructions, refer to the Crystal Reports User’s
Guide or the user’s guide for the report-generating package of your choice.
Triconex strongly recommends using Crystal Reports because the Crystal Reports
print engine is integrated with TriStation. If you want your report titles to appear
in the Print Reports dialog box so they are printable from TriStation, use Crystal
Reports and take these steps:
• Create a custom report and save it in a file which has the extension .RPT.
• Place the .RPT file in TriStation’s REPORTS directory.
• In the Print Reports... dialog box accessible from the Find menu, click
Update List to add your new report to the list of available report types, if it
is not already in the list.
Chapter 11 Printing
420 Custom Reports
Libraries
This chapter describes the libraries of functions, function blocks, and other
elements you can use for application development.
Topics include:
“Automatically Attached Libraries” . . . . . . . . . . . . . . . . . . . . . . . . 422
“Description of Attributes for Library Elements” . . . . . . . . . . . . . . 434
“Creating and Sharing Libraries” . . . . . . . . . . . . . . . . . . . . . . . . . . 437
“Updating Libraries” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
! WARNING
Never delete the Standard Library, Triconex Library or Trident Library from any
of your TriStation projects.
Chapter 12 Libraries
424 Automatically Attached Libraries
Chapter 12 Libraries
426 Automatically Attached Libraries
Chapter 12 Libraries
428 Automatically Attached Libraries
Chapter 12 Libraries
430 Automatically Attached Libraries
Chapter 12 Libraries
432 Automatically Attached Libraries
Chapter 12 Libraries
434 Description of Attributes for Library Elements
Internal State
Function blocks with the Internal State attribute have internal variables that
contain values used from one scan to the next. You may use the same instance of
such a function block multiple times in a program, as long as you understand the
consequences of doing so.
Exactly Once
Function blocks with the Exactly Once attribute can appear multiple times in a
program, but each appearance must have a unique instance name. Exactly once
means that you must not execute each function block instance more than once per
scan, and each function block instance must be executed every scan—that is, it
must be executed unconditionally.
Only Once
Function blocks with the Only Once attribute may appear multiple times in a
program, but each appearance must have a unique instance name. Only once
means that you must not execute each function block instance more than once per
scan, but it does not have to be executed every scan—that is, it may be executed
conditionally.
Chapter 12 Libraries
436 Description of Attributes for Library Elements
The attributes are displayed in the Element Description dialog box as shown
below:
The library specification (LSP) and export library (LT2) files are created in the
shared libraries directory. If you are not sure where the directory is located, go to
the Project menu, select TriStation 1131 Options, and view the Directories tab.
To import a shared library to another project, follow the instructions in the next
section.
Chapter 12 Libraries
438 Updating Libraries
Note You will be able to import only those elements which are not in your project
since all element names must be unique.
Updating Libraries
Occasionally Triconex issues an update to the Standard Library, Triconex Library,
and/or Trident Library which you will want to attach to your project. When you
click Verify Library Version, TriStation tells you, for each library, whether the
version attached to your project or the version on your hard drive is the latest. To
attach the latest version, select the Update command.
Keyboard Shortcuts
This section provides keyboard shortcuts for performing tasks such as editing,
scrolling and selecting. Tasks performed from the toolbar are also included here.
Keystroke Shortcuts
To Press
Copy selected items CTRL+C
To Move Press
Previous line UP ARROW ( ↑)
To end of current line END
Delete Keys
To Delete Press
One character to the left BACKSPACE
Note The above text selection keystrokes work in intermediate windows or when
using the Structured Text editor.
Sheet Scrolling
To Scroll Press
Up one line at a time UP ARROW (↑)
Down one line at a time DOWN ARROW (↓)
Up one page at a time PAGE UP
Mouse Shortcuts
This section provides mouse shortcuts for selecting, re-sizing, moving (dragging
and dropping), and de-selecting objects.
Selecting Objects
To Do This
Select objects Position the mouse cursor over the item. Click the left mouse
button once.
To select more than one item, hold down the left mouse
button while dragging the mouse such that a dotted rectangle
is drawn around the objects to be selected. Releasing the left
button will cause the selected objects to be highlighted.
Holding down the SHIFT button while clicking on objects will
also enable you to select multiple objects.
Re-Sizing Objects
To Do This
Re-size objects Select an object by clicking the left mouse button. As you
move the mouse around the edges of the object you will see
the cursor change to a double-sided arrow, if the object can be
re-sized. Click and hold the left mouse button to drag the
edge of the selected object to the desired size (larger or
⇔
smaller).
Example of re-size arrow:
De-Selecting Objects
To Do This
De-select objects Click anywhere on the sheet background.
Dialog Boxes
Some TriStation dialog boxes have several groups of options, with each group on
a separate tab. For example, the Project Directory dialog box (accessible from the
Project menu) has the following tabs:
• User Defined
• Shared Libraries
• Platform
• Other
To Do This
Select a tab Click on the desired tab or press the CTRL+TAB keys until the
desired tab is highlighted and displayed.
Select or clear options Point to the option button, check box, or list item desired and
using a mouse click the left mouse button.
Option Button:
Check Box:
To Do This
Select an item from a Click the arrow or press ALT+DOWN ARROW ( ↓ ) to list the
drop-down list options. Click on the desired selection or use the up/down
arrows to highlight the selection, as shown in this example:
Use the keyboard Press TAB until the desired check box, tab, or option button is
highlighted. Press the SPACEBAR to set or clear the box, tab, or
option.
To Do This
Open a new window of the Click New Window.
current element
Make windows overlap Click Cascade to arrange all open windows
so that they overlap and display the title bar
for each. To bring an overlapped window to
the top, select the window from the list of
open windows on the menu or click on the
title bar of the desired window.
Arrange windows above- Click Tile Horizontal to display any open
below each other without windows horizontally on the screen. This is
overlapping useful for showing several windows
simultaneously.
Arrange windows side-by- Click Tile Vertical to display any open
side without overlapping windows vertically on the screen. This is also
useful for showing several windows
simultaneously.
Close all open windows for Click Close All to close all open windows.
the current project without Prompts you to save any files that have been
closing the project changed since they were opened.
To Do This
Arrange all iconized windows Click Arrange Icons to neatly arrange all
for the current project iconized or minimized windows.
Display the properties dialog Click Show Properties or the Properties
for selected items in the Dialog button to display the properties of
current project element selected items.
Display the message bar at Click Show Message Bar to display the
the bottom of the screen message bar across the bottom of the screen.
Display the message bar Click Show Message Bar Horizontal or the
horizontally across the Horizontal Message Bar button to display
bottom of the screen compiler messages in a horizontal box across
the bottom of the screen while building
elements.
Display the message bar Click Show Message Bar Vertical or the
vertically on the right side of Vertical Message Bar button to display
the screen compiler messages in a vertical box on the
right side of the screen during the building of
elements.
comments D
brief description 41 data imports, validating 266
in FBD 82 data types
in LD 142 elementary 10
Compare Configurations dialog box 273 generic 10, 12
Compare to Last Download command in FDB language 65
272, 348, 349 in LD language 126
conditional statements, ST language 175 database files
configuration exporting point properties 256
building 211 rules for importing 260
comparing current to last downloaded dBASE file format 255, 260
272 default gateway address 225
comparing online configuration to last default macros 93, 153
downloaded 356 dependencies of an element 404
declaring during project development Description property of a point 249
43 development approach, typical 29
defined 13 diagnostic
elements 13 checking scan surplus 215
Configuration Differences report 277, information about controller 393
348, 354, 357 monitoring 388
configuration mismatch 346 procedure 377
Connect command, Diagnostic Panel 377 toolbar 374
Connect to Attributes dialog box 208 Differences display 274
connecting points automatically 283 Differences report 277, 357
connecting wires in program logic 38 directories, default 410
Connections Wizard Disable Remote Changes parameter 217
automatic naming 242 disabled points
table of options 280 enabling 353
constants list 364
properties in FBD 70 display options for points 252
properties in LD 131 DO points, system attributes 319
contacting Triconex xx download
control panels instructions 342
brief description 28 memory considerations 236
main purposes 332 states 355
procedure for use 339 Download All
two kinds 332 procedure 344
control statements in ST language 180 state 355
control tools 324 Download Change
Crystal Reports for custom reports 419 adding or deleting modules 352
custom reports, printing 419 addition of functions and function blocks
353
changing Memory variable types 353
K M
keyboard shortcuts 439 macros
default types 93, 153
L inserting into FBD comment 83
Ladder Diagram language. See LD lan- inserting into LD comment 143
guage. system 90, 150
languages in TriStation user-modifiable 90, 92, 150, 152
brief description 4 main menu commands
editors 16 in control panels 325
multiple in one project 16 in Diagnostic Panel 374
LD language in FBD editor 50
basic methods for writing logic 98 in LD editor 100
brief description 5 in ST editor 159
LD language, brief description 5 Main Processors. See MPs.
levels, security 402 major version number of element 361
libraries manual connection of points 281
automatically attached 422 manual naming of points 239
default directory 411 MaxSpan and MinSpan fields 250
exporting elements 437 memory allocation
importing elements 438 download considerations 236
shared 12 for Peer-to-Peer operations 237
updating 438 Memory Allocation node 197, 234
verifying versions 438 Memory points
Link and Unlink commands 268 acronyms for point display 249
list options for configuration views 191 addresses 249
load glitches, DO module 391 allocating 197
load/fuse error 392 memory space
Location field for a point 248 free 390
Locked attribute of element 404 maximum 389
logic Memory variable type, changing 353
basic methods for writing 48 Message Bar 211
basic methods for writing in FBD 48 Microsoft Access file format 255, 260
basic methods for writing in LD 98 Microsoft Excel file format 255, 260
basic methods for writing in ST 158 minor version number of element 361
colors for drawing 412 MinSpan and MaxSpan fields 250
example 42 Modbus aliases. See aliases.
logic sheets Modbus conversion information 390
printing in FBD 95 Modbus Read function blocks 431
printing in LD 155 module attributes
printing in ST 180 Communication Module 311–313
using in FBD editor 60 connecting program instance variables
using in LD editor 110 208
log-in, initial 396 defined 288
variables
annotating for monitoring 338
declaring in FBD 62
declaring in LD 123
declaring in ST 170
initialization 340
version number
incrementing 359
major 359
minor 359
of elements 361
of firmware 392
of project 359
verifying shared library 438
vertical network dividers
in FBD editor 81
in LD editor 141
view 335
enlarged 25, 334
instance 335
View menu
in Configuration editor 189
in Control Panels 328
in FBD editor 53
in LD editor 103
in ST editor 163
W
Window menu for TriStation views 23
windows, displaying and arranging 443
wires
connecting within logic 38
properties in FBD program 80
write access
configuring CM port 224, 372
control attribute for enabling 309, 367,
368, 370, 372
disabling changes to outputs 217, 372
setting write controls 372
Z
Zoom views 25, 334