Download as pdf or txt
Download as pdf or txt
You are on page 1of 476

TriStation 1131™ Developer’s Workbench

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.

©2001 Triconex. All Rights Reserved.

Pentium is a registered trademark of Intel Corporation.


Microsoft, Windows, and Windows NT are registered trademarks of Microsoft
Corporation.
Modbus is a registered trademark of Modicon Corporation.
Crystal Reports is a registered trademark of Seagate Software Company, Inc.
Triconex is a registered trademark of Triconex in the USA and other countries.
Cause and Effect Matrix Programming Language Editor (CEMPLE), TriStation
1131, TriStation MSW, and Trident are trademarks of Triconex in the USA and
other countries.
All other brands or product names may be trademarks or registered trademarks of
their respective owners.

Document No. 9720071-003


Printed in the United States of America.
Contents

Preface ................................................................................................................. xvii


How This Guide is Organized .................................................................... xviii
Related Documentation .............................................................................. xix
How to Contact Triconex ............................................................................. xx
Requesting Technical Support ................................................................... xx
Gathering Supporting Documentation ...................................................... xx
Contacting Triconex Technical Support .................................................. xxi
Telephone ........................................................................................ xxi
Fax ................................................................................................... xxi
E-mail ............................................................................................... xxi
Training ........................................................................................................ xxii

Chapter 1 A TriStation Project ...................................................................... 1


Elements of a Project ..................................................................................... 2
Projects for Trident Systems ...................................................................... 2
Programming Languages ........................................................................... 4
Function Block Diagram (FBD) Language ........................................... 4
Ladder Diagram (LD) Language .......................................................... 5
Structured Text (ST) Language ........................................................... 6
Cause & Effect Matrix (CEM) Language ............................................. 6
Programs ................................................................................................... 8
Program Instances .............................................................................. 8
Multiple Programs within a Project ...................................................... 8
Function Blocks .......................................................................................... 9
Function Block Instances .................................................................... 9
Functions ................................................................................................. 10
Data Types ............................................................................................... 10
Elementary Data Types ..................................................................... 11
Generic Data Types .......................................................................... 12
Shared Libraries ....................................................................................... 12

TriStation 1131 Developer’s Guide


iv

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

TriStation 1131 Developer’s Guide


v

Chapter 2 Function Block Diagram (FBD) ................................................. 47


Basic Methods for Writing Logic ................................................................ 48
FBD Editing Tools ........................................................................................ 49
Pop-up Menu ........................................................................................... 49
For A Selected Element .................................................................... 49
For Any Empty Area .......................................................................... 49
Size/Alignment Commands ............................................................... 50
Menu Commands and Toolbars ............................................................... 50
Access Keys ...................................................................................... 51
Enlarged View of Elements ...................................................................... 56
Creating Executable Elements .................................................................... 57
Assigning Application Type Attributes ...................................................... 58
Modifying Application Type Attributes ............................................... 59
Using Logic Sheets ...................................................................................... 60
Assigning Sheet Properties ...................................................................... 61
Declaring Input, Output & Local Variables ................................................ 62
Properties under the Selected Tab .......................................................... 62
Naming .............................................................................................. 63
Width ................................................................................................. 63
Annotation ......................................................................................... 63
Automatic Naming ............................................................................. 63
Properties under the Declaration Tab ...................................................... 64
Data Type .......................................................................................... 65
Variable Type .................................................................................... 66
Initial Value ........................................................................................ 66
Description ........................................................................................ 66
Declaration Dialog Box ...................................................................... 67
Properties under the Annotation Tab ....................................................... 69
Declaring Constants .................................................................................... 70
Properties under the Constant Tab .......................................................... 70
Value, Type & Validate ...................................................................... 70
Width Field ........................................................................................ 71
Annotate Checkbox ........................................................................... 71
Auto Name Feature ........................................................................... 71
Properties under the Annotate Tab .......................................................... 71
Declaring Functions and Function Blocks ................................................ 72
Declaring the Properties of Functions ...................................................... 73
Inputs List .......................................................................................... 73
Output of a Function .......................................................................... 74
Inverting Inputs or Outputs ................................................................ 74
Width ................................................................................................. 75
Double-Space Option ........................................................................ 75
EN/ENO Parameters ......................................................................... 75

TriStation 1131 Developer’s Guide


vi

Declaring the Properties for a Function Block ......................................... 77


Fields under the Selected Tab .......................................................... 77
Fields of the Declaration Tab ............................................................ 79
Specifying Wire Properties ......................................................................... 80
Using Network Dividers ............................................................................... 81
Comments, Variable Annotation and Macros ........................................... 82
Including Comments ................................................................................ 82
Comment Tab ................................................................................... 83
Style Tab ........................................................................................... 83
Pickup-Drop Tab ............................................................................... 84
Edit Fields Tab .................................................................................. 84
Using Variable Annotation ....................................................................... 85
Annotation for the Entire Project ....................................................... 86
Annotating Individual Variables ......................................................... 88
Using Instance Views ........................................................................ 88
Using Macros .......................................................................................... 90
Inserting Macros into Comments or Annotations .............................. 91
Working with User-Modifiable Macros .............................................. 92
Default Macros for Annotation Boxes ............................................... 93
Printing Logic Sheets .................................................................................. 95

Chapter 3 Ladder Diagram (LD) ................................................................. 97


Basic Methods for Writing Logic ................................................................ 98
LD Editing Tools .......................................................................................... 99
Pop-up Menu ........................................................................................... 99
For A Selected Element .................................................................... 99
For Any Empty Area .......................................................................... 99
Size/Alignment Commands ............................................................. 100
Menu Commands and Toolbar .............................................................. 100
Access Keys ................................................................................... 101
Enlarged View of Elements ................................................................... 106
Creating Executable Elements ................................................................. 107
Assigning Application Type Attributes ................................................... 108
Modifying Application Type Attributes ............................................. 109
Using Logic Sheets .................................................................................... 110
Assigning Sheet Properties ................................................................... 111
Links ............................................................................................................ 112
Power Rails ................................................................................................. 113
Declaring Contacts and Coils ................................................................... 114
Properties under the Selected Tab ........................................................ 114
Naming ............................................................................................ 115
Width ............................................................................................... 115

TriStation 1131 Developer’s Guide


vii

Annotation ....................................................................................... 115


Contact Type ................................................................................... 116
Coil Type ......................................................................................... 117
Automatic Naming ........................................................................... 118
Properties under the Declaration Tab .................................................... 119
Variable Type .................................................................................. 119
Description ...................................................................................... 120
Declaration Dialog Box .................................................................... 120
Properties under the Annotation Tab ..................................................... 122
Declaring Local, Input and Output Variables ........................................... 123
Properties under the Selected Tab ........................................................ 123
Naming ............................................................................................ 124
Width ............................................................................................... 124
Annotation ....................................................................................... 124
Contact or Coil Type ........................................................................ 124
Automatic Naming ........................................................................... 124
Properties under the Declaration Tab .................................................... 125
Data Type ........................................................................................ 126
Variable Type .................................................................................. 127
Initial Value ...................................................................................... 127
Description ...................................................................................... 127
Declaration Dialog Box .................................................................... 128
Properties under the Annotation Tab ..................................................... 130
Declaring Constants .................................................................................. 131
Properties under the Constant Tab ........................................................ 131
Value, Type & Validate .................................................................... 131
Width Field ...................................................................................... 132
Annotate Checkbox ......................................................................... 132
Auto Name Feature ......................................................................... 132
Properties under the Annotate Tab ........................................................ 132
Declaring Functions and Function Blocks .............................................. 133
Declaring the Properties for Functions ................................................... 134
Inputs List ........................................................................................ 134
Extensible Functions ....................................................................... 135
Output of a Function ........................................................................ 135
Inverting Inputs or Outputs .............................................................. 135
Width ............................................................................................... 136
Double-Space Option ...................................................................... 136
EN/ENO Parameters ....................................................................... 137
Declaring the Properties for a Function Block ........................................ 138
Fields under the Selected Tab ........................................................ 138
Fields of the Declaration Tab .......................................................... 140
Using Network Dividers ............................................................................. 141

TriStation 1131 Developer’s Guide


viii

Comments, Variable Annotation and Macros ......................................... 142


Including Comments .............................................................................. 142
Comment Tab ................................................................................. 143
Style Tab ......................................................................................... 143
Pickup-Drop Tab ............................................................................. 144
Edit Fields Tab ................................................................................ 144
Using Variable Annotation ..................................................................... 145
Annotation for the Entire Project ..................................................... 146
Annotating Individual Variables ....................................................... 148
Using Instance Views ...................................................................... 148
Using Macros ........................................................................................ 150
Inserting Macros into Comments or Annotations ............................ 151
Working with User-Modifiable Macros ............................................ 152
Default Macros for Annotation Boxes ............................................. 153
Printing Logic Sheets ................................................................................ 155

Chapter 4 Structured Text (ST) ................................................................ 157


Basic Methods for Writing Logic .............................................................. 158
ST Editing Tools ......................................................................................... 159
Pop-up Menu ......................................................................................... 159
Menu Commands and Toolbar .............................................................. 159
Access Keys ................................................................................... 160
Creating Executable Elements ................................................................. 164
Assigning Application Type Attributes ................................................... 165
Modifying Application Type Attributes ............................................. 166
Declarations ............................................................................................... 167
Declaring Programs ............................................................................... 167
Declaring Function Blocks ..................................................................... 168
Declaring Functions ............................................................................... 169
Declaring Input and Output Variables ................................................... 170
Declaring Local Variables and Function Block Instances ...................... 170
Invoking Functions and Function Block Instances ................................ 171
Referencing Function Block Outputs .............................................. 171
Expressions ................................................................................................ 172
Operands and Operators ....................................................................... 172
Order of Evaluation ............................................................................... 172
Statements .................................................................................................. 174
Assignment Statements ........................................................................ 174
Conditional Statements ......................................................................... 175
Function and Function Block Control Statements ................................. 175
Selection Statements ............................................................................ 176

TriStation 1131 Developer’s Guide


ix

ST Language Examples ............................................................................. 177


Invoking a Function ................................................................................ 177
Invoking a Function Block ...................................................................... 178
Referencing Function Block Outputs ..................................................... 179
Implementation Exceptions ....................................................................... 180
Printing Logic Sheets ................................................................................ 180

Chapter 5 Configuration Editor—Basic Concepts .................................. 181


What is a Configuration? ........................................................................... 182
Allocating I/O Modules ........................................................................... 182
Giving Tagnames to Points .................................................................... 182
Declaring Program Instances ................................................................. 183
Connecting Inputs and Outputs to Tagnames ....................................... 184
Using Configuration Tools ........................................................................ 186
Menu Commands and Toolbar .............................................................. 186
Access Keys .................................................................................... 186
List Options for Configuration Views ...................................................... 191
Developing a Configuration ...................................................................... 192
Allocating I/O Modules ........................................................................... 194
Adding I/O Modules ......................................................................... 195
Deleting I/O Modules ....................................................................... 195
Specifying the IOP Location ............................................................ 196
Allocating Memory Points ...................................................................... 197
Declaring Tagnames for Trident Points ................................................. 198
Examples ......................................................................................... 198
Steps to Follow ................................................................................ 199
Options for Moving a Tagname .............................................................. 200
Declaring Program Instances ................................................................. 201
Changing the Order of Execution .................................................... 202
Displaying an Instance View ........................................................... 203
Connecting Program Instance Variables to Trident Points .................... 204
Using the Connect to Points Dialog ................................................. 204
Using the Connect to Instances Dialog ........................................... 207
Using the Connections Wizard ........................................................ 208
Connecting Program Instance Variables to System Attributes .............. 208
Using the Connect to Attributes Dialog ........................................... 208
Building the Configuration ...................................................................... 211
Downloading & Testing .......................................................................... 211

TriStation 1131 Developer’s Guide


x

Chapter 6 Configuration Editor—Advanced Topics .............................. 213


Configuring Main Processors ................................................................... 214
Setting the System Parameters ............................................................. 214
Node Name ..................................................................................... 214
Scan Time (ms) ............................................................................... 215
Remote Access to Aliased Tagnames ............................................ 215
Remote Access to All Tagnames .................................................... 215
Setting the Operating Parameters ......................................................... 216
Password Required for Connection ................................................ 216
Restart on Power Up ....................................................................... 217
Disable Remote Changes to Outputs ............................................. 217
Allow Disabling of Points ................................................................. 217
Use Local Time ............................................................................... 217
Configuring Network (TriStation) Ports .................................................. 218
Configuring Serial Ports ........................................................................ 219
Port Selection .................................................................................. 219
Modbus Protocol ............................................................................. 220
Modbus Station Address ................................................................. 220
Baud Rate ....................................................................................... 220
Data Bits ......................................................................................... 220
Stop Bits .......................................................................................... 220
Parity ............................................................................................... 220
Transceiver Mode ........................................................................... 221
Handshake ...................................................................................... 221
Wire Type ........................................................................................ 221
Modbus Range ................................................................................ 221
Delays ............................................................................................. 222
Configuring the Communication Module ................................................ 222
Configuring Network Ports .................................................................... 223
Slot Selection ........................................................................................ 223
NET1 and NET2 Configuration Options ................................................ 224
NET1 and NET2 Mode .................................................................... 224
Privilege .......................................................................................... 224
Transceiver Port .............................................................................. 224
Transceiver Mode ........................................................................... 225
Trident TCP/IP Address .................................................................. 225
TCP/IP Subnet Mask ...................................................................... 225
Default Gateway Address ............................................................... 225
Time Synchronization ..................................................................... 225
Configuring Serial Ports ........................................................................ 226
Port Selection .................................................................................. 226
Modbus Protocol ............................................................................. 227
Modbus Station Address ................................................................. 227
Baud Rate ....................................................................................... 227
Data Bits ......................................................................................... 227
Stop Bits .......................................................................................... 227

TriStation 1131 Developer’s Guide


xi

Parity ............................................................................................... 228


Transceiver Mode ............................................................................ 228
Handshake ...................................................................................... 228
Wire Type ........................................................................................ 229
Modbus Range ................................................................................ 229
Signal Delays .................................................................................. 229
Configuring the Pulse Input Module ......................................................... 231
Field Power ............................................................................................ 232
Point Configuration ................................................................................ 232
Point Type ....................................................................................... 232
Triggering Mode .............................................................................. 233
Number of Gear Teeth .................................................................... 233
Scale ............................................................................................... 233
Changing Memory Allocation .................................................................... 234
Displaying Memory Allocation for Application Data ............................... 236
Downloading Considerations ................................................................. 236
Allocating Memory for Peer-to-Peer Operations ..................................... 237
Specifying Point Properties ...................................................................... 238
Definitions of Input, Output & Memory Points ........................................ 238
Rules that Apply ..................................................................................... 238
Methods for Declaring Tagnames .......................................................... 239
Manual Naming ............................................................................... 239
Using Auto Tag Names ................................................................... 240
Automatic Naming in the Connections Wizard ................................ 242
Importing Tagnames ....................................................................... 242
Deleting Point Names ............................................................................ 242
Assignment of Aliases ............................................................................ 242
What are Aliases? ........................................................................... 243
Aliases Assigned by TriStation ........................................................ 244
User-Assigned Aliases .................................................................... 245
Aliases and Download Change ....................................................... 246
Application Type Attributes .................................................................... 247
Other Properties of Trident Points ......................................................... 248
Addresses of Memory Points .......................................................... 249
MinSpan & MaxSpan Fields ............................................................ 250
Monitor Display Options ......................................................................... 252
Viewing Points and Attributes for Selected Modules ............................. 253
Viewing Points ................................................................................. 253
Viewing Attributes ............................................................................ 254
Exporting and Importing Point Properties ............................................... 255
Exporting Point Properties ..................................................................... 255
Selecting Point Type(s) for Export ................................................... 256
Exporting to a Database or Excel File ............................................. 256

TriStation 1131 Developer’s Guide


xii

Exporting to a Text File ................................................................... 258


Sample Steps to Follow .................................................................. 259
Importing Point Properties ..................................................................... 260
Rules for Database or Excel Files ................................................... 260
Rules for Text Files ......................................................................... 261
Required Values for Point Properties .............................................. 263
Sample Steps to Follow .................................................................. 265
Import Record Processing .............................................................. 269
Compare to Last Download ...................................................................... 272
Details Display ....................................................................................... 273
Element Differences Display ................................................................. 274
Configuration Differences Report .......................................................... 277
Using the SOE Capability .......................................................................... 278
Using the Connections Wizard ................................................................. 279
Overview ............................................................................................... 279
Manual Connection ............................................................................... 281
Steps to Follow ............................................................................... 281
Automatic Connection ........................................................................... 283
Automatic Naming ................................................................................. 283
Manual Naming with Automatic Connection .......................................... 284
Undoing Point Names and Connections ............................................... 284

Chapter 7 System Attributes .................................................................... 285


What are System Attributes? .................................................................... 286
Modules of the Trident System .............................................................. 287
Module and Point Attributes .................................................................. 288
Methods of Access ................................................................................ 289
Using System Attributes ........................................................................... 290
Connecting System Attributes to Program Instance Variables .............. 290
Viewing System Attributes ..................................................................... 291
Show/Hide System Attributes Command ........................................ 291
Viewing Module Attributes .............................................................. 292
Viewing Point Attributes .................................................................. 293
Assigning Modbus Aliases .................................................................... 294
Individual Assignment ..................................................................... 294
Group Assignment .......................................................................... 295
Disabling and Monitoring OVD .............................................................. 296
General Information ........................................................................ 296
Using the SET_OVD_OFF Attribute ............................................... 297
Using the OVD_RUNNING Attribute ............................................... 299
Description of System Attributes ............................................................. 301
Summary Status for All Trident Subsystems ......................................... 302
I/O Subsystem Status ............................................................................ 304
MP—Module Status .............................................................................. 305

TriStation 1131 Developer’s Guide


xiii

MP—TriStation Port Status .................................................................... 307


MP—Operational Modes ........................................................................ 308
MP—Serial Port Status .......................................................................... 310
CM—Module and Port Status ................................................................ 311
IOP1 Status ............................................................................................ 314
I/O String Status ..................................................................................... 316
I/O Module Status .................................................................................. 317
DO Points—Diagnostic Status and Control ........................................... 319
AO Points—Field Fault Status ............................................................... 320
PI Points—Signal Status ........................................................................ 320
Using SYS_ Function Blocks .................................................................... 321
Monitoring OVD Status .......................................................................... 322

Chapter 8 Control Panels .......................................................................... 323


Control Tools .............................................................................................. 324
Pop-up Menu ......................................................................................... 324
For A Selected Element .................................................................. 324
For Any Empty Area ........................................................................ 324
Menu Commands and Toolbar .............................................................. 325
Access Keys .................................................................................... 326
Table of Control Tools ............................................................................ 327
Using a Control Panel ................................................................................ 332
Setting Up a Monitor Sheet .................................................................... 332
Setting Values for Testing ...................................................................... 333
Enlarging Your View of Elements .................................................... 334
Using the Program Instance Monitor ..................................................... 335
Execution Flow in an FBD Program Instance .................................. 336
Power Flow in an LD Program Instance .......................................... 337
Annotating Variables for Monitoring ................................................ 338
Sample Steps for Set-Up and Use ......................................................... 339
Using the Trident Emulator Client .......................................................... 341
Parameters for DDE Clients ............................................................ 341
Downloading an Application ..................................................................... 342
Checking for Correct Installation ............................................................ 343
Download All .......................................................................................... 344
Steps to Follow ................................................................................ 344
Configuration Mismatch ................................................................... 346
Download Change ................................................................................. 347
Guidelines ....................................................................................... 348
Steps to Follow ................................................................................ 349
Allowable Changes .......................................................................... 350
Additional Tips ................................................................................. 352
Controlling & Changing an Existing Application ..................................... 354
Download States .................................................................................... 355
Upload and Verify .................................................................................. 356

TriStation 1131 Developer’s Guide


xiv

Details Display ................................................................................ 357


Configuration Differences Report .................................................... 357
Download History .................................................................................. 358
Version Numbering of Projects ....................................................... 359
Downloaded Elements and Their Attributes .................................... 360
Disabling Points ......................................................................................... 362
Disabling Selected Points ...................................................................... 362
Listing All Disabled Points ..................................................................... 364
Enabling Points ..................................................................................... 365
Controlling the Operational Modes .......................................................... 366
Description of Modes ............................................................................. 366
Options for Controlling the Modes ......................................................... 367
Using the MP Control Attributes ...................................................... 368
Halting Execution ............................................................................ 369
Enabling and Disabling Remote Writes .......................................... 370
Activating the Program Alarm ......................................................... 371
Overview of Write Controls .................................................................... 372

Chapter 9 Trident Diagnostic Panel ......................................................... 373


Diagnostic Tools ........................................................................................ 374
Menu Commands and Toolbar .............................................................. 374
Access Keys ................................................................................... 374
Overview with Typical Steps ..................................................................... 377
Typical Steps ......................................................................................... 377
System Overview ....................................................................................... 380
Using Continuous Refresh .................................................................... 380
Module Status ............................................................................................ 382
Colors of Slots and Modules ................................................................. 382
Status Indicators on Modules ................................................................ 383
Fault Identification ..................................................................................... 385
Types of Faults ...................................................................................... 386
External Faults ................................................................................ 386
Internal Faults ................................................................................. 386
Correcting and Clearing Faults .............................................................. 387
Diagnostic Monitoring ............................................................................... 388
System Performance & Project Information ............................................ 389
Summary of Output Voter Diagnostics (OVD) ......................................... 391
Firmware Version Information .................................................................. 392
Collecting System Events ......................................................................... 393

TriStation 1131 Developer’s Guide


xv

Chapter 10 Project Administration ............................................................. 395


Setting Up Security .................................................................................... 396
Initial Log-in ............................................................................................ 396
Users ...................................................................................................... 396
Privileges ............................................................................................... 398
Trident Operations ........................................................................... 399
TriStation 1131 Operations ............................................................. 401
Level Names .......................................................................................... 402
Element Attributes ..................................................................................... 403
Access Attributes ................................................................................... 404
Change Owner ....................................................................................... 404
Dependencies ........................................................................................ 404
Specifying Project Options ....................................................................... 405
Language ............................................................................................... 405
Variable Annotations .............................................................................. 406
Monitor Colors ........................................................................................ 407
Communications .................................................................................... 408
Default Connection .......................................................................... 408
Trident Node Definitions .................................................................. 408
Debug Message Options ................................................................. 410
TriStation Options ...................................................................................... 410
Directories .............................................................................................. 410
Using the Message Bar .......................................................................... 411
Pop-Up Menu .................................................................................. 411
Selecting Attributes ......................................................................... 412
Drawing Colors ...................................................................................... 412
FBD Editor ............................................................................................. 414
LD Editor ................................................................................................ 414
Viewing the Project History ....................................................................... 415

Chapter 11 Printing ...................................................................................... 417


Logic Sheets ............................................................................................... 418
Standard Reports ....................................................................................... 418
Custom Reports ......................................................................................... 419

Chapter 12 Libraries .................................................................................... 421


Automatically Attached Libraries ............................................................. 422
Standard Library Functions .................................................................... 423
Triconex Library Functions ..................................................................... 427
Trident Library Function Blocks ............................................................. 431

TriStation 1131 Developer’s Guide


xvi

Description of Attributes for Library Elements ....................................... 434


Programming Usage Attributes ............................................................. 434
Viewing Attributes for Pre-Defined Functions and Function Blocks ...... 436
Creating and Sharing Libraries ................................................................ 437
Exporting Elements to a Library ............................................................ 437
Importing Libraries to a Project ............................................................. 438
Updating Libraries ..................................................................................... 438

Appendix A Keyboard & Mouse Shortcuts ................................................ 439


Keyboard Shortcuts ................................................................................... 439
Keystroke Shortcuts .............................................................................. 439
Text Navigation Keys ............................................................................ 439
Delete Keys ........................................................................................... 440
Sheet Scrolling ...................................................................................... 440
Mouse Shortcuts ........................................................................................ 441
Selecting Objects .................................................................................. 441
Re-Sizing Objects .................................................................................. 441
Dragging and Dropping Objects ............................................................ 441
De-Selecting Objects ............................................................................. 442
Edit Object Properties ........................................................................... 442
Dialog Boxes ......................................................................................... 442
Arranging and Displaying Windows ....................................................... 443

Index .................................................................................................................... 445

TriStation 1131 Developer’s Guide


Preface

TriStation 1131 Developer’s Workbench is a Windows NT®-based programmer’s


workbench for developing, testing and documenting process-control applications
that execute in the Trident controller. For information on installing TriStation, see
the Trident Communication Guide.
The following languages are available for programming in TriStation:
• 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 Programming
Controllers.
Using the features of TriStation, you can perform the following tasks:
• Develop programs and other executable elements such as functions,
function blocks, and data types using any of the language editors
• Select functions and function blocks from IEC-compliant libraries and/or
custom libraries
• Graphically configure the modules and points in your Trident system
• Apply password protection to projects and programs according to user
names and security levels
• Debug your program logic by emulating execution in the Trident controller
• Print sheets of your program logic, hardware configuration, variable lists,
and Main Processor performance data
• Download as many as 250 program instances to a single Trident, with each
instance having up to 2000 input, output, and local variables
• Display diagnostic information about system performance and fault details

TriStation 1131 Developer’s Guide


xviii How This Guide is Organized

How This Guide is Organized


This guide is organized as follows:
• Chapter 1, “A TriStation Project” — Briefly describes the elements of a
TriStation project, the languages and tools you can use, and basic methods
for developing a project.
• Chapter 2, “Function Block Diagram (FBD)”— Describes basic methods of
writing logic in FBD and provides details on the use of FBD editing tools.
• Chapter 3, “Ladder Diagram (LD)” — Describes basic methods of writing
logic in LD and provides details on the use of LD editing tools.
• Chapter 4, “Structured Text (ST)” — Describes basic methods of writing
logic in ST and provides details on the use of ST editing tools.
• Chapter 5, “Configuration Editor—Basic Concepts” — Describes what a
configuration is and how to use the configuration tools; how to allocate I/O
Modules; how to declare tagnames and program instances; and how to
connect program instance variables to Trident points and system attributes.
• Chapter 6, “Configuration Editor—Advanced Topics” — Explains how to
configure the Main Processors and other configurable modules; change
memory allocation for points; connect program variables to Trident points
using a variety of methods; import and export Trident point properties;
compare the current configuration to the last downloaded configuration; and
configure the controller for event collection.
• Chapter 7, “System Attributes”— Explains what system attributes are, how
to use them, and which system attributes are available.
• Chapter 8, “Control Panels” — Explains how to operate the Emulator and
Trident Control Panels; disable and enable points; monitor the behavior of
variables and power flow in program instances; use the Download All and
Download Change capabilities; and how to control the Main Processor’s
operational modes.
• Chapter 9, “Trident Diagnostic Panel” — Explains how to use the
Diagnostic Panel for on-line monitoring of a downloaded project and fault
identification within a Trident system; how to log on to any active Trident
for read-only diagnostic monitoring; how to display the firmware version
numbers of modules in a Trident system; and how to collect TRILOG
events.
• Chapter 10, “Project Administration” — Describes the TriStation security
system; element attributes; project options for languages, variable

TriStation 1131 Developer’s Guide


Related Documentation xix

annotations, monitor colors, and communications; and options for


TriStation’s graphical interface features.
• Chapter 11, “Printing” — Explains how to use the print-screen capability,
generate standard reports, and create custom reports.
• Chapter 12, “Libraries” — Explains how to add, update and remove
libraries; and how to create shared libraries. Briefly describes the functions
and function blocks available in the libraries that come with TriStation.
• Appendix A, “Keyboard & Mouse Shortcuts” — Describes keyboard and
mouse shortcuts for tasks like editing, scrolling and selecting.

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

TriStation 1131 Developer’s Guide


xx How to Contact Triconex

How to Contact Triconex


You can obtain sales information and technical support for Triconex products from
any regional customer center or from corporate headquarters. To locate regional
centers, go to the Global Locator page on the Triconex Web site at:
http://www.triconex.com.

Requesting Technical Support


You can obtain technical support from any regional center and from offices in
Irvine, California and Houston, Texas. If you require emergency or immediate
response and are not a participant in the System Maintenance Program (SMP), you
may incur a charge. After-hours technical support is billed at the rate specified in
the current Customer Satisfaction Price List.
Requests for support are prioritized as follows:
• Emergency requests are given the highest priority
• Requests from SMP participants and customers with purchase order or
charge card authorization are given next priority
• All other requests are handled on a time-available basis

Gathering Supporting Documentation


Before contacting corporate technical support, please try to solve the problem by
referring to the Triconex documentation. If you are unable to solve the problem,
obtain the following information:
• Error messages and other indications of the problem
• Sequence of actions leading to the problem
• Actions taken after the problem occurred
• If the problem involves a Triconex controller, obtain the model numbers and
revision levels for all affected items. This information can be found on the
modules, in the System Log Book, or on the TriStation Diagnostic Panel.
• If the problem involves software, obtain the product version number by
selecting the About topic from the Help menu.

TriStation 1131 Developer’s Guide


Requesting Technical Support xxi

Contacting Triconex Technical Support


If possible, you should contact your regional customer center for assistance. If you
cannot contact your regional center, contact technical support for the type of
system you are using, either ESD systems or turbomachinery systems.
Please include the following information in your message:
• Your name and your company name
• Your location (city, state, and country)
• Your phone number (area code and country code, if applicable)
• The time you called
• Whether this is an emergency

Note If you require emergency support and are not an SMP participant, please
have a purchase order or credit card available for billing.

Emergency calls are responded to on a 24-hour daily basis.

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

TriStation 1131 Developer’s Guide


xxii Training

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.

TriStation 1131 Developer’s Guide


CHAPTER 1

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

TriStation 1131 Developer’s Guide


2 Elements of a Project

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.

Projects for Trident Systems


A TriStation project is targeted for a single Trident system. If a safety control
system uses more than one Trident, there will be a TriStation project for each. For
example, the control strategy for an oil refinery might be implemented as five
TriStation projects, each executed by a different Trident system to control the
following processes:
• Distilling
• Platforming
• Oil transportation
• Power-generating utilities
• Fire & gas detection/suppression

TriStation 1131 Developer’s Guide


Elements of a Project 3

Overview of a TriStation Project

Chapter 1 A TriStation Project


4 Elements of a 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.

Function Block Diagram (FBD) Language


FBD is a graphically oriented language that corresponds to circuit diagrams. The
elements used in this language appear as blocks wired together to form circuits.
The wires can communicate binary and other types of data between FBD elements.
In FBD, a group of elements visibly interconnected by wires is known as a network.
An FBD diagram may contain one or more networks. The following is an example
of a switch debounce algorithm block written in the FBD language:

TriStation 1131 Developer’s Guide


Elements of a Project 5

Ladder Diagram (LD) Language


LD is a graphically oriented language that uses a standard set of symbols to
represent relay logic. The basic elements are coils and contacts which are
connected by links. Links are different from the wires used in FBD, in that they
transfer only binary data between LD symbols. This is in keeping with the power
flow characteristics of relay logic.
Function blocks and function elements may be used in LD diagrams as long as they
have at least one binary input and output to facilitate binary data flow. Chapter 3
provides more detail on this topic. The following is an example of a switch
debounce algorithm consisting of two networks written in the LD language:

Chapter 1 A TriStation Project


6 Elements of a Project

Structured Text (ST) Language


ST is a general purpose, high-level programming language, similar to PASCAL or
C. ST is particularly useful for complex arithmetic calculations, and can be used to
implement complicated procedures that are not easily expressed in graphical
languages (for example, FBD or LD).
ST allows you to create Boolean and arithmetic expressions as well as structured
programming constructs such as conditional statements (IF...THEN...ELSE).
Functions and function blocks may be invoked in ST. The following is an example
of a switch debounce algorithm written in the ST language:

Cause & Effect Matrix (CEM) Language


CEM is a methodology that is commonly used throughout the process control
industry to define Emergency Shutdown (ESD) strategies. CEMs are frequently
used for applications like fire and gas systems for which the programming logic is
simple, but the volume of inputs and outputs that need to be controlled is high. In
its simplicity, CEM is readily understood by a broad range of plant personnel from
process control engineers to maintenance operators.
The CEM methodology allows you to easily associate a problem in a process with
one or more actions that must be taken to correct the problem. The problem is
known as a cause and the action is known as an effect. In a typical CEM, a cause is

TriStation 1131 Developer’s Guide


Elements of a Project 7

represented by a row in the matrix and an effect is represented by a column. An X


in the intersection of a cause row and an effect column establishes a relationship
between the cause and the effect, as shown in the diagram below:

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.

Chapter 1 A TriStation Project


8 Elements of a Project

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

Function Blocks Functions

Invoke
Invoke
Functions

Function Blocks 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.”

Multiple Programs within a Project


A typical TriStation project is partitioned into multiple programs based on the
operation of particular units in the controlled process. For example, the control
strategy for a common process area within an oil refinery could be partitioned into
separate programs that control crude oil distillation towers, furnaces, hydro-
desulphurization areas, and redistillation areas. Refer to the section called
“Designing a Control Strategy” on page 31 for more information.

TriStation 1131 Developer’s Guide


Elements of a Project 9

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:

Evaluation X + 99: Evaluation X + 100:

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.

Function Block Instances


Function blocks, like programs, are not directly executed. When you want a
program to invoke a function block, you must give the function block an instance
name that is unique within the program or function block in which it is being
invoked.

Chapter 1 A TriStation Project


10 Elements of a Project

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

TriStation 1131 Developer’s Guide


Elements of a Project 11

Elementary Data Types


An elementary data type defines the size and characteristics of most data used in a
program, function or function block and the operations that can be applied to the
data. The table below describes all elementary data types available to TriStation
users. For more information about data types, see the Triconex Libraries manual.

Data Type Description


BOOL A Boolean, 1 bit in length
DATE A specific date
DINT A double integer, 32 bits in length
DT A specific date and time
DWORD A double word, 32 bits in length
INT An integer, 16 bits in length
LREAL A long real number, 64 bits in length
REAL A real number, 32 bits in length
STRING A sequence of up to 132 alphanumeric characters delimited
by single quotes
TIME A period of time (duration) expressed in days, hours,
minutes, seconds, or milliseconds
TOD A specific time of day

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.

Chapter 1 A TriStation Project


12 Elements of a Project

Generic Data Types


Generic data types, identified by the prefix ANY, are used exclusively in the
functions and function blocks that are available in TriStation’s Standard Library.
TriStation’s generic data types are based on the IEC 61131-3 standard, and the
hierarchy for them is as follows:

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.”

TriStation 1131 Developer’s Guide


Elements of a Project 13

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

Input Variable Instrument Tag Name Hardware Input Address


Program
Program Instance 1
Output Variable Instrument Tag Name Hardware Output Address

Program Program Instance Tricon Chassis


Instance 2 Variable Connections and Modules

Program
Instance 3

