Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore 03.Application Development

03.Application Development

Published by OCS, 2021-11-18 07:53:32

Description: 03.Application Development

Search

Read the Text Version

3. Application Development 3–1 Internal



Participant Guide Application Development Contents of This Module Module Objectives......................................................................... 12 3–3 Reference Documentation............................................................ 12 Application Development Overview ............................................ 14 Application Elements.................................................................... 16 Application Workspace ............................................................................. 16 Declaration Tree......................................................................................... 17 Implementation Tree.................................................................................. 17 Parts of an Application.............................................................................. 17 Application ............................................................................................. 18 Program Organizational Units (POUs) ................................................... 18 Programs ............................................................................................... 18 Functions and Function Blocks .............................................................. 18 TriStation 1131 Libraries ........................................................................ 18 User-Defined Functions ......................................................................... 18 Tagnames.............................................................................................. 18 Variables................................................................................................ 19 Data Types ............................................................................................ 19 Controller Configuration ......................................................................... 19 Implementation Information.................................................................... 19 Safety and Control Applications............................................................... 20 Programs ............................................................................................... 20 Function Blocks ..................................................................................... 21 Functions ............................................................................................... 21 Variables................................................................................................ 22 Tagnames.............................................................................................. 22 Data Types ............................................................................................ 22 Elementary Data Types.......................................................................... 23 Generic Data Types ............................................................................... 24 TriStation Libraries................................................................................. 24 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Configuration ......................................................................................... 24 TriStation Programming Languages ........................................... 25 Function Block Diagram Language .......................................................... 25 FBD Language Editor ............................................................................ 26 Ladder Diagram Language........................................................................ 26 LD Editor................................................................................................ 26 Structured Text Language ........................................................................ 27 ST Editor................................................................................................ 28 CEMPLE (Cause and Effect Matrix Programming Language Editor) ...... 28 User Documents............................................................................ 29 Creating a User Document........................................................................ 29 Copying User or Library Documents........................................................ 29 Specifying Document Summary Information........................................... 29 Specifying Document Attributes .............................................................. 29 Restricting Access to a Document ........................................................... 29 Changing a Document Owner................................................................... 30 Lab 7 : Using the User Documents.............................................. 31 Introduction................................................................................................ 31 Objectives .................................................................................................. 31 Lab Procedure ........................................................................................... 31 Create a User Document ....................................................................... 31 Copy a User Document.......................................................................... 32 Specify Document Summary Information ............................................... 32 Specify Document Attributes .................................................................. 33 Restrict Access to a Document .............................................................. 34 Change a Document Owner................................................................... 34 Function Block Diagram and Ladder Diagram Development ... 35 Using the FBD Editor................................................................................. 35 Using the LD Editor ................................................................................... 36 Function and Function Block Graphics ................................................... 37 Working with Logic Sheets ....................................................................... 38 3–4 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Selecting a Sheet Template ...................................................................... 38 3–5 Managing Logic Sheets............................................................................. 38 Editing the Sheet Title ............................................................................... 38 Printing Logic Sheets ................................................................................ 38 Specifying Function Block Properties ..................................................... 38 Specifying Function Block Application Usage ........................................ 39 Using a Space Saver Function Block ..................................................... 39 Lab 8 : Working with Logic Sheets.............................................. 40 Introduction................................................................................................ 40 Objectives .................................................................................................. 40 Lab Procedure ........................................................................................... 40 Create a New Sheet............................................................................... 40 Manage Logic Sheets ............................................................................ 41 Edit the Sheet Title................................................................................. 42 Print Individual Logic Sheets.................................................................. 42 Print Multiple Logic Sheets..................................................................... 42 Select Library Elements ......................................................................... 43 Specify Function Properties ................................................................... 44 Specify Function Block Properties.......................................................... 45 Specify Function Block Application Usage ............................................. 45 Variables and Constants .............................................................. 47 Declaring Variables ................................................................................... 47 Specifying Variable Properties ................................................................. 47 Specifying Variable Annotation Properties.............................................. 47 Naming Multiple Variables ........................................................................ 47 Changing Multiple Variables ..................................................................... 47 Viewing the Number of Variables and Tagnames in a Program ............. 48 Creating Constants.................................................................................... 48 Specifying Constant Annotation Properties ............................................ 48 Lab 9 : Creating Variables and Constants .................................. 49 Introduction................................................................................................ 49 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Objectives .................................................................................................. 49 Labs Procedure ......................................................................................... 49 Declare Variables................................................................................... 49 Specify Variable Properties.................................................................... 50 Specify Variable Annotation Properties .................................................. 51 Name Multiple Variables ........................................................................ 51 View the Number of Variables and Tagnames in a Program .................. 53 Create Constants ................................................................................... 53 Specify Constant Annotation Properties ................................................. 54 Tagnames....................................................................................... 55 Declaring Tagnames.................................................................................. 55 Assigning an Alias Number, Alias Type, and Physical Address ............ 55 Scaling a REAL Point ................................................................................ 55 Specifying Display Options for Tagnames .............................................. 56 Managing Undeclared and Unused Tagnames ........................................ 56 What are Undeclared Tagnames? ......................................................... 56 Unused Tagnames................................................................................. 57 Displaying Undeclared and Unused Tagnames ..................................... 57 Editing Unused Tagnames..................................................................... 57 Deleting Unused Tagnames................................................................... 58 Lab 10 : Using Tagnames ............................................................. 59 Introduction................................................................................................ 59 Objectives .................................................................................................. 59 Lab Procedure ........................................................................................... 59 Declare Tagnames................................................................................. 59 Assign an Alias Number, Alias Type, and Physical Address ................... 60 Access Memory Points........................................................................... 62 Scale a REAL Point ............................................................................... 62 Specify Display Options for Tagnames................................................... 63 Create Multiple Tagnames ..................................................................... 64 Rename a Tagname............................................................................... 65 3–6 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Delete a Tagname.................................................................................. 65 3–7 Insert a Column into the Tagnames Table .............................................. 66 Delete a Column from the Tagnames Table ........................................... 67 Display Undeclared and Unused Tagnames .......................................... 67 Edit Unused Tagnames.......................................................................... 68 Delete Unused Tagnames...................................................................... 68 Importing and Exporting Tagnames............................................ 69 Format of an Exported Tagname File ....................................................... 69 File Format Requirements for Tagname Import....................................... 70 General File Requirements .................................................................... 71 Import Data Requirements ..................................................................... 71 Import Options and Validation Criteria .................................................... 73 Adding New Points................................................................................. 73 Updating Existing Points ........................................................................ 73 Importing Tagname Properties ................................................................. 73 Lab 11 : Importing and Exporting Tagnames ............................. 74 Introduction................................................................................................ 74 Objectives .................................................................................................. 74 Lab Procedure ........................................................................................... 74 Export Tagname Properties ................................................................... 74 Prepare an Excel File for Import............................................................. 75 Import Tagname Properties.................................................................... 76 Annotations and Comments ........................................................ 80 Adding Annotations .................................................................................. 80 Adding a Comment.................................................................................... 80 Picking and Dropping Elements for Comments ...................................... 80 Using Macros with Annotations and Comments ..................................... 81 Lab 12 : Using Annotations and Comments............................... 82 Introduction................................................................................................ 82 Objectives .................................................................................................. 82 Lab Procedure ........................................................................................... 82 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Add Annotations .................................................................................... 82 Specify Annotation Properties................................................................ 84 Add a Comment ..................................................................................... 84 Specify Comment Style.......................................................................... 85 Pick and Drop Elements for Comments.................................................. 85 Edit Comment Fields.............................................................................. 86 Use Macros with Annotations and Comments ........................................ 86 Edit Macro Text ...................................................................................... 87 Modbus Applications .................................................................... 88 Tri-GP Functionality .................................................................................. 88 Assigning Alias Numbers to Tagnames................................................... 88 Lab 13 : Assigning Alias Numbers to Tagnames ....................... 89 Introduction................................................................................................ 89 Objective .................................................................................................... 89 Lab Procedure ........................................................................................... 89 Assign Alias Numbers to Tagnames....................................................... 89 Function Block Diagram ............................................................... 90 Creating a User Document........................................................................ 91 Selecting the Sheet Template ................................................................... 91 Specifying Sheet Title Properties ............................................................. 91 Placing a Function on the Logic Sheet .................................................... 92 Specifying Function Properties............................................................... 92 Placing Variables on the Logic Sheet ...................................................... 93 Declaring Variables ................................................................................... 93 Declaring Program Variables for OR Function ....................................... 94 Adding Comments..................................................................................... 94 Comment Tab ........................................................................................ 94 Style Tab ............................................................................................... 94 Pickup/Drop Tab .................................................................................... 95 Edit Fields Tab....................................................................................... 95 Adding a Comment ................................................................................ 96 3–8 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Using Macros with Comments.................................................................. 96 3–9 Inserting a Network Divider .................................................................... 96 Compiling the Program ............................................................................. 97 Printing Logic Sheets ................................................................................ 97 Lab 14 : Creating Function Block Diagrams............................... 98 Introduction................................................................................................ 98 Objectives .................................................................................................. 98 Lab Procedure ........................................................................................... 98 Create a User Document ....................................................................... 98 Select the Sheet Template ................................................................... 101 Specify Sheet Title Properties .............................................................. 102 Place a Function on the Logic Sheet.................................................... 103 Specify Function Properties ................................................................. 104 Place Variables on the Logic Sheet...................................................... 105 Lab 15 : Declaring Variables ...................................................... 107 Introduction.............................................................................................. 107 Objective .................................................................................................. 107 Lab Procedure ......................................................................................... 107 Declare Program Variables for OR Function ........................................ 107 Add a Comment ................................................................................... 110 Use Macros with Comments ................................................................ 111 Insert a Network Divider....................................................................... 112 Compile the Program ........................................................................... 112 Print Logic Sheets................................................................................ 113 Place a CTU Function Block on the Logic Sheet.................................. 114 Place Variables on the Logic Sheet...................................................... 115 Declare the Variables for the CTU Function Block................................ 116 Q Variable ............................................................................................ 117 CV Variable.......................................................................................... 117 Compile the Program and Print Logic Sheet ........................................ 118 Writing Ladder Diagram Logic ................................................... 119 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Creating a User Document...................................................................... 119 Contacts .............................................................................................. 119 Coils..................................................................................................... 120 Lab 16 : Writing Ladder Diagram Logic .................................... 121 Introduction.............................................................................................. 121 Objectives ................................................................................................ 121 Lab Procedure ......................................................................................... 121 Create a User Document ..................................................................... 121 Place Contacts and Coils on the Logic Sheet....................................... 122 Declare Contacts and Coils.................................................................. 124 Place a CTU Function Block on the Logic Sheet.................................. 126 Place Contacts on the Logic Sheet ...................................................... 126 Place a Coil on the Logic Sheet ........................................................... 127 Place Local Variables on the Logic Sheet ..................................... 128 3–10 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–11 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Module Objectives After completing this module, you can: • Introduce the Application Development module. • Plan the application. • Create programs and functions. • Add annotations and comments. • Determine access to a document. • Determine access to points. • Create variables and constants. • Declare tagnames. • Import or export tagnames. • Assign Modbus aliases. • Add Peer-to-Peer features. • Compile project programs and functions.. • Build the application. Reference Documentation For more information, refer to the following materials: • TriStation 1131™ Developer’s Workbench • TriStation 1131 Libraries Reference • Triconex SOE Recorder User’s Guide 3–12 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–13 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Application Development Overview Figure 1 shows the main steps for developing a TriStationTM 1131 application. An application can be developed and tested on the Emulator before downloading the application to a controller. Figure 1 – TriStation 1131 Application Development Steps Table 1 shows the needed references for performing the main steps for developing a TriStation 1131 application. Table 1 – Steps References Steps Reference Plan the application Create programs and Safety and Control Applications functions • User Documents Add annotations and • Function Block Diagram and Ladder Diagram comments Determine access to a Development • Structured Text Development in the TriStation 1131 Developer’s Guide • Cause Effect Matrix Development in the TriStation 1131 Developer’s Guide Annotations and Comments Restricting Access to a Document 3–14 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Steps Reference document Trident and Tri-GP Application Access in the TriStation 1131 Developer’s Guide Determine access to points • • Specifying Constant Annotation Properties Create variables and constants Declare tagnames • Declaring Variables • Creating Constants Import or export Tagnames tagnames Importing and Exporting Tagnames Assign Modbus aliases Modbus Applications Peer-to-Peer Applications in the TriStation 1131 Add Peer-to-Peer Developer’s Guide features Compiling a Program in the TriStation 1131 Developer’s Guide Compile project programs Building an Application in the TriStation 1131 and functions Developer’s Guide Build the application 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–15 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Application Elements This section describes the elements of an application and the steps in application development. The topics included are: • Application Workspace • Declaration Tree • Implementation Tree • Parts of an Application • Safety and Control Applications Application Workspace Application development takes place in the Application Workspace. The folders in this tree, Figure 2, include the user programs, functions, function blocks, data types, tagnames, and implementation settings needed for the application. The tree also includes the TriStation 1131 library of functions, function blocks, and data types that can be used in the project. Figure 2 – Application Workstation Tree 3–16 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Declaration Tree The Declaration Tree, Figure 3, lists the declarations for the currently opened program, function, or function block. Figure 3 – Declaration Tree Implementation Tree The Implementation Tree, Figure 4, lists the elements that can be specified for the application, including the Execution List (list of programs and scan time), SOE Configuration, and Peer-To-Peer Configuration. Figure 4 – Implementation Tree Parts of an Application The major elements in an application are programs, functions, function blocks, tagnames, variables, implementation information, and controller configuration. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–17 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Application An application includes application elements and configuration information that is built (compiled) into executable code and downloaded and run on a Triconex™ controller. The maximum number of programs in an application is 250. Program Organizational Units (POUs) A program organizational unit is a program, function, or function block. The maximum number of POUs in an application being downloaded to the Emulator is 3,001 (this limitation does not apply to programs being downloaded to the controller). However, this limit includes internal system POUs, so the actual number of POUs available for inclusion in an emulated application is dependent on the control program implementation. Programs A program is an executable element that includes one or more functions and function blocks. A program can invoke functions and function blocks but cannot invoke another program. A program is initiated from the Execution List. The maximum number of user- defined variables that can be used in a program is 2,000, which includes local variables and tagnames, but not VAR_TEMP variables. Functions and Function Blocks A function is an executable element that returns exactly one result. The values in a function exist only while the function is executing. A function block is an executable element that returns one or more values and retains the values derived during one evaluation for use in the next evaluation. For function blocks, a set of input values may not yield the same output values. The maximum number of variables that can be used in a function or function block is 400, which includes input, output, input/output, and local variables, but not VAR_TEMP variables. TriStation 1131 Libraries TriStation 1131 includes libraries of functions, function blocks, and data types that are automatically included with each project. User-Defined Functions In user-defined functions, if no value is assigned to the function output, the return value is the default initial value. If there is not a statement that assigns a value to the function output, a compiler error occurs. No error or warning is issued, if an assignment to the function output is in a conditional statement and is not executed. Tagnames A tagname identifies input, output, and memory points that are accessible to all programs in the application. In IEC terminology, tagnames are called global variables. The maximum number of user-defined variables and tagnames in a program is 2,000. 3–18 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Variables A variable is a named area in memory that stores a value or string assigned to that variable. Table 2 – Variables List Variable Type Used With Input In/Out Functions and function blocks. Output Function blocks. Local Functions and function blocks. Tagname Functions, function blocks, and programs. VAR_TEMP Programs. Currently available only in ST programs and function blocks. Data Types A data type identifies the type of data used in tagnames and variables. TriStation 1131 uses both elementary and generic data types. • Elementary types are defined by IEC 61131-3 and include: BOOL, DATE, DINT, DT, DWORD, INT, LREAL, REAL, STRING, TIME, and TOD. TriStation 1131 also supports the derivation of structured, array, and enumerated data types. • Generic data types are used to organize elementary data types that have similar properties and can be used with IEC 61131-3 standard functions that support overloaded inputs and outputs. Generic data type names use the prefix ANY. Controller Configuration The controller configuration specifies the communication characteristics for memory, module configuration, and other hardware-related settings. When the application is built, this information is required. Implementation Information Implementation information includes the Execution List, Figure 5, Scan Time, SOE, and Peer-to-Peer setup. Figure 5 – Execution List 3–19 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Safety and Control Applications An application can include safety programs only, control programs only, or a combination of safety and control programs. Safety applications are the most restrictive type because they are designed to take a process to a safe state when predetermined conditions are violated. All elements of the application (programs, functions, function blocks, and tagnames) must be approved or specified for safety. Control applications are designed to control a process and can use control, or safety and control functions and function blocks. The tagnames must be specified as control tagnames. Table 1 describes how programs, functions, function blocks, and tagnames can be used in safety and control applications. Table 3 – Application Elements Use Application Elements Use Programs • Safety programs cannot use control functions, function Functions and Function blocks, or tagnames. Blocks • Control programs cannot use safety tagnames. Tagnames • Can be safety and control, or control. • Library functions and function blocks are designated as approved for use in safety and control or control applications. These designations cannot be changed. Can be safety or control. If Shared Read is selected, a safety program can read a control tagname and vice- versa. Programs A program is the highest level program organization unit (POU) within a project, Figure 6. It is an assembly of functions and function blocks that provide the logic for the commands executed by the controller. In each program, you can define a maximum of 2,000 variables (inputs, outputs, and locals). Figure 6 – Programs Hierarchy A program can invoke functions and function blocks but cannot invoke another program. If more than one program is needed for an operation, then multiple programs are created and executed in a specific order. Programs are initiated from the Execution List. 3–20 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Function Blocks A Function Block is a pre-programmed calculation that can have one or more inputs and multiple outputs. A function block retains the values calculated during one evaluation for use in the next evaluation. For certain operations, a set of input values may not yield the same output values. For example a count up function block, may have an input value of one, but because it is counting up, the output value will be increasingly higher than the input. Figure 7 is a representation of a count up (CTU) function block. Figure 7 – (CTU) function block Each input (CU) increases the value of output (Q) by one, until the maximum pre-set value (PV) is reached or exceeded. You can also create a user-defined function block. This is helpful when writing logic to control a number of identical process units, especially if the amount of logic required is small. You can use a maximum of 400 variable (input, outputs, and locals) in each function block. Functions A function is a pre-programmed calculation that can have one or more inputs but returns only one result. Unlike a function block, values in a function are not retained from one evaluation or scan to the next. The values in a function exist only during each evaluation. You can use a maximum of 400 variables in each function, Figure 8. You can also create a user-defined function and invoke it each time it is needed. The functions are specific to that project, but can be imported to other projects. This reduces the amount of memory required for the program logic, as well as makes the program easier to read. In FBD and LD languages, each function or function block is graphically represented on a logic sheet. This is an example of an OR function. Figure 8 – Functions 3–21 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Variables In a program, function, or function block, a variable represents a value. In a controller, a variable refers to a named area in the memory that stores the value. All variables used in a project must be declared as either local to a program, function, or function block, or global to the project. A local variable means that the value is temporary and ends when a certain part of the program ends. For example, input to reset a counter when it reaches 32,767 would be a local variable or integer data type (INT). Upon reaching that number, the program ends and starts over again. The value is reset to zero, the value it had at the beginning of the program. A global variable means that the value is valid until it is replaced with a different value. The output on a counter that counts the number of times an alarm sounds would be a global variable, the value changing only when another alarm sounds. It is important to remember that in TriStation 1131, global variables are named tagnames. Tagnames Tagnames, also known as global variables, are references to physical locations in the controller memory. Tagnames describe the type of point (input, output, or memory) and properties associated with the point. Data Types Data types identify the type of data used in tagnames and local variables. A tagname must be one of three data types: • BOOL – Boolean variable • DINT – Double integer • REAL – Real number These variables point to hardware addresses in the controller and are accessible to all programs in a TriStation project. Local variables can be any of the data types supported by TriStation 1131. TriStation 1131 uses elementary and generic data types. An elementary data type is defined by IEC standards and identifies the characteristics and size of the data used in a program, function, or function block, and the operations that can be applied to the data. 3–22 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Elementary Data Types An elementary data type is defined by IEC standards and identifies the characteristics and size of the data used in a program, function, or function block, and the operations that can be applied to the data. This table describes the elementary data types and how they can be used. Data Type Description Tagnames Constants and BOOL Variables DATE A Boolean, 1 bit in length, and has two possible DINT values: false (0) or true (1). Yes Yes A specific date expressed as the year, month, and day, 8 bits in length. Syntax: D#CCYYMM-DD Yes A double integer, 32 bits in length Yes Yes DT A specific date and time. To specify the time of Yes DWORD day, you can use fractions (FFF) of a second. Yes Values are stored internally in microseconds and displayed in the TriStation A double word, 32 bits in length INT An integer, 16 bits in length Yes LREAL A real long number, 64 bits in length and has Yes REAL 15 decimal digits of precision Yes Yes STRING A real number, 32 bits in length and has 6 decimal Yes TIME digits of precision Yes TOD A period of time (duration) in days, hours, minutes, Yes seconds, and milliseconds for any operation to take place. The range is ± 9999 years and the precision is 0.1 milliseconds. Syntaxes: T#11d T#22.2h T#33.3m T#44.4s T#55.5ms T#11d22h33m44s55.5ms A specific time of day expressed in hours, minutes, seconds, and fractions (FFF) of a second. The precision is 0.001 seconds. Syntaxes: TOD#HH:MM:SS TOD#HH:MM:SS.FFF TIME_OF_DAY#HH:MM:SS 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–23 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Generic Data Types Generic data types are used to organize elementary data types that have similar properties. They can be used with IEC 61131-3 standard functions that supports overloaded inputs and outputs. Overloaded is a variable that can be used for different types of data. Generic data type names use the prefix ANY. TriStation Libraries TriStation 1131 provides four standard libraries that contain functions and function blocks you can use for application development: • Standard Library (STDLIB) complies with the IEC 61131-3 standard. • TriconexTM Library (TCXLIB) for all Triconex platforms. • Tricon Library (TR1LIB or TX1LIB) specifically for TriconTM platforms. • Trident Library (TRDLIB) for TridentTM platforms. You can also create a custom library of functions, function blocks, and data types that can be used in other projects. Configuration The controller configuration specifies: • Operating parameters. • Memory and hardware allocations. • Communication configurations. • Time Synchronization. The controller must be configured before an application can be downloaded and implemented on that controller. 3–24 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development TriStation Programming Languages The TriStation 1131 Developer's Workbench software supports three IEC 61131-3 Standard compliant languages and an optional Triconex programming language for developing, testing, and documenting process control applications that execute in the Tricon, Trident, Triconex™ General Purpose (Tri-GP™) controllers. The following are examples on TriStation programming languages: • Function Block Diagram • Ladder Diagram • Structured Text • Cause and Effect Matrix Programming Language Editor (CEMPLE) for turbomachine applications. Function Block Diagram Language A Function Block Diagram (FBD), Figure 9, is a graphically-oriented language that corresponds to circuit diagrams. Elements are represented by blocks that are wired together to form circuits. The wires 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 can contain one or more networks. FBD diagrams are always interpreted from left to right, and from top to bottom. Figure 9 – Function Block Diagram Language 3–25 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide FBD Language Editor Function Block Diagrams are created using the FBD Editor. Buttons on the toolbar are used to select and place elements in the workspace, Figure 10. Figure 10 – FBD Language Editor For a description of the toolbar buttons, refer to the Commands and Properties in the Developer's Workbench in the Content section of the Help documentation. Ladder Diagram Language Ladder Diagram (LD) language is a graphical language that uses a standard set of symbols to represent relay logic. The basic elements are contacts (discrete inputs) and coils (discrete outputs) diagramed like rungs on a ladder, and connected by links. The links are different from the wires used in FBD in that they transfer only binary data between LD symbols, following the power flow characteristics of relay logic. Function blocks and function elements that have at least one binary input and output can be used in LD diagrams. Figure 11 shows the water tank alarm shown in the previous section, written in LD language. Figure 11 – Water Tank Alarm (LD Language ) The two contacts are connected to the left rail, which represents the power rail. The coil is connected to a ground power rail on the right. If either of the contacts is a TRUE state, the Alarm_On coil responds with a TRUE state, and sets an alarm. LD Editor Ladder Diagrams are created using the LD Editor, Figure 12. Buttons on the toolbar are used to select and place elements in the workspace. 3–26 Figure 12 – LD Editor 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development For a description of the toolbar buttons, refer to the Commands and Properties in the Developer's Workbench in the Content section of the Help documentation. Structured Text Language Structured Text (ST) is a general purpose, high-level programming language, similar to PASCAL or C. It is useful for complex arithmetic calculations, and can be used to implement complicated procedures that are not easily expressed in graphical languages such as FBD or LD. ST can be used to create Boolean and arithmetic expressions, and conditional statements such as IF...THEN...ELSE. This example shows the water tank alarm written in ST and performs the operation as the previous FBD and LD examples. The program logic is written between the statements PROGRAM and END_PROGRAM. VAR_INPUT represents the two water level inputs. VAR_OUTPUT sets the alarm if the water level is too high or too low. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–27 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide ST Editor The Structured Text (ST) editor, Figure 13, allows you to develop programs and functions by writing code. The buttons on the toolbar are used to select editing features. The editor displays a template on the worksheet to help you create the logic in the correct format. Figure 13 – ST Editor CEMPLE (Cause and Effect Matrix Programming Language Editor) CEMPLE™ (Cause and Effect Matrix Programming Language Editor) is a Triconex language based on cause and effect matrix methodology, which is commonly used in the process control industry. A cause and effect matrix is frequently used for applications such as fire and gas systems for which the programming logic is simple, but the volume of inputs and outputs that need to be controlled is high. A matrix is readily understood by a broad range of plant personnel from process control engineers to maintenance operators. CEMPLE allows you to associate a problem in a process with one or more actions that must be taken to correct the problem. The problem is known as a cause and the action is known as an effect. In a typical matrix, a cause is represented by a row in the matrix and an effect is represented by a column. An X in the intersection of a cause row and an effect column establishes a relationship between the cause and the effect. Figure 14 – CEMPLE (Cause and Effect Matrix Programming Language Editor) 3–28 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development User Documents This section explains how to create and specify user documents that include programs, functions, function blocks, and data types. The topics included are: • Creating a User Document • Copying User or Library Documents • Specifying Document Summary Information • Specifying Document Attributes • Restricting Access to a Document • Changing a Document Owner Note: If you are trying to edit a user document created by another user, and are unable to do so even when you have the correct user level and access privileges, check the document’s access property. If it is locked, you must ask the user who created the document to change the access property. Refer to Restricting Access to a Document. Creating a User Document You can create a new user document. A user document can be a program, function, function block, or data type. Copying User or Library Documents You can make copies of user documents you have created, as well as library documents. This can help you reduce development time by using an existing document as the basis for a new document. Note: Using the Print All command, you can print a report listing all the user documents you have created in a project (User Documents). Specifying Document Summary Information Use the Document Properties dialog box to specify summary information for a document. Specifying Document Attributes Use the Attributes tab to specify document attributes, which include the type of application the document can be used in and whether the document can be used in a CEM program. Restricting Access to a Document Use the Summary tab to restrict access to a document by setting the Access property. The most restrictive setting is for Read, which means anyone with a lower security level than your own cannot change it. The least restrictive setting is for Read/Write, which means all users can read and change the document. You can also Lock the document to prevent editing by unauthorized users. To change the setting for this property, you must have a 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–29 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide User Security level that includes Change Access Attributes. For more information, refer to Restricting Access to a Document. Changing a Document Owner This procedure explains how to change the owner of a document, which determines whether other users can change the element. Normally, the owner of a document is the user who created it. To change the setting for this property, your user security level must: • Include the elements: Change Access Attributes privilege. • Be the same or greater than the security level of the user you want to assign as owner. 3–30 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Lab 7 : Using the User Documents Introduction In this lab, you will create and specify user documents. Objectives After completing this lab, you will be able to: • Create a user document. • Copy a user document. • Specify document summary information. • Specify document attributes. • Restrict access to a document. • Change a document owner. Lab Procedure Create a User Document 1. Expand the Application tree, right-click the User Documents folder, and then click New Document. 2. In the New Document dialog box, in the Name field, enter a descriptive name for the document. 3. In the Document Type area, click the type of document to create. 4. In the Language area, click the language type to use. 5. In the Application Type area, click the type of application the document is to be used in. 6. Click OK. 3–31 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide The document is opened in the specified programming language. Copy a User Document 7. Expand the Application tree, right-click the document to be copied, and then click Copy. If the document is opened in TriStation 1131, the Copy command will be unavailable. Close the document, and then repeat the previous step. 8. On the Edit menu, click Paste. 9. Enter the name for the new document, and then click OK. Specify Document Summary Information 10. Expand the Application tree, right-click a document (program, function, function block, or data type), and then click Properties. 11. On the Summary tab, check the following properties: Name: Displays the name of the document and version number. Internal ID: Displays an internal number used to identify the document. Owned by: Displays the name of the owner. To change, click Change Owner. Created: Displays the date and time the document was created. Modified: Displays the date and time the document was last modified. Compiled:Displays the date and time the document was last compiled. 12. In the Category field, enter a name to be used to categorize the document. Documents can be organized and displayed by categories. 13. In the Description field, enter a description for the document. 14. In the Document Access field, select the type of access to allow for this document. The default is Read/Write. 15. Click Change Owner to change the owner of this document. 3–32 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development 16. Click OK to save your changes. Specify Document Attributes 17. Expand the Application tree, right-click a document (program, function, function block, or data type), and then click Properties. 18. Click the Attributes tab. 19. In the Application Type area, specify whether this document can be used in Safety, Control, or Safety and Control applications. The default is Control.. 20. In the Cause Effect Matrix Support area, check the check box for each type that is supported. Specify the number of inputs and outputs, if needed. Only available for functions and function blocks. 21. Check the Enable Color Monitoring check box, if you want a color displayed for BOOL inputs and outputs when the application is run on the controller or Emulator. Only available for programs written in FBD, LD, or CEM. 3–33 22. Click OK to save your changes. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Restrict Access to a Document 23. Expand the Application tree, right-click a document (program, function, function block, or data type), and then click Properties. 24. On the Summary tab, click the access type for this document. The default value is Read/Write. 25. Click OK to save your changes. Change a Document Owner 26. Expand the Application tree, right-click a document (program, function, function block, or data type), and then click Properties. 27. On the Summary tab, click Change Owner. 28. In the Users dialog box, select the user who is to become owner of this element. 29. Click OK. The Owned By property in the Document Properties dialog box displays the name of the new owner 3–34 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Function Block Diagram and Ladder Diagram Development This section explains how to use Function Block Diagram (FBD) and Ladder Diagram (LD) languages to develop programs, functions, and function blocks. The topics included are: • Using the FBD Editor • Using the LD Editor • Function and Function Block Graphics • Working with Logic Sheets • Specifying Function Block Properties • Using a Space Saver Function Block • Lab 8 : Working with Logic Sheets Using the FBD Editor The Function Block Diagram (FBD) editor, Figure 15, allows you to develop programs and functions by using a graphical language that corresponds to circuit diagrams. Toolbar commands are described in detail in Appendix A, Commands and Properties. Figure 15 – Function Block Diagram (FBD) editor 1 Declaration Tree 6 Insert Output 11 Comment 16 Zoom To Fit Variable Command Tool Command 2 Selection Tools 7 Insert Input Variable 12 Horizontal Network 17 Next Sheet 3 Function Block Command Divider Command Command 8 Tagname 13 Vertical Network 18 Sheet 4 Local Variable 9 Constant Divider Command Manager 5 Input Variable 14 Auto Name 19 Next Sheet Command 10 Wire Tool Command 15 Zoom Command 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–35 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Using the LD Editor The Ladder Diagram (LD) editor, Figure 16, allows you to develop programs and functions by using a graphical language that corresponds to relay logic. Figure 16 – Ladder Diagram (LD) editor 1 Declaration 7 Input 13 Link Command 19 Zoom To Fit Tree Command 8 Local Variable 14 Comment Tool 2 Selection Tools 20 Previous Sheet 9 Insert Output 15 Horizontal Network Command 3 Function Block Command Variable Command Divider Command 21 Sheet Manager 4 Contact 10 Insert Input 16 Vertical Network Command 22 Next Sheet 5 Coil Tool Variable Command Divider Command Command 11 Tagname 17 Auto Name 6 Right Power Command Rail Command 12 Constant 18 Zoom Command 3–36 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Function and Function Block Graphics In FBD and LD languages, Figure 17, each function and function block is graphically represented on the logic sheet. Figure 17 – Function and Function Block Graphics Table 4 shows each function’s name and its description. Table 4 – Function and Description Item Description Instance • Identifies the specific implementation of a name function block type. • For function blocks only. Names of Identify the input and output parameters used with terminals the function block Terminals Locations where variables are attached Evaluation Identifies the order in which the function is order executed in the program Type name Identifies the function block type 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–37 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Working with Logic Sheets Logic sheets are the workspace for developing programs, functions, and function blocks. Four sheet sizes are available; there is no limit to the number of sheets you can have in a program or Specifying Function Block Properties Function blocks must have at least one BOOL input and one BOOL output. All input, output, and local variables in a function block persist from one execution of a function block to the next execution. Consequently, the same function block invoked with the same inputs may not return the same outputs. Any function block previously declared can be used in the declaration of another function block or program. The scope of an instance of a function block is local to the function block or program that declares the instance. The topics included are: • Selecting a Sheet Template • Managing Logic Sheets • Editing the Sheet Title • Printing Logic Sheets Selecting a Sheet Template The sheet template defines the size of the logic sheets used in the selected program, function, or function block. Managing Logic Sheets Use the Sheets Manager button to append, insert, and delete logic sheets in a program, function, or function block. Editing the Sheet Title The sheet title is displayed in the title block, the window caption bar, and the Window Menu list. It does not affect the logic on the sheet. Printing Logic Sheets You can print logic sheets individually, or you can print all logic sheets in a project at once. Specifying Function Block Properties Function blocks must have at least one BOOL input and one BOOL output. All input, output, and local variables in a function block persist from one execution of a function block to the next execution. Consequently, the same function block invoked with the same inputs may not return the same outputs. Any function block previously declared can be used in the declaration of another function block or program. The scope of an instance of a function block is local to the function block or program that declares the instance. 3–38 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Specifying Function Block Application Usage This section explains how to specify the Usage property for function blocks, which determines how the function block is used in a program. You can specify the usage for user-defined function blocks, but you cannot change the settings for TriStation 1131 library function blocks. Using a Space Saver Function Block This section explains how to use a function block as a space saver. The Space Saver setting means a single instance can be executed more than once per scan to reduce memory usage and increase performance. For user-defined function blocks, you can specify this setting. For Triconex Library function blocks, the setting cannot be changed. • Declare only one instance of the function block and use that same instance throughout the program. On a function block diagram, just use the same instance name repeatedly. • To prevent mistakes, connect a value to every function block input. If you forget to connect an input, then you must search for a previous execution of the function block to see the input value because the function block remembers the input value from one execution to the next (if the input is not connected). • Do not use the function block instance more than once on a network (the result is a WG0014 warning because the diagram could be ambiguous). 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–39 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Lab 8 : Working with Logic Sheets Introduction In this lab, you will select, manage, and edit logic sheets. Objectives After completing this lab, you will be able to: • Select a sheet template. • Manage logic sheets. • Edit the sheet title. • Print logic sheets. Lab Procedure Create a New Sheet 1. Expand the Application tree, and then create or open a program, function, or function block. 2. On the Sheets menu, click Select Sheet Template. 3. Select the template you want to use for logic sheets. Note: Logic sheets are oriented in the landscape (horizontal) direction. If you want your logic sheets to be in the portrait (vertical) orientation, be sure to select the _Portrait version of the desired sheet template. 3–40 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development 4. Click OK to save your selection, and then apply the new sheet size to the open program, function, or function block. The new sheet size will also apply to any new programs, functions, or function blocks you create. Manage Logic Sheets 5. Expand the Application tree, and then create or open a program, function, or function block. 6. On the FBD or LD Editor toolbar, click the Sheets Manager button. Perform any of the following actions: a. To add a new sheet after an existing sheet, click the existing sheet, and then click Append. b. In the Enter Sheet Title box, enter the new sheet title, and then click OK. c. To add a new sheet before an existing sheet, click the existing sheet, and then click Insert. d. In the Enter Sheet Title box, enter the new sheet title, and then click OK. e. To delete an existing sheet, select the sheet you want to remove, and then click Delete. You are not asked to confirm the deletion of the sheet. Therefore, ensure you have selected the correct sheet before clicking Delete. f. To change an existing sheet’s title, select the sheet with the title you want to change, and then click Title. In the Enter Sheet Title box, enter the new sheet title, and then click OK g. To view a specific sheet, select the sheet, and then click Go To. h. Click OK to save your changes. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–41 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Edit the Sheet Title 7. Expand the Application tree, and then create or open a program, function, or function block. 8. Use the Previous Sheet and/or Next Sheet buttons on the FBD or LD Editor toolbar to display the sheet with the title you want to change. 9. On the Sheets menu, click Edit Sheet Title. 10. Enter the sheet title, and then click OK. Note: To change the sheet title for multiple sheets without displaying each individual sheet, use the Sheets Manager dialog box. Print Individual Logic Sheets 11. Expand the Application tree, and then create or open a program, function, or function block. 12. Use the Previous Sheet and/or Next Sheet buttons on the FBD or LD Editor toolbar to display the sheet you want to print. 13. On the File menu, select Print. The Print dialog box appears. 14. Select the desired properties for your printer (number of copies, page orientation, and so on), and then click OK. Print Multiple Logic Sheets 15. Open the Project Workspace. 16. On the File menu, select Print All. The Print All Options dialog box appears. 17. Check the check boxes for the following documents: − Functions − Function Blocks − Programs 3–42 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Note: To quickly clear the check boxes for all the documents in the list, and make it easier to select only the documents you want to print, clear the Select All check box. 18. Click OK. The Print dialog box appears. 19. Select the printer you want to use, and the desired settings (number of copies, page orientation, and so forth), and then click OK. Select Library Elements This procedure explains how to select a library element to include in a program or function. TriStation 1131 includes libraries of functions, function blocks, and data types that can be used in a project. Many of these elements include the source code, which can be copied to a program or function. 20. Expand the Application tree, and then create or open a program. 21. On the FBD or LD Editor toolbar, click the Select Function (Block) Tool Element button. 22. In the Select Element dialog box, click the function or function block to be inserted, and then click OK. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–43 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide 23. Click the logic sheet to place the element. To insert another function or function block of the same type, click the Function (Block) Tool, and then click on the logic sheet to place the element. Note: You can easily create your own function by making a copy of an existing library function, and then modifying it to suit your needs. Specify Function Properties 24. Expand the Application tree, and then open a program or function. 25. Double-click the graphic of the function that you want to define the properties for. 26. On the Function tab, in the Number of Inputs area, enter the number of inputs, and then click Apply. If the Number of Inputs fields is enabled, the function is extensible, which means the number of inputs can be changed. 27. To invert the value for a specific BOOL value, click the input, and then check the Invert Input check box. If an input is inverted, the value is changed to the opposite value (True to False, or False to True) when the function is executed. Only available for BOOL inputs. 28. To invert the value for the output, check the Invert Output check box. If an output is inverted, the value is changed to the opposite value (True to False, or False to True) when the function is executed. Only available for BOOL outputs. 29. In the Width area, Click + or – to increase or decrease the width of the selected function graphic on the logic sheet. 30. In the Terminals area, to include an input and output parameter that detects errors in FBD and LD logic, check the EN/ENO check box. 3–44 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development 31. Check the Double Space check box to have space in the function graphic on the logic sheet doubled between the inputs and outputs. Specify Function Block Properties 32. Expand the Application tree, and then open a program or function block. 33. Double-click the graphic of the function block that you want to define the properties for. 34. On the Function Block tab, in the Instance Name field, enter a name for this specific implementation of the function block. 35. To invert the value for a specific BOOL value, click the input or output, and then check the Invert Input/Output check box. If an input or output is inverted, the value is changed to the opposite value (True to False, or False to True) when the function is executed. Only available for BOOL inputs. 36. In the Width area, click + or – to increase or decrease the width of the selected function block graphic on the logic sheet. 37. Check the Double Space check box to have space in the function block graphic on the logic sheet doubled between the inputs and outputs. Specify Function Block Application Usage 38. Expand the Application tree, and then expand the User Documents folder. 39. Right-click a function block, click Properties, and then click the Usage tab. 40. On the Usage tab, click one of the following options: − Space Saver : Use when a single instance can be executed more than once per scan to reduce memory usage and increase performance. For more information on specific requirements for using a function block as a space saver, refer to Using a Space Saver Function Block. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–45 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide − Exactly Once : Use when each instance should be executed exactly once per scan − Only Once : Use when each instance should be executed only once per scan, but does not need to be executed every scan − Internal State : Use when a single instance can be executed more than once per scan 41. Click OK to save your selection. 3–46 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Variables and Constants This section explains how to create variables and constants in FBD, LD, and CEM languages. For information on tagnames (global variables), refer to Tagnames. The maximum number of user-defined tagnames and variables in a program is 2,000. Note: Using the Print All command, you can print a report listing all the variables currently defined in your project (Program Variable Listing). The topics included are: • • Specifying Constant Annotation Properties • Declaring Variables. • Specifying Variable Properties • Specifying Variable Annotation Properties • Naming Multiple Variables • Changing Multiple Variables • Viewing the Number of Variables and Tagnames in a Program • Creating Constants • Specifying Constant Annotation Properties Declaring Variables Use the Declaration tab to declare input, output, in/out, and local variables in FBD, LD, and CEM languages. Variables store values and must be declared in order to be used in a program or function. Specifying Variable Properties Use the Variables tab to specify properties for variables. Properties affect the selected occurrence of the variable. For example, when you add an annotation to a variable, it affects only the selected variable. Specifying Variable Annotation Properties Use the Annotation tab to specify text and macros to be included with an annotation. Annotations are available only in FBD and LD programs. Naming Multiple Variables Use the Automatic Naming dialog box to name multiple variables by specifying a format. Variables can be named by row, column, and selection order. The variables must exist before they can be named. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–47 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Changing Multiple Variables Use the Item Properties dialog box to change size and annotation settings for multiple variables on a logic sheet. Viewing the Number of Variables and Tagnames in a Program The maximum number of user-defined variables and tagnames in a program is 2,000 (not including undeclared tagnames), Table 5. If you exceed this limit, you will be unable to build your application. You can view the number of user-defined variables and tagnames in each program when you compile your application. The number of each type of variable (including tagnames) and the total user-defined variable count are displayed in the Messages View during the compile process: Table 5 – Variables and Tagnames Variable Type Name Input VAR_INPUT Output VAR_OUTPUT Input/Output VAR_IN_OUT Local VAR Global VAR_EXTERNAL Creating Constants Use the Constant tab to create constants in FBD, LD, and CEM languages. A constant is a value that can be used in a program or function. Specifying Constant Annotation Properties Use the Annotation tab to specify text and macros to be included with a constant annotation. This can be used only in FBD and LD development. 3–48 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved

