Sie sind auf Seite 1von 442

Users Guide

TriStation 1131
Developers Workbench
Version 1.1

Triconex Corporation A Siebe Group Company

Information in this document is subject to change without notice. Companies, names and data used in examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Triconex Corporation. 1997 Triconex Corporation. All Rights Reserved. TRICONEX is a registered trademark of Triconex Corporation in the USA and other countries. TRISTATION MSW, TriStation 1131 and TRICON are trademarks of Triconex Corporation in the USA and other countries. Crystal Reports is a registered trademark of Seagate Software Company, Inc. IBM is a registered trademark of International Business Machines, Inc. Microsoft, Windows NT, and Windows 95 are registered trademarks of Microsoft Corporation. Pentium is a registered trademark of Intel Corporation. All other brands or product names may be trademarks or registered trademarks of their respective owners.

Document No. 9720064-001 Rev. 1.1 Printed in the United States of America.

CONTENTS

Chapter 1

Introduction ................................................................................ 17
About This Manual ....................................................................................... 18 Summary of Chapters .............................................................................. 18 Document Conventions ............................................................................... 20 User Experience Requirements .................................................................. 21 How to Contact Triconex ............................................................................. Regional Offices ....................................................................................... Triconex Corporate Headquarters ........................................................... Sales Department .................................................................................... Technical Support .................................................................................... Telephone ......................................................................................... Fax .................................................................................................... 24-Hour Bulletin Board System (BBS) ............................................... Triconex Internet Web Page .............................................................. 22 22 22 22 23 23 23 23 24

Chapter 2

A TriStation 1131 Project ........................................................... 25


Programming Languages ............................................................................ Function Block Diagram (FBD) Language ............................................... Ladder Diagram (LD) Language .............................................................. Structured Text (ST) Language ............................................................... Elements of a Project ................................................................................... Projects for TRICON Systems ................................................................. Programs ................................................................................................. Program Instances ............................................................................ Multiple Programs within a Project .................................................... Function Blocks ........................................................................................ Functions ................................................................................................. Data Types ............................................................................................... Elementary Data Types ..................................................................... Generic Data Types .......................................................................... Shared Libraries ....................................................................................... Configuration ............................................................................................ Program Instances ............................................................................ TRICON Point Connections .............................................................. TRICON Hardware Configuration ...................................................... 26 26 27 28 29 29 31 31 31 32 33 34 34 35 36 36 37 37 37

iv

TriStation 1131 Tools ................................................................................... The Project Directory ............................................................................... Language Editors .................................................................................... Multiple Languages in a Project ........................................................ Properties Dialog Box .............................................................................. Basic Editing Tools .................................................................................. Pop-up Menu .................................................................................... Main Menu & Project Toolbar ........................................................... Shortcut Keys .................................................................................... Table of Editing Tools ....................................................................... Enlarged View of Elements ............................................................... Options Menu for Lists ...................................................................... Help System ............................................................................................ TRICON Configuration Editor .................................................................. Control Panels ......................................................................................... TRICON Diagnostic Panel .......................................................................
Developing a TriStation 1131 Project ......................................................... Typical Development Approach .............................................................. Partitioning the Project ............................................................................ Sample Project Diagrams ................................................................. Determining the Number of Programs .............................................. Program Instances versus Program Copies ..................................... When to Create Function Blocks ...................................................... When to Create Functions ................................................................ Writing the Logic for Executable Elements .............................................. Selecting Elements & Connecting Wires .......................................... Assigning Properties to Elements ..................................................... Giving Instance Names to Function Blocks ...................................... Including Comments & Annotation .................................................... The Completed Logic ........................................................................ Declaring the Project Configuration ......................................................... Basic Methods .................................................................................. Configuring the TRICON System ...................................................... Declaring Program Instances ............................................................ Declaring TRICON Point Connections .............................................. Using the Connections Wizard .......................................................... Building, Testing & Downloading ......................................................

38 38 39 39 40 40 40 42 42 44 48 49 50 51 51 52 53 53 55 56 58 59 59 59 60 60 62 63 64 65 66 66 67 69 69 70 70

Chapter 3

Function Block Diagram (FBD) ................................................. 71


Basic Methods for Writing Logic ................................................................ 72 FBD Editing Tools ........................................................................................ Pop-up Menu ........................................................................................... For A Selected Element .................................................................... For Any Empty Area .......................................................................... Size/Alignment Commands ............................................................... Main Menu Commands ............................................................................ Shortcut Keys .................................................................................... Table of FBD Tools .................................................................................. Enlarged View of Elements ...................................................................... 73 73 73 73 74 75 75 77 82

Manipulating Logic Sheets .......................................................................... 83 Assigning Sheet Properties ...................................................................... 84 Declaring Input, Output & Local Variables ................................................ Properties under the Selected Tab .......................................................... Naming .............................................................................................. Width ................................................................................................. Annotation ......................................................................................... Automatic Naming ............................................................................. Properties under the Declaration Tab ...................................................... Data Type .......................................................................................... Variable Type .................................................................................... Initial Value ........................................................................................ Description ........................................................................................ Declaration Dialog Box ...................................................................... Properties under the Annotation Tab ....................................................... Declaring Constants .................................................................................... Properties under the Constant Tab .......................................................... Value, Type & Validate ...................................................................... Width Field ........................................................................................ Annotate Checkbox ........................................................................... Auto Name Feature ........................................................................... Properties under the Annotate Tab .......................................................... 85 85 86 86 86 87 88 89 90 91 91 92 94 95 95 95 96 96 96 96

Declaring Functions & Function Blocks .................................................... 97 Declaring the Properties of Functions ...................................................... 98 Inputs List .......................................................................................... 98 Output of a Function .......................................................................... 99 Negating Inputs or Outputs ............................................................... 99 Width ............................................................................................... 100 Double-space Option ....................................................................... 100 EN/ENO Parameters ....................................................................... 101 Declaring the Properties of a Function Block ......................................... 102 Fields under the Selected Tab ........................................................ 102 Fields of the Declaration Tab .......................................................... 104

vi

Wire Properties .......................................................................................... 105 Network Dividers ........................................................................................ 106 Comments, Variable Annotation & Macros ............................................. Including Comments .............................................................................. Comment Tab ................................................................................. Style Tab ......................................................................................... Pickup-Drop Tab ............................................................................. Edit Fields Tab ................................................................................ Using Variable Annotation ..................................................................... Annotation for the Entire Project ..................................................... Annotating Individual Variables ....................................................... Using Instance Views ...................................................................... Using Macros ........................................................................................ Inserting Macros into Comments or Annotations ............................ Working with User-Modifiable Macros ............................................ Default Macros for Annotation Boxes ............................................. 107 107 108 108 109 109 110 111 113 113 115 116 117 118

Printing Logic Sheets ................................................................................ 120

Chapter 4

Ladder Diagram (LD) ............................................................... 121


Basic Methods for Writing Logic .............................................................. 122 LD Editing Tools ........................................................................................ Pop-up Menu ......................................................................................... For A Selected Element .................................................................. For Any Empty Area ........................................................................ Size/Alignment Commands ............................................................. Main Menu Commands ......................................................................... Shortcut Keys .................................................................................. Table of LD Tools .................................................................................. Enlarged View of Elements ................................................................... 123 123 123 123 124 124 125 126 131

Manipulating Logic Sheets ....................................................................... 132 Assigning Sheet Properties ................................................................... 133 Links ............................................................................................................ 134 Power Rails ................................................................................................. 135 Declaring Contacts & Coils ....................................................................... Properties under the Selected Tab ........................................................ Naming ............................................................................................ Width ............................................................................................... Annotation ....................................................................................... Contact Type ................................................................................... Coil Type ......................................................................................... Automatic Naming ........................................................................... 136 136 137 137 137 138 139 140

vii

Properties under the Declaration Tab .................................................... Variable Type .................................................................................. Description ...................................................................................... Declaration Dialog Box .................................................................... Properties under the Annotation Tab ..................................................... Declaring Local, Input & Output Variables .............................................. Properties under the Selected Tab ........................................................ Naming ............................................................................................ Width ............................................................................................... Annotation ....................................................................................... Contact or Coil Type ........................................................................ Automatic Naming ........................................................................... Properties under the Declaration Tab .................................................... Data Type ........................................................................................ Variable Type .................................................................................. Initial Value ...................................................................................... Description ...................................................................................... Declaration Dialog Box .................................................................... Properties under the Annotation Tab ..................................................... Declaring Constants .................................................................................. Properties under the Constant Tab ........................................................ Value, Type & Validate .................................................................... Width Field ...................................................................................... Annotate Checkbox ......................................................................... Auto Name Feature ......................................................................... Properties under the Annotate Tab ........................................................ Declaring Functions & Function Blocks .................................................. Declaring the Properties of Functions .................................................... Inputs List ........................................................................................ Extensible Functions ....................................................................... Output of a Function ........................................................................ Negating Inputs or Outputs ............................................................. Width ............................................................................................... Double-space Option ....................................................................... EN/ENO Parameters ....................................................................... Declaring the Properties of a Function Block ......................................... Fields under the Selected Tab ........................................................ Fields of the Declaration Tab ..........................................................

141 141 142 143 145 146 146 147 147 147 147 148 149 150 151 152 152 153 155 156 156 156 157 157 157 157 158 159 159 160 160 160 161 161 162 163 163 165

Network Dividers ........................................................................................ 166

viii

Comments, Variable Annotation & Macros ............................................. Including Comments .............................................................................. Comment Tab ................................................................................. Style Tab ......................................................................................... Pickup-Drop Tab ............................................................................. Edit Fields Tab ................................................................................ Using Variable Annotation ..................................................................... Annotation for the Entire Project ..................................................... Annotating Individual Variables ....................................................... Using Instance Views ...................................................................... Using Macros ........................................................................................ Inserting Macros into Comments or Annotations ............................ Working with User-Modifiable Macros ............................................ Default Macros for Annotation Boxes .............................................

167 167 168 168 169 169 170 171 173 173 175 176 177 178

Printing Logic Sheets ................................................................................ 180

Chapter 5 Chapter 6

Structured Text (ST) ................................................................ 181 Configuration Editor ................................................................ 183


Configuration Tools ................................................................................... Main Menu Commands ......................................................................... Shortcut Keys .................................................................................. Table of Configuration Tools ................................................................. Options Menu for Lists .......................................................................... Setting System Parameters ...................................................................... Network Node ........................................................................................ Scan Rate .............................................................................................. Password Required for Download All .................................................... Disable STOP on Operator Keyswitch .................................................. Disable Remote Changes ..................................................................... Note about Time Synchronization ......................................................... Hardware Allocation .................................................................................. Adding & Deleting Chassis .................................................................... Adding & Deleting Modules ................................................................... Chassis Power Usage ........................................................................... 184 184 184 186 188 190 190 191 191 191 192 192 193 193 193 195

Changing Memory Allocation ................................................................... 196 Application Data .................................................................................... 198 Downloading Considerations ................................................................. 198 Declaring Program Instances ................................................................... 199 Steps to Follow ...................................................................................... 199 Instance View ........................................................................................ 199

ix

Declaring TRICON Points .......................................................................... Overview ................................................................................................ Examples ......................................................................................... Naming Methods .................................................................................... Manual Naming ............................................................................... Using Auto Tag Names ................................................................... Automatic Naming in the Connections Wizard ................................ Deleting TRICON Point Names ....................................................... Rules that Apply ..................................................................................... Property Fields for TRICON Points ........................................................ Addresses of Memory Points .......................................................... Aliases for TRICON Points .................................................................... What are Aliases? ........................................................................... Fixed Aliases for Input & Output Points ........................................... Selecting Aliases for Memory Points ............................................... System Aliases for External Hosts .................................................. MinSpan & MaxSpan Fields ................................................................... Monitor Display Options ......................................................................... Using the Connections Wizard ................................................................. Overview ................................................................................................ Manual Connection ................................................................................ Steps to Follow ................................................................................ Automatic Connection ............................................................................ Automatic Naming .................................................................................. Manual Naming with Automatic Connection .......................................... Viewing Points for Selected Modules ..................................................... Undoing TRICON Point Names & Connections .....................................

201 201 202 202 202 204 205 205 205 206 207 208 208 209 209 210 211 212 213 213 215 215 216 217 217 218 218

Connecting Individual Program Variables ............................................... 219 Building the Configuration ........................................................................ 220 Testing & Downloading .......................................................................... 220 Compare to Last Download ....................................................................... 221 Details Display ....................................................................................... 222 Configuration Differences Report ........................................................... 223 Exporting TRICON Point Properties ......................................................... Selecting Point Type(s) for Export ......................................................... Exporting to a Database or Excel File .................................................... Exporting to a Text File .......................................................................... Sample Steps to Follow ......................................................................... Importing TRICON Point Properties ......................................................... Rules for Database or Excel Files .......................................................... Rules for Text Files ................................................................................ Required Values for TRICON Point Properties ...................................... 224 225 225 227 228 229 230 230 232

Sample Steps to Follow ......................................................................... Import Status Messages ................................................................. Linking & Unlinking Import Records ................................................ Import Record Processing ..................................................................... Updating Existing TRICON Points .................................................. Adding New TRICON Points ........................................................... Other Imports .................................................................................. Configuring the TRICON for Event Collection ........................................ Estimating Available Memory ................................................................ Setting Up SOE Blocks ......................................................................... Assigning Event Variables to SOE Blocks ............................................ Designating a Trip Variable (Optional) .................................................. Selecting Monitor Display Options (Optional) ........................................

234 236 237 238 238 239 239 240 241 242 243 244 245

Chapter 7

Control Panels ......................................................................... 247


Control Tools .............................................................................................. Pop-up Menu ......................................................................................... For A Selected Element .................................................................. For Any Empty Area ........................................................................ Main Menu Commands ......................................................................... Shortcut Keys .................................................................................. Table of Control Tools ........................................................................... Operating a Control Panel ......................................................................... Setting up a Monitor Sheet .................................................................... Setting Values for Testing ..................................................................... Enlarging Your View of Elements ................................................... Using the Program Instance Monitor ..................................................... Power Flow in an LD Program Instance ......................................... Sample Steps for Set-up & Use ............................................................ Downloading a Project .............................................................................. Download All ......................................................................................... Steps to Follow ............................................................................... Configuration Mismatch .................................................................. Download Change ................................................................................. Guidelines ....................................................................................... Steps to Follow ............................................................................... Allowable Changes ......................................................................... Additional Tips ................................................................................ Controlling & Changing an Existing Project ........................................... Download States ................................................................................... Compare to Last Download ................................................................... Details Display ................................................................................ Configuration Differences Report .................................................... 248 248 248 248 249 250 251 256 257 258 259 260 261 262 264 264 265 266 267 267 268 269 271 275 276 277 278 279

xi

Download History ................................................................................... 280 Version Numbering of Projects ........................................................ 280 Downloaded Elements & Their Attributes ........................................ 282 Disabling Points ......................................................................................... Disabling Selected Points ...................................................................... Listing all Disabled Points ...................................................................... Enabling Points ...................................................................................... 284 284 286 286

TRICON Operational Modes ...................................................................... 287 Permissible Actions in TriStation 1131 ................................................. 288

Chapter 8

TRICON Diagnostic Panel ........................................................ 289


Diagnostic Tools ........................................................................................ Main Menu Commands .......................................................................... Shortcut Keys .................................................................................. Table of Diagnostic Tools ...................................................................... 290 290 290 292

Overview ..................................................................................................... 294 Sample Steps ......................................................................................... 294 TRICON System Configuration Window .................................................. 297 Chassis Windows ....................................................................................... States of TRICON Slots ......................................................................... Logical & Physical Slot Numbers ..................................................... Status Indicators .................................................................................... OVD State .............................................................................................. Fault Identification ..................................................................................... Field Faults ............................................................................................ Alarm Behavior for Load or Fuse Errors .......................................... Power Faults .......................................................................................... Voter Faults ............................................................................................ 298 299 300 300 301 302 303 303 304 304

System Performance & Project Information ............................................ 305 Output Voter Diagnostics (OVD) ............................................................... 308 Firmware Version Numbers ....................................................................... 309 Collecting TRILOG Events ......................................................................... 310

Chapter 9

System Administration ............................................................ 311


Elements of a Security System ................................................................. Initial Log-in ............................................................................................ Users ...................................................................................................... Privileges ............................................................................................... TRICON Operations ........................................................................ TriStation 1131 Operations ............................................................ Level Names .......................................................................................... 311 312 312 313 314 315 316

xii

Element Attributes ..................................................................................... Access Attributes ................................................................................... Change Owner ...................................................................................... Dependencies ....................................................................................... Project Options .......................................................................................... Language .............................................................................................. Variable Annotations ............................................................................. Communications .................................................................................... Default Connection ......................................................................... Debug Message Options ................................................................ Network TCP/IP Addresses ............................................................

317 317 318 318 319 319 320 321 321 321 322 324 324 324 325 325 326 328 328

TriStation 1131 Options ............................................................................. Directories ............................................................................................. Using the Message Bar ......................................................................... Pop-up Menu .................................................................................. Selecting Attributes ......................................................................... Drawing Colors ...................................................................................... FBD Editor ............................................................................................. LD Editor ...............................................................................................

Project History ........................................................................................... 329

Chapter 10

Printing ..................................................................................... 331


Logic Sheets ............................................................................................... 331 Standard Reports ....................................................................................... 332 Custom Reports ......................................................................................... 333

Chapter 11

Libraries .................................................................................... 335


Overview ..................................................................................................... 335 Automatically Attached Libraries ............................................................. Standard Library Functions ................................................................... TRICON Library Functions .................................................................... Printing Messages to an EICM Port ................................................ 336 336 340 342

Exporting Elements to a Library ............................................................... 344 Importing Libraries to a Project ................................................................ 345 Verifying Library Versions ..................................................................... 345 Deleting Libraries .................................................................................. 345

xiii

Appendix A

Configurable Modules .............................................................. 347


EICM Configuration .................................................................................... Serial Ports ............................................................................................ Not Configured, TriStation 1131 & Debug ...................................... Modbus ............................................................................................ Parallel Ports .......................................................................................... 348 348 349 349 351

Pulse Input Configuration ......................................................................... 352 Speed Point Configuration ..................................................................... 352 RPM Point Configuration ....................................................................... 353 SMM Configuration .................................................................................... 355 Modules for 802.3 Network Communication ............................................ ACM Configuration ................................................................................. NCM Configuration ................................................................................ TRICON Node Number & TCP/IP Address ............................................ 802.3 Network Host ......................................................................... Default Address ............................................................................... User-supplied Address .................................................................... Time Synchronization ................................................................................ TRICON Master Node ............................................................................ DCS ....................................................................................................... TIMESET & TIMEADJ Functions ........................................................... Guidelines that Apply ............................................................................. 357 357 359 361 361 361 362 363 363 363 364 364

Appendix B

Keyboard & Mouse Shortcuts ................................................. 365


Keyboard Shortcuts ................................................................................... Keystroke Shortcuts ............................................................................... Text Navigation Keys ............................................................................. Delete Keys ............................................................................................ Sheet Scrolling ....................................................................................... Mouse Shortcuts ........................................................................................ Selecting Objects ................................................................................... Re-sizing Objects ................................................................................... Dragging & Dropping Objects ................................................................ De-Selecting Objects ............................................................................. Edit Object Properties ............................................................................ Dialog Boxes .......................................................................................... Arranging and Displaying Windows ....................................................... 365 365 365 366 366 367 367 367 367 368 368 368 369

xiv

Appendix C

TRISTATION MSW Corollaries ................................................ 371


Arithmetic & Logic Operators ................................................................... 372 Conditional Statements & Operators ....................................................... 373 Math Functions .......................................................................................... 374 Process Control Functions ....................................................................... 375 TRICON Clock Functions .......................................................................... 376 Fire & Gas Function Blocks ...................................................................... 377 SOE Function Blocks ................................................................................ 378 Gated Access Functions ........................................................................... 378 Peer-to-Peer Communication Functions ................................................. 379 Modbus Functions ..................................................................................... 379 Utility Functions ......................................................................................... 380 Printer Control Functions ......................................................................... 380 System Control Functions ........................................................................ 381 Coils & Contacts in RLL ............................................................................ 382 System Variables ....................................................................................... 385

Appendix D

TV Restrictions & Requirements ......................................... 387


General Restrictions .................................................................................. All Safety Systems ................................................................................ ESD Systems ........................................................................................ Fire & Gas Systems .............................................................................. TRICON-Specific TV Restrictions .......................................................... Safe Shutdown ...................................................................................... When All I/O Modules in System are Critical .................................. When Some I/O Modules in System are Critical ............................. Disabled Points ..................................................................................... Scan Time & Response Time ................................................................ OVDDISABLE Function Not Allowed .................................................... Download All at Completion of Project .................................................. Use of Peer-to-Peer Function Blocks .................................................... Sending Node ................................................................................. Receiving Node ............................................................................... Class 1 through 5 Restrictions .............................................................. Class 6 Restrictions ............................................................................... Fire & Gas Restrictions ......................................................................... 387 387 389 389 390 390 391 392 395 396 396 397 397 397 398 399 400 400

Appendix E

Maintenance Log-on to TRICON ............................................. 401

xv

Appendix F

Peer-to-Peer Communication .................................................. 403


Introduction ................................................................................................ 403 Description of Peer-to-Peer Function Blocks .......................................... TR_USEND Function Blocks ................................................................. TR_USEND Parameters .................................................................. TR_URCV Function Blocks .................................................................... TR_URCV parameters .................................................................... TR_PEER_STATUS for Peer-to-Peer Paths ......................................... TR_PORT_STATUS for NCM Ports ...................................................... 404 405 406 411 412 414 415

TR_USEND/TR_URCV Restrictions .......................................................... 417 TR_USEND/TR_URCV Relationship ......................................................... 417 Rules for Correct Usage ............................................................................ 418 Setting the Number of Sends and Receives ............................................ 418 Selecting TRICON Nodes ........................................................................... 420 Precautions ............................................................................................ 420 Rules for Downloading .............................................................................. 421 Data Transfer Time ..................................................................................... 422 Summary of Peer-to-Peer Runtime Errors ............................................... 424 Examples of Peer-to-Peer Applications ................................................... Fast Send to One TRICON Node .......................................................... Sending Data Every Second to One TRICON Node .............................. Controlled Use of TR_USEND/TR_URCV Function Blocks .................. Using TR_USEND/TR_URCV Function Blocks for Safety-Critical Data Sending Node #1 Parameters: ...................................................... Receiving Node #3 Parameters: ................................................... 426 426 426 426 427 427 427

Index ..................................................................................................................... 429

xvi

CHAPTER 1

Introduction

TriStation 1131 is a Windows NT-based programmers workbench for developing, testing and documenting process-control applications that execute in the TRICON controller. Three languages which comply with the IEC 1131-3 standard are available for programming in TriStation 1131: Function Block Diagram (FBD) Ladder Diagram (LD) Structured Text (ST) Using the features of TriStation 1131, you can perform the following tasks: Develop programs and other executable elements such as functions, function blocks, and data types using any of three language editors Select functions and function blocks from IEC-compliant libraries (which include process control and fire-and-gas functions) and/or custom libraries Graphically configure the I/O modules and points for each chassis in your TRICON system Configure your TRICON system for use with the integrated Sequence of Events (SOE) capability Apply password protection to projects and programs according to user names and security levels Debug your program logic by emulating execution 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 TRICON Display diagnostic information about system performance and fault details

18

About This Manual

About This Manual


This manual is a users guide which provides the following types of information: High-level programming concepts Detailed information about TriStation 1131 features and tools Reference information for occasional use

Summary of Chapters
The manual is organized into the following chapters and appendixes: Chapter 1, Introduction Summarizes TriStation 1131 capabilities; lists documentation conventions and user experience requirements; and tells how to contact Triconex. Chapter 2, A TriStation 1131 Project Briefly describes the elements of a TriStation 1131 project, the languages and tools you can use, and basic methods for developing a project. Chapter 3, Function Block Diagram (FBD) Describes basic methods of writing logic in FBD and provides details on the use of FBD editing tools. Chapter 4, Ladder Diagram (LD) Describes basic methods of writing logic in LD and provides details on the use of LD editing tools. Chapter 5, Structured Text (ST) Will describe basic methods of writing logic in ST and provides details on the use of ST editing tools. Chapter 6, Configuration Editor Explains how to allocate TRICON hardware; set system parameters; declare program instances; connect program variables to TRICON points using the Connections Wizard; build the configuration and compare it to the last download; import and export TRICON point properties; and configure the TRICON for event collection. Chapter 7, Control Panels Explains how to operate the Emulator and TRICON Control Panels; disable and enable points; and monitor the behavior of variables and power flow in program instances; and use the Download All and Download Change capabilities. Chapter 8, TRICON Diagnostic Panel Explains how to use the TRICON Diagnostic Panel for on-line monitoring of a downloaded project and fault identification within a TRICON system; how to display the

Chapter 1

Introduction

About This Manual 19

firmware version numbers of modules in a TRICON system; and how to collect TRILOG events. Chapter 9, System Administration Describes the TriStation 1131 security system; element attributes; project options for languages, variable annotation and communication; and options for TriStation 1131s graphical interface features. Chapter 10, Printing Explains how to use the print-screen capability, generate standard reports, and create custom reports. Chapter 11, Libraries Explains how to add, update and remove libraries; and how to create shared libraries. Appendix A, Configurable Modules Describes the configurable parameters of TRICON communication modules and basic facts about time synchronization. Appendix B, Keyboard & Mouse Shortcuts Describes keyboard and mouse shortcuts for tasks like editing, scrolling and selecting. Appendix C, TRISTATION MSW Corollaries Lists the TRISTATION features that have a corollary feature in TriStation 1131. Appendix D, TV Restrictions & Requirements Provides general and TRICON-specific restrictions for safety shutdown systems that meet TV Class 5 and Class 6 requirements. Appendix E, Maintenance Log-on to TRICON Explains how to log on to any active TRICON for read-only diagnostic monitoring. Appendix F, Peer-to-Peer Communication Explains how to use peerto-peer protocol to send and receive small amounts of critical data among several TRICON systems on an IEEE 802.3 network.

Chapter 1

Introduction

20

Document Conventions

Document Conventions
This manual adheres to the following conventions:
Example of convention Select TRICON as the target platform. Type UpDown1 and press enter. Click OK. Description Bold type indicates buttons, menu commands, names of dialog boxes, windows, functions and function blocks; and text that must be entered exactly as shown. Words in italics indicate placeholders for information you must supply, such as a filename. Italic type is also used occasionally for emphasis within text. Examples of Structured Text language appear in the Courier fixed-pitch font. Keyboard keys are in small caps. When a plus sign (+) appears between two key names, press both keys at the same time. If a term has an acronym, the term is spelled out only the first time it occurs within a chapter, with its acronym shown in parenthesis. Thereafter, only the acronym is used in that chapter. Notes contain supplementary information.

Select the desired Project Name from the Project Directory.

SIN(A) * COS(B)

CTRL+ ENTER

Sequence of Events (SOE)

Note Instructions or selections can be undone at any step.


! CAUTION

Cautions contain information about potential data loss

Sample use of caution format.


! WARNING
Warnings contain information about potential damage to equipment or harm to personnel.

Sample use of warning format.

Chapter 1

Introduction

User Experience Requirements

21

User Experience Requirements


To effectively use the TriStation 1131 Developers Workbench, you should be familiar with Microsoft Windows. It is helpful, though not required, to have experience with the following: Windows-based software development platforms Programming languages that comply with the IEC-1131 standard, particularly Function Block Diagram, Ladder Diagram and Structured Text Programming of Programmable Logic Controllers (PLCs)

Chapter 1

Introduction

22

How to Contact Triconex

How to Contact Triconex


Sales information and technical support for TriStation 1131 is available at any of the following regional offices, as well as the Triconex World Headquarters:

Regional Offices

Americas Sales & Service Phone:+1-409-935-3555 Fax: +1-409-935-3881 European/African Sales & Service Phone:+33 (0) 1 34 43 26 26 Fax: +33 (0) 1 34 43 26 27 Asia-Pacific Sales & Service Phone:+65-738-5488 Fax: +65-738-5188

Middle East Sales & Service Phone: +971-4-314-949 Fax: +971-4-314-780 Great Britain Phone:+44 (0) 1494 452535 Fax: +44 (0) 1494 452030 Holland Office, c/o IMHOFF SYSTEMS Phone:+31-79-360-05-98 Fax: +31-79-363-64-65

Triconex Corporate Headquarters


Triconex Corporation 15091 Bake Parkway Irvine, CA 92618 USA 800-325-2128 714-699-2100

Sales Department
Sales hours are 08:30 to 17:00 Pacific Standard Time (PST). Sales Phone: 714-699-2107 Sales Fax: 714-768-6601

Chapter 1

Introduction

How to Contact Triconex

23

Technical Support
Before contacting Technical Support, please try to solve your problem by using this manual or the on-line Help system.

Telephone
You can reach Triconex Technical Support by phone between 08:30 a.m. and 17:00 PST, Monday through Friday. Technical support phone numbers: 800-325-2128 and 714-699-2100 When you call, you should be at your computer and have your documentation with you. Be prepared to provide the following information: Product serial numberfound on the software key, the TriStation 1131 box, and/or the About TriStation 1131 selection in the Help menu Product version numberfound by selecting About TriStation 1131 in the Help menu) Type of computer Software version number of Windows NT Exact wording of any messages that have appeared on the screen What you were doing when the problem occurred How you tried to solve the problem

Fax
You can fax questions or comments regarding technical support to 714-768-6601.

24-Hour Bulletin Board System (BBS)


Use the Triconex Bulletin Board to download customer reference documents or upload diagnostic files for evaluation. BBS Numbers: 714-768-4383 or 768-4425 Protocol: BPS, 8, N, 1 (where BPS = 9600 or 14400)

Chapter 1

Introduction

24

How to Contact Triconex

Triconex Internet Web Page


Use the Triconex Internet Web page to read and download the latest information on Triconex Corporation, Triconex products and TriStation 1131. Web page address: http://www.triconex.com

Chapter 1

Introduction

CHAPTER 2

A TriStation 1131 Project

This chapter describes the elements of a TriStation 1131 project and the languages and tools you can use, and discusses methods for developing a project. The following topics are covered: Programming languages Elements of a project TriStation 1131 tools Developing a TriStation 1131 project

26

Programming Languages

Programming Languages
The TriStation 1131 programmers workbench supports three programming languages for developing, testing and documenting process control applications that execute in the TRICON controller. These three languages comply with the IEC 1131-3 International Standard on Programming Languages for Programming Controllers and reflect the guidelines documented in the IEC 65A Type 3 Report: Function Block Diagram (FBD) Ladder Diagram (LD) Structured Text (ST) This section provides basic information about the available programming languages. Refer to Chapter 3, Chapter 4, and Chapter 5 for detailed information about the language editors.

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:

Chapter 2

A TriStation 1131 Project

Programming Languages

27

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 4 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 2

A TriStation 1131 Project

28

Programming Languages

Structured Text (ST) Language


ST is a high-level programming language, similar to PASCAL or C. 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:

Chapter 2

A TriStation 1131 Project

Elements of a Project 29

Elements of a Project
When you use TriStation 1131 to develop an application for process control, the first step is to create a new projectthis 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 1311 project.

Projects for TRICON Systems


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

Chapter 2

A TriStation 1131 Project

30

Elements of a Project

TriStation 1131 Shared Libraries


STDLIB - Standard Library TRILIB - TRICON Library User-derived libraries

Structured Text Editor Ladder Diagram Editor Function Block Diagram Editor
Create and edit Programs, Functions and Function Blocks

Configuration Editor
- Declare Program Instances - Declare TRICON Points - Connect Program Variables to TRICON Points/Tag Names - Configure the TRICON system

TRICON Diagnostic Panel


Monitor the operational status of the TRICON to the fault detail level

User-Derived Functions & Function Blocks


Create your own Functions and Function Blocks

Serial/Network Interface

User-Derived Programs
Create Programs with userderived elements and/or Shared Library elements

Program Instance Declarations


For each Program, declare one or more Program Instances (required for downloading)

TRICON Controller

TRICON Point Connections


Declare TRICON points & assign properties to them

TRICON System Configuration


- Allocate TRICON chassis & modules - Allocate memory for point types - Set system parameters

Serial/Network Interface

TRICON SOE Configuration

Configuration

Emulator Application

Emulator Control Panel


DDE Interface Control and monitor Program Instances downloaded to the Emulator for testing

TRICON Control Panel


Control and monitor Program Instances downloaded to the TRICON for real-time execution

Overview of a TriStation 1131 Project

Chapter 2

A TriStation 1131 Project

Elements of a Project 31

Programs
A program is the highest-level logic element within a TriStation 1131 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 400 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 1131, 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 1131 project, you can download as many as 250 program instances to the TRICON controller. For more information, refer to Program Instances under the upcoming section called Configuration.

Multiple Programs within a Project


A typical TriStation 1131 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, hydrodesulphurization areas, and redistillation areas. Refer to the section called Partitioning the Project later in this chapter for more information.

Chapter 2

A TriStation 1131 Project

32

Elements of a Project

Function Blocks
A function block is an executable logic 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 Librarys 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 1: Evaluation 3:

Evaluation 99:

Evaluation 100:

Like programs, function blocks 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. 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 Partitioning the Project later in this chapter for more information.

Chapter 2

A TriStation 1131 Project

Elements of a Project 33

Functions
A function is a logic 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 Librarys 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.

Chapter 2

A TriStation 1131 Project

34

Elements of a Project

Data Types
Two kinds of data types are applicable to TriStation 1131 projects: Elementary Generic

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 following data types are available to TriStation 1131 users:
Data Type BOOL DATE DINT DT Size & Characteristics A Boolean, 1 bit in length A specific date, in the format D#CCYY-MM-DD A double integer, 32 bits in length A specific date and time, in one of the following formats: DT#CCYY-MMDD-HH-HH:MM:SS DATE_AND_TIME#CCYY-MM-DD-HH:MM:SS A double word, 32 bits in length An integer, 16 bits in length A long real number, 64 bits in length A real number, 32 bits in length A sequence of up to 132 alphanumeric characters delimited by single quotes A period of time (duration) measured in milliseconds. A specific time of day, in one of the following formats: TOD#HH:MM:SS TIME_OF_DAY#HH:MM:SS

DWORD INT LREAL REAL STRING TIME TOD

Chapter 2

A TriStation 1131 Project

Elements of a Project 35

Of the data types listed above, only variables of the following types can be declared as TRICON points. These variables point to hardware addresses in the TRICON and are accessible to all programs in a TriStation 1131 project. BOOL DINT REAL Refer to the upcoming section called Declaring the Project Configuration for more information.

Generic Data Types


Generic data types, identified by the prefix ANY, are used exclusively in functions and function blocks available in the TriStation 1131 shared library. The hierarchy of generic data types recognized by the IEC 1131-3 standard and used by TriStation 1131 is as follows:

For more information, refer to the sections on declaring the properties of functions and function blocks in the FBD and LD chapters.

Chapter 2

A TriStation 1131 Project

36

Elements of a Project

Shared Libraries
For every project, TriStation 1131 provides two standard libraries which contain functions and function blocks you can use for application development: The Standard Library (STDLIB) which complies with the IEC 1131-3 standard The TRICON Library (TR1LIB) for the TRICON platform In addition, you can share the programs, functions and function blocks that you develop with other projects by using TriStation 1131s shared library feature. For more information, refer to Chapter 11, Libraries.

Configuration
A configuration is the element of a TriStation 1131 project that supports the installation of your process control application into the TRICON controller. A configuration consists of the following elements, as shown in the diagram that follows: One or more program instance declarations TRICON point connections TRICON hardware configuration
TriStation 1131 Project
CONFIGURATION

Program

Program Instance 1

Input Variable Output Variable

Instrument Tag Name Instrument Tag Name

Hardware Input Address

Hardware Output Address

Program Instance 2

TRICON Point Connections

TRICON Chassis and Modules

Program Instance 3

Chapter 2

A TriStation 1131 Project

Elements of a Project 37

Methods for developing a configuration are described in an upcoming section called Creating the Project Configuration.

Program Instances
In TriStation 1131, program instances are executable copies of a program type which are downloaded to the TRICON. 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 TRICON configuration is 250.

TRICON Point Connections


Whereas a local variable can only be accessed within the logic element in which it is declared, a TRICON point is accessible to all program instances in the configuration. Each TRICON point is associated with an Input point, Output point or Memory address in the TRICON. Every input and output variable in a program instance must be connected to a TRICON point. The Configuration editor provides the Connections Wizard for making these connections, either manually or automatically.

TRICON Hardware Configuration


Configuration of the TRICON hardware includes the following elements, accessible from the directory tree on the left side of the Configuration Editor window: System parameters such as the network node, scan time, passwords, and memory allocation TRICON chassis I/O and communication modules installed within TRICON chassis

Chapter 2

A TriStation 1131 Project

38

TriStation 1131 Tools

TriStation 1131 Tools


This section describes the main tools available for developing and downloading a TriStation 1131 project: Project Directory Language editors Properties box Options menu for lists TRICON Configuration editor Control panels TRICON Diagnostic Panel Help system

The Project Directory


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

Chapter 2

A TriStation 1131 Project

TriStation 1131 Tools

39

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, exporting elements to a new library, importing libraries to your project, and verifying the version numbers of libraries attached to your project Platform provides access to the Configuration editor, TRICON Control Panel, Emulator Control Panel and TRICON Diagnostic Panel Other for viewing project engineering drawing templates (currently, templates cannot be added or modified)

Language Editors
After opening a TriStation 1131 project, you can choose to create programs, function blocks and functions using any of three IEC-compliant languages: Ladder Diagram (LD) Function Block Diagram (FBD) Structured Text (ST) When you select New Project from the File menu, you select a primary language for the project. 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.

Multiple Languages in a Project


In most cases, it makes sense to develop an entire project using only one languagebut it is possible to use multiple languages within a single project. For example, while you are writing logic 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.

Chapter 2

A TriStation 1131 Project

40

TriStation 1131 Tools

Properties Dialog Box


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

Properties boxes for certain elements include more than one tab page, as shown in the example above for a function block in the FBD language. Click on the desired tab to move it to the front. If you click on the push pin icon in the upper left corner, the Properties box will stay 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 1131 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 1131s editors and control panels, but they do share several commonalities which are described in the following pages.

Pop-up Menu
Pressing the right mouse button while using a TriStation 1131 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 2

A TriStation 1131 Project

TriStation 1131 Tools

41

For A Selected Element For a selected element, TriStation 1131 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 from any 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.

Chapter 2

A TriStation 1131 Project

42

TriStation 1131 Tools

Main Menu & 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 1131 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 1131 views. Refer to other chapters for information about main menu commands which are unique to specific editors and control panels.

Shortcut Keys
In all of TriStation 1131s main menus, 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

Chapter 2

A TriStation 1131 Project

TriStation 1131 Tools

43

Common Menus & Commands for All TriStation 1131 Views


File Edit TRICON Project Element

New Project... Open Project... Save Project... Save As... Close Project... 1 <previously opened project> 2 <previously opened project> Print... Print Preview... Print Reports... Print Setup... Exit

Commands differ for each editor and control panel.

Edit Configuration Build Configuration Rebuild Configuration Compile All Project Elements Emulator Control Panel TRICON Control Panel TRICON Diagnostic Panel View Download History... Change State to Download All

Directory... Description... Security... History... Project Options... TriStation 1131 Options...

Commands differ for each editor and control panel.

View

Tools

Sheets

Window

Help

Commands differ for each editor and control panel.

Commands differ for each editor and control panel.

Commands differ for each editor and control panel.

New Window Cascade Tile Horizontal Tile Vertical Close All Arrange Icons Show Properties Sheet Show Message Bar (Vertical Message Bar) (Horizontal Message Bar) Hide Message Bar 1 PROGRAM: <program name>

TriStation 1131Help Tip of the Day... Keyboard Shortcuts Sample Projects Technical Support About TriStation 1131... TriStation 1131 Logo...

Chapter 2

A TriStation 1131 Project

44

TriStation 1131 Tools

Table of Editing Tools


The table that follows describes the main menu commands which are common to all TriStation 1131 views and the tools in the project toolbar which correspond to these commands.

As noted earlier, the underlined characters shown in the menu and command names are shortcut keys to be used in the typical manner of Windows applications. Note On any TriStation 1131 toolbar, the tooltip (name of a tool) is displayed if you place the cursor inside the icon for the tool. File Menu
Command New Project Open Project Save Project Description Creates a new project. Allows you to select the primary language editor to be used for the project. Opens existing projects. Displays all elements in the project. Saves open project and any project elements (programs, functions, function blocks) that have been opened and/or edited. Saves a project under another filename. Closes the current project. Prints the sheet(s) displayed in the current window. Previews the printing of the sheet(s) displayed in the current window. Allows you to generate a report database and select reports for printing. Lets you select a printer and document properties. Closes the current project and exits TriStation 1131.

Save As Close Project Print Print Preview Print Reports Print Setup Exit

Chapter 2

A TriStation 1131 Project

TriStation 1131 Tools

45

TRICON Menu
Command Edit Configuration Build Configuration Rebuild Configuration Compile All Project Elements Emulator Control Panel TRICON Control Panel TRICON Diagnostic Panel View Download History Change State to Download All Description Opens the TRICON Configuration screen where you allocate hardware, create program instances, and define TRICON point connections for program variables. Compiles and links all configured programs and any dependent elements. Re-compiles and links all configured programs and any dependent elements. Compiles all elements of a project. Opens the Emulator Control Panel for off-line testing of a project. Opens the TRICON Control Panel for on-line monitoring of live data as a project executes in the TRICON. Opens the Diagnostic Panel, which displays all TRICON status indicators and fault detail windows for faulting points. Displays version information for each download of the current project. Allows you to do an off-line comparison of the current configuration with the last configuration that was downloaded to the TRICON.

Project Menu
Command Directory Description Opens the Project Directory dialog box which allows you to open existing elements of the project or create new elements. Displays the Project Description dialog box for viewing or editing.

Description

Chapter 2

A TriStation 1131 Project

46

TriStation 1131 Tools

Project Menu
Command Security History Description Opens the Project Security dialog box for viewing or editing of users, privileges and level names. Displays the Project History (audit trail) of user access and modification. Automatically generated by TriStation 1131 during project development. Opens the Project Options dialog box for selection of the default language, variable annotations and hardware communication parameters. Opens the TriStation 1131 Options dialog box for selection of directory pathnames, message bar specifications, drawing colors, and options for FDB and LD editors.

Project Options

TriStation 1131 Options

Window Menu
Command New Window Cascade Description Opens a new window of the current element. 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 on the windows title bar. Displays any open windows horizontally on the screen. Useful for showing several windows simultaneously. Displays any open windows vertically on the screen. Useful for showing several windows simultaneously. Closes all open windows. Prompts you to save any elements that have been changed since they were opened. Arranges any minimized windows. Displays the Properties dialog box which allows you to declare or view the properties of the selected element. Click on the push pin in the dialog box to continuously display the Properties box.

Tile Horizontal Tile Vertical Close All Arrange Icons Show Properties Box

Chapter 2

A TriStation 1131 Project

TriStation 1131 Tools

47

Window Menu
Command Show Message Bar Vertical Message Bar Horizontal Message Bar Hide Message Bar Description Displays compiler messages in a rectangular box during the building of elements. By default, the message bar is displayed horizontally across the bottom of the screen. If the message bar is displayed horizontally across the bottom of the screen, you can choose to display it vertically along the right side of the screen. If the message is displayed vertically along the right side of the screen, you can choose to display it horizontally across the bottom of the screen. Closes the message bar which displays compiler messages during the building of elements.

Help Menu
Command TriStation 1131 Help Tip of the Day Description Opens the TriStation 1131 Help System. Displays a tip for effective use of TriStation 1131, randomly selected from a database based on users suggestions. Provides keyboard information and shortcuts for the tasks involved in writing logic, such as placing, selecting and editing logic elements. Displays a dialog box that shows the sample projects included with TriStation 1131, which you can duplicate and edit. Provides information on how to contact Triconex for technical support. Displays the current version number of TriStation 1131 and registered owner information. Displays the splash screen that appears when you start up TriStation 1131.

Keyboard Shortcuts Sample Projects

Technical Support About TriStation

1131 TriStation 1131


Logo

Chapter 2

A TriStation 1131 Project

48

TriStation 1131 Tools

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 Emulator Control Panel or TRICON Control Panel. 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 the left mouse button in any 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 2

A TriStation 1131 Project

TriStation 1131 Tools

49

Options Menu for Lists


In TriStation 1131, the attributes of lists with column headings can be altered in two ways: Change the order of appearance of the columns displayed across the screen by clicking and dragging each column to the desired position. Sort the columns alphanumerically by pointing to the heading of the desired column, clicking on the right mouse button, and choosing a sort option from the pop-up menu. In the following example, the cursor was pointing to the Tag Name column in the TRICON Point Connections list when the right mouse button was clicked, so the pop-up menu is displayed with the Tag Name column selected for sorting.

The upper two options in the sort menu apply to the alphanumeric order of the fields in a selected column. The choices are ascending order or descending order. The lower four options apply to saving and resetting the attributes of each column. The default option is Auto Save, which automatically saves the position and sort order of each column when you close the view. As long as Auto Save is on, the columns will be in the same position and sort order the next time you open the window.

Chapter 2

A TriStation 1131 Project

50

TriStation 1131 Tools

Use Save Now to save the attributes of the columns manually at any time. If Auto Save is off, you must remember to use Save Now before exiting the window if you want to preserve the attributes of your columns. Use Reset to Last Save to return the lists to their previously saved order. Reset to Original returns the columns to the default attributes they had the first time you opened a particular list for a new project. Lists with sortable columns and fields can be found in the following TriStation 1131 dialog boxes or views: Project Directory Project Security Project History Sheet Template Program Instance Declarations TRICON Point Connections All tabs in the Variable Declarations window except Graphic View

Help System
TriStation 1131s easy-to-use Help System provides on-line information about the following topics: TriStation 1131 features and capabilities Language editors Standard Library functions and function blocks IEC 1131-3 reference Sample projects Configuration, downloading and diagnostics for the TRICON platform Error messages You can access the Help system from the Help menu or: Press the F1 key when a menu item is highlighted Press the F1 key or choose Help when in a dialog box

Chapter 2

A TriStation 1131 Project

TriStation 1131 Tools

51

TRICON Configuration Editor


The TRICON Configuration editor, accessible from the TRICON menu or the Platform tab in the Project Directory, performs the following functions: Program instancing Naming of TRICON points Connection of program variables to TRICON points System configuration (TRICON hardware allocation & system parameters) 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. The Configuration editor provides access to the Connections Wizard for manual or automatic connection of program variables to TRICON points.

Control Panels
TriStation 1131 provides two kinds of control panels for monitoring the behavior of variables as your application runs: Emulator Control Panel TRICON Control Panel The control panels are accessible from the TRICON menu or the Platform tab in the Project Directory. The operation of both control panels is identicalbut the Emulator Control Panel helps you test your application off-line, while the TRICON Control Panel lets you download, control and monitor an application in the TRICON. 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.

Chapter 2

A TriStation 1131 Project

52

TriStation 1131 Tools

TRICON Diagnostic Panel


The TRICON Diagnostic Panel, accessible from the TRICON 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 TRICON system, including the current project Helps you diagnose faults in the TRICON system so you can replace faulty modules or take other corrective actions Enables/disables and monitors Output Voter Diagnostics (OVD) for output modules

Chapter 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

53

Developing a TriStation 1131 Project


This section provides general guidelines for the main tasks entailed in developing a TriStation 1131 project. The following topics are covered: Typical development approach Partitioning the project Writing the logic for executable elements Creating the project configuration Downloading the configuration

Typical Development Approach


One of the main benefits that TriStation 1131 offers is flexibility of development methods. Beyond basic limitations such as having to write the logic and configure the 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 1131 project:
1 Partition the project. 2 Write the logic for executable elements. 3 Configure the system. 4 Declare program instances. 5 Declare TRICON point connections. 6 Connect program variables to TRICON points. 7 Build the configuration. 8 Test the configuration. 9 Download the configuration.

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

Chapter 2

A TriStation 1131 Project

54

Developing a TriStation 1131 Project

Functional Steps for Creating an IEC-1131-Compliant Control Application

TriStation 1131 Components Used


Project Directory

Partition the Project

Write Logic for Executable Elements

FBD Editor LD Editor ST Editor

Configuration Editor System Parameters Configure the System


Hardware Configuration

Memory Allocation Declare Program Instances Program Instance Declarations

Declare TRICON Point Connections

TRICON Point Connections

Connect Program Variables to TRICON Points

Connections Wizard

Test the Configuration

Emulator Control Panel

Download the Configuration

TRICON Control Panel

Chapter 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

55

Partitioning the Project


TriStation 1131 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 partitioningthat 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: Sample project diagrams Determining the number of programs Program instances versus program copies When to create function blocks When to create functions

Chapter 2

A TriStation 1131 Project

56

Developing a TriStation 1131 Project

Sample Project Diagrams


This section introduces the sample project called FURNACE which will be used to illustrate TriStation 1131 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 AIR DAMPER

FUELGAS VIA HEADER

FUELGAS CONTROL VA;VE

FUELGAS HEADER A TSOV

BURNER 1 TSOV

FUELGAS HEADER B TSOV

IGNITER HEADER

IGNITER 1 TSOV

TO IGNITER 2 TO IGNITER 3 TO IGNITER 4

Chapter 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

57

A TriStation 1131 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 Instance 1: Start_Conditions Program 8: Igniter_Start Instance 1: Igniter_1 Instance 2: Igniter_2 Instance 3: Igniter_3 Instance 4: Igniter_4

Program 3: Minimum_Stop Instance 1: Minimum_Stop

Program 4: Igniter_Header Instance 1: Igniter_Header Program 5: FuelGas_Header Instance 1: FuelGas_Header Program 9: FuelGas_Burner Instance 1: FuelGas_1 Instance 2: FuelGas_2 Instance 3: FuelGas_3 Instance 4: FuelGas_4

Program 6: Process_Trips Instance 1: Process_Trips

Program 10: Air_Damper Instance 1: Air_Damper_1 Instance 2: Air_Damper_2 Instance 3: Air_Damper_3 Instance 4: Air_Damper_4

Program 7: Burner_Start Instance 1: Burner_1 Instance 2: Burner_2 Instance 3: Burner_3 Instance 4: Burner_4

Chapter 2

A TriStation 1131 Project

58

Developing a TriStation 1131 Project

Determining the Number of Programs


A program is the highest-level executable logic 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: Program 2: Program 3: Program 4: Program 5: Program 6: Program 7: Program 8: Program 9: Program 10: AIR_DAMPER BURNER_START FUELGAS_BURNER FUELGAS_HEADER IGNITER_HEADER IGNITER_START MINIMUM_STOP PROCESS_TRIPS SAFE_ATMOSPHERE 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:

Chapter 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

59

Program Instances versus Program 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 or TRICON 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 librarya 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 2

A TriStation 1131 Project

60

Developing a TriStation 1131 Project

Writing the Logic for Executable Elements


In this section, methods for writing the logic are described 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 1131 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 this example 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.) After placing elements on your sheet, you need to connect them with appropriate wires. Refer to Chapter 3, Function Block Diagram (FBD) and the on-line Help system for more information about connecting logic elements with wires.

Chapter 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

61

Chapter 2

A TriStation 1131 Project

62

Developing a TriStation 1131 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:

Chapter 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

63

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.

Chapter 2

A TriStation 1131 Project

64

Developing a TriStation 1131 Project

Including Comments & Annotation


TriStation 1131 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 in 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 3, Chapter 4, and Chapter 5 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 TRICON point to which a program input or output variable is attached. In the FBD or LD editor, the Configuration editor and the Control Panel, you can display an annotated view of any program instance. The example below shows 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.

Chapter 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

65

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 from the IEC and TRICON Standard Libraries Input and output variables and constants Wires that interconnect the various elements Comments and annotation

Chapter 2

A TriStation 1131 Project

66

Developing a TriStation 1131 Project

Declaring the Project Configuration


Before you can download a project to the TRICON controller, you have to declare the project 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 Declare program instances Declare TRICON point connections Connect program variables to TRICON points Build the configuration Refer to Chapter 6, Configuration Editor 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 TRICON menu or the Platform tab in the Project Directory). There you will find a directory tree on the left side of the screen which looks similar to directory trees in the Windows File Manager. Click on 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 on an element in the tree 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 1131 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 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

67

Configuring the TRICON System


One of the top-level nodes in the configuration tree is called TRICON System Configuration, and it allows you to: Specify system parameters Allocate necessary memory for various data types Allocate your TRICON hardware (chassis and modules) Specifying System Parameters Double-clicking on the TRICON System Configuration node in the directory tree allows you to set these system parameters: Network node Scan rate Password required for download Disable stop on operator keyswitch Disable remote changes Respond to the prompts on the TRICON System Configuration screen as needed, and refer to Chapter 6, Configuration Editor for more information. Memory Allocation Click on one of the following point types under the Memory Allocation node of 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. Refer to Chapter 6, Configuration Editor for more information.

Chapter 2

A TriStation 1131 Project

68

Developing a TriStation 1131 Project

Hardware Allocation The Hardware Allocation node of the configuration tree allows you to configure the following aspects of the TRICON hardware: Chassis Power Usage Chassis configuration Module configuration Double-clicking on Hardware Allocation allows you to view the chassis power usage and access the Properties boxes that let you add and delete chassis.
Chassis & Module Configuration

Double-click on a chassis or empty-module node in the configuration tree to view the Properties box that lets you add and delete modules from a chassis. Select the Chassis or Module tab and use the Add/Delete options for chassis or the Insert/ Remove options for modules (slots) as needed. Refer to Chapter 6, Configuration Editor for more information about hardware allocation.
Chassis Power Usage

Clicking on the Hardware Allocation node in the configuration tree displays the Chassis Power Usage screen. This screen includes a separate graphic for each chassis in your TRICON system, and provides the following information about the logic power1 used by each chassis: Total Power Used Total Power Supply (Total Power) Available A typical procedure is to add I/O and communication modules to a chassis, then check to see whether the chassis power usage is viable. If it is not, you can delete modules from this chassis, add another chassis to accommodate these modules, then check on the power usage again. For more information, refer to Chapter 6, Configuration Editor.

1.

Logic power refers to the number and kinds of modules that the Power Modules of a chassis can support without being overloaded.

Chapter 2

A TriStation 1131 Project

Developing a TriStation 1131 Project

69

Declaring Program Instances


Program instances define which programs will be downloaded and executed and which TRICON 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 TRICON points which represent particular hardware addresses in the TRICON. You declare program instances in the Configuration editor by double-clicking on Program Instance Declarations 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 Instance Declarations is the order in which they will be executed. Refer to Chapter 6, Configuration Editor for more detailed information about declaring program instances.

Declaring TRICON Point Connections


After allocating your hardware and declaring your program instances, you need to declare TRICON point connections, also known as global variables in IEC-1131 standard terminology. Each TRICON point connection has two main characteristics: It references an input, output or memory point in the TRICON It is accessible to all program instances within a TriStation 1131 project Input and output variables in each program instance must be connected to TRICON points before downloading. The Configuration editor provides the Connections Wizard for connecting program variables to TRICON pointsrefer to the next section for more information about the Connections Wizard. In TriStation 1131, your program logic is independent of physical points in the TRICON. If your physical connections change, you can easily change the TRICON point connections for each program instance without having to modify the logic or recompile the program. Refer to Chapter 6, Configuration Editor for more detailed information about declaring TRICON point connections.

Chapter 2

A TriStation 1131 Project

70

Developing a TriStation 1131 Project

Using the Connections Wizard


The Connections Wizard allows you to connect program variables to TRICON points of the Input, Output and Memory types. Making these connections is a necessary step before you can test your configuration with the Emulator or download it for execution in the TRICON. 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 TRICON points or automatically connect them using various parameters that you select. Manual connection is a very precise way to connect program variables to TRICON points. With this method, the Connections Wizard lets you select a specific program variable and connect it to a specific TRICON point. Automatically connecting your program variables to TRICON points is a quick way to prepare for testing when some of the information you need to complete your project is temporarily missing. Refer to Chapter 6, Configuration Editor for more detailed information about using the Connections Wizard.

Building, Testing & Downloading


When you have finished making all of the necessary TRICON point connections for your program variables, it is time to build (compile) the configuration. During a build, TriStation 1131 displays a message bar which describes any configuration errors and lets you jump to the error sources from a menu command. For details, refer to the section called Building the Configuration in Chapter 6, Configuration Editor. 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 TRICON Control Panel. For guidelines, refer to Chapter 7, Control Panels.

Chapter 2

A TriStation 1131 Project

CHAPTER 3

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. The following topics are covered: Basic methods of writing logic FBD editing tools Using sheet templates Declaring variables Declaring functions & function blocks Declaring constants Wire properties Network dividers Comments, variable annotation and macros Printing capabilities

72

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: In the Project Directory, choose New to create a new program, function block or function with the Function Block Diagram option checked. TriStation 1131 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. Place your logic elements on the sheet using the FBD toolbar and/or menus. The elements can include variables, constants, functions and function blocks. Connect the logic elements with normal or feedback wires and add horizontal or vertical network dividers if needed. 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. Add comment boxes with macros and/or text that you type in, and turn on variable annotation to document your logic if desired. 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. Test your logic in the Emulator Control Panel, returning to the logic sheet to make any necessary modifications. When testing of the logic is finished, it is time to create your project configuration, as explained in Chapter 6, Configuration Editor.

Chapter 3

Function Block Diagram (FBD)

FBD Editing Tools

73

FBD Editing Tools


To help you write and edit logic in the FBD language, TriStation 1131 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 popup 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


For a selected element, TriStation 1131 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 from any 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

Function Block Diagram (FBD)

74

FBD Editing Tools

Size/Alignment Commands
The pop-up menus Size/Alignment commands help you arrange multiple elements on an FBD logic sheet, as shown in the example below.
w 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.

Chapter 3

Function Block Diagram (FBD)

FBD Editing Tools

75

Main Menu Commands


The FBD main menu appears above the toolbar as follows, and the diagram on the following page shows the commands which are accessible from the it. (Menus and commands which are common to all TriStation 1131 views are described in the section called Basic Editing Tools in Chapter 2, A TriStation 1131 Project.)

Shortcut Keys
In the FBD 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.

Chapter 3

Function Block Diagram (FBD)

76

FBD Editing Tools

Menus & Commands of the FBD Editor


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

File

Edit

TRICON

Project

Element

New Project... Open Project... Save Project... Save As... Close Project... 1 <previously opened project> 2 <previously opened project> Print... Print Preview... Print Reports... Print Setup... Exit

Undo Redo Edit Session Journal Cut Copy Paste Find... Replace... Select Network Contents Select Sheet Contents

Edit Configuration Build Configuration Rebuild Configuration Compile All Project Elements Emulator Control Panel TRICON Control Panel TRICON Diagnostic Panel View Download History... Change State to Download All

Directory... Description... Security... History... Project Options... TriStation 1131 Options...

Save Description... Comment Macros... Variable Declarations... Build Intermediate Code

View

Tools

Sheets

Window

Help

Grid Display Zoom... Zoom to Fit... Zone Display Network Numbers IEC Display Mode

Update Selected Blocks Automatic Naming... Annotate Instance... Select Tool (Arrow) Insert...

Function (Block)... Variable Input Output Constant Wire Comment Horizontal Network Divider Vertical Network Divider

Sheet Title... Next Sheet Previous Sheet Find Sheet... Append Sheet Insert Sheet Delete Sheet Sheet Template...

New Window Cascade Tile Horizontal Tile Vertical Close All Arrange Icons Show Properties Sheet Show Message Bar (Vertical Message Bar) (Horizontal Message Bar) Hide Message Bar 1 PROGRAM: <program name>

TriStation 1131 Help Tip of the Day Keyboard Shortcuts Sample Projects Technical Support About TriStation 1131... TriStation 1131 Logo...

Chapter 3

Function Block Diagram (FBD)

FBD Editing Tools

77

Table of FBD Tools


The table that follows describes the main menu commands which are specific to FBD and the tools in the FBD toolbar which correspond to these commands.

As noted earlier, the underlined characters shown in the menu and command names are shortcut keys to be used in the typical manner of Windows applications. Edit Menu
Command Undo Redo Edit Session Journal Description Reverses the last action performed when editing a project element (program, function, or function block). Reverses the last Undo command. This must be done before any other editing is done. Opens a dialog box which displays a sequential list of 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. Cuts (deletes) selected items from the current sheet and places them on the clipboard, erasing the previous contents. Copies selected items from the current sheet and places them on the clipboard, erasing the previous contents. Pastes the current contents of the clipboard into the current element. 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. Replaces specific text within the logic elements of the current project element.

Cut

Copy Paste Find

Replace

Chapter 3

Function Block Diagram (FBD)

78

FBD Editing Tools

Edit Menu (continued)


Command Select Network Contents Select Sheet Contents Description Selects all logic elements within a network for the current project element. At least one element (input, output, variable) must already be selected. Selects all elements on the current sheet.

Element Menu
Command Save Element Description Description Saves the open element but not the entire project. Gives identifying information about the project creator, creation date, etc. and allows you to select read/write status and enter descriptive text. Allows you to select macros for use in comments for your logic. 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. Updates and compiles the current project element (program, function, function block) without linking it to the project. Displays source code that is generated in the Structured Text language when the current element is compiled.

Comment Macros Variable Declarations

Build Element

Intermediate Code

Chapter 3

Function Block Diagram (FBD)

FBD Editing Tools

79

View Menu
Command Grid Display Description Changes the background of the active window to display or not display an editing grid for precise placement of program elements. Allows you to select the zoom view of your logic sheet from preset and custom views. Displays the entire logic sheet within the current window. Changes the background of the active window to show the zone grid on the sheet. Displays network numbers in the upper left corner for each network on the current sheet. Changes the display characteristics of elements in the current sheet to IEC format.

Zoom Zoom to Fit Zone Display Network Numbers IEC Display Mode

Tools Menu
Command Update Selected Blocks Automatic Naming Annotate Instance Select Tool (Arrow) 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. Description Updates selected out-of-date elements marked with a red X in the active window. Allows you to select a numeric pattern for the automatic naming of program elements. Allows you to select an instance of a program for viewing of annotations, including the values of variables during execution either in the Emulator or the TRICON. Changes the mouse cursor into an arrow when positioned over the active window to allow you to select items.

Chapter 3

Function Block Diagram (FBD)

80

FBD Editing Tools

Tools Menu (continued)


Command Local Variable Input Variable Output Variable Constant Wire Comment Horizontal Network Divider Vertical Network Divider Description Allows you to place a Local variable element on your logic sheet. Allows you to place an Input variable element on your logic sheet. Allows you to place an Output variable element on your logic sheet. Allows you to place a Constant element on your logic sheet. Allows you to connect your logic elements with the wire tool. Allows you to place a comment box on the logic sheet. Allows you to position a horizontal network divider on your logic sheet. Allows you to position a vertical network divider on your logic sheet.

Sheets Menu
Command Sheet Title Description Allows you to edit the title of the current sheet (displayed in the title block, window caption bar and Window Menu list). Displays the next sheet (for logic elements with multiple sheets). Displays the previous sheet (for logic elements with multiple sheets). Allows you to find and select sheets by sheet title and provides access to dialog boxes for insertion, deletion, and appending of sheets. Adds a new sheet to the end of the current project element.

Next Sheet Previous Sheet Find Sheet

Append Sheet

Chapter 3

Function Block Diagram (FBD)

FBD Editing Tools

81

Sheets Menu (continued)


Command Insert Sheet Delete Sheet Sheet Template Description Inserts a new sheet before the current sheet or before a horizontal network boundary (if selected). Deletes the sheet that is currently displayed. Selects a sheet template for the current sheet from a list of available templates.

Chapter 3

Function Block Diagram (FBD)

82

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 the left mouse button 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

Chapter 3

Function Block Diagram (FBD)

Manipulating Logic Sheets

83

Manipulating Logic Sheets


When you open a new program, function or function block in the Project Directory, TriStation 1131 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"

Chapter 3

Function Block Diagram (FBD)

84

Manipulating Logic Sheets

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

Function Block Diagram (FBD)

Declaring Input, Output & Local Variables

85

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 Table of FBD Tools 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 on 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.

Chapter 3

Function Block Diagram (FBD)

86

Declaring Input, Output & Local Variables

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 & Macros for more information.

Chapter 3

Function Block Diagram (FBD)

Declaring Input, Output & Local Variables

87

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 3

Function Block Diagram (FBD)

88

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

Chapter 3

Function Block Diagram (FBD)

Declaring Input, Output & Local Variables

89

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 BOOL DATE DINT DT Size & Characteristics A Boolean, 1 bit in length A specific date, in the format D#CCYY-MM-DD A double integer, 32 bits in length A specific date and time, in one of the following formats: DT#CCYY-MMDD-HH-HH:MM:SS DATE_AND_TIME#CCYY-MM-DD-HH:MM:SS A double word, 32 bits in length An integer, 16 bits in length A long real number, 64 bits in length A real number, 32 bits in length A sequence of up to 132 alphanumeric characters delimited by single quotes A period of time (duration) measured in milliseconds. A specific time of day, in one of the following formats: TOD#HH:MM:SS TIME_OF_DAY#HH:MM:SS

DWORD INT LREAL REAL STRING TIME TOD

Chapter 3

Function Block Diagram (FBD)

90

Declaring Input, Output & Local Variables

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 TRICON points (hardware addresses).

Variable Type
Use the Var Type field under the Declarations tab of the Properties box to select one of the following variable types: Input Output In/Out Local An Input is a variable used to supply a value to program, function block or function. An Output is a variable used to return the result of an evaluation by a program, function block or function. An Input/Output is a variable that serves as both an Input and an Output. A Local is a variable for internal logic only which cannot be connected to a TRICON 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 variables type to In/Out.

Chapter 3

Function Block Diagram (FBD)

Declaring Input, Output & Local Variables

91

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

Chapter 3

Function Block Diagram (FBD)

92

Declaring Input, Output & Local 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

Chapter 3

Function Block Diagram (FBD)

Declaring Input, Output & Local Variables

93

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

Function Block Diagram (FBD)

94

Declaring Input, Output & Local 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. Refer to the section called Comments, Variable Annotation & Macros for more information.

Chapter 3

Function Block Diagram (FBD)

Declaring Constants

95

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 on 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 on 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

Chapter 3

Function Block Diagram (FBD)

96

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 on 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 TRICON 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 TRICON Point Connection, there is no question of displaying various values during execution. However, macros and descriptive text can be used if desired.

Chapter 3

Function Block Diagram (FBD)

Declaring Functions & Function Blocks

97

Declaring Functions & 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.

Chapter 3

Function Block Diagram (FBD)

98

Declaring Functions & Function Blocks

To declare the properties of a function or function block, double-click on the element to bring up the Properties box and click on the push pin. This will keep the 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-1131 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 functions Properties box. All of the inputs to a function must have the same data type. If they do not, TriStation 1131 generates a type mismatch error when you use the Build Element (compile) command.

Chapter 3

Function Block Diagram (FBD)

Declaring Functions & Function Blocks

99

Some functions have inputs of type BOOL, but most inputs have the generic data type called ANY_NUM according to the IEC-1131 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 2, A TriStation 1131 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 functions 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 1131 displays a message to this effect in place of the Number of Inputs field on the functions 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.

Negating Inputs or Outputs


The negation 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 on Negate Selected Input or Negate Output, a small circle appears on the corresponding terminal of the function, as shown in the example that follows. If the Negate Selected Input and/or Negate Output options are grayed out, then negation is not available for the inputs and outputs of this function.

Chapter 3

Function Block Diagram (FBD)

100

Declaring Functions & 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 conditionin 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.

Chapter 3

Function Block Diagram (FBD)

Declaring Functions & Function Blocks

101

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 on the EN/ENO option in the Terminals field of a functions Properties box, EN and ENO parameters are displayed on either side of the function, as shown in the following example:

If EN is False (0), the function has not been called, and the value of ENO is reset to False (0). If EN is True (1), the function has been called, and ENO indicates whether the function has detected an error. If ENO is True, the function has not detected any errors. If ENO is False, the function has detected an error, and evaluation of the network stopsthe 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 1131 CD demonstrates the use of EN/ENO to detect and isolate errors in LD and FBD logic.

Chapter 3

Function Block Diagram (FBD)

102

Declaring Functions & Function Blocks

Declaring the Properties of 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. Inputs List A function block selected from the TriStation 1131 library can have multiple inputs. The names and data type of the inputs are displayed in the Inputs list of the function blocks Properties box. The only property of a function block input that

Chapter 3

Function Block Diagram (FBD)

Declaring Functions & Function Blocks

103

you can modify is the polarity, if the input is of type BOOL. Refer to the upcoming section called Negating 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 blocks Properties box. The only property of a function block output that you can modify is the polarity, if the output is of type BOOL. Refer to the upcoming section called Negating Inputs or Outputs for more information. Negating Inputs or Outputs The negation 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 on the Negate 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 conditionin 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 Negate 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.

Chapter 3

Function Block Diagram (FBD)

104

Declaring Functions & Function Blocks

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 3

Function Block Diagram (FBD)

Wire Properties

105

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:

Chapter 3

Function Block Diagram (FBD)

106

Network Dividers

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

Function Block Diagram (FBD)

Comments, Variable Annotation & Macros

107

Comments, Variable Annotation & Macros


TriStation 1131 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.

Chapter 3

Function Block Diagram (FBD)

108

Comments, Variable Annotation & Macros

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 on 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 on this option to display the actual values of the macros you have included in the selected comment box.

Chapter 3

Function Block Diagram (FBD)

Comments, Variable Annotation & Macros

109

Enable Macro Editing Click on this option and take the following steps to create your own macro by combining other, existing macros: 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. Click on the Enable Macro Editing option. Go to the Edit Fields tab and select a modifiable macro from the list that is displayed. Click on 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 Click on this option 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.

Chapter 3

Function Block Diagram (FBD)

110

Comments, Variable Annotation & Macros

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 3

Function Block Diagram (FBD)

Comments, Variable Annotation & Macros

111

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.

Chapter 3

Function Block Diagram (FBD)

112

Comments, Variable Annotation & Macros

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 3

Function Block Diagram (FBD)

Comments, Variable Annotation & Macros

113

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: Double-click on a variable to bring up the Properties box. Click on the Annotate checkbox in the lower right corner of the Selected tab. If desired, go to the Annotation tab and click on the box for Include monitor value in annotation. The default macro for the variable is already present. To insert an additional macro, click on 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 on 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 TRICON Configuration editor Select an instance name from the Program Instance Declarations node in the configuration tree. Click on the Annotation Instance 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 on the Annotation Instance tool and a readonly 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.

Chapter 3

Function Block Diagram (FBD)

114

Comments, Variable Annotation & Macros

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 TRICON point connection (hardware address) and Alias number

Chapter 3

Function Block Diagram (FBD)

Comments, Variable Annotation & Macros

115

Using Macros
Macros, used in comments and variable annotations, are placeholders for the insertion of text defined or calculated elsewhere in TriStation 1131. There are two types of macros, all of which begin with a percent (%) sign: A system macro has expanded values supplied by TriStation 1131 and cannot be modified. A user-modifiable macro has expanded values supplied by the userit 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

Chapter 3

Function Block Diagram (FBD)

116

Comments, Variable Annotation & Macros

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: In the Properties box for a comment, click on the Macros field (under the Comment tab) to bring up the list of available macros in the Edit Macros dialog box. In the Properties box for an annotation, click on the Macros field (under the Annotation tab) to bring up the list of available macros in the Edit Macros dialog box. Select the macro you want, then use CTRL+C on the keyboard to copy it. Close the Edit Macros dialog box. 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 comments Properties box.)

Chapter 3

Function Block Diagram (FBD)

Comments, Variable Annotation & Macros

117

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: 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. Select the desired user-modifiable macro and click on 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. 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. If you wish to add more than one system macro to the user-modifiable macro, repeat the above process as many times as needed. 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.

Chapter 3

Function Block Diagram (FBD)

118

Comments, Variable Annotation & Macros

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: Default Macros for Variable Classes
Element Type Program Variable Class Input Output Input/Output Local Function/Function Block Input Output Input/Output Local Default Macro %PGM_INPUT %PGM_OUTPUT %PGM_IO %PGM_LOCAL %FB_INPUT %FB_OUTPUT %FB_IO %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. Default Values of Annotation Macros
Macro %PGM_INPUT %PGM_OUTPUT Default Value %PPD_TAGNAME%PPD_CLASS %PPD_LOCATION%PPD_ALIAS %PPD_TAGNAME%PPD_CLASS %PPD_LOCATION%PPD_ALIAS Sample Expanded Macro P1.WATER_LOW DI 03.04.13 10018 P1.VALVE_ON DO 02.03.07 00016

Chapter 3

Function Block Diagram (FBD)

Comments, Variable Annotation & Macros

119

Default Values of Annotation Macros (continued)


Macro %PGM_IO %PGM_LOCAL %FB_INPUT %FB_OUTPUT %FB_IO %FB_LOCAL Default Value %PPD_TAGNAME%PPD_CLASS %PPD_LOCATION%PPD_ALIAS %WHERE_USED <no default> <no default> <no default> <no default> Sample Expanded Macro P1.PROCESS_STATUS MI 40252 PROCESS_COUNT 1(C7) 3(D5) 4(A2) <no default> <no default> <no default> <no default>

There are four macros beginning with %PPD which are expanded by the TRICON platform descriptor and are not user-modifiable: TRICON Platform Descriptor Macros
Macro %PPD_TAGNAME Expanded Value The name of the TRICON point to which the program variable is connected. The class of the TRICON point to which the program variable is connected. For example, MI for Memory Integer or DO for Digital Output. The location of the TRICON point to which the program variable is connected. This only applies to physical input and output points and is displayed in the format CC.SS.PP where CC is the chassis, SS is the slot and PP is the point. For memory points, an empty string is returned. The Modbus alias of the TRICON point to which the program variable is connected. If the point has no alias, an empty string is returned.

%PPD_CLASS

%PPD_LOCATION

%PPD_ALIAS

Chapter 3

Function Block Diagram (FBD)

120

Printing Logic Sheets

Printing Logic Sheets


From the FBD editor, TriStation 1131 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 10, Printing: Standard reports Custom reports designed with Crystal Reports software

Chapter 3

Function Block Diagram (FBD)

CHAPTER 4

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. The following topics are covered: Basic methods for writing logic LD editing tools Manipulating logic sheets Links Power Rails Declaring contacts & coils Declaring local, input and output variables Declaring constants Declaring functions & function blocks Network dividers Comments, variable annotation and macros Printing logic sheets

122

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: In the Project Directory, choose New to create a new program, function block or function with the Ladder Diagram option checked. TriStation 1131 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. Place your logic elements on the sheet using the LD toolbar and/or menus. The elements can include variables, constants, functions and function blocks. Connect the logic elements with normal or feedback wires and add horizontal or vertical network dividers if needed. 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. Add comment boxes with macros and/or text that you type in, and turn on variable annotation to document your logic if desired. 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. Test your logic in the Emulator Control Panel, returning to the logic sheet to make any necessary modifications. When testing of the logic is finished, it is time to create your project configuration, as explained in Chapter 6, Configuration Editor.

Chapter 4

Ladder Diagram (LD)

LD Editing Tools

123

LD Editing Tools
To help you write and edit logic in the LD language, TriStation 1131 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


For a selected element, TriStation 1131 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 from any 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 4

Ladder Diagram (LD)

124

LD Editing Tools

Size/Alignment Commands
The pop-up menus 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 Place 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.

Main Menu Commands


The LD main menu appears above the toolbar as follows, and the diagram on the following page shows the commands which are accessible from the it. (Menus and commands which are common to all TriStation 1131 views are described in the section called Basic Editing Tools in Chapter 2, A TriStation 1131 Project.)

Chapter 4

Ladder Diagram (LD)

LD Editing Tools

125

Shortcut Keys
In the LD 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.
Menus & Commands of the LD Editor
(grayed-out commands are common to all TriStation 1131 views)

File

Edit

TRICON

Project

Element

New Project... Open Project... Save Project... Save As... Close Project... 1 <previously opened project> 2 <previously opened project> Print... Print Preview... Print Reports... Print Setup... Exit

Undo Redo Edit Session Journal Cut Copy Paste Find... Replace... Select Network Contents Select Sheet Contents

Edit Configuration Build Configuration Rebuild Configuration Compile All Project Elements Emulator Control Panel TRICON Control Panel TRICON Diagnostic Panel View Download History... Change State to Download All

Directory... Description... Security... History... Project Options... TriStation 1131 Options...

Save Description... Comment Macros... Variable Declarations... Build Intermediate Code

View

Tools

Sheets

Window

Help

Grid Display Zoom... Zoom to Fit... Zone Display Network Numbers IEC Display Mode

Update Selected Blocks Automatic Naming... Annotate Instance... Select Tool (Arrow) Insert...

Function (Block)... Contact Coil Right Power Rail Local Variable Input Variable Output Variable Constant Link Comment Horizontal Network Divider Vertical Network Divicer

Sheet Title... Next Sheet Previous Sheet Find Sheet... Append Sheet Insert Sheet Delete Sheet Sheet Template...

New Window Cascade Tile Horizontal Tile Vertical Close All Arrange Icons Show Properties Sheet Show Message Bar (Vertical Message Bar) (Horizontal Message Bar) Hide Message Bar 1 PROGRAM: <program name>

TriStation 1131 Help Tip of the Day Keyboard Shortcuts Sample Projects Technical Support About TriStation 1131... TriStation 1131 Logo...

Chapter 4

Ladder Diagram (LD)

126

LD Editing Tools

Table of LD Tools
The table that follows describes the main menu commands which are specific to LD and the tools in the LD toolbar which correspond to these commands.

As noted earlier, the underlined characters shown in the menu and command names are shortcut keys to be used in the typical manner of Windows applications. Edit Menu
Command Undo Redo Edit Session Journal Description Reverses the last action performed when editing a project element (program, function, or function block). Reverses the last Undo command. This must be done before any other editing is done. Opens a dialog box which displays a sequential list of 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. Cuts (deletes) selected items from the current sheet and places them on the clipboard, erasing the previous contents on the clipboard. Copies selected items from the current sheet and places them on the clipboard, erasing the previous contents on the clipboard. Pastes the current contents of the clipboard into the current element. 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. Replaces specific text within the logic elements of the current project element.

Cut

Copy

Paste Find

Replace

Chapter 4

Ladder Diagram (LD)

LD Editing Tools

127

Edit Menu (continued)


Select Network Contents Select Sheet Contents Selects all logic elements within a network for the current project element. At least one element (input, output, variable) must already be selected. Selects all elements on the current sheet.

Element Menu
Command Save <element name> Description Description Saves the open element but not the entire project. Gives identifying information about the project creator, creation date, etc. and allows you to select read/write status and enter descriptive text. Allows you to select macros for use in comments within your logic. 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. Updates and compiles the current project element (program, function, function block) without linking it to the project. Displays source code that is generated in the Structured Text language when the current element is compiled.

Comment Macros Variable Declarations

Build Element

Intermediate Code

Chapter 4

Ladder Diagram (LD)

128

LD Editing Tools

View Menu
Command Grid Display Description Changes the background of the active window to display or not display an editing grid for precise placement of program elements. Allows you to select the zoom view of your logic sheet from preset and custom views. Displays the entire logic sheet within the current window. Changes the background of the active window to show the zone grid on the sheet. Displays network numbers in the upper left corner for each network on the current sheet. Changes the display characteristics of elements in the current sheet to IEC format.

Zoom Zoom to Fit Zone Display Network Numbers IEC Display Mode

Tools Menu
Command Update Selected Blocks Automatic Naming Annotate Instance Description Updates selected out-of-date elements marked with a red X in the active window. Allows you to select a numeric pattern for the automatic naming of program elements. Allows you to select an instance of a program for viewing of annotations, including the values of variables during execution either in the Emulator or the TRICON. Changes the mouse cursor into an arrow when positioned over the active window to allow you to select items.

Select Tool (Arrow) 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.

Chapter 4

Ladder Diagram (LD)

LD Editing Tools

129

Tools Menu (continued)


Command Contact Description Allows you to place a Contact element on the logic sheet. A contact represents the status of an Input variable. Allows you to place a Coil element on the logic sheet. A coil represents the assignment or status of an Output variable. 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. Allows you to place a Local variable element on your logic sheet. Allows you to place an Input variable element on your logic sheet. Allows you to place an Output variable element on your logic sheet. Allows you to place a Constant element on your logic sheet. Allows you to connect your logic elements with the link tool. Allows you to place a comment box on the logic sheet. Allows you to position a horizontal network divider on your logic sheet. Allows you to position a vertical network divider on your logic sheet.

Coil

Right Power Rail

Local Variable Input Variable Output Variable Constant Link Comment Horizontal Network Divider Vertical Network Divider

Chapter 4

Ladder Diagram (LD)

130

LD Editing Tools

Sheets Menu
Command Sheet Title Description Allows you to edit the title of the current sheet (displayed in the title block, window caption bar and Window Menu list). Displays the next sheet (for logic elements with multiple sheets). Displays the previous sheet (for logic elements with multiple sheets). Allows you to find and select sheets by sheet title and provides access to dialog boxes for insertion, deletion, and appending of sheets. Adds a new sheet to the end of the current project element. Inserts a new sheet before the current sheet or before a horizontal network boundary (if selected). Deletes the sheet that is currently displayed. Selects a sheet template for the current sheet from a list of available templates.

Next Sheet Previous Sheet Find Sheet

Append Sheet Insert Sheet Delete Sheet Sheet Template

Chapter 4

Ladder Diagram (LD)

LD Editing Tools

131

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 the left mouse button 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

Chapter 4

Ladder Diagram (LD)

132

Manipulating Logic Sheets

Manipulating Logic Sheets


When you open a new program, function or function block in the Project Directory, TriStation 1131 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"

Chapter 4

Ladder Diagram (LD)

Manipulating Logic Sheets

133

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 1131. 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 4

Ladder Diagram (LD)

134

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.

Chapter 4

Ladder Diagram (LD)

Power Rails 135

Power Rails
Left and right power rails are the delimiters of LD networks. Whenever TriStation 1131 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 4

Ladder Diagram (LD)

136

Declaring Contacts & Coils

Declaring Contacts & 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. (Refer to the section called Table of LD Tools earlier in this chapter 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 on 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.

Chapter 4

Ladder Diagram (LD)

Declaring Contacts & Coils

137

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 & Macros later in this chapter for more information.

Chapter 4

Ladder Diagram (LD)

138

Declaring Contacts & 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 Normally Open Normally Closed Symbol | | Description The state of the left link is copied to the right link if the state of the Boolean variable is ON. The state of the left link is copied to the right link if the state of the Boolean variable is OFF. 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. 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.

| / |

Positive Transition

| P |

Negative Transition

| N |

Chapter 4

Ladder Diagram (LD)

Declaring Contacts & Coils

139

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 Normal (Momentary Symbol ( ) Description The state of the left link is copied to the associated Boolean variable and to the right link. The inverse of the left links state is copied to the associated Boolean variable and to the right link. The state of the associated Boolean variable is ON from one evaluation to the next when the left link transitions from OFF to ON. The state of the associated Boolean variable is ON from one evaluation to the next when the left link transitions from ON to OFF. 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. 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.

Negated (Momentary)

( / )

Positive Transition

(P)

Negative Transition

(N)

Set (Latch)

(S)

Reset (Unlatch)

(R)

Chapter 4

Ladder Diagram (LD)

140

Declaring Contacts & 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.

Chapter 4

Ladder Diagram (LD)

Declaring Contacts & Coils

141

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 typeall contacts and coils are of type BOOL Select the variable typeInput, 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 TRICON 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 TRICON point.

Chapter 4

Ladder Diagram (LD)

142

Declaring Contacts & Coils

An Input/Output is a variable that serves as both an Input and an Output. An Input/ Output variable must be connected to a TRICON point. A Local is a variable for internal logic only which cannot be connected to a TRICON 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 variables 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, refer to the section called Inserting Macros into Comments or Annotations later in this chapter.

Chapter 4

Ladder Diagram (LD)

Declaring Contacts & Coils

143

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

Chapter 4

Ladder Diagram (LD)

144

Declaring Contacts & Coils

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 4

Ladder Diagram (LD)

Declaring Contacts & Coils

145

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 & Macros.

Chapter 4

Ladder Diagram (LD)

146

Declaring Local, Input & Output Variables

Declaring Local, Input & 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 Table of LD Tools 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 on 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 4

Ladder Diagram (LD)

Declaring Local, Input & Output Variables

147

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 & 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 & Coils for more information.

Chapter 4

Ladder Diagram (LD)

148

Declaring Local, Input & Output Variables

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 4

Ladder Diagram (LD)

Declaring Local, Input & Output Variables

149

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 4

Ladder Diagram (LD)

150

Declaring Local, Input & 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 BOOL DATE DINT DT Size & Characteristics A Boolean, 1 bit in length. A specific date, in the following format: D#CCYY-MM-DD. A double integer, 32 bits in length. A specific date and time, in one of the following formats: DT#CCYY-MMDD-HH-HH:MM:SS DATE_AND_TIME#CCYY-MM-DD-HH:MM:SS A double word, 32 bits in length. An integer, 16 bits in length. A long real number, 64 bits in length. A real number, 32 bits in length. A sequence of up to 132 alphanumeric characters delimited by single ( ' ) quotes. A period of time (duration) in days, hours, minutes, seconds, or milliseconds. A specific time of day, in one of the following formats: TOD#HH:MM:SS TIME_OF_DAY#HH:MM:SS

DWORD INT LREAL REAL STRING TIME TOD

Chapter 4

Ladder Diagram (LD)

Declaring Local, Input & Output Variables

151

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 TRICON points (hardware addresses).

Variable Type
Use the Var Type field under the Declarations tab of the Properties box to select one of the following variable types: Input Output In/Out Local An Input is a variable used to supply a value to program, function block or function. An Output is a variable used to return the result of an evaluation by a program, function block or function. An Input/Output is a variable that serves as both an Input and an Output. A Local is a variable for internal logic only which cannot be connected to a TRICON 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 variables type to In/Out.

Chapter 4

Ladder Diagram (LD)

152

Declaring Local, Input & Output Variables

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

Chapter 4

Ladder Diagram (LD)

Declaring Local, Input & Output Variables

153

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 4

Ladder Diagram (LD)

154

Declaring Local, Input & Output 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:

Chapter 4

Ladder Diagram (LD)

Declaring Local, Input & Output Variables

155

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 & Macros.

Chapter 4

Ladder Diagram (LD)

156

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 on 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 on 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 4

Ladder Diagram (LD)

Declaring Constants

157

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 on 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 & 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 TRICON 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 TRICON Point Connection, there is no question of displaying various values during execution. However, macros and descriptive text can be used if desired.

Chapter 4

Ladder Diagram (LD)

158

Declaring Functions & Function Blocks

Declaring Functions & 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 4

Ladder Diagram (LD)

Declaring Functions & Function Blocks

159

To declare the properties of a function or function block, double-click on the element to bring up the Properties dialog box and click on the push pin. This will keep the Properties box displayed on top as you move from element to element declaring properties.

Declaring the Properties of Functions


The Properties dialog box for a function has only one tab with several usermodifiable 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-1131 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 1131 generates a type mismatch error when you use the Build Element (compile) command.

Chapter 4

Ladder Diagram (LD)

160

Declaring Functions & Function Blocks

Some functions have inputs of type BOOL, but most inputs have the generic data type called ANY_NUM according to the IEC-1131 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 2, A TriStation 1131 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 functions 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 1131 displays a message to this effect in place of the Number of Inputs field on the functions 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.

Negating Inputs or Outputs


The negation 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 on Negate Selected Input or Negate Output, a small circle appears on the corresponding terminal of the function, as shown in the example that follows. If the Negate Selected Input and/or Negate Output options are grayed out, then negation is not available for the inputs and outputs of this function.

Chapter 4

Ladder Diagram (LD)

Declaring Functions & Function Blocks

161

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

Chapter 4

Ladder Diagram (LD)

162

Declaring Functions & Function Blocks

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 stopsthe 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 1131 CD demonstrates the use of EN/ENO to detect and isolate errors in LD and FBD logic.

Chapter 4

Ladder Diagram (LD)

Declaring Functions & Function Blocks

163

Declaring the Properties of 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 1131 library can have multiple inputs. The names and data type of the inputs are displayed in the Inputs list of the function blocks Properties dialog box. The only property of a function block

Chapter 4

Ladder Diagram (LD)

164

Declaring Functions & Function Blocks

input that you can modify is negation, if the input is of type BOOL. Refer to the upcoming section called Negating 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 blocks Properties dialog box. The only property of a function block output that you can modify is negation, if the output is of type BOOL. Refer to the upcoming section called Negating Inputs or Outputs for more information. Negating Inputs or Outputs The negation 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 on the Negate 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 conditionin 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 Negate 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 4

Ladder Diagram (LD)

Declaring Functions & Function Blocks

165

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.

Chapter 4

Ladder Diagram (LD)

166

Network Dividers

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

Ladder Diagram (LD)

Comments, Variable Annotation & Macros

167

Comments, Variable Annotation & Macros


TriStation 1131 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 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.

Chapter 4

Ladder Diagram (LD)

168

Comments, Variable Annotation & Macros

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 on 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 on this option to display the actual values of the macros you have included in the selected comment box.

Chapter 4

Ladder Diagram (LD)

Comments, Variable Annotation & Macros

169

Enable Macro Editing Click on this option and take the following steps to create your own macro by combining other, existing macros: 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. Click on the Enable Macro Editing option. Go to the Edit Fields tab and select a modifiable macro from the list that is displayed. Click on 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 Click on this option 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.

Chapter 4

Ladder Diagram (LD)

170

Comments, Variable Annotation & Macros

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 4

Ladder Diagram (LD)

Comments, Variable Annotation & Macros

171

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

Chapter 4

Ladder Diagram (LD)

172

Comments, Variable Annotation & Macros

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 4

Ladder Diagram (LD)

Comments, Variable Annotation & Macros

173

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: Double-click on a variable to bring up the Properties box. Click on the Annotate checkbox in the lower right corner of the Selected tab. If desired, go to the Annotation tab and click on the box for Include monitor value in annotation. The default macro for the variable is already present. To insert an additional macro, click on 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 on 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 TRICON Configuration editor Select an instance name from the Program Instance Declarations node in the configuration tree. Click on 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 below was invoked from the TRICON Configuration editor. From the Control Panel Select an instance name from the program instance variable tree. Click on the Annotation Instance tool and a readonly 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.

Chapter 4

Ladder Diagram (LD)

174

Comments, Variable Annotation & Macros

Instance View in TRICON Configuration Editor

Chapter 4

Ladder Diagram (LD)

Comments, Variable Annotation & Macros

175

Using Macros
Macros, used in comments and variable annotations, are placeholders for the insertion of text defined or calculated elsewhere in TriStation 1131. There are two types of macros, all of which begin with a percent (%) sign: A system macro has expanded values supplied by TriStation 1131 and cannot be modified.

A user-modifiable macro has expanded values supplied by the userit 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

Chapter 4

Ladder Diagram (LD)

176

Comments, Variable Annotation & Macros

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: In the Properties dialog box for a comment, click on the Macros button (under the Comment tab) to bring up the list of available macros in the Edit Macros dialog box. In the Properties box for an annotation, click on the Macros button (under the Annotation tab) to bring up the list of available macros in the Edit Macros dialog box. Select the macro you want, then use Ctrl-C on the keyboard to copy it. Close the Edit Macros dialog box. 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 comments 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 4

Ladder Diagram (LD)

Comments, Variable Annotation & Macros

177

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: 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. Select the desired user-modifiable macro and click on 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. 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. If you wish to add more than one system macro to the user-modifiable macro, repeat the above process as many times as needed. 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.

Chapter 4

Ladder Diagram (LD)

178

Comments, Variable Annotation & Macros

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: Default Macros for Variable Classes
Element Type Program Variable Class Input Output Input/Output Local Function/Function Block Input Output Input/Output Local Default Macro %PGM_INPUT %PGM_OUTPUT %PGM_IO %PGM_LOCAL %FB_INPUT %FB_OUTPUT %FB_IO %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. Default Values of Annotation Macros
Macro %PGM_INPUT %PGM_OUTPUT Default Value %PPD_TAGNAME%PPD_CLASS %PPD_LOCATION%PPD_ALIAS %PPD_TAGNAME%PPD_CLASS %PPD_LOCATION%PPD_ALIAS Sample Expanded Macro P1.WATER_LOW DI 03.04.13 10018 P1.VALVE_ON DO 02.03.07 00016

Chapter 4

Ladder Diagram (LD)

Comments, Variable Annotation & Macros

179

Default Values of Annotation Macros (continued)


Macro %PGM_IO %PGM_LOCAL %FB_INPUT %FB_OUTPUT %FB_IO %FB_LOCAL Default Value %PPD_TAGNAME%PPD_CLASS %PPD_LOCATION%PPD_ALIAS %WHERE_USED <no default> <no default> <no default> <no default> Sample Expanded Macro P1.PROCESS_STATU S MI 40252 PROCESS_COUNT 1(C7) 3(D5) 4(A2) <no default> <no default> <no default> <no default>

There are four macros beginning with %PPD which are expanded by the TRICON platform descriptor and are not user-modifiable: TRICON Platform Descriptor Macros
Macro %PPD_TAGNAME Expanded Value The name of the TRICON point to which the program variable is connected. The class of the TRICON point to which the program variable is connected. For example, MI for Memory Integer or DO for Digital Output. The location of the TRICON point to which the program variable is connected. This only applies to physical input and output points and is displayed in the format CC.SS.PP where CC is the chassis, SS is the slot and PP is the point. For memory points, an empty string is returned. The Modbus alias of the TRICON point to which the program variable is connected. If the point has no alias, an empty string is returned.

%PPD_CLASS

%PPD_LOCATION

%PPD_ALIAS

Chapter 4

Ladder Diagram (LD)

180

Printing Logic Sheets

Printing Logic Sheets


From the LD editor, TriStation 1131 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 10, Printing: Standard reports Custom reports designed with Crystal Reports software

Chapter 4

Ladder Diagram (LD)

CHAPTER 5

Structured Text (ST)

Note The Structured Text (ST) language is fully functional and projects can be developed with complete confidence using the ST editor. However, documentation of the ST editor is still in progress and will be included in a future edition of this manual. This chapter will describe basic methods of writing logic in the ST language, covering the following topics: Basic methods of writing logic ST editing tools Using sheet templates Declaring variables Invoking functions Invoking function blocks Using constants Dividing logic into networks Comments, variable annotation and macros Printing logic sheets

CHAPTER 6

Configuration Editor

To create a configuration for a TriStation 1131 project, you must use the TRICON Configuration editor to allocate TRICON hardware, set system parameters and connect program variables to TRICON points. This chapter provides details and examples about these tasks, covering the following topics: Configuration tools Setting system parameters Hardware allocation Changing memory allocation Declaring program instances Declaring TRICON point connections Using the Connections Wizard Connecting individual program variables Building the configuration Exporting TRICON point properties Importing TRICON point properties Configuring the TRICON for event collection

184

Configuration Tools

Configuration Tools
To help you set up your TRICON configuration, the Configuration editor provides tools you can select from: The main menu The toolbar The options menu for lists The upcoming sections describe the Configuration tools in detail. (Menus and commands which are common to all TriStation 1131 views are described in the section called Basic Editing Tools in Chapter 2, A TriStation 1131 Project.)

Main Menu Commands


The main menu of the TRICON Configuration editor appears above the toolbar as follows, and the diagram on the following page shows the commands which are accessible from the it.

Shortcut Keys
In the TRICON Configuration 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

Chapter 6

Configuration Editor

Configuration Tools

185

Menus & Commands of TRICON Configuration Editor


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

File

Edit

TRICON

Project

Element

New Project... Open Project... Save Project... Save As... Close Project... 1 <previously opened project> 2 <previously opened project> Print... Print Preview... Print Reports... Print Setup... Exit

Undo Redo Edit Session Journal Cut Copy Paste Find Import TRICON Points Export TRICON Points

Edit Configuration Build Configuration Rebuild Configuration Compile All Project Elements Emulator Control Panel TRICON Control Panel TRICON Diagnostic Panel View Download History... Change State to Download All

Directory... Description... Security... History... Project Options... TriStation 1131 Options...

Save Configuration Description... Comment Macros... Build Intermediate Code

Tree

View

Commands

Tools

Window

Help

Expand One Level Expand Branch Expand All Collapse Branch

Program Instances Memory Points Input Points Output Points Memory Allocation Hardware Allocation SOE Blocks

Compare to Last Download

Instance View Connections Wizard

New Window Cascade Tile Horizontal Tile Vertical Close All Arrange Icons Show Properties Box Show Message Bar (Vertical Message Bar) (Horizontal Message Bar) Hide Message Bar 1 PROGRAM: <name>

TriStation 1131 Help Tip of the Day Keyboard Shortcuts Sample Projects Technical Support About TriStation 1131... TriStation 1131 Logo...

Chapter 6

Configuration Editor

186

Configuration Tools

Table of Configuration Tools


The table that follows describes the main menu commands which are specific to the TRICON Configuration editor and the corresponding tools in the toolbar.

Note On any TriStation 1131 toolbar, the name of a tool is displayed if you place the cursor inside the icon for the tool. Edit Menu Command
Undo Redo Edit Session Journal

Description
Reverses the last edit of a variable, function or function block. Reverses the last Undo command. This must be done before any other editing is done. Opens a dialog box which displays a sequential list of 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. Cuts (deletes) selected items from the current configuration and places them on the clipboard, erasing the previous contents. Copies selected items from the current configuration and places them on the clipboard, erasing the previous contents. Pastes the current contents of the clipboard into the selected element. Finds TRICON points in the current configuration by looking for their Alias, Location or Tag Name properties. Can Go To a selected found point. Allows you to import TRICON point properties from database, Excel and text files.

Cut

Copy

Paste Find

Import TRICON Points

Chapter 6

Configuration Editor

Configuration Tools

187

Edit Menu
Export TRICON Points Allows you to export TRICON point properties from TriStation 1131 to database, Excel and text files.

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

Tree Menu
Command Expand One Level Expand Branch Expand All Collapse Branch Description Expands a selected tree node by one level. Expands a selected tree node to all levels. Expands the whole tree to all levels. Collapses a selected branch of the tree.

View Menu
Command Program Instances Memory Points Input Points Output Points Description Displays the Program Instance window. Displays the TRICON Point Connections window for Memory points. Displays the TRICON Point Connections window for Input points. Displays the TRICON Point Connections window for Output points.

Chapter 6

Configuration Editor

188

Configuration Tools

View Menu
Command Memory Allocation Hardware Allocation SOE Blocks Description Displays the Memory Allocation window. Displays an image of a TRICON chassis in the Hardware Allocation window. Displays the TRICON SOE Configuration window.

Commands Menu
Command
Compare to Last Download

Description Allows you to do an off-line comparison of the current configuration with the last configuration that was downloaded to the TRICON.

Tools Menu Command


Instance View

Description
Opens a read-only view of the program logic for a selected program instance. The tooltip for this tool is called Annotated Instance. Opens the Connections Wizard which allows you to connect program instance variables to TRICON points with Tag Names and other properties.

Connections Wizard

Options Menu for Lists


In the Program Instance Declarations window and the TRICON Point Connections window, the attributes of lists with column headings can be altered in two ways: Change the order of appearance of the columns displayed across the screen by clicking and dragging each column to the desired position. Sort the columns alphanumerically by pointing to the heading of the desired column, clicking on the right mouse button, and choosing a sort option from the pop-up menu.

Chapter 6

Configuration Editor

Configuration Tools

189

In the following example, the cursor was pointing to the Tag Name column in the TRICON Point Connections list when the right mouse button was clicked, so the pop-up menu is displayed with the Tag Name column selected for sorting.

The upper two options in the sort menu apply to the alphanumeric order of the fields in a selected column. The choices are ascending order or descending order. The lower four options apply to saving and resetting the attributes of each column. The default option is Auto Save, which automatically saves the position and sort order of each column when you close the view. As long as Auto Save is on, the columns will be in the same position and sort order the next time you open the window. Use Save Now to save the attributes of the columns manually at any time. If Auto Save is off, you must remember to use Save Now before exiting the window if you want to preserve the attributes of your columns. Use Reset to Last Save to return the lists to their previously saved order. Reset to Original returns the columns to the default attributes they had the first time you opened a particular list for a new project.

Chapter 6

Configuration Editor

190

Setting System Parameters

Setting System Parameters


Double-click on the TRICON System Configuration icon in the configuration tree to set the system parameters in the dialog shown below.

Network Node
The Network Node parameter specifies the TRICON node where you will download or monitor a TriStation 1131 project. The Network Node names available for selection can be either of these types: Default names in the form TRINODE<node number>, where <node number> ranges from 01 to 32 Unique names that you create for any of 32 nodes using the Communications tab of the Project Options dialog box If you are using a single-node TRICON network (one TRICON system and one PC running TriStation 1131), the default node names and their associated default TCP/

Chapter 6

Configuration Editor

Setting System Parameters

191

IP addresses are sufficient for your needs. However, if you are using a multi-node TRICON network, you will have to modify the default TCP/IP addresses that TriStation 1131 provides when you install it. First you need to obtain the actual TCP/IP addresses from your System Administrator or IS department, then to go to the Communications tab of the Project Options dialog box to add or modify TCP/IP addresses. For details, refer to the Project Options section of Chapter 9, System Administration. Note When you use the Connect command in the TRICON Control Panel to connect a TriStation 1131 application with a TRICON, you must choose either a serial port or the same TRICON node name that you selected for the Network Node parameter described above.

Scan Rate
The scan rate is the interval, in milliseconds, that you designate for evaluations (in other words, scans) of the TriStation 1131 project as it executes in the TRICON. The time it actually takes to do the evaluation may be less that the scan rate. To avoid scan-rate overrun problems, you must select a scan rate which includes execution time for all networks. The default scan rate is 200 milliseconds. Note The measured scan rate is 2-20 milliseconds more than the selected scan rate, depending on the number of active I/O modules and active Main Processors in the TRICON system.

Password Required for Download All


If you check this box and enter a password here, then you must specify this password before doing a Download All of your configuration.

Disable STOP on Operator Keyswitch


This parameter is used to logically disable the STOP position of the keyswitch on the TRICON Main Chassis for security purposes. By default, the STOP position is logically disabled, so that physically setting the TRICON keyswitch to STOP will not halt the control program. If the STOP position is logically enabled, physically setting the TRICON keyswitch to STOP will halt the control program.

Chapter 6

Configuration Editor

192

Setting System Parameters

Disable Remote Changes


If you check this box, Modbus Masters and TCP/IP hosts will not be able to change the value of a TRICON controllers outputs. Leaving this box unchecked means that Modbus Masters and TCP/IP hosts will be able to make changes to outputs.

Note about Time Synchronization


If you have selected time synchronization with the TRICON Master Node on an NCM NET1 port or an ACM NET2 port, TriStation 1131 displays the following note at the bottom of the System Configuration dialog: Note Time synchronization of this TRICON node with the TRICON Master Node has been enabled by one of the communication modules. To select a time synchronization option for an ACM, NCM or SMM port, refer to instructions in Appendix A, Configurable Modules. The EICM and HIM do not support time synchronization. For further information about the use of time synchronization in a multi-node installation, please contact a Triconex Customer Support Engineer and/or your System Administrator.
! WARNING

In a TRICON system with multiple communication modules, you should select only one to perform time synchronization.

Chapter 6

Configuration Editor

Hardware Allocation 193

Hardware Allocation
The following information is accessible from the Hardware Allocation node of the configuration tree: Chassis Power Usage Chassis configuration Slot configuration Double-click on Hardware Allocation to view the chassis power usage and access the Properties boxes that let you add and delete chassis. Click on a chassis or slot icon in the tree to view the Properties box that lets you add and delete modules from a chassis. A typical procedure is to add I/O and communication modules to a chassis, then check to see whether the chassis power usage is viable. If it is not, you can delete modules from this chassis, add another chassis to accommodate these modules, then check on the power usage again. Note If you click on the push pin icon in the upper left corner, the Properties box will stay on top of all other displays and reflect each successive element you select as you perform the various tasks required for your project configuration.

Adding & Deleting Chassis


Every TRICON system begins with a Main Chassis, so you will find an element called Chassis 1:HD_MAIN the first time you open the Hardware Allocation directory. Double-click on this element to display the Properties box which allows you to add and delete chassis from your TRICON system. You must select the Chassis tab from the Properties box to do this taskthis Properties box also has a Module tab.

Adding & Deleting Modules


When you open a Chassis <number>:<type> directory of the configuration tree, a list of the available slots is shown. (The presence of Main Processors and Power Modules is assumed, so you cannot modify the slots containing them.) Doubleclick on the desired slot to display the Properties box which allows you to add and delete modules from the selected TRICON chassis. You must select the Module tab from the Properties box to do this taskthis Properties box also has a Chassis tab. The Configuration editor displays the TRICON chassis and the Properties box as shown below to help you select chassis and modules:

Chapter 6

Configuration Editor

194

Hardware Allocation

When you click on the Insert option of the Properties box, a list of all available module types is displayed. For the following modules, you need to use the Setup option in the Properties box to configure additional parameters: Enhanced Intelligent Communication Module (EICM) model 4119 Pulse Input Module (PI) model 3510 Safety Manager Module (SMM) model 4409 Advanced Communication Module (ACM) model 4609 Network Communication Module (NCM) model 4329 Hiway Interface Module (HIM) model 4509 For details, refer to Appendix A, Configurable Modules.

Chapter 6

Configuration Editor

Hardware Allocation 195

Chassis Power Usage


When you click on the Hardware Allocation icon in the configuration tree, the Chassis Power Usage is displayed, as shown in the example below. A separate display is provided for each chassis in your TRICON system.

Power usage or logic power refers to the number and kinds of modules that the Power Modules of a TRICON chassis can support without being overloaded. Total Power Used shows how much logic power is being used by the current configuration of modules in a chassis. Total Power Supply is the maximum logic power that the chassis can support. The pie chart graphically represents these proportions. If the number given for Available is negative, this chassis is using too much logic power. This means you have to delete one or more modules from this chassis and add them to another chassis instead. After doing this, you should look at the Chassis Power Usage screen again to make sure that the logic power for each chassis falls within acceptable limits. For more information about logic power, refer to the TRICON Planning & Installation Guide.

Chapter 6

Configuration Editor

196

Changing Memory Allocation

Changing Memory Allocation


The Memory Allocation node of the configuration tree allows you to change the memory allocation for the following point types if necessary: Memory points Input points Output points Click on the desired point type in the tree to display color-coded graphs that provide the following categories of information about memory allocation, as shown in the example below:
Maximum Allocated Forecast Current Maximum number of points available Number of points allocated Estimated number of points referenced after next Download Change Number of points currently referenced

Chapter 6

Configuration Editor

Changing Memory Allocation

197

To change the memory allocation, double-click on the graph for a particular point type, such as Read Aliased BOOL Input points. A dialog box comes up with a slider bar that moves up and down to increase or decrease the memory allocation, as shown in the following graphic. You can also use the arrow keys or the Page Up and Page Down keys to move the slider bar.

Chapter 6

Configuration Editor

198

Changing Memory Allocation

Application Data
The selection called Application Data under the Memory Allocation icon displays two graphs, as shown in the example below: PROGRAM shows the amount of space allocated for local variables in program instances LIBRARY shows the amount of space allocated for externally compiled libraries

As a user, you cannot directly change the memory allocation for Application Data. However, if you rebuild a project after updating its shared libraries, TriStation 1131 may change the memory allocation for Application Data.

Downloading Considerations
When you do a Download All of your configuration, TriStation 1131 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.

Chapter 6

Configuration Editor

Declaring Program Instances

199

Declaring Program Instances


Program instances define which programs will be downloaded and executed and which TRICON Input, Output or Memory points will interact with these programs. In order to download and execute a program, you must first declare an instance of the program using the TRICON Configuration editor. A program may have more than one instance, and can have up to 250 instances. The input and output variables of each program instance must be connected to TRICON Input, Output or Memory points. In the FURNACE project that serves as an example, there is an identical air damper unit for each of four burners. Therefore it is feasible to declare four instances of the AIR_DAMPER program, so you will not have to write the program logic four times. Later, the variables in each instance of AIR_DAMPER will be connected to TRICON points which represent particular hardware addresses in the TRICON.

Steps to Follow
w To declare a new program instance, follow these steps: These steps are based on the example shown on the next page. 1 Go to the TRICON Configuration editor. 2 Double-click on the Program Instance Declarations icon in the configuration

tree to bring up the Properties dialog box.


3 To declare another instance of the AIR_DAMPER program as shown in the

example, select the Instance List tab in the Properties box.


4 Select the Add option to bring up a dialog box that lets you select the

AIR_DAMPER program and enter a name for your new instance. The order of the programs listed under the Program Instance Declarations icon is the order in which they will be executed.

Instance View
To display a read-only view of a program instance with expanded variable annotations, select the instance name in the configuration tree and click on the Annotated Instance tool or select the Instance View command on the Tools menu.

Chapter 6

Configuration Editor

200

Declaring Program Instances

Declaring a Program Instance in the TRICON Configuration Editor

Chapter 6

Configuration Editor

Declaring TRICON Points

201

Declaring TRICON Points


This section covers the following topics concerning TRICON points: Overview Naming methods Rules that apply Property fields for TRICON points Aliases for TRICON points MinSpan and MaxSpan fields Monitor display options

Overview
After you have allocated your TRICON hardware using the TRICON Configuration editor, you need to declare TRICON point connections, also known as global variables in IEC-1131 standard terminology. Each TRICON point has two main characteristics: It references an Input, Output or Memory point in the TRICON It is accessible to all program instances within a TriStation 1131 project Input and Output variables in each program instance must be connected to TRICON points before downloading. The TRICON Configuration editor provides the Connections Wizard for connecting program variables to TRICON points. For more information, refer to the upcoming section called Using the Connections Wizard on page 213. In TriStation 1131, your program logic is independent of physical points in the TRICON. If your physical connections change, you can easily change the TRICON point connections for each program instance without having to modify the logic or recompile the program. TRICON points can have the following point types and data types: Memory pointsBOOL, DINT, or REAL data types Input pointsBOOL, DINT, or REAL data types Output pointsBOOL or DINT data types

Chapter 6

Configuration Editor

202

Declaring TRICON Points

Examples
An example of a TRICON point that is accessible to all program instances within a 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 TRICON point which is also called GENERAL_ALARM. All of the program instances can be connected to the same TRICON point, but for safety reasons, you should place restrictions on which program instances can write to the TRICON point. However, TRICON point connections do not necessarily refer to physical points on the I/O modules. For example, you could declare an Aliased Memory point whose sole purpose is to make certain values accessible to an external host computer. The variable in your program logic that provides these values would be connected to the TRICON point using the Connections Wizard.

Naming Methods
When you connect program variables to TRICON points, naming of the relevant TRICON points is always a consideration. There are three basic ways to name TRICON points: Manually one-by-one using the Declaration Properties dialog box Using the Auto Tag Names feature for multiple selected points Automatically using the Connections Wizard Note You can give TRICON points any names that support your control strategy, but using the instrument tag names associated with the points is a good technique.

Manual Naming
Manual naming of a TRICON point is precise because you individually assign a unique name to a specific hardware address in the TRICON. This method is valuable if your project has been finely partitioned down to the module and point level. To manually name a TRICON point, open the TRICON Point Connections window of the configuration tree and select the type of I/O points found on the modules you installed in your chassis. For installed modules, a {not yet named} placeholder for each point is displayed, as shown on the following page. Double-

Chapter 6

Configuration Editor

Declaring TRICON Points

203

click on the desired placeholder and use the Properties box to assign a name and other properties. As shown in the example below, the BOOL Outputs icon under Output Points is selected in the configuration tree. Clicking on BOOL Outputs displays dozens of placeholders for BOOL variables in the {not yet named} state. If you double-click on a {not yet named} variable, the Properties box is displayed. There you can enter a Tag Name for the TRICON point and describe its other properties.

Chapter 6

Configuration Editor

204

Declaring TRICON Points

Using Auto Tag Names


The Auto Tag Names feature is helpful when you want to apply similar tag names to several TRICON points. For example, you have 50 gas detector inputs, and you want to call them GASDTCT1, GASDTCT2, GASDTCT3, etc. First you would select 50 {not yet named} points in the TRICON Point Connections list, then click on Auto Tag Names in the Properties box. (The Auto Tag Names option is only displayed when you have selected multiple points in the TRICON Point Connections list.) The Auto Tag Names dialog lets you select the desired prefix and the increment you wish to use. In this example, you would enter GASDTCT%0 to start the automatic names at 1.

Chapter 6

Configuration Editor

Declaring TRICON Points

205

Automatic Naming in the Connections Wizard


Automatic naming of TRICON 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 TRICON points are connected to which program variables. Refer to the upcoming section called Using the Connections Wizard on page 213 for more information about automatic naming and related concerns.

Deleting TRICON Point Names


To return a single TRICON point to the {not yet named} state, double-click on the Tag Name field, delete the Tag Name (and other properties if desired) in the Properties box, and select Confirm Name. To return multiple TRICON points to the {not yet named} state, select the required points and double-click to display the Properties box. Enter the Auto Tag Names dialog, leave the Formatted Name field blank, and click OK.

Rules that Apply


The TRICON Configuration editor enforces the following rules about TRICON Point Connections: All input and output variables in a program instance must be connected to TRICON points. TRICON Input Points must be connected to program variables of the VAR_INPUT type. A TRICON point cannot be connected to both input and output variables of the same program instance. A TRICON Output Point cannot be modified by more than one program instance. A TRICON Memory Point cannot be modified by more than one program instance.

Chapter 6

Configuration Editor

206

Declaring TRICON Points

Property Fields for TRICON Points


This section explains the purpose of each field in the TRICON Point Connections list. The particular fields which are active for a selected TRICON 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 Options Menu for Lists on page 188 for more information about sorting. Property Fields for TRICON Point Connections
Field Tag Name Description of Use This field is normally used for the tag names of instruments to which TRICON points are connected, although you could decide to use the field for other types of names. A property you can specify for an Output or Memory point. (All points default 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 pointchoices are BOOL, DINT and REAL. The hardware address of the TRICON point to which the program variable is connected. For Input and Output points, the address is displayed in the format CC.SS.PP where CC is the chassis, SS is the slot and PP is the point. For memory points, see the upcoming section called Addresses of Memory Points on page 207. The five-digit code associated with an Aliased point. For unaliased points, this field is blank. 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 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. A field you can use to make a comment about a point or the function it performs.

Retentive

Type

Location

Alias

Group 1

Group 2 Description

Chapter 6

Configuration Editor

Declaring TRICON Points

207

Property Fields for TRICON Point Connections


Field Initial Value MinSpan MaxSpan DP Description of Use The value assigned to a variable at the time of system initialization or start-up. For a Memory Real or Input Real variable, the MinSpan sets the lower limit of a selected variable in engineering units. For a Memory Real or Input Real variable, the MaxSpan sets the upper limit of a selected variable in engineering units. Specifies how many decimal points are displayed for a selected Real point. The maximum number of decimal points is eight.

Addresses of Memory Points


In the TRICON Configuration editor, the addresses of Memory points are displayed according to their data type, variable type and position in TRICON 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 Memory BOOL (Unaliased) Memory BOOL (Read Aliased) Memory BOOL (Read/Write Aliased) Memory DINT (Unaliased) Memory DINT (Read Aliased) Memory DINT (Read/Write Aliased) Memory REAL (Unaliased) Memory REAL (Read Aliased) Memory REAL (Read/Write Aliased) Acronym MBN MBR MBW MIN MIR MIW MRN MRR MRW

Chapter 6

Configuration Editor

208

Declaring TRICON Points

Aliases for TRICON Points


This section describes the use of Alias numbers for TRICON points whose values must be accessible to external hosts. TriStation 1131 automatically supplies Aliases for all types of TRICON points which you need to connect to your program variables. The following sections provide more information about the use of Aliases in your project configuration.

What are Aliases?


When you use TriStation 1131 to create a project for the TRICON, you normally use alphanumeric names as identifiers for program variables and TRICON points. However, you also need to use numeric identifiers called Aliases if your TriStation 1131 project communicates with external host computers by means of the ACM, HIM, ICM, NCM or SMM. Each TRICON point whose value will be read by an external host must have an Alias. An Alias is a five-digit numberthe leftmost digit defines the points data type and the other four digits define its hardware address in the TRICON. The values of the addresses fall within ranges defined by the TRICON, as shown in the following table: Alias Ranges for TRICON Points
Point Type Input Input Input Output Output Memory Memory Memory Memory Memory Memory Data Type Discrete Integer Real Discrete Integer Discrete Discrete Integer Integer Real Real Message Type Read Only Read Only Read Only Read/Write Read/Write Read/Write Read Only Read/Write Read Only Read/Write Read Only Available Points 4096 1024 120 2048 512 2016 2016 750 1000 1000 1000 Aliased Points1 2000 1000 120 2000 250 2000 2000 750 1000 1000 1000 Alias Range 10001 - 12000 30001 - 31000 32001 - 32120 00001 - 02000 40001 - 40250 02001 - 04000 12001 - 14000 40251 - 41000 31001 - 32000 41001 - 42000 33001 - 34000

1. For certain point types, some of the available points have no Aliases. These unaliased points can be used in your project, but cant be accessed by external hosts.

Chapter 6

Configuration Editor

Declaring TRICON Points

209

Note TriStation 1131 projects operate with 32-bit integer (DINT or Double Integer) and real values, and an Alias always occupies the least significant 16 bits of a 32-bit word. However, when an external host requests Aliased values, the TRICON transfers these values as 16-bit integers. The highest integer value that the TRICON can transfer in 16 bits is 32,767. If the value is higher, the TRICON transfers only the least significant 16 bits of the integer. Real values are scaled as integers according to the lower and upper limits you specify in the desired engineering units.

Fixed Aliases for Input & Output Points


When you open the TRICON Point Connections window, a column called Alias displays all of the Aliases, if any, associated with the point type you have selected. For Input and Output points, TriStation 1131 automatically provides a fixed Alias for each hardware address. If you decide to assign a Tag Name and other properties to an Input or Output point located on a particular I/O module within a certain TRICON chassis, you must use the Alias that TriStation 1131 has provided for that address. This is true whether you assign the Tag Names manually one-by-one, or automatically using the Connections Wizard. If you add a new I/O Module to an existing configuration, new Aliases are added sequentially from the available rangeexisting Aliases for other modules are not disturbed. If you move an I/O Module to another slot, the existing Alias numbers move with the module.

Selecting Aliases for Memory Points


For Memory points, the TRICON Point Connections window displays a partial range of available Aliases for the selected point type (see note below). If you know which Aliases you need to use for particular points, select the {not yet named} rows where the desired Aliases are displayed and bring up the Properties box so you can assign Tag Names and other properties to the points. Note By default, the TRICON Point Connections window displays only a partial range of the Aliases you can use for Memory points. To access additional Aliases, increase the memory allocation for the desired Memory point type using the Memory Allocation window of the TRICON Configuration editor.

Chapter 6

Configuration Editor

210

Declaring TRICON Points

If you do not know which Aliases you will be using for particular Memory points, you can use the Connections Wizard to automatically connect program variables of the Memory type to Aliased Memory points. To accomplish this, select one of the following options, as appropriate, in the Wizards Auto-Create dialog box: New Read Aliased Memory global variables New Read/Write Aliased Memory global variables For more information about automatic connection of program variables to TRICON points, refer to the upcoming section called Using the Connections Wizard on page 213.

System Aliases for External Hosts


System Aliases are predefined Aliases which external hosts must use to access status information about the TRICON system. Refer to the Reference Manual for TRICON System Aliases for a list of System Aliases that provide status information about the following system components: Main Processors EICM Chassis

Chapter 6

Configuration Editor

Declaring TRICON Points

211

Slots Network nodes Miscellaneous

MinSpan & MaxSpan Fields


The MinSpan and MaxSpan fields in the TRICON Point Connections screen 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 and go to the Conversion tab of the Properties box to set the Minimum Value (MinSpan) and Maximum Value (MaxSpan) in the Span Calibration field, as shown in the screen capture below:

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. Examples are Modbus protocol used with the EICM and Honeywell protocol used with the HIM. If you are communicating over an EICM port configured for Modbus protocol, you may have set the Min and Max limits for the Modbus Range in the Setup dialog for the EICM. In this case, it may not be necessary to use the MinSpan and MaxSpan fields for individual Real points in the TRICON Point Connections screen. For more information, refer to the section called EICM Configuration in Appendix A, Configurable Modulesand to the ICM Users Guide. MinSpan and MaxSpan values are not required for communication with external hosts by means of the ACM, NCM or SMM modules.

Chapter 6

Configuration Editor

212

Declaring TRICON Points

Monitor Display Options


With TriStation 1131 V1.1, these options apply only to event variables used with SOE.

For each TRICON point, TriStation 1131 provides options for displaying the pointss state both alphanumerically and in color. The display options can help an operator identify alarm conditions at a glancefor example, when the SOE Data Retrieval Application is used to retrieve and analyze TRICON data.
w Follow these steps to apply display options to TRICON points: 1 Go to the TRICON Configuration editor and click any icon that displays the

TRICON 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 on the Properties Box tool in the 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:

Click the Default button to set all display parameters back to their default values.

5 Click the Confirm button to apply the changes. 6 Repeat Steps 1 through 4 to set display options for other TRICON points.

Chapter 6

Configuration Editor

Using the Connections Wizard

213

Using the Connections Wizard


This section covers the following topics: Overview Manual connection Automatic connection Automatic naming Manual naming with automatic connection Disconnecting TRICON points

Overview
For connecting program variables to TRICON points of the Input, Output and Memory types, TriStation 1131 provides the Connections Wizard. Making these point connections is a necessary step before you can test your configuration with the Emulator Control Panel or download it for execution in the TRICON. 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.
See page 219 for instructions.

Note The Connect tab in the Properties dialog box for program instances allows you to directly connect individual program variables to TRICON points. 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 TRICON points or automatically connect them using various parameters that you select. Manual connection is straightforward, but as shown in the options table 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 TRICON points with prefixes or suffixes Preserving or removing existing TRICON point connections Automatically creating new TRICON points of a selected type

Chapter 6

Configuration Editor

214

Using the Connections Wizard

CONNECTIONS WIZARD

All program variables in All instances

All program variables in One instance

Selected program variables only*

Manually connect each program variable

Automatically connect each program variable

Use another program instance as a pattern

Manual connections dialog Prefix with instance name Prefixed with: Suffixed with: No prefix or suffix

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.

Table of Options for the Connections Wizard

Chapter 6

Configuration Editor

Using the Connections Wizard

215

Manual Connection
Manual connection is a very precise way to connect program variables to TRICON points. With this method, the Connections Wizard lets you select a specific program variable and connect it to a specific TRICON 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 TRICON. 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, TRICON 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 TRICON Point Connections window. If you have used the Wizard before to automatically name and connect TRICON 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 TRICON 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 TRICON point: Enter the Connections Wizard from the Commands menu or by doubleclicking on a program instance name to display the Instance Properties dialog box. Select the option called All program variables in One instance. Select the option called Manually connect each program variable. The Wizard displays a dialog which lists the program variables from AIR_DAMPER_4 on the left and named TRICON points on the right. Select the program variable AIR_DAMPER_4.AIR_DAMPER_ALARM in the scroll box at the left. Text underneath the scroll box tells you that the variable is not connected. Select the Output variable type in the upper right corner (Memory, Inputs or Outputs) to display available named TRICON points of the Output type. Select the TRICON point name called DO-01.04.08 in the scroll box on the right.

Chapter 6

Configuration Editor

216

Using the Connections Wizard

Select Connect at the top middle of the dialog box. Note the change in status by reading the text underneath the program variable scroll box.

Manual Connection of TRICON Points

Automatic Connection
Automatically connecting your program variables to unaliased TRICON 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 tag names 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 TRICON points which are automatically named according to parameters you select.

Chapter 6

Configuration Editor

Using the Connections Wizard

217

With automatic connection, you cannot control exactly which TRICON 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 TRICON point connections using the manual method.

Automatic Naming
Even if you have not manually named any TRICON points in the TRICON Point Connections window, 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 TRICON points for the various instances need to have identifiers. Another option related to automatic naming is to Preserve connections and autorename TRICON points. This is useful if your TRICON point names currently have prefixes but you want to have suffixes instead, or vice versa. Prefixing is usually just an intermediate step in project development, when you dont 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 TRICON points as the instrument tag names they correspond to.

Manual Naming with Automatic Connection


With automatic connection, usually you cannot control exactly which TRICON points are connected to which program variables. But you can exert this control by manually naming the TRICON points first, then using the Connections Wizard to automatically connect them to program variables. However, this method works only if you give the TRICON 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

Chapter 6

Configuration Editor

218

Using the Connections Wizard

P1, then your TRICON 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 TRICON points using in the TRICON Point Connections window. 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 TRICON points (Leave disconnected)

Viewing Points for Selected Modules


After you have declared a number of TRICON point connections for various I/O modules in your system, there is an easy way to display all of the TRICON points which have been declared for a particular module. To do this, follow these steps: Click the Hardware Allocation icon in the configuration tree. Select the desired module and double-click on it to bring up the Properties box. Select the View Points option under the Module tab to display all TRICON points (named and un-named) declared for this module.

Undoing TRICON Point Names & Connections


If in the course of project development you choose to undo all existing TRICON 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 TRICON point names Do not create any new TRICON points (Leave disconnected)

Chapter 6

Configuration Editor

Connecting Individual Program Variables

219

Connecting Individual Program Variables


This section describes direct manual connection of individual program variables using the Connect tab in the Properties box. Doing this is an alternative to using the Connections Wizard when you only need to connect one or two program variables to TRICON points. Before using the Connect tab, you must have declared your Tag Names and at least one program instance.
w Follow these steps to use the Connect tab in the Properties dialog box: 1 Go the TRICON Configuration editor. 2 Expand the list of program instances under the Program Instances

Declaration icon and select a specific program instance.


3 Display the Properties dialog box and make sure the pushpin is tacked down. 4 Select a program variable that you would like to connect. 5 Click on the Connect tab of the Properties dialog box and select a TRICON

point from the list in the dialog box, as shown in this example:

6 Repeat steps 4 and 5 for each program variable you want to connect.

Chapter 6

Configuration Editor

220

Building the Configuration

Building the Configuration


Note Building the configuration is a mandatory step before you can test it in emulation mode or download it to the TRICON for real-time execution. When you have finished making all of the necessary TRICON point connections, select Build Configuration or Rebuild Configuration from the TRICON menu. TriStation 1131 will compile the current configuration and display all relevant messages in the Message Bar, as shown below.

If there are any error messages in the Message Bar, double-click on each one and TriStation 1131 will highlight the areas where the errors have occurred so you can begin debugging. Click on 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.

Testing & Downloading


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 TRICON Control Panel. Refer to Chapter 7, Control Panels for details.

Chapter 6

Configuration Editor

Compare to Last Download

221

Compare to Last Download


When you download a configuration to the TRICON, TriStation 1131 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 do an on-line comparison to the last downloaded configuration, use Compare to Last Download in the TRICON Control Panel. See page 277. The Compare Configurations dialog box provides the following tabs: System parameters Modules installed in TRICON chassis Elements of the project Instances of programs and function blocks TRICON Points In each tab, there is a column of Current information beside a column of Last Download information, as shown in the TRICON Points 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.

Chapter 6

Configuration Editor

222

Compare to Last Download

Details Display
Four of the tabs in the Compare Configurations dialog box include a Details button that displays the following types of information:
Tab Name Modules Elements Instances TRICON Points Details About Configuration of ACM, EICM, NCM, Pulse Input and SMM. See sample below. Changes to project elements: programs, functions, function blocks, standard libraries and user-written libraries. Current list of instances and Last Downloaded list of instances. Current Definition and Previous Definition of TRICON points associated with the selected TRICON Point.

Details display for the Network Communication Module (NCM) in the Modules tab

Chapter 6

Configuration Editor

Compare to Last Download

223

Configuration Differences Report


From any tab in the Compare Configurations dialog box, you can click on the Print button to see a print preview of the Configuration Differences Report. The following illustration shows part of a Configuration Differences Report for a TriStation 1131 project:

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

224

Exporting TRICON Point Properties

Exporting TRICON Point Properties


The Export TRICON Points command on the Edit menu allows you to export TRICON point properties to any database or text file that has one of the following formats:
Database or File Format Filename Extension

dBASE Microsoft Access Microsoft Excel Comma-delimited ASCII text records

.dbf .mdb .xls *.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 TRICON point properties back into TriStation 1131. The upcoming sections give the facts you need to know to export TRICON 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

Exporting TRICON Point Properties

225

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 1131 project: All TRICON 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 1131 exports TRICON 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 TRICON point properties, you will always find these 16 columns, even if some of the columns contain no data.
TRICON Point Property TAGNAME DESCRIP GROUP1 GROUP2 ALIASTYPE Required Value TRICON points Tag Name (valid IEC 1131 identifier)must be 31 or fewer characters TRICON points Description TRICON points Group1 description TRICON points Group2 description TRICON points Alias type: U = Unaliased R = Read-only aliased W = Read/Write aliased Tricon points Alias number from 0 - 42000

ALIASNUM

Chapter 6

Configuration Editor

226

Exporting TRICON Point Properties

TRICON Point Property TAGTYPE

Required Value Data type: D = Discrete (BOOL) I = Integer R = Real Data class: I = Input O = Output M = Memory Initial value - TRUE or FALSE for BOOL data type - Integer value for DINT data type - Real value for REAL data type Retentive flag: N = Non-retentive R = Retentive Chassis number (0 - 15) Slot number (0 - 8) Point number (0 - 64) Lower limit for REAL in Engineering Units0.00 - 32767.00 Upper limit for REAL in Engineering Units0.00 - 32767.00 Decimal places for displaying Real variables

TAGCLASS

INITVALUE

RETENTIVE

CHASSIS SLOT POINT MINSPAN MAXSPAN DECPL1

1. Corresponds to the DP (Decimal Place) field in the TRICON Point Connections window and the Min/Max Accuracy field in the Format Data Source dialog box of the Import Wizard.

Chapter 6

Configuration Editor

Exporting TRICON Point Properties

227

Exporting to a Text File


When TriStation 1131 exports TRICON 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 column of data, whereas commas and quotes represent blank columns 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 column, whether blank or not, is delimited by a comma.

Chapter 6

Configuration Editor

228

Exporting TRICON Point Properties

Sample Steps to Follow


The steps below show how to export TRICON point properties from TriStation 1131 to a Microsoft Access database (.mdb) file, using the ExSOE.pt2 sample project found on the TriStation 1131 CD. Later, the sample steps for importing TRICON point properties from a database file will use the export file created here.
w To export TRICON point properties to a database file, follow these steps: 1 In TriStation 1131, use the Open Project command on the File menu to open

the sample project called ExSOE.pt2.


2 Go the TRICON Configuration editor. 3 In the directory tree, select the icon for TRICON Point Connections, as shown

below:

4 Select the Export TRICON Points command from the Edit menu. 5 Use the Windows dialog box to select the .mdb filetype 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

TRICON point properties from the ExSOE.pt2 project.

Chapter 6

Configuration Editor

Importing TRICON Point Properties

229

Importing TRICON Point Properties


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

dBASE Microsoft Access Microsoft Excel Comma-delimited ASCII text records

.dbf .mdb .xls *.txt *.csv

Note The name of an import file must be eight or fewer characters in length. If the filename exceeds eight characters, TriStation 1131 will generate an error message when you select the file for an import. The upcoming pages explain how to import TRICON point properties effectively, covering the following topics: Rules for database or Excel files Rules for text files Required values for TRICON point properties Sample steps to follow Input record processing

Chapter 6

Configuration Editor

230

Importing TRICON Point Properties

Rules for Database or Excel Files


A database or Excel file that you import to TriStation 1131 consists of at least one table of data that will be mapped to TRICON point properties in the TRICON Configuration editor. The following rules apply to the columns of TRICON point properties in your import table: A table may contain as many columns of data as you like, but there are only 16 TRICON point properties to which you can map imported data. The columns in the table may have any column headings that you want. A table must contain a minimum of three columns of data, which you must map to these TRICON point properties: Tag Name Tag Type Tag Class Data in the columns must meet the requirements described in Required Values for TRICON Point Properties on page 232, or they must be blank.

Rules for Text Files


When you set up text files of TRICON point properties to be imported into TriStation 1131, 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 16 TRICON 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 TRICON point properties: Tag Name Tag Type Tag Class Each field must meet the requirements described in Required Values for TRICON Point Properties on page 232.

Chapter 6

Configuration Editor

Importing TRICON Point Properties

231

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. When you import TRICON point properties from a text file, TriStation 1131 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 16 fields:

For more information, see the upcoming section called Sample Steps to Follow on page 234.

Chapter 6

Configuration Editor

232

Importing TRICON Point Properties

Required Values for TRICON Point Properties


The following table describes the required values for the 16 TRICON point properties to which you will map your imported data. These requirements apply to all TRICON 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 234.
TRICON Point Property Tag Name Description Group1 Group2 Alias Type : Required Value TRICON points Tag Name (valid IEC 1131 identifier)must be 31 or fewer characters TRICON points Description TRICON points Group1 description TRICON points Group2 description TRICON points Alias type: U = Unaliased R = Read-only aliased W = Read/Write aliased Tricon points Alias number from 0 - 42000 Data type: D = Discrete (BOOL) I = Integer R = Real Data class: I = Input O = Output M = Memory Initial value: - TRUE or FALSE for BOOL data type - Integer value for DINT data type - Real value for REAL data type

Alias Number Tag Type

Tag Class

Initial Value

Chapter 6

Configuration Editor

Importing TRICON Point Properties

233

TRICON Point Property Retentive Flag Retentive flag: N = Non-retentive R = Retentive

Required Value

Chassis Slot Point Min Span Max Span Min/Max Accuracy

Chassis number (0 - 15) Slot number (0 - 8) Point number (0 - 64) Lower limit for REAL in Engineering Units0.00 - 32767.00 Upper limit for REAL in Engineering Units0.00 - 32767.00 Decimal places for displaying the values of Real variables

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.

Chapter 6

Configuration Editor

234

Importing TRICON Point Properties

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 sixteen columns of TRICON point properties.
w To import TRICON point properties, follow these steps: 1 In TriStation 1131, create a new project. 2 Go the TRICON Configuration editor. 3 Select the Import TRICON Points command from the Edit menu to start up

the Import Wizard.


4 In the Select Data Source dialog box, click the Select Import Data File button. An import filename must have eight or fewer characters For details on the Link and Unlink commands, see page 237. 5 Use the Windows dialog box to select the .mdb file type and locate the

All_Pnts.mdb file. Click the Open button.


6 Select the All_Pnts table from the Select Table list and click the Next button. 7 In the Format Data Source dialog box (shown below), select the Link All

command to map the import data to TRICON point properties.

Chapter 6

Configuration Editor

Importing TRICON Point Properties

235

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 updates and adds, see Import Record Processing on page 238.

8 In the Select Import Options dialog box, select these options and click the

Next button: Do validation only. Update existing TRICON 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 Import Status Messages on page 236 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.

Chapter 6

Configuration Editor

236

Importing TRICON Point Properties

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 TRICON 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 TRICON point properties.


15 Click the Close button to exit the Import Wizard. 16 On the directory tree of the TRICON Configuration editor, click the TRICON

Point Connections icon to view the TRICON point properties you just imported.

Import Status Messages


In the Import 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 TRICON point that has the same properties, so the import record is being ignored. ADDED ERROR A new record is being added to the configuration. The import record has been rejected due to one or more errors.

UPDATED The import record is updating properties of an existing TRICON point.

Chapter 6

Configuration Editor

Importing TRICON Point Properties

237

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 TRICON point properties. Four linking commands are available:
Link Unlink Link All Unlink All See instructions below. See instructions below. Applies only when you have 16 fields in the Source Field list which will be mapped one-for-one to the TRICON Point Property list. Applies to all set-ups of linked entries that need to un-linked.

w To use the Link command, follow these steps: Hold down the CTRL key to select multiple fields. 1 Select one or more fields in the Source Field list on the left. 2 For each field you have selected, you must select a corresponding TRICON

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

Chapter 6

Configuration Editor

238

Importing TRICON Point Properties

Import Record Processing


The Import Wizard offers three choices when importing TRICON points: Update existing TRICON points only Add new TRICON points only Update existing TRICON points and add new TRICON points The following sections explain how TriStation 1131 handles updates and adds.

Updating Existing TRICON Points


The import operation can easily update an existing TRICON 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 TRICON point and meets TriStation 1131s validation requirements, the following properties of the existing point will be updated from the input record if they are different: Description Group1 Group2 Initial value Retentive Flag MinSpan MaxSpan Min/Max Accuracy (Decimal Place) The following properties will not be updated by the import operation: Alias Type Alias Number Tag Type Tag Class Chassis Slot Point

Chapter 6

Configuration Editor

Importing TRICON Point Properties

239

Adding New TRICON Points


A new TRICON point is one whose Tag Name does not currently appear in the TRICON Points table. New entries are automatically posted to the TRICON Points table if they meet the validation requirements. TRICON points with Aliases (Read Aliased or Read/Write Aliased) are treated as follows when an input record is processed. Input/Output Points: The input record must contain an Alias number and/or a Chassis.Slot.Point address. If only the Alias number is provided, Tristation 1131 looks for an allocated point whose Alias matches the one supplied. If no match is found or the point is already being used, the import record is rejected. If only the Chassis/Slot/Point address is provided, Tristation 1131 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 both the Alias and Chassis/Slot/Point address are provided, Tristation 1131 looks for an allocated point with matching properties. If no match is found or the point is already being used, the import record is rejected. Aliased Memory Points: If the input record contains an Alias number, Tristation 1131 looks for an allocated point whose Alias matches the one supplied. If no match is found or the point is already being used, the import record is rejected. If the input record does not contain an Alias number, Tristation 1131 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 the preceding sections is rejected as an error.

Chapter 6

Configuration Editor

240

Configuring the TRICON for Event Collection

Configuring the TRICON for Event Collection


This section explains how to configure your TriStation 1131 project for use with the TRICONs Sequence of Events (SOE) capability, which can help with system maintenance and shutdown analysis. During each scan of the control program, the TRICONs Main Processors examine selected BOOL variables for state changes known as events. These event variables are assigned to SOE blocks using the TRICON Configuration editor. To prepare your system for event collection, you need to do the following tasks as you develop your TriStation 1131 application: Estimate available memory Set up SOE blocks Assign event variables to the blocks Designate a trip variable (optional) Set up monitor options (optional) Instructions for these tasks are provided in the upcoming pages. TriStation 1131 is also used to program four function blocks that allow you to control event collection for SOE blocks: 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 Refer to the Users Guide for the Sequence of Events Data Retrieval Application for details about using the SOE function blocks, and complete information about other aspects of SOE.

Chapter 6

Configuration Editor

Configuring the TRICON for Event Collection

241

Estimating Available Memory


The maximum SOE block size you can define is 20,000 events (320,000 bytes), and there is a maximum size of 60,000 events (1 Mbyte) allowed across all blocks.
w Follow this procedure in TriStation 1131 to determine how much memory is available for SOE blocks: 1 Write the logic for your process control application (including SOE block

control functions), but dont configure the SOE blocks.


2 Go to the TRICON Control Panel and download your application to the

TRICON by using the Download All command.


3 Run your application by using the Run command in the Commands menu. 4 Go to the TRICON Diagnostic Panel and look at the TRICON System

Configuration window to find the amount of Free Memory in the TRICON. Free memory = _____________
5 Determine how much memory you want to reserve for future modifications to

your application. Reserved memory = _____________


6 Compute the amount of memory available for SOE blocks by subtracting the

Reserved Memory (step 5) from the Free Memory (step 4). SOE block memory = _____________
7 To compute the maximum number of events, divide the reserved memory by 16.

Events (maximum) = _____________


8 Use the TRICON Configuration editor to define your SOE blocks and then use

the Download All command again.

Chapter 6

Configuration Editor

242

Configuring the TRICON for Event Collection

Setting Up SOE Blocks


w Follow these steps in TriStation 1131 to set up SOE blocks: 1 In the TRICON Configuration editor, click on the TRICON SOE

Configuration icon to display the placeholders for Blocks 1 through 16.


2 Double-click on a block number to open the Properties box called SOE Block

Definition, as shown in this example:

3 Select a Block Type other than UNASSIGNED from the drop-down list. The

choices are EXTERNAL, FIRST OUT and HISTORY. For descriptions of the block types, see the Users Guide for the SOE Data Retrieval Application.
4 Enter a Title and a Buffer Size. 5 Press the Confirm button.

Note You can change the type of an SOE block or the variables assigned to it using the Download Change command, but you must use the Download All command to add new SOE blocks or change the buffer size of existing blocks. For more information, go to the section called Download Change on page 267.
6 Repeat Steps 2 through 5 for other blocks that you want to set up.

Chapter 6

Configuration Editor

Configuring the TRICON for Event Collection

243

Assigning Event Variables to SOE Blocks


Note Assigning event variables to SOE blocks is possible only after you have set up the blocks using the SOE Block Definition dialog box in the TRICON SOE Configuration window, as explained in the preceding section.
w After setting up your SOE blocks, you can assign event variables to them by following these steps: 1 In the TRICON Configuration editor, click the TRICON SOE Configura-

tion icon to display all of the Tag Names (variables) defined for TRICON points which are SOE-configurable. These include BOOL Inputs and BOOL Aliased Memory variables.
2 Select the desired variables and double-click to open the Properties dialog box.

If you select multiple variables, click on the Properties box tool in the toolbar.
3 On the SOE Block Select tab, check the block numbers to which you want to

assign the selected variables, as shown in this example:

4 Repeat Steps 2 and 3 to assign other event variables to SOE blocks.

Chapter 6

Configuration Editor

244

Configuring the TRICON for Event Collection

Designating a Trip Variable (Optional)


A trip snapshot is a file of events that occurred x minutes before a trip and y minutes after a trip.

A trip variable is an aliased Tag Name of type BOOL whose state transition causes the SOE application to automatically create a trip snapshot. A TriStation 1131 project can have only one trip variable defined for one block, but the trip variable may apply to all of the blocks. Your TriStation 1131 logic may contain several variables related to trip conditions, but you should OR them all into one BOOL variable that is designated as the trip variable. Note You can designate a trip variable only after you have set up at least one SOE block and assigned event variables to the block.
1 Go to the TRICON Configuration editor and click the TRICON SOE

Configuration icon.
2 Double-click to open the Properties dialog box called SOE Trip Variable, as

shown in this example.

The drop-down list contains variables only if you have assigned variables to SOE blocks.

3 Select the Trip Tag Name from the drop-down list of event variable names and

choose a Trip State of TRUE or FALSE.


4 Set the Time Before Trip and Time After Trip in minutes. The minimum time

for both parameters is two minutes; the maximum for both parameters is ten minutes. This is the window of time that the SOE application will use to create a trip snapshot.

Chapter 6

Configuration Editor

Configuring the TRICON for Event Collection

245

Selecting Monitor Display Options (Optional)


For each TRICON point, TriStation 1131 provides options for displaying the pointss state both alphanumerically and in color. When you have defined TRICON points as event variables for use with SOE, the display options can help you identify alarm conditions at a glance. The display options are applied using the Monitor tab of the Properties dialog for one or more selected event variables. For instructions, see the section called Monitor Display Options on page 212. Note With TriStation 1131 V1.1, the monitor display options apply only to event variables used with SOE.

Chapter 6

Configuration Editor

CHAPTER 7

Control Panels

This chapter covers the following topics: Control tools Operating a control panel Downloading a project Disabling & enabling points TRICON operational modes

248

Control Tools

Control Tools
To help you test and monitor your project with the Emulator Control Panel and TRICON Control Panel, TriStation 1131 provides control tools in 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 Operating a Control Panel on page 256 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 panels toolbar and main menu as well, except for the Size/Alignment commands described below.

For A Selected Element


For a selected element, TriStation 1131 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.

Chapter 7

Control Panels

Control Tools 249

Size/Alignment Commands The pop-up menus 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.

Main Menu Commands


A control panels main menu appears above the toolbar as follows, and the diagram on the following page shows the commands which are accessible from the it. (For menus and commands which are common to all TriStation 1131 views, see Basic Editing Tools on page 40.)

Chapter 7

Control Panels

250

Control Tools

Menus & Commands of Emulator/TRICON Control Panel


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

File

Edit

TRICON

Project

Element

Tree

New Project... Open Project... Save Project... Save As... Close Project... 1 <previously opened project> 2 <previously opened project> Print... Print Preview... Print Reports... Print Setup... Exit

Undo Redo Edit Session Journal Cut Copy Paste Find...

Edit Configuration Build Configuration Rebuild Configuration Compile All Project Elements Emulator Control Panel TRICON Control Panel TRICON Diagnostic Panel View Download History... Change State to Download All

Directory... Description... Security... History... Project Options... TriStation 1131 Options...

Save <this element> Description... Comment Macros...

Expand One Level Expand Branch Expand All Collapse Branch

View

Commands

Tools

Sheets

Window

Help

Grid Display Zoom... Zoom to Fit... IEC Display Mode

Connect... Disconnect Download All Download Changes Run Single Step Pause Halt Set Scan Rate Set Calendar Clock Enable All Disabled Points List Disabled Points Compare to Last Download Continous Refresh

Delete Red X Elements This Sheet Delete All Red X Elements Instance View Select Tool (Arrow) Insert Comment

Sheet Title... Next Sheet Previous Sheet Find Sheet... Append Sheet Insert Sheet Delete Sheet

New Window Cascade Tile Horizontal Tile Vertical Close All Arrange Icons Show Properties Sheet Show Message Bar (Vertical Message Bar) (Horizontal Message Bar) Hide Message Bar 1 PROGRAM: <name>

Tristation 1131 Help Tip of the Day... Keyboard Shortcuts Sample Projects Technical Support About TriStation 1131... TriStation 1131 Logo...

Shortcut Keys
In all TriStation 1131 menus, 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.

Chapter 7

Control Panels

Control Tools 251

Table of Control Tools


The table that follows describes the main menu commands which are specific to the control panels and the tools in the control panel toolbar which correspond to these commands.

As noted earlier, the underlined characters shown in the menu and command names are shortcut keys to be used in the typical manner of Windows applications. Note On any TriStation 1131 toolbar, the name of a tool is displayed if you place the cursor inside the icon for the tool. Edit Menu
Command Undo Redo Edit Session Journal Description Reverses the last edit of a variable, function or function block. Reverses the last Undo command. This must be done before any other editing is done. Opens a dialog box which displays a sequential list of 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. Cuts (deletes) selected items from the current control panel and places them on the clipboard, erasing the previous contents. Copies selected items from the current control panel and places them on the clipboard, erasing the previous contents. Pastes the current contents of the clipboard into the selected element. Finds specific text within the logic elements of the current control panel.

Cut

Copy Paste Find

Chapter 7

Control Panels

252

Control Tools

Element Menu
Command Save <control panel> Description Description Saves the open control panel but not the entire project. Identifies the creation and modification dates of the control panel. Lets you select ownership, dependencies and read/write status; and enter descriptive text. Allows you to select macros for use in comments about control panel elements.

Comment Macros

Tree Menu
Command Expand One Level Expand Branch Expand All Collapse Branch Description Expands a selected tree node by one level. Expands a selected tree node to all levels. Expands the whole tree to all levels. Collapses a selected branch of the tree.

View Menu
Command Grid Display Description Changes the background of the control panel to display or not display an editing grid for precise placement of logic elements. Select the zoom view of your control panel from preset and custom views. Displays the entire control panel within the current window. Changes the display characteristics of elements in the control panel to IEC format.

Zoom Zoom to Fit IEC Display Mode

Tools Menu
Command Delete Red X Elements This Sheet Description Deletes invalid elements (each marked with a red X) on the current sheet that may be left over from previous builds or editing.

Chapter 7

Control Panels

Control Tools 253

Tools Menu
Command Delete All Red X Elements Description Deletes all invalid elements (each marked with a red X) that may be left over from previous builds or editing. Applies to all sheets that have been defined for the control panel. 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 260. Changes the mouse cursor into an arrow so you can select the desired item. Places a comment box on the current control panel sheet so you can enter descriptive text.

Instance View

Select Tool (Arrow) Insert Comment

Commands Menu
Command Connect... Description For the Emulator Control Panel, establishes communication between TriStation 1131 and the Emulator. For the TRICON Control Panel, establishes communication between TriStation 1131 and a TRICON controller, assuming that the PC is physically connected to the TRICON. Logically disconnects TriStation 1131 from the Emulator or a TRICON node with which communication was previously established. Downloads the entire configuration for your project to the Emulator or TRICON, totally rebuilding the configuration first. Makes on-line changes to a project that is already executing in the Emulator or TRICON following a Download All. Starts continuous scanning (execution) of your project in the Emulator or the TRICON.

Disconnect

Download All

Download Changes

Run

Chapter 7

Control Panels

254

Control Tools

Commands Menu
Command Single Step Pause Halt Description Causes your project to execute for one scan only in the Emulator or the TRICON. Pauses execution of the project in the Emulator or TRICON after completion of the current scan. Halts execution of the project that is currently running in the Emulator or TRICON and re-initializes variables to their first-scan state. Sets the scan rate in units of milliseconds. The minimum scan rate is 20 milliseconds and the maximum scan rate is 500 milliseconds. Sets the TRICON calendar clock to your current Windows time. Enables all TRICON points that you have previously disabled using the Disable button in the Properties box for selected program variables. Displays a list of all TRICON points that you have previously disabled using the Disable button in the Properties box for selected program variables. After you connect your project to the TRICON where it was previously downloaded, this command compares the projects current configuration to the last downloaded configuration. Continuously displays the current values of variables in your monitor window. Toggles on or off each time you click the button.

Set Scan Rate

Set Calendar Clock Enable All Disabled Points List Disabled Points Compare to Last Download

Continuous Refresh

Chapter 7

Control Panels

Control Tools 255

Sheets Menu
Command Sheet Title Next Sheet Previous Sheet Find Sheet Description Allows you to edit the title of the current sheet (displayed in the title block, window caption bar and Window Menu list). Displays the next sheet (for logic elements with multiple sheets). Displays the previous sheet (for logic elements with multiple sheets). Allows you to find and select sheets by sheet title and provides access to dialog boxes for insertion, deletion, and appending of sheets. Adds a new sheet to the end of the current project element. Inserts a new sheet before the current sheet or before a horizontal network boundary (if selected). Deletes the sheet that is currently displayed.

Append Sheet Insert Sheet Delete Sheet

Chapter 7

Control Panels

256

Operating a Control Panel

Operating a Control Panel


TriStation 1131 provides two control panels for testing and monitoring your project: Emulator Control Panel TRICON Control Panel The control panels are accessible from the TRICON 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 a project. The main purpose of the TRICON Control Panel is on-line monitoring of live data as a project executes in the TRICON. The sections that follow explain how to set up a control panel and use for it testing or monitoring. These topics are covered: Setting up a monitor window Setting values for testing Using the program instance monitor Sample steps for the Emulator

Chapter 7

Control Panels

Operating a Control Panel

257

Setting up a Monitor Sheet


The first time you enter a control panel, TriStation 1131 displays a blank split screen with a tree structure on the left and a monitor sheet on the right. After you connect and download your project to the Emulator or the TRICON, 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.

Chapter 7

Control Panels

258

Operating a Control Panel

Setting Values for Testing


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 on 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, as in this example:

Chapter 7

Control Panels

Operating a Control Panel

259

Enlarging Your View of Elements


There are two ways to enlarge your view of selected elements in the monitor sheet of the Emulator or TRICON Control Panel. 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 the left mouse button in any 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.

Current View Rectangle

Chapter 7

Control Panels

260

Operating a Control Panel

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. Select a program instance name from the tree, then select the Instance View command or tool. The control panel then displays a read-only instance view of the program logic, with the variable annotations expanded as shown in the FBD example below. See the next page for an LD example which shows how power flow works.

Chapter 7

Control Panels

Operating a Control Panel

261

Power Flow in an LD Program Instance


When you use the Instance View command or tool to display a read-only 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:

Red for Power-on

Green for Power-off

Chapter 7

Control Panels

262

Operating a Control Panel

Sample Steps for Set-up & 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 TRICON 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 TRICON Control Panel as well. Only the steps for physically connecting to the TRICON controller are missing. Refer to the upcoming section called Download All on page 264 for that information.

w Follow these steps to set up variables and function blocks in the Emulator Control Panel and begin testing: 1 Access the Emulator Control Panel from the TRICON menu. 2 Use the Connect command to logically connect to the Emulator. 3 Select either a serial port or a network node. 4 Enter the password, if it is requested. If you do not know the password, you

cannot connect to the TRICON. (A password is requested here only if you entered one as a System Configuration parameter.)

Chapter 7

Control Panels

Operating a Control Panel

263

5 Use the Download All command to download your configuration to the

Emulator. (At this time, TriStation 1131 may send a message that your configuration needs to be rebuiltchoose yes to proceed.)
6 The program instances are now displayed in the left window. Click on the plus

(+) icon of the AIR_DAMPER_1 instance to display the program variable names.
7 Click and hold down on the NOT_ON_MIN_STOP variable, and drag it to the

right window.
8 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.
9 Add comments with the Insert Comment command in the Tools menu or the

Comment tool in the toolbar.


10 Select the Run or Single Step command to begin executing your configuration

in the Emulator.
11 To modify the value of a variable, double-click on the variable name and enter

the desired status in the Set Value field of the Properties box.
12 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.
13 Make adjustments as neededadd or delete variable names, modify their

respective values in the Set Value field of the Properties box, and continue testing as long as necessary.
14 Use the Pause or Halt command to stop testing. 15 Use the Disconnect command to disconnect your configuration from the

Emulator. This 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 move the TRICON Control Panel for actual downloading to the TRICON controller. Note Using the Run command to begin execution initializes all variables to the initial values you specified for their Tag Names in the Configuration editor. Using the Halt command initializes the variable to their first-scan state.

Chapter 7

Control Panels

264

Downloading a Project

Downloading a Project
Downloading the project is the final step in developing a TriStation 1131 project. Upon downloading, your project will execute in the TRICON controller in real time, until you decide to halt execution or shut down the controlled process for maintenance purposes. TriStation 1131 offers two types of download capability: Download All for initial loading and execution of your project Download Change for on-line modifications to your project The sections that follow describe: Use of the Download All feature Use of the Download Change feature Recommendations for controlling and changing a project Download states The Compare to Last Download command The download history of a project

Download All
The Download All command is used at two different times: The first time you download your project to the TRICON controller After a planned process shutdown for maintenance purposes The sections that follow describe typical preparations for a Download All and the possibility of a configuration mismatch upon downloading.

Chapter 7

Control Panels

Downloading a Project 265

Steps to Follow
w The following are typical steps to prepare for a Download All: 1 Complete all testing with the Emulator Control Panel. 2 Select the Rebuild Configuration command from the TRICON menu. 3 Ensure that the PC running TriStation 1131 is physically connected to the

TRICON controller by means of a communication module and a cable. Note A TriStation 1131 PC must be connected to a TRICON chassis by means of a special cable attached to an EICM serial port, or an 802.3 cable attached to an NCM or ACM port. For instructions, refer to the chapter about installation and checkout in the TRICON Planning & Installation Guide.
Removing and replacing these modules clears the TRICONs memory. 4 Remove all three Main Processors from the TRICON chassis. 5 Remove the NCM or ACM modules, if these are installed, and make sure that

their node numbers are set correctly.


6 Replace the Main Processor, NCM and ACM modules and wait until the PASS

indicators on all of the modules turn on.


7 Go to the TRICON Control Panel (accessible from the TRICON menu). 8 Use the Connect command to logically connect to the TRICON controller,

selecting either a serial port or a network node as appropriate.


9 Enter the password that TriStation 1131 requests, if any. If a password-

protected application is already running in the TRICON, you must know its password in order to do a Download All.
10 Select the Download All command from the Commands menu. If a

configuration mismatch occurs, read the next section for instructions.


11 If desired, drag selected elements from the tree of program instances 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.
12 Select the Run command to begin execution in the TRICON. 13 The project is now in a Download Change state, which means that the next

likely type of download is a Download Change. For more information, refer to the upcoming section called Download States on page 276.

Chapter 7

Control Panels

266

Downloading a Project

Configuration Mismatch
If you download a logical configuration created in TriStation 1131s TRICON Configuration editor which does not match the TRICONs actual physical configuration, a list like the following one will be displayed and the Download All will be aborted. Mismatched modules are highlighted with red asterisks in the leftmost column of the list, as shown for the Dual Discrete Output and Discrete Input modules in this example. In such a case, your only choice is to click Cancel and correct the configuration problem before attempting a Download All again.

If the slots of your TRICON chassis are empty, TriStation 1131 will still display the Module Configuration Exceptions window, but it is safe to proceed with the Download All if desired for test purposes.

Chapter 7

Control Panels

Downloading a Project 267

Download Change
The Download Change feature is a convenient means of making simple modifications to an off-line system during the project 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 project development. You must exercise extreme caution if you use Download Change to modify a 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 TRICON system, you should always follow the guidelines provided in this section and fully understand the risks you are taking by using the Download Change command.

Guidelines
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. Always use both Configuration Differences reports to check for inadvertent changes as well as intended changes to the project configuration. These reports are obtainable when you use the Compare to Last Download command in: The TRICON Control Panel (see page 277) The TRICON Configuration editor (see page 221)this report is highly recommended because it generates detailed information about TRICON points and system parameters Before a Download Change, use the TRICON Diagnostic Panel to ensure that you have enough Scan Surplus available in the TRICON. How much Scan Surplus you need depends on the project you are running and the types of changes you are making. As a rule, Scan Surplus should be 10 to

Chapter 7

Control Panels

268

Downloading a Project

20% 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 close your TriStation 1131 project and make a back-up copy of the .PT2 project file.

Steps to Follow
w The following are typical steps one would take to prepare for a Download Change: See Allowable Changes on page 269. 1 Make the allowed changes to your program logic and configuration and use the

Build Configuration command on the TRICON menu.


2 Test the project in the Emulator Control Panel (accessible from the TRICON

menu) to validate your changes.


3 Go to the TRICON Configuration editor and select the Compare to Last

Download command on the Commands menu.


4 In the Compare Configurations dialog box, click the Print button. 5 Print a hardcopy of the Configuration Differences report and validate your

current configuration against a snapshot of the last downloaded configuration.


6 Go to the TRICON Control Panel and select the Connect command from the

Commands menu.
7 Enter the password that TriStation 1131 requests for any project that is

password-protected.
8 Select the Compare to Last Download command from the Commands menu. 9 In the Compare Configurations dialog box, click the Print button. 10 Print a hardcopy of the Configuration Differences report and validate your

current configuration against the configuration that was last downloaded to the TRICON.
11 Select the Download Change command from the Commands menu.

Chapter 7

Control Panels

Downloading a Project 269

Allowable Changes
The following table describes the elements of a TriStation 1131 configuration 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 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. Program Logic The Name, Data Type, Var Type, Description and Initial Value parameters of variables can be changed. Comments

Note If you change the initial value of an existing variable, the change wont take
effect until the next time the application is run. Changing the name of a variable creates a new variable declaration, but does not remove the old variable declaration. Function Blocks Functions Libraries New function blocks can be added, but existing function blocks cannot be modified and cannot be deleted from the Project Directory. New functions can be added, but existing functions cannot be modified and cannot be deleted from the Project Directory. Not supported. Libraries cannot be added, updated or deleted.

CONFIGURATION ELEMENTS: Program Instances TRICON Points Program instances can be added, deleted or re-ordered for execution. Tag Names 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.

Note If you change the initial value of an existing variable, the change wont take
effect until the next time the application is run.

Chapter 7

Control Panels

270

Downloading a Project

ALLOWABLE CHANGES FOR DOWNLOAD CHANGE


Element CONFIGURATION ELEMENTS: SOE Configuration The SOE block type, block title, trip variable and trip variable parameters can be changed, but not the SOE block size or SOE Block Assignments (event variables assigned to SOE blocks). Comments

SYSTEM PARAMETERS: Network Node Scan Rate Password Required Disable STOP on Keyswitch Disable Remote Changes Allow Disabling of Points Peer-to-Peer Memory Allocation Not supported. The scan rate of the TRICON system can be changed. The option to require a password for downloading can be changed. The option to disable the STOP position on the TRICON keyswitch from halting the control program can be changed. The option to prevent Modbus masters or TCP/IP hosts from changing the values of TRICON Output Points can be changed. Not supported. Requires rebuilding of the configuration. Not supported. The maximum number or peer-to-peer Send and Receive function blocks allowed in a project cannot be changed. Not supported. Memory allocation cannot be changedthis is fixed at Download All time. However, you may allocate extra memory before doing a Download All to save room for other types of Download Changes in the future.

CHASSIS CONFIGURATION: Chassis Modules Module Types Module Set-up Not supported. Chassis cannot be added or removed unless you do a Download All. Modules can be added, but cannot be deleted or moved to other slots, unless you do a Download All. Not supported. Changing module types which are configurable using TriStation 1131 is not supported. Examples are thermocouple types and short-circuit detection. The set-up of configurable modules (ACM, EICM, NCM or SMM) can be modified.

Chapter 7

Control Panels

Downloading a Project 271

Additional Tips
This section provides additional tips about the elements of a TriStation 1131 application that can be changed using the Download Change command, covering the following topics: Changing module types Addition and deletion of chassis Addition and deletion of modules Addition of functions and effect on scan time Changing memory variable types Enabling disabled points NCM configuration changes SOE block size Saving project after downloading Changing Module Types If you must change a module's type while the TRICON system is on-line, you are advised to take all precautions necessary for your application before doing a Download Change. In general, it is not a good practice to do a Download Change in order to implement module-type changes in an on-line TRICON system. Shutting down the system and doing a Download All is much safer for implementing complex changes to an application.
Sample Module-Type Change

Assume that you have a Non-Isolated Thermocouple Input (NITC) Module, Type K, C and you want to change it to Type K, F (or Type K, C to Type J, F). Doing a Download Change would result in the inputs from the NITC module going to zero for 8 - 16 scans, depending on the size of the system and control program. Therefore, you should go to the TRICON Control Panel to disable all of the NITC input points and set them to appropriate values before you use the Download Change command. You need to take similar precautions for other modules whose types you change.

Chapter 7

Control Panels

272

Downloading a Project

Type Changes to Analog Input Modules

If you change the voltage range or type of open input detection for one of the following analog input modules, doing a Download Change would cause inputs of zero for 8 - 16 scans, depending on the size of the system and control program.
Module Name Isolated Analog Input Model 3703E Selection in Configuration Editor EIAI 5 V UpS, 16 points EIAI 10 V UpS, 16 points EIAI 5 V DnS, 16 points EIAI 10 V DnS, 16 points HAI 5V DnS, 64 points HAI 10V DnS, 64 points HAI 5V UpS, 64 points HAI 10V UpS, 64 points

High-Density Analog Input

3704E

Type Changes to Digital Output Modules

For a supervised digital output module, you select short-circuit detection in the off state by selecting a module name (using the TRICON Configuration editor) which includes the abbreviation SCD. If you change from an SCD selection to a non-SCD selection, doing a Download Change would cause outputs of zero for 8 16 scans, depending on the size of the system and control program.
Module Name TMR Supervised Digital Output TMR Supervised Digital Output TMR Supervised Digital Output TMR Supervised Digital Output, Low Power TMR Supervised Digital Output Model 3611E 3613E 3614E 3615E Selection in Configuration Editor SDO 115 V, 8 points SDO 120 V, OFF STATE SCD, 8 points SDO 120 V, 8 points SDO 24 V, OFF STATE SCD, 8 points SDO 24 V, 8 points SDO 24V, Low Power, 8 points SDO 24V, Low Power, OFF STATE SCD, 8 points SDO 48 V SCD, 8 points SDO 48 V, OFF STATE SCD, 8 points

3617E

Chapter 7

Control Panels

Downloading a Project 273

Addition & Deletion of Chassis You cannot add or delete chassis or change the chassis type using a Download Change command. You must use the Download All command to modify the chassis configuration of an existing TriStation 1131 project. If you think you might need additional chassis at a later date, you should include the maximum possible number of chassis required before using the Download All command. You should also allocate more memory for I/O points and memory variables in case you add new modules in the future. Addition & Deletion of Modules You can add new modules to an existing hardware configuration with a Download Change command if the following conditions are met: There are empty slots in the chassis. The Memory Allocation window in the TRICON Configuration editor shows that there is enough memory for the desired point types. Note When you add an I/O module, the IOMAIN and IOBAD system parameters of the TR_MP_STATUS function variables turn on for as many as 8 - 16 scans. If you are using this function in your TriStation 1131 application or DCS, then you must incorporate appropriate logic to handle this situation. Addition of Functions & Effect on Scan Time If your changes to the TriStation 1131 application include invoking new functions and function blocks (such as process control functions, math functions and print statements), then the TRICON will automatically increase the scan time to accommodate the execution of the newly added functions, if necessary. However, adding too many functions and function blocks may result in scan-time overruns. 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 occupies a different memory location in the TRICON. The same is true if you change an Aliased Memory variable to a non-aliased memory variable and vice-versa.

Chapter 7

Control Panels

274

Downloading a Project

It is not a good practice to do any of the following actions and then use the Download Change command: Change a memory variable type Change an aliased memory variable to non-aliased or vice-versa Change the alias number of a memory variable If you must do any of the above, 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 TRICON point (Tag Name) variables are disabled. However, if you are going to make the following types of changes to disabled TRICON point variables, you must enable the variables before doing a Download Change: Changing the Alias number of the variable Deleting the variable from the TRICON Points Table Disconnecting the variable from its input or output TRICON point Changing the TCP/IP Address If you change the TCP/IP address of an ACM or NCM and then do a Download Change, the module will reset and re-initialize itself. During the reset cycle, the moduless FAULT indicator will turn on. When the new configuration is complete, the PASS indicator will turn ON followed by the ACTIVE indicator. Triconex does not recommend doing a Download Change if you are changing the TCP/IP address of an ACM or NCM. Note Use of the Download All command is required to delete an ACM or an NCM from a TRICON system. Saving Application after Downloading After doing a Download Change, it is critically important to close and save your TriStation 1131 project (.PT2) file and back it up on a diskette, CD or other storage medium.

Chapter 7

Control Panels

Downloading a Project 275

Controlling & Changing an Existing Project


Whenever a TriStation 1131 application is changed, even in a minor way, all changes should be controlled by a Safety Change Control Committee (SCCC) 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 and reasons for changes, then

obtain approval for the changes from the Safety Change Control Committee (SCCC).
2 Develop a specification for changes including a test specification, then obtain

approval for the specification from the SCCC.


3 Make the appropriate changes to the TriStation 1131 application including

those related to design, operation and/or maintenance documentation.


4 Print both Configuration Differences reports to compare the current

configuration with the configuration that was last downloaded to the TRICON. For details, see the sections called Compare to Last Download on page 221 and page 277.
5 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.
6 Use the Emulator Control Panel to test the changes for proper operation as

documented in the test specification, then write a test report.


7 Review and audit all changes and the test results with the SCCC. 8 When approved by the SCCC, download the changes to the TRICON controller. 9 Save the downloaded application in TriStation 1131 and back up the

appropriate files on diskettes.


10 Archive two copies of the application and all associated documentation.

Chapter 7

Control Panels

276

Downloading a Project

Download States
At any given time, a TriStation 1131 project is in either a Download All state or a Download Change state. After you have done a Download All, your project 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 1131 window. Some TriStation 1131 operations are disabled when the project is in the Download Change state. See Allowable Changes on page 269 for a list of these operations. In a few cases, TriStation 1131 prompts you to change the state to Download All so that you can perform the desired operation, as shown in this example:

Change State to Download All command:

To change a projects state to Download All, the TRICON menu (common to all TriStation 1131 views) provides a command called Change State to Download All. Use this command at your own risk, because doing a Download All usually means that you must shut down the controlled process for a period of time.
! WARNING

After using the Change State to Download All command, you cannot return to the Download Change state but must do a Download All the next time you download your application to the TRICON. If you backed up the project on diskette or another medium before the last download, you can use this backup copy in case you did not want to change the state to Download All.

Chapter 7

Control Panels

Downloading a Project 277

Compare to Last Download


To use the Compare to Last Download command from the TRICON Control Panel, first you must use the Connect command to connect your project to the TRICON where it was previously downloaded. Then TriStation 1131 can make an on-line comparison of the projects current configuration to the configuration that was previously downloaded to the TRICON. The Compare Configurations dialog box provides tabs for the following categories of information:
Off-line comparison to the last downloaded configuration gives more information about system parameters and TRICON points. See page 221.

System parameters Modules installed in TRICON chassis Elements of the project Instances of programs and function blocks In each tab, there is a column of Current information beside a column of Last Download information, as shown in the System parameters tab below. For any item that is different from the previously downloaded configuration, an asterisk (*) is displayed in the red asterisk column on the far left.

Chapter 7

Control Panels

278

Downloading a Project

Details Display
Three of the tabs in the Compare Configurations dialog box include a Details button that displays the following types of information:
Tab Name Modules Elements Instances Details About Configuration of ACM, EICM, NCM, Pulse Input and SMM. See sample below. Changes to project elements: programs, functions, function blocks, standard libraries and user-written libraries. Current list of instances and Last Downloaded list of instances.

Details display for the Network Communication Module (NCM) in the Modules tab

Note Using Compare to Last Download in the TRICON Configuration editor provides more details about system parameters than when you use the same command in the TRICON Control Panel, and provides TRICON point information as well. See page 221 for more information.

Chapter 7

Control Panels

Downloading a Project 279

Configuration Differences Report


From any tab in the Compare Configurations dialog box, you can click on the Print button to see a print preview of the Configuration Differences Report. The following illustration shows part of a Configuration Differences Report for a TriStation 1131 project:

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

Chapter 7

Control Panels

280

Downloading a Project

Download History
To view the Download History of your project and every downloaded element within it, select the View Download History command in the TRICON menu from any control panel or editor. As shown in the example below, the Download History window lists the following items: All downloaded versions of your project All downloaded elements and their attributes

Version Numbering of Projects


The version number of a TriStation 1131 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

Chapter 7

Control Panels

Downloading a Project 281

TriStation 1131 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 TRICON is Version 1.1, and the current project in TriStation 1131 is Version 2.0, you must do a Download All. If the project in the TRICON is Version 3.1, and the project in TriStation 1131 is Version 3.2, doing a Download Change is sufficient. If the project in the TRICON is Version 3.2, and the project in TriStation 1131 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 1131 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 1131 changes the version number to: 1.2 A Download All would change the version number to: 2.0 Another Download All would change the version number to: 3.0

Chapter 7

Control Panels

282

Downloading a Project

Downloaded Elements & Their Attributes


Three types of elements are downloaded to the TRICON 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 1131 internal functions (each begins with an underscore character)
TriStation 1131 internal function (option lets you choose whether to display)

Download icon

Standard Library function Program, function or function block

For each downloaded element, TriStation 1131 provides the following categories of information:
State (St) Icon Element Name ID Number (Id#) Version Number Size Library of Origin Download All (downward arrow icon with bar on top) Download Change (downward arrow icon with three dots on top) Name of library element, program variable or internal function For Triconex use only Major and minor version numbers. In bytes Name of library containing listed element or user-created project containing listed program, function or function block

Chapter 7

Control Panels

Downloading a Project 283

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 1131 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 7

Control Panels

284

Disabling Points

Disabling Points
! WARNING

Triconex recommends that you disable points only during initial on-line testing, before the system is put into operation on an active process. For real-time operation, using TV-approved bypass logic in your project is a safer choice. In the TRICON Control Panel only, you can disable TRICON Input, Output and Memory points for two main purposes: Testing a project as it executes in the TRICON Plant maintenance without system shutdownfor 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 TRICON. 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 1131s point disabling capability may have a negative impact on the available scan rate of a project executing in the TRICON. Before building and downloading your TriStation 1131 project, 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 TRICON System Configuration dialog box. If you dont plan to disable points, make sure the Allow Disabling... option is not marked. This option can only be changed if your project is in a Download All state. When setting up your TRICON Control Panel, it may be helpful to place all program instance variables for points to be disabled on the same sheet. Assuming that your control panel is already set up and your project is downloaded to the TRICON, follow these steps to disable points:
1 Ensure that the TRICON keyswitch is in PROGRAM mode. 2 Go to the TRICON Control Panel. 3 Select the Connect command from the Commands menu or the toolbar.

Chapter 7

Control Panels

Disabling Points

285

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 on 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 1131 will display a Query box with the TRICON point name to which the program instance variable is connected. Click Yes to disable the point. The value of each disabled point will be displayed in red with a frame around it, as shown in the example below.

Note A disabled point retains the value it had before you disabled it, until you use the Set Value field and the Confirm button to change its value.

Chapter 7

Control Panels

286

Disabling Points

Listing all Disabled Points


After you have disabled a number of TRICON points, you can use the List Disabled Points command to display a list of all disabled points in your TRICON 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.

Enabling Points
To enable a specific TRICON input or output point, 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 TRICON Control Panel, select the Enable All Points command from the Commands menu.

Chapter 7

Control Panels

TRICON Operational Modes

287

TRICON Operational Modes


The operational mode of the TRICON determines what functionality is available, according to general guidelines listed in the table below. Specific permissible actions in a TriStation 1131 project are listed in the next section. For example, the TRICON must be in PROGRAM mode when you download a TriStation 1131 project. To select an operational mode for the TRICON system, you need to set the fourposition keyswitch which is located above the Power Modules in the upper left corner of the Main Chassis. The keyswitch position is read by the TRICON system software, the TriStation 1131 programming system, Modbus masters, external host computers and projects executing in the TRICON. Refer to the TRICON Planning & Installation Guide for more information.
Operational Mode RUN Available Functionality Normal operation with read-only capability. The Main Processors execute the previously-loaded projectattempts to modify program variables by TriStation 1131, Modbus masters or external hosts are rejected. For program loading and checkout. Allows control of the TRICON system from the TriStation 1131 programming system, including Download All and Download Change. Also allows writes to program variables by Modbus masters and external hosts. Stops reading inputs, forces non-retentive digital and analog outputs to 0, and halts the project. (Retentive outputs return to the value they had before the keyswitch was turned to STOP.) The STOP setting is recommended for installation and service of process-related equipment, but is not required for service of the TRICON. Allows writes to program variables by TriStation 1131, Modbus masters and external hosts. (Download All and Download Change from TriStation 1131 are not allowed.)

PROGRAM

STOP

REMOTE

! WARNING

The TRICON keyswitch is not a power switch. Its position enables or disables functionality for the entire TRICON system.

Chapter 7

Control Panels

288

TRICON Operational Modes

Permissible Actions in TriStation 1131


The following actions are permitted in a TriStation 1131 project when the TRICON keyswitch has been set to the appropriate operational mode:
Mode From Action in Tristation 1131 Monitor Execution Change Point Values Tristation 1131 REMOTE Monitor Execution Change Point Values Monitor TRICON Status External Host1 Reads Writes Download Monitor Execution Change Point Values Control Execution Tristation 1131 PROGRAM Download Monitor Execution Change Point Values Control Execution Disable Points Monitor TRICON Status Reads External Host Writes Monitor Execution Only Tristation 1131 Monitor Execution Only Monitor TRICON Status Reads External Host Writes 1. The external host could be a Distributed Control System (DCS), a Modbus master, a workstation or a personal computer (PC). Emulator Control Panel TRICON Control Panel TRICON Diagnostics Panel TriStation 1131 Component Emulator Control Panel TRICON Control Panel TRICON Diagnostics Panel

Emulator Control Panel

TRICON Control Panel

TRICON Diagnostics Panel

RUN & STOP

Chapter 7

Control Panels

CHAPTER 8

TRICON Diagnostic Panel

This chapter explains how to monitor a downloaded project and identify faults in a TRICON system using the TRICON Diagnostic Panel. The following topics are covered: Diagnostic tools Overview with sample steps TRICON System Configuration window Chassis windows Fault identification System performance and current project information Summary of Output Voter Diagnostics (OVD) Displaying and printing firmware version numbers Collecting TRILOG events

290

Diagnostic Tools

Diagnostic Tools
To help you monitor a TRICON and identify faults, the TRICON Diagnostic Panel provides diagnostic tools in a main menu and toolbar.

Main Menu Commands


The Diagnostic Panels main menu appears above the toolbar as follows, and the diagram on the following page shows the commands which are accessible from the it. (For menus and commands which are common to all TriStation 1131 views, see Basic Editing Tools on page 40.)

Shortcut Keys
In all TriStation 1131 menus, 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.

Chapter 8

TRICON Diagnostic Panel

Diagnostic Tools

291

Menus & Commands of the TRICON Diagnostic Panel


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

File

Edit

TRICON

Project

Element

Tree

New Project... Open Project... Save Project... Save As... Close Project... 1 <previously opened project> 2 <previously opened project> Print... Print Preview... Print Reports... Print Setup... Exit

Edit Configuration Build Configuration Rebuild Configuration Compile All Project Elements Emulator Control Panel TRICON Control Panel TRICON Diagnostic Panel View Download History... Change State to Download All

Directory... Description... Security... History... Project Options... TriStation 1131 Options...

Expand One Level Expand Branch Expand All Collapse Branch

View

Commands

Window

Help

Connect Disconnect Clear Faults on All Modules Enable OVD on All Modules Disable OVD on All Modules Display Firmware Versions Collect TRILOG Events Refresh Panel Continuous Refresh

New Window Cascade Tile Horizontal Tile Vertical Close All Arrange Icons Show Properties Sheet Show Message Bar (Vertical Message Bar) (Horizontal Message Bar) Hide Message Bar 1 PROGRAM: <program name>

TriStation 1131 Help Tip of the Day Keyboard Shortcuts Sample Projects Technical Support About TriStation 1131... TriStation 1131 Logo...

Chapter 8

TRICON Diagnostic Panel

292

Diagnostic Tools

Table of Diagnostic Tools


The table that follows describes the main menu commands which are specific to the TRICON Diagnostic Panel and the buttons in the toolbar which correspond to these commands.

As noted earlier, the underlined characters shown in the menu and command names are shortcut keys to be used in the typical manner of Windows applications. Note On any TriStation 1131 toolbar, the name of a tool is displayed if you place the cursor inside the icon for the tool. Tree Menu
Command Expand One Level Expand Branch Expand All Collapse Branch Description Expands a selected tree node by one level. Expands a selected tree node to all levels. Expands the whole tree to all levels. Collapses a selected branch of the tree.

Commands Menu
Command Connect Description Establishes communication between the Diagnostic Panel and a TRICON controller, assuming the PC running TriStation 1131 is physically connected to the TRICON. Logically disconnects the Diagnostic Panel from the TRICON controller with which communication was previously established. Clears all fault flags in TriStation 1131 and clears the fault indicators on modules in the TRICON. Therefore you should determine the cause of the fault(s) before using this command.

Disconnect

Clear Faults on All Modules

Chapter 8

TRICON Diagnostic Panel

Diagnostic Tools

293

Commands Menu
Enable OVD on All Modules Disable OVD on All Modules Display Firmware Versions Enables OVD for all output modules in the TRICON system. Refer to the section called Output Voter Diagnostics (OVD) on page 308 for more information. Disables OVD for all output modules in the TRICON system. Refer to the section called Output Voter Diagnostics (OVD) on page 308 for more information. Displays the firmware version numbers for all modules in a selected TRICON chassis. 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 TRILOG Events Refresh Panel Collects historical diagnostic information from the TRICON controller so that faults can be analyzed. Updates the status of the TRICON System Configuration window or an individual chassis window. (TriStation 1131 automatically updates the status whenever you move to the Diagnostic Panel.) For the TRICON System Configuration window, this command/tool continuously updates the alarm status of all chassis in the system. For individual chassis windows, this command/tool continuously updates the faults status of modules in the chassis.

Continuous Refresh

Chapter 8

TRICON Diagnostic Panel

294

Overview

Overview
The TRICON Diagnostic Panel consists of the following main components: The TRICON System Configuration window which displays the alarm status of all chassis in the TRICON system. Individual windows for each chassis which display the fault status of all modules in the chassis. Fields that give information about system performance and the current TriStation 1131 project. A Properties dialog box which helps you identify faults in both primary and secondary modules in the selected slot. This Properties box has a tab for each type of fault: Field Faults Power Faults Voter Faults Upcoming sections describe these components and their uses in greater detail.

Sample Steps
w The following are typical steps for using the TRICON Diagnostic Panel with an active TRICON: 1 Ensure that the PC on which you will run TriStation 1131 is physically

connected to the TRICON controller by means of a communication module and a cable. Note A TriStation 1131 PC must be connected to a TRICON chassis by means of a special cable attached to an EICM serial port, or an 802.3 cable attached to an NCM or ACM port. For instructions, refer to the chapter about installation and checkout in the TRICON Planning & Installation Guide.
2 Start TriStation 1131 if it is not already started. Open the project which has been

downloaded to the target TRICON. If this is not possible, create an empty project based on instructions in Appendix G, Maintenance Log-on to TRICON.
3 Go to the TRICON Diagnostic Panel (accessible from the TRICON menu).

Chapter 8

TRICON Diagnostic Panel

Overview

295

4 Use the Connect command to logically connect to the TRICON controller,

which asks you to select either a serial port or a network node. Note If you earlier specified a Network Node name as a parameter in the System Configuration dialog box, TriStation 1131 will supply the node name when you use the Connect command.
A password is requested here if you entered one as a System Configuration parameter. 5 Enter the password, if it is requested. 6 If you do not know the password, click the Ignore button instead. You can still

connect to the TRICON, but the following commands will be disabled: Clear Faults on All Modules Enable OVD on All Modules Disable OVD on All Modules Collect TRILOG Events

7 Upon connecting to the TRICON, the Diagnostic Panel displays an icon for

each chassis in the system which states whether the chassis alarm is on or off, as shown below. In addition, a beeping sound notifies you when a chassis alarm has turned on.

8 If you see a red chassis icon with Alarm On, double-click on the number of

that chassis in the data tree at the left of the window.


9 TriStation 1131 then displays an image of the alarming chassis with one or

more red status indicators on the faulting module(s), as shown in the illustration that follows.

Chapter 8

TRICON Diagnostic Panel

296

Overview

10 Select a faulting module and double-click to display a Properties dialog box

with tabs for the various types of faults that exist. The example below shows a faulting Supervised Digital Output module, so in this case you would select the Voter Faults tab in the Properties box.

Red Status Indicators

Fault Identification Properties Box

11 Under the Voter Faults tab, the number of the faulting point is listed. For

corrective action, refer to maintenance guidelines in the TRICON Planning & Installation Guide.
12 If necessary, repeat steps 6 through 10 for any other alarming chassis and

faulting modules.
13 After correcting all faults, select the Clear Faults on All Modules command

from the Tools menu.


14 Double-click on the node called TRICON System Configuration in the data

tree at the left of the Diagnostic panel to display the alarm states of all TRICON chassis in the system.

Chapter 8

TRICON Diagnostic Panel

TRICON System Configuration Window

297

TRICON System Configuration Window


When you use the Connect command under the Tools menu to establish communication with a selected TRICON, the TRICON System Configuration window is automatically displayed. This window provides an icon for each chassis in the TRICON system which states whether the chassis alarm is on or off. Chassis with the Alarm Off message are displayed in green, while chassis with the Alarm On message are displayed in red.
Red icon for chassis with alarm on

Data tree for selecting full chassis display

Green icon for chassis with alarm off

When a chassis alarm is on, double-click on the chassis number in the data tree at the left side of the window to find out which modules and/or points are faulting. Refer to the upcoming sections called Chassis Windows on page 298 and Fault Identification on page 302 for more information about this. Note When you are monitoring a TRICON system, displaying the TRICON System Configuration window continuously is a good practice. If you turn on the checkmark for the Continuous Refresh command under the Tools menu, the alarm status of all chassis is continuously updated. A beeping sound notifies you when the status of a chassis alarm has changed.

Chapter 8

TRICON Diagnostic Panel

298

Chassis Windows

Chassis Windows
For each chassis in your TRICON system, you can select an individual window which displays the status of all slots and indicates the presence of faults in installed modules. You select a chassis window by clicking on the desired chassis number in the data tree of the TRICON Diagnostic Panel, as shown below.

Upcoming sections describe the representation of slots in the chassis window and the basic meanings of the status indicators. If a fault indicator on a module in the chassis window is red, double-click on that module to bring up a Properties dialog box that helps you identify the cause of the fault. Refer to the upcoming section called Fault Identification on page 302 for more information.

Chapter 8

TRICON Diagnostic Panel

Chassis Windows

299

States of TRICON Slots


A slot in a TRICON chassis can be in one of four states identified by its color, as shown below. The slot colors are also briefly described in the Legend tab of the fault identification Properties box as shown on the next page.

White Red Blue


Yellow

Slot Color White Red Blue

Description This slot has been logically configured in the TriStation 1131 project and two I/O modules are physically installed. This slot has been logically configured for I/O modules but does not physically contain them. This slot has been logically configured for I/O modules, and an I/O module is physically installed in one slot location. The other slot location is ready for a hot spare module but does not physically contain one, so that location is blue. This slot has not been logically configured for an I/O module but there is at least one module physically installed in the slot.

Yellow

Chapter 8

TRICON Diagnostic Panel

300

Chassis Windows

Note An empty slot in a TRICON chassis is also white in color, but is clearly marked Empty Slot at the top.

Logical & Physical Slot Numbers


In a chassis window, the numbers appearing above the names of the module types are logical slot numbers used to denote slots under discussion. A logical slot may contain one or two communication or I/O modules. The numbers appearing below each physical division of the chassis (as displayed in a chassis window) are physical slot numbers. These are the numbers that the TRICON uses to access individual modules within a chassis.

Status Indicators
In a chassis window, the small colored squares at the top of each module represent the modules status indicators. The color of each square corresponds to the actual color of the indicator on the module installed in the TRICON. The various colors have the following meanings, which are reflected in the Legend tab of the fault identification Properties box shown below: Green means PASS Yellow means ACTIVE Red means FAULT Gray means off (not active and not faulting)

If a module is physically present in a slot and functioning properly, the PASS indicator is green and the ACTIVE indicator is yellow. If a FAULT indicator turns red (on), a diagnostic message appears in the fault identification Properties box.

Chapter 8

TRICON Diagnostic Panel

Chassis Windows

301

Refer to the upcoming section called Fault Identification on page 302 for more information. Green, yellow and red may have other meanings for other types of indicators, such as POWER and LOAD/FUSE on 16-point Supervised Digital Output modules. Refer to the TRICON Planning & Installation Guide for the meanings and recommended actions for all possible combinations of status indicators for each type of TRICON Module.

OVD State
Under normal conditions, OVD is enabled for all DO modules in a TRICON system. You know this is true if you see a green OVD field underneath the DO status indicators. If you disable OVD using the Disable OVD on All Modules command in the Tools menu, a yellow OVD field will appear below the DO status indicators. Examples of both states are shown below:

Green

Yellow

Chapter 8

TRICON Diagnostic Panel

302

Fault Identification

Fault Identification
When a fault indicator on a TRICON module turns red (on), either the TRICONs self-diagnostics have discovered a problem or there is a problem in the field wiring and/or field devices. To identify the cause of a fault, double-click on the faulting module to bring up the Properties box, as shown in the example below. This Properties box displays fault information for both the active and hot spare modules in the selected TRICON slot.

Red Status Indicators

Fault Identification Properties Box

The fault identification Properties box has a tab for each type of fault: Field Faults Power Faults Voter Faults The example above shows a faulting Digital Output module. In this case, you would select the Voter Faults tab in the Properties box. Upcoming sections describe the types of faults in greater detail. Note Field termination modules are not shown in chassis windows, but problems with field wiring and/or field devices can be identified in diagnostic messages found under the Field Faults tab of the Properties box.

Chapter 8

TRICON Diagnostic Panel

Fault Identification

303

Field Faults
The Field Faults tab lists the numbers of any points that have faulted. For output points, the faults are load or fuse problems that could have originated in the Field Termination module or the field wiring. For input points, the faults result from internal malfunctioning of the module or rapidly changing field inputs. To find out which point or points are causing the field fault(s), double-click on the faulting module to display the Properties box and go to the Field Faults tab, as shown in this example:

4...7

In the example, input points #4 through #7 are faulting. The other input points on the module are operating properly.

Alarm Behavior for Load or Fuse Errors


On the Main Chassis of a TRICON system, the chassis alarm turns on when a load or fuse error is present in any chassis of the system. (If a load or fuse error occurs on a module residing in an Expansion or RXM Chassis, that chassis alarm does not turn on.) If the LOAD/FUSE indicator of a module is red (on), then the Field Faults tab of the associated Properties box lists the numbers of any faulting points.

Chapter 8

TRICON Diagnostic Panel

304

Fault Identification

Power Faults
A diagnostic message under the Power Faults tab indicates the failure of a loopback power supply. For corrective action, refer to the section about maintenance in the TRICON Planning & Installation Guide.

Voter Faults
Applicable to Digital Output (DO) modules only, the Voter Faults tab lists the numbers of output points whose quad-output voting (OVD) circuitry has become defective. Under normal conditions, OVD is enabled for all DO modules in a TRICON system. You know this is true if you see a green OVD field underneath the DO status indicators. If you disable OVD using the Disable OVD on All Modules command in the Tools menu, a yellow OVD field will appear below the DO status indicators. If you suspect an OVD fault, double-click on the faulting DO module and go to the Voter Faults tab of the Properties box. If an OVD fault is present, you will find the number(s) of the faulting point(s) under the Voter Faults tab. To correct OVD faults, replace the DO module. If the faults persist on the replacement module, load glitches due to faulty field wiring may be the cause. If the FAULT indicator is on, but you do not find any faulting points listed under the Voter Faults tab of the Properties box, go to the Field Faults tab to check for points with other types of faults. Note A DO module does not continue to run OVD once an OVD fault or load/fuse error has been found.

Chapter 8

TRICON Diagnostic Panel

System Performance & Project Information

305

System Performance & Project Information


System performance and project information is available at the top of the TRICON Diagnostic Panel, whether you are displaying the TRICON System Configuration window or an individual chassis window. Each category of information is described in the table that follows. Note If you are monitoring a TRICON 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 under the Tools menu. A beeping sound notifies you if a chassis alarm turns on.
Item Project Description The name and version number of the project which has been downloaded to the TRICON system you are monitoring. The version number is incremented each time the program is downloaded to the TRICON. The current time of the TRICON 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 1131.) The maximum time it takes for the TRICON to obtain data from the input modules. The poll time should not exceed the scan timeif it does, you should increase the scan time using the Scan Rate parameter in the TRICON System Configuration dialog box. The maximum mount of memory space that the TRICON originally made available to your TriStation 1131 project. Free Memory shows how much memory space is left for expanding your project. Tells whether the STOP position of the TRICON keyswitch is logically enabled or disabled (for security purposes). You can enable or disable STOP with the parameter called Disable STOP on Operator Keyswitch in the TRICON System Configuration dialog box. If STOP is logically disabled, physically setting the TRICON keyswitch to the STOP position will not halt the control program. By default, the STOP position is disabled during installation of the TRISTATION software.

Calendar

Poll Time

Maximum Memory Key Stop/ Position

Chapter 8

TRICON Diagnostic Panel

306

System Performance & Project Information

Item Scan Requested/ Actual

Description (continued) Gives the requested scan rate and the actual scan rate. Scan rate is the time it takes the TRICON to evaluate the control program plus the time required for system overhead. Requested Scan Rate: The desired scan rate has been requested using the Scan Rate parameter in the TRICON System Configuration dialog box. If the requested scan rate is set too low, then scan-rate overruns may occur and the TRICON wont allow you to reset the scan rate parameter. The TRICON will automatically adjust the scan rate upward during the normal run if any scan-rate overruns occur. Actual Scan Rate: Tells how much time the last scan actually took. The actual scan rate will always be greater than the requested scan rate. The difference between the actual and requested scan rate is the amount of time it took for the Main Processors to synchronize at the end of the scan.

Free Memory

Amount of memory space the TRICON has available for expanding the size of your TriStation 1131 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 logic elements and configuration, the TRICON also needs (uses) memory for the following: Modbus conversion information for every Input Real and Memory Real element that has an alias Retentive masks for Output points and Memory elements Handling of labels for networks Configuration tables, data tables, communication tables, diagnostic tables, and so on
Status The setting of the TRICON keyswitch and the current state of the TriStation 1131 project. Key: The Main Chassis of the TRICON has a four-position keyswitch which controls the entire TRICON system. Possible keyswitch settings are REMOTE, RUN, PROGRAM and STOP. State: Possible program states are RUNNING, HALTED or PAUSED (single-scan mode).

Chapter 8

TRICON Diagnostic Panel

System Performance & Project Information

307

Item Scan Surplus

Description (continued) Tells how much of the requested scan rate is left after the control program has been processed. The surplus must be positiveif it is less than zero, then adjust the scan rate (using the Scan Rate parameter in the TRICON System Configuration dialog box) to make the surplus value greater than or equal to zero.

! WARNING

If the Scan Surplus is negative, the fault tolerance of the TRICON may be impaired. To avoid scan-time overrun problems, set the scan time to a higher value which allows execution time for all logic elements in your project including conditional statements and print statements. If the scan time you set for a project is not long enough, the TRICON automatically increases the scan time when needed to execute all logic elements. However, the TRICON will not reduce the scan time to its original setting after executing at a higher rate.

Chapter 8

TRICON Diagnostic Panel

308

Output Voter Diagnostics (OVD)

Output Voter Diagnostics (OVD)


Output Voter Diagnostics (OVD) is a routine used by the TRICON system to detect failures in the quad-output voting mechanism which monitors and guarantees the state of each digital output. Each type of Digital Output (DO) module in the TRICON uses a different OVD implementation and affects the load in different ways. Some DO types glitch (cause an invalid output state) only when a failed component is detected. Other DO types glitch the load on a continuing basis. In either case, the controlled process may be affected. This is why the TRICON Diagnostic Panel gives you the option of disabling OVD for selected DO Modules. The TRICON Planning & Installation Guide provides details about OVD operation for the various types of DO Modules. By default, OVD is enabled for all DO modules in the system. You know this is true if you see a green OVD field underneath the DO status indicators. If you disable OVD using the Disable OVD on All Modules command in the Tools menu, a yellow OVD field will appear below the DO status indicators. When OVD detects a failure, you can replace the failed module immediately, so that the TRICONs fault tolerance and Triple Modular Redundancy (TMR) remain in effect. If you disable OVD, the first failure could go undetected, and a second undetected failure could endanger the integrity of the system. In addition, disabling OVD means that load and fuse errors cannot be detected for off points (this does not apply to 8-point Supervised DO (SDO) modules). If glitches to an attached load are not tolerable, you should schedule regular maintenance periods for enabling OVD. During maintenance the controlled process is shut down, and you can cycle each output to both the on and off states to ensure 100% failure detection. Refer to the TRICON Planning & Installation Guide for more information about the TRICONs diagnostic routines and maintenance procedures. Note The OVDENABLE and OVDDISABLE functions can be used in program logic to enable and disable OVD for selected DO Modules.

Chapter 8

TRICON Diagnostic Panel

Firmware Version Numbers

309

Firmware Version Numbers


Use the Display Firmware Versions command in the Tools menu to display the firmware version numbers of all modules in a selected TRICON chassis. As shown in the example below, the following information is also displayed when available: 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, as shown below.

Chapter 8

TRICON Diagnostic Panel

310

Collecting TRILOG Events

Collecting TRILOG Events


Collect TRILOG Events on the Commands menu allows you to collect historical diagnostic information about the TRICON controller so that faults can be analyzed. You are not expected to evaluate this information yourself, but should send it to Triconex for analysis.
w Follow these steps to collect TRILOG events: 1 Ensure that your project is downloaded and running in the TRICON system. 2 Go to the TRICON Diagnostic Panel. 3 Select Collect TRILOG Events on the Commands menu. 4 Enter a name for the TRILOG events file and click Save. (The TEL extension

is automatically appended if you dont type it in.)


Once you enter the contact information, TriStation 1131 remembers it until you change it. 5 Enter the following contact information in the User Information for TRILOG

Events dialog box: Company Address City/State/Zip Contact Phone Comments

6 Click OK. An event log file can store a maximum of 500,000 events. 7 Allow TriStation 1131 to collect TRILOG events. A dialog box tells you how

many events have been collected.


8 Click the Stop button to stop TriStation 1131 from collecting TRILOG events. 9 Send the .tel file to the Triconex Customer Satisfaction Group in Irvine,

California.

Chapter 8

TRICON Diagnostic Panel

CHAPTER 9

System Administration

This chapter covers the following topics: Elements of a security system Element attributes Project options TriStation 1131 options Project History

Elements of a Security System


In TriStation 1131, you can create a security system that defines users and their privileges with regard to editing, library changes, TRICON state changes and other operations. By selecting the Security command of 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 1131.

312

Elements of a Security System

Initial Log-in
When you create a new project, TriStation 1131 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 creationotherwise, anyone who is familiar with the defaults can use them to access your project.

Users
Under the Users tab of the Project Security window, 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 1131 project and logs in. If the default names associated with the security levels (shown below) are not appropriate for your circumstances, go to the Level Names tab and make adjustments.

Chapter 9

System Administration

Elements of a Security System

313

Privileges
Under the Privileges tab of the Project Security window, you can assign security levels to TriStation 1131 and TRICON platform operations listed under the Category drop-down, as shown below.

Level 01 is the highest security level, providing access to all TriStation 1131 and TRICON 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.

Chapter 9 System Administration

314

Elements of a Security System

TRICON Operations
The following table describes the TRICON 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 Change Point Values Description Permits use of the Set Value button in the Properties box for program variables in the Emulator and TRICON Control Panel. Permits a state change from Download Change to Download All, as indicated in the Message Bar. Permits you to halt the project that is currently running in the TRICON and download another. Permits use of the Download All command in the Emulator and TRICON Control Panel. Permits use of the Download Change command in the Emulator and TRICON Control Panel. Permits use of Output Voter Diagnostics (OVD) for Digital Output modules you select in the Emulator or TRICON Control Panel. Permits use of TriStation 1131s point disabling feature in the TRICON Control Panel. Permits use of the Halt command in the Emulator or TRICON Control Panel. Permits use of the Emulator Control Panel. Permits use of the TRICON Control Panel. Permits use of the Pause and Single Step commands in the Emulator and TRICON Control Panel. Permits use of the Run command in the Emulator or TRICON Control Panel. Permits the setting of parameters like Scan Rate in the TRICON System Configuration dialog box.

Change State to Download All Control Execution of Mismatched Project Download All Download Change

Enable/Disable OVD

Enable/Disable Points Halt Project Open Emulator Control Panel Open TRICON Control Panel Pause/Single Step Application

Run Application Set Operating Parameters

Chapter 9

System Administration

Elements of a Security System

315

TriStation 1131 Operations


The following table describes the TriStation 1131 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 Add/Modify/Remove Users Description Permits addition, modification and removal of users under the Users tab of the Security dialog box. Permits changes to element access from Read Only, Read Write, or Locked status to another access state. Permits changes to all options accessible from the Project Options dialog box. Permits changes to the names associated with security levels under the Level Names tab of the Security dialog box. Permits changes to the privileges associated with security levels under the Privileges tab of the Security dialog box. Permits changes to all options accessible from the TriStation 1131 Options dialog box. Clears all actions recorded under the Project History dialog box. Permits exporting of elements to a shared library, using the Export button under the User Defined tab of the Project Directory dialog box. Permits importing of shared libraries, using the Import button under the Shared Libraries tab of the Project Directory dialog box. Permits creation, modification and deletion of programs, functions and function blocks. Permits printing of reports using the Print Reports... dialog box.

Change Element Access Attributes Change Project Options Change Security Level Descriptions

Change Security Level Privileges

Change TriStation 1131 Options Clear History Logs

Export Libraries

Import Libraries

Modify Element Print Reports

Chapter 9 System Administration

316

Elements of a Security System

Operation Update Report Databases View Element

Description Permits use of the Update Data button accessible in the Print Reports... dialog box. Permits Read-Only viewing of programs, functions an function blocks.

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 privilegesthey have access to all TriStation 1131 and TRICON platform 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.

Chapter 9

System Administration

Element Attributes

317

Element Attributes
The Element Description dialog box is accessible from the Element menu or from the Project Directory dialog box. The attributes in the top block of the Element Description dialog box are automatically logged by TriStation 1131 as you create and modify an element. The Internal ID is for Triconex use onlyCustomer 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. The other attributes are selected by the user.

Access Attributes
TriStation 1131 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.

Chapter 9 System Administration

318

Element Attributes

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 cant 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 under 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.

Chapter 9

System Administration

Project Options

319

Project Options
When you create a new project, TriStation 1131s default options apply unless you decide to change them. You can do this when you begin a new project or at any time during project development. Under the Project command of the main menu, select Project Options to access tabs for Language, Variable Annotation, and Communication options.

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 three available languages regardless of what the default language is. However, you will only be able to create new elements of the types which are marked under the Enabled Features box of the Language tab, as shown below.

Allowable Elements

Selections for New command in Project Directory

Chapter 9 System Administration

320

Project Options

Variable Annotations
A variable annotation is a box attached to the bottom of a variable which contains descriptive information, as in this example from a logic sheet:

Variable annotation works automatically if you turn on the feature as soon as you open a new project, before creating any logic elements or control panels. To do this, 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

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

Chapter 9

System Administration

Project Options

321

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. For descriptions of the other sub-dialog boxes in the Variable Annotations tab, refer to the section called Using Variable Annotation in Chapter 3, Function Block Diagram (FBD).

Communications
The Communications tab under the Project Options dialog box lets you select the following options: Default Connection to the TRICON system by means of a serial port or network node Debug Message Options Network TCP/IP Addresses

Default Connection
This option lets you set the default type of port used to connect the PC running TriStation 1131 to a TRICON chassis. The choices are: TRICON Serial Port for connecting by means of an EICM port TRICON Network node for connecting by means of an ACM or NCM port The option you select here will be reflected in the Connect to... dialog box when you use the Connect command from the TRICON Diagnostic Panel.

Debug Message Options


These options are intended for use by Triconex Customer Satisfaction Engineers when analyzing a communication problem: Request/Response Retries State Changes Message Detail

Chapter 9 System Administration

322

Project Options

Network TCP/IP Addresses


If your TriStation 1131 PC is communicating with a TRICON system by means of an ACM or NCM port, the TRICON node is identified by a TCP/IP address on your 802.3 network. To accommodate TCP/IP addresses, TriStation 1131 creates a table of 32 default TCP/IP addresses each time you create a new project. These addresses have the following format: 192.168.1.##, where ## is replaced by node numbers 01 through 32 If you are using a single-node TRICON network (in other words, one TRICON system and one PC running TriStation 1131), the default node names and their associated default TCP/IP addresses are sufficient for your connection needs. However, if you are using a multi-node TRICON network, you need to modify the default TCP/IP addresses by following these steps:
1 Ensure that the TCP/IP message protocol has been installed on your PC. 2 Obtain the actual TCP/IP addresses of the TRICON nodes on your network

from your System Administrator or IS department.


3 Go to the Communications tab in the Project Options dialog box. 4 In the Network TCP/IP Addresses dialog box, select a default address from

the list, such as TRINODE07=192.168.1.7,7 and click Modify.


5 Enter the desired Node Name, Node Number and actual TCP/IP address for

your network, as shown in this example:

Chapter 9

System Administration

Project Options

323

6 Repeat Steps 4 and 5 for each TCP/IP address you want to modify.

Rules for Node Names

When modifying TCP/IP addresses and their TRICON node names, the following rules apply: You can define multiple names for one node if desired. In other words, one TCP/IP address can by known by several node names. You cannot use the same node name twice, even if it applies to different TCP/IP addresses.

Chapter 9 System Administration

324

TriStation 1131 Options

TriStation 1131 Options


As you develop various projects, you can use the default settings for TriStation 1131s 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 1131s 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 1131 can find project files, shared libraries and report templates. The default directories are: Project Files (*.PT2) Shared Libraries (*.LT2) Report Template (*RPT) C:\TRISTN2\PROJECTS\ C:\TRISTN2\PROGRAM\ C:\TRISTN2\REPORTS\

Using the Message Bar


During a build or download operation for each element of your project, TriStation 1131 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 below) or vertically on the side of the screen, and adjust the position of the message bars tabs. If you double-click any error message or select Jump to Source in the message bars pop-up menu, TriStation 1131 highlights the error source as shown in this example:

Chapter 9

System Administration

TriStation 1131 Options

325

Pop-up Menu
Press the right mouse button while locating the cursor in the message bar to display a pop-up menu, as shown in the example above. The commands in the pop-up menu are accessible from the toolbar or main menu as well, with the exception of Jump to Source (described above).

Selecting Attributes
Use the Message Bar tab under the TriStation 1131 Options dialog box to select these 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

Chapter 9 System Administration

326

TriStation 1131 Options

Drawing Colors
The Drawing Colors tab under the TriStation 1131 Options dialog box lets you select standard or customized colors for the attributes of your logic drawings.
w 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:

2 Click the Change Color button to display a Windows common dialog box for

color selection, as shown below:

Chapter 9

System Administration

TriStation 1131 Options

327

3 To add a standardized color, select the desired color from Basic Colors. 4 Click OK. 5 To define a custom color, make the desired adjustments to the Hue, Saturation,

Luminescence, Red, Green and Blue attributes.


6 Click Add to Custom Colors. 7 Select the desired color from Custom Colors. 8 Click OK.

Chapter 9 System Administration

328

TriStation 1131 Options

FBD Editor
Use the FBD Editor tab under the TriStation 1131 Options dialog box to select these 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 3, Function Block Diagram (FBD).

LD Editor
Use the LD Editor tab under the TriStation 1131 Options dialog box to select these 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 4, Ladder Diagram (LD).

Chapter 9

System Administration

Project History

329

Project History
The Project History, or audit trail, is automatically generated by TriStation 1131 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 9 System Administration

CHAPTER 10

Printing

This chapter explains how to print: Logic sheets Standard reports Custom reports

Logic Sheets
TriStation 1131 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...

332

Standard Reports

Standard Reports
To access standard reports, select the Print Reports... command in the File menu. Before you can print reports, you have to click on 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 1131 does not update them automatically.

Chapter 10

Printing

Custom Reports

333

Custom Reports
To design custom reports, use the Crystal Reports package from Seagate or any other dBASE-compatible report generator. For instructions, refer to the Crystal Reports 5.0 Users Guide or the users 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 1131. If you want your report titles to appear in the Print Reports dialog box so they are printable from TriStation 1131, 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 1131s REPORTS directory. In the Print Reports... dialog box accessible from the Find menu, click on Update List to add your new report to the list of available report types, if it is not already in the list.

Chapter 10

Printing

CHAPTER 11

Libraries

Topics covered in this chapter are: Overview Automatically attached libraries Exporting elements Importing libraries

Overview
For every project, TriStation 1131 provides two standard libraries which contain functions and function blocks you can use for application development. In addition, you can share the programs, functions and function blocks that you create with other projects by using TriStation 1131s 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. In addition, you can verify the version number of any accessible library, whether it is attached to your project or not. The upcoming sections provide more information about these topics.

336

Automatically Attached Libraries

Automatically Attached Libraries


When you create a new TriStation 1131 project, two shared libraries are automatically attached to the project: The Standard Library (STDLIB) which complies with the IEC 1131-3 standard The TRICON Library (TR1LIB) for the TRICON platform 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 editors Select Function (Block) tool, the elements from the Standard Library and TRICON Library 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 in the Project Directory menu. Refer to the section called Importing Libraries to a Project on page 345 for details.
! WARNING

Never delete the Standard Library or TRICON Library from any of your TriStation 1131 projects.

Standard Library Functions


The following table briefly describes each function in the Standard Library. Refer to the on-line Help system for details.
Function Name ABS ACOS ADD AIN AND AOUT ASIN ATAN BOOL_TO_DWORD Description Calculates the absolute value of a single numeric variable Arc cosine Adds numeric, date and time, and time of day variables Converts analog inputs to real values Bitwise conjunction of two or more conditions Converts a real value to an analog output value Arc sine Arc tangent Converts type BOOL to type DWORD

Chapter 11

Libraries

Automatically Attached Libraries

337

Function Name CEIL CONCAT_DT COS CSCHED CTD CTU CTUD DINT_TO_DWORD DINT_TO_INT DINT_TO_LREAL DINT_TO_REAL DIV DT_TO_DATE DT_TO_TOD DWORD_TO_BOOL DWORD_TO_DINT EQ EXP EXPFLTR EXPT F_TRIG FLOOR GE GT INT_TO_DINT INT_TO_LREAL INT_TO_REAL INTGTOR LE LEADLAG LIMIT

Description Returns the smallest integer greater than or equal to input x Concatenates the date and time Cosine Schedule execution after specified number of scans Down counter Up counter Up-down counter Convert type DINT to type DWORD Convert type DINT to type INT Convert type DINT to type LREAL Convert type DINT to type REAL Divides numeric, date and time, and time of day variables Extract date from date and time of day Extract time of day from date and time of day Convert type DWORD to type BOOL Convert type DWORD to type DINT Compares and equates two inputs Calculates the natural exponential for real number inputs Provides an exponential filter to smooth a noisy input data value Raises one variable to the power or value of another Detects a change from true to false in the internal binary clock during execution Floor (lowest integer in real number) Greater than or equal to Greater than Converts type INT to type DINT Converts type INT to type LREAL Converts type INT to type REAL Performs integration of input values Less than or equal to Provides lead-lag compensation Limits the values that are allowed for an input

Chapter 11

Libraries

338

Automatically Attached Libraries

Function Name LN LOG LOOPDETR LREAL_TO_DINT LREAL_TO_INT LREAL_TO_REAL LT MAX MEDSEL MIN MOD MOVE MUL MUX NE NOT NUMBITS NUMBITS_DWORD OR OVDDISABLE OVENABLE R_TRIG REAL_TO_DINT REAL_TO_INT REAL_TO_LREAL ReportBadParam ROL ROR RS

Description Natural logarithm Base ten logarithm Processes loop detector inputs Converts type LREAL to type DINT Converts type LREAL to type INT Converts type LREAL to type REAL Less than Sets the maximum values that are allowable for inputs or outputs Selects median value Sets the minimum values that are allowable for inputs or outputs Modulocalculates the remainder of the division of one input by another Moves or assigns input values to output values Multiplies numeric, date and time, and time of day variables Selects a value from multiple inputs, depending on an input selector Not equal to Performs bitwise negation of conditions Number of BOOL inputs that are TRUE (1) Count number of 1 bits in DWORD Performs a bitwise comparison of the two or more inputs to establish the resultant value Disables output voter diagnostics Enables output voter diagnostics Detects a change from false to true in the internal binary clock during execution Converts type REAL to type DINT Converts type REAL to type INT Converts type REAL to type LREAL Reports a Bad Parameter error and clears ENO Rotates inputs left by a designated number of bits Rotates inputs right by a designated number of bits Reset dominant bistable function block (latch)

Chapter 11

Libraries

Automatically Attached Libraries

339

Function Name RTC SCALE SEL SHL SHR SIN SQRT SR SUB TAN TCJ_CONV TCK_CONV TIME_TO_SECS TIMEADJ TIMESET TOF TON TP TRUNC_LREAL_TO_DINT TRUNC_LREAL_TO_INT TRUNC_REAL_TO_DINT TRUNC_REAL_TO_INT TSCHED UNPACK16 XOR

Description Real Time Clock whose output gives the current system data and time Rescales an input value from one type of engineering units to another Selects a value from multiple inputs, depending on an input selection constant Shift left Shift right Sine Square root Sets dominant bistable function block (latch) Subtracts numeric, date and time, and time of day variables Tangent Converts Type J thermocouple inputs to Centigrade Converts Type K thermocouple inputs to Centigrade Converts type TIME to type LREAL seconds Adjusts TRICON clock by supplied value Sets TRICON clock by supplied value Off Delay Timer On Delay Timer Generates a pulse on the rising edge of an input Truncates type LREAL to type DINT Truncates type LREAL to type INT Truncates type REAL to type DINT Truncates type REAL to type INT Schedules execution at a specified time interval Unpacks DWORD into 16 bits Performs exclusive bit-wise comparison of two or more inputs to establish the resultant value

Chapter 11

Libraries

340

Automatically Attached Libraries

TRICON Library Functions


The following table briefly describes each function in the TRICON Library. Refer to the TRICON Library Functions manual and the on-line Help system for details.
Function Name AIN AOUT BLINK CHK_ERR CLAMP CLR_ERR CSCHED EXPFLTR GASDETR GATDIS GATENB INTGTOR LEADLAG LINEMNTR LOOPDETR MEDSEL NUMBITS NUMBITS_DWORD OVDDISABLE OVDENABLE PACK16 PACK32 PAGE_EJECT PERDEV PID POLY4 POLY5 PRINT_BOOL PRINT_CDT Description Converts analog input to real value Converts real value to analog output value Blinks a coil on and off at specified intervals Gets runtime error flags Limit range of input and output values Clears runtime error status Schedules execution after a specified number of scans Exponential filter of input value Processes gas detector inputs and generates alarms Closes a gate previously opened by GATENB for restricted write operations by external hosts Opens a gate for an external host to write to Aliased TRICON variables Performs integration of input value Provides lead-lag compensation Line monitormonitors analog current loop Processes loop detector inputs and generates alarms Selects the median value from the arguments listed in the invocation, and returns the result Count number of bits in Boolean inputs Count the number of bits in a DWORD Disables output voter diagnostics Enables output voter diagnostics Packs 16 bits into an integer Packs 32 bits into an integer Ejects paper to top of next page Percent Deviationcomputes percent of difference Proportional Integral Derivative control Polynomial with 4 coefficients Polynomial with 5 coefficients Prints boolean valueOFF if 0 and ON if 1 Prints current date and time

Chapter 11

Libraries

Automatically Attached Libraries

341

Function Name PRINT_CRLF PRINT_CTOD PRINT_DINT PRINT_REAL PRINT_STRING PRNTR_FLUSH SCALE SOECLR SOESTAT SOESTOP SOESTRT TCJ_CONV TCK_CONV TIMEADJ TIMESET TMR TOGGLE TR_CALENDAR TR_CHASSIS_STATUS TR_MP_STATUS TR_PEER_STATUS TR_POINT_STATUS TR_PORT_STATUS TR_PROGRAM_STATUS TR_SCAN_STATUS TR_SLOT_STATUS TR_URCV_BOOL

TR_URCV_DINT

TR_URCV_REAL

Description Prints carriage return and line feed Prints current time of day Prints double integer value up to eight characters Prints real value up to eight characters Prints string of text Clears the specified printer port buffer Rescales an input value Clears a specified SOE block Checks status of a specified SOE block Stops event collection for a specified SOE block Starts event collection for a specified SOE block Converts Type J thermocouple inputs to Centigrade Converts Type K thermocouple inputs to Centigrade Adjusts TRICON clock using values supplied by host Sets TRICON clock using values supplied by host Counts for a specified time interval and sets an output. Toggles the state of a coil. Gets calendar values from TSX Gets chassis information from TSX Gets Main Processor information from TSX Gets peer-to-peer information from TSX Gets point information from TSX Gets communication port information from TSX Gets program information from TSX Gets scan information from TSX Gets slot information from TSX Receives up to 20 BOOL values from a matching TR_USEND_BOOL function block on another TRICON node Receives up to 20 DINT values from a matching TR_USEND_DINT function block on another TRICON node Receives up to 20 REAL values from a matching TR_USEND_REAL function block on another TRICON node

Chapter 11

Libraries

342

Automatically Attached Libraries

Function Name TR_USEND_BOOL

TR_USEND_DINT

TR_USEND_REAL TSCHED UNPACK16 UNPACK32 X_OF_N

Description Sends up to 20 BOOL values to a matching TR_URCV_BOOL function block on another TRICON node Sends up to 20 DINT values to a matching TR_URCV_DINT function block on another TRICON node Sends up to 20 REAL values to a matching TR_URCV_REAL function block on another TRICON node Schedules execution at specified time interval Unpacks DWORD into 16 bits Unpacks DWORD into 32 bits Decides if X of N measurements exceed specified limit

Printing Messages to an EICM Port


To print messages about alarm conditions and data values, you need to connect a printer to the parallel port of an Enhanced Intelligent Communication Module (EICM) installed in your TRICON system. Then use the TRICON Configuration editor to configure the EICMs parallel port for printingport 5 or 10 is available. Refer to the section called EICM Configuration in Appendix A, Configurable Modules for detailed instructions. Set up your logic to generate printed messages by selecting the desired print functions from the TRICON Library and connecting appropriate variables to their parameters. TriStation 1131 provides the following print functions for the TRICON platform:
Function Name PRINT_BOOL PRINT_CDT PRINT_CRLF PRINT_CTOD PRINT_DINT PRINT_REAL PRINT_STRING PRNTR_FLUSH Description Prints Boolean valueOFF if 0 and ON if 1 Prints current date and time Prints carriage return and line feed Prints current time of day Prints double integer value up to eight characters Prints real value up to eight characters Prints string of text Clears the specified printer port buffer

Chapter 11

Libraries

Automatically Attached Libraries

343

Sample Logic with Print Function The sample FBD logic in this section uses the PRINT_STRING function with the R_TRIG (Rising Edge Detector) function to ensure that the message will print only once during each scan when the Boolean condition in COMMAND_PRINT is true. After a PRINT_STRING function is placed on the logic sheet, a constant is connected to the PRINTER parameter and given a DINT value of 5 to designate the desired parallel port of the EICM, as shown next:

The IN parameter was used to specify the desired string of text with a data type of STRING in the Initial Value field of the Properties box, as shown below.

Chapter 11

Libraries

344

Exporting Elements to a Library

Exporting Elements to a Library


A shared library is created by means of exporting user-defined elements. To begin an export, take these steps: 1. Open the TriStation 1131 project from which you want to export elements. 2. Open the Project Directory and go to the User Defined tab. 3. Click on 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. To import a shared library to another project, follow the instructions in the next section.

Chapter 11

Libraries

Importing Libraries to a Project

345

Importing Libraries to a Project


After a shared library of user-derived elements has been created, you can import it to other TriStation 1131 projects. To import a library, take these steps: 1. Ensure that the shared library (LT2) file is accessible on your hard disk, over a network, or through some other media. (The Directories tab of the TriStation 1131 Options menu identifies the default directory for shared libraries.) 2. Open the TriStation 1131 project to which you want to import the shared library. 3. Open the Project Directory, go to the Shared Libraries tab and click on Import. 4. A list called Libraries Imported to this Project will be displayed. Click on Add to see a Windows list of accessible library files. 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 appear in the Element Name list along with elements from the Standard Library and TRICON Library.

Verifying Library Versions


Occasionally Triconex issues an update to the Standard Library and/or TRICON Library which you will want to attach to your project. When you click on Verify Library Version, for each library TriStation 1131 tells you whether the version attached to your project or the version present on your hard drive is the latest. To attach the latest version, click on the Update command.

Deleting Libraries
! WARNING

Never delete the Standard Library or TRICON Library from any of your projects, and use caution when deleting other type of libraries with the Delete button.

Chapter 11

Libraries

APPENDIX A

Configurable Modules

When you add certain types of modules to a TRICON chassis, you must use the Setup option in the Properties box to configure their parameters. This appendix describes the configuration of these modules and discusses some related issues, covering the following topics: EICM configuration Pulse Input configuration SMM configuration Modules for 802.3 network communication (ACM & NCM) Time synchronization

348

EICM Configuration

EICM Configuration
Note Every TRICON system must have at least one ACM, EICM or NCM module installed in the Main Chassis or the first Expansion Chassis. Otherwise an error will be generated when you attempt to build the configuration in TriStation 1131. When you install a model 4119 EICM in a Main Chassis or the first Expansion Chassis, you must define the protocol for at least one EICM port. In TriStation 1131, go to the TRICON Configuration editor and use the Hardware Allocation window. Select Setup from the EICMs Properties box to display the ICM Configuration dialog box:

Select the port you want to configure or modify, then choose the protocol you want to define. The options for serial and parallel ports are described in the following pages.

Serial Ports
When you select a serial port (Port 1, 2, 3, 6, 7, or 8), TriStation 1131 displays choices for Not Configured, TriStation 1131, Debug, and Modbus.

Appendix A Configurable Modules

EICM Configuration

349

Not Configured, TriStation 1131 & Debug


When you select Not Configured, TriStation 1131, or Debug, no additional options are involved.

Modbus
Note With TriStation 1131 Version 1.1, EICM ports can be configured only as Modbus slaves. The functionality to configure an EICM port as a Modbus master or combination master and slave will be available with a future release. Please contact Triconex regarding availability. When you configure a port as a Modbus slave, TriStation 1131 displays choices for the following items. Slave Address (1 247) Baud rate (19200, 9600, 4800, 2400, or 1200) Data bits (RTU mode or ASCII mode) Stop bits (1 or 2) Parity (Odd, Even, or None) Handshake (None or Hardware) Modbus Range: Min (0 32767 allowed) and Max (1 32767 allowed) Note All Modbus slaves on the same Modbus port must use the same baud rate, data bits (mode), parity, and handshake settings. Slave Address Enter the slave address (1 through 247) for the port you are configuring as a Modbus slave. Baud Rate The EICM supports an aggregate data rate of 57,600 baud. (In other words, the total data rate for all four ports must be less than or equal to 57,600.) The available baud rates are: 19200, 9600, 4800, 2400, and 1200. The following are examples of correct data rate selections:
Example 1. Port 1 (Modbus): Port 2 (Modbus): Port 3 (Modbus): + 19,200 baud 19,200 baud 19,200 baud 57,600 baud

Appendix A Configurable Modules

350

EICM Configuration

Example 2.

Port 1 (Modbus): Port 2 (Modbus): Port 3 (Modbus): Port 4 (TRISTATION) +

9,600 baud 19,200 baud 9,600 baud 9,600 baud 48,000 baud

Data Bits If you select 7 data bits, the port operates in ASCII mode. If you select 8 data bits, the port operates in RTU mode. If you are configuring a combination master and slave, TriStation 1131 automatically selects 8 data bits for RTU mode. Multipoint RS-232 Mode On Model #4118 and #4119 EICMs, choose between RS-232 and RS-422 modes using DIP switches on the EICM side panel. If you select Hardware (HRDWR) handshake mode, the EICM asserts Request to Send (RTS) when it has a message to transmit. The EICM begins transmission when it receives Clear to Send (CTS) from the Modbus master. The EICM ignores all characters unless the Modbus master asserts Data Carrier Detect (DCD). This allows the Modbus master to use half-duplex modems. If you select None for the handshake mode, the EICM asserts RTS at all times and ignores CTS and DCD. In other words, characters are transmitted even if the receiver is not ready. This could result in an overrun state, and the characters will have to be re-transmitted. Multipoint RS-422 Mode On Model #4118 and #4119 EICMs, choose between RS-422 and RS-232 modes using DIP switches on the EICM side panel. If you select Hardware (HRDWR) handshake mode, the EICM enables its RS-422 transmit driver only when it is sending data. This is the correct setting for all single pair networks and for slave ports in two-pair, multipoint networks. If you select None for the handshake mode, the EICM enables its RS-422 transmit driver at all times. This is the correct setting for a Modbus slave port in a two-pair, point-to-point network.

Appendix A Configurable Modules

EICM Configuration

351

Modbus Range The TRICON uses the values you place in the Min and Max fields to convert real numbers into integers for transmission over Modbus. Modbus Min and Modbus Max are the lower and upper limits of the Modbus masters numeric range. To determine the correct values for Modbus Min and Modbus Max, see the users manual for your Modbus master. The Modbus Min and Modbus Max values for commonly used Modbus masters are:
Modbus Master Honeywell DHP Operator Workstation Min Value 0 0 Max Value 9999 32767

For individual memory real and input real variables, may want to specify MinSpan and MaxSpan values in the TRICON Point Connections screen. MaxSpan and MinSpan are the upper and lower limits of the variable in engineering units. For more information, refer to the section called MinSpan & MaxSpan Fields on page 211.

Parallel Ports
EICM Ports #05 and #10 are for Centronics-compatible printers. If you select Port #05 or Port #10 when configuring the EICM, TriStation 1131 displays fields for the form length (0-255 rows; default is 66) and width (0-255 columns; the default is 132).

Appendix A Configurable Modules

352

Pulse Input Configuration

Pulse Input Configuration


For the model 3510 Pulse Input (PI) module, you can configure a maximum of eight Input Real TRICON points (global variables). First you have to install a PI module in a TRICON chassis and establish global variable connections for the eight Input Real points, using methods described in Chapter 6, Configuration Editor. Then click on the Setup option in the Properties box to display the Pulse Input Configuration dialog box. The following sections provide details about configuring Input Real points for speed or RPM measurement.

Speed Point Configuration


The dialog box shown below gives an example of configuring a TRICON point for speed measurement. The global variable name of an Input Real point is selected, and Speed is selected in the Point Type field. The Point Options field displays the default values for speed characteristics, which are described below.

Maximum Speed must be a positive floating point value. Its default value is 30000.0. EU Scale is the scale factor for converting pulses per minute to the desired engineering units. EU Scale must be represented as a positive floating point number. Its default value is 1. The algorithm assumes that the normal calculation is engineering units per minute. To use units per hour, multiply the speed-perminute scale factor by 60. To use units per second, divide the speed-per-minute scale factor by 60.

Appendix A Configurable Modules

Pulse Input Configuration

353

The TRICON uses this formula for speed measurement:


Speed = Pulses EU Scale Minute

Based on this formula, the following table shows the correct engineering units to use for measuring pulses per second, minute, and hour:
To Measure: pulses / second pulses / minute pulses / hour Set EU Scale to: 0.016667 1.000000 60.000000

RPM Point Configuration


The dialog box shown below gives an example of configuring a TRICON point for RPM measurement. The global variable name of an Input Real point is selected, and RPM is selected in the Point Type field. The Point Options field displays the default values for point characteristics, which are described in the following paragraphs.

Maximum RPM must be a positive floating point value. Its default value is 30000.0. Pulses Per Revolution represents the number of pulses per revolution of the measuring shaft.

Appendix A Configurable Modules

354

Pulse Input Configuration

The Scale Factor for engineering units must be a positive floating point number. Its default value is 1. The algorithm assumes that the normal calculation for RPM speed is revolutions per minute. To use revolutions per hour, multiply the scale factor by 60. To use revolutions per second, divide the scale factor by 60. The scale factor should also include the RPM conversion from the measuring shaft to the desired output shaft. The TRICON uses this formula for RPM measurement:
RPM = Pulses ( Minute ) Scale Factor Pulses/Rev

Based on this formula, the following table shows the correct Scale Factor to use for measuring pulses per revolution in seconds, minutes, and hours.
To Measure: pulses / second pulses / minute pulses / hour Set EU Scale to: 0.016667 1.000000 60.000000

Appendix A Configurable Modules

SMM Configuration

355

SMM Configuration
A model 4409 SMM acts as an interface between a TRICON controller and Honeywells Universal Control Network (UCN), one of the principal networks of the TDC 3000 Distributed Control System. Each TRICON system can contain a maximum of six SMMs in three logical slots of the Main Chassis and Chassis #2 (Expansion or RXM Chassis). You can install the SMMs in an active and hot spare configuration, or without using the hot spare capability. The SMMs UCN node address is configured with TriStation 1131, while the SMMs point database is configured from a Honeywell Universal Workstation. To configure an SMM in a TRICON chassis, click on the Setup option in the Properties box to display the SMM Configuration dialog box. Enter the Node Number and check the options as needed. These parameters are explained on the next page.

Appendix A Configurable Modules

356

SMM Configuration

The following table describes the SMMs parameters:


Parameter Name Node Number Description Up to 32 redundant devices are supported by the UCN, which consists of redundant coaxial cables. Odd-numbered addresses are reserved for active modules and even addresses for hot spare modules. Therefore you should enter an odd number from 1 to 63 as the UCN node address for this logical slot.

! WARNING

The UCN node address does not identify left and right physical positions. Because UCN points can only be mapped to one address, a redundant pair of SMMs exchanges the odd/even addresses so that the active module always has the odd address.
Prohibit Writes Check this box if you want to prevent Honeywell workstations from writing to the TRICON. Do not check the box if you want writes from Honeywell workstations on the UCN to be allowed by the TRICON. This box should be checked only by Honeywell factory test personnel. Leave unchecked to disable factory test mode. Check this box if you want this pair of SMMs to update the TRICON with the UCN time. SMMs operate as logical pairs in the TRICON system, so you should check this box for only one of the logical pairs of SMMs. (Two pairs of SMMs are the maximum allowed.) Not supported.

Enable UCN Test Mode Enable time synchronization with external source SOE Block

Refer to the SMM Users Manual for more information about configuring the SMM.

Appendix A Configurable Modules

Modules for 802.3 Network Communication

357

Modules for 802.3 Network Communication


Note Every TRICON system must have at least one ACM, EICM or NCM module installed in the Main Chassis or the first Expansion Chassis. Otherwise an error will be generated when you attempt to build the configuration in TriStation 1131. With an ACM or NCM installed, the TRICON can communicate with other TRICONs and with external hosts over 802.3 networks. The ACM and NCM have other functions as well, but the use of a TRICON node number and TCP/IP address is common to both. Therefore this section covers the following topics: ACM configuration NCM configuration TRICON node number & TCP/IP address

ACM Configuration
The model 4609 ACM acts as an interface between a TRICON controller and Foxboros Intelligent Automation (I/A) Series DCS, appearing to the Foxboro system as a safety node on the I/A Series Nodebus. The ACM also supports the following Triconex protocols and applications on external host PCs: Tristation protocol for TriStation 1131 TSAA protocol for Triconex applications TSAA/TCP(UDP)IP for user-written applications on external hosts Only one logical slot is available for ACMs in a TRICON Main Chassis or Chassis #2 (Expansion or RXM). You can install one or two ACMs in a logical slot depending upon your redundancy requirements. To configure an ACM in a TRICON chassis, click the Setup option in the Properties box to display the ACM Configuration dialog box shown below. Click the options and enter text as needed. For more information, refer to the upcoming sections called TRICON Node Number & TCP/IP Address on page 361 and Time Synchronization on page 363.

Appendix A Configurable Modules

358

Modules for 802.3 Network Communication

Appendix A Configurable Modules

Modules for 802.3 Network Communication

359

NCM Configuration
With a model 4329 NCM installed, the TRICON can communicate with external hosts in an 802.3 network. The following table lists the protocols and applications that are supported by the NCMs NET1 and NET2 ports:
Triconex Protocols Tristation Peer-to-Peer (private 802.3 network for a maximum of 10 TRICONs) Time Synchronization (private 802.3 network for a maximum of 10 TRICONs) TSAA TSAA/TCP(UDP)/IP (user-written applications for external hosts) Triconex Applications Sequence of Events TRICON DDE Server (DOS/Windows based) TRICON DDE Server (NT-based) TRISTATION MSW TriStation 1131
1.

NCM NET1

NCM NET2 x

x1 x x1 x NCM NET2 x1 x x1 x1 x

NCM NET1

These protocols and applications will be available to TriStation 1131 projects with future releases. Please contact Triconex for more information.

Note Refer to the 802.3 Network Planning & Installation Guide for more information about Triconex protocols and applications. Only one logical slot is available for NCMs in a TRICON Main Chassis or Chassis #2 (Expansion or RXM). You can install one or two NCMs in a logical slot depending upon your redundancy requirements.

Appendix A Configurable Modules

360

Modules for 802.3 Network Communication

To configure an NCM in a TRICON chassis, click the Setup option in the Properties box to display the NCM Configuration dialog box shown below. Click the options and enter text as desired. For more information, refer to the upcoming sections called TRICON Node Number & TCP/IP Address on page 361 and Time Synchronization on page 363.

Appendix A Configurable Modules

Modules for 802.3 Network Communication

361

TRICON Node Number & TCP/IP Address


An ACM or NCM installed in a TRICON must have a TRICON node number and a matching TCP/IP address. First you need to set the node number with the physical switches on the module. Then you need to establish the matching TCP/IP address using one of these methods: Allow the ACM or NCM to obtain the address from the 802.3 network host Allow the ACM or NCM to apply a default address Enter the address in the TCP/IP Address field(s) of the ACM or NCM Configuration dialog box In most cases, you wont need to enter the TCP/IP address yourself because the ACM or NCM will be able to obtain it from the 802.3 network host or use a default address. The following sections provide details.

802.3 Network Host


Upon power-up, the ACM or NCM uses Reverse ARP (RARP) to obtain the TCP/ IP address from a host on an 802.3 network to which the NET2 port of the ACM or NCM is connected.

Default Address
If the TCP/IP address cannot be obtained from an 802.3 network host upon powerup, the ACM or NCM applies a default TCP/IP address which matches its TRICON node number and physical switch setting. The table below lists the default TCP/IP addresses and their node number equivalents:
Default TCP/IP Address 192.168.1.1 192.168.1.2 192.168.1.3 : : 192.168.1.31 192.168.1.32 TRICON Node Number (ACM Switch Setting) 01 02 03 : : 31 32

Appendix A Configurable Modules

362

Modules for 802.3 Network Communication

! WARNING

The physical switch setting of an ACM or NCM must match its TRICON node number. If there are two ACMs or NCMs in a logical slot, both must have the same switch setting and same TRICON node number. If there are two logical slots each containing two ACMs and two NCMs respectively, all of these modules must have the same switch settings and same TRICON node numbers.

User-supplied Address
If you dont want to use a default TCP/IP address and no 802.3 host is available to supply the TCP/IP address, follow these steps: Ask your System Administrator for the actual TCP/IP address of the TRICON node where the ACM is installed. Open the desired TriStation 1131 project. Enter the actual address in the TCP/IP Address field(s) of the ACM or NCM Configuration dialog box. Go to the Communications tab of the Project Options dialog box and associate the actual TCP/IP address with the TRICON node number which matches the switch setting on your ACM or NCM. Connect your TriStation 1131 project to a serial port and download to a TRICON. After a successful download, you can use the ACM NET2 port to communicate with TriStation 1131. Refer to the 802.3 Network Planning & Installation Guide and the ACM Users Guide (under development) for more information about configuring ACMs and NCMs in multi-node TRICON systems.

Appendix A Configurable Modules

Time Synchronization

363

Time Synchronization
This section gives basic facts about time synchronization, an issue that affects most TRICON configurations which use communication modules. Depending on the options you select for your communication modules, a TRICONs time can be synchronized with: The TRICON Master Node in a network of TRICONs A Distributed Control System (DCS) An external device that writes aliased data to the TIMESET or TIMEADJ functions in a TriStation 1131 project Read the following sections for more information about these options and a list of guidelines that apply to time synchronization.

TRICON Master Node


In a network of TRICONs connected by 802.3 cabling, the TRICON Master Node is the TRICON with the lowest node number. For example, in a network of five TRICONs, Node 1 is the master node. If Node 1 is down, then Node 2 becomes the master node. When Node 1 comes back on-line, it again becomes the master node. You can synchronize a TRICONs time with the master node in a network by selecting an appropriate option for the ACMs NET2 port or the NCMs NET1 port. For more information, refer to the sections called ACM Configuration on page 357 and NCM Configuration on page 359. If your networked TRICONs are collecting event data for system maintenance and shutdown analysis, time synchronization must be used to ensure accurate timestamping of events.

DCS
I/A Series If the TRICON is being used as a safety node on Foxboros Intelligent Automation (I/A) Series DCS, the configuration will include an ACM. To synchronize the TRICONs time with the I/A Series DCS, go to the ACM Setup dialog box and select the option On NET1 enable time synchronization with external source. TDC 3000 If the TRICON is being used as a safety node on the Honeywell TDC 3000 DCS, the configuration will include an SMM. Go to the SMM Setup dialog box and select the option for Enable time synchronization with external source

Appendix A Configurable Modules

364

Time Synchronization

if you want the TRICON to receive time adjustments from the TDC 3000. If the SMM is part of a network of TRICONs which are collecting event data for system maintenance and shutdown analysis, time synchronization must be used to ensure accurate time-stamping of events.

TIMESET & TIMEADJ Functions


An external device with write privileges can adjust a TRICONs time by writing aliased data to the TIMESET or TIMEADJ functions in a TriStation 1131 project. This could happen under circumstances such as the following: A Modbus master writes to the project over an EICM port. A Windows-based DDE application or DDE server writes to the project over an NCM NET2 port or an ACM NET2 port. Another TRICON writes to the project executing in your TRICON over an EICM port acting as a Modbus Master, or over an NCM port using Peer-toPeer protocol.

Guidelines that Apply


The following guidelines apply to any TRICON whose time is synchronized with an external device: In a network of TRICONs with multiple communication modules, only one module within each TRICON should be selected to perform time synchronization. If a TRICONs time is synchronized with the TRICON Master Node, that TRICON rejects time adjustment attempts from all other sources. A TRICON Master Node is always free to accept time adjustments from an external source. In a typical configuration, networked TRICONs connected by NCMs are time-synchronized with the TRICON Master Node. However, the TRICON Master Node itself may be time-synchronized with a DCS by means of an ACM or SMM. In this manner, the DCS time prevails for all TRICONs in the network.

Appendix A

Configurable Modules

APPENDIX B

Keyboard & Mouse Shortcuts

Keyboard Shortcuts
This section provides keyboard shortcuts for performing tasks such as editing, scrolling and selecting. Tasks performed by the toolbar are also included here.

Keystroke Shortcuts
To Copy selected items Cut selected items Paste items in the clipboard Redo the last edit operation Undo the last edit operation Press
CTRL+C CTRL+X CTRL+V CTRL+A CTRL+Z

Text Navigation Keys


To Move Character to the left Character to the right One word to the left One word to the right Current line Previous line Press
LEFT ARROW (

) ) ) )

RIGHT ARROW (

CTRL+LEFT ARROW (

CTRL+RIGHT ARROW ( DOWN ARROW ( UP ARROW (

366

Keyboard Shortcuts

To Move To end of current line To beginning of current line One page up One page down To beginning of current element To end of current element

Press
END HOME PAGEUP PAGEDOWN CTRL+HOME 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 One character to the left One character to the right To the end of a word Press
BACKSPACE
DEL (DELETE)

CTRL+T

Note The above text selection keystrokes work in intermediate windows or when using the Structured Text editor.

Sheet Scrolling
To Scroll Up one line at a time Down one line at a time Up one page at a time Down one page at a time Press
UP ARROW

() ()

DOWN ARROW

PAGE UP PAGE DOWN

Appendix B Keyboard & Mouse Shortcuts

Mouse Shortcuts

367

Mouse Shortcuts
This section provides mouse shortcuts for selecting, re-sizing, moving (dragging and dropping), and de-selecting objects.

Selecting Objects
To Select objects Do This 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 Re-size objects Do This 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).

Dragging & Dropping Objects


To Drag & drop objects

Example of re-size arrow:

Do This 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 B Keyboard & Mouse Shortcuts

368

Mouse Shortcuts

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

Edit Object Properties


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

Dialog Boxes
Some TriStation 1131 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 Select a tab Do This Click on the desired tab or press the CTRL+TAB keys until the desired tab is highlighted and displayed.

Select or clear options using a mouse

Point to the option button, check box, or list item desired and click the left mouse button. Option Button Check Box

Appendix B Keyboard & Mouse Shortcuts

Mouse Shortcuts

369

To Select an item from a drop-down list

Do This Click on the arrow or press ALT+DOWN ARROW ( ) to list the 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 1131 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 Open a new window of the current element Make windows overlap Do This Click on New Window. Click on 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. Click on Tile Horizontal to display any open windows horizontally on the screen. This is useful for showing several windows simultaneously. Click on Tile Vertical to display any open windows vertically on the screen. This is also useful for showing several windows simultaneously. Click on Close All to close all open windows. Prompts you to save any files that have been changed since they were opened.

Arrange windows abovebelow each other without overlapping Arrange windows side-byside without overlapping

Close all open windows for the current project without closing the project

Appendix B Keyboard & Mouse Shortcuts

370

Mouse Shortcuts

To Arrange all iconized windows for the current project Display the properties dialog for selected items in the current project element Display the message bar at the bottom of the screen Display the message bar horizontally across the bottom of the screen

Do This Click on Arrange Icons to neatly arrange all iconized or minimized windows. Click on Show Properties or the Properties Dialog button to display the properties of selected items. Click on Show Message Bar to display the message bar across the bottom of the screen. Click on Show Message Bar Horizontal or the Horizontal Message Bar button to display compiler messages in a horizontal box across the bottom of the screen while building elements. Click on Show Message Bar Vertical or the Vertical Message Bar button to display compiler messages in a vertical box on the right side of the screen during the building of elements. Click on New Window. Click on 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.

Display the message bar vertically on the right side of the screen

Open a new window of the current element Make windows overlap

Appendix B Keyboard & Mouse Shortcuts

APPENDIX C

TRISTATION MSW Corollaries

This appendix provides tables that show TriStation 1131 corollaries for the following features of the original TRISTATION MSW programming system: Arithmetic & logic operators Conditional statements & operators Math functions Process control functions TRICON clock functions Fire & gas function blocks Sequence of Events function & function blocks Gated access functions Peer-to-Peer communication functions Modbus functions Utility functions Printer control functions System control functions Coils & contacts in Relay Ladder Language (RLL) System variables

372

Arithmetic & Logic Operators

Arithmetic & Logic Operators


The following are TriStation 1131 corollaries for TRISTATION MSWs arithmetic and logic operators:
TRISTATION MSW Implementation + * / = MOD SHL SHR & ^ | ~ ** Addition Subtraction Multiplication Division Assignment Modulo Left shift Right shift Logical AND Exclusive OR Inclusive OR Complement Negation Power Description

TriStation 1131 Implementation


ADD SUB MUL ( * ) DIV ( / ) MOVE ( := ) MOD SHL SHR AND XOR OR NOT EXPT ( ** )

Appendix C

TRISTATION MSW Corollaries

Conditional Statements & Operators 373

Conditional Statements & Operators


The following are TriStation 1131 corollaries for TRISTATION MSWs conditional statements and operators:
TRISTATION MSW Implementation Description Statement for conditional execution of various instructions. Forms of this statement include: IF...THEN...ENDIF; IF...THEN...ELSE... ENDIF; IF...THEN...ELSEIF...THEN...ENDIF; IF...THEN...ELSEIF...THEN...ELSE... ENDIF; - or IF THEN END_IF ELSE ELSIF == >= > <= < <> Is equivalent to Greater than or equal to Greater than Less than or equal to Less than Not equal to EQ (=) GE (>=) GT (>) LE (<=) LT (>) NE (<>)

TriStation 1131 Implementation

IF...THEN...

IF...THEN... (ST)

Appendix C

TRISTATION MSW Corollaries

374

Math Functions

Math Functions
The following are TriStation 1131 corollaries for TRISTATION MSWs math functions:
TRISTATION MSW Implementation ABS CEIL COS EXP FLOOR LN LOG SIN SQRT TAN Description Absolute value Ceiling Cosine Natural exponent Floor Natural logarithm Common logarithm Sine Square root Tangent

TriStation 1131 Implementation


ABS CEIL COS EXP FLOOR LN LOG SIN SQRT TAN

Appendix C

TRISTATION MSW Corollaries

Process Control Functions

375

Process Control Functions


The following are TriStation 1131 corollaries for TRISTATION MSWs process control functions:
TRISTATION MSW Implementation AIN AOUT Description Converts analog input to real value (function) Converts real value to analog output value (function) Computes average AVG TriStation 1131 Note: IEC-1131 does not support user-derived extensible functions. In the FDB, LD and ST languages, use the ADD and DIV Standard Library functions instead. Limits dynamic range of input value (function) Schedules execution after a specified number of scans (function block) Exponential filter of input value (function) Selects highest value Performs integration of input value (function) Provides lead-lag compensation (function block) Selects lowest value Selects median value Computes percent of difference (function) Proportional Integral Derivative Control (function block) Not Supported

TriStation 1131 Implementation


AIN AOUT

CLAMP CSCHED EXPFLTR HISEL INTGTOR LEADLAG LOSEL MEDSEL PERDEV PID

LIMIT CSCHED EXPFLTR MAX INTGTOR LEADLAG MIN MEDSEL PERDEV PID

Appendix C

TRISTATION MSW Corollaries

376

TRICON Clock Functions

TRISTATION MSW Implementation SCALE TcJConv TcKConv TSCHED XofN

Description Rescales input value (function) Converts Type J thermocouple inputs to Centigrade Converts Type K thermocouple inputs to Centigrade Schedules execution at specified time intervals (function block) Decides if x of n measurements exceed limit (function block)

TriStation 1131 Implementation


SCALE TCJCONV TCKCONV TSCHED X_OF_N

TRICON Clock Functions


The following are TriStation 1131 corollaries for TRISTATION MSWs TRICON clock functions:
TRISTATION MSW Implementation TIMEADJ TIMESET Description Adjusts the TRICON clock by value supplied by the host Sets the TRICON clock from values supplied by host

TriStation 1131 Implementation


TIMEADJ TIMESET

Appendix C

TRISTATION MSW Corollaries

Fire & Gas Function Blocks

377

Fire & Gas Function Blocks


The following are TriStation 1131 corollaries for TRISTATION MSWs fire and gas functions:
TRISTATION MSW Implementation Description Sets coincidence alarm if inputs are in alarm state TriStation 1131 Note: Use NUMBITS and GE functions instead. Processes gas detector inputs and generates alarms (function block) Initializes various types of gas detectors (implemented in GASDETR) Initializes various types of line monitors (implemented in LINEMNTR) Processes contact inputs; generates status/alarms (function block) Processes loop detector inputs; generates alarms (function block) Initializes various types of loop detectors (implemented in LOOPDETR)

TriStation 1131 Implementation

ALRMCOIN

Not supported

GASDETR GASINIT

GASDETR GASDETR

LINEINIT

LINEMNTR

LINEMNTR LOOPDETR

LINEMNTR LOOPDETR

LOOPINIT

LOOPDETR

Appendix C

TRISTATION MSW Corollaries

378

SOE Function Blocks

SOE Function Blocks


The following are TriStation 1131 corollaries for TRISTATION MSWs Sequence of Events (SOE) function blocks:
TRISTATION MSW Implementation SOECLR Description Clears the designated SOE function block after it has been stopped Starts event collection for the designated SOE function block Returns statistics for the designated SOE function block Stops event collection for the designated SOE function block

TriStation 1131 Implementation


SOECLR

SOESRT SOESTAT SOESTOP

SOESRT SOESTAT SOESTOP

Gated Access Functions


The following are TriStation 1131 corollaries for TRISTATION MSWs gated access functions:
TRISTATION MSW Implementation GATDIS Description Closes a gate previously opened by GATENB for restricted write operations by external hosts Opens a gate for an external host to write to Aliased TRICON variables

TriStation 1131 Implementation


GATDIS

GATENB

GATENB

Appendix C

TRISTATION MSW Corollaries

Peer-to-Peer Communication Functions

379

Peer-to-Peer Communication Functions


The following are TriStation 1131 corollaries for TRISTATION MSWs Peer-toPeer communication functions:
TRISTATION MSW Implementation Description Receives up to 20 values of the specified data type from a matching TR_USEND function block on another TRICON node Sends up to 20 values of the specified data type to a matching TR_URCV function block on another TRICON node

TriStation 1131 Implementation


TR_URCV_BOOL TR_URCV_DINT TR_URCV_REAL TR_USEND_BOOL TR_USEND_DINT TR_USEND_REAL

RECV

SEND

Modbus Functions
The following are TriStation 1131 corollaries for TRISTATION MSWs Modbus functions:
TRISTATION MSW Implementation MBCTRL MBREAD MBWRITE Description Sets time-out and retry values for an EICM Modbus Master port Reads data from a Modbus slave Writes data to a Modbus slave

TriStation 1131 Implementation


Not supported Not supported Not supported

Appendix C

TRISTATION MSW Corollaries

380

Utility Functions

Utility Functions
The following are TriStation 1131 corollaries for TRISTATION MSW utility functions:
TRISTATION MSW Implementation PACK16 UNPACK16 Description Packs 16 BOOLs into an integer Unpacks integer into 16 BOOLs

TriStation 1131 Implementation


PACK16 UNPACK16

Printer Control Functions


The following are TriStation 1131 corollaries for TRISTATION MSWs printer control functions:
TRISTATION MSW Implementation FLUSH PAGE_EJECT Description Clears the specified printer port buffer Writes a formfeed to specified printer port

TriStation 1131 Implementation


PRNTR_FLUSH PAGE_EJECT PRINT_BOOLPRI NT_CRLF PRINT_DINT PRINT_REAL PRINT_STRING PRINT_CDT

PRINT

Write a list of values to specified printer port

PRINTDT

Writes a list of values to specified printer port preceded by date and time Writes a list of values to specified printer port preceded by time of day

PRINTT

PRINT_CTOD

Appendix C

TRISTATION MSW Corollaries

System Control Functions

381

System Control Functions


The following are TriStation 1131 corollaries for TRISTATION MSWs system control functions:
TRISTATION MSW Implementation ClearFsr OVDDISABLE OVDENABLE Description Clears arithmetic error system variables Disables output voter diagnostics Enables output voter diagnostics

TriStation 1131 Implementation


CLR_ERR OVDDISABLE OVDENABLE

Appendix C

TRISTATION MSW Corollaries

382

Coils & Contacts in RLL

Coils & Contacts in RLL


The following are the TriStation 1131 corollaries for coils and contacts in TRISTATION MSWs Relay Ladder Language (RLL):
TRISTATION MSW Implementation <name> ] [ <name> -]/[ <name> ][ <name> ][ <parm1> ]==[ <parm2> <parm1> ]<>[ <parm2> <parm1> ]<[ <parm2> <parm1> ]>[ <parm2> <parm1> ]<=[ <parm2> <parm1> ]>=[ <parm2> <name> ( ) Description Normally open contact Normally closed contact Transition ON contact Transition OFF contact

TriStation 1131 Implementation


<name> ] [ <name> ]/[ <name> ]P[ <name> ]N[ EQ

Equal to

Not equal to

NE

Less than

LT

Greater than

GT

Less than or equal

LE

Greater than or equal

GE <name> ( )

Standard coil

Appendix C

TRISTATION MSW Corollaries

Coils & Contacts in RLL

383

Coils and Contacts in RLL (continued)


TRISTATION MSW Implementation <name> (NOT) <name> (LCH) <name> (TGL) Not coil Latch coil Toggle coil

Description

TriStation 1131 Implementation


<name> (/) <name> (S)

TriStation 1131 Note: parameters are


IN - toggle enable; R - reset; Q - current state) Reset coil

TOGGLE

<name> (RST) <label> (GOTO) <name> (END) <name> (TMR) <timer> <accum> <name> (CTU) <preset> <accum>

TriStation 1131 Note: Use reset input to


timer & counter function blocks Go to a network coil End scan coil Timer coil

Not supported

Not supported Not supported

TriStation 1131 Note: parameters are


IN - timer enable; R - reset; PT - Preset time ET - Elapsed time; Q - current state Up counter coil

TMR

TriStation 1131 Note: parameters are


CU -count up enable; R - reset; PV Preset value CV = current value; Q current state Down counter coil CTU

<name> (CTD) <preset> <accum>

TriStation 1131 Note: parameters are


CD -count down enable; LD - load preset; PV - Preset value; CV = current value; Q - current state CTD

Appendix C

TRISTATION MSW Corollaries

384

Coils & Contacts in RLL

Coils and Contacts in RLL (continued)


TRISTATION MSW Implementation <name> (PLS) <duration> <name> (BNK) <On msec> <Off msec> <name> (TDD) <interval> Pulse coil

Description

TriStation 1131 Implementation

TriStation 1131 Note: parameters are


IN - clock input; PT - Pulse time ET Elapsed time; Q - pulse Blink coil

TP

TriStation 1131 Note: parameters are


IN - blink enable; R - reset; ON - Pulse on time OFF = pulse off time; Q - pulse Time delay de-energize

BLINK

TriStation 1131 Note: parameters are


IN - input; PT - Preset delay time ET Elapsed time; Q - output Time delay energize

TOF

<name> (TDE) <interval>

TriStation 1131 Note: parameters are


IN - input; PT - Preset delay time ET Elapsed time; Q - output

TON

Appendix C

TRISTATION MSW Corollaries

System Variables

385

System Variables
The TR_ functions are TriStation 1131 corollaries for the system variables used in the original TRISTATION MSW programming system. An example is TriStation 1131s TR_SLOT_STATUS function shown below, which provides the same information as eight Slot Information system variables in the original TRISTATION MSW.

The following table lists the categories of TRISTATION MSW system variables that are covered by TriStation 1131s TR_ functions:
TRISTATION MSW System Variable Categories Calendar information Chassis Slots Points Main Processors EICM ports Arithmetic problems Scan time Special scans NCM port variables Peer-to-peer path variables Other system variables

TriStation 1131 Implementation


TR_CALENDAR function TR_CHASSIS_STATUS function TR_SLOT_STATUS function TR_POINT_STATUS function TR_MP_STATUS function TR_PORT_STATUS function CHK_ERR and CLR_ERR functions TR_SCAN_STATUS function TR_SCAN_STATUS function TR_PORT_STATUS function TR_PEER_STATUS function TR_PROGRAM_STATUS function

Appendix C

TRISTATION MSW Corollaries

APPENDIX D

TV Restrictions & Requirements

The TriStation 1131 Programming Software has been certified to meet the requirements of TV Class 5 and Class 6 standards. If you want your safety application to meet these standards, you must include TV-approved logic that adheres to the restrictions described in this appendix: General restrictions TRICON-specific TV restrictions

General Restrictions
This section describes TV restrictions that apply to: All safety systems Emergency Shutdown (ESD) systems Fire & Gas systems

All Safety Systems


The following general restrictions apply to all user-written safety application programs and procedures: Functional testing must be performed to verify the correct design and operation of the user-written application program. After a safety system is commissioned, no changes to the system software (operating system, I/O drivers, diagnostics, etc.) are allowed without type approval and re-commissioning. Any changes to the application itself or the application program must be made under strict change-control procedures.

388

General Restrictions

These change procedures can be comparable to the ones outlined in the upcoming section called TRICON-Specific TV Restrictions. All changes must be thoroughly reviewed, audited and approved by a safety change control committee or group. After an approved change is made, it must be archived. In addition to printed documentation of the application program, two copies of the program must be archived on diskettes. These diskettes must be write-protected after storage of the application program to avoid accidental changes. Under certain conditions, the PLC may be run in a mode where an external computer or operator station can write to PLC variables. This is normally done by means of a communication link. The following restrictions apply to writes of this type: Serial communication must be Modbus or another approved protocol with CRC checks. Serial communication must not be allowed to write directly to input or output variables. For information about writes to safety-related variables that result in disabling safety action, refer to Appendix A, Maintenance Override of the TV Rheinland Report No. 945/EL 374/97. PID and other control algorithms must not be used for safety-related functions. Each control function should be checked to make sure it does not provide the safety function. All voltages supplied to the PLC must satisfy the requirements for protective separation according to local standards. For example, in Germany the applicable standard is EN 50178, Electronic Equipment for Use in Power Installations. The PLC must be wired and grounded according to the procedures defined by the PLC manufacturer.

Appendix D

TV Restrictions & Requirements

General Restrictions

389

ESD Systems
This section describes TV restrictions that are specific to ESD applications: The safe state of the plant must be the de-energized state or low (0) state. For ESD functions, the hardware devices connected to PLC outputs must be made of TV type-approved, fail-safe components or must have two separate, independent shutdown paths which are periodically inspected. When a safety system is required to conform with the DIN 0116 standard for electrical equipment in furnaces, the scan time of the PLC system must be set to ensure that a safe shutdown can be performed within one second after a problem in the process is detected.

Fire & Gas Systems


Fire & Gas applications typically do not have a safe state and must operate continuously to provide protection. Therefore, the following TV restrictions apply: In Fire & Gas applications where inputs and outputs are energized to mitigate a problem, the PLC system must detect and alarm open and short circuits in the wiring between the PLC and the field devices. The entire PLC system must have redundant power supplies. Also, the power supplies that are required to activate critical outputs and read safetycritical inputs must be redundant. All of these power supplies must be monitored for proper operation. A Fire & Gas safety system may normally use de-energized outputs. The outputs are energized to initiate action to mitigate a problem. This type of system must monitor the critical output circuits to ensure they are properly connected to the end devices.

Appendix D

TV Restrictions & Requirements

390

TRICON-Specific TV Restrictions

TRICON-Specific TV Restrictions
TV restrictions that are specific to TRICON systems apply to these topics: Safe shutdown Disabled points Scan time and response time OVDDISABLE function not allowed Download All at completion of project Use of Peer-to-Peer functions Class 1 through 5 restrictions Class 6 restrictions Fire and Gas restrictions

Safe Shutdown
TV requires a safety application to include networks that will initiate a safe shutdown of the process being controlled if the TRICON goes to single mode. You should use the following system information variables, accessible as outputs of the TR_MP_STATUS function block, to initiate a safe shutdown if warranted: MPMAIN IOMAIN MPBAD IOBAD At least one Main Processor is out-of-sync or failed. MPMAIN is on, or at least one leg of one I/O module has failed. Two Main Processors are out-of-sync or failed (in single mode). MPBAD is on, or at least one I/O module is in single mode.

Appendix D

TV Restrictions & Requirements

TRICON-Specific TV Restrictions

391

When All I/O Modules in System are Critical


This section applies if you are using the IOBAD variable to shut down a plant when multiple faults occur. Sometimes a single fault in the Quad Output Voter for a digital output module is detected by two out of three legs simultaneously, energizing the IOBAD variable erroneously. A network like the following one detects whether two legs are reporting the same error within 60 seconds of each other and bypasses the condition if it occurs, thereby preventing the erroneous energizing of IOBAD and a false shutdown of the system.

Appendix D

TV Restrictions & Requirements

392

TRICON-Specific TV Restrictions

The next sample network begins a shutdown according to TUV requirements if one of these conditions is true: IOBAD and MPMAIN are energized IOBAD is energized and the time difference between an IOBAD and IOMAIN alarm is greater than 60 seconds MPBAD is energized

When Some I/O Modules in System are Critical


One condition that can energize the IOBAD variable is the presence of Bad Board errors on any two legs of an I/O module. Bad Board means that a fatal error has been reported by one of the legs of the I/O module, or communication to one of the legs has been lost. However, the IOBAD variable cannot distinguish between modules that are critical to the process and modules that are not critical. For example, an output module that interfaces to status lamps on a local panel is usually not critical to the process. The following logic detects whether IOBAD was energized by a critical or noncritical I/O module by checking the system for individual modules. The TR_SLOT_STATUS function block outputs a module-specific variable called NOGOOD that energizes if two legs on a module have Bad Board errors. These networks filter out the IOBAD variable for non-critical modules. The last network determines whether or not the IOBAD variable has been energized by the failure of a critical module. In the sample logic, it is assumed that Slots 1 through 4 of Chassis 2 contain critical I/O modules. To save memory space in the TRICON, the TR_SLOT_STATUS function block is instanced once and used over and over again. This method works because data in the TR_SLOT_STATUS function block does not persist from scan

Appendix D

TV Restrictions & Requirements

TRICON-Specific TV Restrictions

393

to scan. However, TriStation 1131 will warn you that function block has been invoked more than once.

Appendix D

TV Restrictions & Requirements

394

TRICON-Specific TV Restrictions

The next sample network begins a shutdown according to TUV requirements if one of these conditions is true: IOBAD for a critical I/O module is energized and MPMAIN is energized IOBAD for a critical I/O module is energized and the time difference between an IOBAD and IOMAIN alarm is greater than 60 seconds MPBAD is energized

Appendix D

TV Restrictions & Requirements

TRICON-Specific TV Restrictions

395

Disabled Points
A TRICON project normally does not contain any disabled points unless there is a specific reason for disabling them, such as initial testing. To disable points, the TRICON keyswitch must be in PROGRAM mode rather than RUN or REMOTE mode. If the system does contain one or more disabled variables, then the following sample network turns on an alarm to remind you that disabled points are present. In the sample network, the program variable name DISABLED_POINT_ALARM is assigned to a discrete output point which is connected to an alarm device.

Appendix D

TV Restrictions & Requirements

396

TRICON-Specific TV Restrictions

Scan Time & Response Time


The scan time of the TRICON must be set to meet the required response time of the process. To do this, set the TRICON scan time below 50% of the required response time. This means that a scan time greater than 50% will result in an alarm to the operator. In the following sample network, the required response time is assumed to be a second, and the variable name RESPONSE_TIME_EXCEEDED is assigned to a discrete output point connected to an alarm device.

OVDDISABLE Function Not Allowed


To meet TV requirements, a safety application must not use the OVDDISABLE function.

Appendix D

TV Restrictions & Requirements

TRICON-Specific TV Restrictions

397

Download All at Completion of Project


When you have completed the development and testing of your safety application, use the Download All function in the TRICON Control Panel to download the final application to the TRICON. Then use the Run function in the TRICON Control Panel to start running the program. Taking these steps guarantees that all of the variables in the safety application logic will be initialized properly in the TRICONs memory.

Use of Peer-to-Peer Function Blocks


If your TRICON application uses peer-to-peer function blocks to send critical data to a TRICON node that makes safety-related decisions, then the receiving nodes application must include logic to see whether the new data is received within the specified maximum time-out limit. The maximum time-out limit is equal to half the process-tolerance time. If the receiving node does not get at least one sample of new data from the sending node within the maximum time-out limit, then the receiving nodes program must take one or more of the following actions, depending on requirements: Use the last data received for safety-related decisions in the application Use default values for safety-related decisions in the application Check the status of the TR_URCV and TR_PORT_STATUS functions to see if there is a network problem that requires operator intervention The specific actions that an application should take depends on the unique safety requirements of your particular process. The sections that follow summarize the main types of actions entailed in the use of peer-to-peer send and receive functions.

Sending Node
The main types of actions required in the logic of the sending application are: The sending node must set the sendflag in the send call to 1 so that the sending node sends new data as soon as the acknowledgment for the last data is received from the receiving node. The TR_USEND function block must include a diagnostic integer variable that gets incremented with each new send initiation so that the receiving node can check this variable for changes every time it receives new data. This new variable should have a range of 1 - 65,565 where the value 1 is sent with the first sample of data. When this variable reaches the limit of

Appendix D

TV Restrictions & Requirements

398

TRICON-Specific TV Restrictions

65,565, the sending node should set this variable back to 1 for the next data transfer. This diagnostic variable is required because the communication path (consisting of a Network Communication Module, cable and terminator) is not triplicated like the TRICON I/O system. The number of TR_USEND functions in an application must be less than or equal to five. The reason is that the TRICON only initiates five TR_USEND functions per scan. In order to send data as fast as possible, the TR_USEND function must be initiated as soon as the acknowledgment for the last data is received from the receiving node. The sending application must check the status of the TR_URCV and TR_PORT_STATUS functions to see if there is a network problem that requires operator intervention

Receiving Node
The main types of actions required in the logic of the receiving application are: To transfer safety-critical data, the basic rule is that the receiving node must receive at least one sample of new data within the maximum time-out limit. If this does not happen, then the receiving node's application program must be prepared to take one or more of the following actions, depending on requirements: Use the last data received for safety-related decisions Use default values for safety-related decisions in the application Check the status of the TR_URCV and TR_PORT_STATUS functions to see if there is a network problem that requires operator intervention The receiving node must check the diagnostic integer variable every time it receives new data to see whether this variable has changed from last time. The receiving program must check the status of the TR_URCV and TR_PORT_STATUS functions to see if there is a network problem that requires operator intervention. Refer to Appendix F, Peer-to-Peer Communication for information about data transfer time and an example that shows how to measure the new data update time and use TR_USEND/TR_URCV functions for transferring safety-critical data.

Appendix D

TV Restrictions & Requirements

TRICON-Specific TV Restrictions

399

Class 1 through 5 Restrictions


TRICON-specific restrictions for TV Class 1 through 5 systems detail how to apply the architecture and features of the TRICON to meet the general restrictions: If non-TV-approved modules are used within the TRICON, the inputs and outputs of these modules have to be checked to make sure they do not affect safety critical functions of the TRICON. After commissioning, the TRICON may be operated in one of two possible modes: REMOTE or RUN. You must include a network in the application program that generates an alarm if the following conditions apply: If the TRICON operates in RUN mode only, an alarm to the operator must be generated if the selected mode is REMOTE, PROGRAM or STOP. If the TRICON operates in REMOTE mode, all aliased read/write variables used in safety-related networks must be checked for adherence to the restrictions outlined in the Maintenance Override section of TV Rheinland Report 945/EL 374/97. If the selected mode is RUN, PROGRAM or STOP, an alarm to the operator must be generated. Wiring and grounding procedures outlined in the TRICON Planning & Installation Guide must be followed. Maintenance instructions outlined in the TRICON Planning & Installation Guide must be followed. After degradation of the TRICON to a two-channel mode of operation, the time of continuous operation without repair must be limited to 1500 hours (two months). Each application that uses the TRICON System Access Application (TSAA) protocol must be commissioned individually: Remote Peer-to-Peer connections must be programmed according to the recommendations given in the section called Use of Peer-to-Peer Function Blocks on page 397. Remote Modbus Master functions must not be used for safety-related parts of the application program. If the GATENB function is used, the application program must be inspected for possible external writes, even if the TRICON is operating in RUN mode.

Appendix D

TV Restrictions & Requirements

400

TRICON-Specific TV Restrictions

Class 6 Restrictions
All Class 1-5 restrictions apply to Class 6 systems. DIN V VDE 19250 applications, which require continuous operation after a detected failure on the output board, also require a secondary means of operating the output. This could be either an external group relay or a single point on an independent output module that controls a group of outputs. If a relay is used, it must be checked at least every six months, either manually or automatically.

Fire & Gas Restrictions


The following list describes TRICON-specific TV restrictions for Fire & Gas applications: In Fire & Gas and other applications where low (0) signal inputs are not the safe state, the use of digital input cards is not allowed. An exception is the model 3504 High Density Digital Input module, provided that all signal lines are monitored. Analog input cards with current loop terminations should be used to read digital inputs. Opens and shorts in the wiring to the field devices must be detectable. The TRICON library function called LINEMNTR should be used to simplify program development. The TRICON chassis must be powered by two independent sources. This may be done by connecting the two power supplies in the chassis to different power sources. In Fire and Gas and other applications where the outputs are normally deenergized, a Supervised Digital Output Module (Model 3614E, 3615E or 3624) must be used. This allows the output circuit to be checked for proper connection to the final control element. It also allows the load and the wiring to be checked for potential shorts.

Appendix D

TV Restrictions & Requirements

APPENDIX E

Maintenance Log-on to TRICON

This appendix explains how to log on to any active TRICON for read-only diagnostic monitoring when you do not have access to the currently downloaded TriStation 1131 project. The basic idea is to create an empty TriStation 1131 project, then connect to the desired TRICON node from the TRICON Diagnostic Panel.
w Log on to any active TRICON for read-only diagnostic monitoring by following these steps: 1 Start TriStation 1131 on a PC that is physically connected to the target

TRICON or any TRICON on a network of TRICONs.


2 If TriStation 1131 is already running and a project is active, close that project

using the Close Project command in the File menu.


3 Select the New Project command from the File menu. 4 Choose any language for the project and click OK. 5 In the Filename for New Project dialog box, give the project a name and

directory location and click OK.


6 Wait while TriStation 1131 automatically attaches the standard libraries to the

project.
7 When the Project Directory dialog box is displayed, close it. 8 Select the TRICON Diagnostic Panel from the TRICON menu. 9 Select the Connect command in the Tools menu or the Connect tool in the

toolbar.
10 In the Connect To... dialog box, select the desired TRICON node. If your

TriStation 1131 PC is connected to an EICM in the TRICON, select a serial port. If your TriStation 1131 PC is connected to an ACM or NCM in the TRICON, select a TRICON node.

402

Note If you do not know your TRICON node number, contact your System Administrator or IS department. Triconex Customer Support does not have this information about your system.
11 If connection to the TRICON is successful, TriStation 1131 displays the first

screen of the TRICON Diagnostic Panel, which shows the alarm state of every chassis in the system (shown below).
12 For instructions on using the TRICON Diagnostic Panel, refer to Chapter 8,

TRICON Diagnostic Panel.

Appendix E Maintenance Log-on to TRICON

APPENDIX F

Peer-to-Peer Communication

This appendix explains how to use peer-to-peer communication in a network of TRICON controllers, covering the following topics: Introduction Description of peer-to-peer function blocks Restrictions for using TR_USEND/TR_URCV functions Detailed descriptions of TR_USEND/TR_URCV parameters Setting peer-to-peer configuration parameters Selecting TRICON nodes Rules for downloading Data Transfer Time Summary of peer-to-peer runtime errors Examples of peer-to-peer application programs

Introduction
Peer-to-peer is a Triconex proprietary protocol that allows two applications running on separate TRICONs to exchange a limited amount of data. You can use this protocol to pass small amounts of process and control data among up to 10 TRICON systems on an IEEE 802.3 network. Each TRICON is connected to the network by means of an NCM, whose NET1 port is configured for peer-to-peer operation by default. Since peer-to-peer functions involve critical data, the TRICON restricts them to the proprietary network (NET1). For more information about appropriate applications for peer-to-peer communication, refer to the 802.3 Network Planning & Installation Guide.

404

Description of Peer-to-Peer Function Blocks

Description of Peer-to-Peer Function Blocks


TriStation 1131 applications use the peer-to-peer protocol in a transparent manner by means of the TR_USEND and TR_URCV function blocks, which were added to the TRICON Library in Version 1.1 of TriStation 1131. The data type for TR_USEND and TR_URCV function blocks can be BOOL, DINT, or REAL as shown below: TR_USEND_BOOL TR_USEND_DINT TR_USEND_REAL TR_URCV_BOOL TR_URCV_DINT TR_URCV_REAL The U in the function block identifiers denotes Unsolicited. The TR_USEND and TR_URCV function blocks partially implement the functionality of a service called Unsolicited Programmed Data Acquisition. The word Unsolicited means that the receiver does not request the data. The TR_ denotes TRICON Library. The TR_USEND function block sends data to another TRICON node, while the TR_URCV function block receives data from a corresponding TR_USEND. An application must call a specific TR_URCV function block to receive data from a matching TR_USEND function block on another node. The TR_USEND and TR_URCV parameters must match exactly. The TRICON Library also provides the following function blocks you can use to monitor peer-to-peer communication: TR_PEER-STATUS TR_PORT_STATUS

Appendix F Peer-to-Peer Communication

Description of Peer-to-Peer Function Blocks

405

TR_USEND Function Blocks


One or more applications call a TR_USEND function block to send information to another TRICON on a peer-to-peer network. Each TR_USEND function block has a context which is specified by parameter SENDID. The maximum number of send contexts is specified by the configurations Number Of Sends parameter, which is set in the TRICON Configuration editors TRICON System Configuration window. The STATUS output describes the state of communication with the receiving node. For a detailed description of TR_USEND parameters, refer to page 406.
If used, each function block must be executed unconditionally once per scan.

The Function Block Diagram (FBD) representations of TR_USEND function blocks are shown below.

Appendix F

Peer-to-Peer Communication

406

Description of Peer-to-Peer Function Blocks

TR_USEND Parameters
Following is a detailed description of the TR_USEND parameters.
Parameter Inputs SENDFLG Type BOOL Description Specifies whether a TR_USEND will be initiated: TRUE = send data FALSE = dont send data Specifies send context for TR_USEND call; legal range is 1 to Number Of Sends specified in the configuration Specifies the receiving TRICON node (1-10) Specifies which TR_URCV context in the receiving TRICON node should receive the data Indicates number of values to send (1-20) Sends up to 20 data values to a matching TR_URCV function block TRUE if send was initiated (STATUS = 1 or 4) TRUE if send was acknowledged (STATUS = 3 or 4) TRUE if STATUS >= 100 Indicates the current state of communication with the receiving TRICON node

SENDID

DINT

RECVNODE RECVID

DINT DINT

N SD_01... SD_nn Outputs SENT ACK ERROR STATUS

DINT BOOL, DINT, REAL BOOL BOOL BOOL DINT

Appendix F Peer-to-Peer Communication

Description of Peer-to-Peer Function Blocks

407

SENDFLG

This BOOL input specifies whether a send will be initiated. If the value of this parameter is TRUE, a TR_USEND will be initiated. If the value is FALSE, no TR_USEND is initiated even though the TR_USEND function block is executed. In other words, no data transfer takes place unless the SENDFLG is set to TRUE. When a TR_USEND function block is executed in the application for the first time with SENDFLG = FALSE, the TRICON attempts to establish communication with the receiving TRICON node and sets the STATUS to 100. The sending TRICON node sets the STATUS of the TR_USEND function block to 0 if: Communication is established with the receiving node. A receiving node has a corresponding TR_URCV function block with matching TR_URCV context number, TR_USEND node number, and TR_USEND context number. If the STATUS of the TR_USEND function block (with SENDFLG set to 0) is >= 100, then there is a problem in the network. The STATUS parameter indicates the type of problem and you should take appropriate action to resolve the problem. Please refer to the detailed description of STATUS codes below. The application must call this function block unconditionally exactly once per scan. SENDFLG should be 0 for the first invocation. When the value of SENDFLG is zero, no actual TR_USEND takes place even though the function block is executed. When an application has new data to send, it should first check the result of the TR_USEND function block execution (in other words, the STATUS output). If the STATUS is 0, then set SENDFLG to TRUE to initiate the TR_USEND so that data can be transferred.

SENDID

This input specifies what context the TRICON should use for this TR_USEND call. The legal range is 1 to Number Of Sends specified in the configuration. Each TR_USEND function block in the application must have a unique SENDID. If there is more than one TR_USEND function block with the same SENDID, then the first TR_USEND function block in the application will work properly. However, subsequent TR_USEND function block(s) with the same SENDID will result in error status of 105. Note To TRISTATION MSW users: TriStation 1131 does not verify SENDID.

Appendix F

Peer-to-Peer Communication

408

Description of Peer-to-Peer Function Blocks

RECVNODE

This input specifies which TRICON node will receive the data. The range is 1 to 10. If RECVNODE is out of range, calling the function block sets the STATUS output to 102. This input specifies which TR_URCV context will receive the data. A TR_URCV call with the same RECVID must be defined in the receiving TRICON. The range is 1 to Number of Receives. If RECVID is out of range, calling the function block sets the STATUS output to 102. Number of values to send (1 to 20). The receiving function block must have the same value for N. Send data. A TR_USEND function block can send a maximum of 20 values to the receiving TRICON. These values can be type BOOL, DINT, or REAL. There must be matching parameters in the TR_URCV function block call of the receiving TRICON node. Note To TRISTATION MSW users: in TriStation 1131 the send data inputs SD_01SD_nn to one TR_USEND function block must all be the same data type.

RECVID

N SD_01SD_nn

SENT

This BOOL output indicates that a send was initiated (STATUS = 1 OR STATUS = 4). Instead of testing the STATUS output, you can use the SENT output to change the send data if you want to send again, or reset the SENDFLG if you dont want to send again. This BOOL output indicates that the receiving TRICON node acknowledged the send, i.e., the send completed successfully (STATUS = 3 OR STATUS = 4). This BOOL output indicates an error (STATUS >= 100). The STATUS output indicates the current state of communication with the receiving TRICON node. The STATUS values described in the following table allow the application to perform the appropriate action when a problem occurs.

ACK ERROR STATUS

Appendix F Peer-to-Peer Communication

Description of Peer-to-Peer Function Blocks

409

Status 0

Meaning & Action Communication is established with the receive node. When you execute a TR_USEND function block with SENDFLG = FALSE, you should receive STATUS = 0 to indicate that communication is established with the receiving TRICON node and the receiving nodes application has an exactly matching TR_URCV function block. You can initiate a TR_USEND by setting SENDFLG to TRUE so that data can be transferred to the receiving node. A transfer of data was initiated by the TR_USEND function block call with SENDFLG set to TRUE. Set SENDFLG to FALSE so you can coordinate the acknowledgment from the receiving node of the last TR_USEND initiated. If you dont set SENDFLG to FALSE, the TRICON will initiate another TR_USEND as soon as it completes the current TR_USEND (in other words, as soon as it receives acknowledgment from the receiving TRICON node). The TR_USEND context is currently busy sending data to the receiving TRICON node. This STATUS is set on the next scan following the scan when a TR_USEND was initiated and remains until an acknowledgment is received from the receiving node or a 5-second time-out expires. If an acknowledgment is received from the receiving node, the STATUS will go to 3 and then to 0 (if SENDFLG = FALSE) or 4 (if SENDFLG = TRUE). If the 5-second time-out has expired, the STATUS will be 100 (described below). The last TR_USEND was completed successfully. The receiving TRICON node sent an acknowledgment back indicating that the receiving node has received the data. You will get STATUS = 3 only if SENDFLG was set to FALSE after STATUS = 1. The sending TRICON node does get an acknowledge from the receiving node for each successfully completed TR_USEND (in other words, STATUS = 3), but as soon as the acknowledge is received, the sending TRICON initiates another TR_USEND because SENDFLG is set to TRUE. This is why, when SENDFLG is set to TRUE all the time, the STATUS oscillates between 2 and 4 assuming that there is no communication problem. The last initiated TR_USEND was completed successfully and a new send was initiated. The receiving node sent an acknowledgment back indicating that the application in the receiving node has received the data. You will get STATUS = 3 only if SENDFLG was set to FALSE after STATUS = 1. The sending TRICON does get acknowledgment from the receiving node for each successfully completed TR_USEND (in other words, STATUS = 3), but as soon as the acknowledgment is received, the sending TRICON initiates another TR_USEND because SENDFLG is set to TRUE. This is why, when SENDFLG is set to TRUE all the time, the STATUS oscillates between 2 and 4 assuming that there is no communication problem.

Appendix F

Peer-to-Peer Communication

410

Description of Peer-to-Peer Function Blocks

Status 100

Meaning & Action The TRICON is trying to recover or establish communication with the receiving TRICON node. This can happen if there is no receiving TRICON node connected to the network, or if there is no corresponding TR_URCV function block in the application of the receiving node. The sending TRICON will retry every 2 seconds to establish communication. Make sure that the receiving TRICON node is connected to the network. If the receiving TRICON node is connected and it is up and running, check the application to verify that there is a TR_URCV function block with parameters that exactly match those of the TR_USEND function block. If this STATUS is returned, the application should take appropriate action (in other words, inform the operator) of loss of communication with the receiving TRICON. The last TR_USEND that was initiated has failed. There is a communication problem or a problem in the receiving TRICON. The sending TRICON will retry every 2 seconds to establish communication with the receiving TRICON node and if a retry fails, the STATUS is set to 100. If this STATUS is returned, the application should take appropriate action for loss of communication with the receiving TRICON. Bad context. SENDID, RECVNODE, or RECVID is out of range, or the SENDID is greater than the Number Of Sends specified in the configuration. The types or number of variables in the TR_USEND and TR_URCV function blocks are mismatched. In other words, the parameters defined for the TR_USEND and TR_URCV function blocks dont match exactly. This is a programming error in one or both of the applications which you must correct. Number of values N is out of range (1...20). More than one TR_USEND function block has the same SENDID or you called the same TR_USEND function block twice. This is a programming error. Each TR_USEND function block in the application must have a unique SENDID. If there is more than one TR_USEND function block with the same SENDID, then the first TR_USEND function block in the application will work properly. However, subsequent TR_USEND function block(s) with the same SENDID will result in error status 105. TR_USEND function blocks must be evaluated on every scan and exactly once per scan. Error status 105 results if you call the same TR_USEND function block twice. If you dont call the TR_USEND function block on every scan, the result is not predictable and not specified.

101

102 103

104 105

Appendix F Peer-to-Peer Communication

Description of Peer-to-Peer Function Blocks

411

TR_URCV Function Blocks


This function block receives data sent by a TR_USEND function block in another TRICON. Each TR_URCV function block has a context which is specified by input RECVID. The maximum number of TR_URCV contexts is specified by the configurations Number Of Receives parameter, which is set in the TRICON Configuration editors TRICON System Configuration window. The STATUS output indicates whether data was received or an error occurred. A STATUS value of 1 indicates that the receiving variables have received data from the sending TRICON. For a detailed description of TR_URCV parameters, refer to page 412. The FBD representations of TR_URCV function blocks are shown below.
If used, each function block must be executed unconditionally once per scan.

Appendix F

Peer-to-Peer Communication

412

Description of Peer-to-Peer Function Blocks

TR_URCV parameters
Following is a detailed description of the TR_URCV parameters.
Parameter Inputs CI RECVID Type BOOL DINT Description Control input (ignored) Specifies context for TR_URCV call; legal range is 1 to Number Of Receives specified in the configuration Specifies which node will send data to this receive context-only data from SENDNODE will be accepted Specifies which TR_USEND context in the sending TRICON will send data to this TR_URCV context Indicates number of values to receive (1-20) New data received TRUE if STATUS >= 100 Indicates the current state of communication with the sending TRICON node Up to 20 outputs which will receive data from a TR_USEND call; parameters must match the type and number of parameters for the corresponding TR_USEND function block

SENDNODE

DINT

SENDID

DINT

N Outputs NDR ERROR STATUS RD_01... RD_nn

DINT BOOL BOOL DINT BOOL, DINT, REAL

RECVID

This input specifies the context for this TR_URCV function block call. The legal range is 1 to Number Of Receives specified in the configuration. There must be a TR_USEND function block call in the sending TRICON with the same RECVID. Each TR_URCV function block in the application must have a unique RECVID. If there is more than one TR_URCV function block with the same RECVID, then the first TR_URCV function block in the application will work properly. However, subsequent TR_URCV function block(s) with the same RECVID will result in an error status of 105. Note To TRISTATION MSW users: TriStation 1131 does not verify RECVID.

Appendix F Peer-to-Peer Communication

Description of Peer-to-Peer Function Blocks

413

SENDNODE

This input specifies which node will send data to this TR_URCV context. The context will accept data only from the specified node. The range is 1 to 10. If SENDNODE is out of range, calling the function block sets the STATUS output to 102. This input specifies which TR_USEND context in the sending TRICON will send data to this receive context. There must be a TR_USEND function block call in the sending TRICON with the same SENDID. The range is 1 to Number of Sends. If SENDID is out of range, calling the function block sets the STATUS output to 102. Note To TRISTATION MSW users: TriStation 1131 does not verify SENDID.

SENDID

N NDR

Number of values to receive (1 to 20). The sending function block must have the same value for N. New Data Received. New data has been received and is available on the RD_01...RD_nn outputs until new data is received again. NDR is TRUE when STATUS = 1. This BOOL output indicates an error (STATUS >= 100). The STATUS output of the TR_URCV function block allows the application to determine the STATUS of communication with the sending TRICON. Possible STATUS values are described in the following table.
Meaning & Action The TR_URCV context is ready to receive data. New data has been received from the sending TRICON and is available on outputs RD_01...RD_nn until new data is received again. Reserved. Reserved. Bad context. RECVID, SENDNODE, or SENDID is out of range, or the RECVID is greater than the Number Of Receives specified in the configuration. Data was received from the sending TRICON node but the number or type of variables received did not exactly match the number or type of variables defined for the TR_URCV function block. Data outputs RD_01...RD_nn do not change. In other words, the parameters defined for the TR_USEND and TR_URCV function blocks dont match exactly. This is a programming error in one or both applications which you must correct. Your code should take appropriate action to correct the programming errorin other words, inform the operator.

ERROR STATUS

STATUS 0 1 100 101 102 103

Appendix F

Peer-to-Peer Communication

414

Description of Peer-to-Peer Function Blocks

STATUS 104 105

Meaning & Action Reserved. More than one receive for the same RECVID. Either the program called the same TR_URCV function block twice, or there is more than one TR_URCV function block with the same RECVID. This is a programming error. Each TR_URCV function block in the application must have a unique RECVID. If there is more than one TR_URCV function block with the same RECVID, then the first TR_URCV function block in the application will work properly. However, subsequent TR_URCV function block(s) with the same RECVID will result in error status 105.

RD_01RD_nn

A TR_URCV function block can receive up to 20 values. These parameters must match the number and type of the parameters specified in the corresponding TR_USEND function block call. Note To TRISTATION MSW users: in TriStation 1131, the receive data inputs RD_01SD_nn to one TR_URCV function block must all have the same data type.

TR_PEER_STATUS for Peer-to-Peer Paths


There are one or two paths for peer-to-peer (NET1) communication, depending on whether each TRICON contains one or two NCMs. If there are two paths (two NCMs), then both paths are used simultaneously to exchange peer-to-peer messages and the failure of one path will not affect peer-to-peer operation. Use the TR_PEER_STATUS function block in your application to monitor peer-to-peer communication. The peer status is updated every 30 seconds. The FBD representation of a TR_PEER_STATUS function block is shown below.

Appendix F Peer-to-Peer Communication

Description of Peer-to-Peer Function Blocks

415

The following table describes the TR_PEER_STATUS parameters.


Parameter Input Outputs NODE COMM_OK Type DINT BOOL Description The node to monitor. TRUE means that at least one peerto-peer communication path going to the TRICON node is operational from the requesting TRICON. TRUE means that two peer-to-peer communication paths going to the TRICON node are operational from the requesting TRICON.

COMM_REDUNDANT

BOOL

Note The output COMM_OK replaces the functionality of TRISTATION MSWs system variable $NxxOK, and the output COMM_REDUNDANT replaces the functionality of TRISTATION MSWs system variable $NxxRD (xx represents the node number).

TR_PORT_STATUS for NCM Ports


Use the TR_PORT_STATUS function block to monitor the status of NCM ports in a TRICON. The port status is updated every 30 seconds. For more information about the NCM and 802.3 networks, refer to the 802.3 Network Planning & Installation Guide. The FBD representation of a TR_PORT_STATUS function block is shown below.

Appendix F

Peer-to-Peer Communication

416

Description of Peer-to-Peer Function Blocks

The following table describes the TR_PORT_STATUS parameters.


Parameter Outputs NCM_NET1L_OK Type BOOL Description TRUE means that NET1 of the NCM in the left slot is operational. FALSE means that NET1 of the NCM in the left slot is not receiving any message packets or is unable to transmit messages. This can happen if the port is faulty or no cable is connected to the port. NCM_NET2L_OK BOOL TRUE means that NET2 of the NCM in the left slot is operational. FALSE means that NET2 of the NCM in the left slot is not receiving any message packets or is unable to transmit messages. This can happen if the port is faulty or no cable is connected to the port. NCM_NET1R_OK BOOL TRUE means that NET1 of the NCM in the right slot is operational. FALSE means that NET1 of the NCM in the right slot is not receiving any message packets or is unable to transmit messages. This can happen if the port is faulty or no cable is connected to the port. NCM_NET2R_OK BOOL TRUE means that NET2 of the NCM in the right slot is operational. FALSE means that NET2 of the NCM in the right slot is not receiving any message packets or is unable to transmit messages. This can happen if the port is faulty or no cable is connected to the port.

Note NCM_NETxx_OK replaces the functionality of TRISTATION MSWs system variables $NET1L, $NET2L, $NET1R, AND $NET2R.

Appendix F Peer-to-Peer Communication

TR_USEND/TR_URCV Restrictions

417

TR_USEND/TR_URCV Restrictions
The peer-to-peer TR_USEND and TR_URCV function blocks are designed to transfer limited data between two nodes. To make sure that the TR_USEND and TR_URCV function blocks do not interfere with applications running in separate TRICONs, two restrictions are imposed on the function blocks: The Number Of Sends initiated in any one scan is limited to 5. The Number Of Sends pending at any given time is limited to 10. The maximum number of TR_USEND and TR_URCV function blocks allowed in one application is 50.

TR_USEND/TR_URCV Relationship
The following table shows the relationship between the parameters of the TR_USEND and TR_URCV function blocks. The TR_USEND function block is executed in the sending TRICON node and the TR_URCV function block is executed in the receiving TRICON node.
TR_USEND Function Block SENDID Sending TRICON Node RECVNODE RECVID N SD_01 ... SD_nn = = = = = TR_URCV Function Block SENDID SENDNODE Receiving TRICON Node RECVID N RD_01 ... RD_nn

Appendix F

Peer-to-Peer Communication

418

Rules for Correct Usage

Rules for Correct Usage


The following rules describe the correct usage of TR_USEND and TR_URCV function blocks in a peer-to-peer application:
1 The sending TRICONs TR_USEND function block must specify the correct

number for the receiving TRICON node (RECVNODE) which has a matching TR_URCV function block.
2 The receiving TRICONs TR_URCV function block must specify the correct

number for the sending TRICON node (SENDNODE) which has a matching TR_USEND function block.
3 The SENDID in the TR_USEND and TR_URCV function blocks must be the

same. The RECVID in the TR_USEND and TR_URCV function blocks must be the same.
4 Input N (the number of data values) in the TR_USEND and TR_URCV function

blocks must be the same.


5 The data type of send data SD_01...SD_nn and receive data RD_01...RD_nn

must be the same.


6 The data type of send data SD_01...SD_nn must match the data type given in

the suffix of the function block name. For example, for function block TR_USEND_BOOL, the data types must all be BOOL.

Setting the Number of Sends and Receives


Every TR_USEND and TR_URCV function block call has a context to maintain the current status of the function block call. The Number Of Sends and Number Of Receives configuration parameters in the TRICON System Configuration dialog box determine the number of unique TR_USEND and TR_URCV function block calls that an application can use. The legal range for the parameter is 1-50. The Number Of Sends and Number Of Receives affect scan time as well as memory allocation in the TRICON, so you should set these parameters to the minimum values required to support the respective TR_USEND and TR_URCV function blocks in your application. Changing one or both of these parameters requires a Download All.

Appendix F

Peer-to-Peer Communication

Setting the Number of Sends and Receives

419

w To configure the number of peer-to-peer sends and receives: 1 Go to the TRICON Configuration editor. 2 On the configuration tree, click on the TRICON System Configuration icon

to display the following dialog box:

3 In the Peer-to-Peer section of the dialog box, enter the maximum number of

peer-to-peer sends and receives.

Appendix F

Peer-to-Peer Communication

420

Selecting TRICON Nodes

Selecting TRICON Nodes


Each TRICON in a network must have a unique node number. The TRICON node number is specified using hexadecimal switches on the NCM, according to instructions provided in the 802.3 Network Planning & Installation Guide. For the purpose of peer-to-peer communication, the TRICON node number can be any integer from 1 to 10. The node number you specify on the NCM becomes the node number of TRICON. To download an application to the TRICON, the TRICON node number must be the same as the node number that you define in the application. The following rules apply to node number selection: If an NCM is configured, then you must specify its node number in the application. Otherwise, you cannot do a Download All. Even if you connect to the TRICON by means of an EICM and attempt a Download All, no Download All will be permitted. If an NCM is not configured, then the node number specified in the application must be zero. Otherwise you cannot do a Download All. Even if you connect to the TRICON by means of an EICM and attempt a Download All, no Download All will be permitted. If you change a node number in the application, then you must do a Download All. The node number of the application must match the NCM node number switches. If there are two NCMs in a TRICON, then the node number for both NCMs must be set to the same value using the hexadecimal switches. You cannot use a Download Change to: Configure or re-configure an NCM Change the node number in the application Change the number of TR_USEND or TR_URCV contexts

Precautions
The node number is used for the 802.3 physical address and must be unique across the network. Make sure that the application for each TRICON on the network has a unique node number. If this is not the case, you will be forced to do a Download All to avoid networking conflicts and make the system operational in a networking environment.

Appendix F

Peer-to-Peer Communication

Rules for Downloading

421

To avoid confusion and mistakes, always assign node numbers to your TRICONs sequentially, starting with node #1. Once you assign a unique node number to each TRICON and do a Download All, you should not change the node numbers unless you are prepared to do another Download All. When you replace a failed NCM in a TRICON, make sure that the new NCM has the same node number (set using the hexadecimal switches) as the failed one. If the new NCMs node number is different from the failed ones, then the FAIL indicator of the new NCM will turn on. This means that the applications node number does not match the node number physically set on the NCM. The FAIL indicator will also turn on if the newly inserted NCM has the same node number as one of the other TRICONs in the network.
w To change the node number of an NCM residing in a TRICON slot: 1 Pull the NCM out of its slot and change its node number using the hexadecimal

switches on the side of the module.


2 Pull all three Main Processors out of their slots and wait for one minute. 3 Reseat the Main Processors and the NCM.

Note You can avoid pulling out the Main Processors if you have an EICM and an RS-232 cable. Connect the TriStation PC to an EICM port, change the node number in the application, and do a Download All. Then you can pull out the NCM, change its node number and reseat it.

Rules for Downloading


A Download All is required for the following changes which are related to peer-topeer communication: The Number Of Sends or Number Of Receives parameters of the configuration are changed. An NCM is added to the configuration. An NCM is deleted from the configuration. An applications node number is changed. An NCMs node number is physically changed with the hexadecimal switches on the module. (Refer to the section above for instructions.)

Appendix F

Peer-to-Peer Communication

422

Data Transfer Time

Data Transfer Time


The peer-to-peer function blocks require multiple scans to transfer data from the sending node to the receiving node. The time it takes to transfer data depends on the following parameters of the sending and receiving nodes: Scan time Configuration size Amount of aliased data Number of TR_USEND function blocks, TR_URCV function blocks, print function blocks, and Modbus master function blocks Number of nodes on the peer-to-peer network To estimate the data transfer time, first calculate the number of bytes for aliased variables according to the instructions that follow.
w To calculate the number of bytes for aliased variables: 1 On the TRICON menu, select Edit Configuration. This will display the

configuration tree.
2 Click on Memory Allocation under TRICON System Configuration on the

configuration tree. This will display the Memory Allocation dialog box to the right of the configuration tree. The display gives the allocation for Unaliased, Read Aliased, and Read/Write Aliased Memory points, and if you scroll down you can see the allocation for Input points and Output points. For each data type (BOOLs, DINTs, and REALs), you can see the Maximum, Allocated, Forecast, and Current number of variables. The number you need is Allocated.
3 Total the number of allocated Aliased BOOLs, DINTs and REALs. 4 The number of bytes for aliased variables is 376 + BOOLs/8 + DINTs*4 +

REALs*4. The basic formula for estimating the data transfer time is as follows: Data transfer time in milliseconds = 2 * (larger of TS or SS) + 2 * (larger of TR or SR)

Appendix F

Peer-to-Peer Communication

Data Transfer Time

423

parameter TS =

Description Time for sending node to transfer Aliased data over the communication bus in milliseconds = (Number of aliased variables in bytes 20000) * 1000 Scan time of sending node in milliseconds Time for receiving node to transfer Aliased data over the communication bus in milliseconds = (Number of aliased variables in bytes 20000) * 1000 Scan time of receiving node in milliseconds

SS = TR =

SR =

As a general rule, the data transfer time is 1 second to 2 seconds. So when you use peer-to-peer function blocks to transfer safety-critical data, you must set the maximum time-out limit to at least 2 seconds. This means that the processtolerance time of the receiving node must be greater than 4 seconds. See Using TR_USEND/TR_URCV Function Blocks for Safety-Critical Data on page 427 for an example that shows how to measure the maximum data transfer time and use TR_USEND/TR_URCV function blocks to transfer-safety critical data. You should measure the actual maximum time it takes to transfer data while testing your system to ensure the validity of your calculations and the general rules given here.

Appendix F

Peer-to-Peer Communication

424

Summary of Peer-to-Peer Runtime Errors

Summary of Peer-to-Peer Runtime Errors


Error COMM_OK = FALSE on TR_PEER_STATUS function block Explanation and Cause(s) No communication path between this TRICON and the TRICON node. The TRICON node not connected to the network, the NCM has failed, or the 802.3 cable or terminator is bad. No redundant communication path between this TRICON and the TRICON node. Only one NCM on either TRICON or at least one NCM failed in either TRICON or 802.3 cable or Terminator bad. There is no receiving TRICON node on the network or no corresponding TR_URCV function block in the receiving TRICON, or the receiving node is trying to recover from a communication error. How Detected? Diagnostics on the NCM sends out a message to each node and if no response is received within 1 second, then the NCM sets the output FALSE. The NCM reports the status to TSX every 30 seconds. TSX sets the output based on the status received from each of the two NCMs. The NCMs report their status to TSX every 30 seconds. How to Handle? After initial start up, the control program can use this output to set an ALARM to inform the operator.

COMM_REDUNDANT = FALSE on TR_PEER_STATUS function block

This may or may not be an error depending on the system configuration. If a redundant configuration is used, then after initial start-up, the control program can use this variable to set an ALARM to inform the operator. After initial start-up, the control program can use this STATUS output to set an ALARM to inform the operator.

STATUS =100 on TR_USEND function block

The TR_USEND function block updates the STATUS output when it is executed in a scan. If the acknowledgment for the last TR_USEND is not received in 1 second, then the sending TRICON tries to send the message again. If the retry fails, then a STATUS of 100 is returned.

Appendix F Peer-to-Peer Communication

Summary of Peer-to-Peer Runtime Errors

425

Error STATUS >= 102 on TR_USEND function block

Explanation and Cause(s) There is a programming error in the sending or receiving TRICON.

How Detected? TSX detects programming errors.

How to Handle? After the initial start-up, these errors should not occur. If they do, then the control program should use this STATUS output to set an ALARM to inform the operator. After the initial start up, the control program can use this STATUS variable to set an ALARM to inform the operator. After the initial start up, these errors should not occur. If they do, then the control program should use this STATUS variable to set an ALARM to inform the operator.

STATUS = 100 on TR_URCV function block

The receiving TRICON is trying to establish communication with the sending TRICON.

The TR_URCV function block updates the STATUS when it is executed in a scan.

STATUS >= 101 on TR_URCV function block

There is a programming error in sending or receiving TRICON.

TSX detects programming errors.

As the table shows, it takes from 2 to 30 seconds to detect and report time-out and communication errors. This is why a receiving node that uses the received data to make safety-critical decisions must include logic to check that new data is received within the specified time period. If the data is not received within the specified process-tolerance time, then the application must take appropriate actions depending on requirements. Refer to Using TR_USEND/TR_URCV Function Blocks for Safety-Critical Data on page 427 for an example that shows how to use TR_USEND and TR_URCV function blocks for transferring safety critical data.

Appendix F

Peer-to-Peer Communication

426

Examples of Peer-to-Peer Applications

Examples of Peer-to-Peer Applications


Peer-to-peer function blocks are designed to transfer limited amounts of data between two applications. Therefore you should use these function blocks sparingly in your applications. Ideally, you should control the execution of each TR_USEND function block in such a way that each TR_USEND is initiated only when the acknowledgment for the last TR_USEND is received and new data is available for sending. You can do this through effective use of the SENDFLG parameter in the TR_USEND function block and the STATUS output of the TR_USEND function block, as shown in Examples 2 and 3. The examples described below can be found in the Expeer.pt2 project on the TriStation 1131 CD.

Fast Send to One TRICON Node


This is a simple example of sending data as fast as possible from TRICON Node #2 to TRICON Node #3. Scan time in both TRICONs is set to 100 milliseconds. The example uses the following project elements: PEER_EX1_SEND_FBD (for sending TRICON Node #2) PEER_EX1_RCV_FBD (for receiving TRICON Node #3)

Sending Data Every Second to One TRICON Node


This is a simple example of sending data every second from TRICON Node #2 to TRICON Node #3. Scan time in both TRICONs is set to 100 milliseconds. The example uses the following project elements: PEER_EX2_SEND_FBD (for sending TRICON Node #2) PEER_EX2_RCV_FBD (for receiving TRICON Node #3)

Controlled Use of TR_USEND/TR_URCV Function Blocks


The networks in this example show how to use TR_USEND/TR_URCV function blocks correctly, in a controlled way, so that a limited amount of important data can be transferred between two applications when new data is ready to be sent.

Appendix F Peer-to-Peer Communication

Examples of Peer-to-Peer Applications 427

This example uses the following project elements: PEER_EX3_SEND_FBD (for sending TRICON Node #2) PEER_EX3_RCV_FBD (for receiving TRICON Node #3)

Using TR_USEND/TR_URCV Function Blocks for Safety-Critical Data


This example shows how to use TR_USEND/TR_URCV function blocks for transferring a limited amount of safety-critical data between the two applications as fast as possible. It also shows how to measure the actual maximum time for transferring data from the sending node to the receiving node. Because this is safety-critical data, each TRICON must have two NCMs and two peer-to-peer networks connected.

Sending Node #1 Parameters:


Scan time (SS) = 150 milliseconds Number of aliased variables in bytes = 2000 Time to transfer alias data over the communication bus in milliseconds (TS) = (2000/20000) * 1000 = 100 milliseconds The sending TRICON has only one TR_USEND function block in the application, meeting the requirement to have five or fewer TR_USEND function blocks. The sendflag is on in the TR_USEND function block so that, as soon as the last TR_USEND is acknowledged by the receiving TRICON, the sending TRICON initiates another TR_USEND

Receiving Node #3 Parameters:


Scan time (SR) = 200 milliseconds Number of aliased variables in bytes = 5000 Time to transfer aliased data over the communication bus in milliseconds (TR) = (5000/20000) * 1000 = 250 milliseconds Process tolerance time = 4 seconds If the sending TRICON does not receive acknowledgment from the receiving TRICON in 1 second, then it automatically retries the last TR_USEND message. Assume that once in a while (due to network collisions, communication bus loading, etc.) the sending TRICON has to retry one time to get the message to the receiving node. This is why the general rule for data transfer time is 1 to 2 seconds, even though the estimated time is 800 milliseconds. The receiving node also has a

Appendix F

Peer-to-Peer Communication

428

Examples of Peer-to-Peer Applications

network to measure the actual time so that you can validate the assumed 2-second maximum transfer time. Since the process-tolerance time of the receiving node is 4 seconds, the maximum time-out limit is set to 2 seconds (half the process tolerance time). The receiving node should get at least one sample of new data within the maximum time-out limit. Using this criteria satisfies the basic requirement for using peer-to-peer to transfer safety critical data. This example packs 32 BOOL values into a DWORD and sends the DWORD and a diagnostic variable to a receiving node as fast as possible by setting the sendflag parameter to 1 all the time. The diagnostic variable is incremented every time a new TR_USEND is initiated. The receiving node checks the diagnostic variable to see that it has changed from the previous value received. The receiving node also checks whether it has received at least one sample of new data within the processtolerance time. If not, the application takes appropriate action such as using the last data received or using default data to make safety-critical decisions. This example uses the following project elements: PEER_EX4_SEND_FBD (for sending TRICON Node #1) PEER_EX4_RCV_FBD (for receiving TRICON Node #3)

Appendix F Peer-to-Peer Communication

Index

Symbols
.csv extension 222, 227 .dbf extension 222, 227 .mdb extension 222, 227 .tel file 308 .txt extension 222, 227 .xls extension 222, 227 {not yet named} placeholder 200 {not yet named} state 203

Numerics
802.3 cable 263, 292 802.3 network communication modules for 355

A
access attributes of an element 315 ACM configuration 355 actions permissible in project 286 actual scan rate 304 Advanced Communication Module (ACM) see ACM 355 alarm behavior for load or fuse errors 301 alarm conditions printing messages about 340 Alias definition 206 Aliases fixed for Input and Output points 207 of System type 208 selectable for Memory points 207

Analog Input Module type change with Download Change 270 Annotated Instance tool in control panels 258 annotation automatic 109, 169 brief how-to 62 for entire project 109, 169 for individual variables 111, 171 in FBD editor 105 in LD editor 165 instructions for 108, 168 annotation macros default values of 176 Application Data space 196 arithmetic operators 370 ASCII mode 348 ASCII text records 222, 227 attributes of elements 315 Auto Name feature in FBD editor 85 in LD editor 138, 146 Auto Save option for lists and columns 47 Auto Tag Names feature in Configuration editor 202 Auto-Create dialog box in Connections Wizard 208 automatic connection of TRICON points 214 automatic naming of TRICON points 215 of variables in FBD editor 85 of variables in LD editor 138, 146

430

Index

B
Bad Board errors 390 baud rate 347 Block Type parameter 240 blue slot in TRICON chassis display 297 Buffer Size parameter 240 building a configuration instructions 218 bulletin board of Triconex 21

C
Change State to Download All command 274 chassis adding or deleting with Download Change 271 Chassis Power Usage display 193 coaxial cables 354 coils in RLL 380 Collect TRILOG Events command 308 Commands menu in Configuration editor 186 in Control Panels 251 in TRICON Diagnostic Panel 290 comments brief description 62 in FBD 105 in LD 165 Compare Configurations dialog box 220, 275, 276 Compare to Last Download command 219, 275 using to prepare for Download Change 265, 266 comparison of current to last downloaded configuration 275 conditional statements 371 configuration ACM 355 basic methods 64 building 218 definition 34 EICM 346 elements of 34 NCM 357

configuration project 64 Pulse Input module 350 SMM 353 Configuration Differences report 221, 265, 266, 273, 277 configuration mismatch 264 Connect command in TRICON Control Panel 189 in TRICON Diagnostic Panel 293 Connect tab in Properties box for program instance 217 connecting TRICON points automatically 214 connecting wires in program logic 58 connections undoing 216 Connections Wizard automatic naming 203 instructions for use 211 table of options for 212 constants properties in FBD 93 properties in LD 154 contacting Triconex bulletin board 21 technical support 21 contacts in RLL 380 control panels brief description 49 main purposes 254 operating 254 sample steps for use 260 toolbar 249 control tools 246 conventions used in document 18 corollaries with original TRISTATION 369 Crystal Reports package for custom reports 331

Index

431

custom reports printing 331

D
data bits 348 Data Import Validation Result dialog box 233 data types 32, 87, 139, 148 elementary 32 generic 32, 33 database files exporting TRICON point properties to 223 rules for importing 228 dBASE file format 222, 227 DCS time synchronization with 361 default macros 116, 176 default TCP/IP addresses 359 default values of annotation macros 176 dependencies of an element 316 Description property of TRICON point 204 Details display of Compare Configurations dialog box 220 development approach typical 51 diagnostic information about the TRICON 308 Diagnostic Panel brief description 50 overview 292 diagnostic toolbar 288 diagnostic tools table of 290 dialog boxes description 366 Digital Output Module type change with Download Change 270 Disable Remote Changes parameter 190 Disable STOP on Operator Keyswitch parameter 189

disabled points 393 enabling 272 in project 393 list of 284 display options setting in TRICON Configuration editor 210 Distributed Control System (DCS) see DCS 286 document conventions 18 Download All at completion of project 395 steps to follow 263 Download All state 274 Download Change adding or deleting chassis 271 adding or deleting modules 271 addition of functions and function blocks 271 additional tips when preparing for 269 changing Memory variable types 271, 272 changing module types 269 changing TCP/IP address 272 guidelines for using 265 saving application after 272 steps to follow 266 Download Change state 274 Download History 278 example 280 download states 274 downloading instructions 262 memory considerations 196 drag & drop feature 365

E
Edit menu in Configuration editor 184 in Control Panels 249 in FBD editor 75 in LD editor 124 editing tools 38 for FBD language 71 for LD language 121 table of basic tools 42

432

Index

EICM configuration 346 parallel port 349 serial ports 346 EICM port printing messages to 340 element assigning properties to 60 attributes of 315 dependencies of 316 owner of 316 version number of 281 Element menu in Configuration editor 185 in Control Panels 250 in FBD editor 76 in LD editor 125 elementary data type 32, 87, 148 elements of a project 27 selecting 58 Emergency Shutdown (ESD) applications 387 empty TriStation 1131 project 399 Emulator Control Panel main purpose 254 sample steps for use 260 EN/ENO parameters 99, 102, 160 sample project 99, 160 enabling points 284 Enhanced Intelligent Communication (EICM) module see EICM 346 enlarged view of control panel 257 of elements 46 of FBD logic 80 of LD logic 129 error messages 218 error source jumping to 218

errors Bad Board 390 fatal 390 load or fuse 306 ESD applications 387 event definition 238 event collection preparing your system for 238 event variables 238 assigning to SOE blocks 241 Excel files exporting TRICON point properties to 223 rules for importing 228 experience requirements 19 Export TRICON Points command 222 exporting elements to shared library 342 TRICON point properties 222 steps to follow 226 extensible functions 97, 158 external host computers 206, 207, 285

F
FALSE Color parameter 210 false shutdown 389 FALSE State Name parameter 210 fatal errors 390 fault identification using TRICON Diagnostic Panel 300 fault indicator red 296, 300 faults field type 301 load or fuse type 301 multiple 389 power type 302 voter type 302 FBD language basic information 24 FBD toolbar 75 Field Fault example 301

Index

433

Field Faults tab 301 File menu for all TriStation 1131 views 42 Fire and Gas applications 387 functions 375 firmware version numbers 307 fixed Aliases for Input & Output points 207 Format Data Source dialog box 232 Free Memory in TRICON 239 free memory space 304 function definition 31 examples 31 how to declare in FBD 95 how to declare in LD 156 when to create 57 function block definition 30 examples 30 how to declare in FBD 95, 156 how to declare in LD 161 instance name of 61 when to create 57 Function Block Diagram (FBD) language see FBD 24 functions effect on scan time 271 Fire and Gas 375 gated access 376 in FBD language 96 in LD language 157 in Standard Library 334 in TRICON Library 338 Modbus 377 peer-to-peer communication 377 printer control 378 process control 373 SOE 376 system control 379

functions TRICON clock 374 utility 378 fuse errors 306

G
gated access functions 376 generic data types 33 glitch to load 306 gray status indicator 298 green OVD field 299, 302, 306 green status indicator 298

H
handshake mode 348 Hardware Allocation node 191 hardware configuration 35 hardware revision level 307 Help menu commands 45 for all TriStation 1131 views 45 Help system 48 historical diagnostic information about the TRICON 308 Honeywell workstations 354 horizontal network dividers in FBD editor 104 in LD editor 164

I
I/A Series DCS 361 I/A Series Nodebus 355 import filename 232 import records linking and unlinking 235 Import Status messages 234 Import TRICON Points command 227, 232 Import Wizard 232, 236 importing TRICON point properties 227 steps to follow 232 initial log-in 310

434

Index

Initial Value of TRICON point 205 initialization of variables 261 instance name of function block 61 instance view in control panels 258 in FBD editor 111 in LD editor 171 in TRICON Configuration editor 197 Intelligent Automation (I/A) Series DCS see I/A Series DCS 355 internal functions of TriStation 1131 280 Internet Web page 22 IOBAD variable 388, 389, 390, 392 IOMAIN variable 388 IS department 400

J
Jump to Source command for logic errors 218

K
keyboard shortcuts 363 keyswitch of TRICON 285, 286, 393 settings 304

libraries automatically attached 334 deleting 343 overview 333 shared 34 standard 34 Link All command 235 Link command 235 lists Options menu for 186 load errors 306 load glitches 302, 306 load/fuse error 302 Location of a TRICON point 204 logic basic methods for writing 58, 70 basic methods for writing in FBD 70 basic methods for writing in LD 120 example of 63 logic operators 370 logic power of TRICON modules 193 logic sheets manipulating in FBD editor 81 manipulating in LD editor 130 printing in FBD 118 printing in LD 178 logical slot numbers 298 log-in initial 310

L
Ladder Diagram (LD) language see LD 25 language editors brief description 37 languages brief description 24 multiple in one project 37 LD toolbar 124 levels security 314

M
macros annotation 176 default types 116, 176 inserting into FBD comment 106 inserting into LD comment 166 system 113, 173 TRICON platform descriptor 177 user-modifiable 113, 115, 173, 175

Index

435

main menu commands in control panels 247 in FBD editor 73 in LD editor 122 in TRICON Configuration editor 182 in TRICON Diagnostic Panel 288 maintenance log-on to TRICON 399 major version number of element 281 manual connection of individual program variables 217 of TRICON points 213 manual naming of TRICON points 200 master node 361 math functions 372 MaxSpan field 209 MaxSpan value 349 MaxSpeed value 350 memory estimating the amount available 239 memory allocation 207 downloading considerations 196 Memory Allocation node 194 Memory points 207 acronyms for point display 205 addresses of 205 Alias ranges for 207 memory space 303 free 304 Memory variable type changing with Download Change 271, 272 Message Bar 218 Microsoft Access file format 222, 227 Microsoft Excel file format 222, 227 minor version number of element 281 MinSpan field 209 MinSpan value 209, 349

Modbus conversion information 304 functions 377 range 349 Modbus master 285, 286, 347 Modbus Max value 349 Modbus Min value 349 Modbus protocol 209 Module Configuration Exceptions window 264 modules adding and deleting 191 adding or deleting with Download Change 271 monitor display options setting in TRICON Configuration editor 210 monitor sheet of control panel 255 mouse shortcuts 365 MPBAD variable 388, 390, 392 MPMAIN variable 388, 390, 392 multiple faults 389 multiple languages in one project 37 multiple programs in one project 29

N
naming automatic 203 manual 200 of TRICON points 200, 215 NCM configuration 357 network communication modules for 355 network dividers in FBD editor 104 in LD editor 164 Network Node parameter 188, 293

O
off-line comparison to last downloaded configuration 275 on-line comparison to last downloaded configuration 275

436

Index

operational mode of the TRICON 285, 286 operations security levels assigned to 312 TriStation 1131 313 operators 371 arithmetic 370 logic 370 Options menu for lists 47, 186 Output Voter Diagnostics (OVD) general information 306 see OVD 306 OVD faults correcting 302 identifying 302 OVD state 299 OVDDISABLE function 306, 394 when not allowed 394 OVDENABLE function 306 owner of an element 316

P
parallel port of EICM 340, 349 parameters system 188 partitioning number of programs 56 options for project 53 using function blocks 57 using functions 57 using program copies 57 using program instances 57 Password Required for Download All parameter 189 PC for TriStation 1131 263, 292, 399 PCB assembly number 307 peer-to-peer communication 401 description of function blocks for 402 peer-to-peer function blocks 377, 395 configuring number of sends and receives 416 data transfer time 420

peer-to-peer function blocks 377, 395 errors 422 examples 424 restrictions 415 rules for correct usage 416 TR_USEND and TR_URCV relationship 415 using with critical data 396, 425 Peer-to-Peer protocol 357 performance information on system and project 303 physical slot numbers 298 pickup of elements for FBD comment 107 of elements for LD comment 167 point connections 35 automatic 214 manual 213 property fields for 204 rules that apply 203 undoing 216 point names undoing 216 points automatic naming 203 disabled 393 enabling 284 list of disabled 284 manual naming 200 methods of naming 200 viewing all for selected module 216 poll time 303 pop-up menu description 38 for control panels 246 for FBD editor 71 for LD editor 121 power faults 302 power flow in an LD program instance 259 power switch 285 power usage of chassis 193

Index

437

printer connecting to parallel port 340 sample logic for messages 341 printer control functions 378 printing of custom reports 331 of logic sheets 118, 178 of standard reports 330 privileges in security system 311 process control functions 373 program instance definition 35 steps for declaring 197 program instance monitor 258 program logic basic methods for writing 58 example of 63 PROGRAM mode 285, 286, 304, 393 program states 304 program variables manually connecting to TRICON points 217 programming languages 24 programs multiple in one project 29 number in project 56 project basic methods for configuring 64 configuration 64 disabled points in 393 empty 399 procedures for controlling and changing 273 sample diagrams of 54 typical steps for developing 51 Project Directory definition 36 project elements 27 Project menu commands 43 for all TriStation 1131 views 43 project toolbar 40 projects for TRICON systems 27

properties assigning to elements 60 of function block in FBD editor 100 of function block in LD editor 161 of functions in FBD logic 96 of functions in LD logic 157 of sheets in FBD logic 82 of sheets in LD logic 131 of variables in FBD logic 83 of variables in LD logic 134, 144 of wires in FBD logic 103 Properties dialog box definition 38 property fields for TRICON points 204 Pulse Input module configuration 350 pulses per revolution 351

Q
Quad Output Voter 389

R
RARP 359 read-only view of a program instance 197 red fault indicator 300 red slot in TRICON chassis display 297 red status indicator 298 Relay Ladder Language (RLL) see RLL 380 remote changes disabling 190 REMOTE mode 285, 286, 304, 393 report databases updating 330 reports custom printing of 331 standard printing of 330 requested scan rate 304, 305

438

Index

response time 394 retentive masks 304 retentive outputs 285 Retentive property 204 Reverse ARP (RARP) see RARP 359 RLL coils 380 contacts 380 RPM measurement formula 352 RS-232 mode 348 RS-422 mode 348 RTU mode 348 RUN mode 285, 286, 304, 393

S
safe shutdown 388 Safety Change Control Committee (SCCC) 273 Save Now option for lists and columns 48 Scale Factor for RPM measurement 352 scan rate actual 304 requested 304, 305 Scan Rate parameter 189 Scan Surplus 265, 305 scan time 271, 305, 394 actual 304 scrolling through sheets 364 security levels 314 for TRICON operations 312 security privileges 311 security system elements of 309 Select Import Options dialog box 233 Sequence of Events (SOE) function blocks see SOE 376 serial number with eight digits 307 serial port 189, 263, 292, 319, 346, 399

shared libraries 34 automatically attached 334 overview 333 shared library exporting elements to 342 importing to a project 343 sheet properties in FBD editor 82 in LD editor 131 sheets manipulating in FDB editor 81 manipulating in LD editor 130 printing in FBD editor 118 printing in LD editor 178 scrolling through 364 Sheets menu in Control Panels 253 in FBD editor 78 in LD editor 128 shortcut keys 40, 73, 123, 248, 288 shortcuts keyboard 363 using mouse 365 shutdown false 389 Size/Alignment commands in control panels 247 in FBD editor 72 in LD editor 122 slave address 347 slot numbers logical 298 physical 298 slots in TRICON chassis states of 297 SMM configuration 353 point database 353 SOE Block Definition dialog box 240, 241 SOE Block Select tab 241 SOE block size estimating available memory for 239

Index

439

SOE blocks setting up 240 SOE function blocks 376 SOE Trip Variable dialog box 242 software support 20 speed measurement point 350 speed measurement formula 351 ST editor 179 ST language 26, 179 standard libraries 34 overview 333 Standard Library (STDLIB) basic description 34 functions 334 standard reports printing 330 State Names parameter 210 status indicators of TRICON modules 298 STDLIB see Standard Library 34, 334 STOP mode 285, 286, 304 disabling 303 Structured Text (ST) language see ST 26, 179 support 20 System Administrator 190, 360, 400 System Aliases 208 system control functions 379 system macro definition 113, 173 system parameters 65, 188 system performance information 303 system variables 383

T
Tag Name property 204 Tag Names for TRICON points 207 SOE-configurable 241 TCP/IP address changing with Download Change 272 default 320, 359

TCP/IP address of ACM or NCM 359 user-supplied 360 TCP/IP message protocol 320 TDC 3000 DCS 353 time synchronization with 361 technical support 20 testing setting values for 256 using a control panel 256, 260 text files exporting TRICON point properties to 225 rules for importing 228 Time After Trip parameter 242 Time Before Trip parameter 242 time synchronization 190 basic facts 361 guidelines 362 with external source 361 Time Synchronization protocol 357 time-stamping of events 361 toolbar diagnostic 288 for basic editing 38 for control panels 249 for editor or control panel 40 for FBD editor 71 for LD 124 tools for developing a project 36 for FBD editor 75 for LD editor 124 Tools menu in Configuration editor 186 in Control Panels 250 in FBD editor 77 in LD editor 126 in TRICON Diagnostic Panel 290 tooltip 42 TR1LIB see TRICON Library 334

440

Index

Tree menu commands 185, 250, 290 in Configuration editor 185 in Control Panels 250 in TRICON Diagnostic Panel 290 TRICON configuration 35 building 218 maintenance log-on 399 operational mode 285, 286 operations security levels assigned to 312 scan time 394 TRICON chassis display in TRICON Diagnostic Panel 297 TRICON clock functions 374 TRICON Configuration editor 210 brief description 49 TRICON Control Panel main purpose 254 TRICON DDE Server 357 TRICON Diagnostic Panel brief description 50 maintenance log-on 399 overview 292 sample steps for use 292 TRICON keyswitch 285, 286, 304, 393 TRICON Library functions 338 TRICON Master Node 190, 361, 362 TRICON menu for all TriStation 1131 views 43 TRICON network multi-node 320 single node 320 TRICON node names rules for modifying 321 TRICON node number 320, 359, 360, 400 selecting 418 TRICON platform descriptor macros 177 TRICON point connections automatic 214 definition 35

TRICON point connections manual 213 property fields for 204 rules that apply 203 undoing 216 TRICON point names undoing 216 TRICON point properties required values for 223, 230 TRICON points automatic naming 203, 215 manual naming 200 methods of naming 200 viewing all for selected module 216 TRICON slots states of 297 TRICON SOE Configuration icon 240, 241, 242 TRICON SOE Configuration window 241 TRICON System Configuration node in TRICON Configuration editor 188 TRICON System Configuration window in Diagnostic Panel 295 Triconex bulletin board 21 TRILOG events 308 TRINODE node number 188 Trip State parameter 242 Trip Tag Name parameter 242 trip variable designating 242 Triple Modular Redundancy (TMR) 306 TriStation 1131 internal functions 280 TriStation 1131 operations security levels assigned to 313 TriStation 1131 PC 263, 292, 399 TRISTATION MSW application 357 TRISTATION MSW corollaries 369 Tristation protocol 355, 357 TRUE Color parameter 210 TRUE State Name parameter 210 TSAA protocol 355, 357 TSAA/TCP(UDP)/IP protocol 357

Index

441

TV standards 385 Class 1 through 5 restrictions 397 restrictions general 385 TRICON-specific 388

U
UCN node address of SMM 353 Universal Control Network (UCN) 353 Unlink All command 235 Unlink command 235 user experience requirements 19 user-modifiable macros definition 113, 173 working with 115, 175 users in security system 310 utility functions 378

vertical network dividers in FBD editor 104 in LD editor 164 view enlarged 46, 257 instance 258 read-only 258 View menu in Configuration editor 185 in Control Panels 250 in FBD editor 77 in LD editor 126 viewing of points for selected module 216 voter fault example 302 Voter Faults tab 302

W
Web page 22 white slot in TRICON chassis display 297 Window menu commands 44 for all TriStation 1131 views 44 windows displaying and arranging 367 wire properties in FBD logic 103 wires connecting within logic 58

V
variable annotation automatic 109, 169 brief how-to 62 for entire project 109, 169 for individual variables 111, 171 in FBD editor 105 in LD editor 165 instructions for 108, 168 variables declaring in FBD 83 declaring in LD 144 initialization 261 version number incrementing 279 major 279 minor 279 of elements 281 of project 278, 279 version numbers of firmware 307

Y
yellow OVD field 299, 302 yellow slot in TRICON chassis display 297 yellow status indicator 298

Z
Zoom enlarged view 46, 257

442

Index

Das könnte Ihnen auch gefallen