Methods for developing a configuration are described in an upcoming section


called “Defining the Project Configuration” on page 43.

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.

Chapter 1 A TriStation Project


14 Elements of a Project

Trident Point Connections


Whereas a local variable can only be accessed within the logic element in which it
is declared, a Trident point is accessible to all program instances in the
configuration.
Each Trident point is associated with an Input point, Output point or Memory
address in the Trident. Every input and output variable in a program instance must
be connected to a Trident point.

Trident Hardware Allocation


Allocation of the Trident hardware includes configuring the Main Processors,
defining the I/O modules and their locations (slot numbers), and changing the
memory allocation for Trident points if needed.

TriStation 1131 Developer’s Guide


TriStation Tools 15

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

The Project Directory


The Project Directory, accessible from TriStation’s Project menu, allows you to
access the various elements of your project.

Chapter 1 A TriStation Project


16 TriStation Tools

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.

Multiple Languages in a Project


In most cases, it makes sense to develop an entire project using only one
language—but it is possible to use multiple languages within a single project. For
example, while you are writing a program in the FBD language you may come
upon the need to include a complex mathematical calculation which is not easily
written in FBD. In this case, you could decide to create a function or function block
in the ST language which resembles a high-level programming language such as
Pascal, thus making the calculation easier to read.

TriStation 1131 Developer’s Guide


TriStation Tools 17

Properties Dialog Box


The Properties dialog box is used to specify the attributes of most elements in
TriStation programs, functions, function blocks, configurations and control panels.
When you are working with executable elements, just double-click the desired
element to display the Properties box for that type of element, as shown below for
the AND function. In the Configuration editor, double-clicking an element in the
directory tree displays the Properties box for the selected element.

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).

Basic Editing Tools


To help you create projects, TriStation provides tools that you can select from pop-
up menus, main menus and toolbars. The menus and toolbars are not identical for
all of TriStation’s editors and control panels, but they do share several commonal-
ities which are described in the following pages.

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.

Chapter 1 A TriStation Project


18 TriStation Tools

For A Selected Element


If you press the right mouse button for a selected element, TriStation displays
commands that apply to that element, as shown in this example (below left) for the
SR function block found in an FBD logic sheet:

Pop-up menu for a


selected function block

Pop-up menu
for any empty area

For Any Empty Area


If you press the right mouse button on an empty area, the pop-up menu displays a
different set of commands as shown in the example from an FBD logic sheet
(above right). The first command, called Select Arrow Key, is useful when you are
in the middle of an operation but decide not to complete the operation. At such a
time, you can press the right mouse button and choose Select Arrow Key to
terminate the unwanted operation and return the cursor to the arrow key.

TriStation 1131 Developer’s Guide


TriStation Tools 19

Main Menu and Project Toolbar


The main menu for an editor or control panel appears above the toolbar as shown
in the following example from the FBD editor. The toolbar has two parts: the
project toolbar which is common to all views of a TriStation project, and the
toolbar for a specific control panel or editor, as indicated in this example:

Project Toolbar

Toolbar for Editor or Control Panel

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.”

Chapter 1 A TriStation Project


20 TriStation Tools

Common Menus & Commands for All TriStation 1131 Views

File Edit TRIDENT Project Element

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

View Tools Sheets Window Help

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>

TriStation 1131 Developer’s Guide


TriStation Tools 21

Table of Editing Tools


The tables that follow describe the menus and commands which are common to all
TriStation views and show their corresponding toolbar buttons.

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.

Chapter 1 A TriStation Project


22 TriStation Tools

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.

Rebuild Compiles and links all configured programs and any


Configuration dependent elements in the current configuration.
Compile All Compiles all elements of a project.
Project Elements
Emulator Opens the Emulator Control Panel for off-line testing of a
Control Panel project.
Trident Control Opens the Trident Control Panel for on-line monitoring of
Panel live data as a project executes in the Trident system.
Trident Opens the Trident Diagnostic Panel for monitoring system
Diagnostic Panel states and identifying faults in a Trident system.
View Download Displays version information for each download of the
History current project.
Change State to Changes a project’s state to Download All from Download
Download All Change.

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.

History Displays the Project History (audit trail) of user access


and modification. Automatically generated by TriStation
during project development.

TriStation 1131 Developer’s Guide


TriStation Tools 23

Project Menu (continued)


Command Description
Project Options Opens the Project Options dialog box for selection of the
default language, variable annotations and hardware
communication parameters.
TriStation 1131 Opens the TriStation 1131 Options dialog box for
Options selection of directory path names, message bar
specifications, drawing colors, and options for FDB and
LD editors.

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.

Chapter 1 A TriStation Project


24 TriStation Tools

Window Menu (continued)


Command Description
Horizontal If the message is displayed vertically along the right side
Message Bar of the screen, you can choose to display it horizontally
across the bottom of the screen.
Hide Message Closes the message bar which displays compiler messages
Bar during the building of elements.

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.

TriStation 1131 Developer’s Guide


TriStation Tools 25

Enlarged View of Elements


There are two ways to enlarge your view of selected elements in the logic sheet of
any language editor or the monitor sheet of the control panels. One way is to use
the Zoom button on the toolbar or Zoom command on the View menu to select a
percentage of enlargement.
A quicker way to change the Zoom is to double-click on an empty area to see a
“Zoom Selection” view. As shown in the Control Panel example below, this is a
full view of the drawing sheet with the contents of the current view area highlighted
in a rectangle. You can move the current view rectangle by clicking the left mouse
button in a different area of the drawing sheet or by drawing a new view rectangle,
holding down the left mouse button while drawing.

Current
View Rectangle

Chapter 1 A TriStation Project


26 TriStation Tools

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.

The arrow shows


which column is
sorted and in what
order—ascending
or descending.

Note TriStation automatically saves the list options, so the next time you open
the window, the column positions and sort order are preserved.

TriStation 1131 Developer’s Guide


TriStation Tools 27

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.

Chapter 1 A TriStation Project


28 TriStation Tools

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

TriStation 1131 Developer’s Guide


Developing a TriStation Project 29

Developing a TriStation Project


This section provides general guidelines for the main tasks entailed in developing
a TriStation project. The following topics are covered:
“Typical Development Approach” . . . . . . . . . . . . . . . . . . . . . . . . . . 29
“Designing a Control Strategy” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
“Creating Executable Elements” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
“Writing the Logic for Executable Elements” . . . . . . . . . . . . . . . . . 38
“Defining the Project Configuration” . . . . . . . . . . . . . . . . . . . . . . . . 43
“Building, Testing, and Downloading the Project” . . . . . . . . . . . . . . 46

Typical Development Approach


One of the main benefits that TriStation offers is flexibility of development
methods. Beyond basic limitations such as having to write programs and configure
the Trident hardware before downloading, you can do most development tasks in
any order that turns out to be effective. However, the following steps constitute a
typical approach to developing a TriStation project:
1 Design a control strategy
2 Create executable elements and write program logic
3 Configure the Trident controller
4 Declare tagnames
5 Declare program instances
6 Connect program instance variables to tagnames
7 Test the application
8 Download the application

The chart on the following page shows which TriStation component corresponds
to each functional step. Upcoming sections discuss each step in more detail.

Chapter 1 A TriStation Project


30 Developing a TriStation Project

Functional Steps for TriStation 1131


Creating an Application Components Used

Design Control System Project Directory

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

Declare Program Program Instances


Instances View

Connect Program Connect to Points or


Instance Variables Connect to Instances
Dialog Box
to Tagnames

Test the Application Emulator


Control Panel

Download the Trident


Application Control Panel

TriStation 1131 Developer’s Guide


Developing a TriStation Project 31

Designing a Control Strategy


TriStation provides many options for project development, which differ slightly
depending on the language you are using. But there are three executable elements
which are building blocks for all of the languages:
• Programs
• Function blocks
• Functions
These elements are the main ones you need to consider when designing a control
strategy for your project. A control strategy always involves the concept of
partitioning—that is, organizing your program logic into a combination of
executable elements which is effective for your application and maintainable by
your field technicians. The following sections introduce the sample project called
FURNACE and discuss concepts which can help you make informed decisions
about project partitioning:
• Determining the number of programs
• Determining whether to use program instances or copies
• When to create function blocks
• When to create functions
• Definition of safety or control application

Chapter 1 A TriStation Project


32 Developing a TriStation Project

Sample Project Diagrams


This section introduces the sample project called FURNACE which will be used to
illustrate TriStation concepts from this point onward. The following is a simplified
Process & Instrumentation Diagram for the FURNACE project:

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 FUELGAS BURNER 1


CONTROL VA;VE HEADER A TSOV TSOV

FUELGAS
HEADER B TSOV

IGNITER IGNITER 1
HEADER TSOV

TO IGNITER 2

TO IGNITER 3

TO IGNITER 4

TriStation 1131 Developer’s Guide


Developing a TriStation Project 33

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

Chapter 1 A TriStation Project


34 Developing a TriStation Project

Determining the Number of Programs


A program is the highest-level executable element in a project. A typical project is
partitioned into multiple programs based on the operation of particular units in the
controlled process. For example, the control strategy for the FURNACE project
has been partitioned into ten separate programs:
Program 1:AIR_DAMPER
Program 2:BURNER_START
Program 3: FUELGAS_BURNER
Program 4: FUELGAS_HEADER
Program 5:IGNITER_HEADER
Program 6: IGNITER_START
Program 7: MINIMUM_STOP
Program 8:PROCESS_TRIPS
Program 9:SAFE_ATMOSPHERE
Program 10:START_CONDITIONS
The partitioning of a project into different programs is reflected by the program
names displayed in the Project Directory when you have used the New option to
create new programs:

TriStation 1131 Developer’s Guide


Developing a TriStation Project 35

Determining Whether to Use Program Instances or Copies


If you have identical process units whose operation is simple and unlikely to
change as time goes by, you can create one program with multiple instances.
Simple operation means that the amount of logic needed is small, which helps you
avoid complications with memory usage if unexpected modifications become
necessary in the future.
If you have several process units whose operation is similar but not identical, you
can create one program, copy it and modify it for each unit. This method is also
appropriate if the process units are identical at the present time, but might change
in the foreseeable future.

When to Create Function Blocks


A function block can invoke several functions or function blocks found in the
Standard Library, Triconex Library, or Trident Library, or in some cases,
user-derived functions or function blocks.
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.
You must create a function block (rather than a function) when your algorithm
returns more than one result and/or needs to retain data from one scan to the next.
If you develop a number of standardized function blocks, you could then create
your own shared library—a convenient way to make these functions available
company-wide.

When to Create Functions


A function, like a function block, can be used to implement standard, repetitive
algorithms. However, a function can only return one result, and does not retain data
from one scan to the next. To retain the output value of a function for use elsewhere
in your logic, you have to store it in a variable.

Chapter 1 A TriStation Project


36 Developing a TriStation Project

Definition of Safety or Control Application


Most TriStation applications are used for safety shutdown purposes. However,
some TriStation applications may support safety shutdown and non-safety logic
and/or control operations in a single Trident system. In such cases, it is very
important to clearly separate the safety shutdown applications from the non-safety
logic and control operations, and verify this separation when you build the
application. To achieve this verifiable separation between safety and non-safety
purposes, every program, function, or function block that you create must be
defined for a safety and/or control application, according to specific guidelines that
TriStation provides.
One of the following Application Type attributes must be chosen when you create
a program, function, or function block:
• Safety (for all safety applications)
• Control (for all non-safety applications)
• Safety and Control (for all types of applications)
A safety application can use only the elements with the Safety attribute. A control
(any non-safety) application can use any elements (Safety, Control, or Safety and
Control).

TriStation 1131 Developer’s Guide


Developing a TriStation Project 37

Creating Executable Elements


When you have considered how to partition your project, you are ready to create
the programs, function blocks, and functions you have determined to use. The User
Defined tab of the Project Directory allows you to create these user-defined
executable elements. Click the New button to open the Create a New Executable
Element dialog box as shown below:

For an overview of programs, function blocks, and functions, see “Programming


Languages,” beginning on page 4.

Defining Safety or Control Attributes


When you create a new executable element, you must select the appropriate safety
or control (non-safety) Application attribute for the type of logic you are creating.
The Application Type attributes regulate the use of elements within an application
as follows:

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.

Chapter 1 A TriStation Project


38 Developing a TriStation Project

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.

Writing the Logic for Executable Elements


This section explains how to write the logic for executable elements in terms of a
program called AIR_DAMPER from the FURNACE project. The following topics
are covered:
• Selecting elements and connecting wires
• Assigning properties to elements
• Including comments and annotation
• The completed logic

Selecting Elements & Connecting Wires


When you name a new program in the Project Directory, TriStation automatically
displays a sheet template for the logic. To begin writing your program logic, select
the elements you need from the tool bar and place them onto to the sheet template,
as shown in the following sample logic for the AIR_DAMPER program. (In actual
practice, newly placed elements do not have any names, but the example uses
placeholder names so you can tell what types of elements these are.)

TriStation 1131 Developer’s Guide


Developing a TriStation Project 39

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.

Chapter 1 A TriStation Project


40 Developing a TriStation Project

Assigning Properties to Elements


To assign properties such as the name, variable type, data type, or initial value of
an element, double-click on the element to bring up the Properties box. The
following graphic gives an example of assigning properties to an input variable
called AIR_DAMPER_STATUS:

Giving Instance Names to Function Blocks


Each function block invoked by an executable element requires a unique instance
name, which you assign by double-clicking on the function block to bring up the
Properties box. The instance name field appears under the Selected tab. After you
have typed in the instance name and closed the Properties box, the name appears
at the top of the function block.

TriStation 1131 Developer’s Guide


Developing a TriStation Project 41

Including Comments & Annotation


TriStation provides two means of documenting your program logic: comments and
variable annotation.

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.

Chapter 1 A TriStation Project


42 Developing a TriStation Project

The Completed Logic


The completed logic for the AIR_DAMPER program written in the FBD language
(shown below) includes the following elements:
• Functions and function blocks
• Input and output variables and constants
• Wires that interconnect the various elements
• Comments and annotation

TriStation 1131 Developer’s Guide


Developing a TriStation Project 43

Defining the Project Configuration


Before you can download an application to the Trident controller, you have to
define its configuration. This entails several tasks, which can be done at various
times during project development. This section describes typical steps performed
in a typical order:
• Configure the system
• Give tagnames to points
• Declare program instances
• Connect Input and Output variables to tagnames
• Build the configuration
Refer to Chapter 5 and Chapter 6 for more detailed information about the topics
listed above. The immediately following section describes basic methods for
handling the mechanics of project configuration.

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.

Chapter 1 A TriStation Project


44 Developing a TriStation Project

Configuring the Trident System


One of the top-level branches in the configuration tree is called Trident System
Configuration, and it allows you to:
• Configure the Main Processors and other modules that require configuration
• Allocate Trident I/O modules
• Allocate necessary memory for various data types

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.

TriStation 1131 Developer’s Guide


Developing a TriStation Project 45

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.

Declaring Program Instances


Program instances define which programs will be downloaded and executed and
which Trident points will interact with these programs. A program may have more
than one instance, and can have up to 250 instances.
Suppose you have four identical pieces of equipment in your plant. If you use
program instancing, you will not have to write the program logic four times. Later,
you connect the input and output variables in each program instance to Trident
points which represent particular hardware addresses in the Trident.
Declare program instances in the Configuration editor by double-clicking
Program Instances in the configuration tree and adding an instance name to the
Instance List in the Properties box. The order of the programs listed in Program
Instances is the order in which they will be executed.
See “Declaring Program Instances” on page 201 for more detailed information.

Giving Tagnames to Points


After allocating your hardware and declaring your program instances, you need to
declare tagnames for your Trident points, also known as global variables in IEC
61131-3 standard terminology. Each point has two main characteristics:
• It references an Input, Output or Memory point in the Trident
• It is accessible to all program instances within a TriStation project

Chapter 1 A TriStation Project


46 Developing a TriStation Project

Connecting Inputs and Outputs to Tagnames


Input and output variables in each program instance must be connected to Trident
points before downloading. The Configuration editor provides the following means
for connecting program variables to points:
• Manually one-by-one using the Declarations Properties dialog box for
program instance variables
• Automatically using the Connections Wizard
• Importing tagnames
In TriStation, your application is independent of physical points in the Trident. If
your physical connections change, you can easily change the point connections for
each program instance without having to modify the logic or recompile your
application.
See “Specifying Point Properties” on page 238 for more detailed information about
point connections.

Building, Testing, and Downloading the Project


When you have finished making all of the necessary Trident point connections for
your program variables, it is time to build (compile) the configuration. During a
build, TriStation displays a message bar which describes any configuration errors
and lets you jump to the error sources from a menu command. For details, see
“Building the Configuration” on page 211.
After you have corrected all errors and successfully built your configuration, your
application is ready for testing with the Emulator Control Panel. When your test
results prove that the application operates effectively, you are ready to download it
for real-time execution using the Trident Control Panel. For guidelines, see
Chapter 8, “Control Panels.”

TriStation 1131 Developer’s Guide


CHAPTER 2

Function Block Diagram (FBD)

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

TriStation 1131 Developer’s Guide


48 Basic Methods for Writing Logic

Basic Methods for Writing Logic


Many of the methods used for writing logic are the same for the FBD and Ladder
Diagram (LD) programming languages. This section briefly mentions the basic
methods as they apply to the FBD language, while upcoming sections supply
details about the FBD tools and features.
The basic methods, which require extensive use of the FBD toolbar and/or menus,
are as follows:
1 In the Project Directory, choose New to create a new program, function block
or function with the Function Block Diagram option checked.
2 TriStation automatically displays a sheet for your logic in the default sheet style.
Change the sheet style if desired, give the sheet a title, and complete other fields
in the sheet description.
3 Place your logic elements on the sheet using the FBD toolbar and/or menus.
The elements can include variables, constants, functions and function blocks.
4 Connect the logic elements with normal or feedback wires and add horizontal
or vertical network dividers if needed.
5 Declare the properties of each logic element by double-clicking on each to
display its associated Properties box. Respond to the prompts and select the
appropriate options within the Properties box.
6 Add comment boxes with macros and/or text that you type in, and turn on
variable annotation to document your logic if desired.
7 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.
8 Test your logic in the Emulator Control Panel, returning to the logic sheet to
make any necessary modifications.
9 When testing of the logic is finished, it is time to create your project
configuration, as explained in Chapter 5, “Configuration Editor—Basic
Concepts.”

TriStation 1131 Developer’s Guide


FBD Editing Tools 49

FBD Editing Tools


To help you write and edit logic in the FBD 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 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.

For A Selected Element


If you press the right mouse button for a selected element, TriStation displays
commands that apply to that element, as shown in this example (below left) for the
SR function block:

Pop-up menu for a


selected function block

Pop-up menu
for any empty area

For Any Empty Area


If you press the right mouse button on an empty area, the pop-up menu displays a
different set of commands as shown in the example (above right). The first
command, called Select Arrow Key, is useful when you are in the middle of an
operation but decide not to complete the operation. At such a time, you can press
the right mouse button and choose Select Arrow Key to terminate the unwanted
operation and return the cursor to the arrow key.

Chapter 2 Function Block Diagram (FBD)


50 FBD Editing Tools

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.

▼ Take these steps to re-arrange multiple elements:


1 Select all of the elements you want to re-arrange.
2 Rest the cursor on the reference element for the size or alignment operation you
are planning to perform.
3 Press the right mouse button to display the pop-up menu.
4 Select the size or alignment operation from the Size/Alignment sub-menu.

Menu Commands and Toolbars


The FBD main menu appears above the toolbars, as shown below. The diagram on
the following page shows the commands that are accessible from the main menu.
The tables that follow the diagram describe these commands and show their
corresponding toolbar buttons.

For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.

TriStation 1131 Developer’s Guide


FBD Editing Tools 51

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.”

Menus & Commands of the FBD Editor


(grayed-out commands are common to all TriStation 1131 views)

File Edit TRIDENT Project Element

New Project... Undo Edit Configuration Directory... Save


Open Project... Redo Build Configuration Description... Description...
Save Project... Edit Session Journal Rebuild Configuration Security... Comment Macros...
Save As... Cut Compile All Project Elements History... Declarations...
Close Project Copy Emulator Control Panel Project Options... Build
Backup Project... Paste Trident Control Panel TriStation 1131 Options... Intermediate Code
Restore Project Find... Trident Diagnostic Panel
1 <previously opened project> Replace... View Download History...
2 <previously opened project> Select Network Contents Change State to Download All
Print... Select Sheet Contents
Print Preview...
Print Reports...
Print Setup...
Exit

View Tools Sheets Window Help

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

Chapter 2 Function Block Diagram (FBD)


52 FBD Editing Tools

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

TriStation 1131 Developer’s Guide


FBD Editing Tools 53

Element Menu
Command Description
Save Element Saves the open element but not the entire project.

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 for your
Macros 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.

Zone Display Changes the background of the active window to show


the zone grid on the sheet.
Network Numbers Displays network numbers in the upper left corner for
each network on the current sheet.
IEC Display Mode Changes the display characteristics of elements in the
current sheet to IEC format.

Chapter 2 Function Block Diagram (FBD)


54 FBD Editing Tools

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.

Annotate Allows you to select an instance of a program for viewing


Instance of annotations, including the values of variables during
execution either in the Emulator or the Trident.
Select Tool Changes the mouse cursor into an arrow when positioned
(Arrow) over the active window to allow you to select items.

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.

Input Variable Allows you to place an Input variable element on your


logic sheet.

Output Variable Allows you to place an Output variable element on your


logic sheet.
Constant Allows you to place a Constant element on your logic
sheet.

Wire Allows you to connect your logic elements with the wire
tool.

Comment Allows you to place a comment box on the logic sheet.

Horizontal Allows you to position a horizontal network divider on


Network Divider your logic sheet.

Vertical Network Allows you to position a vertical network divider on your


Divider logic sheet.

TriStation 1131 Developer’s Guide


FBD Editing Tools 55

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.

Chapter 2 Function Block Diagram (FBD)


56 FBD Editing Tools

Enlarged View of Elements


There are two ways to enlarge your view of selected elements in an FBD logic
sheet. One way is to highlight the desired elements and use the Zoom... command
in the View menu to select a percentage of enlargement.
A quicker way to change the Zoom is to double-click on any empty area to see a
“Zoom Selection” view. This is a full view of the logic sheet with the contents of
the current view area highlighted in a rectangle. You can move the current view
rectangle by clicking the left mouse button in a different area of the drawing sheet
or by drawing a new view rectangle, holding down the left mouse button while
drawing.

Current
View Rectangle

TriStation 1131 Developer’s Guide


Creating Executable Elements 57

Creating Executable Elements


The Project Directory, accessible from the Project menu or by clicking the
Project Directory button on the toolbar, allows you to create user-defined
programs, function blocks, and functions. Go to the User Defined tab and click the
Project Directory New button to open the Create a New Executable Element dialog box as shown
button below:

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.

Chapter 2 Function Block Diagram (FBD)


58 Creating Executable Elements

Assigning Application Type Attributes


When you create a new executable element, you must select the appropriate safety
or control (non-safety) Application attribute for the type of logic you are creating.
The Application Type attributes regulate the use of elements within an application
as follows:

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.

TriStation 1131 Developer’s Guide


Creating Executable Elements 59

Modifying Application Type Attributes


To modify the attribute for an executable element you have already created, select
the Declarations command from the Element menu and go to the Attributes tab:
To modify these
attributes, you must
have permission.
Refer to “Privileges”
on page 398 for
details.

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.

Chapter 2 Function Block Diagram (FBD)


60 Using Logic Sheets

Using Logic Sheets


When you open a new program, function or function block in the Project
Directory, TriStation automatically displays a default template for your logic
sheet. If desired, you can select a different template, give the logic sheet a title,
complete other fields in the sheet description, and insert and append additional
sheets.
The Sheets command in the FBD main menu offers these commands for
manipulating logic sheets:
• Sheet Title
• Next Sheet (also found in toolbar)
• Previous Sheet (also found in toolbar)
• Find Sheet... (also found in toolbar)
• Append Sheet
• Insert Sheet
• Delete Sheet
• Sheet Template...
Sheet Title allows you to edit the title of the current sheet. The sheet title is
displayed in the title block, the window caption bar and the Window Menu list.
Append Sheet adds a new sheet after an existing sheet. Insert Sheet adds a new
sheet before an existing sheet.
Find Sheet allows you to find and select sheets by sheet title in a multi-sheet
program or function block. This command also provides access to dialog boxes for
insertion, deletion, and appending of sheets.
The Sheet Template command allows you to apply a different template to the
current sheet. (The default template is called Sheet Template B.) Select from the
following standard-size drafting sheets in either landscape or portrait orientation:
Sheet A — 8.5" x 11"
Sheet B — 11" x 17"
Sheet C — 17" x 22"
Sheet D — 22" x 34"

TriStation 1131 Developer’s Guide


Using Logic Sheets 61

Assigning Sheet Properties


When you open a new program, function or function block, some of the fields in
the sheet description are automatically filled by TriStation. To modify these fields
or fill in other fields, double-click on the sheet description in the lower right corner
of the screen and select the desired field, as shown in the following example:

Chapter 2 Function Block Diagram (FBD)


62 Declaring Input, Output & Local Variables

Declaring Input, Output & Local Variables


Input, output and local variables can be declared in a number of ways. A typical
approach is to place the variables on your worksheet using the tools or the menu
commands. (Refer to the section called “Menu Commands and Toolbars” earlier in
this chapter for details.) Once you have placed a variable of each type you need,
you can copy and paste these multiple times as needed using menu commands or
keyboard shortcuts. Then you can bring up the Properties box by double-clicking
on a variable element. Click the push pin, and begin assigning properties to the
variables.
Another approach is to use the Declarations dialog box to declare several variable
names, then use the Name menu in the Properties box to apply these names to
each variable element on the worksheet.
A third approach is to apply a naming convention to several selected variable
elements using the Auto Name feature.
The Properties box for variables has three tab pages: Selected, Declaration and
Annotation, as shown in the example below. This section covers the options for
variable declaration in their order of appearance in the tab pages.

Properties under the Selected Tab


The Selected tab of the Properties box for local, input and output variables allows
you to name your variables (manually or automatically), adjust the width of
variable symbols, and turn on variable annotation.

TriStation 1131 Developer’s Guide


Declaring Input, Output & Local Variables 63

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.

Chapter 2 Function Block Diagram (FBD)


64 Declaring Input, Output & Local Variables

Properties under the Declaration Tab


The Declaration tab of the Properties box (shown below) for variables allows you
to:
• Select the data type and variable
• Apply an initial value and description
• Access the Variable Declarations window

TriStation 1131 Developer’s Guide


Declaring Input, Output & Local Variables 65

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.

Data Type Description


BOOL A Boolean, 1 bit in length
DATE A specific date
DINT A double integer, 32 bits in length
DT A specific date and time
DWORD A double word, 32 bits in length
INT An integer, 16 bits in length
LREAL A long real number, 64 bits in length
REAL A real number, 32 bits in length
STRING A sequence of up to 132 alphanumeric characters delimited
by single quotes
TIME A period of time (duration) expressed in days, hours,
minutes, seconds, or milliseconds
TOD A specific time of day

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).

Chapter 2 Function Block Diagram (FBD)


66 Declaring Input, Output & Local Variables

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.

TriStation 1131 Developer’s Guide


Declaring Input, Output & Local Variables 67

Declaration Dialog Box


The Declaration dialog box (shown in the example below), accessible from the
Declaration tab, provides a graphic display of all the variables in your logic and
allows you to manipulate the variables in the following ways:
• Adding, modifying and deleting
• Moving up and down
• Sorting
• Grouping

Chapter 2 Function Block Diagram (FBD)


68 Declaring Input, Output & Local Variables

Adding New Variables


The Add feature of the Declarations dialog box lets you declare variables you
have not yet placed on your logic sheet. Later, when you do place the variable
elements on the logic sheet and bring up the Properties box, any declared variables
appear for your selection under the Name field of the Selected tab, as shown in the
following example:

TriStation 1131 Developer’s Guide


Declaring Input, Output & Local Variables 69

Properties under the Annotation Tab


If you have checked the Annotate option of the Selected tab in the Properties
dialog box for a selected variable, the Annotation tab allows you to:
• Select and/or modify macros for the variable annotation
• Type descriptive text for the variable annotation
• Include value in annotation while monitoring

As shown in the example above, 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
sections called “Comments, Variable Annotation and Macros” on page 82 and
“Using the Program Instance Monitor” on page 335 for more information.

Chapter 2 Function Block Diagram (FBD)


70 Declaring Constants

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.

Properties under the Constant Tab

Value, Type & Validate


The constant value you enter in the Value field must agree with the elementary data
type you select from the list under the Type field. Click Validate to ensure
value/type agreement. Data types that apply to constants are as follows:
• BOOL
• DATE
• DINT
• DT
• DWORD
• INT
• LREAL
• REAL
• STRING
• TIME
• TOD

TriStation 1131 Developer’s Guide


Declaring Constants 71

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.

Auto Name Feature


The Auto Name feature may be useful for applying consecutive values to multiple
constants, but it is primarily used for the automatic naming of several similar
variables according to a convention you select. For more information, refer to
“Automatic Naming” in the section called “Declaring Input, Output & Local
Variables.”

Properties under the Annotate Tab


If you have clicked on the Annotate checkbox under the Constant tab for a
selected constant, the Annotation tab allows you to:
• Select and/or modify macros for the annotation
• Type descriptive text for the annotation
In general, an annotation is a special kind of comment box attached to the bottom
of a logic element which can display its Trident Point Connection (Tag Name), its
value during execution, macros and descriptive text. Because a constant always has
the same value and does not have a Trident Point Connection, there is no question
of displaying various values during execution. However, macros and descriptive
text can be used if desired.

Chapter 2 Function Block Diagram (FBD)


72 Declaring Functions and Function Blocks

Declaring Functions and Function Blocks


Clicking on the Select FBlock Tool or using the Tools...Insert...Function (Block)
command displays the following menu, which allows you to select a function or
function block from the project library:

To search for a desired function or function block, you can:


• Use the Find field to search for similar names
• Sort the Element Name or Category column alphabetically by clicking on
the column heading, then look for the desired functionality
After placing a function or function block on your logic sheet, that same element
remains selected in the library menu in case you want to add more elements of the
same type. Or you can copy and paste a function or function block multiple times
as needed using menu commands or keyboard shortcuts.
To declare the properties of a function or function block, double-click on the
element to bring up the Properties box and click the push pin. This will keep the

TriStation 1131 Developer’s Guide


Declaring Functions and Function Blocks 73

Properties box displayed on top as you move from element to element declaring
properties.

Declaring the Properties of Functions


The Properties box for a function has only one tab with several user-modifiable
fields, as shown in the following example:

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.”

Chapter 2 Function Block Diagram (FBD)


74 Declaring Functions and Function Blocks

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.

Inverting Inputs or Outputs


The inversion feature inverts the value of a BOOL input or output that is connected
to a function. When you select a BOOL variable name from the Inputs or Outputs
list in the Properties dialog box, and click Invert Selected Input or Invert
Output, a small circle appears on the corresponding terminal of the function, as
shown in the example that follows. If the Invert Selected Input and/or Invert
Output options are grayed out, then inversion is not available for the inputs and
outputs of this function.

TriStation 1131 Developer’s Guide


Declaring Functions and Function Blocks 75

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:

Chapter 2 Function Block Diagram (FBD)


76 Declaring Functions and Function Blocks

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.

TriStation 1131 Developer’s Guide


Declaring Functions and Function Blocks 77

Declaring the Properties for a Function Block


The Properties box for a function block has two tabs: Selected and Declaration.
This section covers the function block properties in their order of appearance in the
tab pages.

Fields under the Selected Tab


Most of the modifiable characteristics of a function block are found under the
Selected tab of its Properties box.

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.

Chapter 2 Function Block Diagram (FBD)


78 Declaring Functions and Function Blocks

Inputs and Outputs List


A function block selected from the TriStation library can have multiple inputs and
outputs. From the function block’s Properties box, select the Inputs option to
show the names and data type of the inputs, or select the Outputs option to show
the names and data type of the outputs.
The only property of a function block input or output that you can modify is the
polarity, if the input or output is of type BOOL. Refer to the upcoming section
called “Inverting Inputs or Outputs” for more information.

Inverting Inputs or Outputs


The inversion feature inverts the value of a BOOL input or output that is connected
to a function block. When you select a BOOL variable name from the Inputs or
Outputs list, and click the Inversion Terminal checkbox, a small circle appears
on the corresponding terminal of the function block.
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 block. 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 block is inverted as it exits.
In the following example, the Outputs option and a BOOL variable called Q are
selected. Clicking the Inversion Terminal checkbox causes a circle to appear on
Q, the output terminal of the TOF function, to indicate that inversion of the output
value will take place.

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.

TriStation 1131 Developer’s Guide


Declaring Functions and Function Blocks 79

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.

Fields of the Declaration Tab


The Declaration tab of the Properties box for a function block tells the Data Type
of the function block instance and provides a Description field for text, as shown
in the following example. The Var Type field indicates that a function block
instance always has a variable type of Local.

Chapter 2 Function Block Diagram (FBD)


80 Specifying Wire Properties

Specifying Wire Properties


In an FBD program, wires for interconnecting your logic elements are accessible
by means of the Wire tool or the Wire command in the Tools...Insert menu. There
are two kinds of wires: Normal and Feedback (represented by a dashed line).
Normal wires are the default. To change a Normal wire into a Feedback wire,
double-click on the wire to bring up the Properties box and select the Feedback
Wire option, as shown in this example:

TriStation 1131 Developer’s Guide


Using Network Dividers 81

Using Network Dividers


In FBD, you can divide the logic on your sheet into various networks by means of
horizontal and vertical network dividers, as shown in the following example.
Program logic executes in the order the network dividers are placed.
These dividers are accessible by means of the Horiz. Network Divider tool and
the Vert. Network Divider tool on the FBD toolbar, or commands of the same
names in the Tools...Insert menu.

Chapter 2 Function Block Diagram (FBD)


82 Comments, Variable Annotation and Macros

Comments, Variable Annotation and Macros


TriStation offers two methods for documenting FBD program logic: comments and
variable annotation. Both methods allow you to type in descriptive text and make
use of macros that describe various characteristics of the project, its elements and
the logic sheet. A comment box can be placed anywhere on the logic sheet, but a
variable annotation is attached to the bottom of a variable and is meant to be used
in an instance view of your program logic. This section covers the following topics:
• Including comments
• Using variable annotation
• Using macros

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.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 83

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

Inserting Macros into Comments


The Comment tab also allows you to access macros for the project, element or
sheet. To insert a macro into your comment box, click the Macros field to bring up
a list of available macros. Select the one you want, then use CTRL+C to copy it.
Close the macro list, place the cursor in your comment text, and use CTRL+V to
paste in the macro. Refer to the upcoming section called “Using Macros” for more
detailed information.

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.