Participant Guide Application Development Lab 9 : Creating Variables and Constants Introduction In this lab, you will create variables and constants in FBD, LD, and CEM languages. Objectives After completing this lab, you will be able to: • Declare variables. • Specify variable properties. • Specify variable annotation properties. • Name multiple variables. • Change multiple variables. • View the number of variables and tagnames in a program. • Create constants. • Specify constant annotation properties. Labs Procedure Declare Variables You can create a variable by performing either step 1 or step 2: 1. On the toolbar, click the icon for the variable, and then click the logic sheet (FBD or LBD only). 2. On the program or function Declarations tree, right-click the folder for the type of variable to be declared, and then click New Declaration. The Item Properties dialog box for the variable appears. 3. On the Declaration tab, in the Name field, enter a name for the variable. Use only alphanumeric characters and underscores. No symbols or spaces are allowed. 4. In the Data Type field, select a data type. If the variable is dragged to a function terminal, the data type is automatically set to the correct type for the function. User-defined data types (such as arrays, structures, and enumerations that you have defined in structured text) can also be selected as data types in local variable declarations. However, you must successfully compile your user-defined data types before they will appear in the Data Type list. 5. In the Initial Value field, specify a value to be used on the first scan. Must agree with the Data Type. 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 3–49 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved Internal