Chapter 2 Function Block Diagram (FBD)


84 Comments, Variable Annotation and Macros

Enable Macro Editing


Click this option and take the following steps to create your own macro by
combining other, existing macros:
1 Add one or more modifiable macros to your comment text (under the Comment
tab). Modifiable macros are identified by a pencil icon in the Current Value
column of the Edit Macros dialog box.
2 Click the Enable Macro Editing option.
3 Go to the Edit Fields tab and select a modifiable macro from the list that is
displayed. Click Modify to edit the text of the macro.
Refer to the upcoming section called “Using Macros” for more detailed
information about macros.

Move Behind Logic Elements


This feature allows you to move a selected comment box behind a logic element.
This creates the effect of enclosing or surrounding the element with descriptive
text. Click the option off if you later want to remove the comment box from behind
the logic element.

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.

Edit Fields Tab


This tab is used in conjunction with the Enable Macro Editing option found under
the Style tab. If you have included modifiable macros in your comment text, their
names will be listed for selection under the Edit Fields tab. Refer to the upcoming
section called “Using Macros” for more detailed information about macros.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 85

Using Variable Annotation


A variable annotation is a special kind of comment box that is attached to the
bottom of an input, output, input/output or local variable. The annotation box is
sizable for width and height and moves wherever the associated variable is moved.
An annotation can consist of any of the following types of information:
• The monitor value (value of the variable as the configuration executes)
• The default macro for the particular type of variable
• Other standard macros
• User-modified macros
• Text that you type in
The values of the macros and the variables themselves are displayed only in an
instance view of your program logic. From the FBD editor, the Configuration
editor or a Control Panel, you select an instance view by pressing the Annotation
Instance button on the toolbar and selecting a program instance name from the
dialog box, as shown below.

Annotation Instance button

Chapter 2 Function Block Diagram (FBD)


86 Comments, Variable Annotation and Macros

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

Annotation for the Entire Project


Variable annotation works in an “automatic” sense if you turn on the feature as
soon as you open a new project, before creating any programs or function blocks.
Do this by opening the Project Options menu, selecting the Variable
Annotations tab (shown below), and checking one or both of the following options
in the General box:
• Annotation on by default
• Monitor value on by default
The Annotation on by default option causes variable annotation boxes to appear
automatically every time you place a variable on the logic sheet for a program or
function block. The Monitor value on by default option displays, in the upper left
corner of the annotation box, the value of each variable during execution.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 87

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.

Note Annotation boxes underneath variables require extra space, depending on


how many macros and how much text you include. So turning on the annotation
capability at the beginning of a project is an advantage in terms of designing your
program logic for maximum readability.

Chapter 2 Function Block Diagram (FBD)


88 Comments, Variable Annotation and Macros

Annotating Individual Variables


Even if you have not turned on annotation for all program variables using the
Variable Annotations menu, you can turn it on for individual variables by doing
the following:
1 Double-click on a variable to bring up the Properties box.
2 Click the Annotate checkbox in the lower right corner of the Selected tab.
3 If desired, go to the Annotation tab and click the box for Include monitor value
in annotation.
4 The default macro for the variable is already present. To insert an additional
macro, click the Macros field (in the Annotation dialog box) to bring up a list
of available macros. Select the one you want, then use CTRL+C to copy it. Close
the macro list, place the cursor in your annotation text, and use CTRL+V to paste
in the macro.

Using Instance Views


An instance view of an FBD program looks similar to the editing view, except that
it depicts a specific instance of the program and the macros in the variable
annotations are expanded. There are three ways to invoke an instance view:
• From the FBD Editor — While viewing a program in the FBD editor, click
the Annotation Instance tool to display a list of the program instances.
Select an instance name, click OK, and the variable annotations will be
expanded.
• From the Configuration editor — Select an instance name from the
Program Instances branch of the configuration tree. Click the Instance
View tool and a read-only instance view of the program logic will be
displayed, with the variable annotations expanded.
• From the Control Panel — Select an instance name from the program
instance variable tree. Click the Instance View tool and a read-only
instance view of the program logic will be displayed, with the variable
annotations expanded. The actual monitor value (value of the variable
during program execution) is displayed only in an instance view invoked
from the Control Panel.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 89

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

Chapter 2 Function Block Diagram (FBD)


90 Comments, Variable Annotation and Macros

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

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 91

Inserting Macros into Comments or Annotations


You can access a complete list of macros for the project, element and sheet by
means of the Edit Macros dialog box (shown on the preceding page). To insert a
macro into a comment on annotation box, follow these steps:
1 In the Properties box for a comment, click the Macros field (under the
Comment tab) to bring up the list of available macros in the Edit Macros
dialog box.
2 In the Properties box for an annotation, click the Macros field (under the
Annotation tab) to bring up the list of available macros in the Edit Macros
dialog box.
3 Select the macro you want, then use CTRL+C on the keyboard to copy it.
4 Close the Edit Macros dialog box.
5 Place the cursor in your comment or annotation box, and use CTRL+V to paste
in the macro. Add text if desired to explain what kind of information the macro
is showing you, as in the following example. (In this example, the macros are
expanded because the Expand Macros box is checked under the Style tab of
the comment’s Properties box.)

Chapter 2 Function Block Diagram (FBD)


92 Comments, Variable Annotation and Macros

Working with User-Modifiable Macros


User-modifiable macros are identified by the presence of a pencil icon in the
Current Value column of the Edit Macros dialog box (shown below during the
process of macro modification). To modify a macro, follow these steps:
1 Copy any system macro you wish to include by selecting that macro and
pressing CTRL+C on the keyboard. In the example below, the copied macro is
%CREATED_BY.
2 Select the desired user-modifiable macro and click Modify to bring up an
editing box. The example below uses %PGM_INPUT, the default macro for
annotating a program variable of the input class.
3 In the Edit Macro Text dialog box, paste in the previously-copied system
macro (%CREATED_BY) by pressing CTRL+V and/or enter text. Click OK.
4 If you wish to add more than one system macro to the user-modifiable macro,
repeat the above process as many times as needed.
5 When the user-modifiable macro is ready, close the macro list. You can then
copy and paste the user-modified macro into comment boxes and annotation
boxes as needed, using CTRL+C and CTRL+V on the keyboard.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 93

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.

Default Macros for Annotation Boxes


The default contents of annotation boxes are macros that vary with the class of the
variable, as shown in the following table:

Element Type Variable Class Default Macro


Program Input %PGM_INPUT
Output %PGM_OUTPUT
Input/Output %PGM_IO
Local %PGM_LOCAL
Function/Function Block Input %FB_INPUT
Output %FB_OUTPUT
Input/Output %FB_IO
Local %FB_LOCAL

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)

Chapter 2 Function Block Diagram (FBD)


94 Comments, Variable Annotation and Macros

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:

Macro Expanded Value


%PPD_TAGNAME The name of the Trident point to which the program
variable is connected.
%PPD_CLASS The class of the Trident point to which the program variable
is connected. For example, “MI” for Memory Integer or
“DO” for Digital Output.
%PPD_LOCATION The location of the Trident point to which the program
variable is connected. This only applies to physical input
and output points and is displayed in the format ii.ss.pp,
where ii is the IOP number, ss is the module baseplate
address plug number, and pp is the point number.
%PPD_ALIAS The Modbus® alias of the Trident point to which the
program variable is connected. If the point has no alias, an
empty string is returned.

TriStation 1131 Developer’s Guide


Printing Logic Sheets 95

Printing Logic Sheets


From the FBD editor, TriStation allows you to print the logic sheets you have
developed for programs, functions and function blocks. Adjust the view of a logic
sheet using commands in the View menu, then use the following File menu
commands as desired:
• Print Preview
• Print Setup
• Print...
Printing of the following items, which are not specific to FBD, is covered in
Chapter 11, “Printing”:
• Standard reports
• Custom reports designed with Crystal Reports® software

Chapter 2 Function Block Diagram (FBD)


96 Printing Logic Sheets

TriStation 1131 Developer’s Guide


CHAPTER 3

Ladder Diagram (LD)

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

TriStation 1131 Developer’s Guide


98 Basic Methods for Writing Logic

Basic Methods for Writing Logic


Many of the methods used for writing logic are the same for the LD and FBD
programming languages. This section briefly mentions the basic methods as they
apply to the LD language, while upcoming sections supply details about the LD
tools and features.
The basic methods, which require extensive use of the LD toolbar and/or menus,
are as follows:
1 In the Project Directory, choose New to create a new program, function block
or function with the Ladder Diagram option checked.
2 TriStation automatically displays a sheet for your logic in the default sheet style.
Change the sheet style if desired, give the sheet a title, and complete other fields
in the sheet description.
3 Place your logic elements on the sheet using the LD toolbar and/or menus. The
elements can include variables, constants, functions and function blocks.
4 Connect the logic elements with normal or feedback wires and add horizontal
or vertical network dividers if needed.
5 Declare the properties of each logic element by double-clicking on each to
display its associated Properties dialog box. Respond to the prompts and select
the appropriate options within the Properties box.
6 Add comment boxes with macros and/or text that you type in, and turn on
variable annotation to document your logic if desired.
7 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.
8 Test your logic in the Emulator Control Panel, returning to the logic sheet to
make any necessary modifications.
9 When testing of the logic is finished, it is time to create your project
configuration, as explained in Chapter 5, “Configuration Editor—Basic
Concepts.”

TriStation 1131 Developer’s Guide


LD Editing Tools 99

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.

For A Selected Element


If you press the right mouse button for a selected element, TriStation displays
commands that apply to that element, as shown in this example (below left) for the
NE function block:

Pop-up menu for a


selected function block

Pop-up menu
for any empty area

For Any Empty Area


If you press the right mouse button on an empty area, the pop-up menu displays a
different set of commands as shown in the example (above right). The first
command, called Select Arrow Key, is useful when you are in the middle of an
operation but decide not to complete the operation. At such a time, you can press
the right mouse button and choose Select Arrow Key to terminate the unwanted
operation and return the cursor to the arrow key.

Chapter 3 Ladder Diagram (LD)


100 LD Editing Tools

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.

▼ Take these steps to re-arrange multiple elements:


1 Select all of the elements you want to re-arrange.
2 Rest the cursor on the reference element for the size or alignment operation you
are planning to perform.
3 Press the right mouse button to display the pop-up menu.
4 Select the size or alignment operation from the Size/Alignment sub-menu.

Menu Commands and Toolbar


The LD main menu appears above the toolbars, as shown below. The diagram on
the following page shows the commands that are accessible from the main menu.
The tables that follow the diagram describe these commands and show their
corresponding toolbar buttons.

For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.

TriStation 1131 Developer’s Guide


LD Editing Tools 101

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.”

Menus & Commands of the LD Editor


(grayed-out commands are common to all TriStation views)

File Edit TRIDENT Project Element

New Project... Undo Edit Configuration Directory... Save


Open Project... Redo Build Configuration Description... Description...
Save Project... Edit Session Journal Rebuild Configuration Security... Comment Macros...
Save As... Cut Compile All Project Elements History... Declarations...
Close Project Copy Emulator Control Panel Project Options... Build
Backup Project Paste Trident Control Panel TriStation 1131 Options... Intermediate Code
Restore Project Find... Trident Diagnostic Panel
1 <previously opened project> Replace... View Download History...
2 <previously opened project> Select Network Contents Change State to Download All
Print... Select Sheet Contents
Print Preview...
Print Reports...
Print Setup...
Exit

View Tools Sheets Window Help

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

Chapter 3 Ladder Diagram (LD)


102 LD Editing Tools

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

TriStation 1131 Developer’s Guide


LD Editing Tools 103

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.

Zone Display Changes the background of the active window to show


the zone grid on the sheet.
Network Displays network numbers in the upper left corner for
Numbers each network on the current sheet.
IEC Display Changes the display characteristics of elements in the
Mode current sheet to IEC format.

Chapter 3 Ladder Diagram (LD)


104 LD Editing Tools

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.

Annotate Allows you to select an instance of a program for


Instance viewing of annotations, including the values of
variables during execution either in the Emulator or the
Trident.
Select Tool Changes the mouse cursor into an arrow when
(Arrow) positioned over the active window to allow you to select
items.
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.
Contact Allows you to place a Contact element on the logic
sheet. A contact represents the status of an Input
variable.
Coil Allows you to place a Coil element on the logic sheet. A
coil represents the assignment or status of an Output
variable.
Right Power Rail Allows you to place a delimiter called a power or
ground rail at the right end of an LD network. Left
power rails are considered on at all times, while right
power rails may be explicit or implied.
Local Variable Allows you to place a Local variable element on your
logic sheet.
Input Variable Allows you to place an Input variable element on your
logic sheet.
Output Variable Allows you to place an Output variable element on your
logic sheet.
Constant Allows you to place a Constant element on your logic
sheet.

TriStation 1131 Developer’s Guide


LD Editing Tools 105

Tools Menu (continued)


Command Description
Link Allows you to connect your logic elements with the link
tool.

Comment Allows you to place a comment box on the logic sheet.

Horizontal Allows you to position a horizontal network divider on


Network Divider your logic sheet.
Vertical Network Allows you to position a vertical network divider on
Divider your logic sheet.

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.

Chapter 3 Ladder Diagram (LD)


106 LD Editing Tools

Enlarged View of Elements


There are two ways to enlarge your view of selected elements in an LD logic sheet.
One way is to use the Zoom... command in the View menu to select a percentage
of enlargement.
A quicker way to change the Zoom is to double-click in any empty area to see a
“Zoom Selection” view. This is a full view of the logic sheet with the contents of
the current view area highlighted in a rectangle. You can move the current view
rectangle by clicking the left mouse button in a different area of the drawing sheet
or by drawing a new view rectangle, holding down the left mouse button while
drawing.

Current
View Rectangle

TriStation 1131 Developer’s Guide


Creating Executable Elements 107

Creating Executable Elements


The Project Directory, accessible from the Project menu or by clicking the
Project Directory button on the toolbar, allows you to create user-defined
programs, function blocks, and functions. Go to the User Defined tab and click the
Project Directory New button to open the Create a New Executable Element dialog box as shown
button below:

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.

Chapter 3 Ladder Diagram (LD)


108 Creating Executable Elements

Assigning Application Type Attributes


When you create a new executable element, you must select the appropriate safety
or control (non-safety) Application attribute for the type of logic you are creating.
The Application Type attributes regulate the use of elements within an application
as follows:

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.

TriStation 1131 Developer’s Guide


Creating Executable Elements 109

Modifying Application Type Attributes


To modify the attribute for an element you’ve already created, select the
Declarations command from the Element menu and go to the Attributes tab:
To modify these
attributes, you must
have permission.
Refer to “Privileges”
on page 398 for
details.

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.

Chapter 3 Ladder Diagram (LD)


110 Using Logic Sheets

Using Logic Sheets


When you open a new program, function or function block in the Project
Directory, TriStation automatically displays a default template for your logic
sheet. If desired, you can select a different template, give the logic sheet a title,
complete other fields in the sheet description, and insert and append additional
sheets.
The Sheets command in the LD main menu offers these commands for
manipulating logic sheets:
• Sheet Title
• Next Sheet (also found in toolbar)
• Previous Sheet (also found in toolbar)
• Find Sheet... (also found in toolbar)
• Append Sheet
• Insert Sheet
• Delete Sheet
• Sheet Template...
Sheet Title allows you to edit the title of the current sheet. The sheet title is
displayed in the title block, the window caption bar and the Window Menu list.
Append Sheet adds a new sheet after an existing sheet. Insert Sheet adds a new
sheet before an existing sheet.
Find Sheet allows you to find and select sheets by sheet title in a multi-sheet
program or function block. This command also provides access to dialog boxes for
insertion, deletion, and appending of sheets.
The Sheet Template command allows you to apply a different template to the
current sheet. (The default template is called Sheet Template B.) Select from the
following standard-size drafting sheets in either landscape or portrait orientation:
Sheet A — 8.5" x 11"
Sheet B — 11" x 17"
Sheet C — 17" x 22"
Sheet D — 22" x 34"

TriStation 1131 Developer’s Guide


Using Logic Sheets 111

Assigning Sheet Properties


When you open a new program, function or function block, some of the fields in
the sheet description are automatically filled by TriStation. To modify these fields
or fill in other fields, double-click on the sheet description in the lower right corner
of the screen and select the desired field, as shown in the following example:

Chapter 3 Ladder Diagram (LD)


112 Links

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.

TriStation 1131 Developer’s Guide


Power Rails 113

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.

Chapter 3 Ladder Diagram (LD)


114 Declaring Contacts and Coils

Declaring Contacts and Coils


Contacts and coils are specialized elements for the LD language which can be
declared in a number of ways. A typical approach is to place contacts and coils on
your worksheet using the appropriate tools or menu commands. (See “Menu
Commands and Toolbar” on page 100 for details.) Once you have placed the
desired elements, you can copy and paste them multiple times as needed using
menu commands or keyboard shortcuts. Then you can bring up the Properties box
by double-clicking on a contact or coil. Click the push pin, and begin assigning
properties to individual elements.
Another approach is to use the Declarations dialog box to declare several variable
names, then use the Name menu in the Properties box to apply these names to
contacts and coils on the worksheet.
A third approach is to apply a naming convention to several selected contacts or
coils using the Auto Name feature.
The Properties box for contacts and coils has three tab pages: Selected,
Declaration and Annotation, as shown in the example below. This section covers
the options for property declaration in their order of appearance in the tab pages.

Properties under the Selected Tab


The Selected tab of the Properties box for a contact or coil allows you to assign a
variable name (manually or automatically), adjust the width of the contact or coil
symbol, and turn on variable annotation.

TriStation 1131 Developer’s Guide


Declaring Contacts and Coils 115

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.

Chapter 3 Ladder Diagram (LD)


116 Declaring Contacts and Coils

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):

Contact Type Symbol Description


Normally Open —| |— The state of the left link is copied to the right
link if the state of the Boolean variable is ON.
Normally Closed —| / |— The state of the left link is copied to the right
link if the state of the Boolean variable is OFF.
Positive Transition —| P |— The state of the right link is ON from one
evaluation to the next when the associated
variable transitions from OFF to ON while the
state of the left link is ON.
Negative Transition —| N |— The state of the right link is ON from one
evaluation to the next when the associated
variable transitions from ON to OFF while the
state of the left link is ON.

TriStation 1131 Developer’s Guide


Declaring Contacts and Coils 117

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):

Coil Type Symbol Description


Normal (Momentary ( ) The state of the left link is copied to the
associated Boolean variable and to the right
link.
Inverted ( / ) The inverse of the left link’s state is copied to
(Momentary) the associated Boolean variable and to the right
link.
Positive Transition (P) The state of the associated Boolean variable is
ON from one evaluation to the next when the
left link transitions from OFF to ON.
Negative Transition (N) The state of the associated Boolean variable is
ON from one evaluation to the next when the
left link transitions from ON to OFF.
Set (Latch) (S) The associated Boolean variable is set to ON
when the left link is in the ON state and remains
ON until reset by the RESET coil.
Reset (Unlatch) (R) The associated Boolean variable is reset to OFF
when the left link is in the ON state and remains
OFF until set by the SET coil.

Chapter 3 Ladder Diagram (LD)


118 Declaring Contacts and Coils

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.

TriStation 1131 Developer’s Guide


Declaring Contacts and Coils 119

Properties under the Declaration Tab


The Declaration tab of the Properties dialog box for a contact or coil (shown
below) allows you to:
• View the data type—all contacts and coils are of type BOOL
• Select the variable type—Input, Output, In/Out or Local
• Include a written description
• Access the Declarations dialog box for variable manipulation

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.

Chapter 3 Ladder Diagram (LD)


120 Declaring Contacts and Coils

A Local is a variable for internal logic only which cannot be connected to a Trident
point.

Changing Variable Types


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.

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.

Declaration Dialog Box


The Declarations dialog box (shown in the example below), accessible from the
Declaration tab, provides a graphic display of all the variables in your logic and
allows you to manipulate the variables in the following ways:
• Adding, modifying and deleting
• Moving up and down
• Sorting
• Grouping

TriStation 1131 Developer’s Guide


Declaring Contacts and Coils 121

Adding New Contacts or Coils


The Add feature of the Declarations dialog box lets you declare variable names
for contacts or coils you have not yet placed on your logic sheet. Later, when you
do place the contact or coil elements on the logic sheet and bring up the Properties
box, any previously declared variable names appear for your selection under the
Name field of the Selected tab, as shown in the following example:

Chapter 3 Ladder Diagram (LD)


122 Declaring Contacts and Coils

Properties under the Annotation Tab


If you have checked the Annotate checkbox of the Selected tab in the Properties
box for a selected variable, the Annotation tab allows you to:
• Display the value of the variable during execution
• Select and/or modify macros for the variable annotation
• Type descriptive text for the variable annotation

As shown in the example above, 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. For more
information, see “Comments, Variable Annotation and Macros” on page 142.

TriStation 1131 Developer’s Guide


Declaring Local, Input and Output Variables 123

Declaring Local, Input and Output Variables


Local, input and output variables can be declared in a number of ways. A typical
approach is to place the variables on your worksheet using the tools or menu
commands. (Refer to the section called “” earlier in this chapter for details.) Once
you have placed a variable of each type you need, you can copy and paste these
multiple times as needed using menu commands or keyboard shortcuts. Then you
can bring up the Properties box by double-clicking on a variable element. Click
the push pin, and begin assigning properties to the variables.
Another approach is to use the Declarations dialog box to declare several variable
names, then use the Name menu in the Properties box to apply these names to
each variable element on the worksheet.
A third approach is to apply a naming convention to several selected variable
elements using the Auto Name feature.
The Properties box for variables has three tab pages: Selected, Declaration and
Annotation, as shown in the example below. This section covers the options for
variable declaration in their order of appearance in the tab pages.

Properties under the Selected Tab


The Selected tab of the Properties box for local, input and output variables allows
you to name the variable (manually or automatically), adjust the width of variable
symbols, and turn on variable annotation.

Chapter 3 Ladder Diagram (LD)


124 Declaring Local, Input and Output Variables

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.

Contact or Coil Type


If you are declaring properties for a contact or coil, the Selected tab will include a
field for Contact Type or Coil Type respectively. Refer to the section called
“Declaring Contacts and Coils” 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.

TriStation 1131 Developer’s Guide


Declaring Local, Input and Output Variables 125

Properties under the Declaration Tab


The Declaration tab of the Properties dialog box for variables (shown below)
allows you to:
• Select the data type and variable
• Apply an initial value and description
• Access the Declarations dialog box for variable manipulation

Chapter 3 Ladder Diagram (LD)


126 Declaring Local, Input and Output Variables

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.

Data Type Description


BOOL A Boolean, 1 bit in length
DATE A specific date
DINT A double integer, 32 bits in length
DT A specific date and time
DWORD A double word, 32 bits in length
INT An integer, 16 bits in length
LREAL A long real number, 64 bits in length
REAL A real number, 32 bits in length
STRING A sequence of up to 132 alphanumeric characters delimited by single
quotes
TIME A period of time (duration) expressed in days, hours, minutes,
seconds, or milliseconds
TOD A specific time of day

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).

TriStation 1131 Developer’s Guide


Declaring Local, Input and Output Variables 127

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.

Changing Variable Types


After placing a variable on your logic sheet, you can change its type through the
Properties dialog 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, see “Inserting Macros into Comments or
Annotations” on page 151.

Chapter 3 Ladder Diagram (LD)


128 Declaring Local, Input and Output Variables

Declaration Dialog Box


The Declaration dialog box (shown in the example below), accessible from the
Declaration tab, provides a graphic display of all the variables in your logic and
allows you to manipulate the variables in the following ways:
• Adding, modifying and deleting
• Moving up and down
• Sorting
• Grouping

TriStation 1131 Developer’s Guide


Declaring Local, Input and Output Variables 129

Adding New Variables


The Add feature of the Declarations dialog box lets you declare variables you
have not yet placed on your logic sheet. Later, when you do place the variable
elements on the logic sheet and bring up the Properties box, any declared variables
appear for your selection under the Name field of the Selected tab, as shown in the
following example:

Chapter 3 Ladder Diagram (LD)


130 Declaring Local, Input and Output Variables

Properties under the Annotation Tab


If you have checked the Annotate checkbox of the Selected tab in the Properties
box for a selected variable, the Annotation tab allows you to:
• Display the value of the variable during execution
• Select and/or modify macros for the variable annotation
• Type descriptive text for the variable annotation

As shown in the example above, 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. For more
information, refer to the section called “Comments, Variable Annotation and
Macros.”

TriStation 1131 Developer’s Guide


Declaring Constants 131

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.

Properties under the Constant Tab

Value, Type & Validate


The constant value you enter in the Value field must agree with the elementary data
type you select from the drop-down list under the Type field. Click Validate to
ensure value/type agreement. Data types that apply to constants are:
• BOOL
• DATE
• DINT
• DT
• DWORD
• INT
• LREAL
• REAL
• STRING
• TIME
• TOD

Chapter 3 Ladder Diagram (LD)


132 Declaring Constants

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.

Auto Name Feature


The Auto Name feature may be useful for applying consecutive values to multiple
constants, but it is primarily used for the automatic naming of several similar
variables according to a convention you select. For more information, refer to
“Automatic Naming” in the section called “Declaring Local, Input and Output
Variables.”

Properties under the Annotate Tab


If you have clicked on the Annotate checkbox under the Constant tab for a
selected constant, the Annotation tab allows you to:
• Select and/or modify macros for the annotation
• Type descriptive text for the annotation
In general, an annotation is a special kind of comment box attached to the bottom
of a logic element which can display its Trident Point Connection (Tag Name), its
value during execution, macros and descriptive text. Because a constant always has
the same value and does not have a Trident Point Connection, there is no question
of displaying various values during execution. However, macros and descriptive
text can be used if desired.

TriStation 1131 Developer’s Guide


Declaring Functions and Function Blocks 133

Declaring Functions and Function Blocks


Clicking on the Select FBlock Tool or using the Tools...Insert...Function (Block)
command displays the following menu, which allows you to select a function or
function block from the project library:

To search for a desired function or function block, you can:


• Type a few characters into the Find field to search for similar names.
• Sort the Element Name or Category column alphabetically by clicking on
the column heading, then look for the desired functionality.
After placing a function or function block on your logic sheet, that same element
remains selected in the library menu in case you want to add more elements of the
same type. Or you can copy and paste a function or function block multiple times
as needed using menu commands or keyboard shortcuts.

Chapter 3 Ladder Diagram (LD)


134 Declaring Functions and Function Blocks

To declare the properties of a function or function block, double-click on the


element to bring up the Properties dialog box and click the push pin. This will
keep the Properties box displayed on top as you move from element to element
declaring properties.

Declaring the Properties for Functions


The Properties dialog box for a function has only one tab with several user-
modifiable fields, as shown in the following example:

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.

TriStation 1131 Developer’s Guide


Declaring Functions and Function Blocks 135

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.

Inverting Inputs or Outputs


The inversion feature inverts the value of a BOOL input or output that is connected
to a function. When you select a BOOL variable name from the Inputs or Outputs
list in the Properties dialog box, and click Invert Selected Input or Invert
Output, a small circle appears on the corresponding terminal of the function, as
shown in the example that follows. If the Invert Selected Input and/or Invert
Output options are grayed out, then inversion is not available for the inputs and
outputs of this function.

Chapter 3 Ladder Diagram (LD)


136 Declaring Functions and Function Blocks

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.

TriStation 1131 Developer’s Guide


Declaring Functions and Function Blocks 137

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.

Chapter 3 Ladder Diagram (LD)


138 Declaring Functions and Function Blocks

Declaring the Properties for a Function Block


The Properties dialog box for a function block has two tabs: Selected and
Declaration. This section covers the function block properties in their order of
appearance in the tab pages.

Fields under the Selected Tab


Most of the modifiable characteristics of a function block are found under the
Selected tab of its Properties box.

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

TriStation 1131 Developer’s Guide


Declaring Functions and Function Blocks 139

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.

Inverting Inputs or Outputs


The inversion feature inverts the value of a BOOL input or output that is connected
to a function block. When you select a BOOL variable name from the Inputs or
Outputs list, and click the Invert Terminal checkbox, a small circle appears on
the corresponding terminal of the function block.
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 block. 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 block is inverted as it exits.
In the following example, the Outputs option and a BOOL variable called Q are
selected. Clicking the Invert Terminal checkbox causes a circle to appear on Q,
the output terminal of the AIR function, to indicate that inversion of the output
value will take place.

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.

Chapter 3 Ladder Diagram (LD)


140 Declaring Functions and Function Blocks

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.

Fields of the Declaration Tab


The Declaration tab of the Properties dialog box for a function block tells the
Data Type of the function block instance and provides a Description field for text,
as shown in the following example. The Var Type field indicates that a function
block instance always has a variable type of Local.

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.

TriStation 1131 Developer’s Guide


Using Network Dividers 141

Using Network Dividers


In LD, you can divide the logic on your sheet into various networks by means of
horizontal and vertical network dividers, as shown in the following example.
Program logic executes in the order the network dividers are placed.
These dividers are accessible by means of the Horiz. Network Divider tool and
the Vert. Network Divider tool on the LD toolbar, or commands of the same
names in the Tools...Insert menu.

Chapter 3 Ladder Diagram (LD)


142 Comments, Variable Annotation and Macros

Comments, Variable Annotation and Macros


TriStation offers two methods for documenting LD program logic: comments and
variable annotation. Both methods allow you to type in descriptive text and make
use of macros that describe various characteristics of the project, its elements and
the logic sheet. A comment box can be placed anywhere on the logic sheet, but a
variable annotation is attached to the bottom of a variable and is meant to be used
in an instance view of your program logic. This section covers the following topics:
• Including comments
• Using variable annotation
• Using macros

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.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 143

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

Inserting Macros into Comments


The Comment tab also allows you to access macros for the project, element or
sheet. To insert a macro into your comment box, click the Macros field to bring up
a list of available macros. Select the one you want, then use CTRL-C to copy it.
Close the macro list, place the cursor in your comment text, and use CTRL-V to paste
in the macro. Refer to the upcoming section called “Using Macros” for more
detailed information.

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.

Chapter 3 Ladder Diagram (LD)


144 Comments, Variable Annotation and Macros

Enable Macro Editing


Click this option and take the following steps to create your own macro by
combining other, existing macros:
1 Add one or more modifiable macros to your comment text (under the Comment
tab). Modifiable macros are identified by a pencil icon in the Current Value
column of the Edit Macros dialog box.
2 Click the Enable Macro Editing option.
3 Go to the Edit Fields tab and select a modifiable macro from the list that is
displayed. Click Modify to edit the text of the macro.
Refer to the upcoming section called “Using Macros” for more detailed
information about macros.

Move Behind Logic Elements


This feature allows you to move a selected comment box behind a logic element.
This creates the effect of enclosing or surrounding the element with descriptive
text. Click the option off if you later want to remove the comment box from behind
the logic element.

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.

Edit Fields Tab


This tab is used in conjunction with the Enable Macro Editing option found under
the Style tab. If you have included modifiable macros in your comment text, their
names will be listed for selection under the Edit Fields tab. Refer to the upcoming
section called “Using Macros” for more detailed information about macros.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 145

Using Variable Annotation


A variable annotation is a special kind of comment box that is attached to the
bottom of an input, output, input/output or local variable. The annotation box is
sizable for width and height and moves wherever the associated variable is moved.
An annotation can consist of any of the following types of information:
• The monitor value (value of the variable as the configuration executes)
• The default macro for the particular type of variable
• Other standard macros
• User-modified macros
• Text that you type in
The values of the macros and the variables themselves are displayed only in an
instance view of your program logic. From the LD editor, the Configuration editor
or a Control Panel, you select an instance view by pressing the Annotation
Instance button on the toolbar and selecting a program instance name from the
dialog box, as shown below.

Annotation Instance button

Chapter 3 Ladder Diagram (LD)


146 Comments, Variable Annotation and Macros

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

Annotation for the Entire Project


Variable annotation works in an “automatic” sense if you turn on the feature as
soon as you open a new project, before creating any programs or function blocks.
Do this by opening the Project Options menu, selecting the Variable
Annotations tab (shown below), and checking one or both of the following options
in the General box:
• Annotation on by default
• Monitor value on by default
The Annotation on by default option causes variable annotation boxes to appear
automatically every time you place a variable on the logic sheet for a program or
function block. The Monitor value on by default option displays, in the upper left
corner of the annotation box, the value of each variable during execution.
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).

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 147

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.

Note Annotation boxes underneath variables require extra space, depending on


how many macros and how much text you include. So turning on the annotation
capability at the beginning of a project is an advantage in terms of designing your
program logic for maximum readability.

Chapter 3 Ladder Diagram (LD)


148 Comments, Variable Annotation and Macros

Annotating Individual Variables


Even if you have not turned on annotation for all program variables using the
Variable Annotations menu, you can turn it on for individual variables by doing
the following:
1 Double-click on a variable to bring up the Properties box.
2 Click the Annotate checkbox in the lower right corner of the Selected tab.
3 If desired, go to the Annotation tab and click the box for Include monitor
value in annotation.
4 The default macro for the variable is already present. To insert an additional
macro, click the Macros field (in the Annotation dialog box) to bring up a list
of available macros. Select the one you want, then use CTRL-C to copy it. Close
the macro list, place the cursor in your annotation text, and use CTRL-V to paste
in the macro.

Using Instance Views


An instance view of an LD program looks similar to the editing view, except that
it depicts a specific instance of the program and the macros in the variable
annotations are expanded. There are three ways to invoke an instance view:
• From the LD Editor — While viewing a program in the LD editor, click the
Annotation Instance tool to display a list of the program instances. Select
an instance name, click OK, and the variable annotations will be expanded.
• From the Configuration editor — Select an instance name from the
Program Instances branch of the configuration tree. Click the Annotation
Instance tool and a read-only instance view of the program logic will be
displayed, with the variable annotations expanded. The sample instance
view on the next page was invoked from the Configuration editor.
• From the Control Panel — Select an instance name from the program
instance variable tree. Click the Instance View tool and a read-only
instance view of the program logic will be displayed, with the variable
annotations expanded. The actual monitor value (value of the variable
during program execution) is displayed only in an instance view invoked
from the Control Panel.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 149

Instance View in Configuration Editor

Chapter 3 Ladder Diagram (LD)


150 Comments, Variable Annotation and Macros

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

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 151

Inserting Macros into Comments or Annotations


You can access a complete list of macros for the project, element and sheet by
means of the Edit Macros dialog box (shown on the preceding page). To insert a
macro into a comment or annotation box, follow these steps:
1 In the Properties dialog box for a comment, click the Macros button (under the
Comment tab) to bring up the list of available macros in the Edit Macros
dialog box.
2 In the Properties box for an annotation, click the Macros button (under the
Annotation tab) to bring up the list of available macros in the Edit Macros
dialog box.
3 Select the macro you want, then use CTRL-C on the keyboard to copy it.
4 Close the Edit Macros dialog box.
5 Place the cursor in your comment or annotation box, and use CTRL-V to paste in
the macro. Add text if desired to explain what kind of information the macro is
showing you, as in the following example. In the example below, the macros are
expanded because the Expand Macros box has been checked under the Style
tab of the comment’s Properties box.

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.

Chapter 3 Ladder Diagram (LD)


152 Comments, Variable Annotation and Macros

Working with User-Modifiable Macros


User-modifiable macros are identified by the presence of a pencil icon in the
Current Value column of the Edit Macros dialog box (shown below during the
process of macro modification). To modify a macro, follow these steps:
1 Copy any system macro you wish to include by selecting that macro and
pressing CTRL-C on the keyboard. In the example below, the copied macro is
%CREATED_BY.
2 Select the desired user-modifiable macro and click Modify to bring up an
editing box. The example below uses %PGM_INPUT, the default macro for
annotating a program variable of the input class.
3 In the Edit Macro Text dialog box, paste in the previously-copied system
macro (%CREATED_BY) by pressing CTRL-V and/or enter text. Click OK.
4 If you wish to add more than one system macro to the user-modifiable macro,
repeat the above process as many times as needed.
5 When the user-modifiable macro is ready, close the macro list. You can then
copy and paste the user-modified macro into comment boxes and annotation
boxes as needed, using CTRL-C and CTRL-V on the keyboard.

TriStation 1131 Developer’s Guide


Comments, Variable Annotation and Macros 153

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.

Default Macros for Annotation Boxes


The default contents of annotation boxes are macros that vary with the class of the
variable, as shown in the following table:

Element Type Variable Class Default Macro


Program Input %PGM_INPUT
Output %PGM_OUTPUT
Input/Output %PGM_IO
Local %PGM_LOCAL
Function/Function Block Input %FB_INPUT
Output %FB_OUTPUT
Input/Output %FB_IO
Local %FB_LOCAL

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)

Chapter 3 Ladder Diagram (LD)


154 Comments, Variable Annotation and Macros

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:

Macro Expanded Value


%PPD_TAGNAME The name of the Trident point to which the program
variable is connected.
%PPD_CLASS The class of the Trident point to which the program variable
is connected. For example, “MI” for Memory Integer or
“DO” for Digital Output.
%PPD_LOCATION The location of the Trident point to which the program
variable is connected. This only applies to physical input
and output points and is displayed in the format ii.ss.pp,
where ii is the IOP number, ss is the module baseplate
address plug number, and pp is the point number.
%PPD_ALIAS The Modbus® alias of the Trident point to which the
program variable is connected. If the point has no alias, an
empty string is returned.

TriStation 1131 Developer’s Guide


Printing Logic Sheets 155

Printing Logic Sheets


From the LD editor, TriStation allows you to print the logic sheets you have
developed for programs, functions and function blocks. Adjust the view of a logic
sheet using commands in the View menu, then use the following File menu
commands as desired:
• Print Preview
• Print Setup
• Print...
Printing of the following items, which are not specific to LD, is covered in Chapter
11, “Printing”:
• Standard reports
• Custom reports designed with Crystal Reports software

Chapter 3 Ladder Diagram (LD)


156 Printing Logic Sheets

TriStation 1131 Developer’s Guide


CHAPTER 4

Structured Text (ST)

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

TriStation 1131 Developer’s Guide


158 Basic Methods for Writing Logic

Basic Methods for Writing Logic


Many of the methods used for writing logic are the same for all programming
languages. This section briefly mentions the basic methods as they apply to the ST
language, while upcoming sections supply details about the ST tools and features.
The basic methods are as follows:
1 In the Project Directory, choose New to create a new program, function block
or function with the Structured Text option checked.
TriStation automatically displays a template for your ST logic.
2 Write your logic using ST language statements. Statements are written in a
relatively free format, and can include variables, constants, functions and
function blocks. The ST compiler allows you to insert tabs, spaces and
comments between keywords and identifiers wherever a space is required, and
to end each statement with a semi-colon (;) separator.
Example:
FUNCTION ADD : DINT
(* Put your input variable declarations here *)
VAR_INPUT
IN1 : DINT ;
IN2 : DINT ;
END_VAR
(* Function Body *)
ADD := IN1 + IN2 ;
END_FUNCTION

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.”

TriStation 1131 Developer’s Guide


ST Editing Tools 159

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.

Menu Commands and Toolbar


The ST main menu appears above the toolbars, as shown below. The diagram on
the following page shows the commands that are accessible from the main menu.
The tables that follow the diagram describe these commands and show their
corresponding toolbar buttons.

For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.

Chapter 4 Structured Text (ST)


160 ST Editing Tools

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.”

Menus & Commands of the ST Language Editor


(grayed-out commands are common to all TriStation views)

File Edit TRIDENT Project Element

New Project... Undo Edit Configuration Directory... Save


Open Project... Redo Build Configuration Description... Description...
Save Project... Edit Session Journal Rebuild Configuration Security... Comment Macros...
Save As... Cut Compile All Project Elements History... Declarations...
Close Project Copy Emulator Control Panel Project Options... Build
Backup Project Paste Trident Control Panel TriStation 1131 Options... Intermediate Code
Restore Project Find... Trident Diagnostic Panel
1 <previously opened project> Replace... View Download History...
2 <previously opened project> Read from file Change State to Download All
Print... Write to file
Print Preview...
Print Reports...
Print Setup...
Exit

View Window Help

Read Only New Window TriStation 1131 Help


Overstrike Mode Cascade Tip of the Day
Auto Indent Tile Horizontal Keyboard Shortcuts
Line Numbers Tile Vertical Sample Projects
Enlarge Font Size Close All Technical Support
Reduce Font Size Arrange Icons About TriStation 1131...
Tabs and Font Size Show Properties Box TriStation 1131 Logo...
Show Message Bar
(Vertical Message Bar)
(Horizontal Message Bar)
Hide Message Bar
1 PROGRAM: <program name>

TriStation 1131 Developer’s Guide


ST Editing Tools 161

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.

Chapter 4 Structured Text (ST)


162 ST Editing Tools

Element Menu
Command Description
Save Element Saves the open element but not the entire project.

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 about
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.

TriStation 1131 Developer’s Guide


ST Editing Tools 163

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.

Note Overwritten text cannot be “undone” by the


Undo command on the Edit menu.

Auto Indent Automatically indents any new lines of text/code


entered into the current project element to the same
level as those already in the current element.
Line Numbers Automatically displays the line numbers in the current
project element. Line numbers can be removed from the
display by clicking the line numbers icon again.
Enlarge Font Size Automatically enlarges the font size of the current
project element by one point each time the Enlarge
Font Size command is selected or the Enlarge Font
Size button is clicked.
Reduce Font Size Automatically reduces the font size of the current
project element by one point each time the Reduce
Font Size command is selected or the Reduce Font
Size button is clicked.
Tabs and Font Size Activates the Text Editor Options dialog box, where
the Tabs, Font Size, and Autoscroll Delay are set for the
Structured Text editor.

Chapter 4 Structured Text (ST)


164 Creating Executable Elements

Creating Executable Elements


The Project Directory, accessible from the Project menu or by clicking the
Project Directory button on the toolbar, allows you to create user-defined
programs, function blocks, and functions. Go to the User Defined tab and click the
Project Directory New button to open the Create a New Executable Element dialog box as shown
button below:

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.

TriStation 1131 Developer’s Guide


Creating Executable Elements 165

Assigning Application Type Attributes


When you create a new executable element, you must select the appropriate safety
or control (non-safety) Application attribute for the type of logic you are creating.
The Application Type attributes regulate the use of elements within an application
as follows:

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.

Chapter 4 Structured Text (ST)


166 Creating Executable Elements

Modifying Application Type Attributes


To modify the attribute for an element you’ve already created, select the
Declarations command from the Element menu and go to the Attributes tab:
To modify these
attributes, you must
have permission.
Refer to “Privileges”
on page 398 for
details.

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.

TriStation 1131 Developer’s Guide


Declarations 167

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

Chapter 4 Structured Text (ST)


168 Declarations

Declaring Function Blocks


A function block begins with a declaration statement “declaring” that it is a
function block using the FUNCTION_BLOCK Name statement. The declaration
statement defines the function block in terms of the instance name, task, and
function block inputs and outputs. The end of the function block is designated by
the END_FUNCTION_BLOCK statement.
Function blocks must have at least one BOOL input and one BOOL output. All
input, output and local variables of a function block persist from one execution of
a function block to the next execution. Therefore, invocation of the same function
block with the same inputs will not always yield the same output values.
Example:
FUNCTION_BLOCK Average_Example
VAR_INPUT
RESET : BOOL ; (* 1 = Reset, 0 = Calculate *)
CURRENT_VALUE : DINT; (* Current Value from UPDOWN *)
END_VAR
The values of these VAR_OUTPUT
variables persist STATUS : BOOL ; (* 1 = resetting, 0 = calculating *)
from one execution XOUT : DINT ; (* Averaged Output - Running Sum/Sample_Cnt *)
of the function block
END_VAR
to the next.
VAR
SAMPLE_CNT : DINT := 0; (* # of iterations of this function
block *)
SUM : DINT := 0; (* Running Sum *)
END_VAR
(* Function Block Body *)
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;
END_FUNCTION_BLOCK

TriStation 1131 Developer’s Guide


Declarations 169

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.

Note No error or warning is issued if an assignment to the function output is in a


conditional statement and is not executed.

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

Chapter 4 Structured Text (ST)


170 Declarations

Declaring Input and Output Variables


Input and output variables are declared using the VAR_INPUT .. END_VAR and
VAR_OUTPUT .. END_VAR constructs. All input variables must be declared
before any output variables can be declared.
Example:
FUNCTION_BLOCK AVERAGE
(* Variable Declarations *)
VAR_INPUT
RESET : BOOL ; (* 1 = reset, 0 = calculate *)
CURRENT_VALUE : DINT ;(* Current Value from UPDOWN *)
END_VAR
VAR_OUTPUT
STATUS : BOOL ;(* State => 1 = resetting, 0 = calculating *)
XOUT : DINT ; (* Avg Output - Current_Value Divided by
MAX_COUNT *)
END_VAR
(* Your execution statements here *)
END_FUNCTION_BLOCK

Declaring Local Variables and Function Block Instances


Local variables are declared within function blocks using the VAR..END_VAR
construct. Local variables in a program or function block are initialized with initial
values (the default is zero) at startup. Function block instances are actually local
variables and are declared as such.
Example:
VAR
UpCount : INT:= 100; (* Declares initial value to be 100 *)
Reset : BOOL; (* Declares Boolean variable Reset *)
UpCounter : CTU; (* Declares instance of CTU function
block*)
END_VAR

TriStation 1131 Developer’s Guide


Declarations 171

Invoking Functions and Function Block Instances


You can invoke functions and function block instances within an ST executable
element by using a control statement which consists of the function or function
block’s name followed by a parenthesized list of input parameter values.
The order in which you list input parameters in a function block invocation is not
significant. Nor is it necessary to assign values to all input parameters in every
invocation of a function block. However, if you do not assign a value to a certain
parameter in a function block invocation, then TriStation applies the previously
assigned value or the initial value.
Use the general format shown below to invoke a function block instance:
FUNCTION_BLOCK_INSTANCE (Input1 := Value1,
Input2 := Value2, ..);
The Value1 and Value2 expressions create values and data types that match the
input parameters (Input1 and Input2) of the function block.

Referencing Function Block Outputs


When invoking a function block within an ST program or function block, you may
assign the output values from the function block to variables within your programs
or function blocks by using a function block separator (also called dot referencing).
The following example shows how to pass the output (CV) of a function block
named COUNTER to a variable (CountValue) within the function block named
REF_COUNTER.

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

Chapter 4 Structured Text (ST)


172 Expressions

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)

Operands and Operators


An operand is an element with which an operation is performed. An operand can
be a variable such as X. ALARM1, VALVE_OPEN; or a literal constant such as
1234, 1.35, 16#FFFF. Operands must be of the required type for each function
block.
An operator performs a specific action on one or more operands to compute a
value. For example, the multiplication operator (*) is used to compute the product
of two or more operands:
MyValue * 100

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.

TriStation 1131 Developer’s Guide


Expressions 173

The following table shows the order of evaluation or precedence for the Arithmetic
and Boolean operators:

Operation Symbol Precedence


Parenthesization (Expression) 1 — Highest
Function Evaluation Identifier (Argument List) 2
Example: LN(A),
MAX(X,Y), etc.
Exponentiation ** 3
Inversion - 4
Complement NOT 4
Multiply * 5
Divide / 5
Modulo MOD 5
Add + 6
Subtract - 6
Comparison <, >, <=, >= 7
Equality = 8
Inequality <> 8
Boolean AND AND 9
Boolean Exclusive OR XOR 10
Boolean OR OR 11 — Lowest

Chapter 4 Structured Text (ST)


174 Statements

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.

TriStation 1131 Developer’s Guide


Statements 175

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;

Function and Function Block Control Statements


Control statements allow you to invoke functions or function blocks within an ST
executable element, and return control to the invoking element before the end of
the scan. This type of control statement consists of the name of the function or
function block being invoked followed by a parenthesized list of the input
parameters and their value assignments. For more information on using control
statements to invoke function blocks or functions, see “Invoking Functions and
Function Block Instances” on page 171.

Chapter 4 Structured Text (ST)


176 Statements

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;

Note CASE statements are not currently implemented in TriStation.

TriStation 1131 Developer’s Guide


ST Language Examples 177

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

Chapter 4 Structured Text (ST)


178 ST Language Examples

Invoking a Function Block


The following ST example invokes a function block called Average_Example:
FUNCTION_BLOCK Average_Example
VAR_INPUT
RESET : BOOL ; (* 1 = Reset, 0 = Calculate *)
CURRENT_VALUE : DINT; (* Current Value from UPDOWN *)
END_VAR
VAR_OUTPUT
STATUS : BOOL ; (* 1 = resetting, 0 = calculating *)
XOUT : DINT ; (* Averaged Output - Running Sum/Sample_Cnt *)
END_VAR
VAR
SAMPLE_CNT : DINT := 0; (* # of iterations of this fblock *)
SUM : DINT := 0; (* Running Sum *)
END_VAR
(* Function Block Body *)
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;
END_FUNCTION_BLOCK

TriStation 1131 Developer’s Guide


ST Language Examples 179

Referencing Function Block Outputs


The following ST example passes the output (CV) of a function block COUNTER to
a variable (CountValue) within a program called REF_COUNTER.
Example:
PROGRAM REF_COUNTER
(* Variable Declarations *)
VAR
COUNTER : CTD;(* Declares COUNTER as a CTD function block *)
CountValue : INT;
END_VAR
(* Program Body *)
COUNTER(CD := TRUE);
CountValue :=COUNTER.CV;
END_PROGRAM

Chapter 4 Structured Text (ST)


180 Implementation Exceptions

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

Printing Logic Sheets


From the ST editor, TriStation allows you to print the logic you have developed for
programs, functions and function blocks. Use these commands on the File menu as
needed:
• Print Preview
• Print Setup
• Print...
Printing techniques for the following items, which are not specific to ST, are
covered in Chapter 11, “Printing”:
• Standard reports
• Custom reports designed with Crystal Reports software

TriStation 1131 Developer’s Guide


CHAPTER 5

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

TriStation 1131 Developer’s Guide


182 What is a Configuration?

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

Allocating I/O Modules


Your application needs to know which I/O modules are installed in your Trident
controller and the physical location of each module. When you use the
Configuration editor to define the I/O modules and their locations (slot numbers),
TriStation automatically allocates memory for the modules’ I/O points and system
attributes.
For instructions, see “Allocating I/O Modules” on page 194 and “Allocating
Memory Points” on page 197.
To configure the Main Processors, see “Configuring Main Processors” on
page 214.

Giving Tagnames to Points


Before a Trident I/O or memory point can be accessed by a program, it must be
identified by a tagname. The Configuration editor allows you to select an Input,
Output or Memory point with a specific address and give it a unique tagname. For
each point, you can also specify a Description, Modbus Alias, Group identifier and
Initial Value.
For instructions, see “Declaring Tagnames for Trident Points” on page 198.

TriStation 1131 Developer’s Guide


What is a Configuration? 183

Declaring Program Instances


Before you can use a program in a configuration, you must first declare at least one
instance of the program using the Configuration editor. A program instance is an
executable copy of a program type that defines which Input, Output and Memory
points will interact with the program’s input and output variables.
Using programs in a configuration is similar to using function blocks in a program.
To use a function block in a program, you must declare an instance of the function
block and give that instance a name. For example, assume that you have a program
in which you want to use the function block type FBLOCK.

INST_OF_FLBOCK is an instance of the function block type called FBLOCK.


The inputs (on the left) and the outputs (on the right) are connected to local vari-
ables declared in the program.
See page 201 for Just as you do for a function block, you must declare an instance of a program
instructions. before you can use it in your configuration and download it to the Trident
controller. For example, assume that you have a configuration in which you want
to use the program type BOILER (the name you gave the program when you
created it). First you must declare an instance of the program type BOILER, as in
this example:

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.

Chapter 5 Configuration Editor—Basic Concepts


184 What is a Configuration?

Connecting Inputs and Outputs to Tagnames


When you declare a program instance in the Configuration editor, TriStation makes
a table of program instance variables for every input and output in your application
program. Then you have to connect each program instance variable to an Input,
Output or Memory point with a tagname.
Because programs usually have numerous inputs and outputs, the Configuration
editor provides a table instead of a graphical interface for connecting program
inputs and outputs to tagnames. You connect the program instance variables to
tagnames using a Properties dialog box. Then TriStation displays the connections
in a table within the Input/Output Connections view, as shown on the next page.
The Configuration editor provides a few different methods for connecting your
program inputs and outputs to Trident points, described in “Connecting Program
Instance Variables to Trident Points” on page 204.
The upcoming sections in this chapter explain how to develop all of the basic
elements you will need to create a configuration for your TriStation project. For
additional information, see “Configuration Editor—Advanced Topics” on
page 213.

TriStation 1131 Developer’s Guide


What is a Configuration? 185

Chapter 5 Configuration Editor—Basic Concepts


186 Using Configuration Tools

Using Configuration Tools


To help you set up your configuration, the Configuration editor provides tools you
can select from the main menu and toolbars. The following sections describe the
Configuration tools in detail.

Menu Commands and Toolbar


The main menu of the Configuration editor appears above the toolbars, as shown
below. The diagram on the following page shows the commands that are accessible
from the main menu. The tables that follow the diagram describe these commands
and show their corresponding toolbar buttons.

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.”

TriStation 1131 Developer’s Guide


Using Configuration Tools 187

Menus & Commands of Trident Configuration Editor


(grayed-out commands are common to all TriStation 1131 views)

File Edit TRIDENT Project Element

New Project... Undo Edit Configuration Directory... Save Configuration


Open Project... Redo Build Configuration Description... Description...
Save Project... Edit Session Journal Rebuild Configuration Security... Comment Macros...
Save As... Cut Compile All Project Elements History... Build
Close Project Copy Emulator Control Panel Project Options... Intermediate Code
Backup Project Paste Trident Control Panel TriStation 1131 Options...
Restore Project Find Trident Diagnostic Panel
1 <previously opened project> Import Trident Points View Download History...
2 <previously opened project> Export Trident Points Change State to Download All
Print...
Print Preview...
Print Reports...
Print Setup...
Exit

Tree View Commands Tools Window Help

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.

Chapter 5 Configuration Editor—Basic Concepts


188 Using Configuration Tools

Edit Menu (continued)


Copy Copies selected items from the current configuration
and places them on the clipboard.

Paste Pastes the current contents of the clipboard into the


selected element.

Find Finds Trident points in the current configuration by


looking for their Alias, Location or Tagname
properties. Can Go To a selected found point.
Import Trident Allows you to import Trident point properties from
Points database, Excel and text files.
Export Trident Allows you to export Trident point properties from
Points TriStation to the following file types: dBase, Microsoft
Access, Microsoft Excel, XML (used by OPC Server),
and comma-delimited text files.

Element Menu
Command Description
Save Configuration Saves the current configuration.

Description... Provides access to the Element Description dialog.


Comment Macros... Provides access to the Edit Macros dialog.
Build Updates and compiles the current configuration and
links it to all other elements of the project.
Intermediate Code Displays source code that is generated in the Structured
Text language when the current configuration is
compiled.

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.

TriStation 1131 Developer’s Guide


Using Configuration Tools 189

Tree Menu
Command Description
Collapse Branch Collapses a selected branch of the tree.

View Menu
Command Description
Program Instances Displays the Program Instance view.

Memory Points Displays the Trident Point Connections view for


Memory points.

Input Points Displays the Trident Point Connections view for


Input points.
Output Points Displays the Trident Point Connections view for
Output points.
Memory Allocation Displays the Memory Allocation view which allows
you to change the amount of available memory for each
point type.
Hardware Displays the hardware allocation workspace for
Allocation inserting I/O modules, and in future releases, IOPs.

SOE Blocks Reserved for future use. Contact Triconex regarding


availability.
Hide (Show) Hides or shows the listing of system attributes in the
System Attributes Trident Point Connections view.
Zoom... Select the zoom view of the hardware allocation
workspace from preset and custom views.

Zoom to Fit Displays the entire hardware allocation workspace


within the current 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.

Chapter 5 Configuration Editor—Basic Concepts


190 Using Configuration Tools

Tools Menu
Command Description
Instance View Opens a read-only annotated view of the program logic
for a selected program instance.

Connections Opens the Connections Wizard which allows you to


Wizard connect program instance variables to Trident points
with Tagnames and other properties.
Select Tool (Arrow) Allows you to select items in the current view.

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.

TriStation 1131 Developer’s Guide


Using Configuration Tools 191

List Options for Configuration Views


In the Program Instances and the Trident Point Connections views, the column
headings for lists 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.
• Show or hide system attributes by choosing the Hide (Show) System
Attributes command from the View menu.
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.

The arrow shows


which column is
sorted and in what
order—ascending
or descending.

Note TriStation automatically saves the list options, so the next time you select
the view, the column positions and sort order are preserved.

Chapter 5 Configuration Editor—Basic Concepts


192 Developing a Configuration

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.

TriStation 1131 Developer’s Guide


Developing a Configuration 193

Functional Steps for TriStation 1131


Developing a Configuration Components Used

Configuration Editor

Hardware Allocation

Configure the Insert Module


Trident Controller Dialog Box

Memory Allocation

Typical Steps for Declare Tagnames Trident Points


Developing a
Configuration
Declare Program Program Instances
Instances

Connect Program Connect to Points or


Instance Variables Connect to Instances
to Points with Tagnames Dialog Box

Connect Program
Instance Variables Connect to Attributes
to System Attributes Dialog Box

Verify the Build Configuration


Configuration Command

Chapter 5 Configuration Editor—Basic Concepts


194 Developing a Configuration

Allocating I/O Modules


The Hardware Allocation branch of the configuration tree allows you to install
the I/O modules required for your application and specify their IOP addresses.
Click Hardware Allocation to graphically display the Trident modules in the right
view of the window, as shown below:

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.

TriStation 1131 Developer’s Guide


Developing a Configuration 195

Adding I/O Modules


In TriStation, you add I/O modules to the hardware allocation by placing graphic
images for the modules onto the Hardware Allocation workspace. You can
arrange the modules in the same order as the modules installed in your Trident
system. For each I/O module, TriStation automatically includes a baseplate and hot
spare.

▼ Follow these steps to add I/O modules to the hardware allocation:


1 Go to the Configuration editor and click the plus (+) sign on the Hardware
Allocation icon to expand the tree selections.
2 Click MP/IOP in the tree to graphically display the MPs, which are
automatically pre-installed by TriStation.
3 Click the Hardware Tool on the toolbar to display the Insert Module dialog
box, which lists the available I/O modules.
Hardware Tool
button 4 Select the desired type of I/O module from the dialog box and click OK.
5 Place the module on the hardware allocation workspace by clicking on the
desired location. (When placing a module directly above or below another
module, TriStation automatically snaps their baseplates together.)
6 Use the Hardware Tool again to install more modules of the same type as the
first one you installed.
Select Hardware To install a different kind of module, click the Select Hardware Tool on the
Tool button toolbar to display the dialog box once again.

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.

Deleting I/O Modules


To delete an I/O module you placed on the hardware configuration workspace,
select it and press the DELETE key. Deletion of modules is allowed only if your
application is in the Download All state. For more information, see “Download
States” on page 355.

Chapter 5 Configuration Editor—Basic Concepts


196 Developing a Configuration

Specifying the IOP Location


After adding the necessary I/O modules to your hardware allocation, use the
Module tab of the Properties box (shown below) to specify the IOP location and
enter a description if desired.

Module Dialog for


a Trident Module

▼ Follow these steps to specify the location of an I/O module:


1 Expand the Hardware Allocation branch in the configuration tree of the
Configuration editor.
2 Open the Properties dialog box for an I/O module by double-clicking on either
the name of the module in the configuration tree or its icon on the hardware
allocation workspace.
3 Select the Module tab.
4 Enter a description if desired.
5 Use the Location drop-down list to select the I/O module’s hardware address.
This address is derived from the unique number found on the address plug of the
module’s baseplate (01.xx, where xx = address plug).
In a Trident V1.0 controller, there is only one IOP, so addresses for the I/O
modules are always expressed as 01.xx, where 01 means IOP #1.

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.

TriStation 1131 Developer’s Guide


Developing a Configuration 197

Allocating Memory Points


When you create a new project, TriStation automatically allocates a default number
of Memory points for the program variables that you will be defining. If your
project needs more Memory points, you can add them by using a slider in the
Memory Allocation view, as shown below:

Memory
Allocation View

▼ Follow these steps to change the allocation of Memory points:


1 Open the Memory Allocation branch of the configuration tree.
2 Click the Memory Points branch to display the various types of memory points.
3 Double-click the graph for a particular point type, such as Unaliased DINTs
(shown above).
A dialog box displays a slider (shown above) that moves up and down to
increase or decrease the memory allocation.
4 Use the mouse, arrow keys, or the PAGE UP and PAGE DOWN keys to move the
slider until the number of Allocated points meets your requirements.
See “Changing Memory Allocation” on page 234 for more information.

Chapter 5 Configuration Editor—Basic Concepts


198 Developing a Configuration

Note Memory allocation is fixed at Download All time, so you must make
adjustments beforehand.

Declaring Tagnames for Trident Points


After allocating your I/O modules, you need to declare tagnames and other
properties for your Trident points. Tagnames in TriStation usually correspond to
physical tagnames (labels) on the connected field devices, except in the case of
Memory points (see “Examples” below). Trident points have two main
characteristics:
• They reference Input, Output or Memory points in the Trident controller
• They are accessible to all program instances within a TriStation project
Your TriStation application is independent of physical points in the Trident
controller. If you connect different devices to your physical points, you can easily
change the tagnames connected to your program variables without having to make
significant modifications to your TriStation application.

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.

TriStation 1131 Developer’s Guide


Developing a Configuration 199

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

Chapter 5 Configuration Editor—Basic Concepts


200 Developing a Configuration

6 Enter the Tagname and other point properties:


• Modbus Alias (see page 242 for instructions)
• Group 1
• Group 2
• Description
• Initial Value
• Application (see “Application Type Attributes” on page 247 for
instructions)
7 Press the Confirm Name button.
8 Select another {not yet named} point and repeat steps 6 and 7.

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.

Options for Moving a Tagname


When declaring tagnames, you might enter a tagname that is already in use by
another point. TriStation lets you overwrite the existing tagname if desired, but
offers options for doing so by displaying the Move Tagname Options dialog box:

TriStation 1131 Developer’s Guide


Developing a Configuration 201

Move Tagname
Options Dialog
Box

Declaring Program Instances


Program instances define which programs will be downloaded and executed and
which Input, Output and Memory points will interact with these programs. Before
you can use a program in your configuration, you must first declare an instance of
the program using the Configuration editor. A program may have more than one
instance, and can have up to 250 instances.
As an example, if you have a project that has an identical air damper unit for each
of four burners, it is feasible to declare four instances of the program for the air
damper, so you will not have to write the program logic four times.

▼ To declare a new program instance:


These steps are 1 Open a project which contains programs that have already been written and
illustrated on the successfully built.
next page.
2 Go to the Configuration editor.

Chapter 5 Configuration Editor—Basic Concepts


202 Developing a Configuration

3 Double-click Program Instances in the configuration tree to bring up the


Instance List dialog box.
The dialog box lists any program instances which are already declared.
4 Click the Add button to open the Add Program Instance dialog box.
5 Select a Program Type and enter a unique Instance Name.
6 Repeat steps 4 and 5 for every instance you wish to create.

Changing the Order of Execution


The order of programs listed under Program Instances in the configuration tree is
the order in which they will be executed. If you want to change the order of
execution, do this:

TriStation 1131 Developer’s Guide


Developing a Configuration 203

1 Double-click Program Instances or the name of particular program instance to


open the Instance List dialog box.
2 Select the name of the instance you want to move and use the Move Up and
Move Down buttons.

Displaying an Instance View


To display a read-only view of your program logic with expanded variable
annotations, select the program instance name in the configuration tree and click
Annotate Instance the Annotate Instance tool on the toolbar or select the Instance View command
tool on the Tools menu. A sample instance view is shown below:

Chapter 5 Configuration Editor—Basic Concepts


204 Developing a Configuration

Connecting Program Instance Variables to Trident Points


When you select a program instance in the configuration tree, TriStation displays
program instance input variables and program instance output variables in the
right view, as shown below:

Input/Output Con-
nections View

Program Instance Tagnames


Variables in Shaded Area

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

Using the Connect to Points Dialog


Use the Connect to Points dialog, accessible from the Program Instances view,
to manually connect program instance variables to specific tagnames.

▼ To connect a program instance variable to a tagname:


1 Open a project for which program instances and tagnames have already been
declared.
2 Go to the Configuration editor.
3 Click the name of a program instance (found under the Program Instances
branch of the configuration tree).

TriStation 1131 Developer’s Guide


Developing a Configuration 205

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

5 Click the Connect to Points tab.


6 For this example, select Memory Points in the Display area (shown below) to
see a list of tagnames for Memory points.
In your own project, you may want to connect variables to Input Points or
Output Points.
7 In the Tagnames list box, click the tagname that you want to connect to the
selected program instance variable.
In the example, that tagname is CAUSE_1.
8 Click the Connect to Variable button in the lower left corner of the dialog.
The P1.CAUSE_1 program instance variable is now connected to the tagname
called CAUSE_1:

Connecting Vari-
ables to Points
with Tagnames

Chapter 5 Configuration Editor—Basic Concepts


206 Developing a Configuration

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

10 Select values for the Tag Class and Location.


In the example above, the Tag Class is Memory and the Location is Unaliased.
11 Type the desired name in the Tagname field and click OK.
In the example, the new tagname is called DIRECTION_SEL.
After you click OK, Quick Tagname Setup closes and the new tagname is
displayed in the Tagname column beside the program instance variable.
12 To define additional quick tagnames, select other program instance variables
and repeat steps 9 through 11.

TriStation 1131 Developer’s Guide


Developing a Configuration 207

Using the Connect to Instances Dialog


Use the Connect to Instances dialog, accessible from the Trident Points view, to
manually connect tagnames to specific program instance variables.

▼ To connect a tagname to a program instance variable:


1 Open a project in which program instances and tagnames are already declared.
2 Go to the Configuration editor.
3 Expand the Trident Points branch of the configuration tree.
4 For this example, click Output Points to display the tagnames that have been
defined to represent your program outputs, as shown below.
5 Double-click the tagname DO_07 to open the Properties dialog box.
6 Click the Connect to Instances tab.
7 Select the P1 program instance and the Output Points option.
8 Select the P1.DO_07 program instance variable and click the Connect button.

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.

Chapter 5 Configuration Editor—Basic Concepts


208 Developing a Configuration

Using the Connections Wizard


With the Connections Wizard, you can automatically connect your program
instance variables to tagnames that are automatically created using the naming
conventions you specify. This is a quick way to prepare for testing when some of
your project information is temporarily missing. However, with automatic
connection, you cannot control exactly which Trident points are connected to
which program instance variables. Manual connection is the more precise method
that you would normally use when testing is done and you are preparing to
download your project to the Trident controller. For more information, see “Using
the Connections Wizard” on page 279.

Connecting Program Instance Variables to System Attributes


In your configuration, you can choose to connect some program instance variables
to system attributes instead of Trident points using the Connect to Attributes
dialog. System attributes are tagnames supplied by TriStation which allow you to
monitor the status of system components such as modules and points and
programmatically control a number of Trident operations. For more information,
see Chapter 7, “System Attributes.”

Using the Connect to Attributes Dialog


Use the Connect to Attributes dialog (accessible from the Program Instances
view) to manually connect program instance variables to system attributes for
modules or points.

▼ To connect a program instance variable to a module attribute:


1 Open a project for which program instances and tagnames have already been
declared and I/O modules have already been allocated.
2 Go to the Configuration editor.
The example is 3 Click Program Instances in the configuration tree or click the name a
shown on the next particular program instance.
page.
In the example that follows, the name of the selected program instance is P1.
4 In the Input/Output Connections view, double-click the name of a particular
program instance variable to open the Properties dialog box.
In the example, the name of the selected program instance variable is P1.D0_01.
5 Click the Connect to Attributes tab.

TriStation 1131 Developer’s Guide


Developing a Configuration 209

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

Chapter 5 Configuration Editor—Basic Concepts


210 Developing a Configuration

Connecting a Program Instance Variable to a Point Attribute


To connect point attributes instead of module attributes, follow the procedure in
“Using the Connect to Attributes Dialog” on page 208, then select the View Point
Attributes option instead of the View Modules Option (shown in the following
screen). Some types of points, such as points on the Pulse Input Module, have point
attributes. Other types of points do not have point attributes.

TriStation 1131 Developer’s Guide


Developing a Configuration 211

Building the Configuration


Use the Build command to verify your configuration before downloading.
Building the configuration is a mandatory step before you can test it in the
Emulator Control Panel or download it to the Trident controller for real-time
execution.
When you have finished making all of the necessary connections to Trident points
and system attributes, select Build Configuration or Rebuild Configuration
from the Trident menu. TriStation will compile the current configuration and
display all relevant messages in the Message Bar, as shown below.

Message Bar after


a Successful Build

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.

Downloading & Testing


After your configuration is successfully built, your project is ready for testing with
the Emulator Control Panel. When your test results prove that the project operates
effectively, you are ready to download it for real-time execution using the Trident
Control Panel. Refer to Chapter 8, “Control Panels” for details

Chapter 5 Configuration Editor—Basic Concepts


212 Developing a Configuration

TriStation 1131 Developer’s Guide


CHAPTER 6

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

TriStation 1131 Developer’s Guide


214 Configuring Main Processors

Configuring Main Processors


For Trident controllers, the Main Processors (MPs) are configurable modules
which means that you can specify properties for them, such as system parameters
and the parameters of communication ports.
The Configuration editor automatically installs the MP modules and their
baseplate, so you do not need to install them like other modules. To configure the
MPs, expand the Hardware Allocation branch of the configuration tree and click
MP/IOP1. TriStation graphically displays the MPs on the right side of the
Configuration editor window. Double-click the MP baseplate icon to open the
Properties dialog box, as shown below:

Module Dialog for


an MP

Setting the System Parameters


The Module tab of the MP’s Properties dialog box allows you to set the system
parameters described below.

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:

TriStation 1131 Developer’s Guide


Configuring Main Processors 215

• Use a default name in the form of TRINODE<node number>, where


<node number> ranges from 01 to 32, corresponding to the address plug
number on the MP baseplate.
• Create a unique name for any of 32 nodes using the Communications tab
of the Project Options dialog box. For details, see “Communications” on
page 408 for details.

Scan Time (ms)


The Scan Time parameter suggests the desired scan time before a TriStation project
is downloaded. Upon downloading, the Trident controller determines the minimum
and maximum allowable scan times for the application and uses your suggested
scan time if it falls within the acceptable limits.
To reset the scan time dynamically after downloading, use the Set Scan Time
command in the Trident Control Panel. Before downloading again, reset the Scan
Time operating parameter for the MPs if desired.
The default scan time is 200 milliseconds. The maximum allowable scan time is
450 milliseconds.
Scan time is the interval that is required for evaluations (scans) of your application
as it executes in the controller. The time it actually takes for the controller to do a
scan might be less or more than the actual scan time you specified. If it is more,
your application has a negative scan surplus which can cause communication
errors. Use the Diagnostic Panel to check on the status of the scan surplus. For more
information, see “System Performance & Project Information” on page 389.

Remote Access to Aliased Tagnames


If selected, external devices which use the TSAA (client/server) protocol can read
or write only to tagnames (points) which have aliases. Write access depends on
whether controls are configured to allow it. For more information, see “Overview
of Write Controls” on page 372.
To have an alias, a variable must be of the type Read Aliased or Read/Write
Aliased. For more information, see “Assignment of Aliases” on page 242.

Remote Access to All Tagnames


If selected, external devices which use the TSAA (client/server) protocol can read
or write to all tagnames (points) whether they have aliases or do not have aliases.

Chapter 6 Configuration Editor—Advanced Topics


216 Configuring Main Processors

Write access depends on whether controls are configured to allow it. For more
information, see “Overview of Write Controls” on page 372.

Setting the Operating Parameters


To set additional operating parameters for the MP in the MP Configuration dialog
box, click the Setup button on the Module tab of the MP’s Property dialog box,
as shown below:

The parameters that you set on the Operating Parameters tab are as follows.

Password Required for Connection


If you check this box and enter a password here, then after your next download, a
password will be required to connect to the Trident node.

TriStation 1131 Developer’s Guide


Configuring Main Processors 217

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.

Disable Remote Changes to Outputs


Checking the box (using the default) for this parameter ensures that external
devices cannot write to any output values in the TriStation application no matter
what other write access controls are used. This feature can help you protect safety-
critical outputs which should not be changed by external devices.
If the Disable Remote Changes to Outputs box is not checked, external devices can
write to outputs, depending on other write access controls which are in use. For
more information, see “Overview of Write Controls” on page 372.

Allow Disabling of Points


Selecting this parameter will allow Trident points to be disabled from the Control
Panel. See “Disabling Selected Points” on page 362 for further details.

Use Local Time


If this option is checked (the default), local time rather than universal time is used.

Chapter 6 Configuration Editor—Advanced Topics


218 Configuring Main Processors

Configuring Network (TriStation) Ports


The Network Ports tab of the MP Configuration dialog box (shown below) is
used to configure a network port for connection to a TriStation PC. The only Mode
available is WORKSTATION which refers to the TriStation PC. The Transceiver
Port property is fixed at RJ-45. For Transceiver Mode, select the Full Duplex or
Half Duplex option, depending on the characteristics of the network to which you
are connecting.

TriStation 1131 Developer’s Guide


Configuring Main Processors 219

Configuring Serial Ports


The Serial Ports tab of the MP Configuration dialog box (shown below) is used
to configure the MPs for communication with Modbus masters. Each MP provides
a serial port which must be separately configured. The serial ports can operate
independently, communicating with different Modbus masters. Or they can operate
as redundant serial ports, connected to redundant ports of the same Modbus master.

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.

Chapter 6 Configuration Editor—Advanced Topics


220 Configuring Main Processors

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.

Modbus Station Address


The Modbus Station Address identifies the slave station address of a serial port on
the MP Baseplate. Each serial port which is connected to a Modbus master device
must have a separate Modbus Station Address. Addresses can be 1 to 247.

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.

TriStation 1131 Developer’s Guide


Configuring Main Processors 221

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 )

Chapter 6 Configuration Editor—Advanced Topics


222 Configuring the Communication Module

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.

Configuring the Communication Module


For Trident controllers, the Communication Module (CM) is a configurable
module which means that you can specify properties for its Ethernet and serial
ports. A CM Baseplate can hold one CM or two CMs for redundant operation.
Before configuring the modules, you must allocate them. For more information,
see “Allocating I/O Modules” on page 182.
To configure the CMs, expand the Hardware Allocation branch of the
configuration tree and click COM:CM. TriStation graphically displays the CMs
on the right side of the Configuration editor window. Double-click the CM
baseplate icon to open the Properties dialog box, as shown below.

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.

TriStation 1131 Developer’s Guide


Configuring the Communication Module 223

Configuring Network Ports


The Network Ports tab of the CM Configuration dialog box is used to configure
the network ports on the CMs. Each CM provides a network connection which
must be separately configured.
To configure a network port, go to the Configuration editor. Under the System
Configuration structure, click the Hardware Allocation icon to display the
modules that are configured for this system. Double-click the CM icon to open the
Properties dialog box, and click Setup to display the configuration dialog box.
Click the Network tab, as shown below:

Slot Selection
The Slot Selection identifies which slot is being configured; either right or left.

Chapter 6 Configuration Editor—Advanced Topics


224 Configuring the Communication Module

NET1 and NET2 Configuration Options


This area is used to specify communication options for the NET1 and NET2 ports.

NET1 and NET2 Mode


The Mode option identifies the type of communication to be used by the CM.
• Open Network: for Ethernet network communication between Triconex
controllers and Ethernet-compliant devices. (For each CM, you can select
Open Network for either NET1 or NET2, but not for both of these ports.)
• Peer-to-Peer: for closed network communication between Triconex
controllers.

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.

TriStation 1131 Developer’s Guide


Configuring the Communication Module 225

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.

Trident TCP/IP Address


The Trident TCP/IP Address identifies the IP address of your Trident controller on
an Ethernet network. If your network topology permits, use a Triconex default
address. If not, get an address from your Network Administrator or Information
Technology department. For more information, see the Trident Communication
Guide.

TCP/IP Subnet Mask


The TCP/IP Subnet Mask identifies whether a default gateway is connected to your
local network or to a remote network.

Default Gateway Address


The Default Gateway Address identifies the IP address of the default gateway to
which the Trident controller is connected. Get this address from your Network
Administrator or Information Technology department. For more information, see
the Trident Communication Guide.

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)

Chapter 6 Configuration Editor—Advanced Topics


226 Configuring the Communication Module

Configuring Serial Ports


The Serial Ports tab of the CM Configuration dialog box is used to configure the
serial ports on the CMs. Each CM provides a serial connection which must be
separately configured.
If you have a CM, Triconex recommends using the CM serial ports for Modbus
communication instead of the MP serial ports, because the CM ports are faster,
have greater capacity, and include more modes of operation. MP serial ports can
act only as Modbus slaves in point-to-point configurations. For more information
on Modbus Communication, see the Trident Communication Guide.
To configure a serial port, go to the Configuration editor. Under the System
Configuration structure, click the Hardware Allocation icon to display the
modules that are configured for this system. Double-click the CM icon to open the
Properties dialog box, and click Setup to display the configuration dialog box.
Click the Serial Ports tab, as shown below:

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

TriStation 1131 Developer’s Guide


Configuring the Communication Module 227

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)

Modbus Station Address


The Modbus Station Address identifies the slave station address of a serial port on
the MP Baseplate. Each serial port which is connected to a Modbus master device
must have a separate Modbus Station Address. Addresses can be 1 to 247.
Not available if the CM serial port acts as a Modbus master.

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.

Chapter 6 Configuration Editor—Advanced Topics


228 Configuring the Communication Module

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.

TriStation 1131 Developer’s Guide


Configuring the Communication Module 229

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.

Chapter 6 Configuration Editor—Advanced Topics


230 Configuring the Communication Module

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

TriStation 1131 Developer’s Guide


Configuring the Pulse Input Module 231

Configuring the Pulse Input Module


The Pulse Input (PI) Module for the Trident controller is typically used to measure
the speed of rotating equipment such as turbines or compressors. It is a
configurable module which means that you can specify properties for it.
Before configuring a PI Module, you must allocate it. For instructions, see
“Allocating I/O Modules” on page 182. A PI Baseplate can hold one PI Module or
two PI Modules for redundant operation. Six REAL Input points are available for
each PI Baseplate, whether or not you are using redundant modules.
To configure a PI Module and its points, expand the Hardware Allocation branch
of the configuration tree and click the PI Module. TriStation graphically displays
the PI Modules on the right side of the Configuration editor window. Double-click
the PI Baseplate icon to open the Properties dialog box, then click the Setup
button to display the Pulse Input Configuration dialog box as shown below.

Chapter 6 Configuration Editor—Advanced Topics


232 Configuring the Pulse Input Module

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.

TriStation 1131 Developer’s Guide


Configuring the Pulse Input Module 233

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.

Number of Gear Teeth


The Number of Gear Teeth option applies only to RPM points. Type the number
of gear teeth that are counted in each revolution.

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.

To Convert: Set Scale to:


Pulses per second 0.016667
Pulses per minute 1.000000 (default)
Pulses per hour 60.000000

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

Chapter 6 Configuration Editor—Advanced Topics


234 Changing Memory Allocation

Changing Memory Allocation


To change the memory allocation, your project must be in a Download All state.
For more information, see “Download States” on page 355.
The Memory Allocation branch of the configuration tree allows you to change the
memory allocation for these point types if necessary:
• Memory points
• Input points
• Output points
Click the desired point type in the tree to display color-coded graphs that provide
the following information about memory allocation (as shown in the example that
follows):

Maximum Maximum number of points available


Allocated Number of points allocated
Used Number of points used as of last Download
Forecast Estimated number of points to be used after next Download Change

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.

TriStation 1131 Developer’s Guide


Changing Memory Allocation 235

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.

Chapter 6 Configuration Editor—Advanced Topics


236 Changing Memory Allocation

Displaying Memory Allocation for Application Data


The selection called Application Data under the Memory Allocation branch
displays two graphs, as shown in the example below:
• PROGRAM shows the number of bytes allocated for local variables in
program instances. This is the space allocated for local variables in your
program.
• LIBRARY shows the number of bytes allocated for externally compiled
libraries. This size is fixed by TriStation for use by Triconex libraries.

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.

TriStation 1131 Developer’s Guide


Allocating Memory for Peer-to-Peer Operations 237

Allocating Memory for Peer-to-Peer Operations


To allocate memory for Peer-to-Peer send and receive operations, you must set the
maximum number of Send and Receive function blocks for each TriStation
application. The maximum number does not have to be the same for Sends and
Receives. For example, a TriStation application might need to send messages to
three other projects, but need to receive messages from only one other project. You
should set the maximum number parameters to the lowest possible values, in order
to conserve memory and minimize scan time. However, if you plan to add more
Send and Receive function blocks in the future, you should enter the anticipated
maximum numbers now to avoid having to do a Download All later.
To allocate memory, select Edit Configuration. Check the message bar to see if the
project is the Download All state. If it is not, select Change State to Download All
from the Trident menu. On the configuration tree, click Peer-to-Peer
Configuration to display the following dialog box:

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

Chapter 6 Configuration Editor—Advanced Topics


238 Specifying Point Properties

Specifying Point Properties


In a Trident system, a point can represent any of the following:
• A field input device (sensor)
• A field output device (actuator)
• A Trident memory location

Definitions of Input, Output & Memory Points


The three types of points available in the Configuration editor are defined as:
• An Input point is a read-only variable that receives values from an input
device.
• An Output point is a read/write variable whose values are written to an
output device.
• A Memory point is a general-purpose read/write variable, not connected to
any input or output device.
Each point is uniquely identified by a tagname and optionally, a Modbus Alias.

Rules that Apply


The Configuration editor enforces the following rules for connecting your program
instance input and output variables for point tagnames:
• All input and output variables in a program instance must be connected to
tagnames.
• Tagnames for Input points can only be connected to program instance input
variables.
• A tagname cannot be connected to both input and output variables of the
same program instance.
• A tagname for an Output point can only be connected to an output variable
of one program instance.
• A tagname for a Memory point can only be connected to an output variable
of one program instance.
Additionally, the Configuration editor enforces the rules that define Trident points
for use in a safety or control (non-safety) application described on page 247.

TriStation 1131 Developer’s Guide


Specifying Point Properties 239

Methods for Declaring Tagnames


Before you can connect program instance variables to Trident points, you have to
declare tagnames for the points. You can use any tagnames that support your
control strategy, but using the instrument tagnames associated with the points is a
good technique. There are three basic ways to name points:
• Manually one-by-one using the Declaration Properties dialog box
• Using the Auto Tagnames feature for multiple selected points
• Automatically using the Connections Wizard
• Importing tagnames from database or text files

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.

Chapter 6 Configuration Editor—Advanced Topics


240 Specifying Point 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.

Using Auto Tag Names


The Auto Tagnames feature is helpful when you want to apply similar tagnames to
several points. For example, you have a number of gas detector inputs, and you
want to call them GASDTCT1, GASDTCT2, GASDTCT3, etc.

▼ Follow these steps to use the Auto Tagnames feature:


1 Select the number of {not yet named} points in the Trident Points list that you
want to name.
2 Click the Properties Box button on the toolbar to display the points’ Properties
dialog box (shown on the next page)
Properties Box
button 3 Click Auto Tagnames on the Declarations tab of the Properties box. (The
Auto Tagnames button is only displayed when you have selected multiple
points.)

TriStation 1131 Developer’s Guide


Specifying Point Properties 241

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.

Chapter 6 Configuration Editor—Advanced Topics


242 Specifying Point Properties

Automatic Naming in the Connections Wizard


Automatic naming of Trident points in the Connections Wizard is a quick way to
prepare for testing your program logic when some of the information you need to
complete your project is temporarily missing. However, with automatic naming
you cannot control exactly which points are connected to which program variables.
See the section called “Using the Connections Wizard” on page 279 for more
information about automatic naming and related concerns.

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.

Deleting Point Names


To return a single Trident point to the {not yet named} state, double-click a named
point to open the Properties box, go to the Declaration tab, delete the Tagname
(and other properties if desired), and select Confirm Name.
To return multiple points to the {not yet named} state, select the required points
and click the Properties Box button on the toolbar to display the Properties dialog
Properties Box box. Enter the Auto Tagnames dialog, leave the Formatted Name field blank,
button and click OK.

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.

TriStation 1131 Developer’s Guide


Specifying Point Properties 243

What are Aliases?


In an application for the Trident controller, you normally use alphanumeric names
as identifiers for program variables and Trident points. However, you also need to
use numeric identifiers called aliases for communication with external devices
which use the supported protocols. Each point whose value will be read by an
external device must have an alias.
An alias is a five-digit number—the leftmost digit defines the point’s data type and
the other four digits define its hardware address in the Trident. Acceptable values
for aliases fall within the ranges shown in the table below.
Alias Ranges for Trident Points
Point Data Message Maximum Default Alias Allowable
Type Type Type Points Range Alias Range
Input Discrete Read Only 4096 10001 - 14999 10001 - 19999
Input Integer Read Only 1024 30001 - 32499 30000 - 39999
Input Real Read Only 120 35000 - 37499 30000 - 39999
Output Discrete Read/Write 2048 00001 - 04999 00001 - 09999
Output Integer Read/Write 512 40000 - 42499 40000 - 49999
Memory Discrete Read/Write 2016 05000 - 09999 00001 - 09999
Memory Discrete Read Only 2016 15000 - 19999 10001 - 19999
Memory Integer Read/Write 750 42500 - 44999 40000 - 49999
Memory Integer Read Only 1000 32500 - 34999 30000 - 39999
Memory Real Read/Write 1000 45000 - 49999 40000 - 49999
Memory Real Read Only 1000 37500 - 39999 30000 - 39999

Chapter 6 Configuration Editor—Advanced Topics


244 Specifying Point Properties

Aliases Assigned by TriStation


TriStation assigns aliases in the following manner:
• When TriStation assigns an alias or suggests a default alias for an input,
output or memory data point, it uses the lowest available alias found in the
applicable Default Alias Range. When TriStation assigns an alias or
suggests a default alias for a system attribute, it uses the highest available
alias number found in the applicable Default Alias Range. This technique
keeps data and status points separated from each other and grouped with
like points. However, you are free to re-assign any alias that TriStation has
assigned.
• When you configure a module using the Configuration editor, TriStation
automatically assigns aliases for the module’s data points.
• TriStation does not automatically assign aliases to memory data points or
system attributes.

TriStation 1131 Developer’s Guide


Specifying Point Properties 245

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.

Chapter 6 Configuration Editor—Advanced Topics


246 Specifying Point Properties

• Assign two consecutive aliases to a Real aliased point.


If you select Disable scaling of a Real number to an Integer value on the
Min/Max tab (shown below), TriStation assigns two consecutive 16-bit
aliases to your Real variable so that IEEE 754 single-precision, floating-
point representation may be used. This option is available because Modbus
has a 16-bit size limitation. Only the first alias of the two is displayed in the
Modbus Alias field of the Declaration tab. If scaling is not disabled, only
one alias is used. For more information, see “MinSpan & MaxSpan Fields”
on page 250.

Note By default, the scaling of Real values to Integer values is enabled.

Aliases and Download Change


Changes to aliases are permitted when you do a Download Change. The reason is
that changing the alias number of a variable does not change the variable’s location
in memory.

TriStation 1131 Developer’s Guide


Specifying Point Properties 247

Application Type Attributes


See page 36 for a For each tagname that identifies a Trident point, you need to choose attributes that
definition of safety define its use in a safety or control application. The default attribute for all Trident
and control points is Control. To modify the attribute for a selected point, go to the
applications. Configuration editor and double-click a tagname in the Trident Points list to bring
up the Properties dialog box. Then select the Declaration tab shown below to
select the Application attributes:

• 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.

Chapter 6 Configuration Editor—Advanced Topics


248 Specifying Point Properties

Other Properties of Trident Points


This section explains the purpose of each field in the Trident Points view. The
particular fields which are active for a selected point depend on the point type and
data type. You can change the order of the fields as they are displayed across the
screen, and you can sort the columns for each field alphanumerically in ascending
or descending order. Refer to the section called “List Options for Configuration
Views” on page 191 for instructions on sorting.

Field Description of Use


This field is normally used for the tagnames of instruments to
Tagname which Trident points are connected, although you could decide to
use the field for other types of names.
A property you can specify for a memory point. (All points default
Retentive to Non-Retentive.) If a power failure occurs, a Retentive point
retains, upon power-up, the value it had prior to the power failure.
The value of a Non-Retentive point is zero or its default initial
value upon power-up following a power failure.
The data type of the selected point. Choices are BOOL, DINT and
Type
REAL.
The Application Type attribute of the tagname. This field shows if
S/C the tagname can be used in a safety (non-safety) program or
control program. The default attribute is Control.
The hardware address of the Trident point to which the program
variable is connected. For input and output points, the address is
displayed in the format 01.xx.pp where xx is the address plug of
Location
the module and pp is the point. For memory points, see the
upcoming section called “Addresses of Memory Points” on
page 249.
A five-digit numeric code that must be used if this point is going to
Alias be accessed by external devices. This field may be left blank if no
alias is needed.
A field you can use to identify a point as a member of a certain
group. For example, in the FURNACE project you could identify
Group 1
certain points as members of the BURNER_1 group, the
BURNER_2 group, and so on.
A field you can use to identify a point as a member of a certain
Group 2
group.

TriStation 1131 Developer’s Guide


Specifying Point Properties 249

Field Description of Use


A field you can use to make a comment about a point or the
Description
function it performs.
The value assigned to a variable at the time of system initialization
Initial Value
or start-up.
For a memory real or input real variable, the MinSpan sets the
MinSpan
lower limit of a selected variable in engineering units.
For a memory real or input real variable, the MaxSpan sets the
MaxSpan
upper limit of a selected variable in engineering units.
Specifies how many decimal points are displayed for a selected
DP
real point. The maximum number of decimal points is eight.

Addresses of Memory Points


In the Configuration editor, the addresses of memory points are displayed
according to their data type, variable type and position in Trident memory.
Examples are:
MBW.0013 — the thirteenth Memory BOOL Read/Write point
MIN.0007 — the seventh Memory Integer Non-Aliased point
The following table lists the acronyms that apply to memory point displays:

Complete Description Acronym


Memory BOOL (Unaliased) MBN
Memory BOOL (Read Aliased) MBR
Memory BOOL (Read/Write Aliased) MBW
Memory DINT (Unaliased) MIN
Memory DINT (Read Aliased) MIR
Memory DINT (Read/Write Aliased) MIW
Memory REAL (Unaliased) MRN
Memory REAL (Read Aliased) MRR
Memory REAL (Read/Write Aliased) MRW

Chapter 6 Configuration Editor—Advanced Topics


250 Specifying Point Properties

MinSpan & MaxSpan Fields


The MinSpan and MaxSpan fields for a Trident point are used to rescale the span
of values for a selected memory real or input real point. MinSpan sets the lower
limit and MaxSpan sets the upper limit in the desired engineering units. Double-
click on the desired real point in the Trident Points view to open the Properties
box, and then click the Min/Max tab to set the Minimum Value (MinSpan) and
Maximum Value (MaxSpan), as shown below:

TriStation 1131 Developer’s Guide


Specifying Point Properties 251

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.

Chapter 6 Configuration Editor—Advanced Topics


252 Specifying Point Properties

Monitor Display Options


For each Trident point, TriStation provides options for displaying the point’s state
both alphanumerically and in color. The display options can help an operator
identify alarm conditions at a glance—for example, when the Sequence of Events
Recorder is used to retrieve and analyze Trident data.

▼ To select display options for points:


1 Go to the Configuration editor and click any point(s) you want to modify.
2 Select the desired point name and double-click to open the Properties dialog
box. If you select multiple point names, click the Properties Box tool on the
Properties Box tool toolbar.
3 Click the Monitor tab to access the Monitor Display Options.
4 Enter the desired True and False State Names and select the desired True and
False Colors from the drop-down lists, as shown below:

5 Click the Confirm button to apply the changes.


6 Repeat Steps 1 through 5 to set display options for other points.

Note To revert to the default values, click the Default button.

TriStation 1131 Developer’s Guide


Specifying Point Properties 253

Viewing Points and Attributes for Selected Modules


The Points tab of the Properties box for an I/O module (shown below) provides
an easy way to view and go to any Trident point that has been declared for a
particular module. The Attributes tab allows you to view and go to the system
attributes that TriStation automatically supplies for selected I/O modules.
To connect Trident points with tagnames to program instance variables, see
page 204. To connect Trident points to system attributes, see page 208. For
detailed information about system attributes, see page 208.

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.

Chapter 6 Configuration Editor—Advanced Topics


254 Specifying Point Properties

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.

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 255

Exporting and Importing Point Properties


Exporting Point Properties
The Export Trident Points command on the Edit menu allows you to export
Trident point properties to any database or text file that has one of the following
formats:

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

Chapter 6 Configuration Editor—Advanced Topics


256 Exporting and Importing Point Properties

Selecting Point Type(s) for Export


With each export operation, you can choose to export any of the following point
types from the current configuration of your TriStation project:
• All Trident points
• All Memory points
• All Input points
• All Output points
• One type of points only, such as:
– BOOL Inputs (Read Unaliased)
– DINT Inputs (Read Aliased)

Exporting to a Database or Excel File


When TriStation exports Trident point properties to a database or Excel file, it
always creates tables with the same column headings and number of characters, as
shown in the list that follows. When you open a table to which you have exported
Trident point properties, you will always find these 19 columns, even if some of
the columns contain no data.

Point Property Required Value


TAGNAME The point’s Tagname (valid IEC 61131-3 identifier)—must be
31 or fewer characters
DESCRIP The point’s Description
GROUP1 The point’s Group1 description
GROUP2 The point’s Group2 description
ALIASTYPE The point’s Alias type:
U = Unaliased
R = Read-only aliased
W = Read/Write aliased
ALIASNUM The point’s Alias number from 0 - 49999
TAGTYPE Data type:
D = Discrete (BOOL)
I = Integer
R = Real

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 257

Point Property Required Value


TAGCLASS Data class:
I = Input
O = Output
M = Memory
INITVALUE Initial value:
- True or False for BOOL data type
- Integer value for DINT data type
- Real value for REAL data type
RETENTIVE Retentive flag:
N = Non-retentive
R = Retentive
IOP IOP number (1)
SLOT Slot number (1 - 6)
POINT Point number (1 - 32)
MINSPAN Lower limit for REAL in Engineering Units—0.00 - 32767.00
(Field is empty for types other than REAL)
MAXSPAN Upper limit for REAL in Engineering Units—0.00 - 32767.00
(Field is empty for types other than REAL)
DECPL1 Decimal places for displaying Real variables
SCALING Scaling flag: N = Non-scaling, S = Scaling
APPLICATN Application flag: C = Control, S = Safety
SHARED Shared for Read flag: Y = Yes, N = No
1. Corresponds to the DP (Decimal Place) field in the Trident Points view and the Min/Max
Accuracy field in the Format Data Source dialog box of the Import Wizard.

Chapter 6 Configuration Editor—Advanced Topics


258 Exporting and Importing Point Properties

Exporting to a Text File


When TriStation exports Trident point properties to a text file, the export data
consists of text fields separated by commas, as shown in the example below. Each
text field represents a separate piece of data, whereas commas and quotes represent
blank fields according to the following conventions:
• Two commas (no spaces in between) represent a blank numeric field
• Two quotes (no spaces in between) represent a blank string field
Every field, whether empty or not, is delimited by a comma.

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 259

Sample Steps to Follow


The steps below show how to export Trident point properties from TriStation to a
Microsoft Access database (.mdb) file, using the TdBoiler.pt2 sample project
found on the TriStation CD. Later, the sample steps for importing point properties
from a database file will use the export file created here.

▼ To export point properties to a database file, follow these steps:


1 In TriStation, use the Open Project command on the File menu to open the
sample project called TdBoiler.pt2.
2 Go to the Configuration editor.
3 Select the Trident Points branch of the Configuration tree as shown below:

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.

Chapter 6 Configuration Editor—Advanced Topics


260 Exporting and Importing Point Properties

Importing Point Properties


The Import Trident Points command on the Edit menu allows you to import
properties for Trident points from any database or text file that has one of the
following formats:

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

Rules for Database or Excel Files


A database or Excel file that you import to TriStation consists of at least one table
of data that will be mapped to Trident point properties in the Configuration editor.
The following rules apply to the columns of point properties in your import table:
• A table may contain as many columns of data as you like, but there are only
19 Trident point properties to which you can map imported data.
• The columns in the table may have any column headings that you want.

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 261

• 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.

Rules for Text Files


When you set up text files of Trident point properties to be imported into
TriStation, the following rules apply:
• Every line of text must have a consistent format, that is, the same number of
fields.
• Every field must be delimited by a comma (no spaces before or after).
• A line of text may contain as many fields as you like, but there are only 19
Trident point properties to which you can map the imported data.
• Each line of text must contain a minimum of three fields, which you must
map to these point properties:
– Tag Name
– Tag Type
– Tag Class
• Each field must meet the requirements described in “Required Values for
Point Properties” on page 263.
• A line of text may include blank fields, but these are not required. If you
want to include blank fields, then follow these conventions:
– Use two commas (no spaces between) to represent a blank numeric field
– Use two quotes (no spaces between) to represent a blank string field

Chapter 6 Configuration Editor—Advanced Topics


262 Exporting and Importing Point Properties

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.

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 263

Required Values for Point Properties


The following table describes the required values for the 19 Trident point
properties to which you will map your imported data. These requirements apply to
all Trident point properties, whether they come from database, Excel or ASCII text
files.

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.

Point Property Required Value :

Tagname The point’s Tagname (valid IEC 61131-3 identifier)—must be


31 or fewer characters
Description The point’s Description
Group1 The point’s Group1 description
Group2 The point’s Group2 description
Alias Type The point’s Alias type:
U = Unaliased
R = Read-only aliased
W = Read/Write aliased
Alias Number The point’s Alias number from 0 - 49999
Tag Type Data type:
D = Discrete (BOOL)
I = Integer
R = Real
Tag Class Data class:
I = Input
O = Output
M = Memory
Initial Value Initial value:
- True or False for BOOL data type
- Integer value for DINT data type
- Real value for REAL data type
Retentive Flag Retentive flag:
N = Non-retentive
R = Retentive

Chapter 6 Configuration Editor—Advanced Topics


264 Exporting and Importing Point Properties

Point Property Required Value


IOP IOP number (1)
SLOT Slot number (1 - 6)
POINT Point number (1 - 32)
Min Span Lower limit for REAL in Engineering Units—0.00 - 32767.00
(This field is NULL for other types, such as DINT and BOOL)

Max Span Upper limit for REAL in Engineering Units—0.00 - 32767.00


(This field is NULL for other types, such as DINT and BOOL)

Min/Max Accuracy Decimal places for displaying the values of Real variables
(This field is NULL for other types, such as DINT and BOOL)

Scaling Scaling flag:


N = Non-scaling
S = Scaling
Application Application flag:
C = Control
S = Safety
Shared for Read Shared for Read flag:
Y = Yes
N = No

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.

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 265

Sample Steps to Follow


These steps are based on a sample database file called “All_Pnts.mdb” which was
created by following the sample steps for export in the preceding section. This
database file has one table containing 19 columns of Trident point properties.

▼ To import point properties, follow these steps:


1 In TriStation, create a new project.
2 Go to the Configuration editor.
3 Select the Import Trident Points command from the Edit menu to start the
Import Wizard.
4 In the Select Data Source dialog box, click the Select Import Data File button.
An import filename 5Use the Windows dialog box to select the mdb file type and locate the
must have eight or “All_Pnts.mdb” file. Click the Open button.
fewer characters
6 Select the All_Pnts table from the Select Table list and click the Next button.
For details on the 7 In the Format Data Source dialog box (shown below), select the Link All
Link and Unlink command to map the import data to Trident point properties.
commands, see
page 268.

Chapter 6 Configuration Editor—Advanced Topics


266 Exporting and Importing Point Properties

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.

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 267

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.

Import Status Messages


In the Status column of the Data Import Validation Result dialog box, one of
four messages is displayed for each import record:

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.

Chapter 6 Configuration Editor—Advanced Topics


268 Exporting and Importing Point Properties

Linking & Unlinking Import Records


In the Format Data Source dialog box of the Import Wizard, you have a chance
to link or unlink your import records to Trident point properties. Four linking
commands are available:

Link See instructions below.


Unlink See instructions below.
Link All Applies only when you have 19 fields in the Source Field list which
will be mapped one-for-one to the Trident Point Property list.
Unlink All Applies to all set-ups of linked entries that need to un-linked.

▼ To use the Link command, follow these steps:


Hold down the 1 Select one or more fields in the Source Field list on the left.
CTRL key to select
multiple fields. 2 For each field you have selected, you must select a corresponding Trident
Point Property on the right, as shown in this example:

3 Click the Link button to map the selected fields to the properties on the right.

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 269

▼ To use the Unlink command, follow these steps:


1 Select one or more fields from the Source Field list on the right.
2 Click the Unlink button.

Import Record Processing


The Import Wizard offers three choices when importing Trident points:
• Update existing Trident points only
• Add new Trident points only
• Update existing Trident point(s) and add new Trident point(s)
The following sections explain how TriStation handles updates and adds.

Updating Existing Trident Points


When you select one of the options for updating existing Trident points, the import
operation can easily update an existing point that matches an import record. A
matching point is one whose Tag Name, Tag Type and Tag Class properties match
the corresponding values in the import record. If an import record matches an
existing Trident point and meets TriStation’s validation requirements, the
following properties of the existing point are updated from the input record if they
are different:
• Description
• Group1
• Group2
• Initial value
• Retentive Flag
• MinSpan
• MaxSpan
• Alias Number
• Application
• Shared for Read
• Scaling

Chapter 6 Configuration Editor—Advanced Topics


270 Exporting and Importing Point Properties

The following properties are not updated by the import operation:


• Alias Type
• Tag Type
• Tag Class
• IOP
• Slot
• Point
• Display Precision

Adding New Trident Points


A new Trident point is one whose tagname does not currently appear in the Trident
Points table. New entries are automatically posted to the Trident Points table if they
meet the validation requirements.
Trident points with Aliases of type R (Read Aliased) or W (Read/Write Aliased)
are treated as follows when an input record is processed.

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.

TriStation 1131 Developer’s Guide


Exporting and Importing Point Properties 271

Aliased Memory Points:


If the input record contains an Alias number, TriStation looks for an allocated point
in this order:
• A point with an Alias that matches the one supplied.
• The first available point with Alias 0 (zero). When such a point is found,
TriStation issues an appropriate warning.
• The first available point regardless of its Alias number. When such a point is
found, TriStation issues an appropriate warning.
If no match is found or the point is already being used, TriStation generates an
error.
If the input record does not contain an Alias number (in other words, its Alias is
zero), TriStation uses the first available point location that matches the data type
and Alias type (Read or Read/Write). If no location is found, the import record is
rejected.

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.

Chapter 6 Configuration Editor—Advanced Topics


272 Compare to Last Download

Compare to Last Download


When you download an application to the Trident, TriStation automatically saves
a snapshot of this configuration in your project. The Compare to Last Download
command on the Commands menu allows you to compare your current
configuration to the snapshot that was saved during the last download.

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.

The Compare Configurations dialog box provides the following tabs:


• System parameters
• Modules installed in the Trident system chassis
• Elements of the project
• Instances of programs and function blocks
• Trident Points
• Point Connections
In each tab, there is a column of Current information beside a column of Last
Download information, as shown in the System tab below. For any item that is
different from the last download, an asterisk (“*”) is displayed in the red asterisk
column on the far left.

TriStation 1131 Developer’s Guide


Compare to Last Download 273

Details Display
The following tabs in the Compare Configurations dialog box include a Details
button that displays additional information:

Tab Name Details About


Modules Changes to configurable modules in the Trident system.
Elements Changes to project elements: programs, functions, function
blocks, standard libraries and user-written libraries. (See the next
section for detailed information.)
Instances Comparison of Current Instance list with Previous Instance list.
Trident Points Current Definition and Previous Definition of Trident points
associated with the selected point. (See sample below.)

Chapter 6 Configuration Editor—Advanced Topics


274 Compare to Last Download

Details Display for


Comparing
Trident Point
Definitions

Element Differences Display


From the Elements tab in the Compare Configuration dialog box, you can select
an element marked with an asterisk, and then click the Details button to see a split-
window view of the differences between the current version and downloaded
version of the element, as shown in the FBD example below.

TriStation 1131 Developer’s Guide


Compare to Last Download 275

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

Chapter 6 Configuration Editor—Advanced Topics


276 Compare to Last Download

• 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.

TriStation 1131 Developer’s Guide


Compare to Last Download 277

Configuration Differences Report


From any tab in the Compare Configurations dialog box, you can click the Print
button to see a print preview of the Configuration Differences Report. Part of a
Configuration Differences Report for a TriStation project is shown below:

In the print preview, standard Crystal Report tools are available for page scrolling,
enlargement and reduction of the view, and printing.

Chapter 6 Configuration Editor—Advanced Topics


278 Using the SOE Capability

Using the SOE Capability


Understanding the sequence of events that leads to unsafe process conditions and
possible shutdowns can be essential to a safety application.To help you retrieve and
analyze these events, Triconex control systems offer integrated sequence of events
(SOE) functionality using TriStation and the SOE Recorder program. During each
scan of the application, the Main Processors examine selected BOOL variables for
state changes known as events. The events can be retrieved by the Triconex SOE
Recorder program or by a user-written SOE program on an external device such as
an OPC client.
To prepare your TriStation project for use with SOE Recorder, you must define
SOE block properties and assign event variables to the blocks. In TriStation, you
also program the following function blocks which control event collection for the
SOE blocks. The SOESTRT function block is required, and the other function
blocks are recommended.
SOESTRT — Starts event collection for a specified SOE block
SOESTOP — Stops event collection for a specified SOE block
SOESTAT — Checks status of a specified SOE block
SOECLR — Clears a specified SOE block
In addition, you can do the following tasks in TriStation:
• Estimate available memory
• Designate a trip variable
• Select monitor display options
For instructions and other details about SOE, see the SOE Recorder User’s Guide.

TriStation 1131 Developer’s Guide


Using the Connections Wizard 279

Using the Connections Wizard


This section explains how to use the Connections Wizard, covering the following
topics:
• Overview
• Manual connection
• Automatic connection
• Automatic naming
• Manual naming with automatic connection
• Disconnecting Trident points

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

Chapter 6 Configuration Editor—Advanced Topics


280 Using the Connections Wizard

CONNECTIONS WIZARD

All program variables All program variables Selected program


in All instances in One instance variables only*

Manually connect each Automatically connect Use another program


program variable each program variable instance as a pattern

Manual connections
dialog

Prefix with Prefixed with: Suffixed with: No prefix


instance name or suffix

Options for the


Connections
Wizard PRESERVE/REMOVE CONNECTIONS
Preserve connections & existing global variables
Preserve connections & auto-rename global variables.
Remove existing connections.
Remove existing connections and global variable names.

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.

TriStation 1131 Developer’s Guide


Using the Connections Wizard 281

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.

Chapter 6 Configuration Editor—Advanced Topics


282 Using the Connections Wizard

9 Click Next, and then Finish to connect the variable and exit the Connections
Wizard.

TriStation 1131 Developer’s Guide


Using the Connections Wizard 283

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.

Chapter 6 Configuration Editor—Advanced Topics


284 Using the Connections Wizard

Manual Naming with Automatic Connection


With automatic connection, usually you cannot control exactly which Trident
points are connected to which program variables. But you can exert this control by
first manually naming the points as described on page 239, then using the
Connections Wizard to automatically connect them to program variables.
However, this method works only if you give the Trident points the same names as
the program variables you want to connect them to. Then, in the Wizard, you must
decide to use the program instance name as a prefix or suffix. For example, if your
program instance is called P1, then your point names would be called P1_<variable
name 1>, P1_<variable name 2>, P1_<variable name 3>, etc. after they are
connected to the program variables.
To use this method, the first step is to manually name your Trident points using in
the Trident Points view. Then enter the Connections Wizard and select the
following options:
• All program variables in One instance
• Automatically connect each program variable
• Prefixed with the instance name
• Do not create any Trident points (Leave disconnected)

Undoing Point Names and Connections


If in the course of application development you choose to undo all existing Trident
point names and connections, the Connections Wizard allows you to do this
automatically by selecting these options in sequence:
• All variables in all instances
• Automatically connect each program variable
• Any naming convention
• Remove existing connections and Trident point names
• Do not create any new Trident points (leave disconnected)

TriStation 1131 Developer’s Guide


CHAPTER 7

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

TriStation 1131 Developer’s Guide


286 What are System Attributes?

What are System Attributes?


In TriStation, system attributes are points which allow you to monitor Trident
status and control a number of Trident operations. Status attributes help you
monitor the following system components and conditions:
• Main Processors
• I/O Processor (IOP)
• I/O strings
• System-wide information:
– Date and time
– Communication links
– Redundancy (single, dual or TMR)
– Fault conditions
• I/O modules
• I/O points
Control attributes allow you to programmatically control Trident operations such
as the following:
• Permitting remote access to Trident information
• Disabling and re-enabling Output Voter Diagnostic (OVD)1 on a per-point
basis
• Setting the program alarm
• Halting your project
• Resetting statistics for serial ports

1. See “Summary of Output Voter Diagnostics (OVD)” on page 391 for more
information.

TriStation 1131 Developer’s Guide


What are System Attributes? 287

Modules of the Trident System


TriStation provides system attributes for all modules in the Trident system, as
shown in the diagram that follows:
• The System Module includes all subsystems of the Trident control system.
• The Main Processor (MP) module includes the Application Processor and
the Input/Output Processor 1 (IOP1).
– The Application Processor executes the application program and handles
TMR voting plus network communication.
– IOP1 processes input signals from field devices and output signals
transmitted to the field devices.
• The I/O string consists of IOP1 and the I/O modules that it governs. For
Trident V1.0 systems, the I/O string is equivalent to the I/O subsystem.

• Individual I/O modules for digital inputs, digital outputs, analog inputs and
relay outputs.

Modules of the
Trident V1.0
System

Chapter 7 System Attributes


288 What are System Attributes?

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

Module and Point Attributes


For each module, TriStation always includes module attributes and may include
point attributes, as indicated below:

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.

TriStation 1131 Developer’s Guide


What are System Attributes? 289

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.

Chapter 7 System Attributes


290 Using System Attributes

Using System Attributes


See page 296 and This section gives instructions for using system attributes in your Trident project,
page 322 for expla- based on examples from the TdSysAtr.pt2 project on your TriStation CD. The
nations of the following topics are covered:
examples on the
TriStation CD. • Connecting system attributes to program instance variables
• Viewing system attributes
• Assigning Modbus Aliases
• Controlling OVD on a per-point basis

Connecting System Attributes to Program Instance Variables


From the Program Instances view of the Configuration editor, you can directly
connect program instance variables to specific system attributes by using the
Connect to Attributes dialog, as shown below. See“Connecting Program Instance
Variables to System Attributes” on page 208 for step-by-step instructions.

Connecting a
Program Instance
Variable to a
System Attribute

TriStation 1131 Developer’s Guide


Using System Attributes 291

Viewing System Attributes


There are three ways to view system attributes in the Configuration editor:
• For a selected variable group, use the Show/Hide System Attributes
command
• For a selected individual point, use the Attributes tab of the Properties
dialog box
• For a selected module, use the Attributes tab of the Properties dialog box

Show/Hide System Attributes Command


In any Trident Points view, you can show or hide all of the associated system
attributes (if any apply) by using the Show/Hide System Attributes command on
the View menu. System attributes are always displayed in red, whereas point
tagnames are always displayed in black. For an example, see “Viewing Point
Attributes” on page 293.

Note To sort the system attributes and tagnames in ascending or descending


alphabetical order, click the title bar of the Tagnames column to point the arrow
up (for ascending order) or down (for descending order).

Chapter 7 System Attributes


292 Using System Attributes

Viewing Module Attributes


▼ Follow these steps to view the module attributes associated with a particular
module:
1 Open a project for which the I/O modules have already been installed, or take
the time to install I/O modules in your current project.
2 In the Configuration editor, select the Hardware Allocation view and open the
Properties dialog box for the desired module.
In the example below, a Digital Output module is selected.
3 Click the Attributes tab to view the applicable module attributes, as shown
below.

Properties Box
Tab for Module
Attributes

4 If desired, select an attribute and click the Go To button.


This displays the Trident Points view with the same attribute selected.

TriStation 1131 Developer’s Guide


Using System Attributes 293

Viewing Point Attributes


▼ Follow these steps to view the point attributes associated with a particular
module:
1 Open a project for which the I/O modules have already been installed, or take
the time to install I/O modules in your current project.
2 In the Configuration editor, select the Trident Points view and open the
Properties dialog box for the desired point type.
In the example below, the BOOL Outputs (Read/Write Aliased) point type is
selected.
3 In the BOOL Outputs view, double-click any tagnamed point or {not yet
named} point.
4 Click the Attributes tab to view the applicable point attributes, as shown below:

Chapter 7 System Attributes


294 Using System Attributes

Assigning Modbus Aliases


Alias is an By default, system attributes do not have Modbus aliases. You must assign aliases
abbreviation for to them, either individually or in groups, to make their values accessible by external
Modbus Alias. devices. Alias assignment for system attributes works the same as alias assignment
for Trident points with tagnames. For detailed information about aliases beyond the
scope of the step-by-step instructions that follow, see “Assignment of Aliases” on
page 242.

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.

TriStation 1131 Developer’s Guide


Using System Attributes 295

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.

Chapter 7 System Attributes


296 Using System Attributes

Disabling and Monitoring OVD


This section briefly describes Output Voter Diagnostics (OVD), shows how to
disable it for individual points, and explains how to monitor its status. For more
information about OVD, see “Summary of Output Voter Diagnostics (OVD)” on
page 391 and the Trident Planning & Installation Guide.

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).

TriStation 1131 Developer’s Guide


Using System Attributes 297

Using the SET_OVD_OFF Attribute


This section shows how to disable OVD for individual points by using the
SET_OVD_OFF control attribute. The TdSysAtr.pt2 project on the TriStation
CD is used as an example.

▼ To disable OVD for individual points:


1 Open the TdSysAtr.pt2 project and use the Project Directory to open the
ExSysAttr program.
2 Observe the network that turns off OVD for the first eight points on a Digital
Output (DO) module whenever the input variable called
TURN_OVDS_1_8_OFF goes true:

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.

Chapter 7 System Attributes


298 Using System Attributes

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

7 In the Attributes list, select the DO_OVD_1.SET_OVD_OFF attribute, as


shown above. In the example, the Connect to Variable button was used to
connect this attribute to the P1.DO_OVD_1 program instance output variable.
In the example, the process described in steps 4-6 was repeated for the other 7
program instance output variables. Each variable was selected and connected to
the appropriate SET_OVD_OFF attribute.

TriStation 1131 Developer’s Guide


Using System Attributes 299

Using the OVD_RUNNING Attribute


This section shows how to monitor OVD status for all of the points on a DO
module by using the OVD_RUNNING status attribute. The TdSysAtr.pt2 project
on the TriStation CD is used as an example.

▼ To monitor OVD status for points on a DO module:


1 Open the TdSysAtr.pt2 project and use the Project Directory to open the
ExSysAttr program.
2 Observe the network that keeps the variable called ALL_OVDS_ON turned on
when OVD is enabled for all sixteen points on a DO module.

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.

Chapter 7 System Attributes


300 Using System Attributes

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

7 In the Attributes list, select the DO_PT_01.OVD_RUNNING attribute, as


shown above. In the example, the Connect to Variable button was used to
connect this attribute to the PT_01_OVD_RUNNING program instance input
variable.
In the example, the process described in steps 4-6 was repeated for the other 15
program instance input variables. Each variable was selected and connected to
the appropriate OVD_RUNNING attribute in the Connect to Attributes
dialog box.

TriStation 1131 Developer’s Guide


Description of System Attributes 301

Description of System Attributes


This section describes the following types of system attributes:
“Summary Status for All Trident Subsystems” . . . . . . . . . . . . . . . 302
“I/O Subsystem Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
“MP—Module Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
“MP—Operational Modes” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
“MP—TriStation Port Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
“MP—Serial Port Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
“CM—Module and Port Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
“IOP1 Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
“I/O String Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
“I/O Module Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
“DO Points—Diagnostic Status and Control” . . . . . . . . . . . . . . . . 319
“AO Points—Field Fault Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
“PI Points—Signal Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

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.

Chapter 7 System Attributes


302 Description of System Attributes

Summary Status for All Trident Subsystems


The System attributes in the table below provide summary status information for
all subsystems of the Trident system, including:
• Safety status of the Trident system
• Parameters of the downloaded application
• Status of communication links with various Trident nodes
• Calendar and clock data for the Trident system

Attribute Name Description Data


Type
System.APP_MAJOR_VRSN Major version of the downloaded application. DINT
System.APP_MINOR_VRSN Minor version of the downloaded application. DINT
System.APP_NAME Name of the downloaded application. DINT
System.COLD_START This attribute is set to True (1) during the first scan of the BOOL
application that occurs after retentive variables are initialized.
It is set to False (0) at the end of that scan. See “Other
Properties of Trident Points” on page 248 for a definition of
retentive variables.
System.DAY The current day of the month. DINT
System.DAYLIGHT_TIME Daylight savings time is in effect. BOOL
System.DAY_OF_WEEK The current day of the week (0 - 6 where Sunday is 0). DINT
System.DSBL_REMOTE_CHGS Remote changes to output points from external devices are BOOL
disabled.
System.FIRST_SCAN This attribute is set to True (1) during the first scan of the BOOL
application, whether it is the first scan of the first run or the
first scan after the application has been stopped and restarted.
FIRST_SCAN continues to be true during the first scan, but
is set to False (0) at the end of that scan.
System.GE_DUAL Every point in the Trident system is supported by at least two BOOL
channels. See also System.GE_SINGLE and System.TMR.
System.GE_SINGLE Every point in the Trident system is supported by at least one BOOL
channel. See also System.GE_DUAL and System.TMR.
System.HOUR The current hour of the day (0-23). DINT

TriStation 1131 Developer’s Guide


Description of System Attributes 303

Attribute Name Description Data


Type
System.LOCAL_TIME All time indicators in the system contain local time. When BOOL
this attribute is False (0), all time indicators in the system
contain universal time.
System.MASTER_CLK This node owns the master clock in a peer-to-peer network. BOOL
All other nodes in the network must synchronize their clocks
to the master clock.
System.MICROSECOND The current microsecond of the millisecond (0-999). DINT
System.MILLISECOND The current millisecond of the second (0-999). DINT
System.MINUTE The current minute of the hour. DINT
System.MONTH The current month of the year (1-12 where 1 is January). DINT
System.NODE_OKnn Node nn (01-64) has a valid communication link with this BOOL
node.
System.NODE_REDUNDANTnn Node nn (01-64) has a redundant communication link with BOOL
this node.
System.NO_ACTIVE_FLTS None of the active modules in the Trident system requires BOOL
operator intervention.
System.NO_FLTS None of the modules in the Trident system requires operator BOOL
intervention.
System.POWER_UP This attribute is set to True (1) during the first scan of the BOOL
application after power-up. It continues to be true during the
first scan, but is set to False (0) at the end of that scan.
System.PT_DISABLING_OFF The application does not support the disabling of I/O points BOOL
by the user or an external device.
System.RELATIVE_SECONDS The number of seconds since 1-Jan-1970 00:00. DINT
System.SECOND The current second of the minute (0-59). DINT
System.TMR Every point in the Trident system is supported by three BOOL
channels. See also System.GE_DUAL and
System.GE_SINGLE.
System.YEAR The current year. DINT

Chapter 7 System Attributes


304 Description of System Attributes

I/O Subsystem Status


The System.IO_ attributes in the table below provide summary status information
for the I/O subsystem2, including:
• Health status of I/O field power and I/O logic power
• Safety status of the I/O string governed by IOP1

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.

TriStation 1131 Developer’s Guide


Description of System Attributes 305

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

Chapter 7 System Attributes


306 Description of System Attributes

Attribute Name Description Data


Type
MP.BATT_OK_MID The Middle MP module’s battery is OK. BOOL
MP.BATT_OK_RIGHT The Right MP module’s battery is OK. BOOL
MP.FLD_PWR_OK All of the system’s field power supplies are OK. A Trident BOOL
system can have more than two field power supplies.
MP.GE_DUAL At least two MP modules are operating without any fatal BOOL
faults. See also MP.TMR.
MP.INSTALLED_LEFT The Left MP module is plugged into the baseplate. BOOL
MP.INSTALLED_MID The Middle MP module is plugged into the baseplate. BOOL
MP.INSTALLED_RIGHT The Right MP module is plugged into the baseplate. BOOL
MP.LOCKED_LEFT The Left MP module is locked into position on the BOOL
baseplate.
MP.LOCKED_MID The Middle MP module is locked into position on the BOOL
baseplate.
MP.LOCKED_RIGHT The Right MP module is locked into position on the BOOL
baseplate.
MP.LOGIC_PWR1_OK Logic Power 1 for the MP modules is OK. BOOL
MP.LOGIC_PWR2_OK Logic Power 2 for the MP modules is OK. BOOL
MP.LOGIC_PWR_OK Logic Power 1 and Logic Power 2 for the MP modules are BOOL
both OK.
MP.NO_FAULTS No faults have been detected on any of the three MP BOOL
modules.
MP.PASS_LEFT The Left MP module has no faults. BOOL
MP.PASS_MID The Middle MP module has no faults. BOOL
MP.PASS_RIGHT The Right MP module has no faults. BOOL
MP.POINTS_DISABLED The number of disabled points. DINT
MP.PROG_ALARM_ON The programmable alarm is on. BOOL
MP.REMOTE_WRT_ENBL Remote access by external devices is enabled. BOOL
MP.REQUESTED_SCAN_TIME The requested scan time in milliseconds. DINT

TriStation 1131 Developer’s Guide


Description of System Attributes 307

Attribute Name Description Data


Type
MP.SCAN_OVERRUNS The number of scan overruns during the most recent 100 DINT
scans. This number can be between 0 (no overruns) and
100.
MP.SURPLUS_SCAN_TIME Surplus scan time in milliseconds. This value tells how DINT
much of the requested scan time was left over after the last
scan of the application.
MP.SYSTEM_OK No logic power, field power, module, field or program BOOL
alarms have been detected anywhere in the Trident system.
MP.TEMP_LEFT The temperature of the Left MP module in degrees DINT
Centigrade.
MP.TEMP_MID The temperature of the Middle MP module in degrees DINT
Centigrade.
MP.TEMP_OK The operating temperature of all three MP modules is BOOL
within specifications.
MP.TEMP_RIGHT The temperature of the Right MP module in degrees DINT
Centigrade.
MP.TMR All three MP modules are operating without any fatal BOOL
faults. See also MP.GE_DUAL.

MP—TriStation Port Status


The attributes in the table below provide information about message processing on
the TriStation ports that correspond to the Left, Middle and Right MP modules.

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

Chapter 7 System Attributes


308 Description of System Attributes

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.

Attribute Name Description Status Control Data


Type
MP.CLEAR_FLTS To clear all faults in the Trident ✓ BOOL
system, your application must set this
attribute to True (1).
MP.SET_APP_HALT To halt execution upon completion of ✓ BOOL
the current scan, your application
must set this attribute to True (1).
MP.APP_STATE Current state of the application, ✓ DINT
where 0=Running, 1=Halted,
2=Paused and 3=Trapped. This
attribute is useful only for aliased
variables whose values are accessed
by external devices.
MP.SET_APP_LOCK To lock out application changes, your ✓ BOOL
application must set this attribute to
True (1). Application changes
include Download All, Download
Change and operational commands
from the Trident Control Panel.

! 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.

TriStation 1131 Developer’s Guide


Description of System Attributes 309

Attribute Name Description Status Control Data


Type
MP.APP_LOCKED Application changes are locked out. ✓ BOOL
This includes Download All,
Download Change and operational
commands from the Control Panel.
MP.SET_PROG_ALARM_ON To set the Programmable Alarm, ✓ BOOL
your application must set this
attribute to True (1). When the Pro-
grammable Alarm is set, blue indica-
tors are illuminated on the MPs.
To clear the Programmable Alarm,
your application must set this
attribute to False (0).
MP.PROG_ALARM_ON The programmable alarm is on. ✓ BOOL
MP.SET_REMOTE_WRT_ENBL To enable writes by external devices ✓ BOOL
to aliased read/write variables, your
application must set this attribute to
True (1).
To disable writes to aliased
read/write variables, your application
must set this attribute to False (0).
For more information, see “Overview
of Write Controls” on page 372.
MP.REMOTE_WRT_ENBL Remote access by external devices is ✓ BOOL
enabled.
MP.RESET_PORT_LEFT To reset statistics for the Left Serial ✓ BOOL
Port on the MP, your application
must set this attribute to True (1).
MP.RESET_PORT_MID To reset statistics for the Middle ✓ BOOL
Serial Port on the MP, your
application must set this attribute to
True (1).
MP.RESET_PORT_RIGHT To reset statistics for the Right Serial ✓ BOOL
Port on the MP, your application
must set this attribute to True (1).

Chapter 7 System Attributes


310 Description of System Attributes

MP—Serial Port Status


The attributes in the table below provide information about message processing on
the Serial ports that correspond to the Left, Middle and Right MP modules.

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.

TriStation 1131 Developer’s Guide


Description of System Attributes 311

CM—Module and Port Status


The attributes in the table below provide information about the health and safety
status of the installed CM and message processing on its communication ports.

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

Chapter 7 System Attributes


312 Description of System Attributes

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

TriStation 1131 Developer’s Guide


Description of System Attributes 313

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

Chapter 7 System Attributes


314 Description of System Attributes

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

3. Discrete is a synonym for digital.

TriStation 1131 Developer’s Guide


Description of System Attributes 315

Attribute Name Description Data


Type
IOP1.LOCKED_LEFT The Left MP module is locked into position on the baseplate. BOOL
IOP1.LOCKED_MID The Middle MP module is locked into position on the base- BOOL
plate.
IOP1.LOCKED_RIGHT The Right MP module is locked into position on the base- BOOL
plate.
IOP1.LOGIC_PWR1_OK Logic Power 1 is OK for the MP modules. BOOL
IOP1.LOGIC_PWR2_OK Logic Power 2 is OK for the MP modules. BOOL
IOP1.NO_FLTS None of the IOPs requires operator intervention. BOOL
IOP1.PASS_LEFT The Left MP module has no faults. BOOL
IOP1.PASS_MID The Middle MP module has no faults. BOOL
IOP1.PASS_RIGHT The Right MP module has no faults. BOOL
IOP1.TMR All three IOPs are operating without any fatal faults. See also BOOL
IOP1.GE_DUAL and IOP1.GE_SINGLE.

Chapter 7 System Attributes


316 Description of System Attributes

I/O String Status


The IOP1.IO_ attributes in the following table provide information about:
• Safety status of the I/O string governed by IOP1
• Health status of the field power and logic power for the I/O string governed
by IOP1

Note In Trident V1.0 systems, IOP1 is physically part of the MP module.

Attribute Name Description Data


Type
IOP1.IO_FLD_PWR1_OK Field Power 1 is OK for every module in the I/O string. BOOL
IOP1.IO_FLD_PWR2_OK Field Power 2 is OK for every module in the I/O string. BOOL
IOP1.IO_GE_DUAL Every module on the I/O string is supported by at least two BOOL
channels. See also IOP1.IO_GE_SINGLE and
IOP1.IO_TMR.
IOP1.IO_GE_SINGLE Every module on the I/O string is supported by at least one BOOL
channel. See also IOP1.IO_GE_DUAL and IOP1.IO_TMR.
IOP1.IO_LOGIC_PWR1_OK Logic Power 1 is OK for every module in the I/O string. BOOL
IOP1.IO_LOGIC_PWR2_OK Logic Power 2 is OK for every module in the I/O string. BOOL
IOP1.IO_NO_ACTIVE_FLTS None of the active modules on the I/O string requires operator BOOL
intervention.
IOP1.IO_NO_FLD_FLTS No field faults have been detected on the I/O string. Field faults BOOL
do not include field power faults.
IOP1.IO_NO_FLTS None of the modules on the I/O string requires operator BOOL
intervention.
IOP1.IO_NO_VOTER_FLTS No voter faults have been detected on the I/O string. BOOL
IOP1.IO_TMR Every point on the I/O string is supported by three channels. See BOOL
also IOP1.IO_GE_DUAL and IOP1.IO_SINGLE.

TriStation 1131 Developer’s Guide


Description of System Attributes 317

I/O Module Status


For each I/O module installed in the Trident system, TriStation provides the status
attributes listed in the following table. These attributes supply information about
the health and safety status of the installed modules. The module names are
presented in this format:
<Module Type/Model No.>_<IOP No.>_<Slot No.>.<Attribute Name>
A sample module attribute name is DO3401_01_01.ACTIVE_LEFT.

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.

<Module Name>.GE_SINGLE Every point on the module is supported by at least BOOL


one channel. See also <Module Name>.GE_DUAL
and <Module Name>.TMR.
<Module Name>.INSTALLED_LEFT The left module is plugged into the baseplate. BOOL
<Module Name>.INSTALLED_RIGHT The right module is plugged into the baseplate. BOOL
<Module Name>.LOCKED_LEFT The left module is locked into position on the BOOL
baseplate.
<Module Name>.LOCKED_RIGHT The right module is locked into position on the BOOL
baseplate.
<Module Name>.LOGIC_PWR1_OK Logic Power 1 is OK. BOOL
<Module Name>.LOGIC_PWR2_OK Logic Power 2 is OK. BOOL
<Module Name>.NO_ACTIVE_FLTS The module is active and operator intervention is BOOL
not required.
<Module Name>.NO_FLD_ALARM_LEFT There are no field faults, and no field power faults BOOL
on the left module in this baseplate. The module’s
field alarm indicator is off.

Chapter 7 System Attributes


318 Description of System Attributes

Attribute Name Description Data


Type
<Module Name>.NO_FLD_ALARM_RIGHT There are no field faults, and no field power faults BOOL
on the right module in this baseplate. The
module’s field alarm indicator is off.
<Module Name>.NO_FLD_FLTS No field faults have been detected on the active BOOL
module. Field faults do not include power faults.
<Module Name>.NO_FLTS None of the modules on this baseplate requires BOOL
operator intervention.
<Module Name>.NO_VOTER_FLTS No voter faults have been detected on the active BOOL
module or on the spare module, the last time it was
active.
<Module Name>.PASS_LEFT The left module has only minor faults or no faults BOOL
at all.
<Module Name>.PASS_RIGHT The right module has only minor faults or no BOOL
faults at all.
<Module Name>.TMR Every point on the module is supported by three BOOL
channels. See also <Module Name>.GE_DUAL and
<Module Name>.GE_SINGLE.

TriStation 1131 Developer’s Guide


Description of System Attributes 319

DO Points—Diagnostic Status and Control


For DO points, TriStation provides the Output Voter Diagnostic (OVD) status and
control attributes listed in the following table. The point attribute names are
presented in this format:
<User-assigned Tagname>.<Point Attribute Name>
A sample point attribute name is DO_PT_07.SET_OVD_OFF.
For examples of using point attributes in an application, see “Disabling and
Monitoring OVD” on page 296 and “Monitoring OVD Status” on page 322.

Attribute Name Description Status Control Data


Type
<Tagname>.OVD_RUNNING OVD is running on point nn. ✓ BOOL

<Tagname>.FLD_OK The actual state of point nn is the same ✓ BOOL


as its commanded state, and the point
can be changed to the opposite state.
<Tagname>.SET_OVD_OFF To turn off OVD for point nn, your ✓ BOOL
application must set this attribute to
True (1).
To turn on OVD for point nn, your
application must set this attribute to
False (0).

Chapter 7 System Attributes


320 Description of System Attributes

AO Points—Field Fault Status


For each AO point, TriStation provides a status attribute that reports the presence
or absence of a field fault. If Trident diagnostics detect an open output on an AO
point, TriStation sets the status attribute for this point to zero. Otherwise TriStation
sets the attribute to one.
The name of a field fault status attribute is presented in this format:
<User-assigned Tagname>.<Point Attribute Name>
A sample name for a field fault status attribute is AO_PT_03.FLD_OK.

Attribute Name Description Data


Type
<Tagname>.FLD_OK Field fault status is OK BOOL

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

TriStation 1131 Developer’s Guide


Using SYS_ Function Blocks 321

Using SYS_ Function Blocks


The SYS_ function blocks allow you to access multiple status bits for every
module in your Trident system. Use these function blocks by connecting program
variables to their parameters, which provide the same information as individual
status attributes in the Configuration editor.
For brief descriptions of the available SYS_ function blocks, open the Select
Element dialog box in the FBD or LD editor and type SYS:

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

Chapter 7 System Attributes


322 Using SYS_ Function Blocks

Monitoring OVD Status


This section shows how to monitor the OVD status of points on a DO module by
using the SYS_DO16_STATUS function block in conjunction with the
UNPACK16 function block. The TdSysAtr.pt2 project on the TriStation CD is
used as an example.

▼ To monitor the OVD status of DO points during program execution:


1 In the TdSysAtr.pt2 project on the TriStation CD, use the Project Directory
to open the ExSysAttr program if it is not already open.
2 Observe the network that uses the UNPACK16 function block to unpack the
OVD_RUNNING_01_16 parameter of the SYS_DO16_STATUS function
block to supply the OVD status for eight DO points:

Sample Network
that Monitors OVD
Status

TriStation 1131 Developer’s Guide


CHAPTER 8

Control Panels

This chapter discusses the following topics:


“Control Tools” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
“Using a Control Panel” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
“Downloading an Application” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
“Disabling Points” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
“Controlling the Operational Modes” . . . . . . . . . . . . . . . . . . . . . . . 366

TriStation 1131 Developer’s Guide


324 Control Tools

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.

For A Selected Element


For a selected element, TriStation displays commands that apply to that element,
as shown in this example (below left) for a variable:

For Any Empty Area


If you press the right mouse button from any empty area, the pop-up menu displays
a different set of commands as shown above right. The first command, called
Select Arrow Key, is useful when you are in the middle of an operation but decide
not to complete the operation. At such a time, you can press the right mouse button
and choose Select Arrow Key to terminate the unwanted operation and return the
cursor to the arrow key.

TriStation 1131 Developer’s Guide


Control Tools 325

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.

▼ Take these steps to re-arrange multiple elements:


1 Select all of the elements you want to re-arrange.
2 Rest the cursor on the reference element for the size or alignment operation you
are planning to perform.
3 Press the right mouse button to display the pop-up menu.
4 Select the size or alignment operation from the Size/Alignment sub-menu.

Menu Commands and Toolbar


The main menu of a control panel appears above the toolbars, as shown below. The
diagram on the following page shows the commands that are accessible from the
main menu. The tables that follow the diagram describe these commands and show
their corresponding toolbar buttons.

For menu commands and toolbar buttons that are common to all TriStation views,
see “Basic Editing Tools” on page 17.

Chapter 8 Control Panels


326 Control Tools

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.”

Menus & Commands of Trident Configuration Editor


(grayed-out commands are common to all TriStation 1131 views)

File Edit TRIDENT Project Element

New Project... Undo Edit Configuration Directory... Save Configuration


Open Project... Redo Build Configuration Description... Description...
Save Project... Edit Session Journal Rebuild Configuration Security... Comment Macros...
Save As... Cut Compile All Project Elements History... Build
Close Project Copy Emulator Control Panel Project Options... Intermediate Code
Backup Project Paste Trident Control Panel TriStation 1131 Options...
Restore Project Find Trident Diagnostic Panel
1 <previously opened project> Import Trident Points View Download History...
2 <previously opened project> Export Trident Points Change State to Download All
Print...
Print Preview...
Print Reports...
Print Setup...
Exit

Tree View Commands Tools Window Help

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>

TriStation 1131 Developer’s Guide


Control Tools 327

Table of Control Tools


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 control panel
and places them on the clipboard, erasing the previous
contents.
Copy Copies selected items from the current control panel and
places them on the clipboard, erasing the previous contents.
Paste Pastes the current contents of the clipboard into the selected
element.
Find Finds specific text within the logic elements of the current
control panel.

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.

Chapter 8 Control Panels


328 Control Tools

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.

TriStation 1131 Developer’s Guide


Control Tools 329

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.

Pause Pauses execution of the application in the Emulator or


the Trident system after completion of the current scan.

Halt Halts execution of the application that is currently


running in the Emulator or Trident and re-initializes
variables to their first-scan state.

Chapter 8 Control Panels


330 Control Tools

Commands Menu (continued)


Command Description
Set Scan Time For a downloaded application, this command allows
you to reset the scan time in units of milliseconds. Upon
downloading, the Trident system determines the
minimum and maximum allowable scan times for your
application and displays these limits in the Set Scan
Time dialog box. Within these limits, you may reset the
scan time as needed.
Before downloading again, use the MP’s Properties
dialog box under the Hardware Allocation branch of
the Configuration editor to enter the desired scan time
(see “Scan Time (ms)” on page 215).

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).

TriStation 1131 Developer’s Guide


Control Tools 331

Sheets Menu (continued)


Command Description
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.

Chapter 8 Control Panels


332 Using a Control Panel

Using a Control Panel


TriStation provides two control panels for testing and monitoring your project:
• 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 main
purposes differ:
• The main purpose of the Emulator Control Panel is off-line testing of an
application.
• The main purpose of the Trident Control Panel is on-line monitoring of live
data as a project executes in the Trident.
The sections that follow explain how to set up a control panel and use for it testing
or monitoring:
• Setting up a monitor sheet
• Setting values for testing
• Using the program instance monitor
• Sample steps for setup and use
• Testing with Trident Emulator Client

Setting Up a Monitor Sheet


The first time you enter a control panel, TriStation displays a blank split window
that will support a tree structure in the left pane and a monitor sheet in the right
pane. After you connect and download your application to the Emulator or the
Trident, the tree lists the variables and function blocks for all program instances in
your configuration.
Set up the control panel for monitoring by dragging the desired variables from the
tree to the monitor sheet and arranging them in the order you prefer. You can select
multiple variables from the tree or on the monitor sheet by holding down the SHIFT
key or CTRL key as you make the selections. For function blocks, you can drag each
parameter to the monitor sheet separately, if desired.
For long programs, you can define multiple monitor sheets using Append Sheet,
Insert Sheet and other commands in the Sheets menu.

TriStation 1131 Developer’s Guide


Using a Control Panel 333

Setting Values for Testing

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:

Chapter 8 Control Panels


334 Using a Control Panel

Enlarging Your View of Elements


There are two ways to enlarge your view of selected elements in the monitor sheet
of the Emulator or Trident Control Panel. One way is to use the Zoom button on
the toolbar or Zoom command on the View menu to select a percentage of
enlargement.
A quicker way to change the Zoom is to double-click the left mouse button on an
empty area to see a “Zoom Selection” view. This is a full view of the monitor sheet
with the contents of the current view area highlighted in a rectangle. You can move
the current view rectangle by clicking the left mouse button in a different area of
the drawing sheet or by drawing a new view rectangle, holding down the left mouse
button while drawing.

Zoom Selection
View

Current
View Rectangle

TriStation 1131 Developer’s Guide


Using a Control Panel 335

Using the Program Instance Monitor


When you invoke a program instance from a control panel, you can monitor the
actual values of annotated variables in the logic during execution. If the variables
are annotated for monitoring, you can set values and disable/enable points in the
instance monitor just as you can from a control panel. See the upcoming section
called “Annotating Variables for Monitoring” on page 338 for details.
To use the instance monitor, select a program instance name from the tree in the
control panel, then select the Instance View command or tool. The control panel
then displays an instance view of the program logic, with the variable annotations
expanded as shown in the FBD example below.

Chapter 8 Control Panels


336 Using a Control Panel

Execution Flow in an FBD Program Instance

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.

▼ To view the execution flow in an FBD program:


1 Open the Trident or Emulator Control Panel and download your application.
2 Select the desired program instance from the tree in the left view.
3 Select the Instance View command or tool.
As shown in the FBD instance view below, the execution flow will display:
• Red (or a customized True color) for energized BOOL variables
• Green (or a customized False color) for de-energized BOOL variables

Execution Flow in False value


in green
FDB Program

True value
in red

TriStation 1131 Developer’s Guide


Using a Control Panel 337

Power Flow in an LD Program Instance


When you use the Instance View command or tool to display an instance view of
an LD program, the Control Panel uses red to indicate the power-on state and green
to indicate the power-off state, as shown in this example:

Power Flow in an
LD Program
Red for
Power-on

Green for
Power-off

Chapter 8 Control Panels


338 Using a Control Panel

Annotating Variables for Monitoring


Variables must be annotated for monitoring before you can change values and
disable or enable points from the Instance Monitor. To annotate a variable for
monitoring, follow these steps:
1 Open your program in the FBD or LD editor.
2 Double-click on a variable in your logic to bring up the Properties dialog box.
3 Select the Annotate option on the Selected tab:

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.

TriStation 1131 Developer’s Guide


Using a Control Panel 339

Sample Steps for Set-Up and Use


After you have corrected any errors in your program logic and configuration and
completed a successful Build, it is time to test the configuration using the Emulator
Control Panel. In general, you should only use the Trident Control Panel after all
testing is complete.
The sample steps in this section are based on the AIR_DAMPER_1 instance of the
AIR_DAMPER program in the FURNACE project, as shown in the illustration
below. Although the Emulator Control Panel is used as an example here, the basic
steps apply to the Trident Control Panel as well. Only the steps for physically
connecting to the Trident controller are missing. Refer to the upcoming section
called “Download All” on page 344 for that information.

▼ 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.)

Chapter 8 Control Panels


340 Using a Control Panel

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.

TriStation 1131 Developer’s Guide


Using a Control Panel 341

Using the Trident Emulator Client


The Trident Emulator Client is a standalone utility that lets you read and write
aliased data to the Trident Emulator, and verify that the Emulator’s DDE interface
is working properly. Enter the alias numbers and values for the desired variables in
the Trident DDE dialog box (shown below), then use the commands as follows:

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.

Parameters for DDE Clients


You can also use full-featured DDE clients (such as Microsoft Excel) to
communicate with the Emulator for test purposes.The correct DDE client
parameters are shown above: Application is TRDEMCODEEMULATOR; Topic is
COMMAND; and Items are alias numbers. If your DDE client is not working
properly, you can use the Trident Emulator Client to help with debugging.

Chapter 8 Control Panels


342 Downloading an Application

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

TriStation 1131 Developer’s Guide


Downloading an Application 343

Checking for Correct Installation


Before you download an application to the Trident system, you can run the
TriStation Install Check program to verify that TriStation is correctly installed on
your PC and no associated files are corrupted. This is especially helpful if you have
installed other applications on your PC besides TriStation.

▼ To verify the correct installation of TriStation on your PC:


1 Double-click the TS1131 Install Check program in the Triconex folder on
your hard drive.
This standalone program was installed on your hard drive along with TriStation.
2 Click the Run button to run the program.
3 Click the Display Details button for more information, as shown below:

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.

Chapter 8 Control Panels


344 Downloading an Application

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.

TriStation 1131 Developer’s Guide


Downloading an Application 345

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.

13 Select the Run command to begin execution in the Trident.


14 The application is now in a Download Change state, which means that the next
likely type of download is a Download Change. For more information, see
“Download States” on page 355.

Chapter 8 Control Panels


346 Downloading an Application

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.

TriStation 1131 Developer’s Guide


Downloading an Application 347

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.

Chapter 8 Control Panels


348 Downloading an Application

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.

TriStation 1131 Developer’s Guide


Downloading an Application 349

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.

Chapter 8 Control Panels


350 Downloading an Application

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.

Allowable Changes for Download Change


Element Comments
LOGIC ELEMENTS:
Programs Programs can be added and modified, unless the program size increases to a point
where a Download Change is no longer possible.
Programs cannot be deleted unless their instances are deleted first.
Variables The Name, Data Type, Var Type, Description and Initial Value parameters of
variables can be changed.

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.

TriStation 1131 Developer’s Guide


Downloading an Application 351

Allowable Changes for Download Change


Element Comments
Modules Modules can be added, but cannot be deleted or moved to other slots, unless you do a
Download All.
Module Types Not supported. Modules which are configurable using TriStation are not yet supported.
Examples are thermocouple types and short-circuit detection.
Module Setup Some of the operating parameters for the Main Processors can be changed—see
Operating Parameters below. Setup for other modules is not supported yet.
OPERATING PARAMETERS:
Network Node Not supported.
Scan Time (ms) The scan time of the Trident system can be changed.
Password Required The option to require a password for connection to the Trident system can be changed.
for Connection
Restart on The option to restart TriStation upon power-up of the TriStation PC can be changed.
Power-up
Disable Remote The option to disable changes by external devices to aliased Trident I/O points can be
Changes changed.
Allow Disabling Not allowed. Requires a Download All.
of Points
Use Local Time The option to use local time as the Trident system time can be changed.

Chapter 8 Control Panels


352 Downloading an Application

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

TriStation 1131 Developer’s Guide


Downloading an Application 353

Addition of Functions & Effect on Scan Time


If a Download Change is going to include new functions and function blocks (such
as process control functions, math functions and print statements), first you should
make sure that the Scan Surplus for your application is positive. In general, the
Scan Surplus should always be at least 10% of the Minimum Scan Time.

! 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.

Changing Memory Variable Types


If you change a Memory variable type (for example, BOOL to DINT or DINT to
REAL) and then do a Download Change, the changed variable will not have the
same value as it had before the Download Change. This is because the changed
variable then occupies a different memory location in the Trident. The same is true
if you change an Aliased Memory variable to a non-aliased memory variable and
vice-versa.

! 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.

Enabling Disabled Points


In general, it is permissible to use the Download Change command when some of
your I/O point (Tagname) variables are disabled. However, you must enable the
variables before doing a Download Change for the following types of changes:
• Changing the alias number of the variable
• Deleting the variable’s tagname from its Trident Points view
• Disconnecting the variable from an Input or Output point

Chapter 8 Control Panels


354 Downloading an Application

Saving Application after Downloading


When you attempt a Download Change or Download All, TriStation prompts you
to back up your application with a .BT2 file before completing the download. It is
critically important to make this backup file, which you should then copy to a CD
or other storage medium. The Backup Project command on the File menu is also
available for making .BT2 backup files at any time.

Controlling & Changing an Existing Application


All changes to an application should be controlled by your company’s change
control board or the equivalent and should comply with strict control procedures.
The following is a typical control procedure:
1 Generate a change request defining all changes to the application and reasons
for the changes, then obtain approval for the changes from the board.
2 Develop a specification for changes including a test specification, then obtain
approval for the specification from the change control board.
3 Make the appropriate changes to the application including those related to
design, operation and/or maintenance documentation.
4 Use the Upload and Verify command in the Trident Control Panel to verify the
configuration in the Trident matches the last downloaded configuration. For
details, see the section called “Upload and Verify” on page 356.
5 Print the Configuration Differences report from the Configuration editor to
compare your current configuration with the one that was last downloaded to the
Trident. For details, see “Compare to Last Download” on page 272.
6 Print all logic elements and thoroughly check all of the changed networks within
each element to make certain the changes do not affect other sections of the
application.
7 Use the Emulator Control Panel to test the changes for proper operation as
documented in the test specification, then write a test report.
8 Review and audit all changes and the test results with the change control board.
9 When approved by the change control board, download the changes to the
Trident controller.
10 Save the downloaded application in TriStation and back up the appropriate files
on a CD or other medium.
11 Archive two copies of the application’s project file and all associated
documentation.

TriStation 1131 Developer’s Guide


Downloading an Application 355

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.

Using the Change


State to Download
All Command

! 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.

Chapter 8 Control Panels


356 Downloading an Application

Upload and Verify


To use the Upload and Verify command from the Trident Control Panel, first you
must use the Connect command to connect your application to the Trident system
where it was previously downloaded. Then TriStation can make an on-line
comparison of the configuration running in the Trident to a snapshot of the last
downloaded configuration.

Note To make an off-line comparison of the current project to the last


downloaded configuration, see page 272.

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.

Upload and Verify


Dialog Box

TriStation 1131 Developer’s Guide


Downloading an Application 357

Details Display
In the following three tabs of the Upload and Verify dialog box, click the Details
button to display additional information:

Tab Name Details About


Modules Slot numbers and module names
Elements Changes to project elements: programs, functions, function blocks,
standard libraries and user-written libraries
Instances Current list of instances and Last Downloaded list of instances

In each Detail for <instance number> dialog box, compare the columns that are
displayed to see if there are any differences.

Note Using Compare to Last Download feature in the Configuration editor


supplies additional details about system parameters and Trident point information.
See page 272for more information.

Configuration Differences Report


From any tab in the Upload and Verify dialog box, you can click the Print button
to see a print preview of the Configuration Differences Report. There should be
no differences between the PROJECT-Last downloaded versus the Trident-
Last downloaded.

Chapter 8 Control Panels


358 Downloading an Application

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

TriStation 1131 Developer’s Guide


Downloading an Application 359

Version Numbering of Projects


The version number of a TriStation project is in this form:
<major version number>.<minor version number>
The following are examples of project version numbers:
Version 1.0
Version 2.2
Version 13.14
TriStation automatically updates the version number if you make changes to the
project that require a Download Change or Download All. Changes that require a
Download All will update the major version number (for example, 3.1 to 4.0).
Changes that require a Download Change will update the minor version number
(for example, 3.5 to 3.6).
The version number of a project provides feedback as to what type of downloading
is needed. For example, if the current project downloaded to the Trident is Version
1.1, and the current project in TriStation is Version 2.0, you must do a Download
All. If the project in the Trident is Version 3.1, and the project in TriStation is
Version 3.2, doing a Download Change is sufficient. If the project in the Trident is
Version 3.2, and the project in TriStation is Version 3.2, no downloading is
necessary.

Example of Version Number Changes


The following example shows how the version number of a project can change.
Version numbers are always incremented, never decremented.
After the first Download All, the version number is:
1.0
If you edit the project, TriStation changes the version number to:
1.1
If you do a Download Change, the version number remains:
1.1
If you edit the project, TriStation changes the version number to:
1.2

Chapter 8 Control Panels


360 Downloading an Application

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

Downloaded Elements and Their Attributes


Three types of elements are downloaded to the Trident with each project, as shown
in the Download History example that follows:
• Programs, functions and function blocks
• Elements from the Standard Library or other libraries
• TriStation internal functions (each begins with an underscore character)

TriStation internal function


Download icon (option lets you choose whether to display)

Standard Library function

Program, function or function block

TriStation 1131 Developer’s Guide


Downloading an Application 361

For each downloaded element, TriStation provides the following categories of


information:

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

Version Numbering of Downloaded Elements


A downloaded element always has a major version number of 1 (one) and is
displayed in this form:
1.<minor version number>
The following are examples of element version numbers:
Version 1.0
Version 1.7
Version 1.13
TriStation automatically updates the minor version number of an element once per
editing session, whether you make one minor change or several major changes. The
major version number of an element is never incremented.

Chapter 8 Control Panels


362 Disabling Points

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.

Disabling Selected Points

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

TriStation 1131 Developer’s Guide


Disabling Points 363

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:

Chapter 8 Control Panels


364 Disabling Points

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.

Listing All Disabled Points


After you have disabled a number of Trident points, you can use the List Disabled
Points command to display a list of all disabled points in your Trident Control
Panel, as shown in the example below. The list includes sortable columns for the
Variable Name, Tag Name, Location and Modbus Alias (if any) of each point. To
enable multiple points at once, select the disabled points from the list and click OK.

TriStation 1131 Developer’s Guide


Disabling Points 365

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.

Chapter 8 Control Panels


366 Controlling the Operational Modes

Controlling the Operational Modes


The Trident system has four main operational modes which are tracked by the
Mode status indicators on the front panels of the Main Processor modules. This
section briefly describes the modes and explains how to control them using the
Trident Control Panel and your TriStation program. The section also provides
programming recommendations for the blue Program Alarm indicator on each
Main Processor.

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.

TriStation 1131 Developer’s Guide


Controlling the Operational Modes 367

Options for Controlling the Modes


The Trident Control Panel provides commands for controlling the operational
modes, or you can use the MP.SET_ control attributes in your TriStation program.
For more information about the control attributes, see page 368.

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:

Select Enable Programming... if you want to:


• Do Download Changes
• Change the values of variables
• Change the operating parameters such as scan time
• Change the operational mode from the Control Panel
Select Disable Programming... if you only need to observe the
execution of your application.
Connect the MP.SET_APP_LOCK control attribute to a program
output which turns on to lock out programming changes.
REMOTE Connect the MP.SET_REMOTE_WRT_ENBL control attribute to a
program output which turns on to allow writes by external (remote)
devices that use the supported protocols. By default, writes by external
devices are not allowed. Using MP.SET_REMOTE_WRT_ENBL is
the primary method for regulating writes to Trident points. For more
information, see page 372.
RUN In the Trident Control Panel, select the Run button on the toolbar or the
Run command on the Commands menu to run (execute) the application
if it is not already running.

Chapter 8 Control Panels


368 Controlling the Operational Modes

Using the MP Control Attributes


The following table explains how to use the MP.SET_ control attributes in your
TriStation program to control the operational modes.

Attribute Name How to Use


MP.SET_APP_HALT To halt execution upon completion of the current
scan, your application must set this attribute to
True (1).
MP.SET_APP_LOCK To lock out application changes, your application
must set this attribute to True (1). Application
changes include Download All, Download Change
and operational commands from the Trident
Control Panel.

! 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.

MP.SET_PROG_ALARM_ON To set the Programmable Alarm, your application


must set this attribute to True (1). When the Pro-
grammable Alarm is set, blue indicators are illumi-
nated on the MP modules.
To clear the Programmable Alarm, your applica-
tion must set this attribute to False (0).
MP.SET_REMOTE_WRT_ENBL To enable external device writes to Trident points,
your application must set this attribute to True (1).
To disable external device writes to Trident points,
your application must set this attribute to False (0).

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.

TriStation 1131 Developer’s Guide


Controlling the Operational Modes 369

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.

The output variable called “ProgHaltOut” is connected to MP.SET_APP_HALT


using the Trident Configuration editor, as shown below.

Chapter 8 Control Panels


370 Controlling the Operational Modes

Enabling and Disabling Remote Writes


Setting the MP.SET_REMOTE_WRT_ENBL control attribute to True or False
is the primary method for regulating writes to Trident points by external (remote)
devices. In your TriStation program, you must set up the conditions for allowing
remote access, then connect an appropriate output variable to MP.SET_
REMOTE_WRT_ENBL using the Trident Configuration editor. When the
program sets this output variable to True, TriStation allows general write access to
Trident points. When the program sets this output variable to False, TriStation
prevents general write access to Trident points. For more information, see
“Overview of Write Controls” on page 372.

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:

The output variable called “RemoteAccessOut” must be connected to the


MP.SET_REMOTE_WRT_ENBL control attribute using the Trident
Configuration editor. For instructions, see “Connecting Program Instance
Variables to System Attributes” on page 208 and “Methods of Access” on
page 289.

TriStation 1131 Developer’s Guide


Controlling the Operational Modes 371

Activating the Program Alarm


Each Main Processor in a Trident system provides a System Alarm indicator and
a Program Alarm indicator that respectively track:
• Alarm conditions identified by the Trident operating system
• Alarm conditions identified by program logic in TriStation
When either the System Alarm or the Program Alarm is on, the alarm relays on the
Main Processor’s front panel are activated. You must connect alarm devices to the
relays to set up the desired alarm functionality for your application. See the Trident
Planning & Installation Guide for instructions.
Your program logic can activate the Program Alarm if you connect appropriate
output variables to the MP.SET_PROG_ALARM_ON control attribute. When the
program detects conditions that set this attribute to True, then the alarm relays are
activated and the blue Program Alarm indicators on the Main Processors’ front
panels are illuminated. For example, you can use MP.SET_PROG_ALARM_ON
to activate the alarm relays when:
• It’s time for routine maintenance
• Input bypass switches are enabled
• An unsafe temperature or pressure condition is detected

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.

The output variable called “ProgAlarmOut” must be connected to the


MP.SET_PROG_ALARM_ON control attribute using the Trident Configuration
editor. For instructions, see “Connecting Program Instance Variables to System
Attributes” on page 208 and “Methods of Access” on page 289.

Chapter 8 Control Panels


372 Controlling the Operational Modes

Overview of Write Controls


External devices which use supported protocols can write to memory and output
points if you set controls in the TriStation configuration and program logic.
External devices cannot write to input points but can read input, memory, and
output points.
A TriStation application can allow general write access while protecting specific
points from write access through configuration settings. The following table
identifies the write access controls.

Desired Action What Controls Must Be Set


Allow General Write An output point must be connected to the control attribute
Access MP.SET_REMOTE_WRT_ENBL. When the TriStation
application turns on the point and attribute, the Remote Mode
indicators on the Main Processors are lit and general write
access is allowed.
Some points can be protected from write access even if
general write access is allowed. See other controls in this
table.
Applies to TSAA (client/server) writes and Modbus writes.
Protect All Output The Disable Remote Changes to Outputs setting must be
Points from Writes checked (on the Operating Parameters tab on the MP
Configurations dialog box). The default setting is checked.
If checked, external devices cannot write to any output points
no matter what other write access controls are used.
Applies to TSAA (client/server) writes and Modbus writes.
Protect All Points The Privilege for each Open Network port on the CM must be
from Open Network set to Read. (This setting is on the Network tab of the CM
Writes Configuration dialog box.) The default setting is Read.
If set to Read-Only, an external device connected to an Open
Network port on the CM cannot write to any points no matter
what other write access controls are used. For details, see
“NET1 and NET2 Configuration Options” on page 224.
Applies to TSAA (client/server) writes only.

TriStation 1131 Developer’s Guide


CHAPTER 9

Trident Diagnostic Panel

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

TriStation 1131 Developer’s Guide


374 Diagnostic Tools

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.

Menu Commands and Toolbar


The main menu of the Diagnostic Panel appears above the toolbars, as shown
below. The diagram on the following page shows the commands that are accessible
from the main menu. The tables that follow the diagram describe these commands
and show their corresponding toolbar buttons.

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.”

TriStation 1131 Developer’s Guide


Diagnostic Tools 375

Menus & Commands of the Diagnostic Panel


(grayed-out commands are common to all TriStation 1131 views)

File Project TRIDENT Tree

New Project... Expand One Level


Directory... Edit Configuration
Open Project... Expand Branch
Description... Build Configuration
Save Project... Expand All
Security... Rebuild Configuration
Save As... Collapse Branch
History... Compile All Project Elements
Close Project Project Options... Emulator Control Panel
Backup Project TriStation 1131 Options... Trident Control Panel
Restore Project Trident Diagnostic Panel
1 <previously opened project> View Download History...
2 <previously opened project> Change State to Download All
Print...
Print Preview...
Print Reports...
Print Setup...
Exit

Commands Window Help

Connect New Window TriStation 1131 Help


Disconnect Cascade Tip of the Day
Clear Faults on All Modules Tile Horizontal Keyboard Shortcuts
Display Firmware Versions Tile Vertical Sample Projects
Collect System Events Close All Technical Support
Refresh Panel Arrange Icons About TriStation 1131...
Continuous Refresh Show Properties Box TriStation 1131 Logo...
Show Message Bar
(Vertical Message Bar)
(Horizontal Message Bar)
Hide Message Bar
1 PROGRAM: <program name>

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.

Chapter 9 Trident Diagnostic Panel


376 Diagnostic Tools

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.

TriStation 1131 Developer’s Guide


Overview with Typical Steps 377

Overview with Typical Steps


The Diagnostic Panel provides the following views of your Trident system:
• The System Overview view which displays:
– The alarm status of all IOPs in the system
– Fields that give information about system performance and the current
TriStation project
• Module status views which display the fault status of all modules in an IOP.
• A Properties dialog box which lists Current Faults or the Fault History
for each module in the selected slot. This Properties box includes the
following tabs:
– Left Module
– Middle Module (for Main Processors only)
– Right Module
– Legend
Upcoming sections describe these components and their contents in greater detail.

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:

Chapter 9 Trident Diagnostic Panel


378 Overview with Typical Steps

6 Enter the password, if it is requested. A password is requested here if one was


entered as an MP operating parameter.
If you do not know the password, click the Ignore button instead. You can still
connect to the Trident, but the following commands will be disabled:
• Clear Faults on All Modules
• Collect System Events
7 Upon connecting to the Trident, the Diagnostic Panel displays an icon for each
IOP in the system which states whether the system alarm is on or off, as shown
below:

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).

TriStation 1131 Developer’s Guide


Overview with Typical Steps 379

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.

Chapter 9 Trident Diagnostic Panel


380 System Overview

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.

Using Continuous Refresh


When you are monitoring a Trident system, it helps to continuously display the
System Overview view. If you turn on the checkmark for the Continuous Refresh
command on the Commands menu, the alarm status of all IOPs is continuously
updated.

TriStation 1131 Developer’s Guide


System Overview 381

Expanding the
Tree to See
Faulting Modules

Chapter 9 Trident Diagnostic Panel


382 Module Status

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

Colors of Slots and Modules


In general, the Diagnostic Panel represents the graphic icons for Trident slots and
modules in gray, though a slot turns blue when you select it. It is obvious when a
module is installed in a slot; and when it is not, the connectors on the baseplate are
visible. When a module has a fault, then its baseplate is surrounded by a red frame.
All three conditions are shown below:

Empty Slot with


Connectors Showing

Selected Baseplate
Highlighted in Blue

Selected Base-
plate with Empty
Slot and Faulting Red Frame
Module Indicating Fault

Installed Module
Displayed in Gray

TriStation 1131 Developer’s Guide


Module Status 383

The following table describes the colors of Trident modules in the various
conditions that can be displayed by the Diagnostic Panel:

Module Color Description


Red This slot is properly configured in TriStation, but no
module is physically installed.
Yellow The module is physically installed in the slot, but it
is not configured in TriStation.
Gray The module is physically installed in the slot and
configured in TriStation.

The Legend tab of the Properties dialog box also briefly explains the diagnostic
colors for modules, slots and status indicators:

Status Indicators on Modules


The graphic icons for modules in the Diagnostic Panel exactly replicate the
behavior of status indicators on the modules installed in a Trident system. Every
Trident module has at least four basic indicators which behave as follows:
• If a module is physically present in a slot and functioning properly, the Pass
indicator is green and the Active indicator is yellow.
• If the Fault indicator turns red (on), a diagnostic message appears in the
Properties dialog box for the module.

Chapter 9 Trident Diagnostic Panel


384 Module Status

• 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.

TriStation 1131 Developer’s Guide


Fault Identification 385

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

Chapter 9 Trident Diagnostic Panel


386 Fault Identification

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.

TriStation 1131 Developer’s Guide


Fault Identification 387

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.

Note Applications for which TUV certification is intended should follow


TUV guidelines. This includes use of the SYS_SHUTDOWN function block
to program the time period that a system may run in dual mode before
performing a safe shutdown. For more information, see the Safety
Considerations Guide.

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.

Correcting and Clearing Faults


To correct faults, follow the maintenance guidelines in the Trident Planning &
Installation Guide. After you correct the faults for a selected module, you can use
the Clear Faults button to erase the fault listing for that module only. Another
choice is to wait until you have corrected the faults on all modules in the system,
then use the Clear Faults on All Modules command on the Commands menu. An
alternative is to use the MP.CLEAR_FLTS control attribute—see “MP—
TriStation Port Status” on page 307 for more information.

Chapter 9 Trident Diagnostic Panel


388 Diagnostic Monitoring

Diagnostic Monitoring
You can monitor a TriStation project that is running in a Triconex controller using
any existing project or an empty project.

▼ To connect to a controller for diagnostic monitoring:


1 Start TriStation on a PC that is physically connected to the target controller or
to the network to which the target controller is connected.
2 Open an existing project or create a new project.
3 From the Trident menu, select the Trident Diagnostic Panel command.
4 From the Commands menu, select the Connect command or use the Connect
tool on the toolbar.
5 In the Connect To... dialog box, select the following options:
• The Node Name of the Trident system to which you will connect
• Main Processor Module Port
• Left, Middle or Right for the module to which the TriStation PC is
physically connected
6 Assuming that connection to the controller is successful, TriStation displays the
alarm state of the controller as well as performance and project information, as
shown in the following screen:

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.

TriStation 1131 Developer’s Guide


System Performance & Project Information 389

System Performance & Project Information


System performance and project information are available at the top of the
Diagnostic Panel, when you select the System Overview branch of the tree. Each
item of information is described in the table that follows. You can also access this
information by means of the system attributes and SYS_ function blocks—for
more information, see Chapter 7, “System Attributes.”

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]

Chapter 9 Trident Diagnostic Panel


390 System Performance & Project Information

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.

WARNING In addition to the memory required for downloading your executable


elements and configuration, the Trident also needs (uses) memory for the following:
• Modbus conversion information for aliased elements
• Retentive masks for Output points and Memory elements
• Configuration tables, data tables, communication tables, diagnostic tables, etc.

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.

TriStation 1131 Developer’s Guide


Summary of Output Voter Diagnostics (OVD) 391

Summary of Output Voter Diagnostics (OVD)


OVD is a set of tests that detects failures in the output voting mechanism of the DC
voltage Digital Output (DO) Module. This module is specifically designed to
control devices which hold points in one state for long periods of time. OVD
ensures full fault coverage even if the commanded state of the points never
changes.
During program execution, OVD causes the commanded state of each point in the
output circuitry to be momentarily reversed on each of the output drivers, one after
another. Loop-back circuitry on the module allows each microprocessor to read the
output value of the point to determine whether a latent fault exists within the output
circuit.
Triconex guarantees that an OVD glitch (signal reversal) to your attached load lasts
less than 2 milliseconds. To ensure safety, you should analyze the sensitivity of
each load device attached to the Trident system for proper operation. The less-than-
2-millisecond glitch is tolerated well by electromechanical devices, such as relays,
solenoids, and contacts. For assistance with other load devices that might be
sensitive to such glitches, consult a Triconex Field Service Engineer. See the
Trident Planning & Installation Guide for additional details about OVD operation.
If glitches to an attached load are not tolerable, you should disable OVD and
schedule regular maintenance periods to see if the output voter circuitry is working
properly. It is not necessary to cycle the outputs to the ON and OFF states to ensure
complete fault coverage. See the Trident Planning & Installation Guide for more
information about maintenance procedures.

! 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.

Chapter 9 Trident Diagnostic Panel


392 Firmware Version Information

Note A DO module does not continue to run OVD once an OVD fault or
load/fuse error has been found.

Firmware Version Information


With the Display Firmware Versions command on the Commands menu, you
can display the firmware version numbers of all modules in the selected IOP.
Normally you only need to access this information if requested by a Triconex
Technical Support Engineer for diagnostic purposes.
When you select the Display Firmware Versions command, TriStation displays
the available information in the message bar, as shown below. You can print it from
there using the Print... command on the pop-up menu, accessed with the right
mouse button.

TriStation 1131 Developer’s Guide


Collecting System Events 393

Collecting System Events


Collect System Events on the Commands menu allows you to collect historical
diagnostic information about the Trident controller so that faults can be analyzed.
You are not expected to evaluate this information yourself, but should send it to
Triconex for analysis.

▼ Follow these steps to collect system events:


1 Ensure that your project is downloaded and running in the Trident system.
2 Go to the Diagnostic Panel.
3 Select Collect System Events on the Commands menu.
4 Enter a name for the System events file and click Save. (The “.tel” extension is
automatically appended if you do not type it in.)
5 Enter the following contact information in the User Information for System
Events dialog box:
• Company
• Address
• City/State/Zip
• Contact
• Phone
• Comments
Once you enter this data, TriStation remembers it until you change it.
6 Click OK and allow TriStation to collect System events.
A dialog box tells you how many events have been collected.

Note An event log file can store a maximum of 500,000 events.

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.

Chapter 9 Trident Diagnostic Panel


394 Collecting System Events

TriStation 1131 Developer’s Guide


CHAPTER 10

Project Administration

This chapter discusses the following topics:


“Setting Up Security” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
“Element Attributes” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
“Specifying Project Options” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
“TriStation Options” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
“Viewing the Project History” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

TriStation 1131 Developer’s Guide


396 Setting Up Security

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.

TriStation 1131 Developer’s Guide


Setting Up Security 397

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:

Chapter 10 Project Administration


398 Setting Up Security

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.

TriStation 1131 Developer’s Guide


Setting Up Security 399

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.

Chapter 10 Project Administration


400 Setting Up Security

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.

TriStation 1131 Developer’s Guide


Setting Up Security 401

TriStation 1131 Operations


The following table describes the TriStation 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
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.

Chapter 10 Project Administration


402 Setting Up Security

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.

TriStation 1131 Developer’s Guide


Element Attributes 403

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.

Chapter 10 Project Administration


404 Element Attributes

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.

TriStation 1131 Developer’s Guide


Specifying Project Options 405

Specifying Project Options


When you create a new project, TriStation’s default options apply until you change
them. You can change defaults when you begin a new project or at any time during
project development. Select Project Options from the Project menu to access the
Project Options dialog box where you can change the options for Language,
Variable Annotation, and Communications.

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

Chapter 10 Project Administration


406 Specifying Project Options

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

TriStation 1131 Developer’s Guide


Specifying Project Options 407

The Annotation on by default option causes variable annotation boxes to appear


automatically every time you place a variable on the logic sheet for a program or
function block. The Monitor value on by default option displays the value of each
variable during execution in the upper left corner of the annotation box.
For descriptions of the other sub-dialog boxes in the Variable Annotations tab,
see the section called “Using Variable Annotation” in Chapter 2, “Function Block
Diagram (FBD).”

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.

Chapter 10 Project Administration


408 Specifying Project Options

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.

Trident Node Definitions


This option is used in conjunction with the default connection. The default node
names, called TRINODEs, and their associated definitions are usually sufficient if
you are connecting TriStation to an MP port. If you are using an Ethernet port on
the CM for your TriStation connection, you might need to modify the TCP/IP
address of a Trident Node Definition. For complete instructions, see the Trident
Communication Guide.

TriStation 1131 Developer’s Guide


Specifying Project Options 409

▼ To modify a Trident Node Definition:


1 From the Project menu, select the Project Options command, then select the
Communication tab on the Project Options dialog box.
2 Select a default address from the Trident Node Definitions list, such as
TRINODE07=192.168.1.7.7,0,A then click Modify.
3 In the Trident Node Definitions dialog box (shown below), enter the following
information:
• The desired Node Name
• The Node Number that matches the address plug on the MP baseplate
• The TCP/IP Address if the TriStation PC is connected to a port on the
Communication Module Baseplate
• The Network Adapter number for the Ethernet card in your TriStation
PC
• For Port, click Left, Middle or Right if the TriStation PC is connected
to a port on the Main Processor Baseplate
4 Repeat Steps 2 and 3 for each node you want to modify.

Chapter 10 Project Administration


410 TriStation Options

Debug Message Options


The Debug Message Options are intended for use by Triconex Customer
Satisfaction Engineers when they analyze a communication problem:
• Messages Sent and Received
• Message Detail
• State Changes
• Errors
• Information

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:

TriStation 1131 Developer’s Guide


TriStation Options 411

Project Files (*.PT2)C:\Program Files\Triconex\TS1131\Projects


Shared Libraries (*.LT2)C:\Program Files\Triconex\TS1131\UserLibs
Report Template (*RPT)C:\Program Files\Triconex\TS1131\UserRpts

Using the Message Bar


During a build or download operation for each element of your project, TriStation
displays informative messages in a message bar which has user-selectable
attributes. You can display the message bar horizontally at the bottom of your
screen (shown on the next page) or vertically on the side of the screen, and adjust
the position of the message bar’s tabs.
If you double-click any error message or select Jump to Source in the message
bar’s pop-up menu, TriStation highlights the error source as shown in this example:

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).

Chapter 10 Project Administration


412 TriStation Options

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.

▼ To change a color, follow these steps:


1 Select the desired item either by clicking on it in the graphic display or selecting
it from the Drawing Item drop-down list, as shown below:

TriStation 1131 Developer’s Guide


TriStation Options 413

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:

5 Make the desired adjustments to the Hue, Saturation, Luminescence, Red,


Green and Blue attributes.

Chapter 10 Project Administration


414 TriStation Options

6 Click Add to Custom Colors.


7 Select the desired color from Custom Colors and click OK.

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).”

TriStation 1131 Developer’s Guide


Viewing the Project History 415

Viewing the Project History


The Project History, or audit trail, is automatically generated by TriStation during
project development. You can use it to find out which users accessed and modified
a project at what times. The Clear History button allows you to clear all recorded
actions and begin a new Project History.

Chapter 10 Project Administration


416 Viewing the Project History

TriStation 1131 Developer’s Guide


CHAPTER 11

Printing

This chapter explains how to print:


“Logic Sheets” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
“Standard Reports” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
“Custom Reports” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

TriStation 1131 Developer’s Guide


418 Logic Sheets

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.

TriStation 1131 Developer’s Guide


Custom Reports 419

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

TriStation 1131 Developer’s Guide


CHAPTER 12

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

TriStation 1131 Developer’s Guide


422 Automatically Attached Libraries

Automatically Attached Libraries


When you create a new TriStation project, three shared libraries are automatically
attached to the project:
• 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
These libraries contain functions, function blocks and other elements for use in the
development of projects. When you select elements for your logic using a language
editor’s Select Function (Block) tool, the elements from all shared libraries are
combined into one list of available elements.
To attach other libraries to a project, use the Import button on the Shared
Libraries tab found on the Project Directory menu. For details, see the section
called “Importing Libraries to a Project” on page 438.

! WARNING
Never delete the Standard Library, Triconex Library or Trident Library from any
of your TriStation projects.

TriStation 1131 Developer’s Guide


Automatically Attached Libraries 423

Standard Library Functions


The following table briefly describes each function in the Standard Library (STDLIB). For details, see
the Triconex Libraries manual and the online Help system. The table also lists the Application Type,
Programming Usage, and CEM Features attributes for each function. For descriptions of these
attributes, see “Description of Attributes for Library Elements” on page 434.

Function Name Description Attributes


ABS Calculates the absolute value of a single Safety, Control
numeric variable
ACOS Arc cosine Safety, Control
ADD Adds numeric, date and time, and time of day Safety, Control
variables
AND Bitwise conjunction of two or more Safety, Control, Cause
conditions Header
ASIN Arc sine Safety, Control
ATAN Arc tangent Safety, Control
BOOL_TO_DWORD Converts type BOOL to type DWORD Safety, Control
CEIL Returns the smallest integer greater than or Safety, Control
equal to input x
CONCAT_DT Concatenates the date and time Control
COS Cosine Safety, Control
CTD Down counter Safety, Control,
Cause Header, Effect Header,
Only Once
CTU Up counter Safety, Control,
Cause Header, Effect Header,
Only Once
CTUD Up-down counter Safety, Control,
Cause Header, Effect Header,
Only Once
DINT_TO_DWORD Converts type DINT to type DWORD Safety, Control
DINT_TO_INT Converts type DINT to type INT Safety, Control
DINT_TO_LREAL Converts type DINT to type LREAL Safety, Control

Chapter 12 Libraries
424 Automatically Attached Libraries

Function Name Description Attributes


DINT_TO_REAL Converts type DINT to type REAL Safety, Control
DIV Divides numeric, date and time, and time of Safety, Control
day variables
DT_TO_DATE Extracts date from date and time of day Safety, Control
DT_TO_TOD Extracts time of day from date and time of Safety, Control
day
DWORD_TO_BOOL Convert type DWORD to type BOOL Safety, Control
DWORD_TO_DINT Converts type DWORD to type DINT Safety, Control
EQ Compares and equates two inputs Safety, Control,
Cause Header
EXP Calculates the natural exponential for real Safety, Control
number inputs
EXPT Raises one variable to the power or value of Safety, Control
another
F_TRIG Detects a change from true to false in the Safety, Control,
internal binary clock during execution Cause Header, Effect Header,
Intersection, Only Once
FLOOR Floor (lowest integer in real number) Safety, Control
GE Greater than or equal to Safety, Control,
Cause Header
GetTimer Gets the system timer Safety, Control
GT Greater than Safety, Control,
Cause Header
INT_TO_DINT Converts type INT to type DINT Safety, Control
INT_TO_LREAL Converts type INT to type LREAL Safety, Control
INT_TO_REAL Converts type INT to type REAL Safety, Control
LE Less than or equal to Safety, Control,
Cause Header
LIMIT Limits the values that are allowed for an input Safety, Control
LN Natural logarithm Safety, Control

TriStation 1131 Developer’s Guide


Automatically Attached Libraries 425

Function Name Description Attributes


LOG Base ten logarithm Safety, Control
LREAL_TO_DINT Converts type LREAL to type DINT Safety, Control
LREAL_TO_INT Converts type LREAL to type INT Safety, Control
LREAL_TO_REAL Converts type LREAL to type REAL Safety, Control
LT Less than Safety, Control,
Cause Header
MAX Sets the maximum values that are allowable Safety, Control
for inputs or outputs
MEDSEL Selects median value Safety, Control
MIN Sets the minimum values that are allowable Safety, Control
for inputs or outputs
MOD Modulo—calculates the remainder of the Safety, Control
division of one input by another
MOVE Moves or assigns input values to output Safety, Control,
values Cause Header, Effect Header,
Intersection
MUL Multiplies numeric, date and time, and time Safety, Control
of day variables
MUX Selects a value from multiple inputs, Safety, Control
depending on an input selector
NE Not equal to Safety, Control,
Cause Header
NOT Performs bitwise inversion of conditions Safety, Control,
Cause Header, Effect Header,
Intersection
NUMBITS Number of BOOL inputs that are True (1) Safety, Control
OR Performs a bitwise comparison of the two or Safety, Control,
more inputs to establish the resultant value Cause Header
R_TRIG Detects a change from false to true in the Safety, Control,
internal binary clock during execution Cause Header, Effect Header,
Intersection, Only Once
REAL_TO_DINT Converts type REAL to type DINT Safety, Control

Chapter 12 Libraries
426 Automatically Attached Libraries

Function Name Description Attributes


REAL_TO_INT Converts type REAL to type INT Safety, Control
REAL_TO_LREAL Converts type REAL to type LREAL Safety, Control
ReportBadParam Reports a Bad Parameter error and clears Safety, Control
ENO
ROL Rotates inputs left by a designated number of Safety, Control
bits
ROR Rotates inputs right by a designated number Safety, Control
of bits
RS Resets dominant bistable function block Safety, Control,
(latch) Cause Header, Effect Header,
Only Once
RTC Real Time Clock whose output gives the Safety, Control, Space Saver
current system data and time
SEL Selects a value from multiple inputs, Safety, Control
depending on an input selection constant
SHL Shift left Safety, Control
SHR Shift right Safety, Control
SIN Sine Safety, Control
SQRT Square root Safety, Control
SR Sets dominant bistable function block (latch) Safety, Control,
Cause Header, Effect Header,
Only Once
SUB Subtracts numeric, date and time, and time of Safety, Control
day variables
TAN Tangent Safety, Control
TIME_TO_SECS Converts type TIME to type LREAL seconds Safety, Control
TIME_TO_SECS_REAL Converts type TIME to type REAL seconds Safety, Control
TOF Off Delay Timer Safety, Control,
Cause Header, Effect Header,
Intersection, Only Once

TriStation 1131 Developer’s Guide


Automatically Attached Libraries 427

Function Name Description Attributes


TON On Delay Timer Safety, Control,
Cause Header, Effect Header,
Intersection, Only Once
TP Generates a pulse on the rising edge of an Safety, Control,
input Cause Header, Effect Header,
Intersection, Only Once
TRUNC_LREAL_TO_DINT Truncates type LREAL to type DINT Safety, Control
TRUNC_LREAL_TO_INT Truncates type LREAL to type INT Safety, Control
TRUNC_REAL_TO_DINT Truncates type REAL to type DINT Safety, Control
TRUNC_REAL_TO_INT Truncates type REAL to type INT Safety, Control
XOR Performs exclusive bit-wise comparison of Safety, Control,
two or more inputs to establish the resultant Cause Header
value

Triconex Library Functions


The following table briefly describes each function in the Triconex Library (TCXLIB). Refer to the
Triconex Libraries manual and the online Help system for details. The table also lists the Application
Type, Programming Usage, and CEM Features attributes for each function. For descriptions of these
attributes, see “Description of Attributes for Library Elements” on page 434.

Function Name Description Attributes


AIN Converts analog inputs to real values Safety, Control
AOUT Converts a real value to an analog output Safety, Control
value
ARRAY32_BOOL Reads and writes data specified in an array of Safety, Control, Internal State
32 BOOLs
ARRAY32_DINT Reads and writes data specified in an array of Safety, Control, Internal State
32 DINTs
ARRAY32_REAL Reads and writes data specified in an array of Safety, Control, Internal State
32 REALs
BLINK Blinks a coil on and off at specified intervals Safety, Control,
Cause Header, Effect Header,
Intersection, Only Once

Chapter 12 Libraries
428 Automatically Attached Libraries

Function Name Description Attributes


BLINK_I Blinks a coil on and off at intervals, specified Safety, Control,
in milliseconds Cause Header, Effect Header,
Intersection, Exactly Once
BLINK_R Blinks a coil on and off at intervals, specified Safety, Control,
in seconds Cause Header, Effect Header,
Intersection, Exactly Once
CHK_ERR Gets runtime error flags Safety, Control, Space Saver
CLR_ERR Clears runtime error status Safety, Control, Space Saver
CSCHED Schedules execution after specified number Safety, Control, Exactly Once
of scans
CSCHED_I Schedules execution after specified number Safety, Control, Exactly Once
of scans (integer milliseconds)
CSCHED_R Schedules execution after specified number Safety, Control, Exactly Once
of scans (real seconds)
EXPFLTR Provides an exponential filter to smooth a Safety, Control, Only Once
noisy input data value
GASDETR Processes gas detector inputs and generates Safety, Control, Only Once
alarms
GetDelta_DINT Returns DINT containing measured scan Safety, Control
period in milliseconds for previous scan
GetDelta_REAL Returns REAL containing measured scan Safety, Control
period in milliseconds for previous scan
GetDeltaT Returns TIME containing measured scan Safety, Control
period in milliseconds for previous scan
INTGTOR Performs integration of input values Safety, Control, Only Once
INTGTOR_R Performs integration of input values (real Safety, Control, Exactly Once
seconds)
LEADLAG Provides lead-lag compensation Control, Only Once
LEADLAG_R Provides lead-lag compensation (real Control, Exactly Once
seconds)
LINEMNTR Line monitor—monitors analog current loop Safety, Control, Space Saver

TriStation 1131 Developer’s Guide


Automatically Attached Libraries 429

Function Name Description Attributes


LOOPDETR Processes loop detector inputs and generates Safety, Control, Only Once
alarms
NUMBITS_DWORD Counts number of 1 bits in DWORD Safety, Control
PACK16 Packs 16 bits into an integer Safety, Control
PACK32 Packs 32 bits into an integer Safety, Control
PERDEV Percent Deviation—computes percent of Safety, Control
difference
PID Proportional Integral Derivative control Control, Only Once
PID_R Proportional Integral Derivative control (real Control, Only Once
seconds)
POLY4 Polynomial with 4 coefficients Safety, Control
POLY5 Polynomial with 5 coefficients Safety, Control
SCALE Rescales an input value from one type of Safety, Control
engineering units to another
TCJ_CONV Converts Type J thermocouple inputs to Safety, Control
Centigrade
TCK_CONV Converts Type K thermocouple inputs to Safety, Control
Centigrade
TDD_I Time delay to de-energize (integer Safety, Control,
milliseconds) Cause Header, Effect Header,
Intersection, Exactly Once
TDD_R Time delay to de-energize (real seconds) Safety, Control,
Cause Header, Effect Header,
Intersection, Exactly Once
TDE_I Time delay to energize (integer milliseconds) Safety, Control,
Cause Header, Effect Header,
Intersection, Exactly Once
TDE_R Time delay to energize (real seconds) Safety, Control,
Cause Header, Effect Header,
Intersection, Exactly Once
TIMEADJ Adjusts Trident clock by supplied value Safety, Control, Only Once
TIMESET Sets Trident clock by supplied value Safety, Control, Only Once

Chapter 12 Libraries
430 Automatically Attached Libraries

Function Name Description Attributes


TMR Counts for a specified time interval and sets Safety, Control,
an output Cause Header, Effect Header,
Intersection, Exactly Once
TMR_I Counts for a specified time interval (in Safety, Control,
(integer milliseconds) and sets an output Cause Header, Effect Header,
Intersection, Exactly Once
TMR_R Counts for a specified time interval (in real Safety, Control,
seconds) and sets an output Cause Header, Effect Header,
Intersection, Exactly Once
TOGGLE Toggles the state of a coil Safety, Control,
Cause Header, Effect Header,
Intersection, Only Once
TP_I Generates a pulse of duration (in Safety, Control,
milliseconds) on the rising edge of an input Cause Header, Effect Header,
Intersection, Exactly Once
TP_R Generates a pulse of duration (in seconds) on Safety, Control,
the rising edge of an input +Cause Header, Effect
Header, Intersection, Exactly
Once
TSCHED Schedules execution at a specified time Safety, Control, Exactly Once
interval
TSCHED_I Schedules execution at a specified time Safety, Control, Exactly Once
interval (integer milliseconds)
TSCHED_R Schedules execution at a specified time Safety, Control, Exactly Once
interval (real seconds)
UNPACK16 Unpacks DWORD into 16 bits Safety, Control, Space Saver
UNPACK32 Unpacks DWORD into 32 bits Safety, Control, Space Saver
X_OF_N Decides if X of N measurements exceed Safety, Control, Internal State
specified limit

TriStation 1131 Developer’s Guide


Automatically Attached Libraries 431

Trident Library Function Blocks


The following table briefly describes each function block in the Trident Library
(TRDLIB). For details, see Triconex Libraries Reference and the online Help
system. The table also lists the Application Type, Programming Usage, and CEM
Features attributes for each function block. For descriptions of these attributes, see
“Description of Attributes for Library Elements” on page 434.

Function Block Name Description Attributes


MBCTRL Sets time-out and retry values for a Modbus Safety, Control, Only Once
Master port
MBREAD_BOOL Reads up to 32 BOOL values from a Modbus Safety, Control, Exactly Once
slave
MBREAD_DINT Reads up to 25 DINT values from a Modbus Safety, Control, Exactly Once
slave
MBREAD_REAL Reads up to 25 REAL values from a Modbus Safety, Control, Exactly Once
slave
MBREAD_REAL_TRD Reads up to 25 REAL values from a Modbus Safety, Control, Exactly Once
slave
MBWRITE_BOOL Writes up to 32 BOOL values to a Modbus Safety, Control, Exactly Once
slave
MBWRITE_DINT Writes up to 25 DINT values to a Modbus Safety, Control, Exactly Once
slave
MBWRITE_REAL Writes up to 25 REAL values to a Modbus Safety, Control, Exactly Once
slave
MBWRITE_REAL_TRD Writes up to 25 REAL values to a Modbus Safety, Control, Exactly Once
slave
PAGE_EJECT Ejects paper to top of next page Control, Space Saver
PRINT_BOOL Prints boolean value—OFF if 0 and ON if 1 Control, Space Saver
PRINT_CDT Prints current date and time Control, Space Saver
PRINT_CRLF Prints carriage return and line feed Control, Space Saver
PRINT_CTOD Prints current time of day Control, Space Saver
PRINT_DINT Prints double integer value up to eight Control, Space Saver
characters

Chapter 12 Libraries
432 Automatically Attached Libraries

Function Block Name Description Attributes


PRINT_REAL Prints real value up to eight characters Control, Space Saver
PRINT_STRING Prints string of text Control, Space Saver
PRNTR_FLUSH Clears the specified printer port buffer Control, Space Saver
SOECLR Clears a specified SOE block Safety, Control, Space Saver
SOESTAT Checks status of a specified SOE block Safety, Control, Space Saver
SOESTOP Stops event collection for a specified SOE Safety, Control, Space Saver
block
SOESTRT Starts event collection for a specified SOE Safety, Control, Space Saver
block
SYS_AI_32_STATUS Gets analog input module status Safety, Control
SYS_CM_STATUS Gets communication module status Safety, Control
SYS_CRITICAL_IO1 Calculates status of critical IO modules Safety, Control
SYS_DI32_STATUS Gets discrete input module status Safety, Control, Space Saver,
Intersection
SYS_DO16_STATUS Gets discrete output module status Safety, Control, Space Saver,
Intersection
SYS_IO_STATUS Gets input/output module status Safety, Control
SYS_IOP_STATUS Gets IO processor module status Safety, Control, Space Saver,
Intersection
SYS_MP_EXT_STATUS Provides additional details about MP status Safety, Control, Space Saver
SYS_MP_STATUS Gets Main Processor module status Safety, Control, Space Saver
SYS_RO32_STATUS Ensures that safety-critical modules are Safety, Control
within specification
SYS_SHUTDOWN2 Implements safety-critical guidelines Safety, Control
SYS_SYSTEM_STATUS Gets Main Processor module status from the Safety, Control
Trident
SYS_VOTE_MODE* Converts redundancy status Safety, Control, Space Saver
TR_CALENDAR Gets calendar values from TSX Safety, Control, Space Saver
TR_PEER_STATUS Gets peer-to-peer information from TSX Safety, Control, Space Saver

TriStation 1131 Developer’s Guide


Automatically Attached Libraries 433

Function Block Name Description Attributes


TR_URCV_BOOL In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
receives up to 20 BOOL values from a
matching TR_USEND_BOOL function
block on another Triconex controller
TR_URCV_DINT In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
receives up to 20 DINT values from a
matching TR_USEND_DINT function block
on another Triconex controller
TR_URCV_DINT_32 In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
receives up to 32 DINT values from a
matching TR_USEND_DINT_32 function
block on another Triconex controller
TR_URCV_REAL In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
receives up to 20 REAL values from a
matching TR_USEND_REAL function block
on another Triconex controller
TR_URCV_REAL_32 In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
receives up to 32 REAL values from a
matching TR_USEND_REAL_32 function
block on another Triconex controller
TR_USEND_BOOL In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
sends up to 20 BOOL values to a matching
TR_URCV_BOOL function block on another
Triconex controller
TR_USEND_DINT In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
sends up to 20 DINT values to a matching
TR_URCV_DINT function block on another
Triconex controller
TR_USEND_DINT_32 In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
sends up to 32 DINT values to a matching
TR_URCV_DINT_32 function block on
another Triconex controller
TR_USEND_REAL In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
sends up to 20 REAL values to a matching
TR_URCV_REAL function block on another
Triconex controller

Chapter 12 Libraries
434 Description of Attributes for Library Elements

Function Block Name Description Attributes


TR_USEND_REAL_32 In a Peer-to-Peer network, this function block Safety, Control, Exactly Once
sends up to 32 REAL values to a matching
TR_URCV_REAL_32 function block on
another Triconex controller
TR_VOTE_MODE* Converts redundancy status Safety, Control, Space Saver
1. This function block is used when compliance with safety-critical guidelines is required. See the Safety Considerations
Guide for more information.

Description of Attributes for Library Elements


The following section describes the Application Type, Programming Usage, and
CEM Features attributes of library elements.

Programming Usage Attributes


Function blocks in Programming Usage attributes define how the instances of pre-defined function
the Standard, blocks may be used in applications. Programming Usage attributes do not apply
Triconex, and to pre-defined functions, which cannot be instanced.
Trident Libraries are
pre-defined and are
not user-modifiable. Space Saver
The same instance of a function block designated as a Space Saver may appear in
a program multiple times to reduce memory space and scan time.

Note In previous versions, TriStation issued a warning whenever a function


block with the same instance name appeared more than once in a program. In V2
and later, TriStation no longer issues the warning for function blocks that have the
Space Saver attribute.

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.

TriStation 1131 Developer’s Guide


Description of Attributes for Library Elements 435

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

Viewing Attributes for Pre-Defined Functions and Function Blocks


The functions and function blocks found in the Standard, Triconex, and Trident
Libraries are pre-defined with attributes and cannot be modified by the user. To
view the Application Type, Programming Usage, and CEM Features attributes
assigned to a function or function block in one of these libraries, follow these steps:
1 Open the Project Directory dialog box.
2 Go to the Shared Libraries tab.
3 Select a function or function block.
4 Click the Description... button.

The attributes are displayed in the Element Description dialog box as shown
below:

TriStation 1131 Developer’s Guide


Creating and Sharing Libraries 437

Creating and Sharing Libraries


You can share the programs, functions, and function blocks that you create with
other projects by using TriStation’s shared library feature. The use of shared
libraries involves two main tasks:
• Exporting programs, functions, or function blocks to a shared library
• Importing a shared library to a project
Exporting is done using a wizard that you access by means of the Export button.
Importing is done with the Import and Add Library buttons.
The upcoming sections provide more information about these topics.

Exporting Elements to a Library


A shared library is created by exporting user-defined elements. To export, take
these steps:
1 Open the TriStation project from which you want to export elements.
2 Open the Project Directory and go to the User Defined tab.
3 Click the Export button to start up a wizard called the Shared Library
Specification File which allows you to:
• Create a new library specification or use an existing one
• Select elements of your project to include in a library
• Provide read-only source code to users of the exported elements
• Save a specification for a library
• Create a new library
4 Follow the prompts in the wizard to complete the export.

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

Importing Libraries to a Project


After a shared library of user-derived elements has been created, you can import it
to other TriStation projects. To import a library, take these steps:
1 Ensure that the shared library (LT2) file is located 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.
2 Open the TriStation project to which you want to import the shared library.
3 Open the Project Directory, go to the Shared Libraries, tab and click
Import/Remove.
4 A list called Libraries Imported to this Project is displayed. To see a list of
accessible library files, click Add.
5 Select the desired library file and click OK.
6 When the import is completed, the list called Libraries Imported to this
Project will include the newly imported library.
7 Go to the Shared Libraries tab and notice that the imported elements are added
to the list of existing elements.

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.

TriStation 1131 Developer’s Guide


APPENDIX A

Keyboard & Mouse Shortcuts

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

Cut selected items CTRL+X

Paste items in the clipboard CTRL+V

Redo the last edit operation CTRL+A

Undo the last edit operation CTRL+Z

Back up the current project SHIFT+CTRL+B

Text Navigation Keys


To Move Press
Character to the left LEFT ARROW ( ←)
Character to the right RIGHT ARROW ( →)
One word to the left CTRL+LEFT ARROW ( ←)
One word to the right CTRL+RIGHT ARROW ( →)
Current line DOWN ARROW ( ↓)

TriStation 1131 Developer’s Guide


440 Keyboard Shortcuts

To Move Press
Previous line UP ARROW ( ↑)
To end of current line END

To beginning of current line HOME

One page up PAGEUP

One page down PAGEDOWN

To beginning of current element CTRL+HOME

To end of current element CTRL+END

Note The text navigation keystrokes described above work in intermediate


windows or when using the Structured Text editor. To select text, press the SHIFT
key while pressing the keys or key combinations shown.

Delete Keys
To Delete Press
One character to the left BACKSPACE

One character to the right DEL (DELETE)

To the end of a word CTRL+T

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

Down one page at a time PAGE DOWN

TriStation 1131 Developer’s Guide


Mouse Shortcuts 441

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:

Dragging and Dropping Objects


To Do This
Drag and drop objects Click on an object or selected group of objects, holding the
left mouse button down as you move the object(s) to the
desired position on the sheet. Release the left mouse button to
“drop” the object.

Appendix A Keyboard & Mouse Shortcuts


442 Mouse Shortcuts

De-Selecting Objects
To Do This
De-select objects Click anywhere on the sheet background.

Edit Object Properties


To Do This
Edit an object’s Position the mouse cursor over the item. Double-click the left
properties mouse button to activate the Properties dialog box. The
properties for a selected object or objects can then be
modified.

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:

TriStation 1131 Developer’s Guide


Mouse Shortcuts 443

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.

Arranging and Displaying Windows


TriStation uses the standard commands used by most Windows-based applications
for displaying and arranging windows or sheets. These commands appear on the
Windows menu.

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.

Appendix A Keyboard & Mouse Shortcuts


444 Mouse Shortcuts

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.

TriStation 1131 Developer’s Guide


Index

Symbols attributes (continued)


.csv extension 255, 260 for Triconex Library functions 427
.dbf extension 255, 260 for Trident Library function blocks 431
.mdb extension 255, 260 system 286
.tel file 393 Auto Name feature
.txt extension 255, 260 in FBD editor 63
.xls extension 255, 260 in LD editor 118, 124
{not yet named} placeholder 239 Auto Tagnames feature
{not yet named} state 242 in Configuration editor 240
automatic connection of points 283
automatic naming
A
of points 283
access attributes of an element 404
of variables in FBD editor 63
actual scan time 390
of variables in LD editor 118, 124
address plug to match TRINODE 215
aliases
assigned by TriStation 244 B
assigning to system attributes 294 Backup Project command 21, 348, 355
defined 243 building a configuration 211
user-assigned 245 bypass logic 362
annotation
automatic 86, 146 C
brief instructions 41 CEM Features for pre-defined elements
for entire project 86, 146 436
for individual variables 88, 148 CM connection to TriStation 408
for monitoring variables 338 Collect System Events command 393
in FBD editor 82 colors
in LD editor 142 for logic drawings 412
instructions 85, 145 for state changes 252
Application Data space 236 in instance view of FBD program 336
ASCII text records 255, 260 in instance view of LD program 337
assignment statements Commands menu
in ST language 174 in Configuration editor 189
attributes in Control Panels 329
access 404 in Diagnostic Panel 376
for Standard Library functions 423

TriStation 1131 Developer’s Guide


446 Index

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

TriStation 1131 Developer’s Guide


Index 447

Download Change (continued) elements


guidelines for using 347 displaying differences between current
procedure 349 and downloaded versions 274
saving application after 354 of a project 4
state 355 Emulator Control Panel
tips when preparing 352 main purpose 332
Download History procedure for use 339
example 360 EN/ENO
viewing 358 parameters 75, 79, 137
download state, changing 355 sample project 76, 137
download states 355 enabling points 365
drag and drop feature 441 enlarged view
Drawing Colors tab 412 of control panel 334
of elements 25
E of FBD logic 56
Edit menu of LD logic 106
in Configuration editor 187 error messages in Message Bar 211
in Control Panels 327 error source, jumping to 211
in FBD editor 52 event (SOE) 278
in LD editor 102 Exactly Once attribute 435
in ST editor 161 Excel files
editing tools 17 exporting point properties to 256
for FBD language 49 rules for importing 260
for LD language 99 execution flow, FBD program instance
for ST language 159 336
table of basic tools 21 Export Trident Points command 255
element exporting
assigning properties 40 elements to shared library 437
attributes 403 point properties 255
dependencies 404 point properties (procedure) 259
owner 404 expressions, ST language 167
selecting on sheet 38 extensible functions 74, 135
version number 361 external host computers 251
Element Differences display 274 external writes. See write access.
Element menu
in Configuration editor 188 F
in Control Panels 327 FALSE Color parameter 252
in FBD editor 53 FALSE State Name parameter 252
in LD editor 103 fault identification 385
in ST editor 162 FBD language
elementary data type 11, 65, 126 basic methods 48
brief description 4
File menu for all TriStation views 21

TriStation 1131 Developer’s Guide


448 Index

firmware version numbers 392 hardware handshake 228


Format Data Source dialog box 265 Help menu
free memory space 390 commands 24
full duplex wire type 229 for all TriStation views 24
function Help system 27
attributes 38, 58, 108, 165 historical diagnostic information 393
declaring in FBD 72 horizontal network dividers
declaring in LD 133 in FBD editor 81
declaring in ST 169 in LD editor 141
definition 10
examples 10 I
when to create 35 I/O modules
function block adding 195
attributes 38, 58, 108, 165 deleting 195
declaring in FBD 72 system attributes 317
declaring in LD 133, 138 I/O string attributes 316
declaring in ST 168 import filename 265
definition 9 import records, linking and unlinking 268
examples 9 Import Status messages 267
instance name of 40 Import Wizard 265, 269
when to create 35 importing point properties
Function Block Diagram (FBD) language. general information 260
See FBD procedure 265
function blocks importing shared libraries 438
in Trident Library 431 initial log-in 396
Modbus Read 431 Initial Value of variable 249
Modbus write 431 initialization of variables 340
Peer-to-Peer 433 instance name of function block 40
system status 432 instance view
functions in control panels 335
effect on scan time 353 in FBD editor 88
in FBD language 73 in LD editor 148
in LD language 134 internal functions of TriStation 360
in Standard Library 423 Internal State attribute 434
in Triconex Library 427 IOP
specifying location 196
G system attributes 314
generic data types 12 IP address of CM 225
glitches to attached load 391
J
H Jump to Source command for logic errors
half duplex wire type 229 211
Handshake option, CM serial port 228

TriStation 1131 Developer’s Guide


Index 449

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

TriStation 1131 Developer’s Guide


450 Index

module attributes (continued) owner of an element 404


I/O modules 317–318
Main Processors 305–307 P
Module Configuration Exceptions window parity checking 220, 228
346 partitioning
modules number of programs 34
adding or deleting 352 using function blocks 35
system attributes 287 using functions 35
monitor display options 252 Peer-to-Peer function blocks 433
monitor sheet of control panel 332 Peer-to-Peer Receive. See Receive func-
monitoring OVD status of DO points 322 tion blocks.
mouse shortcuts 441 Peer-to-Peer Send. See Send function
MPs blocks.
configuration 214–222 performance information 389
connection to TriStation 218 PI Module configuration 231–233
system attributes 305 pickup elements
multiple languages in one project 16 in FBD comment 84
multiple programs in one project 8 in LD comment 144
multi-point communication 228 point attributes 288
AO points 320
N connecting program instance variables
naming 210
automatic 242 defined 288
manual 239 DO points 319
of points 283 PI points 320
negative scan surplus 215 point connections 204
network dividers automatic 283
in FBD editor 81 manual 208, 281
in LD editor 141 property fields 248
node definition, modifying 409 points
node names, modifying 408 attributes 247
automatic naming 242
O declaring names 198
off-line comparison to last downloaded enabling 365
configuration 272 list of disabled 364
Only Once attribute 435 manual naming 239
operands and operators in ST language undoing names 284
172 point-to-point communication 228
Options menu for lists 26 poll time 389
Output Voter Diagnostics. See OVD. pop-up menu 17
OVD for control panels 324
disabling and monitoring 296 for FBD editor 49, 159
monitoring status of DO points 322

TriStation 1131 Developer’s Guide


Index 451

pop-up menu (continued) properties (continued)


for LD editor 99 of sheets in FBD logic 61
for ST editor 159 of sheets in LD logic 111
power flow in LD program instance 337 of variables in FBD logic 62
printing of variables in LD logic 114, 123
of custom reports 419 of wires in FBD logic 80
of logic sheets 95, 155, 180 Properties dialog box 17
of standard reports 418 Pulse Input Module. See PI Module.
privileges, security 398
program instance R
definition 13, 183 Read Only attribute of element 404
procedure for declaring 201 Read/Write attribute of element 404
whether to use instances or copies 35 read-only view of program instance 203
program instance monitor 335 Receive function blocks, maximum num-
program logic ber 237
example 42 remote access. See write access.
PROGRAM mode 366 Remote mode 366
programming languages in TriStation 4 report databases, updating 418
Programming Usage attributes 436 reports
programs custom 419
declaring in ST 167 default directory for templates 411
multiple in one project 8 standard 418
number in project 34 requested scan time 390
safety and control attributes 37, 58, Restore Project command 21
108, 165 retentive masks 390
project Retentive property 248
configuration methods 43 RJ-45 connectors on CM Baseplate 224
procedures for change control 354 RPM measurement, PI points 233
sample diagrams 32 RS-232 transceiver mode 221, 228
typical steps for developing 29 RS-485 transceiver mode 221
Project Directory 15 RUN mode 366
project elements 4
Project menu commands 22
project toolbar 19 S
projects Scan Surplus 348, 390
default directory 411 scan time
for Trident systems 2 defined 215
properties effect of adding functions 353
assigning to elements 40 requested and actual 390
of function block in FBD editor 77 setting system parameter 215
of function block in LD editor 138 scrolling through sheets 440
of functions in FBD logic 73 security
of functions in LD logic 134 levels 402
privileges 398

TriStation 1131 Developer’s Guide


452 Index

security (continued) Standard Library


system elements 396 brief description 422
Select Import Options dialog box 266 functions 423
selection statements in ST language 176 standard reports, printing 418
Send function blocks, maximum number State Names parameter 252
237 statements in ST language 174
serial port configuration STDLIB. See Standard Library.
CM Baseplate 226–230 STOP mode 366
MP Baseplate 219–222 Structured Text. See ST language.
shared libraries 12 SYS_ function blocks 289, 321
automatically attached 422 system attributes
default directory 411 AO points 320
exporting elements to 437 assigning aliases 294
importing to a project 438 CM module and port status 311
overview 437 defined 286–288
updating 438 disabling and monitoring OVD 296
verifying versions 438 DO points 319
sheet properties I/O string status 316
in FBD editor 61 I/O subsystem status 304
in LD editor 111 IOP status 314
sheets list of all types 301
printing in FBD editor 95 methods of access 289
printing in LD editor 155 MP module status 305
printing in ST editor 180 MP operational modes 308
scrolling through 440 MP serial port status 310
using in FDB editor 60 PI points 320
using in LD editor 110 summary status 302
Sheets menu TriStation port status 307
in Control Panels 330 using in a TriStation project 290–300
in FBD editor 55 viewing 291
in LD editor 105 system events 393
shortcuts system macros 90, 150
keyboard 439 system performance information 389
using mouse 441 system status function blocks 432
Size/Alignment commands
in control panels 325 T
in FBD editor 50 Tag Name property 248
in LD editor 100 tagnames
Space Saver attribute 434 declaring 198
speed measurement, PI points 233 safety and control attributes 247
ST language TCP/IP address
basic methods for writing logic 158 modifying in Project Options dialog box
brief description 6 409

TriStation 1131 Developer’s Guide


Index 453

TCP/IP address (continued) Trident points


specifying for CM Baseplate 225 automatic naming 242
TCXLIB. See Triconex Library. manual naming 239
technical support xx–xxi required values for point properties 256
testing undoing names 284
setting values 333 Trident System Overview window 380
using a control panel 333, 339 TRINODE
text files matching address plug 215
exporting point properties to 258 modifying 408
rules for importing 261 Triple Modular Redundancy (TMR) 391
throughput limitations, Modbus devices TriStation
229 connecting PC to controller 408
time synchronization option 225 default connection to controller 408
timing diagram for CM serial port 230 internal functions 360
toolbar port configuration 218
diagnostic 374 security levels of operations 401
for basic editing 17 TriStation ports on MP 218
for editor or control panel 19 TRUE Color parameter 252
for FBD editor 49 TRUE State Name parameter 252
tools for developing project 15
Tools menu U
in Configuration editor 190 Unlink All command 268
in Control Panels 328 Unlink command 269
in Diagnostic Panel 376 updating shared libraries 438
in FBD editor 54 Upload and Verify command 356
in LD editor 104 Usage attributes for pre-defined elements
tooltip 21 436
training xxii user-modifiable macros
Tree menu definition 90, 150
in Configuration editor 188 using 92, 152
in Control Panels 327 users, adding and deleting 396
in Diagnostic Panel 375
Triconex Library
brief description 422 V
functions 427 variable annotation
Triconex training xxii automatic 86, 146
Trident Library function blocks 431 brief instructions 41
Trident menu, all TriStation views 22 for entire project 86, 146
Trident Node Definition 408–409 for individual variables 88, 148
Trident point connections in FBD editor 82
property fields 248 in LD editor 142
undoing 284 instructions 85, 145
variable types 119

TriStation 1131 Developer’s Guide


454 Index

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

TriStation 1131 Developer’s Guide

You might also like