Application Development Participant Guide Note: Not applicable if you have selected a user-defined data type. 6. In the Description field, enter a description for the variable. 7. In the Var Type area, click the type of variable. − For programs, can be Local only. − For functions, can be Input, Output, In/Out, or Local. Specify Variable Properties 8. Expand the Application tree, and then open a program or function. 9. On the logic sheet, double-click the icon that represents the variable. 10. On the Variable tab, in the Variable Name field, to change the selected variable to a different variable, click the variable name and click Apply. 11. To create a new variable, enter a new name, and then click Apply. 12. To change the name of all the variables with this name, click Declaration, and then change the name of the variable. Note: The Data Type field displays the data type that was set on the Declaration tab. If the variable has not been declared, the Data Type is undefined. 13. In the Width area, Click + or – to increase or decrease the width of the variable icon on the logic sheet. 14. Check the Annotate check box to add an annotation to the variable. The default is cleared. 15. Click Declarations to view the Declaration tab for the variable. For more information, refer to Declare Variables. 16. Click Auto Names to view the Automatic Naming dialog box. Refer to Name Multiple Variables. 17. Click Apply to save your changes. 3–50 8602 Triconex General Purpose (Tri-GP) Configuration and Implementation A.0 Schneider Electric Proprietary and Confidential Information © 2021 Schneider Electric Systems USA, Inc. All Rights Reserved


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook