You are on page 1of 460

PACSystems Programming

GFS-426B
Blank
PACSystems Programming
Topics

What Tasks Will Be Taught in This Class?


Upon completion of this course, the student will be able to:
Describe the PACSystems Software Architecture
Describe the RX3i PACSystems Controller Operation & Components
Utilize the basic functions of Proficy Machine Edition Logic Developer PLC
Create New Machine Edition Projects
Configure and work with RX3i PACSystems Controllers
Utilize programming guidelines for developing robust control applications
Understand and effectively use the different types of PACSystems Variables
Use UDFBs to build structured applications
Effectively use the Machine Edition Toolchest as a repository for Application Building Blocks
Create, Monitor, and Modify running PACSystems applications
Develop application components using Structured Text & Function Block Diagram programming
Create application using Application Building Blocks previously developed in the course
Special Features of this Book

TIP!
In the text of some pages, you may find a TIP! Icon. Tips are either reminders or shortcuts to help you
complete a task more efficiently.

Note!
Notes merely call attention to information that is especially significant to understanding the content of
this manual.

Copyright 2011 GE Intelligent Platforms, Inc.


All Rights Reserved

This document is based upon information available at the time of its publication. While efforts have been
made to render accuracy to its content, the information contained herein does not purport to cover all
details or variations in hardware or software, nor to provide for every possible contingency in connection
with installation, operation, and maintenance. Features may be described herein which are not present in
all hardware and software systems. GE Intelligent Platforms, Inc. assumes no obligation of notice to holders
of this document with respect to changes subsequently made.
GE Intelligent Platforms, Inc. makes no representation or warranty, expressed, implied, or statutory with
respect to, and assumes no responsibility for the accuracy, completeness, sufficiency, or usefulness of the
information contained herein.
Proprietary information of GE Intelligent Platforms, Inc. is furnished for customer use only. No other uses are
authorized without written permission of GE Intelligent Platforms, Inc..

* Proficy is a trademark of GE Intelligent Platforms, Inc..


* Microsoft is a trademark of the Microsoft Corporation, Inc.
Table 0:

PACSystems Programming
What Tasks Will Be Taught in This Class? ....................................................................................................................iii
Special Features of this Book ...........................................................................................................................................................iv
Module 1..................................................................................................................................................................................1-1
PACSystems Basics ............................................................................................................................................................1-2
Overview .................................................................................................................................................................................1-2
Introduction to PACs ..........................................................................................................................................................1-2
What is a PAC? ................................................................................................................................................................................. 1-3
The Need for PACs ............................................................................................................................................................................. 1-3
Defining PACs....................................................................................................................................................................................... 1-4
Benefits of PACs.................................................................................................................................................................................. 1-5
The PACSystems Solution .............................................................................................................................................................. 1-6
The PACSystems RX7i and RX3i .................................................................................................................................................. 1-6
PACSystems Software Architecture ...........................................................................................................................1-8
Program Blocks................................................................................................................................................................................... 1-9
Parameterized Blocks ................................................................................................................................................................... 1-10
User Defined Function Blocks ................................................................................................................................................... 1-10
External Blocks ................................................................................................................................................................................. 1-11
When to Use Each Block Type.................................................................................................................................................. 1-11
Programming Languages Overview........................................................................................................................1-12
IEC-61131-3....................................................................................................................................................................................... 1-12
Application Building Blocks..........................................................................................................................................1-13
Object Oriented Programming...................................................................................................................................1-14
Object Oriented Programming using PACSystems User Defined Function Blocks ............................1-15
PACSystems Variables...................................................................................................................................................1-16
Review Questions.............................................................................................................................................................1-17
Review ...................................................................................................................................................................................1-18
Module 2..................................................................................................................................................................................2-1
What is the RX3i?.................................................................................................................................................................2-2
RX3i Components................................................................................................................................................................2-3
Backplane.............................................................................................................................................................................................. 2-3
RX3i CPU................................................................................................................................................................................................. 2-4
Power Supplies.................................................................................................................................................................................... 2-5
Communications ................................................................................................................................................................................ 2-7
Analog I/O.............................................................................................................................................................................................. 2-9
Discrete I/O ........................................................................................................................................................................................ 2-10
Motion Control.................................................................................................................................................................................. 2-11
RX3i Remote I/O............................................................................................................................................................................... 2-12
Hot Standby CPU Redundancy................................................................................................................................................ 2-13
Assembling Rx3i Systems ........................................................................................................................................................... 2-14
What else is needed to make this basic system functional? .................................................................................... 2-18
Lab Exercises......................................................................................................................................................................2-19
Lab Exercise #1: Using InfoLink .................................................................................................................................2-19
Lab Exercise #2: PAC RX3i System Components ..............................................................................................2-20
Review Questions.............................................................................................................................................................2-21
Review ...................................................................................................................................................................................2-22
Module 3..................................................................................................................................................................................3-1
Operating Proficy Machine Edition .............................................................................................................................3-2
Overview .................................................................................................................................................................................3-2
Machine Edition Environment........................................................................................................................................3-2
Machine Edition Key Concepts.................................................................................................................................................... 3-3
Navigator Window ............................................................................................................................................................................ 3-4
Inspector Window.............................................................................................................................................................................. 3-6
Companion Window......................................................................................................................................................................... 3-7
Feedback Zone Window................................................................................................................................................................. 3-7
Data Watch Window ........................................................................................................................................................................ 3-9
InfoViewer Window........................................................................................................................................................................ 3-10
Toolchest Window .......................................................................................................................................................................... 3-11
Machine Edition Editor Windows............................................................................................................................................. 3-12
Machine Edition "Best-Kept Secrets".......................................................................................................................3-13
Right-click, Right-click, Right-click .......................................................................................................................................... 3-13
Get Help............................................................................................................................................................................................... 3-13
Access the Right Tools.................................................................................................................................................................. 3-14
Docking Markers.............................................................................................................................................................................. 3-15
Feedback Zone References........................................................................................................................................................ 3-16
Toggle Force State & I/O State (F11 & F12)......................................................................................................................... 3-16
Smart Lists.......................................................................................................................................................................................... 3-17
Display Fault Tables....................................................................................................................................................................... 3-17
Machine Edition Projects: an Overview ..................................................................................................................3-18
Machine Edition Project Properties ........................................................................................................................................ 3-19
Create a New Project......................................................................................................................................................3-19
Create a New Project Using a Template.............................................................................................................................. 3-20
Create a New Empty Project ..................................................................................................................................................... 3-22
Create a Project from an Existing Project ........................................................................................................................... 3-23
Document a Project....................................................................................................................................................................... 3-24
Lab Exercises......................................................................................................................................................................3-28
Lab Exercise #1: Start Machine Edition ..................................................................................................................3-28
Lab Exercise #2: Apply a Theme ...............................................................................................................................3-30
Lab Exercise #3: Open and View an Existing Project .......................................................................................3-32
Lab Exercise #4: Machine Edition Targets: an Overview ................................................................................3-34
Lab Exercise #5: Add a Target to an Existing Project.......................................................................................3-36
Lab Exercise #6: Rename a Target...........................................................................................................................3-37
Backup, Delete, and Restore a Project ...................................................................................................................3-37
Lab Exercise #7: Backup a Project ...........................................................................................................................3-38
Lab Exercise #8: Destroy a Project...........................................................................................................................3-39
Lab Exercise #9: Restore a Project ...........................................................................................................................3-40
Lab Exercise #10: Delete a Target ............................................................................................................................3-41
Lab Exercise #11: Create a Project...........................................................................................................................3-42
Lab Exercise #12: Project and Target Documentation ...................................................................................3-46
Review Questions.............................................................................................................................................................3-55
Review ...................................................................................................................................................................................3-56
Module 4..................................................................................................................................................................................4-1
Working with PACSystems Variables.........................................................................................................................4-2
Overview .................................................................................................................................................................................4-2
Variable Overview...............................................................................................................................................................4-2
Variable Type ....................................................................................................................................................................................... 4-2
Variable Data Type............................................................................................................................................................................ 4-3
Variable Scope..................................................................................................................................................................................... 4-5
Variable Memory Location ............................................................................................................................................................ 4-6
Variable Access................................................................................................................................................................................... 4-7
Variable List .......................................................................................................................................................................................... 4-8
Variable Attributes............................................................................................................................................................................. 4-8
Variable Usage ..................................................................................................................................................................4-11
Variable Scope...................................................................................................................................................................4-11
Global Scope ..................................................................................................................................................................................... 4-11
Local Scope........................................................................................................................................................................................ 4-12
Variable Descriptions .....................................................................................................................................................4-13
Constants.............................................................................................................................................................................4-14
Mapped Variables ............................................................................................................................................................4-15
Symbolic Variables..........................................................................................................................................................4-15
Symbolic Variables Support....................................................................................................................................................... 4-16
Symbolic Variables Retentiveness.......................................................................................................................................... 4-16
Add Symbolic Variables to your Application ..................................................................................................................... 4-16
I/O Variables .......................................................................................................................................................................4-18
I/O Variable Addresses ................................................................................................................................................................. 4-20
I/O Variable Assignment.............................................................................................................................................................. 4-21
I/O Variables Export/Import....................................................................................................................................................... 4-21
I/O Variable Cut, Copy, and Paste........................................................................................................................................... 4-21
Universal Variables ($)....................................................................................................................................................4-22
Structure Variables..........................................................................................................................................................4-23
Create User Defined Types ........................................................................................................................................................ 4-24
Use Toolchest to Create Structure Data Types................................................................................................................ 4-27
System Variables (#) .......................................................................................................................................................4-30
Alias Variables ...................................................................................................................................................................4-31
Advantages of Alias Variables .................................................................................................................................................. 4-33
Alias Variable Operational Notes ............................................................................................................................................ 4-33
Bit References in Word Variables..............................................................................................................................4-34
Limitations.......................................................................................................................................................................................... 4-35
Indirect References (@) ..................................................................................................................................................4-36
Indirect Reference Assignment................................................................................................................................................ 4-36
Online Display of Indirect References................................................................................................................................... 4-37
Lab Exercises......................................................................................................................................................................4-38
Lab Exercise #1: Mapped Variables.........................................................................................................................4-38
Lab Exercise #2: Symbolic Variables.......................................................................................................................4-44
Lab Exercise #3: Global and Local Variables .......................................................................................................4-45
Global Variables............................................................................................................................................................................... 4-45
Local Variables ................................................................................................................................................................................. 4-45
Use of Global and Local Variables.......................................................................................................................................... 4-45
Alias Variables ...................................................................................................................................................................4-49
Review Questions.............................................................................................................................................................4-54
Review ...................................................................................................................................................................................4-55
Frequently Used PACSystems System Variables ............................................................................................................ 4-56
PACSystems Fault Locating System Variables................................................................................................................. 4-56
Module 5..................................................................................................................................................................................5-1
Working with PACSystems Controllers............... Error! Bookmark not defined.-Error! Bookmark not
defined.
Overview .................................................................................................................................................................................5-2
Overview .................................................................................................................................................................................5-2
Connect to Controller via a Serial Port..................................................................................................................................... 5-2
Connect to Controller via Ethernet............................................................................................................................................ 5-3
Go Online With a Controller .......................................................................................................................................................... 5-6
Validate a Machine Edition Project............................................................................................................................................ 5-7
Validate a Target................................................................................................................................................................................ 5-7
Download to a Controller............................................................................................................................................................... 5-8
Upload From a Controller............................................................................................................................................................... 5-8
Verify Information Between a Project and a Controller .................................................................................................. 5-9
Clear Controller Contents............................................................................................................................................................ 5-11
Work with Fault Tables................................................................................................................................................................. 5-12
View Target Controller Status Information......................................................................................................................... 5-13
Go Offline From a Controller...................................................................................................................................................... 5-14
Hardware Configuration Overview ..........................................................................................................................5-14
Select Rack(s)..................................................................................................................................................................................... 5-14
Select Power Supply...................................................................................................................................................................... 5-15
Select CPU Module ......................................................................................................................................................................... 5-15
Select I/O Modules.......................................................................................................................................................................... 5-15
Select Communications............................................................................................................................................................... 5-15
Select Motion..................................................................................................................................................................................... 5-15
Lab Exercises......................................................................................................................................................................5-16
Lab Exercise #1: Establish an Ethernet Connection .........................................................................................5-16
Status Bar ........................................................................................................................................................................................... 5-17
Controller Status.............................................................................................................................................................................. 5-18
Equality Status ................................................................................................................................................................................. 5-18
Programmer Mode......................................................................................................................................................................... 5-19
Lab Exercise #2: Validate and Download to a Controller...............................................................................5-20
Lab Exercise #3: Upload from a Controller...........................................................................................................5-23
Lab Exercise #4: View Fault Tables ..........................................................................................................................5-24
Lab Exercise #5: View Status Information ............................................................................................................5-27
Access Levels .................................................................................................................................................................................... 5-31
Passwords .......................................................................................................................................................................................... 5-32
Privilege Level Change Requests............................................................................................................................................. 5-32
OEM Protection ................................................................................................................................................................................ 5-32
Lab Exercise #6: Go Offline ..........................................................................................................................................5-33
Hardware Configuration Lab Exercises .................................................................................................................5-34
Lab Exercise #7: Power Supply Configuration ....................................................................................................5-34
Power Consumption ...................................................................................................................................................................... 5-38
Lab Exercise #8: CPU Configuration ........................................................................................................................5-39
Lab Exercise #9: Ethernet Module Configuration ..............................................................................................5-42
I/O Module Configuration .............................................................................................................................................5-46
Lab Exercise #10: Discrete Input Module ..............................................................................................................5-46
Lab Exercise #11: Discrete Output Module ..........................................................................................................5-48
Lab Exercise #12: Add Remaining Modules .........................................................................................................5-49
Lab Exercise #13: Analog Input Data Configuration ........................................................................................5-50
Lab Exercise #14: Hardware Reference View .....................................................................................................5-52
Lab Exercise #15: Correct Configuration Errors .................................................................................................5-53
Lab Exercise #16: Export Hardware Configuration ..........................................................................................5-57
Lab Exercise #17: Import Hardware Configuration..........................................................................................5-58
Lab Exercise #18: Hardware Configuration Report ..........................................................................................5-59
Review Questions.............................................................................................................................................................5-61
Review ...................................................................................................................................................................................5-62
Module 6..................................................................................................................................................................................6-1
Monitoring and Changing Application Logic ... Error! Bookmark not defined.-Error! Bookmark not
defined.
Overview .................................................................................................................................................................................6-2
Overview .................................................................................................................................................................................6-2
Monitor Applications..........................................................................................................................................................6-2
Monitor Logic ....................................................................................................................................................................................... 6-2
Data Watch Lists ................................................................................................................................................................................ 6-3
Reference View Tables .................................................................................................................................................................... 6-3
Data Monitor ........................................................................................................................................................................................ 6-4
Online Application Modification....................................................................................................................................6-4
Word-for-Word Modification........................................................................................................................................................ 6-4
Run Mode Store Modification....................................................................................................................................................... 6-4
Test Edit Modification....................................................................................................................................................................... 6-5
Ladder Diagram Editor Options....................................................................................................................................6-5
Lab Exercises.........................................................................................................................................................................6-6
Lab Exercise #1: Monitor Logic .....................................................................................................................................6-6
Lab Exercise #2: Monitor Variables.............................................................................................................................6-7
Data Watch Lists ................................................................................................................................................................................ 6-7
Reference View Tables .................................................................................................................................................................... 6-9
Data Monitor ..................................................................................................................................................................................... 6-11
Lab Exercise #3: Modify Logic in Running Controller.......................................................................................6-13
Word-for-Word Change .............................................................................................................................................................. 6-13
Test Edit Mode .................................................................................................................................................................................. 6-14
Rung-by-Rung Comparison....................................................................................................................................................... 6-17
Review Questions.............................................................................................................................................................6-20
Review ...................................................................................................................................................................................6-21
Module 7..................................................................................................................................................................................7-1
Using the Proficy Machine Edition Toolchest .. Error! Bookmark not defined.-Error! Bookmark not
defined.
Overview .................................................................................................................................................................................7-2
Overview .................................................................................................................................................................................7-2
Navigating the Toolchest.................................................................................................................................................7-3
Toolchest Drawers............................................................................................................................................................................. 7-4
Practical Toolchest Use ....................................................................................................................................................7-5
Create Application Building Blocks............................................................................................................................................ 7-5
Organize Application Building Blocks....................................................................................................................................... 7-6
Share Toolchest Drawers............................................................................................................................................................... 7-8
Use Toolchest Blocks in Your Application ........................................................................................................................... 7-11
Toolchest Drag-and-Drop Operations.................................................................................................................................. 7-12
Toolchest Block Dependencies................................................................................................................................................. 7-13
Block Update Process ................................................................................................................................................................... 7-14
Lab Exercises......................................................................................................................................................................7-16
Lab Exercise #1: Use the Toolchest Drawer.........................................................................................................7-16
Toolchest Use of Universal Variables "$"............................................................................................................................. 7-19
Review Questions.............................................................................................................................................................7-20
Review ...................................................................................................................................................................................7-21
Module 8..................................................................................................................................................................................8-1
Structured Text Programming............. Error! Bookmark not defined.-Error! Bookmark not defined.
Structured Text Programming.......................................................................................................................................8-2
Overview .................................................................................................................................................................................8-2
Structured Text Benefits...................................................................................................................................................8-2
Structured Text Logic ........................................................................................................................................................8-2
Create Structured Text Blocks.......................................................................................................................................8-4
Structured Text Block Properties..................................................................................................................................8-5
Edit Structured Text............................................................................................................................................................8-5
Help ...........................................................................................................................................................................................8-7
Comments..............................................................................................................................................................................8-8
Structured Text Editor Options......................................................................................................................................8-9
Call Structured Text Blocks ..........................................................................................................................................8-10
Call Controller Built-in Functions...............................................................................................................................8-12
Structured Text Language Reference.....................................................................................................................8-14
Statements......................................................................................................................................................................................... 8-14
Expressions ........................................................................................................................................................................................ 8-14
Operators............................................................................................................................................................................................ 8-14
Operand Types................................................................................................................................................................................. 8-15
Syntax................................................................................................................................................................................................... 8-15
Statement Types ............................................................................................................................................................................. 8-16
Assignment Statement................................................................................................................................................................. 8-17
Function Calls.................................................................................................................................................................................... 8-17
Built-in Functions Supported for Structured Text Calls ................................................................................................ 8-18
Block Types Supported for Structured Text Calls ............................................................................................................ 8-19
Formal Calls verses Informal Calls.......................................................................................................................................... 8-19
Call Built-in Function Blocks....................................................................................................................................................... 8-20
RETURN Statement......................................................................................................................................................................... 8-21
IF Statement ...................................................................................................................................................................................... 8-21
CASE Statement............................................................................................................................................................................... 8-22
FOR Statement ................................................................................................................................................................................. 8-24
WHILE Statement............................................................................................................................................................................ 8-26
REPEAT Statement.......................................................................................................................................................................... 8-27
EXIT Statement................................................................................................................................................................................. 8-28
Lab Exercises......................................................................................................................................................................8-29
Lab Exercise #1: Calculate Tank Volume Block ..................................................................................................8-29
Calc_Tank_Volume Parameterized Block Algorithm ..................................................................................................... 8-29
Create the Calc_Tank_Volume Parameterized Block.................................................................................................... 8-30
Call the Calc_Tank_Volume Block........................................................................................................................................... 8-35
Test Your Work ................................................................................................................................................................................. 8-36
Monitoring Structured Text Logic............................................................................................................................................ 8-42
Lab Exercise #2: Check Tank Alarms Block .........................................................................................................8-43
Check_Tank_Alarms Parameterized Block Algorithm................................................................................................... 8-43
Create the Check_Tank_Alarms Parameterized Block ................................................................................................. 8-44
Lab Exercise #3: Place Blocks in Toolchest ..........................................................................................................8-47
Review Questions.............................................................................................................................................................8-48
Review ...................................................................................................................................................................................8-49
Module 9..................................................................................................................................................................................9-1
Function Block Diagram Programming ............. Error! Bookmark not defined.-Error! Bookmark not
defined.
Overview .................................................................................................................................................................................9-2
Overview .................................................................................................................................................................................9-2
Create FBD Blocks...............................................................................................................................................................9-2
FBD Block Properties .........................................................................................................................................................9-4
FBD Logic ................................................................................................................................................................................9-5
FBD Logic Solve Order.......................................................................................................................................................9-6
Auto - Topmost Precedence Solve Order Example ........................................................................................................... 9-6
Auto - Topmost Precedence Solve Order with Wired Logic Example....................................................................... 9-7
Documenting FBD Logic ..................................................................................................................................................9-8
Title Box .................................................................................................................................................................................................. 9-9
Built-in Functions Supported for FBD Calls...........................................................................................................9-10
FBD Logic Examples........................................................................................................................................................9-11
FBD Logic Data Types ....................................................................................................................................................9-12
Calling Blocks from FBD Logic....................................................................................................................................9-12
Edit FBD Logic ....................................................................................................................................................................9-13
Add Instructions to FBD Logic................................................................................................................................................... 9-13
FBD Editor Insert Instruction Right-click Menu................................................................................................................. 9-13
FBD Instruction Toolchest Drawer.......................................................................................................................................... 9-15
Copy/Paste FBD Instructions .................................................................................................................................................... 9-16
Call Blocks in FBD Logic ............................................................................................................................................................... 9-17
Wire FBD Logic Together............................................................................................................................................................. 9-19
FBD Wires............................................................................................................................................................................................ 9-19
Negative Boolean Flow ................................................................................................................................................................ 9-20
Assign Variables to Inputs and Outputs............................................................................................................................... 9-21
Sample FBD Block ............................................................................................................................................................9-23
Lab Exercises......................................................................................................................................................................9-32
Lab Exercise #1: Calculate Tank Volume Block ..................................................................................................9-32
Calc_Tank_Volume Parameterized Block Algorithm ..................................................................................................... 9-32
Create the Calc_Tank_Volume Parameterized Block.................................................................................................... 9-33
Call the Calc_Tank_Volume Block........................................................................................................................................... 9-41
Test Your Work ................................................................................................................................................................................. 9-42
Monitor Function Block Diagram Logic ................................................................................................................................ 9-45
Lab Exercise #2: Check Tank Alarms Block ..........................................................................................................9-47
Check_Tank_Alarms Parameterized Block Algorithm................................................................................................... 9-47
Create the Check_Tank_Alarms Parameterized Block ................................................................................................. 9-48
Lab Exercise #3: Placing Blocks in Toolchest .................................................................................................................... 9-51
Review Questions.............................................................................................................................................................9-52
Review ...................................................................................................................................................................................9-53
Module 10............................................................................................................................................................................10-1
Programming with User-Defined Function Blocks............................................................................................10-2
Overview ..............................................................................................................................................................................10-2
UDFB Features...................................................................................................................................................................10-3
Create UDFB Instances..................................................................................................................................................10-4
Why Use UDFBs................................................................................................................................................................10-5
Input Parameter, Output Parameters, and Member Variables ...................................................................10-5
How Input Parameter Data moves during UDFB Execution.........................................................................10-6
Pass By Value ................................................................................................................................................................................... 10-6
Pass By Value Result ..................................................................................................................................................................... 10-6
Pass By Constant Reference and Reference..................................................................................................................... 10-7
UDFB Logic Limitations..................................................................................................................................................10-8
Warning 12501: Built-in timers used in a UDFB may operate erratically ........................................................... 10-8
Warning 12510: NTCOIL, PTCOIL, NTCON, and PTCON in a UDFB may not operate as expected .......... 10-8
Implement ACME_Conveyor UDFB ..........................................................................................................................10-9
Lab Exercises................................................................................................................................................................... 10-15
Lab Exercise #1: Use a Pre-defined UDFB.......................................................................................................... 10-15
Lab Exercise #2: Use a UDFB to Create a Tank Object................................................................................. 10-28
Tank Object ......................................................................................................................................................................................10-28
Tank Control Algorithm ..............................................................................................................................................................10-29
Tank State Diagram.....................................................................................................................................................................10-31
Create a Tank UDFB.....................................................................................................................................................................10-32
Review Questions.......................................................................................................................................................... 10-53
Review ................................................................................................................................................................................ 10-54
Module 11............................................................................................................................................................................11-1
Sample Application .........................................................................................................................................................11-2
Overview ..............................................................................................................................................................................11-2
Basic Software Architecture ...................................................................................................................................................... 11-2
Organization Guidelines .............................................................................................................................................................. 11-3
Naming Guidelines ......................................................................................................................................................................... 11-5
Revision Management.................................................................................................................................................................. 11-6
Sample Application Creation..................................................................................................................................................... 11-7
Application Overview......................................................................................................................................................11-9
Application Structure ..................................................................................................................................................................11-11
Material Storage System ........................................................................................................................................... 11-12
Tank Object ......................................................................................................................................................................................11-12
Check_Tank_Alarms Parameterized Block.......................................................................................................................11-12
Check_Tank_Alarms Parameterized Block Algorithm.................................................................................................11-12
Calc_Tank_Volume Parameterized Block .........................................................................................................................11-13
Calc_Tank_Volume Parameterized Block Algorithm ...................................................................................................11-13
Material Mixing System .............................................................................................................................................. 11-14
Mixer Control Algorithm.............................................................................................................................................................11-15
Material Dispensing System..................................................................................................................................... 11-16
Recipe Management System................................................................................................................................... 11-16
Recipe Sequence Chart..............................................................................................................................................................11-17
Batch Sequence Manager ........................................................................................................................................................11-17
Recipe Manager.............................................................................................................................................................................11-20
Validate_Recipe_Requirements Parameterized Block ...............................................................................................11-20
Validate_Recipe_Requirements Parameterized Block Algorithm .........................................................................11-20
Temperature Monitoring System........................................................................................................................... 11-21
Lab Exercises................................................................................................................................................................... 11-22
Lab Exercise #1: Create Sample Project............................................................................................................ 11-22
Lab Exercise #2: Include Logic Blocks from Toolchest................................................................................ 11-22
Lab Exercise #3: Assemble the Sample Application..................................................................................... 11-25
Lab Exercise #4: Download Project to Controller .......................................................................................... 11-25
Lab Exercise #5: Operate the Sample Application ........................................................................................ 11-26
Review Questions.......................................................................................................................................................... 11-27
Review ................................................................................................................................................................................ 11-28
Table 0:

Module 1
PACSystems Basics - Title

PACSystems Basics
Topics

Upon completion of this module, you should be able to:


Understand the automation architectures used today
Describe the PACSystems high-level architecture
Answer the question "What is a "PAC?"
Understand the basic PACSystems software architecture
Understand the types of blocks that can be used to build PACSystems applications
Understand the types of Programming Languages that can be used to program a block of logic
Understand the basic concepts of PACSystems variables.
PACSystems Programming GE Intelligent Platforms

PACSystems Basics

Overview
Welcome to the PACSystems* Programming course featuring PACSystems RX3i Controllers and Proficy
Machine Edition Programming Software. This course provides hands-on experience using the advanced
capabilities of the RX3i controller, including object-oriented programming techniques using User Defined
Function Blocks (UDFBs).
This module will introduce you to the term PAC, to the benefits and advantages of PACs, and to the GE
Intelligent Platforms family of PACSystems controllers.

Introduction to PACs
In order to understand the benefits of PACs, it is useful to understand where PACs fit in the factory
architecture. The architecture used in modern automation systems can be summarized by five tiers or
layers, where the upper layers build upon and interact with the lower layers:

Figure 1: Typical Automation Architecture

PACs are typically used in the Control Tier to perform the control and monitoring functions needed in an
automated process.

1-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

What is a PAC?
The acronym PAC is an industrial term for Programmable Automation Controller. This was first coined in
2002 by Craig Resnick, Director of Research for ARC Advisory Group, as a way to help users of control
hardware better define their needs and to give control hardware vendors a term to more clearly
communicate the capabilities of their products. ARC is generally credited for popularizing this term within
the manufacturing industry.
Since 2003, GE Intelligent Platforms has sustained a steady stream of innovations to the PACSystems
family, introducing two distinct platforms the PACSystems RX3i and RX7i with capabilities built to meet
modern automation needs. By combining new technology with existing hardware systems, the
PACSystems family has provided a seamless migration path for users who have needed to upgrade their
control platforms.
For many years, programmable logic controllers (PLCs) have provided OEMs and end users with a highly
reliable method of control. However, engineers working with PLCs have to plan for generational upgrades
to achieve greater functionality and improve control system communications beyond the plant floor. Now,
a new type of control system called programmable automation controllers (PACs) offers significantly more
flexibility, openness, and performance. PACs allow users to make a leap in capability without
reengineering. Featuring a portable control engine that sits on top of the operating system, PACs also give
users the ability to maximize the benefits of their application first and optimize the automation platform
second.
The innovative PACSystems* family from GE Intelligent Platforms is the controller environment that
provides a leap in performance without the historical burden of migration path and conversion.
PACSystems features a single control engine and universal programming environment as well as portability
across multiple hardware platforms to deliver a true convergence of control choices.
PACSystems is built on open standards with a portable control engine, a single development tool, and a
universal engineering development environment.

The Need for PACs


PLCs have been the control solution of choice for more than three decades, delivering the speed and
reliability necessary in industrial applications, rugged design for demanding plant environments, and
proven performance. However, these controllers are built on proprietary architectures and are designed for
programming and implementation in a specific application. Communication beyond the plant levels of the
enterprise -- the device, control, and supervisory tiers -- can often require a generational upgrade.
In recent years many organizations have sought to integrate disparate plant floor equipment and
networking systems and to connect them to operations and enterprise-level systems and processes. This
level of integration promises many business benefits, including:
Enabling the operational excellence that allows companies to build superior products, improve
profits and grow their business
Combining lean manufacturing with more agile processes to cut waste and respond to market
variability
Strengthening and enhancing core competencies to more clearly define and market the business
Designing and building products at any location to extend the product lifecycle globally
Adopting common, standards-based architectures to keep costs down
Preserving existing assets to help lower capital and maintenance costs.
Traditional control solutions do not allow the level of openness and flexibility required to deliver these
desired benefits, often because numerous platforms and systems must be deployed to automate the entire

GFS-426B 1-3
PACSystems Programming GE Intelligent Platforms

enterprise. Enabling interoperability and information exchange among these pieces of equipment and
systems can be a challenge, if not impossible in some cases.
In this new model, traditional control systems have the following limitations:
Control system implementation may not be fast or easy due to multiple platforms from different
vendors, all requiring different programming for discrete, process, and motion logic
While recognizing the value of implementing the latest automation control technologies, users may
be hesitant to adopt these technologies and products for fear that they will become obsolete
The time and expense to re-engineer an existing system might not be offset by the benefits of the
upgraded systems capabilities
Current automation systems can often have difficulty keeping pace with the need to accommodate
ever-increasing quantities of data
The quantity of development, user, and engineering tools and platforms can be overwhelming,
leading to extensive delays in specifying and implementing automation systems, and incurring
steep training costs
Once it is finally up and running, a specific control system may perform well in one application,
however, successfully adapting it to another one can prove difficult.
Given these limitations, the functionality of PLCs has been expanding during recent years to provide greater
application flexibility and interoperability. However, most PLC manufacturers have not adequately defined
and positioned their controllers in this evolutionary role. Nor have they sought to extend the functionality
of these proven industry workhorses to transform them into more revolutionary solutions until now.

Defining PACs
Powered by a single, portable control engine and using a single development tool for multiple applications,
PACs enable true control convergence and integration of plant floor operations with business systems,
rather than a mere, less-than-seamless connection of disparate parts and pieces. PACs are defined by the
following features and capabilities:

Figure 2: PAC Features & Capabilities

Multi-domain functionality including logic, motion, HMI and process control on a single platform
A common development platform for the design and integration of multi-domain automated
systems

1-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

Allowing OEMs and end users to deploy multiple control applications on a single platform
Facilitating open, modular control architectures that enable highly distributed automated plant
environments
Employing de facto standards for network interfaces, languages, etc., to allow data exchange as
part of networked multi-vendor systems.
While a PAC form factor can be similar to that of a traditional PLC, PAC capabilities are far more
comprehensive. PACs are multi-functional controller platforms that encompass various technologies and
products that users can mix, match, and implement at will. PLCs, on the other hand, are products grounded
in proprietary architectures that are equipped with the capabilities the manufacturer deems necessary.
The primary differentiator between the two is the foundation
upon which each is based. Where PLC capabilities are
grounded in specific hardware and cannot be moved easily
from PLC to PLC, PAC functionality is rooted in its portable
control engine.
Each application interfaces with this engine with few changes
required to move applications from system to system. Since
the engine is separate from the hardware and uses a
common operating system, the platform can grow and
change as rapidly as user needs demand.
From an applications standpoint, traditional PLCs are strong
in discrete control but can be weaker in other areas; users
can develop and implement discrete, process, and motion
control applications from the PAC single platform with equal
agility and reliability.
And, while PLCs are built on proprietary technologies, PACs
make extensive use of Commercial off-the-shelf (COTS)
products and technologies. These technologies:
Help ensure reliability and availability of systems
because hardware and software can be maintained Figure 3: PAC Portable Control Engine
quickly and easily
Reduce system price and downtime because they are
readily available off the shelf
Increase openness, flexibility, and scalability.

Benefits of PACs
A PAC control solution, such as GE Intelligent Platforms PACSystems, delivers the benefits that both plants
and OEMs need, including:
Increasing productivity and operational efficiency
A single portable control engine and universal engineering development environment allows rapid
development, implementation, and migration.
Through its openness and flexibility; it enables true control convergence and seamless integration with
operations and enterprise-level business systems to streamline plant processes.
Reducing operational costs
Employing common, standards-based architectures and networks

GFS-426B 1-5
PACSystems Programming GE Intelligent Platforms

Enabling engineers to choose different system components for a platform that uses cost-effective COTS
rather than proprietary products and technologies
Requiring user training on only one platform and development environment, rather than several
Providing a seamless migration path that protects investments in both I/O and applications development.
Giving users more control and flexibility over their control systems
PACSystems provides users with the flexibility to choose the hardware and programming language that
best suits each particular application
Design upgrades on users own timetables
Design and build products at any location.

The PACSystems Solution


The GE Intelligent Platforms PACSystems family features a control engine that is built on standard
embedded architecture with commercial deterministic operating systems, making the engine portable to
multiple platforms and allowing users to choose the hardware and programming language that best suits
each particular application. The system supports distributed I/O through such standards-based
communications as Ethernet, Profibus, DeviceNet, and Genius* networks.
PACSystems is driven by GE Intelligent Platforms Proficy* Machine Edition development software, which
provides a universal engineering development environment for programming, configuration, and
diagnostics. Users can develop a control program with the easy-to-use Windows-based software and
apply it to the system of their choice. With tag-based programming, a library of reusable code and a test
edit mode for improved Ladder Diagram online troubleshooting, Proficy Machine Edition is a user-friendly
environment that can increase design flexibility and improve engineering efficiency and productivity.
GE Intelligent Platforms PACSystems consists of the following controllers, each of which provides different
application benefits:
The VME64-based RX7i, which supports all standard VME modules, including Series 90-70 I/O and 3rd
party VME modules.
The RX3i, which provides high-speed PCI bus data transfer rates and further extends functionality
supporting Series 90-30 I/O modules.

The PACSystems RX7i and RX3i


The high-performance RX7i was the first release in the GE
Intelligent Platforms PACSystems family. Offering four
times the speed of existing PLC VME backplanes and up to
64 MB of memory usable for programming and
documentation storage, the PACSystems RX7i is VME64
based, supports all standard VME modules (including
Series 90-70 I/O), incorporates industry-leading
embedded systems technology, and uses an Intel Pentium
microprocessor running at up to 1.8 GHz.
The PACSystems RX7i addresses mid-to high-end
applications, with large memory and bandwidth and
distributed I/O to handle all major system requirements.
Figure 4: PACSystems RX7i High-end Controller

1-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

The PACSystems RX3i addresses mid-range applications. The RX3i is affordable, easy to integrate, and
provides freedom in application portability across multiple platforms. The PACSystems RX3i features:
Faster throughput and high speed processor without information bottlenecks using a patented
technology
Dual backplane bus support per module slot:
High-speed, PCI-based for fast throughput of new advanced I/O
Serial backplane for easy migration of existing Series 90-30 I/O
CPU speeds up to 1 GHz with 64 MB of user memory for advanced programming and performance
Users can store logic documentation and machine documentation (Word, Excel, PDF, CAD, and
other files) in the controller to reduce downtime and improve troubleshooting
Open communications support including Ethernet, GENIUS, Profibus, DeviceNet, and Serial
communications
Supports high density discrete I/O, universal analog (Thermocouple, RTD, Strain Gauge, Voltage, and
Current configurable per channel), isolated analog, high-density analog, high-speed counter, and
motion modules
Expanded I/O offering with extended features for faster processing, advanced diagnostics, and a
variety of configurable interrupts
Hot insertion of modules in main RX3i rack
Isolated 24 VDC terminal for I/O modules and grounding bar that reduces user wiring

Figure 5: PACSystems RX3i Mid-range Controller

GFS-426B 1-7
PACSystems Programming GE Intelligent Platforms

PACSystems Software Architecture


The PACSystems controller provides a Structured Software Block Architecture for effective development of
control applications.
Each PACSystems application consists of a set of Logic Blocks used to organize your control program. The
application consists of a main Program Block, named _MAIN, which is executed once each controller scan.
One _MAIN block exists in every PACSystems program.
By default, _MAIN is an LD block.
You can delete it and create an _MAIN block as ST or FBD block.
The _MAIN block may call other blocks to execute the logic functions as you desire.

You may also create and schedule Interrupt Blocks that are triggered either on an I/O event or time
basis .
To assist with commissioning and diagnostics, a Diagnostic Logic Block can be downloaded to the RX3i
Controller and executed without altering the main program logic.
The PACSystems Software Architecture is illustrated below.

Figure 6: PACSystems Software Architecture


The PACSystems controller supports four types of Blocks: Program Block, Parameterized Block, User Defined
Function Block, and External Block.

1-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Block Type Programming Input/Output Basic Operation


Languages Parameters
Program Block Ladder Diagram 0 Inputs Block used to organize the
application into sections or
Structured Text 1 Output (ENO)
components. It has no input or
Function Block Diagram output parameters.
Parameterized Block Ladder Diagram 63 Inputs Block that takes a set of inputs,
performs a function or calculation,
Structured Text 64 Outputs (including ENO)
and then provides a set of results
Function Block Diagram in the outputs.
User Defined Function Ladder Diagram 63 Inputs Re-usable block of logic that is
Block (UDFB) created by a user. This logic block
Structured Text 64 Outputs (including ENO)
has parameters and Instance
Function Block Diagram Internal member variables information that lives over time.
UDFBs are very useful when
implementing Object Oriented
Programming techniques.
External Block C 63 Inputs Block that has been written in the
C Programming Language using
64 Outputs (including ENO)
the C Developers Toolkit.
Table 1: PACsystems Block Types
The maximum number of blocks that an application can have is 512, not including the _MAIN block. When
using a UDFB, even if multiple instances are defined, the UDFB still only counts as 1 block.

Program Blocks
A Program Block is used to organize the application into sections or components. A Program Block has no
input or output parameters. The _MAIN Program Block is automatically defined when you create a
PACSystems target in Logic Developer. When you declare a program block, you must assign it a unique
block name. A program block is automatically configured with no input parameters and one ENO (or OK)
output.
When the controller application is executed, the _MAIN Program Block is automatically called. Other
program blocks execute when called from the program logic in the _MAIN block or another block. In the
following example, if EgdAvailable is ON, the program block named ProcessEGD will be executed:

Figure 7: Example of a Program block call


Program Blocks may be called directly by other blocks and their execution may also be triggered by a
Timed, I/O, or Module Interrupt event.
Ladder Diagram Program Blocks may also be identified as a Diagnostic Logic Block that has customizable
execution properties in the controller scan.

GFS-426B 1-9
PACSystems Programming GE Intelligent Platforms

Parameterized Blocks
A Parameterized Block is a block that takes a set of inputs, performs a function or calculation, and then
provides a set of results in the outputs. A Parameterized Block can be configured with up to 63 input and 64
output parameters.
A parameterized block executes when called from the logic in the _MAIN Block or another block. In the
following example, if LoadEnable is ON, the parameterized block named LOAD_41 will be executed. If the
YO (Ok) output parameter of the LOAD_41 block is set to ON in the logic, power flow will continue to the
Load_41_Active output which will be turned ON.

Figure 8: Example - Parameterized Block Call

User Defined Function Blocks


User Defined Function Blocks (UDFBs) are logic blocks that have parameters and instance (member
variables) data. This block type allows users to define their own function blocks, not being limited to the
standard function blocks provided in the PACSystems instruction set. In many cases, the use of this feature
results in a reduction in total program size.
Once a UDFB is defined, multiple instances of it can be created and executed. Each instance has its own
unique copy of the UDFB Instance Data, which consists of the UDFB internal member variables and all of its
input and output parameters. When a UDFB is called for a given instance, the UDFB logic operates on that
instances copy of data. The values of the instance data are retained from one execution of the UDFB to
the next.
UDFB logic can call all the other types of blocks. In the example of a UDFB call shown below, the Conv_1
instance of the ACME_CONVEYOR UDFB is called if Conv_En is ON.

Figure 9: Example - User Defined Function Block Call

1-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

External Blocks
The PACSystems controller also supports External Blocks that have been written in the C Programming
Language using the PACSystems C Developers Toolkit. External C Blocks provide the ability to program in
the Native language of the PACSystems Controller, which provides high-speed execution of the Block. The
CALL to an External Block looks the same as a call to a Parameterized Block. Below, the
CALC_STANDARD_DEVIATION External Block is called if go_std is ON.

Figure 10: Example - External Block Call

When to Use Each Block Type


The different block types are best suited for various aspects of the control application as follows:
Program Blocks are good for segmenting an application in pieces in order to provide a Logical
Organization. For example, a Program Block could be called by the application on its First Scan,
Last Scan, and then for each application component or step.
Parameterized Blocks are good for application subroutines that:
Pass Parameters In
Perform an operation or calculation
Pass Results Out
Parameterized Blocks are particularly good for mathematical calculations and algorithms.
User Defined Function Blocks are very useful for application segments that have Data or
information that needs to Live-Over-Time, such as PID Loops. UDFBs are good for processes that
have various States and require Internal Data. Finally, UDFBs are the key technology that breaks
an application into re-usable Objects or Application Building Blocks.
External Blocks are often used to create libraries of common functions that need to execute at high
speed or to implement algorithms and calculations that are complex. These blocks can leverage
the power and flexibility of the C programming language. External Blocks are written in the C
Programming Language using the PACSystems C Developers Toolkit. External C Blocks provide
the ability to program in the Native language of the PACSystems Controller, which provides high-
speed execution of the Block.

GFS-426B 1-11
PACSystems Programming GE Intelligent Platforms

Programming Languages Overview


IEC-61131-3
IEC 61131-3 is an international standard first published in December 1993 by the IEC. This standard defines
two graphical and two textual controller programming language standards. In the examples below, each
programming language indicates how it would solve the expression "TagC equals TagA and Not TagB".

Graphical Textual
Ladder Diagram (LD) Structured Text (ST)

Function Block Diagram (FBD) Instruction List (IL)

Table 2: IEC Programming Languages Summary


The standard also defines both graphical and textual Sequential Function Chart (SFC) elements to organize
programs for sequential and parallel control processing. An example of an SFC is shown below:

Figure 11: Sequential Function Chart (SFC) example

1-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

The control applications builder, a Systems Control Engineer, for example, should choose which
programming language is best suited for each component of the control application. The following guide
can be used to help the control engineer make that decision.

PACSystems Programming Language


LD ST FBD C
Ease of Application
Better Better Better Good
Development
Portability between different
Good Best Better Good
control platforms
Execution performance Good Better Better Best
Online monitoring Best Better Best Poor
Online changes Best Better Better Poor
Discrete/interlocking logic Best Better Better Good
Calculations & Algorithms Good Best Better Best
Process Control Good Good Best Good
Table 3: Selecting the Best Programming Language

Application Building Blocks


Application Building Blocks are re-usable components, such as a Logic Block or an object defined by a User
Defined Function Block, that may be used to organize and constitute industrial control applications.
The two basic methods to organize an application are to model it as a series of Sequential Components, or
to model it using Machine Components known as Objects.
If the application consists of a set of Sequential Components, it may be composed of a series of sequential
Program Block Calls, such as the following.

Figure 12: Application series of sequential components


Good Application Building Block principles use the following key concepts to result in application logic that
is decoupled from the Hardware, Reference Memory, and other Logic:
User Defined Function Blocks
Symbolic Variable Programming
Local Scope and Member Variables

GFS-426B 1-13
PACSystems Programming GE Intelligent Platforms

Object Oriented Programming


Object Oriented Programming presents an application development paradigm that has been followed in
software development for a considerable time. The basic principles of Object Oriented Programming can
be translated to the development of industrial control applications.
Object Oriented Programming requires thinking of items in terms of Objects and focuses on two aspects
of an Object: Attributes and Behaviors.
Attributes describe what an object IS.
Behaviors describe what an object DOES.
Object Oriented Programming combines these aspects of the Object to describe a single entity.
Attributes are the characteristics of an object, such as:
Physical Description
State
Mode
Status
Behaviors, also know as Methods or Operations, are functions and operations that an Object can perform,
such as:
Initialize
Run
Stop
Calibrate
The benefits of object Oriented Programming are efficiency and productivity. These are realized by using
objects to create Application Building Blocks that increase productivity in the development of control
applications. Another benefit of this strategy is the standardization of application development that
streamlines the amount of time to create control programs.

1-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Object Oriented Programming using PACSystems User Defined


Function Blocks
CSystems UDFBs provide one mechanism that can be used for Object Oriented Programming concepts.
UDFBs provide the basic Application structure. I/O may be passed as parameters to the UDFB to couple
UDFB logic to the real-world devices. An example of modeling an ACME Conveyor object as a UDFB is
shown below:

Name
ACME_Conveyor

Attributes
Direction
Speed
State (Run, Stop)
Status (Ok, Not Ok)

Methods (Operators)
Start
Stop
Change Direction
Reset
Figure 13: Example of ACME Conveyor

If you need ten conveyors in your application, you just create ten instances of the ACME_Conveyor UDFB to
perform this function. Each instance call is tied to the physical devices using the UDFB input and output
parameters.

GFS-426B 1-15
PACSystems Programming GE Intelligent Platforms

PACSystems Variables
When developing control applications, it is very helpful to associate the application information to
Variables that have descriptive names. An application variable is sometimes referred to as a tag. Variables
give meaningful names to the application information making it easy to understand the application. A
Variable is assigned to a data storage location that resides in controller memory.
For example, you could create a variable named BottleCount to store the number of bottles that pass
through a conveyor. Every time a sensor detects a bottle, the application adds 1 to the variable named
BottleCount. Other parts of the application might use BottleCount to perform other operations, such as
stopping the conveyor when a certain number of bottles have been processed.
Some basic Variable facts:
There are three basic Variable Types: Scalar, Array, and Structure.
Each variable element has a defined Data Type that specifies the type of data value that is
contained by the individual variable element.
A Variables Scope may be: Universal, Global, or Local.
Variables may be located in two different types of Memory Locations: Symbolic Memory and
Reference Memory.
A Mapped Variable is assigned to a reference table address such as %I, %Q, or %R.
A Symbolic Variable is located in controller symbolic memory and is accessed by its name.
An I/O Variable is located in controller symbolic memory, assigned to a particular point location of
an I/O Module, and accessed by its name.
An Alias Variable is a Variable that points to another Variable that has been previously defined.
System Variables begin with a # character and are predefined BOOL variables that provide
system status information.
You create, edit, and delete variables using the Variable List tool in Proficy Machine Edition.
Refer to the Working with PACSystems Variables module for more information about Variables.

1-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review Questions
1. What are the elements of modern automation architecture?

2. What does PAC stand for?

3. How does a PAC differ from a PLC?

4. What are the advantages of a PAC?

5. What are the two types of models of PACSystems Controllers? What are their primary differences?

6. Explain the basic PACSystems software architecture?

7. Describe the types of Blocks that can be used in a PACSystems application.

8. What are the strengths of the Ladder Diagram programming language? Function Block Diagram?
Structured Text? C?

9. Describe the benefits of Object Oriented Programming?

10. What tools are used to implement Object Oriented Programming in the PACSystems
controller?

GFS-426B 1-17
PACSystems Programming GE Intelligent Platforms

Review
In this module, you learned to:
Understand the automation architectures used today
Describe the PACSystems high-level architecture
Answer the question What is a PAC?
Understand the basic PACSystems software architecture
Understand the types of blocks that can be used to build PACSystems applications
Understand the types of Programming Languages that can be used to program a block of logic
Understand the basic concepts of PACSystems variables.

1-18 GFS-426B
Table 0:

Module 2
New Topic

PACSystems Rx3i Operation &


Components
Topics

Upon completion of this module, you should be able to:


Identify components of an RX3i system
Identify the features of each of these components
Identify the types of I/O Modules available
Identify key specifications for all RX3i CPU models
Demonstrate the tools available in the InfoLink for PLC documentation product
Remove, reinstall, and identify the key features of various RX3i hardware components
PACSystems Programming GE Intelligent Platforms

What is the RX3i?


The PACSystems RX3i controller is the latest addition to the innovative PACSystems family of
Programmable Automation Controllers (PACs). It is the next generation of controller for mid- to high-end
process and discrete applications. Like the rest of the family, the PACSystems RX3i features a single control
engine and universal programming environment to provide application portability across multiple
hardware platforms and deliver a true convergence of control choices. Using the same control engine as
the PACSystems RX7i, the PACSystems RX3i offers a high level of automation functionality in a compact,
cost-effective package. The PACSystems portable control engine provides high performance on several
different platforms, allowing OEMs and end users with application variability to choose the exact control
system hardware that best suits their needs.
The RX3i controller provides high level functionality in a small, low cost system, featuring the following
benefits:
Combines a high-speed backplane (PCI 27mhz) with the Series 90-30 serial bus
300 MHz, 600 MHz, and 1 GHz CPUs
Eliminates information bottlenecks, allowing for fast throughput
Supports RX3i and Series 90-30 I/O Modules
High capacity power supplies and supports multiple supplies for extra power or redundancy
Uses the same Engine as the RX7i, allowing for easy program transportability
The RX3i also allows the user more flexibility in I/O configuration, including:
Faster I/O with expanded diagnostics and interrupts
32 pt discrete I/O with high capacity terminal blocks (spring and box style)
Universal analog (configurable per channel for voltage, current, thermocouple, RTD, Strain Gauge
and Resistive)
High density analog (isolated and non- isolated)
PACMotion module for complex, high speed motion applications
Hot insert in the Universal backplane only
User can change modules on own schedule, which allows greater flexibility when updating wiring,
installation, drawings, etc.
High performance Ethernet and communications modules
For additional details on RX3i features and operation, refer to the PACSystems RX3i System Manual, GFK-2314

2-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

RX3i Components
Backplane
Two Universal Backplanes, IC695CHS012 and IC695CHS016, are available for the RX3i: 12 and 16 slots. Each
slot supports both RX3i and Series 90-30 I/O modules (except PCM3xx and CMM301, CMM302, CMM311,
CMM321), and also offer:
Optional fan control terminals built-in to base (Thermal sensor on CPU and Power Supply)
Expansion via legacy rack (optional module)
When used with a DC Power Supply (which occupies one slot), the 16-slot baseplate can accommodate up
to 13 I/O and optional modules. The 12-slot can accommodate up to 9. The RX3i CPU occupies two module
slots.
The RX3i base supports both the PCI and the serial bus. Each slot has two connectors, a PCI connector and
a serial connector. A PCI Bus provides 250 times the performance of the serial bus. Serial bus (1MHz) data
transfer rate is 0.062 Mbyte/sec vs. the PCI (27MHz), which is 27.0 Mbyte/sec. Therefore with the PCI,
Ethernet and other intelligent modules have data throughput improvement of up to 70% on PCI bus.

Backplane features:
PCI Connector
Connector for Isolated 24VDC and External Optional Fan Control
Grounding Bar for I/O. Reduced wiring
Series 90-30 I/O Connector
Expansion Racks
The backplane supports hot insertion for both RX3i and Series 90-30 modules, and also supports I/O
interrupts.

GFS-426B 2-3
PACSystems Programming GE Intelligent Platforms

RX3i CPU
The RX3i CPU has several modules including IC695CPU310 and IC695CPU320 that support for 32K inputs,
32K outputs, 32K analog inputs, 32K analog outputs and up to 64 Megabytes of data storage
(IC695CPU320). The controller user memory is fully configurable, which means you can store all your
machine documentation in the CPU.
The CPU supports multiple programming languages:
Ladder Diagram (LD)
C Programming
Function Block Diagram (FBD)
Structured Text (ST)
Other CPU features that simply application development:
Symbolic Programming
User Defined Function Blocks (UDFBs)
There are two serial ports, one RS-232 and one RS-485 port,
supporting break-free SNP slave, serial read/write, and Modbus
Slave.
The CPU has a three-position switch: Run, Run Disabled, Stop,
and a built-in thermal sensor (warm and hot bit).
The diagnostic LEDs display the following:
CPU OK
Run
Outputs Enabled
I/O Force
Battery
System Fault
COM1 and COM2 Port activity

Figure 1: RX3i CPU

For additional details on CPU features and operation, refer to the PACSystems RX3i CPU Reference Manual,
GFK-2222B.

2-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

Power Supplies
There are two types of 40-watt power supplies available on the RX3i:
120/240VAC (125VDC) Double-wide module,
IC695PSA140 and IC695PSA040.
24VDC Single-width module, IC695PSD140
and IC695PSD040.
Power supplies are equipped with thermal sensors,
and their wiring terminals are doubled for daisy
chain wiring. The On/Off switch is located behind
the door. Both types of power supplies support hot
insertion which is effective if there are multiple
supplies in the rack and either supply can handle
the entire racks power requirements.
The backplane supports multiple power supplies for
more capacity or redundancy. The multi-functional
power supplies contain load sharing circuitry to
enable multiple power supply modules to exist on a
single backplane for additional capacity or to
provide power supply redundancy.

Figure 2: Power Supplies (AC & DC)

GFS-426B 2-5
PACSystems Programming GE Intelligent Platforms

The PSA040 is used in this example. The diagnostic LEDs


display the following:
Power (Green/Amber). When this LED is green, it
indicates power is being supplied to the
backplane. When this LED is amber, power is
applied to the Power Supply but the Power
Supply switch is off.
P/S Fault (Red). When this LED is lit, it indicates the
Power Supply has failed and is no longer
supplying sufficient voltage to the backplane.
Over Temperature (Amber). When this LED is lit, it
indicates the Power Supply is near or exceeding
its maximum operating temperature.
Overload (Amber). When this LED is lit, it indicates
the Power Supply is near or exceeding its
maximum output capability on at least one of its
outputs.
The CPU Fault Table shows a fault if any over temperature,
Overload, or P/S Fault occurs.

Figure 3: RX3i PSA040

On/Off Switch
The ON/OFF switch is located behind the door on the front of the module. The switch controls the operation
of the outputs of the supply. It does NOT interrupt line power. Projecting tabs next to the switch help
prevent accidentally turning it on or off.

Wiring Terminals
Terminals for power and ground accept individual 14 to 22 AWG wires.

Over Current Protection


The 5.1 VDC output is electronically limited to 7 Amps. The 3.3 VDC output is limited to10 Amps. If an
overload (including short circuits) occurs, it is sensed internally and the Power Supply shuts down. The
Power Supply continually tries to restart until the overload condition is removed. An internal, non-
reparable, fuse in the input line is provided as a backup. The Power Supply usually shuts down before the
fuse blows. The fuse also protects against internal supply faults. The CPU Fault Table shows a fault if any
over temperature, overload, or P/S Fault occurs. There is no additional indication if the Power Supply fuse
blows.
For Power Supply details, refer to the PACSystems RX3i Systems Manual, GFK-2314.

2-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Communications
The RX3i controller supports Ethernet, Fieldbus, and Serial communications.

RX3i Ethernet Module


The RX3i Ethernet module provides an Ethernet connection for
communications with other controllers and supervisory HMIs.
The RX3i Ethernet module, IC695ETM001, is 10/100 Mbits Half/Full
duplex, which supports SRTP, EGD, and Modbus TCP.
The built-in switch reduces hardware cost, and the Ethernet ports
are recessed to protect wiring.
LED diagnostics display the status of the following:
Ethernet OK
LAN OK
Log Status
The LEDs on the Ethernet ports indicate network speed and port
activity.
The RX3i Ethernet module also supports Redundant IP Address
operation.

Figure 4: Ethernet Module

GFS-426B 2-7
PACSystems Programming GE Intelligent Platforms

Fieldbus Connections
Support for the RX3i includes the following Fieldbusses.
Profibus DP
DeviceNet
Genius Bus

Figure 5: Profibus Module

Serial Communications
The Serial Communications module is available in 2 and 4 port modules for interfacing to external serial
devices. Port 1 on the module may be used for firmware upgrades.
The Communications Module Ports can each be configured for the following protocol modes:
Disabled: Port is disabled.
Serial I/O: Port used for serial I/O.
MODBUS Master: Port is used as a Modbus Master.
MODBUS Slave: Port is used as a Modbus Slave.
CCM Slave: Port is used as a CCM Slave.
DNP3 Master: Port is used as a DNP3 Master.
DNP3 Slave: Port is used as a DNP3 Slave.
When the CMM002/4 module is configured for DNP3, only DNP3 is available on all ports.
For additional details on Communications Module features and operation, refer to the PACSystems RX3i
Systems Manual, GFK-2314.

2-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Analog I/O
RX3i supports high performance Analog I/O with 16 bit resolution.
Selective input modules support the following features:
Fast integration time 0 to 500 msec per module (except
Universal)
Generate Interrupts
Four level alarms Low, Low/Low, High, High/High
Extensive diagnostics Open wire, Under/Over Range,
and Rate of Change
Analog input ranges
Voltage: +50 mV,+150 mV,05 V,15 V,010 V,+10 V
Current: 0 to 20 mA, 4 to 20 mA, 20 mA
Thermocouple Inputs: B, C, E, J, K, N, R, S, T;
RTD Inputs: PT 385/916,N 618/672,NiFe 518, CU 426
Resistance Inputs: 0 to 250/500/1000/2000/3000/ 4000
Ohms
All output modules support:
Extensive diagnostics Under/Over Range, and Clamp
Limit
Ramp Rate control
Analog output ranges
Current : 0 to 20 mA, 4 to 20 mA
Voltage: +/- 10V, 0 to 10 V
Figure 6: Analog I/O Module

Universal Analog Module


Eight configurable channels supporting Thermocouple, RTD, Voltage, Current, Strain Gauge,
Resistive and more per channel.
Two isolated groups of four
lt-in cold junction compensation
Advanced diagnostics

GFS-426B 2-9
PACSystems Programming GE Intelligent Platforms

Discrete I/O
RX3i offers a wide range of Discrete I/O modules, including the following types:

32 point, 12/24VDC Input


32 point, 24VDC with ESCP (0.75 Amp) protection self healing with
point level diagnostics sent to CPU
Each point has a bi-colored LED, (amber when the point has a short)
24 Point, 2 Amp Relay Out
32 Point, 120VAC In
16 Point, 4 Amp Isolated Relay Out
16 Point, 120VAC Isolated Input
16 Point, 120VAC Isolated Output

Figure 7: Discrete I/O Module

IC694 modules are compatible with the RX3i serial bus in Universal Backplanes and RX3i Serial Expansion
Backplanes.
A wide range of discrete, analog, and special-purpose IC694 modules is available; refer to the PACSystems
RX3i Systems Manual, GFK-2314, for more details.

2-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

Motion Control
GE Intelligent Platforms has a full range of motion control system solutions, from simple to complex
machine control.

PACMotion
The PACMotion controller is a versatile servo motion
controller that combines the benefits of a highly integrated
motion and machine logic solution with the performance,
flexibility, and scalability required for advanced machine
automation.
PACMotion is designed to deliver unsurpassed machine
productivity required for todays high-speed machines and
lean manufacturing environments.
The 4-axis servo motion controller is built on a high
performance hardware platform, with a new enhanced
motion engine, and open standard integrated programming
paradigm.
Add world class FANUC servos to have a motion system Figure 8: RX3i PACMotion Solution
designed to give the best productivity and accuracy possible.

Each PACMotion module can control up to 4 axes of Fanuc ai, aHVi, or HVi servos via a fiber optic interface
for superior noise immunity. GE Intelligent Platforms provides a complete integrated machine control
solution. For additional details on Motion Control features and operation, refer to the Motion Solutions
Product Catalog, GFA-483.

Figure 9: PACMotion System Configuration

GFS-426B 2-11
PACSystems Programming GE Intelligent Platforms

RX3i Remote I/O


RX3i supports the RX3i Ethernet Network Interface Unit for RX3i and Series 90-30 Expansion I/O:
10/100Mbits Ethernet
connectivity
Built-in switch enables the
bases to be easily daisy
chained to the next base
without external switch
Inexpensive CPU redundancy
for PAC
Inexpensive local expansion
Supports a wide variety of
RX3i and Series 90-30 I/O

Figure 10: RX3i Remote I/O System Configuration

2-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

Hot Standby CPU Redundancy


Hot Standby CPU Redundancy allows a critical application or process to continue operating if a failure
occurs in any single component. A Hot Standby system uses two CPUs; an active unit that actively controls
the process, and a backup unit that is synchronized with the active unit and can take over the process if it
becomes necessary. The two units are synchronized when both are in Run Mode, the backup unit has
received the latest status and synchronization information from the active unit via a redundancy link, and
both are running their logic solution in parallel.
Each unit must have a redundancy CPU and one or two Redundancy Memory Xchange (RMX) modules. The
redundancy communication paths are provided by one or two pairs of RMX modules.
Control automatically switches to the backup unit when a failure is detected in the active unit. You can
initiate a switch of control by activating a toggle switch on the RMX module or activating a service request
in the application program. When a user-initiated switch of Control occurs, the CPUs switch roles; the active
unit becomes the backup unit and the backup unit becomes active.

Figure 11: High Availability Redundancy with RX3i Remote I/O


For additional details on Hot Standby CPU Redundancy features and operation, refer to the PACSystems Hot
Standby CPU Redundancy Users Manual, GFK-2308F.

GFS-426B 2-13
PACSystems Programming GE Intelligent Platforms

Assembling Rx3i Systems


Universal Backplanes
Mount a Universal Backplane using four high quality, 8-32 x 1/2 (4 x 12mm) machine screws, lock washers
and flat washers. Install the screws in the four holes.

Figure 12: Assembling universal backplane


IC695 Power Supply modules may be installed in any slot except the last slot (Slot 12). DC Power
Supplies IC695PSD040 and IC695PSD140 occupy 1 slot. AC Power Supplies IC695PSA040 and
IC695PSA140 occupy 2 slots. RX3i (IC694) and Series 90-30 (IC693) Power Supplies cannot be
installed in Universal Backplanes.
An RX3i CPU module can be installed anywhere in the backplane except the Expansion slot. The
CPU modules occupy 2 slots.
I/O and option modules can be installed in any available slot except slot 0, which can only accept
IC695 Power Supplies, and the Expansion slot. Each I/O slot has two connectors, so either an RX3i
PCI-based module or a serial module can be installed in any I/O slot.
The rightmost slot is the expansion slot. It can only be used for optional Serial Bus Transmitter
module IC695LRE001.

2-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Universal Backplane Terminals (TB1)


Terminals 1 through 6 on the left end of the
Universal Backplane are reserved for external
fan control.
The RX3i PCI Power Supplies do not provide
Isolated +24V output power over the
backplane. Terminals 7 and 8 can be used to
connect an optional external source of Isolated
+24VDC, which is required for some IC693 and
IC694 modules.
These terminals accept individual wires from
14 to 22 AWG.
If modules that require Isolated +24VDC are
installed in an Expansion Backplane, an
external Isolated +24V power supply is not
required.

Figure 13: Assembling universal backplane terminals

Hot Insertion and Removal


Modules in a Universal Backplane (IC695CHS012 or CHS016) can be installed or removed while power is
applied to the system. This includes backplane power and field power supplied to the module.

Note
For products that support hot insertion, the module must be properly seated on the carrier with the latch
engaged and all pins connected within two seconds. For removal, the module must be completely
disengaged from the carrier within two seconds. It is important that the module not remain partially
inserted during the insertion or removal process. There must be at a minimum of two seconds between
the removal and insertion of modules.

Note
The CPUs, IC695CPU310 and IC695CPU320, cannot be installed or removed from a Universal Backplane
while power is applied to system. System power must be removed before installing or removing the CPU.

GFS-426B 2-15
PACSystems Programming GE Intelligent Platforms

Installing Modules
1. Be sure the module catalog number matches
the intended slot configuration.
2. Holding the module firmly, align the module
with the correct slot and connector.
3. Engage the rear pivot hook(s) in the notch(es) on
the top of the backplane.
4. Swing the module down (2) until the module
connector engages the backplane connector.
5. The release lever(s) on the bottom of the module
snaps into place in the bottom module retainer.
6. Visually inspect the module to be sure it is
properly seated.

Figure 14: Inserting Modules

Removing Modules
If the module has a removable terminal board, remove it as described later.
1. Locate the release lever(s) at the bottom of the
module and firmly press upward, toward the
module. Wider modules have two release levers
that must both be pressed up at the same time.
2. While holding the module firmly and fully
depressing the release lever(s), pivot the module
upward until its connector is out of the backplane.
3. Lift the module up and away from the backplane
to disengage the pivot hook.

Figure 15: Removing Modules

2-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

CPU
1. Make sure that rack power is off.
2. Install the CPU module in the appropriate
slot. The CPU requires two slots and can
use any slots except the highest
numbered (rightmost) slot.
Turn on power. The module should power
up. When the CPU has successfully
completed initialization, the OK LED stays
on and the RUN and EN LEDs are off. The
CPU is now ready to be programmed.
3. Connect the battery to either of the
battery connectors on the module. You
can connect the battery at any step in the
installation process but it will begin to
drain immediately unless power is applied.
To maximize battery life, install it after
power has been turned on.
4. If appropriate, communications cables can
be secured to the tie-downs on the bottom
of the module.

Figure 16: Installing the CPU

After the program has been verified, the mode switch can be moved to the appropriate operation mode
position: RUN I/O ENABLED, RUN OUTPUT DISABLE, or STOP. The LEDs indicate the position of the mode
switch and status of serial port activity.

Note
The CPU module may NOT be hot-inserted in the backplane; power must be removed before installing or
removing the CPU.

GFS-426B 2-17
PACSystems Programming GE Intelligent Platforms

Power Supply
1. Install the Power Supply module in the appropriate slot. AC
supplies (IC695PSA040 and IC695PSA140) require two slots.
DC supplies (IC695PSD040 and IC695PSD140) require one slot.
2. Universal Power Supplies (IC695) can be installed in any slots
except the highest numbered (rightmost) slot in a Universal
Backplane. Expansion Power Supplies (IC694) must be
installed in the Power Supply (leftmost) slot in an Expansion
Backplane.
3. Connect wiring to the Power Supply as described below.
4. Use the three wiring tie-downs on the bottom of the module
to secure the power and ground wires after installation.

Figure 17: Installing Power Supply

Note
For all Power Supplies, if the same input power source is used to provide power to two or more power
supplies in the system, connection polarity must be identical at each power supply. A resulting
difference in potential can injure personnel or cause damage to equipment. Also, each backplane must
be connected to a common system ground.

What else is needed to make this basic system functional?


To make this basic system functional, you need:
Wiring: This includes properly installed incoming power to the power supply, as well as wiring from
the I/O modules to field devices such as switches, sensors, solenoids, relays, etc.
Program: A program is an application for the controller to run. This is developed with the Proficy*
Logic Developer PLC programmer.

2-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercises

Lab Exercise #1: Using InfoLink

1. Place the InfoLink CD1 into your CD drive. Locate the shortcut for InfoLink and double-click the icon
to start InfoLink.
2. From the InfoLink for PLC Main (Home) Page locate the hyperlink for PACSystems RX3i Manuals. (This
hyperlink is shown above).
3. Under the direction of your instructor, locate several topics from the InfoLink for PLC Document Library.

GFS-426B 2-19
PACSystems Programming GE Intelligent Platforms

Lab Exercise #2: PAC RX3i System Components


The purpose of this lab is to become familiar with the individual components of the RX3i system.
1. Locate and remove the PAC RX3i CPU from the rack. Identify the serial ports on the CPU module.
2. When finished, re-install the CPU into the rack.
3. Locate and remove the power supply from the baseplate and identify the following:
On/Off switch
LED indicators
1. When finished, re-install the power supply into the rack.
2. Locate and remove a discrete input module and identify the following:
Module identifier listing the part number
LED indicators
Wiring terminals/connectors
1. When finished re-install the module into the rack.
2. Locate the identifier on the rack.
3. Locate the expansion bus connector on the rack.

2-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review Questions
1. What module is used to interface to expansion racks?

2. What type of modules does RX3i support?

3. In which slots can a power supply module be installed?

4. In which slots can a CPU module be installed?

5. How much RAM memory does an Rx3i CPU have?

6. What communication ports are available on the Rx3i CPU module?

GFS-426B 2-21
PACSystems Programming GE Intelligent Platforms

Review
In this module, you learned to:
Identify components of a RX3i system
Identify the features of each of these components
Identify the types of I/O Modules available
Identify key specifications for all RX3i CPU models
Demonstrate the tools available in the InfoLink for PLC Documentation product
Remove, reinstall, and identify the key features of various RX3i hardware components

2-22 GFS-426B
Table 0:

Module 3
New Topic

Operating Proficy Machine Edition


Topics

Upon completion of this module, you should be able to:


Describe the Proficy Machine Edition programming environment and the purpose of each of the
tools
Identify the Machine Edition best kept secrets
Define a Project, describe what it contains and describe how to open and view an existing Project
Define a Target, and describe and manipulate the properties of a Target
Add and remove a Target in an existing Project
Backup, delete, and restore a Project
Create and name a new Project
Provide Project documentation
Provide Target documentation
Navigate through the Project
PACSystems Programming GE Intelligent Platforms

Operating Proficy Machine Edition

Overview
Proficy Machine Edition is an environment that contains several software products. Each of these
products is independent. However, each product runs within the same environment. This is much like
having an Office suite of products. The suite may contain a word processor, a spreadsheet program, a
database program, and a graphics presentation program. Each of them can run independently, however,
they all share a common look and feel. The idea behind Machine Edition is exactly the same. Once you
have learned to navigate within this environment, it becomes much simpler to learn a new product that
uses the environment.
In this module you will be learning how to use Logic Developer PLC. This is one of the products that use the
Machine Edition environment.

Machine Edition Environment

Figure 1: Machine Edition Environment

3-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

The Machine Edition user interface contains a powerful set of tools and editors that are useful in application
development. These tools are Navigator, Inspector, Companion, Feedback Zone, Data Watch, InfoViewer,
Toolchest, and Editors.

The Navigator organizes and displays your Project information, showing the list of Projects that you
may use.

The Inspector displays detailed properties of a selected item, such as a block of logic.

The Companion is a dynamic, context-sensitive help window that provides a summary of the
information about the current selected item. Companion has been described as "always having the user
manual open to the right page".

The Feedback Zone displays output information generated by Machine Edition components. For
example, it shows the results of a Project validation, listing any errors and warnings that are encountered.

The Data Watch is a debugging tool that enables you to monitor the values and forces of variables
while working online with a Target.

The InfoViewer doubles as a web browser that is used to display reports and comprehensive help.

The Toolchest contains preconfigured and user-defined objects that can be used to quickly develop
your Machine Edition Projects.
The Editors are the windows where you create and edit your logic and HMI applications.

Machine Edition Key Concepts


The Machine Edition Environment is built around the following key concepts:
Projects: A Machine Edition Project is collection of related Targets and usually constitutes an entire
machines application, including Controller Logic and Machine Level HMI.
Targets: A Machine Edition Target is piece of control equipment, such as PLC, PACSystems Controller,
Machine Level HMI, or Remote I/O Drop.
Dynamic User Interface: The Machine Edition user interface is dynamic such that window contents are
updated based on the users context. For example, the Companion updates with a brief instruction
description when navigating in the LD Editor.
Right-Mouse, Right-Mouse, Right-Mouse: The right-mouse menu displays a list of the operations that may
be performed on the selected item.
Standard Windows Operations: The Machine Edition environment supports the basic Windows operations:
Cut/Copy/Paste
Drag-and-Drop
Ctrl+Drag-and-Drop
Control Short-cut Keys such as Ctrl+C for Copy
Function Keys such as F1 for Help

GFS-426B 3-3
PACSystems Programming GE Intelligent Platforms

Navigator Window
The Navigator allows you to create, organize, and manage Projects. It can also be used to create and
destroy Projects, add Targets and components to Projects, set environment preferences, and manage
Project components such as logic blocks, scripts, and variables.

Figure 2: Navigator Window


The Navigator uses six tabs to organize its information: Options, Utilities, Manager, Project, Variables, and
InfoView. The tabs that are visible depend on whether a Machine Edition Project is open or not. For
example, the Project and Variables components appear only when a Machine Edition Project is open.
Options: contains option and preference settings for the Machine Edition environment.
Utilities: contains useful tools and utilities that work with your Projects. The available utilities depend on
which Machine Edition products are installed.
Manager: lists all the Projects to which you have access. You can use it to create, open, and manage your
Projects. If you have Proficy Change Management installed, this is also the place where you work with
security, version control, and other features of the Proficy Change Management system.
Project: organizes the components that make up your Project. You can use it to navigate around your
Project, and add, delete, and configure your Project items.
Variables: contains all the variables in a Project. You can use it to add, delete, and manipulate variables.
InfoView: contains the table of contents for the Machine Edition Help system. You can use it to get detailed
information on a specific help topic.

3-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

The Navigator contains nodes to represent the different parts of your Project. These nodes appear when
you add components to a Target. Within each component, items are displayed in a tree hierarchy. You can
expand and collapse the hierarchy tree, just like folders in Windows Explorer.
A Machine Edition Project may contain multiple Targets for you to organize your automation solution.
Targets are controllers and machine level HMIs that execute your finished Projects. These devices include
GE Intelligent Platforms Programmable Logic Controllers (PLCs), Programmable Automation Controllers
(PACs), QuickPanels, Remote I/O devices, and Motion controllers on which your finished Project is
downloaded and is executed.

The Navigator may be opened by selecting the Navigator button from the Tools toolbar.

Figure 3: Tools Toolbar

The three top buttons of the Navigator window let you work with an expandable Property
Columns view, which lets you view and manipulate the properties of several items at once.
The property columns appear in an expanded view of the Navigator Variable List tab. Normally, you view
and edit the properties of one item at a time in the Inspector. The property columns let you view and
modify properties of several items at once, much like a spreadsheet. You access the property column
display through the buttons in the top left of the Navigator window:

In the Navigator, click the button to toggle the property column display open and closed.
The property columns appear as a grid. Each cell displays the current value of a property for a specific
variable. A sample of a property column display is:

Figure 4: Machine Edition Property Columns Grid

Tip
You can view and edit the properties of several objects at the same time with the Navigator's property
columns view.

GFS-426B 3-5
PACSystems Programming GE Intelligent Platforms

Inspector Window
The Inspector lists the properties and current settings for a selected object or element. You can edit
these properties directly in the Inspector. When you select several objects, the Inspector window lists their
common properties.

Figure 5: Inspector Window


The Inspector window provides an easy way to view and set the properties for all objects. To open the
Inspector window, do one of the following:
Choose the Inspector item from the Tools menu
Click the Inspector button on the Tools toolbar
Select the objects Properties right-click menu
The left column of the Inspector window displays the properties for the selected object. You can edit and
view property settings in the right column.
Property values that appear in red text are invalid.
Property values that appear in yellow text are technically valid, but may cause problems.
Enumerated properties have a predefined list of settings. You can view the list by clicking the down
arrow at the right of the value field.
When the cursor hovers over an individual property, the Machine Edition Status Line displays the range of
values for that particular property.

3-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Companion Window
The Companion provides useful tips and information while you work. While the Companion is open, it
displays help on whatever item is currently selected in the Machine Edition Environment. This can be an
item or folder in the Navigator, something in a logic editor, or even the currently selected property in the
Inspector.

Figure 6: Companion Window


The Companion help tends to be short and abbreviated. If you need more detailed information, click the
symbol in the top right corner of the Companion window. The related topic in the main help system
will open in the InfoViewer. You may need to scroll to the top of the Companion to see the symbol.
Some Companion help contains a list of subject or procedure headings in a column on the left side. Click a
heading for a brief description of the procedure.

Feedback Zone Window


The Feedback Zone is an interactive window that displays output information generated by Machine
Edition components. The Feedback Zone is available when a Project is open.
Using the Feedback Zone, you can review the results of a Project validation or download with a list of
warning and errors. You can also view the results of logic comparison between the Project and
PACSystems controller. The Feedback Zone also displays the list of recently generated reports and
dynamic cross-references for the selected Variable or Logic Block.
The Feedback Zone is organized into seven tabs. For more information on a specific tab, select the tab and
press F1. If the Feedback Zone is too small to see all the tabs at once, you can scroll through them with the
buttons at the bottom of the tool window.

Figure 7: Feedback Zone Controls


Entries in a Feedback Zone tab may support one or more of the following basic actions:
Right-click: Right-click on an entry to display a menu of available commands.

GFS-426B 3-7
PACSystems Programming GE Intelligent Platforms

Double-click: If an entry supports the double-click action, double-clicking performs the entry's default
action. Examples of default actions include opening an editor and displaying the entry's properties.
F1: If the entry supports context-sensitive help, pressing F1 displays help on the entry in the InfoViewer.
F4: If the entry supports the double-click action, pressing F4 cycles through the entries in the Feedback
Zone as if you double-clicked on each one. To display the previous message in the Feedback Zone, press
Ctrl+Shift+F4.
Selection: Some entries update other tool windows such as Inspector, Companion, or Feedback Zone when
selected. Click on an entry to select it.

Click the Copy button in the Edit toolbar to copy all the information displayed in a Feedback Zone tab to
the Windows Clipboard.
The tabs of Feedback Zone are shown below:

Figure 8: Feedback Zone Tabs

Build: displays the results of a Project validation or a downloaded operation. You can use this tab to locate
any errors that you may have in your Project.
Import: displays a list of errors and warnings from an import operation.
Messages: tracks and displays operations that have been completed within Machine Edition.
Reports: displays a list of all reports generated during the current session.
References: displays a list of all the places in which a selected variable, parameter, or logic block is used in
a Project. It enables you to see a list of all the places the selected item is referenced in your Project.
Compare: lists the differences between the information in the controller and the information in your Project.
This tab is also used to generate a detailed Ladder Diagram differences report for your PACSystems
controller.
Search Results: displays the results of a global search operation.
Pressing the F4 key enables you to cycle through entries in Feedback Zone and navigates to the locations
in your application where the item is used.

3-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Data Watch Window


The Data Watch is a debugging tool that enables you to monitor the values and forces of variables
while working online to a Target. You can monitor individual variables or user-defined lists of variables.
Data Watch Lists can be imported, exported, or saved with a Project.

Figure 9: Data Watch


The Data Watch tool has three tabs:
Static tab: contains all variables that you add to the Data Watch tool yourself.
Auto tab: contains variables currently selected in the Variable List or associated with the currently selected
instruction in ladder logic, up to a maximum of 50 rows.

Watch List tab: contains all variables in the currently selected watch list. A watch list lets you create
and save a list of variables to monitor. You can define one or more watch list(s), however, only one watch
list can be monitored in the Data Watch tool at a time.
Variable Reference Addresses are displayed in the Address column, for example %AQ00010.
Variables Values are displayed in the Value column. To change a value's display format, use the Data
Watch Properties dialog box or right-click on the selected variable.

Note
You cannot change a value's display format once the variable has been added to the Data Watch tool.

Tip
When adding variables to a Watch List, Machine Edition can also identify variables by their Addresses.
That is, in these cases you can also enter the variable's appropriate Address property.

Adding Variables to a Data Watch


To add a variable(s) to a Watch List in the Data Watch tool, click the Static tab or the Watch List tab, and
do one of the following:
In the Variables tab of the Navigator, right-click the variable and choose Watch or type
Ctrl+W.
Drag the variable from the Variables tab of the Navigator (or some other tool) onto the Data
Watch tool.
Drag the selected logic element(s) such as an LD instruction or LD Rung onto the Data Watch tool.
This is a quick mechanism to add several variables to the Data Watch.

GFS-426B 3-9
PACSystems Programming GE Intelligent Platforms

In the Data Watch tool, right-click the entry and choose Insert. Enter the name of the
variable you want to add.
In the Data Watch tool, double-click the entry. Enter the name of the variable you want to
add. Instead of entering the variable's name, you can enter its address or reference address.
If your Project has multiple Targets, you may need to precede the variable name with the Target name and
a period, as in Target1.MyInteger.

InfoViewer Window
The InfoViewer is an embedded browser window that displays topics in the Machine Edition help
system. You work with the InfoViewer just like a web page, clicking hypertext links to navigate through the
desired help topics.

Figure 10: InfoViewer


The InfoViewer is Internet-ready, and help topics may contain a link to an Internet Web site. If so, clicking
the hyperlink will establish the Internet connection. The InfoViewer has its own toolbar that allows you to
navigate in the Help system.

Figure 11: InfoViewer Toolbar

3-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

Button Info Viewer Button Function


Goes back to the last topic viewed (in the history list).
Goes forward one topic (in the history list).
Stops the retrieval of a topic from the Internet.
Refreshes the current topic window.
Goes to the designated (or default) Home Page.
Makes the currently selected page in the InfoViewer the Home Page.
Edits an URL. Click this button to display a dialog box to edit or enter an Internet address.
Table 1: InfoViewer Toolbar Buttons

Toolchest Window
The Toolchest, which is available only while a
Project is open, is a repository of preconfigured and
user-defined object templates that you can use in
your Project. These objects can be as simple as a
single ladder logic instruction or as complex as a
robotic arm object with fully configured ladder logic
and Human-machine Interface (HMI) animation.
By creating your own set of Toolchest objects, you
can create a library of commonly used functions
and graphical objects. These functions and
graphical objects may then be re-used in
applications to accelerate your application
development and reduce the amount of time needed
to develop an application.
The Toolchest is organized as a set of drawers that
may contain a set of objects. Within a drawer, the
Toolchest items are organized into folders. Simple
drag and drop operations are used to use these
objects in your Machine Edition Project.
Toolchest may be opened by selecting this tool from
the Tools toolbar.

Figure 12: Toolchest

The Instructions and View drawers contain simple instructions, functions, and graphical objects. More
complex objects are defined by an fxClass. fxClasses are models of devices and machines that are
controlled or manipulated by your application.

GFS-426B 3-11
PACSystems Programming GE Intelligent Platforms

Machine Edition Editor Windows


Editors are the main windows where you create and edit your application. The two basic types of Editors
available to you are text-based editor for items such as HMI scripts, and graphical editor for items such as
ladder logic. Multiple tabbed Editor Windows may be open at the same time.

Figure 13: Editor Windows


To open an item in the Editor Window, double-click on the item in Navigator, select the items right-mouse
Open menu selection, or simply select the item in the Navigator and press Enter.
You can have multiple Tabbed Editor windows open at the same time. You can switch between editors with
tabs that appear at the top of the editor window. If there are too many tabs to display at once, you can
choose from the currently open editors with the button in the top right corner of the Editor window.
You can move, maximize, minimize, and resize the Editor window just like any other tool. To close the
currently selected editor, click the button on the top right corner of the Editor window.
You can also drag objects, such as variables, logic instructions, and logic rungs, to and from the Editor
window. The allowable drag-and-drop operations depend on the specific editor. For example, dragging a
variable onto an output coil in the Ladder Logic Editor window assigns the variable to that coil. When online
with a controller, Editors are updated with dynamic data from that controller.

3-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

Shortcut keys for Editor Window navigation


While you can navigate through editor windows using the mouse and scroll bars, you may find it easier to
use the following shortcut keys.
Keystroke Action or command
Home Go to the beginning of the line.
End Go to the end of the line.
Ctrl+Home Go to the top of the page or document.
Ctrl+End Go to the bottom of the page or document.
Page Up Scroll up one screen in the page or document.
Page Down Scroll down one screen in the page or document.
Ctrl+Tab Cycle through the currently open editor windows.
F5 Refresh the currently-selected tool or editor window.
Table 2: Shortcut Keys in Editor Window

Machine Edition "Best-Kept Secrets"


There are some Best-Kept Secrets about the Machine Edition development environment that you should
know about. Best-kept secrets are some tips and tricks, which help you in using the software efficiently.

Right-click, Right-click, Right-click


One of the tips and one of the most common ways to
perform a function in Machine Edition is to select an item,
and then press the right-mouse button. Right-clicking on an
item displays a menu of the functions that can be performed
on the selected object. The menu displayed is dynamically
updated depending on the context of your Project.
The right-mouse menu is a quick way to determine the
operations that can be performed on an item. Figure 14: Best-Kept Secret - Right-click

Get Help
Another best-kept secret of the Machine Edition user interface is that it offers multiple ways to access help
information.
Select an item and then press the F1 key for context-sensitive help.
Browse through the Table of Contents in the InfoView tab of the Navigator to seek help.
Perform a full-text search of the help in a separate Viewer window by choosing the Help Search
menu.
Search for keywords using the Help Index menu.
Use the Companion to display a brief description about any item that you select. When
Companion is displayed, select the yellow question mark to display the full help for the selected
item.

GFS-426B 3-13
PACSystems Programming GE Intelligent Platforms

Access additional help on the web. In the Machine Edition Help menu, select GE Intelligent
Platforms on the Web, and then choose Technical Advisor or GE Intelligent Platforms Home
Page.
The status bar at the bottom of the Machine Edition screen displays information on the current status of
Machine Edition.

Figure 15: Best-Kept Secrets - Getting Help

Access the Right Tools


Machine Edition provides two ways to open a tool that is not visible. You can select the tool name on the
Tools menu or you can simply click the tool icon on the Tools toolbar.

Figure 16: Best-Kept Secret - Tools Toolbar

3-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Additionally, if you are not sure of the name of a tool within a toolbar, hover the cursor over the tool button
to display its name in a tool tip.

Docking Markers
Another useful tool is the Docking Marker. If the Show Docking Markers option is enabled, you can use
docking markers to help move and dock a tool to a desired location.
As you drag a dock-able tool, a series of docking markers appear, indicating valid docking locations.
The docking markers appear as a series of large blue arrows. Moving the mouse over a docking marker
allows you to preview how the tool would be docked when using that marker.
These markers dock the tools to the edge of an existing tool or to the main Machine Edition development
environment.
The bottom marker "stacks" the tools over the top of an existing tool, forming a series of tab-docked tools.
You can switch between tab-docked tools by clicking the tabs that appear at the bottom of the tab-docked
windows.
Docking markers appear in the following locations:
In the center of each edge of the Machine Edition environment. These
markers dock the window to the indicated edge of the Machine Edition
window. If a Tool window is already docked to that edge, it will be pushed
further away from the edge to make room for the new Tool.
In the middle of the Tool window that the mouse is currently hovering
over. These markers dock the window alongside or overtop the existing
Tool window.
The triangular markers dock the window to the edge of the
existing Tool window. The existing Tool window's area is divided
in half for each of the existing Tools.
The circular docking marker stacks the Tool windows together to
form a series of "tab-docked" windows. You can then switch
between tab-docked Tools with tabs at the bottom of the
stacked Tool window.

GFS-426B 3-15
PACSystems Programming GE Intelligent Platforms

Feedback Zone References


The References tab displays a list of all the places in which a selected variable, parameter, or logic block is
used in a Project. It enables you to see a list of all the places the selected item is referenced in your Project.
Simply open the Feedback Zone, select the References tab, navigate to and select the item you want to
cross-reference. The usage of that item in the entire Project is now displayed in the Feedback Zone. You
can now press the F4 key to cycle through the Feedback Zone entries, or double-click on a specific entry.
To display the previous reference, press Ctrl+Shift+F4.

Figure 17: Best-Kept Secret - Feedback Zone References

Toggle Force State & I/O State (F11 & F12)


While online with the Controller, you can easily toggle a controller force and discrete point states using the
right-click menu. An alternative, quick method is to also use the F11 and F12 keys.
F11 - Toggles the Force State of a BOOL variable
F12 - Toggles the I/O State of a BOOL variable
The F11 and F12 keys may be used for both Mapped and Symbolic Variables.

3-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

Smart Lists
While working in Machine Edition, you are frequently required to input variable names, instruction
mnemonics, and other data items. In most cases, when text entry is required, a Smart List will appear to
speed your progress.
As you start typing in the Smart List's input box, several things occur:
The list selection jumps to the item closest to what you typed.
Your input changes color based on whether the entry is valid or invalid. For example, invalid entries
are red. Valid entries that do not exist are green; accepting this entry creates a new item.

Figure 18: Best-Kept Secret : Smart Lists


Press Enter to accept the current entry in a Smart List.
If the text color in the selection box appears:
Red - the entered item is invalid and the Smart List will not accept it.
Grey - the entered item is valid, but might cause problems.
Green - the entered item does not appear in the list. However, you can select it and Machine
Edition will create a new item with the given name.
Black - the item appears in the list and is a valid selection.

Display Fault Tables


While working online with the controller in Machine Edition, you can quickly display the Controller Fault
Table by clicking the Target Icon on the Status bar:

Figure 19: Best-Kept Secrets - Display Fault Tables

GFS-426B 3-17
PACSystems Programming GE Intelligent Platforms

Machine Edition Projects: an Overview


You create and edit Machine Edition Projects using Machine Edition products, such as View, Logic
Developer - PC, and Logic Developer - PLC. These products share Machine Edition tools to provide a high
level of integration between the various parts of your Project.
Each Machine Edition Project is made up of Targets and Components, managed in the Project tab
of the Navigator. The Project tab appears only when you open a Project, and displays the Project's
contents.

Figure 20: Machine Edition Project Tab

A Target is the hardware platform where the finished Project runs, such as a PACSystems, Series 90, or
VersaMax controller, a computer running Windows, or a QuickPanel View. In the example above, the RX3i
Target is a PACSystems RX3i Controller and the WWW_Pump_QPControl Target is a QuickPanel View
operator interface. A Project may contain up to 32 Targets.
Components may be added to a Target. The possible Target components depend on the type of the
Target. Components specify roles or functions performed by the Target.
Each component adds items and folders to the Target. These items let you create or edit a part of the
Project. For example, the Application Scripts folder is added when you add an HMI component. This folder
contains HMI scripts you create for use with your machine level HMI application.

3-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

Machine Edition Project Properties


The following properties are for the Project node in the Project tab of the Navigator. If Proficy Change
Management is installed on your system, Projects have additional properties.
Name - The name of the Project.
Description - The description of the Project.
Documentation Address - The address of the documentation you want to access while working on
your Project. This can be any URL.

Tip
To view the documentation for a Project, in the Project tab of the Navigator, right-click the Project node
and select Show Documentation.

Lock Project with Password - If Enabled, users must enter a password to open the Project. The first
time you set this property to Enabled, you are asked to set an initial password. Passwords can be
up to 256 characters. For more details, see Password protection for Machine Edition Projects. If
Disabled, users do not have to enter a password to open the Project.

Note
If you close the Project without saving it, any changes to the Project's password protection status will be
lost since the last time you saved the Project.

Change Password - (This property appears only if Lock Project with Password is Enabled.) Click the
button to open the Change Password dialog box, which allows you to change the password
associated with this Project. Passwords can be up to 256 characters.

Figure 21: Machine Edition Project Properties

Create a New Project


There are three ways to create a New Machine Edition Project:
1. Create a Project from a Machine Edition Project Template. Machine Edition comes with pre-defined
Project templates and you can create your own templates. A template provides a basic Project
configuration and may contain whatever Targets and components that are desired.
2. Create an empty Machine Edition Project and add Targets to the Project as required.
3. Create Project from existing Machine Edition Project using the File Save As menu.

GFS-426B 3-19
PACSystems Programming GE Intelligent Platforms

Create a New Project Using a Template


To create a Project using a Machine Edition template:

1. In the Manager tab of the


Navigator, right-click My Computer
and select the New Project menu item.
The New Project dialog appears.
2. Type a name for your Project in the
Project Name box, such as My Project.

Figure 22: New Project Dialog

3. From the Project Template list, select a


template that suits the Target type
and/or the component and platform
requirements of your Project, or select an
Empty Project.
A template provides a basic Project
configuration and specifies a Target,
which you can edit later.
To view the full description of a template,
select a template. The templates
description appears in the lower portion
of the dialog box along with a picture of
the Projects contents.
For example, if you select GE Intelligent
Platforms PACSystems RX3i, this
description is displayed.
4. Now click OK to create the Project.

Figure 23: GE Intelligent Platforms PACSystems RX3i Template

3-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

A default set of components for the new Project appears in the Project tab of the Navigator.
This is what a typical Project looks like:

Figure 24: Typical Project in Machine Edition


A typical Machine Edition Project contains a set of related Targets or devices such as PAC Controllers, Series
90 PLCs, or QuickPanel View machine level HMIs. Each Target in the Project has a set of components that
define its functionality, provides its documentation, and aid in the monitoring and debugging of the
application.

GFS-426B 3-21
PACSystems Programming GE Intelligent Platforms

Create a New Empty Project


To create a blank Project, select the Empty
Project Project Template:

Figure 25: Empty Machine Edition Project

In this case, an empty Machine Edition


Project is created. You can now add
your Targets to the Project using the Add
Target menu items.
An empty Machine Edition Project
contains no Targets.

Figure 26: Empty Project Contents

3-22 GFS-426B
GE Intelligent Platforms PACSystems Programming

Create a Project from an Existing Project


To create a Project from an existing Project, first open the
starting Project.
Then select the File Save As menu, providing a name for
your new Project.

Figure 27: Project Save As Menu

Figure 28: Project Save As Dialog


In this case, a new Project named My Favorite Project is created with the exact contents of the initial
Project. The only difference is the Project Name.

GFS-426B 3-23
PACSystems Programming GE Intelligent Platforms

Document a Project
While developing a Project, you may want to provide or access documentation related to the Project.
Although this documentation may not be available during runtime, it can be useful during development
especially for the Project's other or future developers.
In Machine Edition, Targets and Projects have a property called Documentation Address.

Figure 29: Documentation Address Project Property

Figure 30: Documentation Address Target Property

The Documentation Address lets you associate the Project and Target with a URL (Universal Resource
Locator). The URL is typically a web address or full file and path name. The file can be located on the local
computer, a computer on a network, or even on the World Wide Web. The kinds of files you can display
include text files, Microsoft Word documents, and image files (such as .GIF, .BMP, and .JPG files).

3-24 GFS-426B
GE Intelligent Platforms PACSystems Programming

You can display documentation specified in the


Documentation Address properties with the Project and
Target Show Documentation menu commands.

Figure 31: Show Documentation Project Menu

For example, to associate the Project node with a readme file, set the Documentation Address property
to C:\Program Files\MyProgram\readme.txt . Then, when you right-click the root Project node and
select Show Documentation, the appropriate readme.txt file is displayed in the InfoViewer.

Note
When using the Project and Target Documentation Address property, the documentation files are not
stored as part of the Machine Edition Project. Only the URL is stored in the Project.

You can only view documentation if the Documentation Address property of the Target or root Project node
is set to a valid URL.

Document a Target in a Project


Often it is useful to include Target documentation within the Machine Edition Project. In this case, the
documentation would travel with the Project, and in the case of the PACSystems controller, may even be
stored in the controller.

GFS-426B 3-25
PACSystems Programming GE Intelligent Platforms

The Supplemental Files feature lets you add


documentation files to a Project. This feature is a node that
is a component of each Machine Edition Target:

Figure 32: Show Documentation Project Menu

To access the Documentation Files folder, select the desired


Files node, and then select the Explore right-click menu
item:

Figure 33: Explore Supplemental Files Menu

3-26 GFS-426B
GE Intelligent Platforms PACSystems Programming

This will open the Supplemental Files directory using Windows Explorer:

Figure 34: Exploring Supplemental Files

You may now copy/paste and drag and drop files to this directory. This directory is part of the Project and
travels with the Project as you perform operations such as backup and restore.

Note
The documentation files are stored as part of the Machine Edition Project and will consume hard disk
space and will increase the size of your Project file.
The documentation files directory only exists while the Machine Edition Project is Open.

Controller Supplemental Files


For PACSystems Targets, there is an additional
Supplemental Files directory named Controller. This is
a directory of files that may be stored in the
PACSystems RX3i Controller using the Upload and
Download operations. This is a useful feature for
customers and OEMs who desired to store
supplemental information in the controller such as Figure 35: Controller Supplemental Files
machine drawings and operating instructions.

GFS-426B 3-27
PACSystems Programming GE Intelligent Platforms

Lab Exercises
In this exercise, you will take the steps required to open and view portions of an existing Project. You will
learn how to manipulate and move the various windows in the Machine Edition environment.

Lab Exercise #1: Start Machine Edition


1. Launch Machine Edition from the Windows Programs menu. Launch Proficy Machine Edition from the
start Programs Proficy Proficy Machine Edition Proficy Machine Edition menu

Note
If this IS the first time you have run Machine Edition on this PC, the system will ask you to apply an
environment theme to your Machine Edition desktop.

If this IS NOT the first time Machine Edition has run


on the PC you are using, you will most likely see
this Start up Dialog.

Note
This dialog can be disabled from the Machine Edition Options, so it may not always appear.

2. Do not select a Project from the Start up Dialog, so for now, click Cancel.

3-28 GFS-426B
GE Intelligent Platforms PACSystems Programming

Your screen should now look something like this:

The Projects shown in the Navigator may be different from those on the PC you are using.

GFS-426B 3-29
PACSystems Programming GE Intelligent Platforms

Lab Exercise #2: Apply a Theme


Even though you have started Machine Edition, you do not yet have an open Project. Before you open a
Project, apply a theme in order to work within an established set of default windows, toolbars, and options.
This allows for faster customization of the environment of Machine Edition.
1. Select the Windows Apply Theme menu item:

The following screen should appear, allowing you to select one of the possible themes, depending
upon which Machine Edition components are installed.
2. Select the Logic Developer PLC item and note that the area on the right displays a sample of the
selected theme.

3-30 GFS-426B
GE Intelligent Platforms PACSystems Programming

3. Click OK and the screen will show something like this, where the user interface looks like the Preview
above:

GFS-426B 3-31
PACSystems Programming GE Intelligent Platforms

Lab Exercise #3: Open and View an Existing Project


The Navigator window lists all of the Machine Edition Projects that are on the hard disk. For this Project, we
are going to use a Project called WWW_Pump_QPC_6inch_and_RX3ifinal.
1. The WWW_Pump_QPC_6inch_and_RX3ifinal Project is
available to you as a Machine Edition Project backup
file. Plug the memory device containing the backup
file into your PC.
Select the My Computer node in the Navigator and
select the Restore right-click menu.

2. Select the WWW_Pump_QPC_6inch_and_RX3ifinal.zip file on the memory device and click Open.

The Project will be restored and will be added to the list of Projects in the Manager tab.
A Project can be opened by double-clicking on the Project name or by selecting the Open right-click
menu item. Open the WWW_Pump_QPC_6inch_and_RX3ifinal Project.

3-32 GFS-426B
GE Intelligent Platforms PACSystems Programming

Once you have opened the Project, your Project Navigator window should look similar to:

GFS-426B 3-33
PACSystems Programming GE Intelligent Platforms

Lab Exercise #4: Machine Edition Targets: an Overview


The WWW_Pump_QPC_6inch_and_RX3ifinal sample Project contains two Machine Edition Targets: RX3i
and WWW_Pump_QPControl.
The RX3i Target is a PACSystems RX3i controller.
The WWW_Pump_QPControl is a QuickPanel Control Target used as a machine level HMI.
1. Look at the RX3i portion of the Project to examine the PACSystems Controller Target.
The RX3i Target contains the following components:
Data Watch Lists folder containing the Watch Lists.
Diagnostic Logic Blocks folder containing the
active and inactive Diagnostic Logic Blocks.
Hardware Configuration - folder containing the
Hardware Configuration.
Logic - folder containing the Logic Blocks and User
Defined Types.
Reference View Tables - folder containing the
Reference View Tables.
Supplemental Files - folder containing the APM, AUP,
Controller, Documentation, and Initial Value files.

1. Expand the Program Blocks node by clicking on


the + sign to the left of the node, or double-click on
the node to display the logic program contents.
The controller Logic consists of 5 Blocks, as
displayed under the Program Blocks node.

3-34 GFS-426B
GE Intelligent Platforms PACSystems Programming

2. Double-click on the _MAIN block to display the ladder diagram editor. The _MAIN block is the heart of
the controller logic program that is called once per controller scan.

Note
Diagnostic Logic Blocks and User Defined Types are supported in Machine Edition 6.00 and later.

GFS-426B 3-35
PACSystems Programming GE Intelligent Platforms

Lab Exercise #5: Add a Target to an Existing Project


You will now add a Target to this Project. Select the Project icon.
1. Right-click on the Project icon and select Add Target GE Intelligent Platforms Controller
PACSystems RX3i.

The Navigator window will now show a new


Target called Target4 (or similar to Target4).

3-36 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #6: Rename a Target


1. You can rename a Target by clicking on
the Target name to highlight it.
2. You can also right-click on the Target and
select Rename from the menu to highlight
the Targets name.
3. While the name is highlighted, type in the
new name for your Target.
4. Name the Target MyPLC.

Backup, Delete, and Restore a Project


Backup and Restore operations are used to transfer and archive Projects. For example, a Project backup is
used to copy a Project from your hard drive on to a memory stick.
A Backup operation compresses the Project files and stores them in a Zip file.
A Restore operation decompresses a Project Zip file.
A backed-up file needs to be restored before you can use it in Machine Edition.

Note
Backup and Restore are the recommended method to move Machine Edition Projects between PCs. It is
not recommended to copy and paste the internal Machine Edition directories.

GFS-426B 3-37
PACSystems Programming GE Intelligent Platforms

Lab Exercise #7: Backup a Project


1. To back up the WWW_Pump_QPC_6inch_and_RX3ifinal Project, click on the File Save and Backup
Project menu. Backup closed Projects using the Project Navigator right-click Back Up menu.

2. The Save And Back Up dialog is


displayed:

3. Click on the arrow in the Save in


box and select Desktop from the
list.
4. Click the Save button to back up
the Project to the desktop.

3-38 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #8: Destroy a Project


Now that you have a backup copy of the Project on the desktop, delete the Project from Machine Edition
and then restore it from the backup copy.
1. In the Navigator window, right-click on the WWW_Pump_QPC_6inch_and_RX3ifinal Project.
2. Select the Destroy Project menu.

Note
The Destroy Project operation is a permanent deletion of the Project from your PC. Once it has been
"destroyed", it cannot be retrieved from the Windows Recycle Bin. It is gone forever unless you have a
backup copy.

GFS-426B 3-39
PACSystems Programming GE Intelligent Platforms

Lab Exercise #9: Restore a Project


Now that the Project has been removed from Proficy Machine Edition, you may restore it from the backup
file.
1. In the Navigator window, right-click on the My
Computer icon.
2. Select the Restore menu.

3. In the following dialog, select the WWW_Pump_QPC_6inch_and_RX3ifinal backup file.

4. The Project has been restored with its original contents.

3-40 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #10: Delete a Target


1. Open the WWW_Pump_QPC_6inch_and_RX3ifinal Project.

2. In the Navigator window, right-click on


the MyPLC Target.
3. Select the Delete menu.

4. The Delete Target Confirmation


dialog is displayed.
5. Type the word yes in the space
provided. Click on the OK button to
delete the MyPLC Target.

GFS-426B 3-41
PACSystems Programming GE Intelligent Platforms

Lab Exercise #11: Create a Project


There are three ways to create a new Project using Machine Edition.
Select one of the following methods.
1. From the File pull-down menu, select
the File New Project menu.

-or-
2. Click the New Project toolbar icon.

-or-
3. Right-click on the My Computer
Navigator icon.
Select the New Project menu.

3-42 GFS-426B
GE Intelligent Platforms PACSystems Programming

The New Project dialog is displayed that allows you to specify a Project Name, Project Template to
use for Project creation, and a Project Location.

Note
Choosing a PACSystems RX3i as the template will create a Project that has a single PACSystems RX3i
controller Target. Targets can be changed, deleted, or added after the Project is created, so what is
chosen as the initial Target isnt critical.

4. From the Project Template list, click the down arrow button.
5. Select the GE Intelligent Platforms PACSystems RX3i [Default] template.

GFS-426B 3-43
PACSystems Programming GE Intelligent Platforms

6. Type "My Demo Project" in the Project Name field and click the OK button.

The new Project, My Demo Project, is now open in the Navigator window, containing one Rx3i Target.

The Target has been given the generic name of "Target 1".

3-44 GFS-426B
GE Intelligent Platforms PACSystems Programming

7. Right-click on the Target.


8. Select Rename from the menu.

9. Type the name MyPLC, without spaces, as


the new name of the Target.

GFS-426B 3-45
PACSystems Programming GE Intelligent Platforms

Lab Exercise #12: Project and Target Documentation


1. Open Windows Explorer.
For example, click on start Run....

2. Type explorer in the Open field:

3. From Windows Explorer, highlight the "C" drive and click on the File pull-down menu and select New
Folder.

4. Name the new folder Project Doc.

Note
The folders where the documentation files are located can be on any drive of the local computer or on a
network servers drive if the computer used for development is on a network.

3-46 GFS-426B
GE Intelligent Platforms PACSystems Programming

5. Next, click on the MyPLC Target in the


Project and go to the Documentation
Address field in the Inspector window.

6. Type in the following: C:\Project


Doc\MyPLC.rtf, and press Enter.

7. Next, create a simple file and save it to


the new folder (Project Doc) that you just
created.
For example, open WordPad by clicking
on Start Run....

GFS-426B 3-47
PACSystems Programming GE Intelligent Platforms

8. Type wordpad in the Open field:

9. Type a simple line of text in the WordPad screen.

10. Click on the File pull-down menu and select


Save As.

3-48 GFS-426B
GE Intelligent Platforms PACSystems Programming

11. Save the file to the Target Doc folder as MyPLC in the C:\Project Doc directory.

12. Close WordPad and return to Machine Edition.

GFS-426B 3-49
PACSystems Programming GE Intelligent Platforms

13. Select the Project in the Navigator


window and enter the path to the Project
Doc folder in the Documentation
Address field in the Inspector window.

Note
You have now provided a path to documentation files that can be used during Project development. The
Project has a documentation address and each Target in the Project has a documentation address.
These can be files that are needed as reference during Project development or they can be files that are
being created during Project development to serve as a reference to others.

3-50 GFS-426B
GE Intelligent Platforms PACSystems Programming

14. Right-click on the Project in the Navigator window and select Show Documentation from the menu.

The folder that you created (Project Doc) opens in the InfoViewer window, allowing access to its
contents. You can add files to this folder from here or modify existing files.

GFS-426B 3-51
PACSystems Programming GE Intelligent Platforms

15. Next, right-click on your MYPLC Target in the Navigator window and select Show Documentation
from the menu.

The MyPLC.rtf file will open. This allows you to access documentation files without leaving the Machine
Edition environment.
The Documentation Address field can
contain a path to any drive or folder that
your computer has access to. Also, if you
have an internet connection, you can type
in the address to any website that you
might need to reference during your
development such as www.ge-ip.com.

3-52 GFS-426B
GE Intelligent Platforms PACSystems Programming

16. Now when you select Show Documentation from the menu, the GE Intelligent Platforms website opens
in the InfoViewer window. This is possible because the InfoViewer is actually a web browser.

Documentation that is accessed via the methods just described is only available from the computer
that you are currently working on. If you want to provide documentation files that are saved with the
Project there is a folder available for this as well.

GFS-426B 3-53
PACSystems Programming GE Intelligent Platforms

17. In the Navigator window double-click on the


Documentation Files folder under the
Supplemental Files icon.

18. The following folder opens:

Notice the temporary path where the folder is located. This folder is located in your Project path and
will be included when you do a Project backup. Any files that you place in this folder will be backed up
and can then stay with the Project if you move it to another computer.
19. Close the Documentation Files folder.

3-54 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review Questions
Navigator Window Companion Window Inspector Window
Toolchest InfoViewer Window Data Watch Window
Feedback Zone Editor Window

1. Use the above list, fill in the name of the correct Machine Edition tool.
i. The _________________ provides online help as you navigate through a Project.
ii. The _________________ is used to monitor lists of variables.
iii. The Variables tab of the ________________ lists the variables in the Project.
iv. The ______________ is able to display web pages.
v. Output information such as errors and warnings is displayed in the __________.
vi. Object properties are displayed in the __________________.
vii. The Utilities tab is part of the _____________.
viii. The Reports tab is part of the _________________.
ix. Ladder Logic instructions can be found in the ____________.
x. A ladder logic program is constructed in the _______________.
2. List three ways to create a new Project.

3. What happens when a new Project is created using a Project template?

4. What is an empty Project?

5. Why is the InfoViewer capable of displaying web pages?

GFS-426B 3-55
PACSystems Programming GE Intelligent Platforms

Review
In this module, you learned to:
Open an existing Machine Edition Project
Navigate within the Machine Edition environment
Add and delete a Target in a Project
Expand the components and sub-components of a Target
Import from previous programming packages
Backup, delete and restore a Project
Create and name a new Project
Provide Project documentation
Provide Target documentation
Access and search the help files
Navigate through the Project

3-56 GFS-426B
Table 0:

Module 4
PACSystems Variables - Title

PACSystems Variables
Topics

Upon completion of this module, you should be able to:


Understand the concepts of Mapped, Symbolic, and IO Variables
Understand Universal, Local, Global and Alias scoping for variables
Understand the various types of variables simple scalar, array, and structures
Understand the various ways to access Variable information bit in word, array element, indirect, and
structure element
Understand the various Variable attributes
PACSystems Programming GE Intelligent Platforms

Working with PACSystems Variables

Overview
When developing control applications, it is very helpful to associate the application information with
descriptive names. Application information that has been assigned a descriptive name is known as a
Variable, sometimes referred to as a tag. Variables give meaningful names to the application information
making it easy to understand what the application is doing. A Variable is assigned to a data storage
location that resides inside the Controller.
For example, you could create a variable named BottleCount to store the number of bottles that pass
through a conveyor. Every time sensors detect a bottle, your application adds 1 to the variable. Other
parts of the application might use BottleCount to perform other operations, such as stopping the conveyor
when a certain number of bottles have been processed.
Variable Names consist of a string of up to 32 ASCII characters and may contain alphabetic characters,
numbers, and underscores. Variables have several other attributes that are discussed in this module.
Some variable name examples include: EStop_Push_Button, Over_Temperature_Indicator, and
Process_State.

Variable Overview
Variable Type
The Type of a Variable determines ifs individual elements and their range of values.

4-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

Variables have three basic Types: Scalar, Array, and Structure.

Figure 1: Variable Types


Scalar Variable: composed of a single data element that has a specific data format that is determined by
its Data Type, such as INT or REAL.
Array Variable: composed of a list of data elements with the same Data Type. Array variables are created
by setting the variable's Array Dimension 1 and Array Dimension 2 attributes. Arrays are useful to store a
list of similar or related information. Logic must provide an array index to access an individual array
element.
Structure Variable: composed of a group of data elements with varying Data Types. Structure variables
can be created from a set of predefined data types or from user-defined data types, and may include array
and other structure elements.

Variable Data Type


Each variable element has a Data Type that specifies the type of data value that it contains. The
PACSystems controllers support the following Basic Data Types:

Basic Data Type Description Data Value Range


BOOL Boolean or discrete (1 bit) 1 or 0, On or Off, True or False
BYTE 8-bit bit string (1 byte) 8 consecutive bits of 1 or 0
DINT 32-bit integer (4 bytes) Integers from -2,147,483,648 through
+2,147,483,647
DWORD 32-bit bit string (4 bytes) 32 consecutive bits of 1 or 0
INT 16-bit integer (2 bytes) Integers from -32,768 through +32,767

GFS-426B 4-3
PACSystems Programming GE Intelligent Platforms

LREAL 64-bit floating-point value Fractional numbers from approximately


(8 bytes) 2.225x10-308 through 1.79x10+308;
accuracy of 15 decimal places
REAL 32-bit floating-point value (4 bytes) Fractional numbers from approximately
1.401298x10-45 through
3.402823x10+38; accuracy of 6 or 7
decimal places
STRING Maximum of 255 characters (1 byte per Stores sequence of ASCII characters
character)
UINT 16-bit unsigned integer (2 bytes) Positive Integers from 0 through 65,535
WORD 16-bit bit string (2 bytes) 16 consecutive bits of 1 or 0
Table 1: PACSystems Basic Data Types

4-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

Variable Scope
The Scope of a variable determines its context, and what portions of the Logic program may access the
variable. For example, Local scope variables reside or "live" within a Logic Block and may only be
referenced within that block.
Variables may have three different Scopes: Universal, Global, and Local.

Figure 2: Scopes of Variables

Global Scoped Variables: may be accessed from any portion of the application logic.
Local Scoped Variables: may only be accessed from within the logic block that contains the variable.
Universal Variables: start with a "$" and are globally scoped. They get special treatment when used in the
Toolchest.
System Variables: start with a "#" character and are globally scoped. These are predefined BOOL variables
that provide system status information or other convenient values such as #ALW_ON.

GFS-426B 4-5
PACSystems Programming GE Intelligent Platforms

Variable Memory Location


The memory location of a variable determines how it is access within and outside of the controller.
Variables may be located in three types of memory locations: Symbolic Memory, IO Memory, and
Reference Memory.

Figure 3: Variable Memory Locations

Symbolic Variables: are located in controller Symbolic Memory and their locations are managed by the
Programmer and Controller. Symbolic Variables are accessed by their names.
I/O Variables: are located in controller IO Memory and are assigned to particular point locations of an I/O
Module. I/O Variables are accessed by their names.
Mapped Variables: are assigned to a Reference Memory address such as %I, %Q, or %R. Mapped Variables
are accessed by their names or by their reference addresses.
Alias Variables: "point" to other previously defined Variables, and may be assigned to Symbolic, I/O, or
Mapped Variables.
In general, Mapped Variables are assigned to physical I/O addresses and Symbolic Variables are
automatically assigned to internal symbolic memory addresses.

4-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Variable Access
Variable information may be accessed in the logic using the following methods:

Figure 4: Variable Access Methods

Scalar Variables: may be accessed directly by their names.


Array Variables: may be accessed by their array elements, using either a constant or variable index.
Structured Variables: may be accessed by structure element.
Bit-In-Word Access: may be used to access an individual bit of a Variable directly.
Indirect References: may be used to index into a Mapped Variable to access a memory location.
Fault Locating System Variables: provide a convenient way to determine if racks, modules, or even
individual I/O points have faulted.

GFS-426B 4-7
PACSystems Programming GE Intelligent Platforms

Variable List
Variables are managed using the
Variable List, the Machine Edition
component where Project
variables are defined. Variables
for multiple Targets may exist in
the same Variable List. For
example, if a Project has two
Targets, Target1 and Target2,
each may have a variable named
myInteger referred to these as
Target1.myInteger and
Target2.myInteger.

Figure 5: Variable List Example

Variable Attributes
Variables have a common set of attributes or properties. Variables may have additional properties
depending on their type.

Name
The variable Name attribute is a text label that you give
to the variable. Names must be unique within a
Targetno other item in a Target can have the same
name.
Variable names can use letters and numbers,
and underscore characters ("_").
Variable names can be from 1 through 32
characters long and must begin with a letter
(or a $ for Universal Variables).
Variable names are not case-sensitive.
You can change the Name directly in the
Inspector, or with the variable right-click
Rename menu.

Figure 6: Variable Attributes

4-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Description
The variable Description attribute is a text description that provides further documentation for a variable.
Description text may be from 0 through 255 characters long, and may include spaces.

Publish
The variable Publish attribute may have 3 values: External, Internal, and False. When set to External, the
variable is included in the Published Variable Table (PVT) so that HMI applications may access the variable
by name. For symbolic or I/O variables, HMIs must refer to them by name since they are not mapped to
reference memory.
HMI applications that support External Publishing are Proficy View (GE SRTP PLC Access driver or GE SNP
driver); Proficy HMI/SCADA - CIMPLICITY (GE SRTP standalone OPC Server or GE SRTP protocol); and Proficy
HMI/SCADA - iFIX (GE SRTP standalone OPC Server).
When set to External, the Publish property also enables fault table and C block symbolic variable access.
When Publish is set to Internal, the variable is included in the PVT but is not available to HMI applications.
The variable is only available by name to fault tables and C blocks.

Array Dimension 1
The Array Dimension 1 attribute is the maximum index of the first dimension of an array. The default of 0
indicates that the variable is not an array.
Assuming the variable is a single-dimensional array (that is, Array Dimension 2 is 0), you refer to an element
of an array with the format Array1 [index], where index is the number of the element you want to
reference. Indexes run from 0 to one less than Array Dimension. Array Dimension 1 multiplied by Array
Dimension 2 must be less than or equal to 9999.

Array Dimension 2
The Array Dimension 2 attribute is the maximum index of the second dimension of an array of variables.
The default of 0 indicates that the variable is a one-dimensional array.
You refer to an element of a two-dimensional array in the format Array1[index1,index2], where index1 is
the number of the element in the first dimension and index2 is the number of the element in the second
dimension. Indexes are numbered from 0 to one less than the appropriate Array Dimension property.
Array Dimension 1 multiplied by Array Dimension 2 must be less than or equal to 9999.

Data Source
The Data Source attribute Identifies where the variable's value is located. PACSystems variables have a GE
IPController data source.

Data Type
The Data Type attribute determines the kind of values that can be stored in a variable. For example, a
variable with an Integer (INT) Data Type can store whole numbers.

Current Value
The Current Value attribute is the variables value in the Controller at this point in time. This attribute is
only available when the programmer is online with the Controller. This attribute is grayed out if the value is
not live from the controller. The current value may also have the value of Unknown if the variable is a
symbolic variable that does not exist in the controller.

GFS-426B 4-9
PACSystems Programming GE Intelligent Platforms

The format of the Current Value data is determined by the Default Display Format attribute.

Initial Value
The Initial Value attribute contains the value of the variable that is stored in the Machine Edition Project.
This property can be modified by manually updating it in the Inspector or by Uploading the Initial/Forced
Values from the controller.
This property is not available to variables mapped to %T and %S reference memory and is read-only for
Alias Variables.

Default Display Format


The Default Display Format attribute determines how the variables value is displayed in the Inspector and
in each Machine Edition component, such as the LD Editor and Data Watch. For each data type there are
several display formats that can be selected.
For example, BOOL variables may be displayed as True/False, On/Off, 1/0, I/O, Open/Closed, AM/PM, and
Yes/No.

Max Length
The Max Length attribute appears only if the Data Type is STRING. This property is the maximum length, in
number of characters, of the text stored by the STRING variable. The valid range for this property is 1
through 255.

Precision
The Precision attribute appears only if the Data Type is REAL or LREAL. This property is the maximum
number of decimal places to use when formatting or displaying the REAL or LREAL variable's value. The
valid range for this property is 1 through 17. This attribute is a display attribute, it does not affect the
internal precision of the REAL variables.

Retentive
The Retentive attribute determines if the value of a variable is retained (not cleared) when a stop to run
transition of the controller occurs.
If set to True, the variables Current Value is retained (not cleared) when the application has a Stop-
to-Run transition.
If set to False, the variable's Current Value is cleared (set to zero), when the application has a Stop-
to-Run transition.
If you want to set a variable in the controller to its Initial Value attribute value, you must stop the controller
and download the Initial/Forced Values to the controller.
This property is Read-only for all Controller variables except non-discrete (word) symbolic variables and
variables mapped to %M and %Q.

Note
You can observe whether a variable is Retentive or non-retentive in the LD Editor. Retentive variables are
displayed in regular (non-bold) font while Non-Retentive variables are displayed in bold font.

4-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

In this example, the variable My_M_Retentive is


retentive, and the variable My_M_NonRetentive
is non-retentive.

Figure 7: LD Editor Retentive Attribute Example

Variable Usage
It makes most sense when developing applications to assign descriptive Variable Names to controller
memory locations. Variable names may contain letters, numbers, and underscores to provide a descriptive
label to application information.
For example, "Emergency_Stop_PushButton" is a more descriptive name for an input than "I0487". Letters
can be uppercase or lowercase or any mixture of both to improve readability.

Variable Scope
The Scope of a variable determines its context - where the variable lives in the application. A variables
scope also determines what portions of the application may directly access the variable. Variable scope
may be Global or Local. Variables must have unique names within a scope.

Global Scope
For Global Variables, the scope of the variable is the entire Target application. This means that logic in the
_MAIN block and any of the applications blocks may directly access this variable and its data. Variables
with a global scope do not belong to any local scope.
Global scope variables are referenced with the following syntax:
Target name.Variable name where:
Target name is Target name where the variable exists
Variable name is the unique variable name.
Within the context of the Target application, Target name may be omitted.
For example: MyPLC.Stop_PB1

Note
It is possible for two variables with the same name to exist at both the global and local scopes.

Machine Edition applications such as Proficy View access Published Global Variables using the Target
name.Variable name convention.

GFS-426B 4-11
PACSystems Programming GE Intelligent Platforms

Local Scope
For Local Variables, the scope of the variable is the context of a particular logic block, and may also be
created for the _MAIN block. Typically, this means the variable is only used within a particular block of
logic.
Local scope variables are referenced with the following syntax:
Target name.Block name.Variable name where
Target name is Target name where the variable exists
Block name is the name of the block where the local variable lives
Variable name is the unique variable name.
Within the context of the Target application, the Target name may be omitted.
Within the context of the variables block, the Block name may be omitted.
For example: MyPLC.Sub_1.Start_PB1

In the Machine Edition logic editing


environment, Local scope variables
are easily identified by their display
in Italics.
In this example, the variable
READY_ENABLED is globally scoped
and the variable PULSE_CNT_1 is
locally scoped.

Figure 8: Local and Global Scope Variable Example

4-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

Variable Descriptions
Variable Descriptions are used to
provide additional, useful information
about a variable and the data that it
contains. You add this information to
the variable definition when you
create a variable in the Variable List
using the Description attributes.
Variable Descriptions may be
displayed in the editor along with the
Variable Names and Reference
Address for Mapped Variables.

Figure 9: Ladder Diagram with Variable Description Enabled

Use the LD Editor View menu to modify the LD Editor display in order to view Descriptions and Reference
Addresses at the same time. As you select the different view options, the height of the LD Editor grid will
increase or decease accordingly to provide space to display the information. When there is not enough
space to display the entire description string, the editor will use "" to truncate the text.

Figure 10: View > Descriptions LD Editor Display Menu

Figure 11: View > Operands LD Editor Display Menu

GFS-426B 4-13
PACSystems Programming GE Intelligent Platforms

Figure 12: View > Reference Addresses LD Editor Display Menu

Constants
A Constant is a numeric value that may be assigned as the Argument to an Instruction Input Parameter. All
programming languages such as LD, FBD, and ST support constants in their logic construction.

Figure 13: Constant Used in LD Logic

Figure 14: Constants Used in ST Logic

Constant values may be entered in Integer, Real, Binary, Octal, and Hexadecimal formats. An example of
each is shown below.

Constant Type Constant Value Example


Integer 1234
Real 3.141592, 45.8E04
Binary 2#1010101111010101
Octal 8#120202
Hexadecimal 16#11FE
Table 2: Constant Value Examples

4-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Mapped Variables
A Mapped Variable is a variable that is mapped to a specific PACSystems CPU memory location. Variables
may be mapped to %R, %AI, %AQ, %P, %L, %W, %I, %Q, %M, %T, %S, and %G reference memory.
Mapped variables are often assigned to physical I/O points located in %I or %Q memory.
The logic editors and tools can display the variable name and reference address at the same time as shown
below. In this example, the variables STOP, START, MOTOR_AUX, and MOTOR are all mapped variables, as
indicated by the assigned reference address displayed under the variable name.

Figure 15: Variable and Reference Address Displayed for Mapped Variables

Use the Machine Edition View menu to modify the LD Editor display in order to view descriptions and
reference addresses at the same time, as well as other display options.

Symbolic Variables
A Symbolic Variable is a variable that does not map to PACSystems reference memory. In this case,
Machine Edition automatically handles mapping Symbolic Variables to internal controller user memory. If
you map a Symbolic Variable to a reference memory location, it becomes a Mapped Variable. If you map a
Symbolic Variable to a Terminal of a hardware module, it becomes an I/O Variable.
A Symbolic Variable appears in the Navigator Variable List with a blank (empty) Ref Address attribute. In
order to change a Mapped Variable to a Symbolic Variable, all you need to do is delete the Ref Address
attribute. Conversely, to change a Symbolic Variable to a Mapped Variable, just assign the variable a
Reference Address.
Memory required to support
Symbolic Variables counts against
user memory space. You can
configure the space available for
Symbolic Variables in the Memory
tab of the CPU Configuration
under the Managed Memory
section of configuration
parameters.

Figure 16: Symbolic Variable Memory Allocation

GFS-426B 4-15
PACSystems Programming GE Intelligent Platforms

When you use Symbolic Variables in the Ethernet Global Data (EGD) component and/or use I/O Variables,
the Hardware Configuration and Logic are coupled. In this case, they become a combined Program
component that is downloaded to and uploaded from the controller.

Symbolic Variables Support


You can use Symbolic Variables anywhere you can use Mapped Variables except for:
I/O Trigger of an Interrupt Block
COMM_REQ Status Word
Indirect References, for example @Engine_Triggers

Symbolic Variables Retentiveness


A Symbolic Discrete Variable is non-retentive by default, but you can set it to retentive using a variables
Retentive property.
A Symbolic Non-discrete (word) Variable must be retentive.

Add Symbolic Variables to your Application


When you add new Symbolic Variables to your application and download the modifications to the
controller, the Symbolic Variable Initial Values are handled as follows:
If the controller is running, a dialog box provides you with the choice to Clear the variable values or
to set them to their initial value defined in the Project.
An option is provided for review the list of variables to be downloaded.

Figure 17: Initialize Symbolic Variable Initial Value Dialog

If the controller is stopped when you store the changes, the new variable values are undefined
and- the existing variables values are retained.
To set the variable values to particular values, you need download the Initial/Forced values to set the
new variables or you need to manually set their values in the controller.

Initializing Variable Values


When you download and execute applications in the controller, it is often useful to have the variables data
initialized to particular values. There are several mechanisms that you can use to achieve this:

4-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

Use the Initial/Forced Values option on the Stop Mode Store Download dialog to set all initial and
force values to the values defined in the Project.

Figure 18: Download to Controller Initial/Forced Values Selection

Use the Clear Memory operation to set all Initial and/or Forced Values to zero.

Figure 19: Clear Initial Values Selection

Initialize variables in the logic on the first scan of the controller. For example, use the #FST_SCN
System Variable to call an "Initialize_Variables" block.
Use the Reference View Table, Data Watch, or Logic Editor to modify the variable current values to
the desired values.
Use the Initial Value Tables feature to set specific reference tables to specific values in a bulk
operation. When the Controller General Use Initial Value Data Tables option is set to True
and you perform an upload, download, or verify of initial/forced values, then the tables in the
Supplemental Files Initial Value Tables folder contain the initial and forced values uploaded
from, downloaded to, or verified against the controller.

GFS-426B 4-17
PACSystems Programming GE Intelligent Platforms

The initial and forced values are contained in binary files. You can use a HEX editor to modify the
values of the .dat files.
Often this feature is used to perform a bulk upload of reference tables so that a bulk download may be
performed in the future to restore an applications data to a particular state. This is also used in the
case where variables do not exist in the application for all memory locations.

Symbolic Variable Word-for-Word Changes


In general, Symbolic Variables support the same Word-for-Word and Run Mode Store operations as
Mapped Variables. The following are examples of a word-for-word change that may involve Symbolic
Variables:
Replacing a Symbolic Variable with another Symbolic Variable.
Replacing a Symbolic Variable with a Mapped Variable, and vice versa.
Replacing a Symbolic Variable with an I/O Variable, and vice versa.
Replacing a variable by a new Symbolic Variable that has been defined "on the fly". In this case, the
initial value of a Symbolic Variable is set to zero.
Modifying Data Type or Array Size of Symbolic Variables
If you change the Data Type or Array Size of a Symbolic Variable in your application, you must stop the
controller before you can download those changes. In this case, the Initial Values of the modified Symbolic
Variables are undefined unless you also store those values to the controller.

I/O Variables
An I/O Variable is a variable mapped to a hardware module terminal in the Hardware Configuration. A
terminal corresponds to a:
Physical discrete or analog I/O point on an I/O module or I/O bus, such as Genius
Discrete or analog status returned from a controller module, such as the Ethernet module status
word
Memory required to support I/O Variables counts against your user memory space. You can configure the
space available for I/O Variables in the Memory tab of the CPU module.

I/O Variables must be enabled on a module-


by-module basis in order to be used on a
particular hardware module. Within a Project,
you may have some modules use I/O
Variables and other modules use Mapped
Variable. But, you cannot mix I/O Variables
and Mapped Variables on the same module.
Each module has a Variable Mode property
that defaults to False. To enable I/O Variables
for a module, set this parameter to True.

Figure 20: Module Variable Mode Property

4-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

After you enable I/O Variables for a module or I/O bus, the Hardware Configuration and Logic are coupled
and treated as a single entity when performing upload and download operations. When you change the
mode to True, the following warning is displayed to let you know that the modules reference address
assignments will be removed.

Figure 21: Variable Mode Warning

When you view a modules configuration parameters in I/O Variable Mode, you will notice:
A new Terminals tab appears as the rightmost tab of the Parameter editor. This tab allows you to
assign I/O Variables to each point of the module.
All Reference Address parameters are removed from the modules configuration.
Reference Address groups are present in the Terminals tab. These groups show the number of
points available for this type of point.
Length property associated with each Reference Address node appears in the Inspector when you
select the Reference Address node.

Figure 22: Example of I/O Variable Defined on Input Module

To disable the I/O Variable Mode for a module, set the Variable Mode parameter to False and the I/O
Variable mappings to the module will be removed. In this case, any I/O Variables will be converted to un-
mapped Symbolic Variables.

GFS-426B 4-19
PACSystems Programming GE Intelligent Platforms

I/O Variable Addresses


When an I/O Variable is assigned to a modules Terminal location, the I/O Variables address is defined in
terms of a rack, slot, sub-slot, segment, and point number.
The I/O Variable address format is defined as: %vdr.s.[z.]g.t, where:
v = I (Input) or Q (Output)
d = data type: X (BOOL) or W (WORD)
r = rack number
s = slot number
[z] = optional sub-slot number. This element appears only if there is a sub-slot, for example, the
SBA number of a Genius device. This value is set to 0 for a PACSystems RX7i Ethernet
daughterboard.
g = segment number or number of the reference address node. Set to 0 for the first reference
address node on the Terminals tab, to 1 for the second reference node, and so on.
t = terminal number. One-based, that is, the numbering begins at 1.
The following example shows an input simulator module that is in Variable Mode. Notice how the I/O
Variable Address matches the modules rack and slot location.

Figure 23: Example of I/O Variables Defined on Input Simulator

4-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

I/O Variable Assignment


There are several ways to assign a variable to an I/O Module Terminal:
Drag-and-drop a variable from the Variable List to an I/O Module Terminal. This operation has the
effect of assigning a specific I/O Variable Address to the variable.
Enter a valid I/O Variable Address in the Ref Address property of an existing variable, in the
Variable List, for example.
Type a new variable name in the I/O Module Terminal property in the parameter editor. This
operation has the effect of defining the new variable with the appropriate Data Type (I.e. BOOL)
and assigning a specific I/O Variable Address to the variable.
Select an already existing variable from the Variable Smart List in the parameter editor. Simply
double-click on the Variable cell in the parameter editor to display the smart list. The smart list is
filtered to display variables that match the data type of the terminal.
Duplicate an existing I/O Variable in the Variable List. When I/O Variables are duplicated, the
Address is incremented for you.
There are a few rules when assigning I/O Variables to I/O Module Terminals:
You can map only a BOOL Variable to a discrete (single point) terminal.
You can map only an INT, UINT, or WORD Variable to an analog (16-bits) terminal.
You cannot map an individual array element as an I/O Variable.
You can map an entire array as an I/O Variable if its number of elements is smaller than, or equal to,
the number of terminals in the Reference Address node.

I/O Variables Export/Import


All I/O Variables are included when you export the Hardware Configuration for any Target. If an I/O
Variable is part of a Structure Variable, the entire Structure Variable is added to the Variable List in the
exported configuration.
When you import a Hardware Configuration, the programmer begins by converting all existing I/O
Variables in the Target into Symbolic Variables. Some or all of these may be converted back to I/O variables
during the rest of the import process, as the programmer imports and assigned I/O Variables to module
terminals.

I/O Variable Cut, Copy, and Paste


When you copy a module, I/O bus, or I/O device, the original I/O Variables are retained in the original
module, bus, or device.
When you paste the module, bus, or device into the same Target, new I/O Variables are created and
automatically mapped to the pasted module, bus, or device location. Each new I/O Variable receives a
unique name based on the original I/O Variable.
When you paste the module, bus, or device to a different Target, new I/O Variables are created and
automatically mapped to the pasted module, bus, or device location if there are no matching variables
already in the Target. If matching variables exist, the pasted I/O Variable replaces the existing variable.
When you cut and paste a module, bus, or device only once within the same Target, the I/O Variables are
retained and are remapped to their new rack, slot, and sub-slot locations.

GFS-426B 4-21
PACSystems Programming GE Intelligent Platforms

Universal Variables ($)


A Universal Variable is a globally scoped variable that starts with the dollar sign character "$". Universal
Variables are unique in a controller application and receive special treatment when used in the Toolchest.
"$Emergency_Stop_Push_Button" is an example of a Universal Variable that represents a unique entity
available to the logic in the entire application.
Universal Variables are variables that will never be part of a Toolchest variable structure. If you create a
Toolchest fxClass that refers to a Universal Variable, that Universal Variable will not become an element of
variable structures associated with the objects of that fxClass. Any references to Universal Variables
remain references to the original Universal Variables.
If you use a Universal Variable in a block of logic and drag the block into the Toolchest to create an fxClass,
the Universal Variable travels with the logic inside the fxClass, not directly with the fxClass as custom
structure elements do.
If you drag this fxClass block of logic into another Target that does not contain the Universal Variable, the
Universal Variable is created with the same properties as in the fxClass block, except for the Description,
Publish, Initial Value, and Display Format properties.
If you drag the fxClass block into a Target that already contains a Universal Variable by that name, the
existing Universal Variable is not overwritten with the one in the fxClass block.
Any variable of any Data Type may be created as a Universal Variable. To make a variable universal, begin
its name with a dollar sign ("$").
An example of Universal Variables is shown below:

Figure 24: Example of Universal Variables


Since the Variable List is sorted alphabetically, Universal Variables are always conveniently located at the
top of the Variable List.

4-22 GFS-426B
GE Intelligent Platforms PACSystems Programming

Structure Variables
Structure Variables are used to organize application information into logical groups of related elements.
Structure variable data types define compound variables that contain several variable elements. Each
individual element has its own Data Type and data value, which may or may match the other elements in
the structure.
In the Variable List, structure variables appear as nodes with each variable element a child under the head
of the structure variable. You can expand the structure variable to display and access the individual
structure elements.

Figure 25: Example of Structure in Variable List

A Structure Variable's composition is defined by creating a User Defined Type (UDT) or a Toolchest fxClass.

GFS-426B 4-23
PACSystems Programming GE Intelligent Platforms

Create User Defined Types


You may create a structure variable based on a User Defined Type. User Defined Types are created by the
application developer and organized in the Project Navigator under the User Defined Types node.

Figure 26: User Defined Types Navigator Node

1. To create a new User Defined Type,


select the New User Defined Types
right-click menu.

Figure 27: User Defined Types New Menu

4-24 GFS-426B
GE Intelligent Platforms PACSystems Programming

2. Enter a descriptive name for the new


User Defined Type, such as Analog_UDT.

Figure 28: Newly Created User Defined Type

3. Construct the composition or definition


of the UDT by selecting the Edit right-
click menu to display the UDTs
definition dialog.

Figure 29: Edit Newly Created User Defined Type

4. The UDT dialog is displayed to define the UDT elements.

Figure 30: Definition of Analog_UDT User Defined Type

GFS-426B 4-25
PACSystems Programming GE Intelligent Platforms

5. Add the individual UDT data elements with their Name, Data Type, Retentive property, array Length,
Initial Value, and Description.
6. Once the UDT has been created,
new Variables may be created in
the Project using the Variable List
New Variable UDT menu item.

Figure 31: Create New Variable Based on User Defined Type

7. Select the specific UDT from the list.

Figure 32: Select UDT From List of Available UDTs

8. The new Variable will be created with that


UDT. Expand the Variable to see its
individual data elements.

Figure 33: Newly Created User Defined Type

4-26 GFS-426B
GE Intelligent Platforms PACSystems Programming

Use Toolchest to Create Structure Data Types


When creating a Structure Variable from the
Toolchest, it is associated with an fxClass that
exists in the Toolchest. If the fxClass changes in
the Toolchest, then all structure variables
associated with it are also modified. The fxClass
defines the Structure Data Type.
An example of a Toolchest Structure Data
Type is shown here.

Figure 34: Example Toolchest Structure Data Type

You may initially create a structure data type by performing a drag-and-drop operation from the Variable
List to the Toolchest. Once a structure has been created in the Toolchest, you may add and delete
elements to and from the structure. The basic steps for creating a structure data type using the Toolchest
are:
1. Create a Toolchest Drawer to contain the structure data types. You can Export this drawer and its
contents for others to use.

2. Give the Drawer a descriptive name, such


as "DIGITAL POINTS".

Figure 35: Create a New Toolchest Drawer

GFS-426B 4-27
PACSystems Programming GE Intelligent Platforms

3. Drag-and-drop the basic variable elements that you want to exist in your structure from the Variable
List to your Drawer.
This will create the fxClass and give it the name Custom structure.
The example shows how to drag the BOOL variable named Alarm to the DIGITAL POINTS Toolchest
Drawer to create a new fxClass.

Figure 36: Create a New fxClass

4. Rename the fxClass to provide a descriptive


name, such as Digital Structure.

Figure 37: Rename fxClass

5. Add and delete elements in the custom structure as needed to complete your structure definition. You
can add elements by drag-and-drop from other components, or use the New Element right-mouse
menu in the Toolchest.

4-28 GFS-426B
GE Intelligent Platforms PACSystems Programming

The example below shows how to create a new custom structure element that has an INT Data Type
using the Toolchest right-mouse menu.

Figure 38: Create a New Custom Structure Element in Toolchest

Now you may use this structure data type to create new Variables in the Variable List of this data
type.
If you modify the structure definition in the Toolchest, such as rename an element, the changes to the
structure are automatically reflected in your Project.

GFS-426B 4-29
PACSystems Programming GE Intelligent Platforms

System Variables (#)


System Variables are special variables that provide information about your controller that begin with a
hash or pound symbol (#). These variables provide status information on an application as it executes.
A Target's system variables are added to the Variable List when you add it to a Project.
System Variables are BOOL variables that provide system status information or other convenient values.
They are mapped to %S, %SA, %SB, and %SC reference memory, except for PACSystems Fault Locating
System Variables.
There are built in filters in the Variable List to turn the display of system variables on and off.

Figure 39: Filter System Variables in Variable List

An example of PACSystems System Variables is


shown here:

Figure 40: PACSystems System Variables Example

Examples of time tick system variables include #T_10MS, #T_100MS, #T_SEC, and #T_MIN.
Examples of convenience system variables include #ALW_ON and #ALW_OFF.
You can reference System Variables in the logic of any LD, ST, and FBD block. In a C block, you reference
System Variables by their reference address.

4-30 GFS-426B
GE Intelligent Platforms PACSystems Programming

Alias Variables
An Alias Variable is a variable that references another variable or another variable component such an
array or structure element. Alias Variables are often used to provide a descriptive variable name to an
individual array element.
An Alias Variable is tied to a variable name, not its memory location. This means that if the base variable
memory location changes, the alias relationship remains intact.
An Alias Variable may be used to reference:
Parameterized LD Block Parameter:
Create an Alias to an Input Parameter Array element to make application code easier to
understand.
For example: PID_Man_Override => PID_Input_Parameter_Array[20]
Array Element(s):
Create an Alias to one or more array elements to make application code easier to understand.
For example: PID_Man_Override => PID_Array[20]
Structure Element:
Create an Alias to a structure element.
For example: Motor_1_Status => MyMotor_One.Motor_Status_Array[1]
Another Variable:
Create an Alias to a symbolic, mapped, or I/O variable.
For example: Calc_Accum => Temp1

To create an Alias Variable, assign the


name of another variable as its base
variable in its Ref Address variable
property. You can make this assignment
directly in the Inspector or by using the
Variable Address Wizard.
An Alias Variable example is shown below,
along with the Reference Address Wizard.
In this case, the 15th array element of the
PID_Array array variable, PID_Array[15], is
assigned to the variable's Ref Address field
in the Inspector to create the Alias
Variable relationship.

Figure 41: Alias Variable Assignment in Inspector

GFS-426B 4-31
PACSystems Programming GE Intelligent Platforms

Press the ellipsis button to the right of the Ref Address value to display the Reference Address Wizard.

Figure 42: Alias Variable Assignment using Address Wizard

In this case, the variable or variable element may be selected directly in the Alisa variable to: drop down
list.

Figure 43: Monitoring Alias Variable in Logic


When monitoring an Alias Variable, the programmer will resolve the alias assignment to display the Base
Variable and its data value.

4-32 GFS-426B
GE Intelligent Platforms PACSystems Programming

Advantages of Alias Variables


An Alias Variable is typically used to provide a more meaningful name to the item it references and is
usually used to access individual array elements.
For example, if a PID Function Block Instance has its data array in %R00301 through %R00340. You can
map a 40-WORD array named MyPID to %R00301. Now you may create a variable named Integral_Rate
and alias it to MyPID[7]. Now, use Integral_Rate in your logic instead of MyPID[7], making the logic easier
to comprehend.
Using an alias has advantages over mapping a second variable to the same address:
An Alias Variable is automatically remapped if you move the item it refers to. For example, if the
Alias Variable named MyAliasVar is aliased to MyComplexArray[255,3] and you move
MyComplexArray, you do not need to remap MyAliasVar. If you had mapped a second variable to
the same memory location as MyComplexArray[255,3], however, you would have to re-address
the second variable to the new location of MyComplexArray[255,3].
If the Duplicate Addresses option is set to Prevent (default value), you cannot map two variables of
the same data size to the same reference address in the same scope. This is to avoid
unintentional memory location conflicts.

Alias Variable Operational Notes


In general, when you create an Alias Variable, its Data Type size must fit within the size (number of bits) of
the base variable. For example, you may alias a REAL (32 bits) variable to a variable whose Data Type is
DINT (32 bits) or to two elements of an INT array (16 bits *2).
Other general limitations are that you cannot alias a variable to:
Itself or another alias variable
A variable that has a different scope
You can alias a variable to a variable of another data type if the total bit length of the base variable is
greater than or equal to that of the alias variable.
An array can be aliased to another array. In this case, each element of the alias array is linked to the
appropriate element of the base array so that all the elements of the alias array occupy adjacent memory
locations.

GFS-426B 4-33
PACSystems Programming GE Intelligent Platforms

Bit References in Word Variables


You can access an individual bit in a variable by using the Bit-in-Word Reference mechanism.
The Bit-in-Word Reference format is defined as:
Variable name.X[Bit Index] , where
Variable name is the BYTE, WORD, INT, UINT, DINT, or DWORD variable.
Bit Index is the bit in the variable data that being referenced. The Bit Index is 0-based.

The Bit-in-Word Reference may be used


directly in logic to access bits of
information in Word memory and may
also be used to create BOOL variables
that are assigned to individual bits of
Word Reference Memory.
These Bit-in-Word References may also
be used directly in Boolean logic elements
such as contacts and coils.

Figure 44: Bit-in-Word Reference in LD Logic

For example, My_Register_DWORD.X[0] addresses the first (least significant) bit of My_Register_DWORD,
and My_Register_DWORD.X[1] addresses the second bit of My_Register_DWORD. In these examples, [0]
and [1] are the bit indexes.
For the various Data Types, the Valid Bit Indexes are as follows:

Data Type Valid Bit Indexes


BYTE [0] through [7]
WORD, INT, UINT [0] through [15]
DWORD, DINT [0] through [31]
Table 3: Valid Bit Indexes for Each Data Type
You can reference bits inside the elements of arrays or structured variables as well. For example:
MyWordArray[5].X[2] references 3rd bit of 6th element of the array MyWordArray.
MyStructure.Counter.X[3] references 4th bit of the Counter element of the structure variable
MyStructure.

4-34 GFS-426B
GE Intelligent Platforms PACSystems Programming

An example of a BOOL variable that accesses a bit in reference memory is shown below. In this case, the
memory location of this Mapped Variable is %R00134.X[01].

Figure 45: Example of Bit-in-Word Reference Variable

Caution

It is not recommended to use Bit-in-Word References for REAL or LREAL variables.

Limitations
The following limitations apply to the use of Bit-in-Word References:
Bit Index must be a constant, it cannot be a variable.
The POSCOIL, NEGCOIL, POSCON, and NEGCON instructions support bit references only in mapped
discrete reference memory.
You cannot force a Bit-in-Word Reference that is located in Word (non-discrete) memory.

GFS-426B 4-35
PACSystems Programming GE Intelligent Platforms

Indirect References (@)


An Indirect Reference enables you to treat the contents of a variable as a pointer to data, rather than as
the actual data. Indirect References are sometimes referred to as relative pointers. Indirect References
may only be used with Mapped Variables that are located in WORD reference memory.
For example, if a Mapped Variable located at %R00043 is used as an Indirect Reference and has the data
value +00055, the indirect reference points to %R00055. The data value in %R00055 (+00267, for instance)
is what instructions using the indirect reference use as the actual operand data. The indirect reference is
not an offset added to the current reference address; it is an absolute address in the same memory area.
Indirect References may be used:
In LD, ST, and FBD editors
With Mapped Variables located in %R, %AI, %AQ, %P, %L, and %W reference memory
The index for an indirect reference in %W reference memory is a 32-bit DWORD value, in all other reference
memory the index is a 16-bit WORD value.
Indirect References can be useful:
To perform the same operation to many registers.
To avoid repetitious logic within the application program.
In loop situations where each register is incremented by a constant or by a value specified until a
maximum is reached.

Note
In most case, the use of Variable Indexed Arrays is easier to utilize than Indirect References.

Indirect Reference Assignment


To assign an Indirect Reference, provide the @ symbol followed by a variable name where a variable is
expected. The actual variable name does not contain the @ symbol. The @ symbol, when used before the
variable, indicates that the variable is treated as an Indirect Reference. The @ symbol is an operator with
the lowest precedence and the indirection operation takes place before other operations or calculations.
The following examples are valid Indirect References:
@R0001 : Global, scalar variable
@MyArray[2, 5] : Array element reference
@$MainRegisterLocation : Universal Variable
@MyStructure.Struct_Idx : Structure element

4-36 GFS-426B
GE Intelligent Platforms PACSystems Programming

In the Structured Text example below, the logic uses the My_Register Indirect Reference to assign a value to
a range of memory locations. This is similar to programming using variable indexes on arrays.

Figure 46: Example of Indirect Reference in Structured Text

Online Display of Indirect References


The LD, ST, and FBD editors display the Indirect Reference as an unsigned value, not as the type of the
underlying variable.

Figure 47: Indirect Reference Online Value in Structured Text

When displaying the value of an indirect reference while online, the editor shows the variable value as if it
were not being used indirectly. In the example above, My_Register has the value of 5000. Therefore,
@My_Register points to %R5000.

GFS-426B 4-37
PACSystems Programming GE Intelligent Platforms

Lab Exercises
The labs in this module are intended to teach how to use Mapped, Symbolic, and Alias Variables, and to
show how to work with variables of different scopes.
These exercises start with the My Demo Project that was created in the Working with PACSystems
Controllers module.

Lab Exercise #1: Mapped Variables


1. In the Navigator window, Open the _MAIN block for editing.

2. Enter the following rung of logic using the LD editor:

3. Double-click on the first closed contact to


open the Variable Smart List.

4-38 GFS-426B
GE Intelligent Platforms PACSystems Programming

4. Type in the variable name Stop_PB1.

5. Press the Enter key. The variable Stop_PB1 has now been assigned to the normally closed contact.

6. Enter the remaining variables as shown:

7. At this point, all of the new variables are Symbolic Variables since they have not been assigned a
Reference Address.
8. Assign a Reference Address to each of the variables used. Select the contact assigned to Stop_PB1.

GFS-426B 4-39
PACSystems Programming GE Intelligent Platforms

9. The properties of this variable are now


displayed in the Inspector window.
The Ref Address field is blank since no
reference address has been assigned.

10. Click in the blank field to the right of the Ref


Address attribute:

4-40 GFS-426B
GE Intelligent Platforms PACSystems Programming

11. There are two ways to assign a reference


address to this variable.
The first is to simply type the reference
address into the blank field and press the
Enter key.
Type in %I1 as the Reference Address. This
assigns the address to the Mapped Variable.

12. The second way to assign a reference address is to click on the button next to the blank field. This
opens the Reference Address Wizard.

13. In the field labeled Index, the actual address number can be entered. Enter 1 as the address and click
the OK button. The result is the same as the first method. The address %I00001 has now been
associated with the variable Stop_PB1,as shown below the Normally Closed Contact.

GFS-426B 4-41
PACSystems Programming GE Intelligent Platforms

14. Next, enter reference addresses for the rest of the instructions in the rung to match the logic below.
Use either of the two methods shown above.

15. Next, use the following steps to Download the Logic to the controller. See the Working with
PACSystems Controller Module if you need help with these steps.
i. Go Online with the controller.
ii. Select Programmer Mode (Target icon is green).
iii. If the PLC is in Run mode, Stop the Controller.
iv. Download the logic to the Controller.
v. Start the Controller.
16. Verify that the logic is operating by turning On the second switch (%I00002) on the Input Simulator
Module. This should cause the first output on the discrete output module to turn On (%Q00001).
After verifying that the logic is working properly, turn off all switches on the Input simulator module.

17. Select the Normally Closed Contact from the Instruction Toolbar.

18. Click in the cell to the right of the contact labeled Start_PB1 to add a new Normally Closed Contact
to the logic.

4-42 GFS-426B
GE Intelligent Platforms PACSystems Programming

19. Select the option to Enter Test Edit mode.


20. Double-click on the new contact and enter the following: Interlock,%I4.

21. Press enter. The new variable is created and assigned to reference address %I00004. This is a short
cut method of assigning Reference Addresses when creating variables on the fly. If you enter simply
Interlock,%I the programmer will assign the next free %I memory location to the variable.

22. Select the Debug Accept Edit menu item to write your changes to the Controller.

Note
If you type the address associated with a Mapped Variable in the logic editor, the variable name mapped
to that address will be assigned and displayed.

GFS-426B 4-43
PACSystems Programming GE Intelligent Platforms

Lab Exercise #2: Symbolic Variables


1. Enter the following logic for Rung 2, but do not assign Reference Addresses to the variables.
You will notice in the picture that the variables in Rung 1 have reference address assignments, while
the variables in Rung 2 do not. This is a quick way to determine which variables are Mapped and
which are Symbolic.

2. You may now exercise the logic in Rung 2 in a similar fashion as you did with the Mapped Variables in
Rung 1. But since the Symbolic Variables are not mapped to an Input or Output point, you need other
ways to modify the state of these variables.
Use the LD Editor right-click
Turn ON menu to change the
state of the variables. Watch
the resulting logic execution.
You may use the F12 key to
toggle the On/Off state of
these variables.
You may turn the Variables
Force state On and Off using
the right-click Force ON/OFF
menus or the F11 key.

3. An example of the logic executing with Symbolic Variables is shown below:

4-44 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #3: Global and Local Variables


Global Variables
The variables that you created in the previous lab exercise were Global Variables. These variables are
available for use throughout the entire controller application and may be referenced directly in all logic
blocks. When you see the Global Variable name in the logic editors, you will notice that the font is non-
Italic. All of the variables in Rung 1 are Global Variables, as noted by their non-italic font.

Global Variables are indicated in the


Variable Smart List with ",G" following their
name.
For example, if you double-click on the
Stop_PB1 variable in the LD Editor, the
Smart Variable List displays the Global
Variables as shown.

Local Variables
Local Variables are indicated in the Variable Smart List with a ",L" following their name.
You can create variables that are Locally scoped to a specific, individual logic block. These
variables are not available for use throughout the entire controller application and may be
referenced directly only in the logic block where they reside. When you see a Local variable name
in the logic editors, you will notice that the variable font is in Italics.
Local Variables may be defined for any type of Block and with any programming language.

Use of Global and Local Variables


Use of Local, Symbolic Variables is a good technique to confine the scope of information within the block
to provide easy portability of logic between applications.

GFS-426B 4-45
PACSystems Programming GE Intelligent Platforms

1. Create a new LD Block named SUB_1.

2. Open the block and add a rung of logic as shown below:

3. Double-click on the Contact logic element and enter the following for the variable name to be
assigned to the instruction: Local_Switch,%I10,L , making sure that you enter the commas.
Notice that the text color is green, indicating that the variable name and address are valid and- that
a new variable will be created.

4. Press Enter to create the new Local Variable and assign the variable to the contact.
This will create a new Local, Mapped Variable that is mapped to %I00010.

4-46 GFS-426B
GE Intelligent Platforms PACSystems Programming

Notices how the variable is displayed in the logic in italicized text to denote it as a Local Variable.
5. Enter the following for the Coil logic element: Local_Valve,%Q10,L.

6. Notice the two Local Variables in this updated rung.


Also notice how Retentive and Non-retentive is also indicated with Non-bold and Bold text.
The Local_Value variable is a Local, Non-retentive variable:

7. Now observe how Local Variables look from


outside the scope of the SUB_1 block.
Open the _MAIN block and click on the
Variable List tab in the Navigator.
Notice that the local variable names are
preceded by the SUB_1 block name.

8. Add the following rung of logic to the _MAIN Program Block.

GFS-426B 4-47
PACSystems Programming GE Intelligent Platforms

9. Drag-and-drop the two Local Variables, SUB_1.Local_Switch and SUB_1.Local_Valve, from the
Variable List to the Contact and Coil instructions in the _MAIN logic:

10. Note that the block name, SUB_1, where the Local Variable resides is part of the variable name.
This alerts you that this is a Local Variable being used outside of its intended scope.

The use of Local Variables outside of their logic


block can either be allowed or prevented.
This is controlled by the Check Local Names
preference in the Controller General properties
under the Navigator Options tab.
If you wish to prevent local variables from being
used outside of their logic block, set this preference
to Show as Error, which is the default setting.

Note
The use of Locally Scoped Variables outside of
their logic block is not considered good
programming practice since it forms a
dependency between logic blocks.

4-48 GFS-426B
GE Intelligent Platforms PACSystems Programming

Alias Variables
An Alias Variable is a variable that references another variable or another variable component such an
array or structure element. Alias variables are often used to provide a descriptive variable name to an
individual array element.
An alias variable is tied to a variable name, not its memory location. This means that if the base variable
memory location changes, the alias relationship remains intact.
You will examine how to leverage alias variables when using a PID Instance variable.
1. Delete the rungs of logic in the _MAIN program block.
2. Delete the Sub_1 program block that you created previously.
3. Click on the Variables menu and select the Delete Unused Variables menu. This will place the Project
in an empty state.

4. Add a PID_ISA instruction and logic to the


_MAIN block as shown.
5. Create Symbolic, Global variables and
assign them as Input and Output Operands.
6. Notice that the Instance Variable for the
PID instruction is filled with "????" to indicate
that it has not yet been assigned.

GFS-426B 4-49
PACSystems Programming GE Intelligent Platforms

7. Double-click on the PID instruction and enter a new Instance Variable named "PID_Main".

This will create a 40 Word array named


PID_Main that will be used by the
controller to operate the PID loop.
The new instance variable is displayed
in the Variable List.

8. The PID function block uses 40 consecutive word memory locations to operate the PID loop.
To access this information in the application program, it can be accessed using array element
references such as PID_Main[1] and PID_Main[8]. This is not the most convenient method to access
the PID information since there is no description of the individual PID data element.
This is where the Alias variable can be helpful.
9. For example, if you want to access the Upper Clamp and Lower Clamp elements for this PID loop, they
are defined as follows:

4-50 GFS-426B
GE Intelligent Platforms PACSystems Programming

PID Instance Data Parameter location Description


%REF+0009 CV Counts. Integer, 32768 to
Upper Clamp +32767. (Must be greater than
%Ref+10.) Output limit.
%REF+0010 CV Counts. Integer, 32768 to
Lower Clamp +32767. (Must be less than
%Ref+09.) Output limit.

In this case, these elements would be access using array elements PID_Main[9] and PID_Main[10].
10. Now, create two Alias Variables to make it easy to access information from this PID loop. Create alias
variables named PID_Main_Upper_Clamp and PID_Main_Lower_Clamp.
From the Variables menu select New Variable INT.

11. A new variable is created in the list as an INT.


Rename the variable to PID_Main_Upper_Clamp.

12. Duplicate this variable and change the name to


PID_Main_Lower_Clamp.

13. Now, link the new variables to PID_Main array elements to create alias variables.
If it is not displayed, open the Inspector for the variable.

GFS-426B 4-51
PACSystems Programming GE Intelligent Platforms

14. Select the Ref Address attribute and then click on the button to open the Reference Address
Wizard.

15. Select the Alias variable to: field and scroll down the list to the PID_Main[10] element to link this
variable to the 11th array element in the PID_Main array.

16. Press the OK button.


Notice the change in the Ref Address
properties:

17. Repeat this procedure for the variable named PID_Main_Upper_Clamp, linking it to PID_Main[9] .
18. Now you can use these alias variables to access the PID information in your logic.

4-52 GFS-426B
GE Intelligent Platforms PACSystems Programming

For example, if you wanted to check to verify that the Upper Clamp was greater than the Lower Clamp,
create the following logic.
Drag-and-drop the Upper Clamp and Lower Clamp alias variables from the Variable List to create the
logic.

Notice how the resolution of the Alias is displayed in the LD editor to show the base variable.

GFS-426B 4-53
PACSystems Programming GE Intelligent Platforms

Review Questions
1. What is a variable? What makes a "good" variable name?

2. Would 101_DPT be a valid variable name?

3. What is variable scope? What is the difference between Local and Global scopes?

4. What is an alias variable? Where are these useful?

5. How can you access an individual bit in a Word variable?

4-54 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review
In this module, you learned to:
Understand the concepts of Mapped, Symbolic, and IO Variables
Understand Universal, Local, Global, and Alias scoping for variables
Understand the various types of variables simple scalar, array, and structures
Understand the various ways to access Variable information bit in word, array element, indirect,
and structure element
Understand the various Variable attributes

GFS-426B 4-55
PACSystems Programming GE Intelligent Platforms

Frequently Used PACSystems System Variables


Some of the frequently used PACSystems System Variables are listed here. For a complete list of
PACSystems System Variables, see the Machine Edition System Variables: PACSystems Help topic.

Name Reference Description


Address
#ALW_OFF %S8 Always OFF.
#ALW_ON %S7 Always ON.
#ANY_FLT %SC9 Set to ON when any fault occurs.
Set to OFF when both fault tables have no entries.
#FST_EXE Stored in each Set to ON during the scan in which the block executes for the first time since the last
block. No Stop/Run transition.
address.
Set to OFF at all other times.
#FST_SCN %S1 Current scan is the first scan in which the main program executed. Set to ON the first
time the program is executed after a Stop/Run transition and Set to OFF upon
completion of its execution.
#LST_SCN %S2 Reset from 1 (ON) to 0 (OFF) when the current scan is the last scan.
#T_10MS %S3 0.01 second timer contact.
#T_100MS %S4 0.1 second timer contact.
#T_MIN %S6 1.0 minute timer contact.
#T_SEC %S5 1.0 second timer contact.
Table 4: Frequently Used PACSystems System Variables

PACSystems Fault Locating System Variables


Fault Locating System Variable Names are ten characters long so as to support a maximum of 32 slots
and 256 modules. Fault locating system variable names are formatted as:

Fault Reserved Comment Example


Type Name
Rack #RACK_000r Where r is rack number 0 through 7. #RACK_0001 represents rack
1.
Slot #SLOT_0rss Where r is rack number 0 through 7 and ss is slot #SLOT_0105 represents rack
number 00 through 31. 1, slot 5.
Bus #BUS_0rssb Where r is rack number 0 through 7, ss is slot #BUS_02041 represents rack
(Genius only) number 00 through 31, and b is Genius bus number 2, slot 4, bus 1.
1 or 2.
Module #M_rssbmmm Where r is rack number 0 through 7, ss is slot #M_2061028 represents rack
(Genius only) number 00 through 31, b is bus number 1 or 2, and 2, slot 6, bus 1, module 28.
mmm is module number 000 through 255.
Table 5: Fault Locating System Variables

4-56 GFS-426B
Table 0:

Module 5
Working with PACSystems Controllers

Work with PACSystems Controllers


Topics

Upon completion of this module, you should be able to:


Establish communications to the Controller over Serial and Ethernet connections
Validate and download the hardware configuration to the controller
Upload from the controller
Verify Controller equality
View the fault tables
View controller status information
Configure a PACSystems RX3i CPU Module
Configure a PACSystems RX3i Ethernet Module
Configure I/O Modules for a PACSystems RX3i system
Correlate physical I/O with data points in the controller
Identify and correct configuration errors
Export the hardware configuration file
Print a configuration report
PACSystems Programming GE Intelligent Platforms

Overview

Overview
Before you can interact with the PACSystems controller, you first need to establish a connection with the
controller using either a Serial interface or an Ethernet interface.
In most cases, the Ethernet interface is recommended because of its faster communication speed.

Connect to Controller via a Serial Port


1. Connect the serial cable to the serial port of your computer and to the serial connector on the
PACSystems RX3i Controller.

2. In the Project tab of the Navigator, right-click the Target whose direct connection you
want to configure and select Properties.

The Inspector opens with the Target properties.


If the Inspector is already open, the Target properties appear as soon as you select the Target node.
3. In the Inspector, select the Physical Port property and select the COM port that the communication
cable is plugged into.

Figure 1: Selecting Physical Port in Inspector

Note
In some cases, your PC may not have a serial port and you will need to use a USB to Serial conversion
cable to connect serially to the controller. You will need to set the Physical Port to the address of the USB
adapter.

5-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

Connect to Controller via Ethernet


Note
Before you can connect to the Controller via Ethernet, you need to have your PC Ethernet connection
configured to reside on the same network segment as your Controller(s).

1. Set the IP Address of your Ethernet port on your PC to be a User configured static IP address that is
on the same network segment as your control device.

Note
A static IP address is NOT required on your PC if the DHCP-supplied IP address is on the same network
subnet as the controller.

Using the Windows network


configuration tools, set the IP address for
your adapter to Use the following IP
address radio button and enter an
appropriate IP address and Subnet mask.
Suggestions are show in the example:

Figure 2: Setting IP Address and Subnet Mask

Note
Before you can connect to the Controller via Ethernet, you need to have an IP address assigned to the
Ethernet module. Normally, the Ethernet Module will get the IP Address from the Controller configuration
stored in the CPU module.
You can use the Set Temporary IP Address tool to establish an IP Address in the Ethernet Module in a
temporary manner to get communications going with the controller.
Once the IP Address has been assigned to the Controller communication can then be accomplished via
Ethernet.

GFS-426B 5-3
PACSystems Programming GE Intelligent Platforms

2. Open Machine Edition. If the Ethernet Module does not have an IP Address, launch the Set Temporary
IP Address tool from the Navigator Utilities tab.

Figure 3: Launching the Set Temporary IP Address Utility

3. In the Set Temporary IP Address tool, enter the


MAC Address of the Ethernet Module (located on
front of the module), enter the desired IP
Address, and press the Set IP button.

Figure 4: Entering a Temporary IP Address

5-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

4. When the IP Address has been successfully set,


this dialog is displayed.
Now you can establish an Ethernet connection to
the controller.

Figure 5: IP Address Successful Change Dialog

5. In the Project tab of the Navigator, right-click the Target that you wish to communicate to and select
Properties.

The Inspector opens with the Target properties.


If the Inspector is already open, the Target properties appear as soon as you select the Target node.
6. In the Inspector, select the Physical Port property and select ETHERNET.
7. Select the IP Address property and type in the
IP address that was assigned to the Controller
Target during hardware configuration.

Figure 6: Setting IP Address in Target Properties

GFS-426B 5-5
PACSystems Programming GE Intelligent Platforms

Go Online With a Controller


1. In the Project tab of the
Navigator, right-click the Target
Controller and select Go Online.

Figure 7: Target Right-click Go Online Menu

or-
Press the Online/Offline toolbar
button.

Figure 8: Online/Offline Toolbar Button

2. The Feedback Zone displays messages to indicate the connection with the controller.

Figure 9: Feedback Zone Window When Connecting to Controller

The Machine Edition Status Bar also indicates whether the Programmer is connected to the Controller.

Note
Only the Active Target can be online at any given time.
When you are online, you have full ability to interact with the Target.

5-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Validate a Machine Edition Project


The validation process checks all the components of a Target for errors. Any messages or errors found are
displayed in the Build tab of the Feedback Zone.
Each item in a Target has its own validation checklist for potential errors. Among other things, Machine
Edition ensures that properties for objects are within allowable ranges; that all objects referenced by other
objects actually exist; that the basic layout of each part of your Project is correct; etc.
You can perform a validation on one Target at a time, or you can validate all Targets at once. Any errors or
warnings that are found appear in the Build tab of the Feedback Zone.

For help on an error or warning, select it in the Build tab and help will appear in the Companion (if it is
open).
Press F4 to cycle through errors and warnings, locating each one in the Project.
Press Shift-F3 to cycle through just the errors.
While validating, building, and downloading the runtime files, Machine Edition creates several intermediate
files in a temporary folder. These files are reused in subsequent validation operations. Keeping these files
speeds up future validation operations, but they can get quite largeto save hard disk space, you may
want to delete the temporary files of Targets periodically by selecting the Project Clean All Build
Folders menu item.
The validation process is not guaranteed to find all errors in a Target. It does find all errors that prevent
Machine Edition from building the runtime files during the Download process.

Validate a Target
To Validate a Target, do one of the following:
To validate a Specific Target:
In the Project tab of the Navigator,

Right-click on the Target you want to validate and select Validate.


-or-
To validate the Active Target:
Select the File Validate Active Target menu.

-or-
To validate All Targets in the Project:

In the Project tab of the Navigator,


Right-click on the Project node and select Validate All.
Machine Edition checks everything within that Target for errors.

Any errors found appear in the Build tab of the Feedback Zone.
Double-click on an error to jump to the point in the Project where the error was found.
Press F4 to cycle through the errors and warnings.
Press Shift-F3 to cycle through just the errors.

GFS-426B 5-7
PACSystems Programming GE Intelligent Platforms

Download to a Controller
1. In the Project tab of the Navigator, right-click the Target Controller you want to download
to and select Go Online.
2. Once you are online with the Controller Target, right-click the Target Controller and select
Download to Controller.
The program saves the Project to the hard disk. It then performs a validation and downloads to the
Controller Target.

3. Select one or more download options:


Hardware Configuration and Motion:
Selecting this option downloads the
hardware configuration to the Target.
If the Target contains a DSM314 module, its
hardware configuration contains all the
motion logic as well ( CAM Blocks,
CAM Profiles, Local Logic blocks, and
Motion blocks).
If the Target contains a PACMotion (PMM335)
module, its hardware configuration contains
all the Active PACMotion Profiles as well.
Logic: Selecting this option downloads all
the logic blocks to the Target.
Initial/Forced Values: Selecting this option Figure 10: Download to Controller Dialog
downloads all the variable values to the
Target.

Upload From a Controller


1. In the Project tab of the Navigator,
right-click the Target Controller you
want to upload from and select Go Online.

2. In the Project tab of the Navigator,


right-click the Target Controller and
select Upload from Controller.
3. From the Upload from Controller Options
dialog, check one or more checkboxes to
select the data to upload from the
Controller and click OK.

Figure 11: Upload from Controller Dialog

5-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Verify Information Between a Project and a Controller


The Machine Edition status bar will indicate if the Hardware Configuration and/or the Logic components are
Not Equal (NE) between the Machine Edition Project and the Controller contents.
If these are Not Equal, the Verify operation is a useful tool to determine what specific components (logic
blocks for example) are different.

1. In the Project tab of the


Navigator, right-click the Target
Controller you want to upload from and
select Go Online.

2. In the Project tab of the


Navigator, right-click the Target
Controller and select Online Commands
Verify Equality.
3. In the Verify with Controller dialog,
check one or more checkboxes to select
the information to verify with the
Controller and click OK.

Figure 12: Verify with Controller Dialog

4. The results of the Verify operation are displayed in the Feedback Zone.

Figure 13: Verify Results Displayed in Feedback Zone

5. If there are LD Logic Blocks that are NOT EQUAL, you can display a detailed report of the differences.
This will produce a Rung-by-Rung comparison of the Logic in the Project and the Logic in the controller.

GFS-426B 5-9
PACSystems Programming GE Intelligent Platforms

To display the detailed comparison, select the LD Block name it the Feedback Zone and select the
Show Details right-click menu item.

Figure 14: Accessing Details of Logic Not Equal Verify Result

An example of a detailed Ladder Diagram report is below:

Figure 15: Ladder Diagram Comparison Report


The report will highlight the rung differences for easy comparison.

5-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

Clear Controller Contents


There are times when it is useful to clear some or all of the Controller memory contents. This may be a
useful tool when recovering from a controller or application failure.

1. In the Project tab of the


Navigator, right-click the Target
Controller you want to upload from and
select Go Online.

2. In the Project tab of the


Navigator, right-click the Target
Controller and select Online Commands
Clear.
You may also select the Reset Online
Toolbar button to initiate the Clear
operation.

Figure 16: Clear Memory Dialog

3. In the Clear Memory dialog, select the


Controller Items that you wish to clear.
Please note that some Controller Items
may only be selected if the controller is in
Stop Mode, Hardware Configuration for
example.

Figure 17: Clear Memory Dialog Selection to Clear Only Logic

4. After you click the OK button, a


confirmation dialog is displayed listing
the components that will be cleared.

Figure 18: Clear Memory Confirmation Dialog

GFS-426B 5-11
PACSystems Programming GE Intelligent Platforms

Work with Fault Tables


Once you are online with the Controller you can view the Controller and I/O Fault Tables.
1. To Open the Fault Tables, do one of the following:

In the Project tab of the Navigator, double-click the online Target Controller icon.

In the Project tab of the Navigator, right-click the online Target Controller icon, and select
Diagnostics.

In the Status bar, click the online Target Controller icon.


The Fault Table Viewer opens in the InfoViewer.

Figure 19: Controller Fault Table Viewer

Note
The Fault Table Viewer automatically closes when you select another InfoViewer help topic.

2. To Switch between the Controller and the I/O Fault Table:


In the left pane, select the appropriate radio button (Controller or I/O).

3. To Expand Fault Information:


Click the fault entry you want details on.
To set the Fault Extra Data's Format, select the appropriate radio button in the left pane (Byte, Word, or
ASCII).
4. To Sort the Fault Data:
Select one of the Sort Order radio buttons in the left pane (Location, Description, Date/Time, or None).

5-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

To sort in Ascending order, select the ASC radio button.


To sort in Descending order, select the DESC radio button.

5. To Clear a Fault Table:


Click the Clear Fault Table HTML link below the radio buttons in the left pane.
In the confirmation dialog box, click Yes.

6. To Print the Fault Tables:


Click the Print Fault Tables HTML link near the top of the left pane.
From the Microsoft Windows Print dialog box, select the print options and click OK.

View Target Controller Status Information


1. In the Project tab of the Navigator, right-click the online Target Controller whose device and
memory usage information you want to view.
2. On the right-click menu, select Online Commands and then choose Show Status.
In the dialog box that appears, select the appropriate tab for the information you wish to view.

Figure 20: Controller Status Dialog

GFS-426B 5-13
PACSystems Programming GE Intelligent Platforms

Go Offline From a Controller


1. In the Project tab of the
Navigator, right-click the online
Target Controller that you want to go
offline from and select Go Offline

Figure 21: Target Right-click Go Offline Menu

-or-
Press the Online/Offline toolbar
button.

Figure 22: Online/Offline Toolbar Button

Hardware Configuration Overview


The various hardware components that make up a PACSystems RX3i system must be configured by the
user prior to being used. This can sometimes mean simply selecting which module will be placed into
which slot of the rack or it can involve detailed configuration data that must be supplied by the user to
ensure that the module functions as desired. Many specialty modules require more in-depth configuration
than a standard module.
Follow the steps below to configure the hardware.

Select Rack(s)
It is important to select a main rack size that will accommodate all of the RX3i I/O and specialty modules
that must be placed in the main rack. All RX3i modules that begin with IC695 must be located in the main
rack.

5-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Select Power Supply


It is important to select the correct power supply to ensure that the available input voltage matches and
that an overload condition does not exist.

Select CPU Module


The next piece of hardware that is typically selected is the processor module or CPU. It is important that a
processor with enough memory, I/O capacity, and speed is selected for the job being done. Although
configuring a new processor is not difficult from a software perspective, it can get very costly if the wrong
processor was purchased and a new one needs to be purchased to replace it.

Select I/O Modules


I/O modules can be separated into two broad categories, Discrete I/O and Analog I/O.
In either case, it is important to note the starting address and the address range that is assigned to a
particular module. This is important when trying to determine exactly which terminals on an I/O module a
specific field device is wired to and which memory address corresponds to it.

Select Discrete I/O


Discrete I/O modules can accommodate many types of discrete devices. It is important to select modules
that support the right voltage range and, in the case of DC modules, the right logic type to support the field
devices being used.

Select Analog I/O


Analog I/O modules provide an interface for field devices that either require or provide analog signals.
Analog modules provide inputs and outputs with continuous values, as compared with digital input and
output modules that have discrete values of ON or OFF. Analog modules convert digital words to analog
signals, or analog signals to digital words, depending on whether the module is an output module or an
input module.
Typical analog signal types can be separated into two categories, voltage and current. The most common
voltage signals are 10 to +10 volts, 1 to 5 volts and 0 to 10 volts. The most common currents signals are 4
to 20 mA (milliamps) and 0 to 20 mA. GE Intelligent Platforms analog modules support all of these.

Note
As in the case of a 0 to 20 mA signal, there may be a jumper setting required on the hardware module
itself to set the proper operating range.

Select Communications
Communications modules provide an interface between the Controller and other devices such as HMIs and
field bus devices.

Select Motion
Motion modules such as PACMotion and High Speed Counter modules are used for motion control
applications.

GFS-426B 5-15
PACSystems Programming GE Intelligent Platforms

Lab Exercises
This exercise teaches how to connect to the Controller via Serial and Ethernet connections and how to Go
Online, Download, Upload and Go Offline. It also teaches how to view the Fault Tables and view
Controller Status information.

Lab Exercise #1: Establish an Ethernet Connection


In this lab exercise, you will be using the Project that was used in the module titled Operating Proficy Machine
Edition, the WWW_Pump_QPC_6inch_and_RX3ifinal Project.
1. Verify that the Ethernet cable
connects the computer to the
PACSystems Controller Ethernet
module in the RX3i rack.
2. Right-click on the RX3i Target and
select Go Online.

or-
Press the Online/Offline toolbar
button.

The Connecting... status dialog shows that a connection attempt is being made.

5-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

Once you have connected, the status dialog will close and your screen should look similar to the one
pictured below. The color of the Target icon shows the state of the connection. In this example the
color is dark blue to indicate Monitor Mode.

Status Bar
The Status Bar, at the bottom right corner of
the Machine Edition window, displays several
pieces of information about the Target:
From left to right on the Status Bar, these components include:
Online/Offline Monitor/Programmer Mode icon.
Click on this icon to display the Controller Fault Table.
Controller Status (Stop, Run, I/O Enabled/Disabled).
Equality Status (Hardware Configuration, Logic).
Controller Sweep (or Scan) Time in milliseconds.

Icon Online/Offline, Monitor/Programmer Status Color


Target Offline Dark Gray
Target Online, Monitor Mode, and Equal Blue

Target Online, Monitor Mode, and Unequal Blue

GFS-426B 5-17
PACSystems Programming GE Intelligent Platforms

Target Online, Monitor Mode, and Stop Faulted Blue

Target Online, Programmer Mode, and Equal Green


Target Online, Programmer Mode, and Unequal Green
Target Online, Programmer Mode, and Stop Faulted Green
Table 1: Online/Offline Monitor/Programmer Mode Icons

Controller Status
The Controller Status displays the current Controller state in the Status Bar at the bottom of the Machine
Edition window and in the Target properties in the Inspector window.

Controller Status Value Controller Status Description


Offline Target is Offline
Run Enabled Running with I/O Enabled
Run Disabled Running with I/O Disabled
Stop Enabled Stopped with I/O Enabled
Stop Disabled Stopped with I/O Disabled
Stop Faulted Stopped due to a Fault
CPU Halted CPU has Halted
CPU Suspended CPU has been Suspended
Table 2: Controller Status Values

Equality Status
The Status Bar also displays the Equality Status of the Hardware Configuration and of the Logic in the
message section.

Display Equality Status


Config EQ Hardware configuration Equal
Config NE Hardware configuration Not Equal
Logic EQ Logic Equal
Logic NE Logic Not Equal
Table 3: Status Bar Equality Status

5-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

Programmer Mode
If the Programmer is in Monitor Mode, you need to
switch to Programmer Mode by clicking on the green
hand icon on the Online Toolbar,
-or-
By selecting the Target right-click Online Commands
Set Programmer Mode menu.

There is a Machine Edition Online Mode Default preference that you can use to specify that Programmer
Mode should be the default connection mode.
1. To Stop the Controller, right-click on
the RX3i Target and select Online
Commands Stop Controller
(unless the Controller is already
stopped)
-or-
Press the Stop toolbar button.

2. The Stop Controller dialog appears.


3. Select Outputs Disabled and click OK to continue.

GFS-426B 5-19
PACSystems Programming GE Intelligent Platforms

Lab Exercise #2: Validate and Download to a Controller


1. Right-click on the RX3i Target and select
Validate.
Now the Target will be validated to ensure
there are no errors in the Hardware
Configuration or logic.

The validation progress will be displayed in the Build in Progress dialog.

The Feedback Zone shows the result of the validation process.

5-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

2. Next, right-click on the RX3i Target and select


Download to Controller.

3. Select to download Hardware Configuration


and Motion and Logic options. Click OK.

The Build in Progress dialog shows the download progress.

The Feedback Zone shows the results of the download attempt.

GFS-426B 5-21
PACSystems Programming GE Intelligent Platforms

4. Right-click on the RX3i Target and


select Online Commands Start
Controller
-or-
Press the Start Active Target
Toolbar button.

5. Click OK in the Start Controller


dialog to start the controller with
Outputs Enabled.

The Feedback Zone shows the result of the start controller attempt.

The Status Bar shows that the Controller is running with Outputs Enabled.

5-22 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #3: Upload from a Controller


1. Right-click on the RX3i Target and
select the Upload from Controller...
menu.

2. Select Hardware Configuration and


Motion and Logic to be uploaded.
Click OK.

3. The Uploading from the connected device dialog shows the upload progress.

The Feedback Zone displays the upload results.

GFS-426B 5-23
PACSystems Programming GE Intelligent Platforms

Lab Exercise #4: View Fault Tables


GE Intelligent Platforms PACSystems Controllers have built-in diagnostic capabilities that can report the
status of Controller and I/O Faults.

1. To access the Fault Tables, go online


with the Controller.
2. Right-click on the RX3i Target and
select Diagnostics
-or-

Click on the Status Bar Target icon.

This will open the Fault Table Viewer. This window shows all of the faults that have occurred and
allows the resetting of those faults.
The rack and slot location (rack.slot) of the module where the fault occurred is given in the first column
(Loc).
The Fault Description and a time and date stamp (Date/Time) of when the fault occurred is also
displayed.
The Controller Faults and the I/O Faults are listed separately.

5-24 GFS-426B
GE Intelligent Platforms PACSystems Programming

3. Fault Tables can be printed prior to resetting by clicking on the text labeled Print Fault Tables.
4. Fault Tables can be cleared by clicking on the text labeled Clear Controller (I/O) Fault Table.
5. You can also clear the Fault Tables by selecting the Reset Toolbar button and selecting the Fault
Table components.
6. To change to the I/O Fault Table, select I/O in the box labeled Choose Fault Table.

GFS-426B 5-25
PACSystems Programming GE Intelligent Platforms

7. To clear a Fault Table, select the Clear Fault


Table link on the page. When clearing a Fault
Table, the following confirmation message
appears.
8. Click the Yes button to continue.

The Fault Table information in the Controller memory is then cleared. However, if the cause of the fault
condition has not been corrected, the fault will return if the Controller power is cycled.
The view below is of the Fault Table after it has been cleared.
The date and time that the Fault Table was Last Cleared is displayed at the top of the window.

You may also clear the Fault Tables using the online Clear menu or the Reset Toolbar button and
selecting the Fault Table components.

5-26 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #5: View Status Information


Controller Status information is available only when online with the Controller.
1. To view the status information,
right-click on the RX3i Target and
select Online Commands Show
Status.

The status information window


opens to display the Controller
Status information.
The first tab, General, shows the
CPU Model, Firmware Revision,
and Hardware Revision. This is
the information required when
determining if there is an update
available for the controller.
The Firmware Revision is the
version of the firmware that is
installed in the CPU. This is the
number that changes when a
firmware update is applied to the
Controller.
This dialog also shows the
Controller Target Name.

GFS-426B 5-27
PACSystems Programming GE Intelligent Platforms

2. If you press the Details button, the revision of all the hardware modules is displayed.

3. The Memory tab shows the total


amount of memory, the amount of
memory used by the Logic and the
available unused memory.

5-28 GFS-426B
GE Intelligent Platforms PACSystems Programming

4. The Reference tab provides


information about the number of
Reference Points, Reference
Words, and Managed Memory
that is available.

5. The Block Details tab that lists the


Controller Logic Blocks along with
their Logic and Data Sizes.

GFS-426B 5-29
PACSystems Programming GE Intelligent Platforms

6. The Date tab shows the date and


time of the Controller clock as well
as the date and time of the PC
clock (Host) that you are
connecting with.
The Controllers clock can be set by
clicking on the button labeled
Synchronize CPU to Host, or by
typing in a date and time in the
fields labeled New Date and New
Time and clicking the Apply button.

7. The Protection tab provides


information concerning security.
The default setting is Level Four
access with no OEM protection
lock.

5-30 GFS-426B
GE Intelligent Platforms PACSystems Programming

8. The Sweep tab shows the current


Controller Sweep Settings.
Changes to these settings can be
made from this screen.

9. Click the OK button to close the Status window.

Access Levels
The current Controller Access Level determines which operations may be performed using the
programming software.
There are four Access or Privilege Levels, 1 though 4.

Privilege Description
Level
Level 1 Any data, except passwords may be read. This includes all data memories (%I, %Q, %AQ, %R, etc.),
Fault Tables, and all Program Block types.
No values may be changed in the Controller.
Level 2 This level allows write access to the data memories (%I, %R, etc.).
Level 3 This level allows write access to the application program in STOP mode only.
Level 4 This is the default level for systems that have no passwords set.
The default level for a system with passwords is to the highest unprotected level. This level, the
highest, allows read and write access to all memories as well as passwords in both RUN and STOP
Mode.
Configuration data cannot be changed in RUN Mode.
Table 4: Controller Access or Privilege Levels

GFS-426B 5-31
PACSystems Programming GE Intelligent Platforms

Passwords
There is one password for each Privilege Level in the Controller.
No password can be set for Level 1 access.
Each password may be unique; however, the same password can be used for more than one level.
Passwords are one to four ASCII characters in length.
Passwords can only be entered or changed with the Programming Software.
A Privilege Level change is in effect only as long as communications between the Controller and the
Programmer are intact. There does not need to be any activity, but the communications link must not be
broken. If there is no communication for 15 minutes, the Privilege Level returns to the highest unprotected
level.
Upon connection with the Controller, the Programming Software requests the protection status of each
Privilege Level. The Programming Software then requests the Controller to move to the highest
unprotected level, thereby giving the Programming Software access to the highest unprotected level
without having to request any particular level.

Privilege Level Change Requests


A user requests a Privilege Level change by supplying the new Privilege Level and the Password for that
Level. A Privilege Level change is denied if the password does not agree with the password stored in the
Controllers password access table for the requested level. In this case, the current Privilege Level is
maintained and no change will occur.

OEM Protection
The OEM Protection feature is similar to the Passwords and Privilege Levels and provides an even higher
level of security. The feature is enabled or disabled using a Password of 1 to 7 characters called the OEM
Key. When OEM protection is enabled, no write-access to the Controller Program and Configuration is
permitted. Reading the configuration from the Controller is permitted. In this mode, no user flash
operations are allowed.
When the OEM Key Password has been created, the OEM Key can be locked in two ways:
By choosing the OEM Protection - Locked setting from the Programming Software.
By power-cycling the Controller.

5-32 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #6: Go Offline


1. To go offline with the Target, right-click
on the RX3i Target and select the Go
Offline menu
-or-

-or-
Press the Online/Offline toolbar
button.

The Feedback Zone shows the current status as "Disconnected from the Device".

GFS-426B 5-33
PACSystems Programming GE Intelligent Platforms

Hardware Configuration Lab Exercises


These exercises show how to configure the PACSystems RX3i hardware that will be used in the class.
A Machine Edition Project needs to have at least one Target. When a Target is added to a Project, a default
Hardware Configuration is created for the Target. After a Target has been created, the Target type can be
changed and the Hardware Configuration can be changed. This makes it easy to create a Project even
when the user is unsure what type of processor or hardware will eventually be used.
In this exercise you will modify the existing Hardware Configuration so that it matches the actual hardware
that is in the rack that you are using.

Lab Exercise #7: Power Supply Configuration


1. Create a new Project named My
Demo Project using the GE
Intelligent Platforms PACSystems
RX3i Project Template.

5-34 GFS-426B
GE Intelligent Platforms PACSystems Programming

2. The new Project contents will look


like this :

3. Rename the RX3i Controller Target,


Target1, to RX3i:

GFS-426B 5-35
PACSystems Programming GE Intelligent Platforms

4. From within the Navigator window,


expand the Hardware
Configuration by clicking on the +
sign next to Rack 0

The first module in the expanded list, IC695PSA040, is the Power Supply. Look at the part number of
the Power Supply that is currently configured to see if it matches the part number of the power supply
in the rack.

5. If the current Power Supply needs


to be replaced in the configuration,
right-click on the existing Power
Supply and select Replace
Module... .

5-36 GFS-426B
GE Intelligent Platforms PACSystems Programming

6. Select the proper Power Supply,


IC695PSD040, from the Module
Catalog dialog.
Click the OK button.

Now the new module is displayed


in the navigator.

Once the power supply is selected, the Parameter Editor window opens to display the power provided
by the module.

GFS-426B 5-37
PACSystems Programming GE Intelligent Platforms

Power Consumption
Detailed information about the Power
consumption in the RX3i rack is
displayed in the Inspector window
when the Power Supply is selected. In
this example, 20.56% of +3.3 VDC is
consumed by the modules in the rack.

5-38 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #8: CPU Configuration


1. Notice that the CPU is located in Slots 2
and 3, but that the physical module is
located in Slots 1 and 2.

2. Drag-and-drop the CPU module to Slots


1 and 2.

3. If the CPU used is a CPU310, then right-click on the Slot 1 node and select Configure.
Otherwise, right-click on Slot 1 and select Replace Module and choose the appropriate CPU module
from the catalog.

GFS-426B 5-39
PACSystems Programming GE Intelligent Platforms

4. Right-click on the CPU module and


select the Configure menu.
After clicking on the Configure
menu, the parameter window will
open. The first tab is labeled
Settings. The CPU parameters are
displayed below.

5. The detailed description of the CPU parameters is described in the Machine Edition Help. To display
the Help, press the F1 key.

5-40 GFS-426B
GE Intelligent Platforms PACSystems Programming

6. A mini version of the online Help information is also provided in the Machine Edition Companion
window as you navigate the configuration parameters.
For example, if you select the Watchdog Timer CPU parameter, the following information about this
parameter is displayed in the Companion.

GFS-426B 5-41
PACSystems Programming GE Intelligent Platforms

Lab Exercise #9: Ethernet Module Configuration


The RX3i Ethernet module is used to communicate with the Programmer and HMI.
The Ethernet module should be added to
Slot 3.
1. Select Slot 3, right-click and select the
Add Module menu.

2. Select the Ethernet Interface Module, IC695ETM001, from the Communications tab of the module
Catalog dialog.

5-42 GFS-426B
GE Intelligent Platforms PACSystems Programming

After the module is added to the rack, the module's configuration will be opened in the InfoViewer.

The red beside the Ethernet module in Slot 3, indicates a module parameter error exists.
Also note that the IP Address parameter is displayed in red, indicating an invalid parameter.
3. Enter a valid IP address for the IP Address and Subnet Mask parameters.
Select the IP Address parameter value and enter: 192.168.123.102.
Select the Subnet Mask parameter value and enter: 255.255.255.000.

GFS-426B 5-43
PACSystems Programming GE Intelligent Platforms

Notice that the values are displayed in black and that the red in the Navigator has disappeared,
indicating that the modules parameters are valid.
1. An important Ethernet module parameter is the Status Address that specifies the location of LAN
Interface (LIS) and Channel Status bits that are updated by the Ethernet module. The LIS bits are the
first 16 bits of the Status Address. The Channel Status bits are the last 64 bits of the Status Address.

Note
Do not use the 80-bits assigned to the Status bits for other purposes as your data will be overwritten.

To modify the Status Address


parameters value, right-click on
the parameters value and select
the Data Entry Tool menu item.

The Reference Address data entry tool


shows available ranges of references:

5-44 GFS-426B
GE Intelligent Platforms PACSystems Programming

2. Select %I20001 for the location of the


Ethernet Status Address by typing this
address into the entry field.

The new Status Address is now displayed in the value field.

Therefore, the Ethernet module status will consume 80 bits starting at %I20001.

GFS-426B 5-45
PACSystems Programming GE Intelligent Platforms

I/O Module Configuration


Now that the Power Supply, CPU, and Ethernet modules have been configured, the I/O and other modules
need to be configured.

Note
Your Hardware configuration may not be identical to this example, therefore be sure that a configuration
that suits your simulator has been built.

The contents of the demo rack that you are using should be similar to:

Slot 0 IC695PSD040 Power Supply


Slot 1 & 2 IC695CPU310 CPU
Slot 3 IC695ETM001 Ethernet Interface Module
Slot 4 IC694ACC300 Input Simulator Module 16 discrete input switches
Slot 5 IC694MDL754 Output Module with ESCP - 32 circuit
Slot 6 IC695HSC304 High Speed Counter Module 4 Counters
Slot 7 IC695ALG600 Universal Analog Input Module 8 Channels
Slot 8 IC695ALG704 Output Analog Voltage/Current Module - 4 Channel
Slot 9 IC695CMM002 Serial Communications Module - 2 ports
Slot 10 Empty
Slot 11 IC694DSM324 Digital Servo Motion Module 4 Servos
Slot 12 IC695LRE001 Serial Bus Transmitter Module

Lab Exercise #10: Discrete Input Module


1. n the Navigator window, right-click on the
slot (I.e. Slot 4) where the discrete input
simulator module is located and select the
Add Module menu.

5-46 GFS-426B
GE Intelligent Platforms PACSystems Programming

2. Select the IC694ACC300 Input Simulator Module from the list of Input modules available from the
Module Catalog.

The Parameter Editor window for the module will open.

The parameters for the module are displayed. The Reference Address parameter indicates what
memory locations in the controller will be assigned to this module. In this case, the simulator module is
assigned to reference addresses %I81 through %I96, utilizing a total of 16 bits.

GFS-426B 5-47
PACSystems Programming GE Intelligent Platforms

Lab Exercise #11: Discrete Output Module


1. In the Navigator window, right-click on
the slot (I.e. Slot 5) where the discrete
output module is located and select the
Add Module... menu.

2. In the Module Catalog, go to the Discrete Output tab.


3. Select the module that corresponds to your hardware configuration.

5-48 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #12: Add Remaining Modules


In the Hardware Configuration, add the
remaining modules to complete the
configuration.
The Hardware Configuration should be
similar to the one shown here.
Notice the asterisks "*" at the end of each
module number.
These indicate that the modules
configuration has been modified and has
not been saved.

GFS-426B 5-49
PACSystems Programming GE Intelligent Platforms

Lab Exercise #13: Analog Input Data Configuration


1. When configuring the ALG600 Analog Input module, there are some important aspects to consider
when mapping the modules analog data into controller memory.
When you configure the ALG600 module, you may select 16 Bit Integer or 32 Bit Floating Point for the
Channel Value Format parameter for each Channel:

In the 16 Bit Integer Mode, the ALG600 module will update 16-bits of analog information for the
analog channel.
In the 32 Bit Floating Point Mode, the ALG600 module will update 32-bits of analog information for the
analog channel. This configuration option is available for each individual analog channel.

Note
Each analog channel consumes 32 bits or two words (two 16-bit registers) of memory, whether the
channel is used or not. The ALG600 analog input module always consumes 20 words (or 320 bits) of
controller memory.

The channels are mapped to the following bits or words in the following order:

Analog Channel Bits Words


Channel 1 +0 through +31 +0 and +1
Channel 2 +32 through +63 +2 and +3
Channel 3 +64 through +95 +4 and +5
Channel 4 +96 through +127 +6 and +7
Channel 5 +128 through +159 +8 and +9
Channel 6 +160 through +191 +10 and +11
Channel 7 +192 through +223 +12 and +13
Channel 8 +224 through +255 +14 and +15
CJC 1 +256 through +287 +16 and +17
CJC 2 +288 through +319 +18 and +19

5-50 GFS-426B
GE Intelligent Platforms PACSystems Programming

Note
If Channel is configured for 16 Bit Integer mode, then top word of Channel (top 16 bits) is unused.

For example, if you configure an ALG600 module for 4 channels of 16 Bit Integer data starting at
%AI00141, and you map that data to an Array, the Channel information would be mapped as follows:

2. Next, save the configuration by


clicking on the File Save
Project menu.

GFS-426B 5-51
PACSystems Programming GE Intelligent Platforms

Lab Exercise #14: Hardware Reference View


The Hardware Reference View displays all the reference address mappings in the controller system.

1. Select the Hardware


Configuration View menu
to display the module
memory map.

The reference view for %AI memory is displayed using the %AI tab of the view:

The reference indicates that an error exists for the ALG600 module in Slot 7.
Its ending %AI Reference Address exceeds the %AI Limit of %AI0064.

5-52 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #15: Correct Configuration Errors


If there are configuration errors, there is an indication in the Hardware Configuration in the Navigator.
When the Project is Validated, the errors are listed in the Feedback Zone.
In the configuration below, the red indicates that configuration errors exist:

1. Now, if you Validate


the Project,
configuration
parameter errors and
warnings will be
displayed in the
Feedback Zone.
To Validate the Project,
select the Project
Validate All menu item
-or-
press Ctrl+F7.

GFS-426B 5-53
PACSystems Programming GE Intelligent Platforms

Any errors and warnings will be reported in the Feedback Zone.

In this case, the %AI Reference Address for the IC695ALG600 module in Slot 7 exceeds the Analog
Input Reference Limit of 64 memory configured in the CPU.
64 is the default %AI Reference Limit. You will need to change the CPU Analog Input Memory Size to
accommodate the Analog Input module configurations.
2. Double-click on the CPU module to open its configuration.

3. Select the Memory tab to display the CPU memory configuration.


4. Change the %AI Analog Input size from 64 to 1024, for example:

5-54 GFS-426B
GE Intelligent Platforms PACSystems Programming

Notice that the red disappears from the Navigator.


5. Now check the Hardware Reference View to verify that the error is corrected.

Now your Project will Validate with no Configuration Errors or Warnings.


6. In some cases, you can also use the Auto Correct function to let Machine Edition correct the
configuration error for you.
Select the right-click Auto Correct menu to correct the parameter value.

GFS-426B 5-55
PACSystems Programming GE Intelligent Platforms

If a module is configured for the wrong slot, a download to the controller will still be allowed. However,
a non-fatal fault will be recorded in the I/O Fault Table.

5-56 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #16: Export Hardware Configuration


The Hardware Configuration of a Controller Target may be exported to a file. This can be very useful if a
particular Hardware Configuration will be used several times. This can be used for other Targets within the
same Project or for Targets within other Projects.
The exported Hardware Configuration file can be imported, resulting in saving a lot of configuration time.
1. To export the Hardware
Configuration, select the
Hardware Configuration node in
the Navigator, then select the
Export to File right-click menu.

2. The Export Hardware Configuration dialog is displayed.


Select the folder where the file will be saved and type in the name to be given to the exported file. In
this example, the export file will be named My Favorite RX3i.hwc.
This file can now be imported into other controller Targets.

GFS-426B 5-57
PACSystems Programming GE Intelligent Platforms

Lab Exercise #17: Import Hardware Configuration


1. To import from Hardware
Configuration files, right-click on
the Hardware Configuration node
and select the Import from File
menu.

2. Select the file to be imported and click on the Open button to proceed.

The Hardware Configuration will replace the configuration in the Project with the configuration in the
file.

5-58 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #18: Hardware Configuration Report


1. Right-click on the
Hardware Configuration
node and select the
Hardware Configuration
Report menu to create a
report that details the
configuration.

The Hardware Configuration Report opens in the InfoViewer window. The report can be viewed here
by scrolling down through it using the arrow scroll buttons.

GFS-426B 5-59
PACSystems Programming GE Intelligent Platforms

2. To print the report that is in the InfoViewer window, select the right-click Print menu.

-Or-
Select the File Print menu to print the active Machine Edition window:

5-60 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review Questions
1. What is the purpose of validation?

2. Where are errors and warnings displayed?

3. Can you download to a Controller Target if you are offline?

4. Can Controller fault tables be cleared while offline?

5. Where are the results of a download attempt displayed?

6. What does the Hardware Reference View display?

7. How can you tell if there is an error in your hardware configuration?

8. How can you tell what modules may be installed in a particular slot?

9. How can you tell if the power supplied to a rack is adequate?

10. How many words of controller memory does the ALG600 module consume?

11. How do you increase the amount of analog inputs in the system?

GFS-426B 5-61
PACSystems Programming GE Intelligent Platforms

Review
In this module, you learned to:
Establish communications to the Controller over Serial and Ethernet connections
Validate and download a hardware configuration to the controller
Upload a from the controller
View the fault tables
View controller status information
Configure a PACSystems RX3i CPU Module
Configure I/O Modules for an RX3i system
Correlate physical I/O with data points in the controller
Identify and correct configuration errors
Export the hardware configuration file
Print a configuration report

5-62 GFS-426B
Table 0:

Module 6
Monitoring & Changing Application Logic

Monitor and Change Application Logic


Topics

Upon completion of this module, you should be able to:


Monitor programs using online logic monitoring, Data Watches, Reference View Tables, and Data Monitor
Program changes to applications while the controller is running
Understand online Change Methods: Word-for-Word, Run Mode Store, and Test Edit
Understand considerations when making online changes for User Defined Function Blocks and Symbolic
Variables
Configure the ladder diagram editor options
PACSystems Programming GE Intelligent Platforms

Overview

Overview
This module discusses how to monitor and modify control applications using Proficy Machine Edition and
PACSystems controllers. Machine Edition provides a comprehensive set of monitoring and modification
tools to aid in the development, deployment, and debugging of your PACSystems controller application.

Monitor Applications
Machine Edition has several tools to monitor control applications, including Monitor Online Logic, Data
Watch, Reference View Table, and Data Monitor.

Monitor Logic
Your application logic may be monitored directly in the Logic Editors as long as you are connected to the
controller and- the Logic in the controller is Equal to the logic in the Project.
You may monitor Ladder Diagram, Function Block Diagram, and Structured Text logic in the PACSystems
Controller. C Blocks cannot be monitored directly in an editor.
When monitoring Ladder Diagram logic, the discrete logic element state (On/Off) is energized by a green
highlight, and analog values are displayed numerically.
When monitoring Function Blocks Diagram logic, the discrete logic element states (On/Off) are shown as On
and Off, and analog values are displayed numerically. Intermediate signals values between instructions are
also displayed in FBD logic, one advantage over LD logic.
When monitoring Structured Text logic, the cursor tooltip is used to display the online values of variables in
the ST Editor.

Figure 1: Example of Logic Monitoring

6-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

Data Watch Lists


A Data Watch is a handy tool to watch a list of application variables in the controller.
To watch a variable, simply select the variable anywhere in Machine Edition (in the Logic or variable
List, for example), and type Ctrl+W or select the Watch menu item. The variable(s) will be added
to the Data Watch and will display in real time as long as the Logic in the Programmer is equal to
the logic in the controller.
You can also create, name, and save your own Data Watch Lists if you find that you are "watching"
the same information over and over again.
Data Watch Lists may be saved as part of your Project, but they are not stored in the controller.

Figure 2: Example of Data Watch

Reference View Tables


Reference View Tables (RVTs) are good tools to monitor large amounts of reference data such as %W
memory, in a small amount of space.
RVTS are the most dense data display in Machine Edition.
There are a set of pre-defined RVTs in the Project to make it easy to access the controller reference
tables, and you can also define your own RVTs.
RVTs that you create are saved as part of your Project, but they are not stored in the controller.

Figure 3: Example of Reference View Table

GFS-426B 6-3
PACSystems Programming GE Intelligent Platforms

Data Monitor
The Data Monitor is used to trend the controller data in real-time.
To create a Data Monitor trend, open the Data Monitor tool and then drag-and-drop variable(s) that
you want to trend to the tool.
You may monitor analog and discrete values all on the same trend chart.
The Data Monitor data is not saved and the list of variables being monitored is not saved in the
Project.

Figure 4: Example of Data Monitor Tool

Online Application Modification


Machine Edition has several tools to change the RX3i control application while it is executing in the
controller. This provides a set of tools that can be used to update the application program without stopping
the process.

Word-for-Word Modification
Word-for-Word Modification may used to change a single control element such as a contact or instruction
quickly in the Controller.

Run Mode Store Modification


Run Mode Store operations are used to make more significant changes to the control application that may
involve several Blocks. This type of change may also be used to add, replace, or remove entire Blocks in the
Controller.

6-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

Test Edit Modification


Test Edit operations are used to make changes to the contents of a single block. This operation can easily
be backed out of the controller to revert to the previous logic if you do not like the operation of the change
you made. The Debug menu is used to manage the Test Edit operations.

Ladder Diagram Editor Options


Logic Developer PLC provides several options
to affect the way that the LD logic is displayed
in the editor.
The View menu is used to determine how
descriptions are displayed as shown here.
The View menu selections will determine the
height of the LD grid in the LD Editor. The Brief
selection for Descriptions will display a single
line of description text.

The Ladder View Options in the Navigator also The Font and Colors options allow you to customize
determine how logic is displayed in the LD editor. your LD editor display.

Figure 6: Ladder Editor Font and Color Options

Figure 5: Ladder Editor View Options

GFS-426B 6-5
PACSystems Programming GE Intelligent Platforms

Lab Exercises
These exercises are designed to demonstrate how to:
Monitor information associated with your control applications.
Modify an application while it is running in the controller.

Lab Exercise #1: Monitor Logic


1. Begin by double-clicking on the Project named UDFB_Start_Warning in the Navigator Project window.
This is a Project that you used earlier in this course.
2. Go online with the controller and Download the Logic to the controller.
3. Go to the _MAIN logic block, and double-click on the first Start_Warning UDFB with the Instance
Name Conveyor_1. This will open the Start_Warning UDFB with the context of the calling block. You can
now examine the parameters that are being passed into the UDFB.

4. Notice how the state of the Boolean variables and parameters is indicated on the discrete logic
elements by the green color. Also note the yellow thunderbolts in the corner of the LD Editor to
indicate that the Logic is equal with the Controller. For examples of ST or FBD logic monitoring, refer to
their respective modules.

6-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #2: Monitor Variables


Data Watch Lists, Reference View Tables, and the Data Monitor may be used to monitor the variables in
your Controller application.

Data Watch Lists


1. Create a new Data Watch list by
selecting the New right-mouse menu
from the Data Watch Lists node in the
Navigator.

2. Give the Data Watch List a name such


as My_Data_Watch:

GFS-426B 6-7
PACSystems Programming GE Intelligent Platforms

3. Notice that the Data Watch window is now open so that you can add variables to the list.

4. Now, select Rung 1 in


the _MAIN logic block.
Drag-and-drop the
rung to the Data Watch.
Notice how the variables
in Rung 1 have been
added to the Data
Watch.

5. Expand the Conveyor_1


structure to see all of
the data elements.
6. Turn the C1_Start_PB
variable On in the Data
Watch.
7. Observe the Timer
values changing in the
Data Watch:

8. Notice the Static and Auto tabs in the Data Watch window.
9. Select the Auto tab and navigate in the logic.

6-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

10. Observe how the variables selected in the LD editor are added automatically to the Data Watch:

Reference View Tables


Add some logic to the _MAIN program to increment a new Variable, MyRegister, once per scan. Declare
this variable to be located at %R0003.
1. Go past Rung 3, column 2, and Press Enter.
2. Select the ADD_DINT instruction from the Instruction Smart List and press Enter.

3. On the Logic Change Options dialog,


select the Lose logic equality selection.
This will allow you to change the logic in
the Block and perform a Run Mode Store:

GFS-426B 6-9
PACSystems Programming GE Intelligent Platforms

4. Enter additional operands and


logic to complete Rung 4:
i. "MyRegister,3r" for the
ADD instruction IN1
argument.
ii. 1 for the ADD instruction
IN2 argument.
iii. MyRegister for the ADD
instruction Q argument.
iv. Add power flow before the
ADD instruction:

5. Add logic to the program to set MyRegister to 0 when MyRegister exceeds 1000.
6. Select the Download to Controller Target menu item to download the logic changes.
7. Notice how the logic is executing and the MyRegister value is incrementing:

8. In the Navigator, select the %R


Register default Reference View Table
Open menu item.

6-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

9. Notice how %R00003 is changing in the RVT.


10. Select %R00003 in the table and notice that the register number and variable are display on the
Status Bar and in the tooltip:

Data Monitor
1. To access the Data
Monitor tool, open the
Navigator Utilities tab:

GFS-426B 6-11
PACSystems Programming GE Intelligent Platforms

2. Double-click on the Data Monitor tool to open the Data Monitor window:

3. Open the Variable List tab in the Navigator.


4. Drag-and-drop some variables, MyRegister, C1_Horn, and C1_Start_PB for example, to the Data
Monitor window. You may place as may variables in the Data Monitor as you like.
5. Observe how the monitor trends the data in "real-time".
6. Turn C1_Start_PB on and observe what happened with C1_Horn:

6-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #3: Modify Logic in Running Controller


In Lab Exercise #1, you performed some Run Mode Store changes by losing equality when making a
change to the logic. Now you will try the other two types on online changes: Word-for-Word and Test Edit.
You will also take a look at the Rung-by-Rung Comparison feature to see how it operates.

Word-for-Word Change
To make a Word-for-Word logic change, your change cannot modify the size of an instruction in the logic.
Typical examples of Word-for-Word logic changes are: modify value of a constant, change name of
variable on an instruction, change Normally Open to Normally Closed contact, etc.

1. Open the Start_Warning block from


the _MAIN Block.
2. Select the 10000 constant on the TON
instruction.
3. Change the 10 second time delay to 5
seconds by changing the constant
value from 10000 to 5000.

4. When the Logic Change Options dialog


is displayed, keep the default selection
(Apply a Word for Word change), and
press OK.

GFS-426B 6-13
PACSystems Programming GE Intelligent Platforms

5. Notice how the Word-for-Word


change is quickly made to the
program.

Test Edit Mode


Test Edit Mode can be used to test changes to a single logic block . While the block is in test edit mode, you
can test the logic, accept edit changes, or cancel edit changes which restores the original logic.
To illustrate Test Edit mode, add logic to the Start_Warning UDFB to handle an Emergency Stop condition.
1. Open the Start_Warning block from the _MAIN Block.
2. To implement the Emergency Stop condition, add a Normally Closed (NC) contact in Rung 1 after the
parallel contacts for START and CR.
i. Select the third cell in Rung 1 and press Enter.
ii. Select the NCCON instruction from the list.

3. Select the Enter Test Edit Mode option


from the Logic Change Options
dialog:

6-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

4. Notice how there is now two Rung 1s displayed.


The top rung displays the modified rung as it is being edited, indicated by the "(Mod)" text under the
Rung number.
The bottom one is the original rung.

Also notice the ** Edit Mode ** text in the LD Editor Block tab and the change of color of the LD Editor
lighting bolts.
5. Enter a new Universal Variable on the Normally Closed (NC) contact named "$Emergency _Stop":

GFS-426B 6-15
PACSystems Programming GE Intelligent Platforms

6. Now you can exercise your logic change by


selecting the Debug Begin Test menu:

7. Note how the LD Editor changes color to indicate that the logic is in test mode.
At this point, the modified logic is executing in the controller.

8. Select the Debug Accept Edit menu to


compete the test and commit the changes to
controller memory:

9. You also have the opportunity during the test to Cancel the edit and return the logic to its original
condition.

6-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

Rung-by-Rung Comparison
The Rung-by-Rung Comparison feature allows you to compare the LD logic that is in your Project with the
logic that is stored in the Controller on a Rung-by-Rung basis. The resulting report may be archived or
printed.

1. Make the same logic change as above to


add the Emergency Stop logic.
Except, this time, select the Lose logic
equality option in the Logic Change
Options dialog:

2. After you make the changes, do not store them to the Controller.
Notice that the Status Bar displays "Logic NE" to indicate a difference in logic.
3. Now select the Online Commands Verify Equality Target menu:

GFS-426B 6-17
PACSystems Programming GE Intelligent Platforms

4. Select the Logic option from the Verify


with Controller dialog:

5. Examine the Feedback Zone and notice that the START_WARNING Logic is NOT EQUAL:

6. Select the START_WARNING item in the Feedback Zone.


7. Select the Show Details right-click menu item:

6-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

8. The Comparison Report results are now displayed in the InfoViewer, showing where the logic is
different between the Project (Master) and the Controller (Compare):

GFS-426B 6-19
PACSystems Programming GE Intelligent Platforms

Review Questions
1. How do you modify the Ladder Diagram editor colors?

2. What types of online changes to logic can you make with the controller?

3. What tool do you use to create a real-time trend of controller data?

4. What does a Rung-by-Rung comparison do?

5. How many blocks may be modified when in Test Edit mode?

6-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review
In this module, you learned to:
Monitoring programs using online logic monitoring, Data Watches, Reference View Tables, and Data
Monitor
Programming changes to existing applications while the controller is running
Online Change Methods: Word-for-Word, Run Mode Store, and Test Edit
Considerations when making online changes for User Defined Function Blocks and Symbolic
Variables
Configuring the ladder diagram editor options

GFS-426B 6-21
Table 0:

Module 7
Using the Proficy Machine Edition Toolchest - Title

Use the Proficy Machine Edition Toolchest


Topics

Upon completion of this module, you should be able to:


Save logic to a Toolchest drawer
Use logic from the Toolchest in an application
Distribute a Toolchest drawer for use by others
Modify logic and save modifications to the Toolchest
PACSystems Programming GE Intelligent Platforms

Overview

Overview
The Toolchest is a powerful repository of re-usable application components that you may add to your
project. You can drag-and-drop items directly from the Toolchest into the Machine Edition editors, such as
the Ladder Editor or Panel Editor, and into the Machine Edition Navigator.

In general, three kinds of application components are


stored in the Toolchest:
1. Simple, or "primitive" components, such as ladder
logic instructions, built-in controller Functions and
Function Blocks, and View script keywords.
For example, the LD Instructions Drawer lists all of
the LD functions and Function Blocks that you may
use in your ladder diagram logic.
The LD Instructions are grouped into sets of related
instructions.
2. Entire objects, such as complete Graphical Panels,
Logic Blocks, View Scripts, Alarm Groups, Logging
Groups, User Defined Function Blocks, and Custom
Web documents. You can drag-and-drop these items
into your project for use in your application.
3. Complex objects that may be used by your
application. These complex objects may be
composed of logic and graphic components.
Figure 1: LD Instructions Toolchest Drawer

Items or objects that you store in the Toolchest are called fxClasses. fxClasses can model your application
in a modular fashion, in which smaller objects are combined to create larger ones. If you find yourself
repeatedly using the same fxClasses, you might want to add them to the Toolchest Favorites tab.

7-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

Navigating the Toolchest


The Toolchest is composed of two tabs, the Drawers tab
and the Favorites tab.
The Toolchest is organized much like the
Navigator. Within the Toolchest, fxClasses are
organized into drawers and folders.
The Toolchest "lives" on your PC and its contents
are available for use with all of your Machine
Edition Projects.
The Drawers tab contains fxClasses. Most
fxClasses operations are performed here.

Figure 2: Toolchest

The Favorites tab contains shortcuts to fxClasses that


you have identified as Favorites.
You may navigate directly to the fxClass entry by right-
clicking the favorite item and selecting the Goto source
menu item
or-

by clicking the Goto source button.

Figure 3: Toolchest Favorites

GFS-426B 7-3
PACSystems Programming GE Intelligent Platforms

Toolchest Drawers
Toolchest Drawers organize your Toolchest
objects as a collection of fxClasses that may
be shared with other users.
The selected drawer is indicated at the top of
the Toolchest. Click the list box to select a
different drawer or simply double-click on a
drawer in the Toolchest.
Each drawer contains a collection of fxClasses
and folders.

Figure 4: Toolchest Window

The organization of a Toolchest


Drawer is illustrated here.
Folders, each fxClass, its fxParts,
and its structure data type are
displayed in tree form.
Toolchest fxClasses are models of
objects or components in your
project. fxClasses are not the objects
themselves; they are blueprints for
objects that you can then create in
your project.

Figure 5: Toolchest Drawer Organization

Since physical machines and devices each have several different aspects, fxClasses are composed of
different fxParts. Each fxPart models a different aspect of the object. For example, the graphical fxPart
models the appearance and animation of an object, as it appears on an HMI.
Within its fxParts, fxClasses can also contain blueprints for complete graphical panels, View scripts, alarm
groups, logging groups, and Custom Web documents.
The Toolchest does not enforce unique names for fxClasses. Each fxClass is identified by an internal ID, so it
is possible for multiple fxClasses to have the same name. If you will be using an fxClass with other users, it
is recommended that you create a process to ensure that all users work with the same fxClasses. Such a
process would use the Export /Import Drawer features or Proficy Change Management.

7-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

Practical Toolchest Use


For PACSystems Targets there are several practical uses of the Toolchest to help improve your efficiency in
developing, maintaining, and deploying control applications.
The Toolchest is a repository for Application Building Blocks. You may develop Application Building Blocks
using PACSystems User Defined Function Blocks, Parameterized Blocks, Program Blocks, or C Blocks.
You can leverage these blocks to increase your efficiency in creating and deploying control applications
throughout your organization. After you develop an Application Building Block, the Toolchest becomes the
main means to distribute and update these re-usable objects in your applications.
You may also use the Toolchest to create structure Data Types to organize your application information
into logical groups. An example of creating a structure data type is discussed in the module titled Working
with PACSystems Variables.

Create Application Building Blocks


The steps for creating Application Building
Blocks using the Toolchest are as follows:
1. Develop a block of logic in Machine
Edition using a UDFB, for example.
You will develop a Tank UDFB that will be
a good example of an Application
Building Block that you may want to re-
use.

Figure 6: Tank Block Example of Application Building Block

2. Use the Version Settings Block property


to manage the Block Major and Minor
revisions.
An increment in Major Version could
indicate a change to the Block
Parameter Definitions that may impact
the Block logic signature, or major
functionality change. An increment in
the Minor Version could indicate a small
logic change, such as a bug fix.
You should chose and implement a
convention for managing revisions to
your blocks. Figure 7: Block Version Settings Properties

GFS-426B 7-5
PACSystems Programming GE Intelligent Platforms

Organize Application Building Blocks


Once you have created your Application Building Blocks, the next step is to organize then using the
Toolchest.
1. Create a Toolchest Drawer to be a
container for your blocks using the
Toolchest New Drawer right-mouse
menu.

Figure 8: Toolchest New Drawer Right-click Menu

2. Be sure to give your Drawer a descriptive


name.
By default Machine Edition names the
drawer NewDrawer1.
In this example, the drawer has been
renamed to "My_Very_Favorite_Blocks".

Figure 9: Re-named Toolchest Drawer

3. Place your Application Building Blocks into the Toolchest Drawer by dragging-and-dropping them from
the Navigator to the Drawer.

7-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

For example, you may drag-and-drop the blocks that you will create in the UDFB Lab.

Figure 10: Drag-and-Drop UDFB to Toolchest Drawer


The blocks in your Toolchest Drawer may now be shared with other engineers and developers to
facilitate their use.

Note
You may also create folders in your Toolchest drawer to provide organization to the drawer.

4. Once you have placed an item in the Toolchest, you may see a preview of the item by selecting the
Toolchest item and opening the Companion window.

GFS-426B 7-7
PACSystems Programming GE Intelligent Platforms

An example of the Companion display for a UDFB block in the Toolchest is shown below. The
Companion displays a pre-view of the logic and other useful information such as when the block was
last modified.

Figure 11: Toolchest Preview in Companion

Share Toolchest Drawers


Toolchest Drawers are shared between PCs
using the Export and Import Drawer
functions. The Export Drawer function
creates a single file that contains the
Toolchest Drawer.
1. To export a Toolchest Drawer, select
the Export Drawer right-click menu.

7-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

2. You will be presented with an Export a Toolchest Drawer dialog to select the directory (location) for
the export file.

Figure 12: Export a Toolchest Drawer Dialog


Notice from the dialog that the Machine Edition Toolchest drawer file extension is ZDRW. The ZDRW
files are a single file that contains all of the items in the drawer.
This file can now be imported on another PC for use.
3. Transfer the Toolchest Drawer to another
PC. For example, you can do this by
emailing the file for distribution or by
simply placing it on a memory stick.
4. Once the file is available on another PC, use
the Toolchest Import Drawer right-click
menu to bring the Drawer into Machine
Edition.

5. You will be presented with an Import a Toolchest Drawer dialog to select the Toolchest Drawer file.

GFS-426B 7-9
PACSystems Programming GE Intelligent Platforms

Navigate to the desired ZDRW file and press the Open button.

Figure 13: Import a Toolchest Drawer Dialog


6. If the drawer already exists, a confirmation dialog to overwrite the drawer is displayed.

Figure 14: Toolchest Drawer Import Confirmation Dialog


It may be possible that you have a new version of a drawer that you want to replace. In this case, you
would confirm the overwrite operation by pressing the Yes button.
7. The Machine Edition Feedback Zone will indicate the successful import operation, and any errors that
might occur during the import.

Figure 15: Import Status Displayed in Feedback Zone

7-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

Use Toolchest Blocks in Your Application


Once you have a Toolchest Drawer with your Application Building Blocks, now they can be used to create
an Application.
1. To use a Block from your Toolchest Drawer, simply Ctrl-drag the Block from the Toolchest Drawer and
drop it into the Navigator Program Blocks node .

Figure 16: Drag-and-Drop Block from Toolchest to Navigator

GFS-426B 7-11
PACSystems Programming GE Intelligent Platforms

2. You may also Ctrl drag-and-drop the block directly into the Logic Editors. In this case, Machine Edition
will add the Block to the Navigator for you. When performing this operation, the cursor changes to the

add cursor to indicate that the item will be added to your project.

Figure 17: Drag-and-Drop Block from Toolchest to LD Editor

Toolchest Drag-and-Drop Operations


When working with Toolchest objects there are three possible ways to drag-and-drop an item from the
Toolchest. Each operation has its benefits and limitations. The quickest way to see what operation you are
performing is by noticing the cursor icon.

Toolchest Operation Cursor Icon Description


Drag-and-Drop Create link from application to master item in Toolchest.

Ctrl Drag-and-Drop Copy item from Toolchest to application.

Shift Drag-and-Drop For blocks, Copy item from Toolchest to application.


For Logic elements (rungs), copy logic and create
instance data structure for variables.
Table 1: Toolchest Drag-and-Drop Operations

7-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

The most common mechanism to bring a


Toolchest item into an application is Ctrl Drag-
and-Drop. This operation takes an exact copy
of the item and includes it in your application.
If your item uses Global or Mapped Variables,
they are created for you automatically, if
needed. If there are variable conflicts, you are
presented with conflict resolution options.
If you use the Drag-and-Drop operation (no
Ctrl) from the Toolchest, a link is created
between your application and the master copy
of the item in the Toolchest. The link is noted
by the short-cut symbol on the block icon .
Figure 18: Tank Block Linked to Toolchest

When Blocks are linked to the Toolchest, you create an inter-dependence that you will need to manage. To
eliminate this inter-dependency, do not use the linked mechanism.

Toolchest Block Dependencies


When working with Toolchest Blocks there maybe times when your blocks have dependencies on other
blocks.
For example, one Toolchest block may call
another Toolchest block. In this case, it is
helpful to bring the blocks into the application
so that the Blocks needed by a new one
already exist in the application when the new
block is dropped into the project.
For example, if Block A calls Block B, then
bring Block B into the Project first.
Following this process will eliminate the need
to edit the CALLs in your logic for Blocks that
were not found when the new block was
imported.
To manage block dependencies, use the
folder mechanism to indicate which blocks
should be included first. An example of this
method is shown here. Figure 19: Using Folders to Show Block Dependencies

GFS-426B 7-13
PACSystems Programming GE Intelligent Platforms

Block Update Process


Over the course of an application lifecycle, there will be times when you need to update the blocks in your
Toolchest. For example, you may expand object functionality, or fix errors. The recommended process to
follow for updating a Block is as follows:
1. Extract a master copy of the Block from Toolchest Drawer using Ctrl Drag-and-Drop.
2. Make and test the modifications to your logic.
3. Update the Major and/or Minor Version Block Properties so that you can distinguish one version of
Block from another.
4. Drag-and-drop the updated Block from the Navigator to the Toolchest Drawer, dropping the updated
Block on top of the blocks fxPart to replace its contents .
If you drop the Block on top of the fxClass, you will create a new fxpart with the new logic, leaving the
old fxPart alone.

Figure 20: Replacing Block in Toolchest

5. Now you may Re-Export the Drawer for distribution to other PCs.
6. Import the updated drawer on a PC where you want to use the updates.
7. Examine the Major/Minor Versions of the existing Blocks. Compare those to the new Block and
understand the consequences. For example, does the new Block have additional parameters?
8. Examine and understand the dependencies of the new Block.

7-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Are there blocks that it requires to be added to the Project?


If they do not exist in the Project, the dependency blocks should be added to the Project first.
If the dependency Blocks do exist, do they need to be updated with a new version? If so, update
those blocks.
1. Update the Block(s) in the order to respect
the dependencies using the Ctrl Drag-and-
drop operation. When you drop the
updated Block on top of the Program
Blocks node, the following dialog is
displayed, showing the check of the Block
Parameters.
Now you can select to Replace the old
logic with the new.

The logic in the Toolchest overwrites the logic


in the Project.

Figure 21: Block Exists in Project Warning

GFS-426B 7-15
PACSystems Programming GE Intelligent Platforms

Lab Exercises

Lab Exercise #1: Use the Toolchest Drawer


In this exercise you will create a Toolchest Drawer, copy a logic block to the drawer, and then re-use the
logic in a program.
1. Double-clicking on the project called Start_Warning to open it.
2. Expand the Program Blocks node to see all the Blocks in the Project.

3. Open the Toolchest.


For example, click on the red toolbox toolbar
icon,
-or-
Press Shift+F9.

7-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

4. Right-click in the Toolchest. 5. Rename the new drawer Warning Lib.


Select the New Drawer menu.

6. Drag-and-drop the START_WARNING UDFB from the PAC_1 Target to the Warning Lib Toolchest
Drawer.

GFS-426B 7-17
PACSystems Programming GE Intelligent Platforms

7. The Start_Warning block is now saved in the


drawer and can be re-used in other projects.
8. To use this UDFB in another target, simply Ctrl
Drag-and-Drop the Block to another Target.

9. Create a new RX3i Target in your Project 10. Ctrl Drag-and-drop the Start_Warning block
named PAC_2. from the Toolchest into the Navigator Program
Blocks node for the PAC_2 Target.

Note
Be sure to perform a CTRL function with the Drag and Drop so that the Logic is not linked to the
Toolchest.

11. Update the logic in the Start_Warning block to include a master reset push button.

7-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

12. Update the Toolchest logic by dragging-and-


dropping the modified block from the Project
to the Toolchest, landing on top of the fxPart
in the Toolchest.

Toolchest Use of Universal Variables "$"


Universal Variables will never be part of a Toolchest variable data structure. If you create an fxClass that
uses a universal variable, that variable will not become an element of variable structures associated with
that fxClass's objects.
If you use a Universal Variable in a set of logic rungs and drag the logic into the Toolchest to create an
fxClass, the universal variable travels with the logic inside the fxClass.
If you drag this fxClass into a Target that does not contain that universal variable, the universal variable is
created with the same properties as in the fxClass.
If you drag the fxClass into a Target that already contains a universal variable by that name, the existing
universal variable is not overwritten with the one in the fxClass.
This type of variable can be very useful when interacting with Toolchest objects. For example, if you want
to add an Emergency_Stop interlock to the motor control circuitry for all instances of rung logic, you can
use a $Emergency_Stop universal variable to do so.

GFS-426B 7-19
PACSystems Programming GE Intelligent Platforms

Review Questions
1. What items are stored in the Toolchest?

2. How do you open the Toolchest?

3. How to you share a Toolchest Drawer with someone?

4. When you drag-and-drop (without Ctrl) from the Toolchest to the Navigator, what is created?

5. How can you see a preview of a Toolchest item?

7-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review
In this module, you learned to:
Save logic to a Toolchest drawer
Use logic from the Toolchest in an application
Distribute a Toolchest drawer for use by others
Modify the logic and save the modifications to the Toolchest

GFS-426B 7-21
Table 0:

Module 8
Structured Text Programming - Title

Structured Text Programming


Topics

Upon completion of this module, you should be able to:


Create Structured Text Blocks
Create Structured Text Logic
Create Structured Text Comments
Understand Structured Text language Statements, Operators, and Syntax
Understand Types of Structured Text statements
Edit Structured Text logic
Use variables in Structured Text logic, create variables from Structured Text Editor
Monitor Structured Text logic
Call UDFBs from Structured Text logic
Modify Structured Text Editor configuration options
Understand considerations when programming in Structured Text
PACSystems Programming GE Intelligent Platforms

Structured Text Programming

Overview
Structured Text (ST) and Instruction List (IL) are the two textual languages in the IEC 61131-3 PLC
standard. Structured Text is a high-level textual language similar to the Pascal programming language. It
is very flexible and intuitive for writing control algorithms.
Structured Text uses operators such as assignment, logical branching, and loops. People trained in
computer programming languages often find it the easiest language to use for programming control logic.
When symbolic variables are used, ST logic resembles sentences, making it highly intelligible to beginning
users as well.
Structured Text is ideal for tasks requiring complex math, algorithms, or decision-making.

Structured Text Benefits


One of the primary benefits of the IEC 61131-3 standard is that it allows multiple languages to be used
within the same controller application. This allows the program developer to select the language best
suited to each particular task or portion of the application.
Some of the benefits of the Structured Text program language are summarized below:
People trained in computer languages can easily learn to program control logic
Use of symbolic Variable Names makes the logic easy to understand
Programs can be created using a text editor
The logic is highly portable, easily moved from one control environment to another

Structured Text Logic


Structured Text Statements are used to create simple executable units of logic. Each statement performs
one or more operations on parameters, constants, and variables. Some common Structured Text
statements are shown in the following examples.

Figure 1: ST Example 1 AND Logic

Figure 2: ST Example 2 OR Conditional Logic

8-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

Figure 3: ST Example 3 Start/Stop Control

Figure 4: ST Example 4 Pump Alternator

Figure 5: ST Example 5 Min/Max/Average

GFS-426B 8-3
PACSystems Programming GE Intelligent Platforms

Create Structured Text Blocks


Create a new ST Block by right
clicking on the Program Blocks node
in the Navigator, then choosing the
New ST Block menu item.

Figure 6: New ST Block Menu

You may edit the name of the block


after it is created. The default name
is "STBK".

Figure 7: New ST Block in Navigator

ST Blocks may be cut, copied, and pasted between Targets. They may also be moved to and from the
Toolchest like any other Block.

8-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

Structured Text Block Properties


ST Blocks have the same basic properties
as LD and FBD blocks. To display the
properties of an ST block, right-click on
the block name in the Navigator and
select the Properties menu.

Figure 8: ST Block Properties

If an ST Block is a Parameterized Block or a User Defined Function Block, click on the Parameters
property to define the Inputs, Outputs, and Members (UDFB only) parameters.

Figure 9: ST Block Parameters Dialog

Edit Structured Text


The Structured Text Editor is a free-form text editor for editing Structured Text logic. You can configure the
ST Editor to define its behavior as you create and edit ST logic. For example, there are default indentation
rules that can be applied while editing. Smart list support is also provided for variable selection when
editing logic.

GFS-426B 8-5
PACSystems Programming GE Intelligent Platforms

To enter ST logic, in the ST Editor logic


window, right-click, and choose the
Insert Variable or Insert Keyword
menu. A smart list appears prompting
you to choose an item. You may also
type directly in the ST Editor to enter
and edit logic.
The Insert Keyword menu item is
used to insert an ST Operator, ST
Statement element, or CALL to a
Controller built-in Function.
The Insert Variable menu item is used
to display the Variable List smart list to
select a variable for insertion into the ST
logic.

Figure 10: Inserting ST Logic

You can also define selected text as a


new variable using the Create "variable
text" as menu item. This menu item is
very useful when defining variables "on
the fly" when developing ST logic.
The ST Editor supports cut, copy, and
paste using the Windows Clipboard.
This allows you to interact with other
text-based editors such as Notepad.
You can drag-and-drop between the ST
Editor and other Machine Edition tools,
such as the Toolchest and the Variable
List.

Figure 11: Creating a New Variable Directly in ST Logic

Since it is a free-form editor, few restrictions are placed on the way you work in the ST Editor. The editor
allows the entry of undefined operands so you can type variable names that do not yet exist. Any
unresolved references are detected upon validation for easy location and correction.

8-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Help
When you select an operator or function in the ST Editor, the Companion window displays an explanation
of the operator or function, and any details on supported data types.

Figure 12: ST Help Displayed in Companion


For more help, do one of the following:
Click the button in the Companion window.
Select an operator or function in the ST Editor and then press F1.

Note

To open the Companion window, select the Companion toolbar button from the Tools toolbar, or
press Shift+F11.

GFS-426B 8-7
PACSystems Programming GE Intelligent Platforms

Comments
You use Comments to document the details of your ST logic. Comment lines are created by placing a
single quotation mark or a double slash at the beginning of the line of text.
Comments are typically used to give a verbal description of the function performed by the logic.
Comments are displayed in Green (by default) in the ST Editor for quick identification. Some examples of
single line comments are:

Figure 13: ST Single Line Comments

Block Comments using and delimiters are useful to indicate a large section of comment text. Block
Comments can also be used to disable a section of Structured Text code temporarily.
For example, to disable the average calculation in Example 5, simply disable the last 5 lines of code by
using the and delimiters.

Figure 14: Using (* and *) Comment Delimiters to Disable ST Logic

8-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Structured Text Editor Options


In the Options tab of the Navigator, you can configure the ST Editor appearance (text color-coding) and
preferences (Auto Indentation, Tab Size, and Auto List). The options for the ST Editor are located under the
Editors Text node in the Navigator Options tab. The default ST Editor color assignments are shown
below.

Figure 15: ST Editor Text Color Options

GFS-426B 8-9
PACSystems Programming GE Intelligent Platforms

Call Structured Text Blocks


Structured Text blocks can be called from Ladder Diagram (LD), Function Block Diagram (FBD), and other
Structured Text (ST) blocks. The simplest way to create a call to a block is to drag the block from the
Navigator into the logic editor of the calling block. For example, drag the Tank_Calc ST block to the _MAIN
LD Editor window:

Figure 16: Creating a Call to an ST Block from Ladder Diagram Logic


This adds a "CALL" instruction in the ladder logic that references the Tank_Calc ST block.

Figure 17: Call to ST Block from Ladder Diagram Logic

8-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

Now assign variables for each of the Input and Output Parameters of the block being called.
Dragging the same block into the ST Editor will result in the following CALL to the Tank_Calc block being
added to the ST logic:

Figure 18: Block Call with Parameters Template

Now you need to enter the variables or constants that will be referenced as Input and Output Parameters
of the ST block call. With parameters defined, the Tank_Calc block call could look like:

Figure 19: Block Call with Parameter Assignments

The example above uses the Formal Argument List convention, meaning that each parameter is explicitly
assigned to an argument.
It is also possible to use the Informal Argument List where Parameter name as are not provided:

Figure 20: Block Call with Informal Arguments

Note
When using Informal Argument Lists, the order of parameters in the call is very important.

The Informal Argument List must be provided in U-shaped order. The U-shaped order begins with the first
input operand (in LD - top left), then proceeds to the next input operand (in LD - next lower left), continuing
through all of the input operands. Then output operands are listed starting with the last output operand (in
LD - bottom right), and proceeding to the next to last output operand (in LD call, the top or next higher), etc.
The Informal Argument List order convention is illustrated as follows:

Figure 21: Informal Argument List Order for Block Called from Ladder
Diagram Logic

GFS-426B 8-11
PACSystems Programming GE Intelligent Platforms

Call Controller Built-in Functions


You can call many of the Controllers Built-in Functions. To call a Controller built-in function, select the
Insert Keyword menu from the ST Editor right-mouse menu. Now select the desired built-in function from
the smart list.

Figure 22: ST Editor Keyword Smart List to select Built-In Controller Functions
To call the built-in PACSystems Controller Switch Position function, select the SWITCH_POS function from
the list. Using the informal call convention, the ST statement to call this function looks like this:

Figure 23: Calling Built-In Controller Block

To see the parameters for this and their order in the function call, open the Companion window and select
the function in the ST Editor.
Equation 1: Companion Help for Switch Position Built-In Controller Function

You can also call Controller Built-in Functions by using a drag-and-drop operation from the LD
Instructions or FBD Instructions Toolchest drawer.
First, open the Toolchest drawer to display the list of functions. Now select a function and drag-and-drop it
to the ST Editor. If the function call is supported by the ST Editor, the Functions name will be displayed in
non-italics and the parameter list will be displayed.

8-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

An example using the DO_IO function is shown below. Notice the DO_IO function name is in non-italics and
it's parameter list is displayed.

Figure 24: Drag-and-Drop Built-In Controller Function from LD Instructions


Toolchest

Note
There are several built-in functions that can be pulled from the Toolchest that are not supported in the ST
logic. These functions are displayed in italics, such as PID_IND.

GFS-426B 8-13
PACSystems Programming GE Intelligent Platforms

Structured Text Language Reference


Statements
A Structured Text program consists of a series of statements, which are constructed from expressions and
language keywords. A statement directs the Controller to perform a specified action. Statements provide
variable assignments, conditional evaluations, iteration, and the ability to call built-in functions.

Expressions
Expressions calculate values from variables and constants. An expression can involve operators, variables,
and constants. An example of a simple expression is .
Composite expressions can be created by nesting simpler expressions. Such an example is
.

Operators
The operators that can be used in expressions are listed below according to evaluation precedence that
determines the order in which they are executed. The highest precedence operator is applied first, followed
by the next highest, and so forth.
Equal precedence operators are evaluated from left-to-right. Operators in the same group, for example +
and -, have the same precedence.

Precedence Operator Operand Types Description


Group 1 (Highest) Parenthesized expression

Group 2 INT, DINT, REAL Negation

BOOL, BYTE, WORD, DWORD Boolean complement


Group 3 INT, DINT, UINT, REAL Exponentiation
Group 4 INT, DINT, UINT, REAL Multiplication
INT, DINT, UINT, REAL Division
INT, DINT, UINT Modulus operation
Group 5 INT, DINT, UINT, REAL Addition
INT, UINT, DINT, REAL Subtraction

Group 6 INT, DINT, UINT, REAL, BYTE, Comparison


WORD, DWORD
Group 7 ANY Equality
ANY Inequality
Group 8 BOOL, BYTE, WORD, DWORD Boolean AND
Group 9 BOOL, BYTE, WORD, DWORD Boolean exclusive OR
Group 10 (Lowest) BOOL, BYTE, WORD, DWORD Boolean OR
Table 1: Structured Text Operators by Precedence

8-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Address operators may be used on ST operands and have precedence over the ST language operators.
Address operators include indirect addressing , array indexing , bit-in-word addressing
, and structure elements .

Operand Types
The type of an operator is determined by the Data Type of its parameters or operands. Type casting is not
supported in a Structured Text expression. To convert a type, you must use one of the built-in conversion
functions. For example, to convert from Integer to Real, use the INT_TO_REAL function.
For ST operators, the types of the operands must match. Operand type mismatches will be detailed in the
Feedback Zone when the ST logic is validated.

Syntax
The syntax of the ST implementation for PACSystems follows the IEC 61131-3 standard:
Structured Text statements must end in a semi-colon (;).
Structured Text variables must be declared in the Machine Edition Variable List.
Structured Text operators and keywords are not case sensitive. For example, the operands "NOT"
and "not" are understood as the same operator.
The following ST symbols have the following functions:
Assigns an expression to a variable
Designates the end of a statement

Used for array indexing where the array index is an integer1. For example, this statement
sets the third element of an array to the value j + 10:

Designates a comment. These comments can span multiple lines. For example,

or Designates a single line comment. For example,

GFS-426B 8-15
PACSystems Programming GE Intelligent Platforms

Statement Types
Structured Text Statements, which specify program execution, consist of the following:
Statement Type Description Examples
Assignment Sets variable to specified value or
expression.

Provides conditional execution of set of


statements.

Function Call Calls function for execution.

Causes ST block to return to calling block.


The RETURN statement can provide an
early exit from a block.
Terminates iterations before the terminal
condition becomes TRUE (1).
Terminates the inner most loop.
Specifies that one or more statements be
executed conditionally.

Executes sequence repeatedly based on


value of the control expression.

Executes sequence repeatedly until


Boolean expression evaluates to FALSE (0).

Statement sequence is executed


repeatedly until Boolean expression
evaluates to TRUE (1).

Empty Statement Does nothing.


Table 2: Types of Structured Text Statements

8-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

Assignment Statement
The assignment statement replaces the value of a variable with the result of evaluating an expression (of
the same data type) or a constant.

Note
Assignment statements can affect discrete transition bits.
Assignment statements take discrete forces into account.

Format

Where:
Variable is a simple variable, array element, etc.
Expression is a single value, expression, or complex expression.

Examples
Boolean assignment statements:

Array element assignment statement:

Function Calls
The Structured Text Function Call executes a block of logic to perform a mathematical or other operation.
The function call consists of the name of the function or block followed by any required input or output
parameters.
The Structured Text logic can call Program Blocks, Parameterized Blocks, User Defined Function Blocks,
or the PACSystems Built-in Functions listed below. The call must be made in a single statement and
cannot be part of a nested expression.
Calls to some built-in functions, such as communications request (COMM_REQ), require a command block or
parameter block. For these functions, an array is declared, initialized in logic, and then passed as a
parameter to the function.

GFS-426B 8-17
PACSystems Programming GE Intelligent Platforms

Built-in Functions Supported for Structured Text Calls


The table below lists the Built-in Functions that are supported in ST logic. These functions may be entered
from the Insert Keyword right-click menu, by typing the function name and arguments directly into the
ST Editor, and by drag-and-drop from the LD Instructions or FBD Instructions Toolchest drawer.

Controller PACSystems Built-in Functions Supported by ST Logic


Function
Group
Advanced Math EXPT, EXPT_[REAL, LREAL]
EXP, EXP_[REAL, LREAL]
ACOS, ASIN, ATAN, ACOS_[REAL, LREAL], ASIN_[REAL, LREAL], ATAN_[REAL,
LREAL]
LOG, LN, LOG_[REAL, LREAL], LN_[REAL, LREAL]
SQRT_[DINT, INT, LREAL, REAL]
COS, SIN, TAN, COS_[REAL, LREAL], SIN_[REAL, LREAL], TAN_[REAL, LREAL]
DEG_TO_RAD, RAD_TO_DEG
Math ABS_[DINT, INT, LREAL, REAL]
SCALE_[DINT, INT, UINT]
Control DO_IO, MASK_IO_INTR, SVC_REQ, SUS_IO, SUSP_IO_INTR, SWITCH_POS,
R_TRIG, F_TRIG
Conversion DEG_TO_RAD, RAD_TO_DEG
BCD4_TO_[INT, REAL, UINT]
BCD8_TO_[DINT, REAL]
DINT_TO_[BCD8, DWORD, INT, LREAL, REAL, UINT]
DWORD_TO_DINT
INT_TO_[BCD4, DINT, REAL, UINT, WORD]
LREAL_TO_[DINT, REAL]
REAL_TO_[DINT, INT, LREAL, UINT]
TRUNC_[DINT, INT]
UINT_TO_[BCD4, DINT, INT, REAL, WORD]
WORD_TO_[INT, UINT]
Data Move COMM_REQ
PACMotion See PACMotion documentation for list of available built-in function blocks.
Function Blocks
Program Flow ARG_PRES
Standard Timers TOF, TON, TP
Table 3: ST Built-In Functions

Note
ENO is an optional BOOL output parameter for built-in function calls that is set to 1 (Call successful) or 0
(Call failed).

8-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

Block Types Supported for Structured Text Calls


An ST block can call Program Blocks, Parameterized Blocks, User Defined Function Blocks (UDFBs), and C
External Blocks.

Formal Calls verses Informal Calls


Both Formal and Informal call syntax is supported with the differences summarized below.

Formal Calls Informal Calls


Input parameter assignments use the := notation. Input and output parameters are listed, separated by
commas.
Output parameter assignments use the => notation.
Optional parameters can be omitted. Parameters cannot be omitted.
Parameters can be listed in any order. Parameters must be in the correct order as follows:
Inputs, starting with the first input
parameter
Outputs, starting with the last output
parameter
The ENO parameter may be specified in a formal function or The ENO parameter is not specified in an informal
block call. function or block call.
All built-in functions and user-defined blocks have an
optional ENO output parameter indicating the success of
the function or block. Either ENO or Y0 can be used as this
output parameter name.
Table 4: Formal verses Informal Calls

Formal Function Call Format

Informal Function Call Format

Function Call Example


This example shows the Tangent function call.

GFS-426B 8-19
PACSystems Programming GE Intelligent Platforms

Call Built-in Function Blocks


Standard Built-in Function Blocks are instructions that have instance data in the form of a structure
variable. Standard function blocks are called in the same way that a UDFB is called.
PACSystems Controllers support three built-in standard Timer Function Blocks:

Timer Function Block Description


Pulse Timer (TP) Generates output pulses of a given duration.
On-Delay Timer (TON) Delays setting an output ON for fixed period after input is set ON.
Off-Delay Timer (TOF) Delays setting an output OFF for a fixed period after an input goes OFF so that
the output is held on for a given period longer than the input.
Table 5: Built-in Timer Function Blocks

Call Format for Timer Function Blocks


The TOF, TON, and TP Function Blocks have the same input and output parameters, except for the instance
variable, which must be the same type as the instruction.
Writing or forcing values to the instance data elements IN, PT, Q, ET, ENO, or TI may cause unexpected
operation of the timer function block.
Instance data can be a variable or a parameter of the current UDFB or parameterized block.
Formal Convention

Note
ENO is an optional BOOL output parameter. If ENO is used in the formal convention (I.e. ENO => outBool
), the state of outBool is set to 1 (call was successful) or 0 (call failed).

Informal Convention

Note
When using the informal convention, the operands must be assigned in the order shown above.

8-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

RETURN Statement
The Return statement provides an early exit from a block. For example, in the following lines of code the
third line will never execute. The variable a will have the value 4.

IF Statement
The IF statement construct offers conditional execution of a list if statements. The conditional is determined
by the result of the Boolean expression. The IF construct includes two optional parts, ELSE and ELSIF (or
ELSEIF), that provide conditional execution of alternate statement list(s). One ELSE and any number of
ELSIF sections are allowed per IF construct.

Format

Where:
BooleanExpression Any expression that resolves to a Boolean value.
StatementList Any set of structured text statements.

Operation
The following sequence of evaluation occurs if both optional parts are present:
If BooleanExpression1 is TRUE (1), StatementList1 is executed. Program execution continues with
the statement following the END_IF keyword.
If BooleanExpression1 is FALSE (0) and BooleanExpression2 is TRUE (1), StatmentList2 is executed.
Program execution continues with the statement following the END_IF keyword.
If both Boolean expressions are FALSE (0), StatmentList3 is executed. Program execution continues
with the statement following the END_IF keyword.
If an optional part is not present, program execution continues with the statement following the END_IF
keyword.

GFS-426B 8-21
PACSystems Programming GE Intelligent Platforms

Example
The following code fragment checks to see if the Input01 value is less than 10.0 or greater than 90.0. If it is,
a warning is set, otherwise the value is ok.

CASE Statement
The CASE . OF construct offers conditional execution of statement lists. It uses the value of an ST integer
expression to determine whether to execute a statement list. The statement list to be executed can be
selected from multiple statement lists, depending on the value of the associated integer expression.
Conditions can be expressed as a Single Value, List of Values, or Range of Values. These forms can
be used by themselves or in combination.
The optional ELSE keyword can be used to execute a statement list when the associated value does
not meet any of the specified conditions.
You can have a maximum of 1024 cases in a single CASE OF construct. Additional cases can be
handled by adding the ELSE keyword to the construct and specifying a nested CASE OF
construct or an IF THEN construct after the ELSE.
The number of nested CASE OF constructs and the number of levels are limited by computer
memory.
The number of constants and constant ranges in a single conditional statement is limited by
computer memory.
Format

Where:
IntegerExpression An ST expression that resolves to an integer (INT, DINT or UINT) value.
Int A constant integer value.
StatementList1 StatementListn Structured Text statements.

8-22 GFS-426B
GE Intelligent Platforms PACSystems Programming

Operation
The Int values are compared to IntegerExpression.
The statement list following the first Int value that matches IntegerExpression is executed.
If the optional ELSE keyword is used and no Int value matches IntegerExpression, the statement list
following ELSE is executed.
Otherwise, no statement list is executed.

Requirements for Conditional Statements


All constants must be of type INT, DINT or UINT.
In range declarations, the beginning value must be less than the ending value (reading from left to
right). For example, 10..3 and 5..5 are invalid.
Overlapping values in different case conditions are not allowed. For example, 5..10 and 7 cannot be
specified as conditions in the same CASE OF construct.
Examples
The following logic example assigns a value to the variable ColorVariable.

The following logic example uses a nested CASEOFEND_CASE construct.

GFS-426B 8-23
PACSystems Programming GE Intelligent Platforms

FOR Statement
The FOR loop repeatedly executes a statement list contained within the FOR DO END_FOR construct. It
is useful when the number of iterations can be predicted in advance, for example to initialize an array.
The number of iterations is determined by the value of a Control Variable which is incremented (or
decremented) from an Start Value to an End Value by the FOR statement.
By default, each iteration of the FOR statement changes the value of the Control Variable by 1.
The optional BY keyword can be used to specify an increment or decrement of the Control Variable
by specifying a (non-zero) positive or negative integer or an expression that resolves to an Integer.
FOR loops can be nested to a maximum of ten levels.

Format

Where:
ControlVariable Control Variable value is updated each FOR loop iteration. Can be an INT, DINT or
UINT variable or parameter.
StartValue Control Variable Starting Value must be an expression, variable, or constant of the
same data type as ControlVariable.
EndValue Control Variable Ending Value must be an expression, variable, or constant of the
same data type as ControlVariable.
StepValue (Optional) The increment or decrement value for each iteration of the loop. Must be
an expression, variable, or constant of the same data type as ControlVariable. If
StepValue is not specified, the Control Variable is incremented by 1.
StatementList Any list of Structured Text statements.

Operation
The values of StartValue, EndValue and StepValue are calculated at the beginning of the FOR loop.
On the first iteration, ControlVariable is set to StartValue.
At the beginning of each iteration, the termination condition is tested.
If it is satisfied, execution of the loop is complete and the statements after the loop will proceed.
If the termination condition is not satisfied, the statements within the FOREND_FOR construct are
executed.
At the end of each iteration, the value of ControlVariable is incremented by StepValue (or 1 if
StepValue is not specified).
The termination condition of a FOR loop depends on the sign of the StepValue.

StepValue Termination Condition


>0 ControlVariable > EndValue
<0 ControlVariable < EndValue
0 None. A termination condition is never reached and the loop will repeat infinitely.

8-24 GFS-426B
GE Intelligent Platforms PACSystems Programming

Table 6: Step Value Signs


As with the other iterative statements (WHILE and REPEAT), loop execution can be prematurely
halted by an EXIT statement.
To avoid infinitely repeating or unpredictable loops, the following precautions are recommended:
Do not allow the statement list logic within the FOR loop to modify the ControlVariable.
Do not use the ControlVariable in logic outside the FOR loop.

Examples
The following logic example initializes an array of 100 elements by assigning a value of 10 to all array
elements.

Note
PACSystems support of Variable Indexing arrays provided in Machine Edition Version 6.00 and above.

GFS-426B 8-25
PACSystems Programming GE Intelligent Platforms

WHILE Statement
The WHILE loop repeatedly executes (iterates) a statement list contained within the WHILEEND_WHILE
construct as long as a specified condition is TRUE (1).
It checks the condition first, then conditionally executes the statement list.
This looping construct is useful when the statement list does not necessarily need to be executed.

Format

Where:
BooleanExpression Any expression that resolves to a Boolean value.
StatementList Any set of Structured Text statements.

Operation
If BooleanExpression is FALSE (0), the loop is immediately exited; otherwise, if the BooleanExpression is
TRUE (1), the StatementList is executed and the loop repeated.
The statement list may never execute, since the Boolean expression is evaluated at the beginning of
the loop.

Note
It is possible to create an infinite loop that will cause the watchdog timer to expire.

Example
The following logic example increments J by a value of 2 as long as J is less than or equal to 100.

8-26 GFS-426B
GE Intelligent Platforms PACSystems Programming

REPEAT Statement
The REPEAT loop repeatedly executes (iterates) a statement list contained within the REPEATEND_REPEAT
construct until an exit condition is satisfied.
It executes the statement list first, then checks for the exit condition.
This looping construct is useful when the statement list needs to be executed at least once.

Format

Where:
BooleanExpression Any expression that resolves to a Boolean value.
StatementList Any set of Structured Text statements.

Operation
The StatementList is executed. If the BooleanExpression is FALSE (0), then the loop is repeated; otherwise,
if the BooleanExpression is TRUE (1), the loop is exited.
The statement list executes at least once, since the BooleanExpression is evaluated at the end of
the loop.

Note
It is possible to create an infinite loop that will cause the watchdog timer to expire.

Example
The following logic example reads values from an array until a value greater than 5 is found (or the upper
bound of the array is reached). Since at least one array value must be read, the REPEAT loop is used. All
variables in this example are of type DINT, UINT, or INT.

GFS-426B 8-27
PACSystems Programming GE Intelligent Platforms

EXIT Statement
The EXIT statement is used to terminate and exit from a loop (FOR, WHILE, REPEAT) before it would
otherwise terminate.
Program execution resumes with the statement following the loop terminator (END_FOR,
END_WHILE, END_REPEAT).
An EXIT statement is typically used within an IF statement.
Format

Where:
ConditionForExiting An expression that determines whether to terminate early.

Example
The following logic example shows the operation of the EXIT statement. When the variable number equals
10, the WHILE loop is exited and execution continues with the statement immediately following
END_WHILE.

8-28 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercises
These exercises are designed to demonstrate how to:
Create and call a Parameterized Block that has been written in ST to Calculate Tank Volume and
Check Tank Alarm Conditions.
Place created Parameterized Block in the Toolchest.

Lab Exercise #1: Calculate Tank Volume Block


In this lab you will use Structured Text to create a Calculate Tank Volume Parameterized Subroutine Block.
This block will be used in a future lab exercise as part of the Tank object. This lab takes you step-by-step
through the process for creating the Calc_Tank_Volume block.
The Calc_Tank_Volume Parameterized Block takes the dimensions of the Tank and calculates the Volume
of the Tank in cubic feet and gallons.
The Input parameters of this Parameterized Block are :
Height [REAL]: Height of the Tank in Feet.
Diameter [REAL]: Diameter of the Tank in Feet.
The Output parameters of this Parameterized Block are:
ENO [BOOL]: The Enable Output of this Block is True if the Block executed successfully; For example,
this Output may be Off if any input parameters are not valid.
Volume_Ft3 [REAL]: Volume of the Tank in cubic feet.
Volume_Gal [REAL]: Volume of the Tank in gallons. (Cubic feet times 7.481)

Calc_Tank_Volume Parameterized Block Algorithm


The basic control algorithm of the Calc_Tank_Volume Parameterized Block is:
If Height less than 0.0 or Diameter less than 0.0 then
Set Y0 to False; Error indication to calling routine
Return;
End_if;
Tank_Volume_Ft3 equals 3.141592 * (Tank_Diameter / 2.0)**2 * Tank_Height ;
Tank_Volume_Gal equals Tank_Volume_Ft3 * 7.481;

GFS-426B 8-29
PACSystems Programming GE Intelligent Platforms

Create the Calc_Tank_Volume Parameterized Block


1. Open the Project named GFS_426_ST_Lab.
2. Create a new ST block for the
RX3i Target using the New ST
Block menu item.
3. Change the default name (STBK)
to Calc_Tank_Volume.

4. In the Inspector properties for


Calc_Tank_Volume, click on the
Block Type item.
5. Change it to a Parameterized
Block.

8-30 GFS-426B
GE Intelligent Platforms PACSystems Programming

6. Click inside the Parameters


property, and then click the
ellipses on right side of the box.
This opens the Parameters
dialog.

7. The Calc_Tank_Volume block has two Input parameters, HEIGHT and DIAMETER, that are REAL
parameters in units of feet.
Enter these parameters in the Parameters dialog:

8. The Calc_Tank_Volume block has two output parameters: Volume_Ft3 and Volume_Gal.

GFS-426B 8-31
PACSystems Programming GE Intelligent Platforms

Click on the Outputs tab in the Parameters dialog to add these output parameters. Both are REAL
parameters.

Since Calc_Tank_Volume is defined as a Parameterized Block, it has no Member parameters.


9. Click the OK button to close the dialog box.
10. Open the Calc_Tank_Volume ST block in the ST Editor and type the logic below:
Check for invalid input parameters
If Height < 0.0 or Diameter < 0.0
then
Y0 := 0; 'Turn Block's ENO Off to indicate error
return; 'Exit block
end_if;
'Calculate tank volume in cubic feet
Volume_Ft3 := PI * (Diameter / 2.0)^2 * Height;
'Calculate tank volume in gallons
Volume_Gal := Volume_Ft3 * 7.481;
The single quotation mark identifies a comment.

8-32 GFS-426B
GE Intelligent Platforms PACSystems Programming

The results of your entry should look something like this:

Note how the ST Editor color-codes the logic components, in particular the Blocks parameters such as
Height and Diameter being displayed in olive.
11. When you have finished, right-click on the RX3i Target and select Validate from the target right mouse
menu, press F7, or click on the Validate Active Target toolbar button. This will check your ST logic
for errors.

Notice that there is a variable in the program that is "Unknown" PI.

GFS-426B 8-33
PACSystems Programming GE Intelligent Platforms

12. You need to define PI as a variable. Right-click on the PI text in the ST editor and select the Create "PI"
as Local REAL menu item.
This will create a local variable named PI in the Calc_Tank_Volume block and you will notice that the
color of the PI text will change from black to maroon.

The logic now looks like:

13. Add a line of logic at the top of the block to assign a value of 3.141592 to PI:

14. Click on the icon to validate the program again.


Now the program should validate with no errors.
If there are any errors, correct them before proceeding.

8-34 GFS-426B
GE Intelligent Platforms PACSystems Programming

Call the Calc_Tank_Volume Block


1. Double-click on the _MAIN block in the Navigator to open the main block in the LD Editor.
2. Drag-and-drop the Calc_Tank_Volume block from the Navigator into the _MAIN block. This creates a
CALL to the Calc_Tank_Volume block.

Your CALL will look something like:

The actual appearance is affected by the Editors Ladder View preference settings, including the
Grid Cell Width preference.
3. Assign the following variable names for the Input and Output Parameters:
$Tank_Height to Height input parameter
$Tank_Diameter to Diameter input parameter
$Tank_Volume_Ft3 to Volume_Ft3 parameter
$Tank_Volume_Gal to Volume_Gal parameter

GFS-426B 8-35
PACSystems Programming GE Intelligent Platforms

4. Connect power flow to the block CALL. The call should look something like:

These four Universal Variables are linked to a View application so that you can easily test out your
logic in an HMI panel.

Test Your Work


1. Click the icon to validate your program.
2. If no errors are present, right-click on the
Target_1 Target and select Go Online from
the menu, or press the Online/Offline
toolbar button.

8-36 GFS-426B
GE Intelligent Platforms PACSystems Programming

3. Enter Programmer Mode by right-clicking and selecting the Online Commands Set Programmer
Mode menu, or by pressing the Toggle Online Mode toolbar button.

4. Stop the Controller (if necessary) by selecting the Online Commands Stop Controller menu, or
press the Stop Active Target toolbar button.

GFS-426B 8-37
PACSystems Programming GE Intelligent Platforms

5. Click OK to Stop the Controller with Outputs


Disabled.

6. Download your program to the Controller by


right-clicking and selecting the Download to
Controller menu, or press the F8 function key, or
press the Download Active Target toolbar
button.

7. Make sure that the items in the dialog box are


checked as shown and then click OK.

8. Verify that your program successfully downloaded to the controller by examining the Feedback Zone
and the Status Bar.

8-38 GFS-426B
GE Intelligent Platforms PACSystems Programming

9. Start the Controller by selecting the Online Commands Start Controller menu, or by pressing the
Start Active Target toolbar button.

10. Click the OK button to start with Outputs


Enabled.

11. Check the information displayed on the Status Bar to verify that the PACSystems controller is in Run
Mode, and that the Configuration and Logic are both Equal.

Once you have successfully downloaded and started the controller, you can monitor the execution of
the application.
12. Select the _MAIN tab in the InfoViewer to display the logic executing in the controller.
13. Select each Input Parameter to the Block call, press the Ctrl+Enter keys to place the value in Edit
mode.
14. Now enter a valid value for each input parameter and watch the result of the calculation change in
the editor.
In the example below, the value for $Tank_Height has been set to 5.00 and the value for
$Tank_Diameter has been set to 20.00.

GFS-426B 8-39
PACSystems Programming GE Intelligent Platforms

The resulting volume calculations are 1570.796 for cubic feet and 11751.13 for gallons.

15. Another approach to monitor the data is to open a Data Watch window.

Click on the Data Watch icon or press Shift+F8 to open the Data Watch window.
16. To add the operand variables to the Data Watch, drag-and-drop them from the LD Editor to the
Watch Window.
You can also select the entire rung of logic and drag-and-drop it to the Data Watch to add all of the
variables in the Rung to the watch.
An example Data Watch is shown below. Click on a Value to place the variable's data in edit mode :

17. Observe if the output variables behave as your expect.


18. Another quick way to add a variable to the Data Watch is to select the variable in the editor and type
the Ctrl+W keys.
19. A Proficy View Target named Test_Tank_QPView is also provided to help you exercise your logic.
Select the Test_Tank_QPView node in the Navigator.

8-40 GFS-426B
GE Intelligent Platforms PACSystems Programming

20. Select the Download and Start menu item to download the View application to the Quick Panel View.

21. The Proficy View application will look similar to the below application and allow you to exercise and
monitor the results of your ST logic.

GFS-426B 8-41
PACSystems Programming GE Intelligent Platforms

Monitoring Structured Text Logic


You can also monitor the logic that is executing inside the ST Block.
1. Select the CALL to the Calc_Tank_Volume parameterized block in the _MAIN block.
2. Double-click on the CALL or select the Open Block right-click menu item.
The Parameterized Block will open with the context of where it is being called, being indicated in the LD
Editor tab.

3. Now, if you place the cursor over any of the parameters or variables in the ST Block, the current value
from the Controller will be displayed.
In the example below, the cursor is over the Diameter parameter.

8-42 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #2: Check Tank Alarms Block


In this lab you will use Structured Text to create a Check Tank Alarms Parameterized Subroutine Block.
This block will be used in a future lab exercise as part of the Tank object.
The Check_Tank_Alarms Parameterized Block looks at the various status inputs for a Tank and determines
if any Alarm condition exists.
The Input parameters of this Parameterized Block are as follows:
Level [REAL]: Input from Tank that indicates the Tank level from 0 to 100 percent.
Exit_Valve [BOOL]: This is the current state of the Tank Exit_Valve.
Exit_Pump [BOOL]: This is the current state of the Tank Exit_Pump.
The Output parameters of this Parameterized Block are as follows:
ENO [BOOL]: The Enable Output is True if the Block executed successfully; For example, Output may
be Off if any input parameters to this Block are not valid.
Level_Low_Alarm [BOOL]: Set to True if the Tank_Level has fallen below 10%.
Level_High_Alarm [BOOL]: Set to True if the Tank_Level has risen above 90%.
Alarm [BOOL]: Set to True if an Alarm has occurred, or if other alarm exists.

Check_Tank_Alarms Parameterized Block Algorithm


The basic control algorithm of the Check_Tank_Alarms Parameterized Block is:
If Level is not in the range of 0-100 % then
Set Y0 to False; Error indication to calling routine
End_if;
If Level is less than 10%
then Low_Alarm is True;
Else Low_Alarm is False;
End_if;
If Level is greater than 90%
then High_Alarm is True;
Else High_Alarm is False;
End_if;
If Low_Alarm is True or High_Alarm is True or (Exit_Pump is On and Exit_Valve is Off)
Then Alarm is True;
Else Alarm is False;

GFS-426B 8-43
PACSystems Programming GE Intelligent Platforms

Create the Check_Tank_Alarms Parameterized Block


1. Repeat steps from Lab Exercise #1 to create an ST block named Check_Tank_Alarms.
2. Define the Check_Tank_Alarms Input parameters:

3. Define the Check_Tank_Alarms Output parameters:

8-44 GFS-426B
GE Intelligent Platforms PACSystems Programming

4. Add the following logic to the ST Block:

5. Validate your Block for errors; correct any errors until the project builds with no errors.

GFS-426B 8-45
PACSystems Programming GE Intelligent Platforms

6. Add a call to the Check_Tank_Alarms block to the _MAIN Block:

7. Download the Project to the RX3i Controller and test the Block execution.
For example, vary the $Tank_Level operand values and see if Alarm conditions are indicated.

8-46 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #3: Place Blocks in Toolchest


The Machine Edition Toolchest provides a repository to reuse your Structured Text Blocks.

1. Click on the Toolchest icon to open up the Toolchest, or press Shift+F9.


2. Right-click on a blank area inside the Toolchest window and Select the New Drawer menu.

3. Name the drawer ST_Lab.


4. Drag the Calc_Tank_Volume block from the Navigator to the ST_Lab Toolchest drawer.
5. Drag the Check_Tank_Alarms block from the Navigator to the ST_Lab Toolchest drawer.
Now you have these two blocks in a Toolchest drawer that you can share.

GFS-426B 8-47
PACSystems Programming GE Intelligent Platforms

Review Questions
1. Structured Text is one of two _________________________ languages in the IEC 61131-3 Programming
Set. The other is ________________________________________________.
2. True or False? ST programs can be cut and pasted between Machine Edition and a Windows based
text editor.
3. True or False? ST can be used in program blocks, parameterized subroutine blocks, user-defined
function blocks.
4. Which languages can create calls to a Structured Text block?

5. Yes or No? Can an ST block call a ladder block?


6. What is the easiest way to create a call to an ST block from a ladder program?

7. What is the easiest way to replicate logic and variables in Machine Edition?

8. When using a Toolchest object that contains PLC or PAC variables, drag the ___________ from the
____________ to the graphic panel in order to generate the graphics?
9. If you place the following logic in the controller, what will happen? (This is not recommended.)
While 1 do
my_var := my_var + 1;
end_while;

8-48 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review
In this module, you learned to:
Create Structured Text Blocks
Create Structured Text Logic
Create Structured Text Comments
Understand Structured Text language Statements, Operators, and Syntax
Understand Types of Structured Text statements
Edit Structured Text logic
Use variables in Structured Text logic, create variables from Structured Text editor
Monitor Structured Text logic
Call UDFBs from Structured Text logic
Modify Structured Text Editor configuration options
Understand considerations when programming in Structured Text

GFS-426B 8-49
Table 0:

Module 9
Function Block Diagram Programming

Function Block Diagram Programming


Topics

Upon completion of this module, you should be able to:


Understand Function Block Diagram (FBD) programming
Build logic using FBD
Download the FBD logic to a PACSystems Controller
Monitor FBD logic in the controller
PACSystems Programming GE Intelligent Platforms

Overview

Overview
Function Block Diagram (FBD) and Relay Ladder Diagram (RLD or LD) are the two graphical languages in
the IEC 61131-3 Programming standard. FBD has its origins in process control applications.
FBD programming takes logic elements such as instructions and functions, and connects or "wires" them
together to compose an FBD logic diagram. An FBD diagram is often also referred to as a page or sheet.
FBD logic elements may be as simple as AND, OR, and NOT instructions, or as complex as timers, math,
data comparison, and PID function blocks. Most FBD instructions are not conditionally executed, but are
executed on a continuous basis.
The basics of FBD programming are discussed in this module. This includes creating an FBD block,
changing the characteristics of the diagram, adding functions and function blocks to the diagram,
interconnecting logic elements, creating and using variables, downloading to the Controller, and observing
FBD logic execution.

Create FBD Blocks


You may create a new FBD Block by right-clicking
on the Program Blocks node in the Navigator,
then selecting the New FBD Block menu item.

Figure 1: New FBD Block Menu

You may edit the name of the block. The default


name is for a new FBD Block is "FBDBlk". The FBD
Block icon is displayed to the left of the Block
name.

Figure 2: New FBD Block in Navigator

9-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

FBD blocks may also be cut, copied, and pasted between Targets.
They may be moved in and out of the Toolchest like any other block.

GFS-426B 9-3
PACSystems Programming GE Intelligent Platforms

FBD Block Properties


You may change several FBD Block
Properties, such as Page Size, Orientation,
Margins, Zoom level, and diagram Solve
Order.
FBD blocks have other common block
properties such as Scheduling for Interrupt
Blocks and Parameters for Parameterized
and Function Blocks.

Figure 3: FBD Block Properties

9-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

FBD Logic
An FBD instruction is shown graphically in the FBD
Editor as a rectangle, with inputs entering from the left
and outputs exiting on the right.
In this example:
IN1 and IN2 are the Input Parameters.
Q is the Output Parameter.
Variables Vessel01_Vol and Vessel02_Vol are
the Input Operands for IN1 and IN2
respectively.
Total_Vol is the Output Operand assigned to the
Q parameter that has a current value of 14000.
The numeral 2 under the instruction name ADD Figure 4: FBD Instruction Example
inside the FBD instruction denotes the
execution order of the FBD logic on the page.
In its simplest form, an FBD instruction does the following:
1. Accepts Input Operands from variables, constants, or wires, which may be the output from other FBD
instructions.
2. Performs an operation by executing an FBD instruction, function, or function block, including the calling
of another block.
3. Stores the results of the operation to output operands that may be variables or wires. You can use the
operation results as input to other instructions, functions, or function blocks.
Considerations when wiring FBD logic are:
Input Operand may be only one : Variable, Wire, or Constant.
Output Operand may be only one : Variable or Wire.
From FBD logic, you may call Ladder Diagram, Structured Text, C, and FBD blocks. These blocks may be
Program Blocks, Parameterized Blocks, or User Defined Function Blocks.

GFS-426B 9-5
PACSystems Programming GE Intelligent Platforms

FBD Logic Solve Order


The FBD Editor provides three solve order (or execution order) options. This option selection determines the
sequence in which the logic instructions are executed on the FBD page. The solve order options are:
Manual: You manually set the solve order of each instruction on the FBD page.
Automatic Topmost Precedence: Scanning from left to right across the top, then left to right just below
the top, and so on (left-to-right, top-to-bottom), the FBD Editor solves the topmost instruction first. If
multiple instructions are equally topmost, the FBD Editor solves the leftmost instruction first.
Automatic Leftmost Precedence: Scanning from top to bottom across the left side of the FBD logic, then
top to bottom just right of the left side, and so on (top-to-bottom, left-to-right), the FBD editor solves the
leftmost instruction first. If multiple instructions are equally leftmost, the FBD editor solves the topmost
instruction first.
Both Automatic solve order algorithms are based on the following criteria:
If an FBD instruction has wire inputs, the FBD Editor will back track to determine which instruction
needs to execute first to meet instruction input requirements.
Display position of the instruction in the FBD editor.

Auto - Topmost Precedence Solve Order Example


When instructions are added to the FBD editor, they may appear as follows:

Figure 5: Auto Topmost Precedence FBD Solve Order Example


Using the Auto Topmost Precedence Solve Order option, as the instructions are encountered left-to-
right, top-to-bottom, they are encountered in the following order: ADD, MUL, and DIV. Since all inputs are
resolved for each instruction, the execution order is defined as indicated in the diagram.

9-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Auto - Topmost Precedence Solve Order with Wired Logic Example


If this logic is modified to "wire" the blocks together, then the following logic results that has a different
Solve Order:

Figure 6: Auto - Topmost Precedence Solve Order with Wired Logic Example
The ADD instruction with a solve order of 3 (above) has the highest solve order because its input is
connected by a wire to the output of the MUL instruction with a solve order of 2. The ADD instruction
cannot have its input at connection point IN1 resolved until the MUL instruction executes.
The MUL instruction (solve order of 2) cannot be resolved until the DIV instruction solve order is resolved,
because a wire connects an input of the MUL instruction to the output of the DIV instruction.
The DIV instruction is first in the solve order because of the following:
There are no input wires connected to it.
There are no instructions in the FBD editor that are positioned higher whose inputs are not
dependent on resolution of this instruction.

GFS-426B 9-7
PACSystems Programming GE Intelligent Platforms

Documenting FBD Logic


You use the Text instruction to document the details of your FBD
logic. Text instructions are typically used to give a verbal
description of the function performed by the logic.
Insert a Text Instruction in your FBD logic by selecting the TEXT
instruction from the Insert Instruction list in the FBD Editor.

Figure 7: FBD Editor Insert Instruction List

A Text instruction first appears as a box in the diagram.

Figure 8: FBD Editor Insert Instruction List

Click on the instruction and handles are displayed that can be


used to modify the size of the box.

Figure 9: Initial Text instruction Placed in


Logic

An example of a Text
instruction is shown here:

Figure 10: FBD Text Instruction Example

9-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Title Box
An optional Title Box may be enabled to provide documentation as part of the FBD diagram. The Title Box
is enabled and its location defined by the Title Box Position block property.
The Title Box will display the FBD blocks Name, Description, Revision, Author, and Date properties on the
FBD page. An example of a Title Box is show below:

Figure 11: FBD Ttitle Box Example

GFS-426B 9-9
PACSystems Programming GE Intelligent Platforms

Built-in Functions Supported for FBD Calls


The following Built-in Controller Functions are supported in FBD logic.

Function Group Supported Built-in Controller Functions


Advanced Math ABS
EXP, EXPT
COS, SIN, TAN, ACOS, ASIN, ATAN
LN, LOG
SQRT
Bit Operations AND*, NOT, OR*, XOR* [*Up to 8 inputs , configured by user]
ROL, ROR
SHIFTL, SHIFTR
Comment Block TEXT
Comparison CMP, EQ, GE, GT, LE, LT, NE, RANGE
Control DO_IO
R_TRIG, F_TRIG
MASK_IO_INTR
PID_ISA, PID_IND
SVC_REQ
SUS_IO, SUSP_IO_INTR
Counters DNCTR, UPCTR
Math ADD*, DIV*, MOD, MUL*, NEG, SCALE, SUB [*Up to 8 inputs , configured by user]
Move BUS_[RD, RMW_BYTE, RMW_DWORD, RMW_WORD, TS_BYTE, TS_WORD, WRT]
COMM_REQ
FANOUT
MOV
PACMotion Function Blocks See PACMotion documentation for list of available built-in function blocks.
Program Flow ARG_PRES, CALL
Timers OFDT_[HUNDS, SEC, TENTHS, THOUS]
ONDTR_[HUNDS, SEC, TENTHS, THOUS]
TMR_[HUNDS, SEC, TENTHS, THOUS]
TOF, TON, TP
Type Conversion DEG_TO_RAD, RAD_TO_DEG
BCD4_TO_[INT, REAL, UINT]
BCD8_TO_[DINT, REAL]
DINT_TO_[BCD8, DWORD, INT, LREAL, REAL, UINT]
DWORD_TO_DINT
INT_TO_[BCD4, DINT, REAL, UINT, WORD]
LREAL_TO_DINT, LREAL_TOREAL
REAL_TO_[DINT, INT, LREAL, UINT]
TRUNC_[DINT, INT]
UINT_TO_[BCD4, DINT, INT, REAL, WORD]
WORD_TO_[INT, UINT]
Table 1: FBD Built-In Controller Functions

9-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

FBD Logic Examples


Some basic examples of FBD logic are summarized in this section.
In this example:
The AND instruction has four input
operands.
The first two are wires from other
instructions.
The Overload_Off operand is negated, and
the IN4 parameter has a variable named
TimerX_not_Done assigned to it.
Figure 12: AND Instruction With a Negated Input

In this example:
The Radius value is squared
(EXPonenT of 2) and then
multiplied by the variable PI
to calculate the area of a
circle (Circle_Area).
The result of the exponent
calculation is wired to IN1 of Figure 13: FBD Instructions with Real Data Types
the MUL function.
In the example below:
Executes when the Boolean variable CalcIt turns ON.
The Service Request function block (SVC_REQ) reads the value of the Elapsed Time Clock Since
Power On (Function Code 50).
The Move (MOV) function then moves the double-integer nanoseconds value located in This_Time[2]
to the variable NewTime.Time_ZnanoSec.
When the move occurs, the MOV instructions ENO output goes TRUE and executes the CALL to the
subroutine CalcElapsedTime.

Figure 14: Advanced FBD Logic Example

GFS-426B 9-11
PACSystems Programming GE Intelligent Platforms

In this example:
A TON (On Delay Timer) activates when the
End_of_Travel_LS signal becomes TRUE.
The timer runs for the time specified by
DwellTime, 1-1/4 seconds (1250 msec),
then activates the Boolean variable
DwellDN.
The variable name DwellTimer above the
instruction is a data structure that Figure 15: FBD TON Function Block Call
contains the timer instance data.

FBD Logic Data Types


In general, FBD Logic instructions do not specify a Data Type. For example, there is an FBD ADD
instruction, not an ADD_INT, ADD_DINT, and so forth.
To determine the Data Type of an FBD instruction, the FBD Editor derives the Data Type from the
instructions operands. This means that FBD instruction Input and Output Operand Data Types must match.
All of the operands of an ADD instruction must match, as is shown in the example below where all of the
operands are REAL Data Types.

Figure 16: FBD Logic With REAL Data Type

Calling Blocks from FBD Logic


An FBD block can call Program Block, Parameterized
Block, user defined Function Blocks (UDFB), and C
External Blocks.
In the example below, TConvert is the name of the
Program Block that is called when the EN input is
Figure 17: FBD Call to TConvert Block
True (On).

9-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

Edit FBD Logic


To open the FDB Block for editing, double-click the
FBD Block in the Navigator, or right-click on the Block
and choose the Open menu item.

Figure 18: FBD Editor Open Block Menu

Add Instructions to FBD Logic


There are several ways to add an instruction to an FBD diagram:
Using the FBD Editor Insert Instruction right-click menu
Using the FBD Instruction Toolchest Drawer
Using standard Copy/Paste Operations

FBD Editor Insert Instruction Right-click Menu


To enter FBD instructions using the FBD Editor Insert
Instruction right-click menu, follow these steps.
1. Right-click inside the FBD diagram to display the FBD
Editor right-click menu:
Figure 19: FBD Editor Right-click Menu

2. Click the Insert Instruction menu item to view a


smart list of possible instructions.

Figure 20: FBD Editor Instruction Smart List

GFS-426B 9-13
PACSystems Programming GE Intelligent Platforms

3. Scroll down the list to find an instruction, and then


double-click an instruction to insert it in the diagram.
Or you may select the instruction from the list and
press Enter.

Figure 21: Instruction Selected in FBD Smart List

4. In the Insert Instruction selection box, type the first


few letters of the instruction to advance the
progressive search.
5. Press Enter to insert the instruction.

Figure 22: FBD Editor Instruction Smart List with


"p" Entered

9-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

FBD Instruction Toolchest Drawer


To enter FBD instructions using the FBD Instruction Toolchest Drawer, follow these steps.

1. Select the FBD Instruction drawer in the 2. Expand the instruction type Math node to see the
Toolchest. The FBD Instruction Toolchest list of FBD Math instructions.
drawer categories are displayed.

Figure 23: FBD Instruction Toolchest Drawer


Figure 24: FBD Instruction Toolchest Drawer

3. Drag-and-drop the instruction you want, ADD for example, onto the FBD page.

Figure 25: Drag-and-drop FBD ADD Instruction from Toolchest Drawer

GFS-426B 9-15
PACSystems Programming GE Intelligent Platforms

Copy/Paste FBD Instructions


To copy and paste FBD instructions, follow these steps.
1. Select an FBD Instruction in the FBD
Editor.

Figure 26: Selected FBD Instruction

2. Select the Copy right-click menu to copy


the instruction to the clipboard.

Figure 27: FBD Editor Copy Menu

3. Now, move to an empty space on the FBD Editor page, and select the Paste right-click menu.
You can also use the Ctrl+C and Ctrl+V copy/paste short cut keys to perform these operations.

Figure 28: Pasted FBD Instruction

9-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

Call Blocks in FBD Logic


To call other Blocks in FBD Logic, follow these steps.
1. If you want to CALL a Block from your FBD logic, select the block in the Navigator.
2. Drag-and-drop the block to the FBD Editor page.

Figure 29: Drag-and-drop Block from Navigator

3. You may also enter a CALL instruction in the FBD Editor


by selecting the CALL instruction in the Insert
Instruction right-click menu.

Figure 30: CALL Instruction Selected in FBD


Instruction List

GFS-426B 9-17
PACSystems Programming GE Intelligent Platforms

4. Pick the Block to call from the list of available blocks.

Figure 31: List of Blocks that may be Called

5. If the block is a UDFB, an entry dialog will


appear asking for an instance name.

Figure 32: Instance Name Entry Dialog

9-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

6. After you enter or select an Instance Name,


such as ST_WARN_1, the call to the UDFB
instance appears on the diagram.

Figure 33: UDFB With ST_WARN_1 Instance

Wire FBD Logic Together


A wire can connect one blocks output to another blocks input. To draw a wire:
Place the cursor on one input or output, click the left mouse button to select the starting point. A
cursor indicates that you are at a valid starting point.
Drag the cursor to the ending point input or output. A cursor indicates that you are at a valid
ending point.
Release the cursor after the check mark appears on the drop location.

Figure 34: Wiring Block Together in the FBD Editor

FBD Wires
An FBD wire is a line that graphically links the output of an FBD instruction to the input of another FBD
instruction. Each FBD wire is also associated with a wire variable. When you draw a wire, a default Local
Variable is created.
To view the wire variable that is assigned to a wire:
Select the wire in the FBD Editor.

GFS-426B 9-19
PACSystems Programming GE Intelligent Platforms

Select the right-click Properties menu to display the wire variable properties in the Inspector.

Figure 35: Display Wire Variable Properties

Other FBD wire details are as follows:


Wires may be assigned to a different variable
Wires may be used to develop feedback loops
Wires can begin and end only at an FBD instruction; they cannot begin or end at a bit reference,
variable, or constant
Wires can be :
Analog (Numeric)
Discrete (Boolean) (ON/OFF)
Discrete wires can be negated

Negative Boolean Flow


Boolean inputs may be True (On) or False (Off). To invert (or negate) a Boolean input or output, use a NOT
instruction or a negation indicator. The following two circuits are logically identical.

Figure 36: FBD Logic With Negated Input

9-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

In the upper circuit, the circle on input IN2 of the AND


function indicates that the Boolean signal Fault_present
is negated prior to solving the AND.
In the lower circuit the explicit NOT function also
negates the signal Fault_present before the AND in that
circuit is solved.
To negate a Boolean signal, right-click on the signal
name and select the Negate menu item. Wires may
also be negated using this method.

Figure 37: FBD Editor Negate Menu Item

Assign Variables to Inputs and Outputs


A variable is used to reference a data location in the Controller. You may assign variables to operands in
FBD logic using the same techniques used for adding variables to Ladder Diagram logic:
Type a new variable name on an instructions input or output operand location.
Type all or part of an existing variable on an instructions input or output operand location, then
cursor down in the smart list or click an existing variable in the Variable Smart List.
Drag-and-drop a variable from the Navigator Variable List tab.
Type a New Variable Name for an Input or Output Operand
1. Place the cursor next to an input or
output parameter.
2. When a small black square appears,
begin typing the new variable name to
be assigned as the operand.
Figure 38: Entering a New Variable Name

GFS-426B 9-21
PACSystems Programming GE Intelligent Platforms

If the variable will be assigned a hardware address (%I,


%M, %R), you may assign that address to the new
variable by following the variable name with a comma,
then typing the hardware address starting with the
percent sign (%).
A green color for the variable indicates that this is
a legal variable name.
If the color is red, then the variable name is not
valid.

Figure 39: Defining New Variable Name with an


Assigned Reference Address

Type All or Part of an Existing Variable as an Input or Output Operand


1. If the variable exists, double-click on the black square next to
the functions input or output parameter to display the
variable dialog
2. Start typing the first few letters of the variable name.
3. When the variable name appears in the list, either click the
name or press the down arrow until the variable appears in
the entry box.

Figure 40: Selecting an Existing Variable

Drag-and-Drop an Existing Variable from the Variable List


1. With the FBD diagram in view, open the Variable List in the Navigator. Scroll to the variable you want
to use, left click the variable to select it.

9-22 GFS-426B
GE Intelligent Platforms PACSystems Programming

2. Drag it to the input or output operand location where you want the variable to be assigned.

Figure 41: Drag and Drop Existing Variable to FBD Editor


When you release the cursor, the variable is assigned to the instruction parameter.

Sample FBD Block


Create a Parameterized FBD Block that scales an analog input using REAL math. Some of the analog
modules used in a PACSystems RX3i controller do not have internal scaling. These modules return an
integer value between 0 and 32000 for the full scale of 4-20 ma or 0-10 volts. The PACSystems instruction
set includes an integer scale block, but not a real scale block.

1. Start by creating a new FBD block. Change the


block name to ScaleReal.

Figure 42: Renaming an FBD Block in the Navigator

GFS-426B 9-23
PACSystems Programming GE Intelligent Platforms

2. Navigate to the Block Type property in the Block


Property page and choose Parameterized Block
from the list of Block Types.

Figure 43: Changing the Block Type to Parameterized


Block

3. Open the Parameters property.


4. Define the Input parameters for the ScaleReal block as follows:

Figure 44: ScaleReal Block Input Parameters

9-24 GFS-426B
GE Intelligent Platforms PACSystems Programming

5. Click on the Outputs tab and enter the following output parameter:

Figure 45: ScaleReal Block Output Parameter


6. Open the block to add FBD logic.
7. Insert an INT_TO_REAL function to convert the integer IN1
parameter to a real number.
Right-click in the diagram, choose select the Insert
Instruction menu item.
Scroll down (or type INT) to see the INT_TO_REAL function.
Double-click on the instruction name to place the
instruction in the diagram.

Figure 46: Selecting INT_TO_REAL Function

The instruction will look like this:

Figure 47: INT_TO_REAL Function Call in


FBD Editor

GFS-426B 9-25
PACSystems Programming GE Intelligent Platforms

8. On the IN input operand location, right-click to display the


variable input dialog. Scroll down to IN1 or type IN1.
Double-click or press Enter to assign the variable to the
input parameter.

Figure 48: Selecting Input Parameter


Variable in FBD Editor

The result should look like this:

IN1 is displayed in a gold color, indicating that this is a


parameter of the ScaleReal parameterized block.
Figure 49: IN1 Input Parameter in FBD
Editor

The equation for scaling an analog input is:


Scaled Value = (Input In Lo) * (Out Hi Out Lo)/(In High In Lo) + Out Lo
-or-
Q = (IN1 ILO) * (OHI OLO) / (IHI ILO) + OLO

9-26 GFS-426B
GE Intelligent Platforms PACSystems Programming

9. Below the INT_TO_REAL function, add the following logic.


i. Place three Subtract (SUB) instructions, one below the
other.
ii. Connect the output of the INT_TO_REAL instruction to
the IN1 input of the first SUB instruction.
iii. Assign the parameter variable ILO to the IN2 input of the
first SUB instruction.
iv. Assign the parameter variables OHI and OLO to the
inputs to the second SUB instruction.
v. Assign the parameter variables IHI and IHO on the
inputs to the third SUB instruction.

Figure 50: Building FBD Logic with 3 SUB


Instructions

10. Now place a MUL instruction to the right


of the top two SUB instructions.
11. Wire the Q outputs of the SUBs to the IN
inputs of the MUL.
To draw a wire, hold down the left mouse
button and move the cursor from the input
to the output, or the output to the input.

Figure 51: Wiring SUB Instructions to a MUL Instruction

GFS-426B 9-27
PACSystems Programming GE Intelligent Platforms

12. Now place a DIV


instruction to the
right of the MUL
instruction.
13. Wire the Q output of
the MUL and the Q
output of the third
SUB to the IN inputs
of the DIV.

Figure 52: Wiring DIV Instruction to MUL and SUB Instructions

14. Place an ADD instruction to the right of the DIV.


15. Wire the Q output of the DIV to the IN1 of the ADD.
16. Assign the parameter variable OLO to the IN2 of the ADD.

9-28 GFS-426B
GE Intelligent Platforms PACSystems Programming

17. Assign the Q output parameter of the function on the Q output of the ADD.

Figure 53: Final Scaling Logic in FBD


18. Validate your logic.
19. Create an FBD Block, with a name of your
choosing, TestScaleReal, for example. You will use
this block to test the ScaleReal block.

Figure 54: Creating New FBD Block Named


TestScaleReal

20. Open your test block.

GFS-426B 9-29
PACSystems Programming GE Intelligent Platforms

21. Insert two CALL instructions to call the


ScaleReal block. You can simply drag-
and-drop the ScaleReal block from the
Navigator to the FBD Editor.

Figure 55: Two CALLs to the ScaleReal Block

22. Assign variable names or


constants to the
parameters to each block.
23. Assign the #ALW_ON
system variable to the EN
(Enable Input) parameter
of the first CALL.
24. Wire the ENO output from
the first CALL to the EN
input parameter of the
second CALL.

Figure 56: Two ScaleReal CALLs

25. In _MAIN, call your test block to exercise your logic:

Figure 57: Calling TextScaleReal Block from _MAIN Block


26. Validate your test block.
27. Go online to the controller and download your application.
28. Verify that your block operates as expected by changing the online value of Analog_01 and
Analog_02.

9-30 GFS-426B
GE Intelligent Platforms PACSystems Programming

29. Select the variable in the FBD logic, right-click and


select the Write Value menu item, or type Ctrl-
Enter. This will place the online value in edit
mode.
30. Now enter a new value for the variable.

Figure 58: Using Write Value Menu to Change Value of


Analog_01 Input Parameter

The input data changes


and the results are now
reflected in the logic
execution.

Figure 59: Changing Value of Analog_02 Input Parameter

GFS-426B 9-31
PACSystems Programming GE Intelligent Platforms

Lab Exercises
These exercises are designed to demonstrate how to:
Create and call a Parameterized Block that has been written in FBD to Calculate Tank Volume and
Check Tank Alarm Conditions.
Place created Parameterized Block in the Toolchest.
This lab also provides the opportunity to contrast the style of developing Blocks in Structured Text
verses Function Block Diagram since these two Blocks were also developed in the Structured Text
module.

Lab Exercise #1: Calculate Tank Volume Block


In this lab you will use Function Block Diagram programming to create a Calculate Tank Volume
Parameterized Subroutine Block. This block will be used in a future lab exercise as part of the Tank object.
This lab takes you step-by-step through the process for creating the Calc_Tank_Volume block.
The Calc_Tank_Volume Parameterized Block takes the dimensions of the Tank and calculates the Volume
of the Tank in cubic feet and gallons.
The Input parameters of this Parameterized Block are:
Height [REAL]: Height of the Tank in Feet.
Diameter [REAL]: Diameter of the Tank in Feet.
The Output parameters of this Parameterized Block are:
ENO [BOOL]: The Enable Output of this Block is True if the Block executed successfully; For example,
this Output may be Off if any input parameters are not valid.
Volume_Ft3 [REAL]: Volume of the Tank in cubic feet.
Volume_Gal [REAL]: Volume of the Tank in gallons. (Cubic feet times 7.481)

Calc_Tank_Volume Parameterized Block Algorithm


The basic control algorithm of the Calc_Tank_Volume Parameterized Block is:
If Height less than 0.0 or Diameter less than 0.0 then
Set Y0 to False; Error indication to calling routine
End_if;
Tank_Volume_Ft3 equals 3.141592 * (Tank_Diameter / 2.0)**2 * Tank_Height ;
Tank_Volume_Gal equals Tank_Volume_Ft3 * 7.481;

9-32 GFS-426B
GE Intelligent Platforms PACSystems Programming

Create the Calc_Tank_Volume Parameterized Block


1. Begin by opening on the Project named GFS_426_FBD_Lab.

2. Create a new FBD Block for the


RX3i Target using the New
FBD Block menu item.

3. Change the default name (FBDBlk) to


Calc_Tank_Volume.

Notice how the FBD block icon differs from LD


and ST block icons.

GFS-426B 9-33
PACSystems Programming GE Intelligent Platforms

4. In the Inspector properties for


Calc_Tank_Volume, click on the Block Type
item.
Change it to a Parameterized Block.

5. Click inside the Parameters property, and then click the ellipses on right side of the box to open the
Parameters dialog.
6. The Calc_Tank_Volume block has two Input parameters, HEIGHT and DIAMETER, that are REAL
parameters in units of feet. Enter these parameters in the Parameters dialog as follows:

7. The Calc_Tank_Volume block has two output parameters: Volume_Ft3 and Volume_Gal.

9-34 GFS-426B
GE Intelligent Platforms PACSystems Programming

Click on the Outputs tab in the Parameters dialog to add these output parameters. Both are REAL
parameters.

8. Since Calc_Tank_Volume is defined as a Parameterized Block, it has no Member parameters.


Click the OK button to close the dialog box.
9. Open the Calc_Tank_Volume FBD block in the FBD Editor so that you can enter the FBD Logic.
The FBD Editor opens with black space for you to enter your logic.

10. Add the logic to check for valid parameters to the Block call. The logic should check to see if the
Height and Diameter parameters are within a valid range of 1.0 to 200.0.
This range is somewhat arbitrary, but will be fine for this example. So, if Height and Diameter are both
within this range, set the Ok output of the Block to be True (1).

GFS-426B 9-35
PACSystems Programming GE Intelligent Platforms

Ok := ( (Height >= 1.0) AND (Height <= 200.0) )


AND
( (Diameter >= 1.0) AND (Diameter <= 200.0) );
11. Select the Insert Instruction FBD Editor right-mouse menu item.

12. Select the GE (Greater than Or Equal) instruction from the


Instruction List:

The GE instruction is added to the logic:

9-36 GFS-426B
GE Intelligent Platforms PACSystems Programming

13. Add the operands to the GE instruction. Click to the left of the IN1 parameter and select the Height
Input Parameter from the smart variable list:

14. Click to the left of the IN2 parameter and enter


the constant 1.0. In this logic, you are checking
for the Height parameter being greater than 1.0.
This logic results:

15. Add a LE (Less than or Equal) instruction


underneath the first one to check for the Height
being less than 200.0.
This logic results :

GFS-426B 9-37
PACSystems Programming GE Intelligent Platforms

16. Wire these two instructions together with an


AND instruction to check for the combination
of these conditions being true.
Add an AND instruction to the right of these
two instructions.
17. Wire the output of the GE instruction to the
AND IN1 parameter.
18. Wire the output of the LE instruction to the
AND IN2 parameter.
This logic results:

19. Create the same logic combination for


the Diameter, located under this logic :

Note
You can drag the instructions higher in the diagram to make more space for the new logic.

9-38 GFS-426B
GE Intelligent Platforms PACSystems Programming

20. AND the outputs of the two AND instructions together to complete the logic, assigning the Q output of
the final AND to the Block Y0 Output parameter.

This logic sets the Y0 output parameter to 1 if the inputs are within the 1.0 to 200.0 range.
21. Now calculate the tank volume in cubic feet using the following formula:
Tank_Volume_Ft3 equals 3.141592 * (Tank_Diameter / 2.0)**2 * Tank_Height ;

22. First, use the DIV instruction to divide the


Diameter parameter by 2.0:

23. Now raise the result of that calculation to


the 2nd power using the EXPT instruction.

24. Take the result of the EXPT instruction and multiply it times 3.141592 and the Height parameter.

GFS-426B 9-39
PACSystems Programming GE Intelligent Platforms

Note
You can change the Number of Inputs property of the MUL instruction to have 3 parameters, making it a
very handy way to perform the calculation.

25. Assign the output of the MUL instruction to the Volume_Ft3 output parameter to complete the
calculation.

26. To perform the cubic feet to gallons calculation,


simply multiply the Volume_Ft3 result by 7.481:

9-40 GFS-426B
GE Intelligent Platforms PACSystems Programming

27. You may also document your logic by adding a text instruction to describe the logic:

28. When you have finished, right-click on the RX3i Target and select Validate from the Target right mouse
menu, press F7,
-or-
click on the Validate Active Target toolbar button. This will check your FBD logic for errors.

Call the Calc_Tank_Volume Block


1. Double-Click on the _MAIN block in the Navigator to open the main block in the LD Editor.
2. Drag the Calc_Tank_Volume block from the Navigator into the _MAIN block.
This creates a CALL to the Calc_Tank_Volume block.

GFS-426B 9-41
PACSystems Programming GE Intelligent Platforms

Your CALL will look something like this. Notice how the CALL looks the same as an ST or LD Block call.

3. Assign the following variable names for the Input and Output Parameters:
$Tank_Height to Height input parameter.
$Tank_Diameter to Diameter input parameter.
$Tank_Volume_Ft3 to Volume_Ft3 output parameter.
$Tank_Volume_Gal to Volume_Gal output parameter.

4. Connect power flow to the block CALL. The call should look something like:

The four Universal Variables are linked to a View application so that you can easily test out your logic
in an HMI panel.

Test Your Work


1. Click the icon to validate your program.
2. If no errors are present, right-click on the RX3i Target and select Go Online from the menu, or press the
Online/Offline toolbar button.
3. Next, enter Programmer Mode by right-clicking and selecting the Online Commands Set
Programmer Mode menu, or by pressing the Toggle Online Mode toolbar button.
4. Next, stop the Controller (if necessary) by selecting the Online Commands Stop Controller menu,
or press the Stop Active Target toolbar button.

9-42 GFS-426B
GE Intelligent Platforms PACSystems Programming

5. Click OK to stop the Controller with Outputs Disabled.


6. Download your program to the
Controller by right-clicking and selecting
the Download to Controller menu, or
press the F8 function key, or press the
Download Active Target toolbar
button.
Make sure that the items in the dialog
box are checked as shown and then click
OK.

7. Verify that your program successfully downloaded to the controller by examining the Feedback Zone
and the Status Bar.

8. Start the Controller by selecting the Online Commands Start Controller menu, or by pressing the
Start Active Target toolbar button.
9. Click the OK button to start with Outputs Enabled.
10. Check the information displayed on the Status Bar to verify that the PACSystems Controller is in Run
Mode, and that the Configuration and Logic are both Equal.

Once you have successfully downloaded and started the controller, you can monitor the execution of
the application.
11. Select the _MAIN tab in the InfoViewer to display the logic executing in the controller.
12. Select each input parameter to the Block call, press the Ctrl+Enter keys to place the value in Edit
mode.
Enter a valid value for each input parameter and watch the result of the calculation change in the
editor.
In the example below, the value for $Tank_Height has been set to 7.50 and the value for
$Tank_Diameter has been set to 10.00.

GFS-426B 9-43
PACSystems Programming GE Intelligent Platforms

The resulting volume calculations are 589.0485 for cubic feet and 4406.672 for gallons.

13. Another approach to monitor the data is to open a Data Watch window.

Click on the Data Watch icon or press Shift+F8 to open the Data Watch window.

14. To add the operand variables to the


Data Watch, drag-and-drop them
from the LD Editor to the watch
window.
You can also select the entire rung
of logic and drag-and-drop it to
the Data Watch to add all of the
variables in the Rung to the watch.
An example Data Watch is shown
here:

15. Observe if the output variables behave as your expect.


16. Another quick way to add a variable to the Data Watch is to select the variable in the editor and type
the Ctrl+W keys.
17. A Proficy View Target named
Test_Tank_QPView is also provided
to help you exercise your logic.
Select the Test_Tank_QPView node
in the Navigator and select the
Download and Start menu item to
download the View application to
the Quick Panel View.

9-44 GFS-426B
GE Intelligent Platforms PACSystems Programming

The Proficy View application will


look similar to the below
application and allow you to
exercise and monitor the results of
your FBD logic.

Monitor Function Block Diagram Logic


You can also monitor the logic that is executing inside the FBD Block.
1. To do this, select the CALL to the Calc_Tank_Volume parameterized block in the _MAIN block.
2. Double-click on the CALL or select the Open Block right-mouse menu item.
The Parameterized Block will open with the context of where it is being called, being indicated in the LD
Editor tab.

3. Now, if you look at the FBD logic, you will notice that the wires in the logic are animated with values.
This allows you to see data as it flows through the logic for calculations. For example, you can track
the information as it passes from one instruction to the next.

GFS-426B 9-45
PACSystems Programming GE Intelligent Platforms

In the case of the calculation below, you can see the results of each intermediate step, which is a great
debug tool.

4. If you select a wire between two instructions, the name of the wire, Calc_Tank_Volume.Wire_1581_40
in this case, is displayed in the Inspector.
Wires may also be placed in a Data Watch for monitoring.

9-46 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #2: Check Tank Alarms Block


In this lab you will use Function Block Diagram to create a Check Tank Alarms Parameterized Subroutine
Block. This block will be used in a future lab exercise as part of the Tank object.
The Check_Tank_Alarms Parameterized Block looks at the various status inputs for a Tank and determines
if any Alarm condition exists.
The Input parameters of this Parameterized Block are as follows:
Level [REAL]: Input from Tank that indicates the Tank level from 0 to 100 percent.
Exit_Valve [BOOL]: This is the current state of the Tank Exit_Valve.
Exit_Pump [BOOL]: This is the current state of the Tank Exit_Pump.
The Output parameters of this Parameterized Block are as follows:
ENO [BOOL]: The Enable Output of this Block if True if the Block executed successfully; For example,
Output may be Off if any input parameters to this Block are not valid.
Level_Low_Alarm [BOOL]: Set to True if the Tank_Level has fallen below 10%.
Level_High_Alarm [BOOL]: Set to True if the Tank_Level has risen above 90%.
Alarm [BOOL]: Set to True if a Low or High Alarm has occurred,or if other alarm exists.

Check_Tank_Alarms Parameterized Block Algorithm


The basic control algorithm of the Check_Tank_Alarms Parameterized Block is:
If Level is not in the range of 0-100 % then
Set Y0 to False; Error indication to calling routine
End_if;
If Level is less than 10%
then Low_Alarm is True;
Else Low_Alarm is False;
End_if;
If Level is greater than 90%
then High_Alarm is True;
Else High_Alarm is False;
End_if;
If Low_Alarm is True or High_Alarm is True
Then Alarm is True;
Else Alarm is False;

GFS-426B 9-47
PACSystems Programming GE Intelligent Platforms

Create the Check_Tank_Alarms Parameterized Block


1. Repeat steps from Lab Exercise #1 to create an FBD Parameterized Block named Check_Tank_Alarms.
2. Define the Check_Tank_Alarms Input parameters:

3. Define the Check_Tank_Alarms Output parameters:

9-48 GFS-426B
GE Intelligent Platforms PACSystems Programming

4. Add the following logic to the FBD Block:

5. Validate your Block for errors.


6. Correct any errors until the Project builds with no errors.
7. Add a CALL to the Check_Tank_Alarms block to the _MAIN Block:

8. Download the Project to the RX3i Controller and test the Blocks execution.
For example, vary the $Tank_Level operands values and see if Alarm conditions are indicated.

GFS-426B 9-49
PACSystems Programming GE Intelligent Platforms

9-50 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #3: Placing Blocks in Toolchest


The Machine Edition Toolchest provides a repository to reuse your Function Block Diagram Blocks.

1. Click on the Toolchest icon to open up the Toolchest, or press Shift+F9.


2. Right-click on a blank area inside the
Toolchest window and Select "New Drawer".

3. Name the drawer FBD_Lab.


4. Drag the Calc_Tank_Volume block from the
Navigator to the FBD_Lab Toolchest drawer.
5. Drag the Check_Tank_Alarms and block from
the Navigator to the FBD_Lab Toolchest
drawer.
Now you have these two blocks in a Toolchest
drawer that you can share.

GFS-426B 9-51
PACSystems Programming GE Intelligent Platforms

Review Questions
1. Function Block Diagram is one of two ______________ languages in the IEC 61131-3 Programming Set.
The other is _________________.
2. True or False: Wires in an FBD diagram can connect more than two points.
3. To view the variable name associated with a wire, ___________ the wire in the FBD Editor, and open
the __________.
4. On an FBD diagram, dotted wires indicate _______________ flow and solid wires indicate
____________ flow.
5. A dark circle on a Boolean signal signifies _______________________________________.
6. To add a comment to your FBD diagram, use the _______________________ instruction.
7. The default page orientation for an FBD diagram is _____________. This can be changed to
__________ in the _______________ Settings entry in the Inspector.
8. The number inside an FBD instruction indicates the _______________________________.
9. Name two methods for adding FBD instructions to your diagram.

10. In an FBD diagram, some instructions have a name above them. This is called the
____________________________________ name.

9-52 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review
In this module, you learned to:
Create Function Block Diagram (FBD) logic
Build logic using FBD in a User Defined Function Block
Download the logic to a PACSystems Controller
Build instances of the block and run them in the controller

GFS-426B 9-53
Table 0:

Module 10
New Topic

User Defined Function Blocks (UDFBs)


Topics

Upon completion of this module, you should be able to:


Define User-Defined Function Blocks (UDFBs)
Write logic using User-Defined Function Blocks
Download the logic to a PACSystems controller
Interact with the logic utilizing UDFBs
PACSystems Programming GE Intelligent Platforms

Programming with User-Defined Function Blocks

Overview
User-Defined Function Blocks (UDFBs) are valuable tools that can be used to create effective and efficient
control software applications. UDFBs are used to organize an application into re-usable Application
Building Blocks that make it easy to develop, debug, and deploy your control solutions.
A UDFB is a logic blocks that has parameters and instance data (or member variables) that lives over time.
UDFBs are similar to controller function blocks such as Timers and PID functions. UDFBs allow you to define
your own function blocks, not being limited to the function blocks provided in the PACSystems instruction
set. In many cases, the use of UDFBs results in a reduction in total program size.
Once a UDFB is defined, multiple instances of it can be created and executed. Each instance has its own
unique name and copy of the UDFB instance data, which consists of the UDFB member variables and all of
its input and output parameters. When a UDFB is called for a given instance, the UDFB logic operates on
that instances data. The values of the instance data are retained from one execution of the UDFB to the
next.
The UDFB Instance Data is stored in the PACSystems controller as Symbolic Variables. The Programmer
and Controller manage the location of these variables in memory for the user. This information is accessed
in the application and by external devices such as an HMI, by their symbolic variable names.
Examples where UDFBs may be used include functions to Control and Monitor Field Devices, Field Device
Scaling or Decoding, Conversions, Calculations, and Special or Proprietary Functions.
An example of a User-Defined Function Block call is shown below. In this example, the UDFB named
ACME_CONVEYOR is called with the Instance Variable named Conv_1.

Figure 1: Example of User-Defined Function Block Call


UDFB logic may be written in the LD, FBD, or ST programming languages, and they can call other types of
blocks, even other UDFBs. The following table depicts an instance of the UDFB named MyFB with two input
parameters and two output parameters being called in Ladder Diagram (LD), Function Block Diagram (FBD),
and Structured Text (ST) programming.
The instance data for the UDFB call below is associated with the Symbolic Variable ABC.

10-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

In LD Logic In FBD Logic In ST Logic


Formal call convention:
ABC (in1 := MyInt,
in2 := MyDint,
q1 => OutDint,
q2 => MyReal);
Informal call convention:
ABC (MyInt, MyDint, MyReal,
OutDint);
The UDFB name (MYFB) appears at the The Instance Name (ABC) appears The Instance Name (ABC) appears at
top of the Block. above the Block. the beginning of the Call.
The Instance Name (ABC) is shown The UDFB name (MyFB) is shown The user-Defined function block
below the UDFB name. below the Instance Name. name does not appear in the call, but
is displayed in the ST Editor Tooltip.

Note Note
Hover the mouse over a The numeral 1 inside the
parameter to see it's full rectangle immediately
name and properties. below myFB indicates
the Blocks Solve Order.
Use the Adjust Cell Width
right-click menu to widen
the instruction,

Table 1: Example of User-Defined Function Block Calls in LD, FBD, and ST

UDFB Features
The main UDFB features are summarized below:
UDFB operate the same as Parameterized Blocks, except that they have Member Variables and-
they require an Instance variable for the data storage for these Member Variables.
Each UDFB instance operates independently from each other instance.
UDFB Instances need to be called in order to execute.
Arguments are variables or constants that are passed from logic to the Input Parameters.
Arguments are passed to the Input Parameters during the Call of the UDFB by the Controller. This
may include passing Data or Power Flow into the UDFB.
After the UDFB Call has completed, the Controller passes the Output parameters to any arguments
assigned to the UDFB Output Parameters. This may include passing Data or Power Flow out of the
UDFB block.
A unique Instance Name is provided for accessing each instance, such as:
UDFB_Name.Instance_Name

GFS-426B 10-3
PACSystems Programming GE Intelligent Platforms

Each UDFB instance has its own set of unique


Member Variables.
These are visible in the Variable List in the form of
a data structure, as shown for the instance
named ACME_Conveyor.Conv_1 in this example.
UDFB Instance data is stored in Controller
Symbolic memory.

Figure 2: Example of UDFB Instance Data


Structure

Create UDFB Instances


You create an instance of a UDFB by calling the UDFB and assigning an Instance Name to the Instance
Data property. This property is indicated by the ???? in the figure below.

Figure 3: UDFB Instance Call without Instance Name


In the following example, the UDFB ACME_Conveyor is called. The variable associated with this instance is
Conv_R45. This is the Symbolic Variable that stores the data structure for this UDFB instance.

Figure 4: UDFB Instance Call with Instance Name

10-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

Why Use UDFBs


There are several reasons for using UDFBs to provide logic and data organization. UDFBs provide a
framework for control application structure and definition. Some of the advantages of UDFBs over
conventional logic structure and organization include:
With UDFBs, there is one master copy of logic. When UDFB logic is updated, the changes are
reflected on all UDFB instances. This saves code space in the controller since there is only 1 copy
of the logic.
Each UDFB Instance operates independently, making them easy to monitor and debug.
Libraries of Function Blocks may be created for reuse in future applications. This saves time on
future Projects.
UDFBs improve application organization, breaking the application into smaller, well-defined
components that provide a clear definition of how the application operates.

Input Parameter, Output Parameters, and Member Variables


UDFB Input Parameters are Read Only inside the UDFB unless they are defined as Pass by Constant
Reference, Reference, Value, or Value Result. Input Parameters may have Initial Values.
UDFB Output Parameters are Read Only inside the UDFB and may also have Initial Values.
UDFB Member Variables (or Instance Variables) are defined by the user and comprise the internal data
structure that is used by the UDFB.
Input Parameters, Output Parameters, and Member Variables have the following attributes:
Name Defines the unique name of the parameter or member variable. The name may consist of 1
to 31 characters ands must begin with a letter.
Type Defines the data type of the Input parameter, Output parameter, or Member Variable. Type
may be BOOL, BYTE, DINT, DWORD, F_TRIG, INT, LREAL, NONE, PACMotion Types, REAL, R_TRIG,
TON, TOF, TP, UDFB Types, UINT, and WORD data types.
Length Specifies length of an array, if greater than 1. This attribute may be:
1 through 256 for BOOL
1 through 1024 for BYTE
1 through 512 for INT, UINT, and WORD
1 through 256 for DINT, DWORD, and REAL
1 through 128 for LREAL
Pass By (only for Input Parameters) Determines the mechanism to be used to pass parameter
information into and out of the UDFB. This attribute may have the values: Constant Reference,
Reference, By Value, and By Value Result
Retentive Determines whether the parameter value is retained over a power cycle
Initial Value (only for Input Parameters and Member Variables) Defines the initial value for the
parameter when the UDFB is downloaded to the controller
Description 255 characters that may be used to describe the parameter
Public (only for Member Variables) True if the member variable can be accessed outside of the
UDFB.

GFS-426B 10-5
PACSystems Programming GE Intelligent Platforms

How Input Parameter Data moves during UDFB Execution


The Pass By mechanism determines how information is moved in and out of an UDFB. The Pass By
attribute may be: Constant Reference, Reference, Value, and Value Result.
Arguments to Input Parameters may be Power/Data Flow, Mapped Variables, Symbolic Variables, and
Constants.

Pass By Value
For Pass By Value input parameters, the input argument data is passed as follows:
When the UDFB instance is called, the controller copies the input argument data values into the
UDFB input parameters.
Any write to that input parameter data inside the UDFB instance does not affect the real input that
exists outside the UDFB instance, only the internal copy.
If a Pass By Value input argument is not provided on a Call to the UDFB instance, the UDFB instance
uses the current value for the input parameter. This can be a useful to initialize a set of UDFB input
parameter values during a reset or on First Scan. Thereafter, the input argument may be omitted
for general UDFB operation.
Pass By Value is demonstrated in the following:

Figure 5: Operation of Pass By Value Parameters

Pass By Value Result


For Pass By Value Result input parameters, the input argument data is passed into the UDFB instance as
follows:
When the UDFB instance is called, the controller copies the argument data values into the UDFB
input parameters.
Any write to that input parameter data inside the UDFB instance does not affect the real input that
exists outside the UDFB, only the internal copy.
When the UDFB exits, it copies the data back to the input arguments.
Pass By Value Result is demonstrated in the following:

Figure 6: Operation of Pass By Value Result

10-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Pass By Constant Reference and Reference


For Pass By Constant Reference input parameters, the arguments address is passed to the UDFB instance
such that access to the parameter is the actual Variable that was passed in.
Pass By Constant Reference is demonstrated in the following:

Figure 7: Operation of Pass By Reference


For Pass By Constant Reference input parameters, these parameters may not be written to inside the
UDFB. This is a way to protect the original argument data from modification.

GFS-426B 10-7
PACSystems Programming GE Intelligent Platforms

UDFB Logic Limitations


When using logic inside a UDFB, you should be aware of some limitations.

Warning 12501: Built-in timers used in a UDFB may operate erratically


When you use any of the OFDT_*, ONDTR_*, or TMR_* built-in timer function blocks inside a UDFB, and
multiple instances of the UDFB are called in logic, the results are indeterminate.
When the logic of a UDFB contains an OFDT, ONDTR, or TMR timer and you create multiple UDFB instances,
the timer increments only in the first instance.
When you create only one instance, you must ensure that the UDFB executes only once per PACSystems
scan; otherwise, the timer does not increment properly.
When using Timer function blocks within a UDFB, it is recommended that you use the Standard Timer
Function Blocks TON, TOF, and TP.

Warning 12510: NTCOIL, PTCOIL, NTCON, and PTCON in a UDFB may not operate
as expected
The transition state for an instance of an NTCOIL, PTCOIL, NTCON, or PTCON instruction resides in symbolic
memory outside the instance of a function block. That may cause a problem when multiples instances of a
function block execute the same NTCOIL, PTCOIL, NTCON, or PTCON instance in a single scan.
When one instance of the function block executes a particular NTCOIL, PTCOIL, NTCON, or PTCON instance
and detects a transition, it acts on it and clears the transition state of that particular NTCOIL, PTCOIL,
NTCON, or PTCON instance. Afterwards, if another instance of the function block executes the same
NTCOIL, PTCOIL, NTCON, or PTCON instance during the same scan, it cannot detect the transition.
Possible solutions to this issue are:
Do not use NTCOIL, PTCOIL, NTCON, or PTCON instructions in a function block.
If you use an NTCOIL, PTCOIL, NTCON, or PTCON in a function block, ensure that only one instance
of the UDFB executes per scan.
Use the Rising Edge Trigger (R_TRIG) and Falling Edge Trigger (F_TRIG) function blocks that detect
the changing state of a Boolean signal. The outputs of both function blocks produce a single pulse
when an edge is detected. Use these function blocks within a UDFB to detect transitions for BOOL
signals.

10-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Implement ACME_Conveyor UDFB


The steps to implement a UDFB for an ACME_Conveyor object are as follows:
1. Create a new LD Block in the
Navigator.
Give the new block the name
ACME_Conveyor.

Figure 8: ACME_Conveyor Block Creation

2. Select Function Block for the Block


Type parameter in the Block Properties:

Figure 9: Setting Block Type to Function Block

GFS-426B 10-9
PACSystems Programming GE Intelligent Platforms

3. The block icon will change to the UDFB


icon in the Navigator:

Figure 10: UDFB Block Icon

4. Define the UDFB Input, Output, and Member Variables by selecting the Parameters Function Block
attribute in the Property Inspector.
By default the Inputs tab is selected. Enter the Input parameter definitions:

Figure 11: UDFB Input Parameter Dialog

10-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

5. Select the Outputs tab and Enter the Output parameter definitions:

Figure 12: UDFB Output Parameter Dialog


6. Create Logic inside the UDFB to check for a command error by opening the ACME_Conveyor UDFB in
the Ladder Diagram editor and adding the following logic:

Figure 13: Ladder Diagram Editor for UDFB Logic Entry

Note
You may create UDFB blocks in LD, ST, and FBD languages.

7. Call the ACME_Conveyor User-Defined Function Block in the _MAIN Block Application by entering a
CALL instruction and selecting the ACME_Conveyor Function Block.

GFS-426B 10-11
PACSystems Programming GE Intelligent Platforms

You can also drag-and-drop the UDFB from the Navigator directly to the LD, ST, and FBD logic editors.
In this case, the CALL instruction will be entered for you.

Figure 14: Calling UDFB From _MAIN Logic


8. Double-click on the UDFB CALL and define the User-Defined Function Block Instance Variable as
Conveyor_1.

Figure 15: Defining the UDFB Instance Name

10-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

9. Now connect logic or assign variables to the UDFB parameters (may be mapped to I/O).

Figure 16: Assigning UDFB Parameters


10. Now you can download this logic and monitor the UDFB instance variables in the Data Watch and also
monitor the data inside the UDFB Instance.
Select the Instance Variable in the Variable List in the Navigator and select the Watch menu item, or
press Ctrl+W.

Figure 17: Selecting Instance Variable to Watch

GFS-426B 10-13
PACSystems Programming GE Intelligent Platforms

11. The following Data Watch window contents would result:

Figure 18: Monitoring Instance Variable in Data Watch


12. To monitor the UDFB instance, select the UDFB Call for the Conveyor_1 instance in the _MAIN block
and double-click or select the Open Block right-mouse menu. This will open the UDFB with context so
that its contents can be monitored in the programming software.

Figure 19: Context of UDFB Call

Note
The UDFB parameters are displayed in an olive color in the logic.

Figure 20: Input and Output Parameters inside UDFB

10-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercises
These exercises are designed to demonstrate how to:
Call and monitor the execution of a pre-defined UDFB
Create and debug a UDFB to be used as a component of an application

Lab Exercise #1: Use a Pre-defined UDFB


In this exercise you will be using a Start Warning UDFB that has already been created to build some logic.
This UDFB provides a 10-second warning that a motor is about to start. During these 10 seconds, a light
blinks on and off and a horn sounds an alarm after which the motor output turns ON.
1. Begin by double-clicking on the Project named Start_Warning in the Navigator Project window. (You
may need to restore this Project onto your PC.)
2. In the Program Blocks section of the PAC_1
Target, double-click on the block called
_MAIN to open it in the LD editor window.

GFS-426B 10-15
PACSystems Programming GE Intelligent Platforms

3. Next, click on the block labeled Start_Warning and look at its properties in the Inspector window.

10-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

4. Notice that this block is


written in Ladder Diagram
and it is of the type Function
Block. Click the mouse in
the field to the right of the
word Parameters in the
Inspector window. A button
with ellipses will appear in
the field.

5. Click on the button to view the parameters of the UDFB. You will see two Input Parameters labeled
STOP and START.

6. Click on the Outputs tab and you will see that the block has three Output Parameters labeled MOTOR,
HORN, and LIGHT.

GFS-426B 10-17
PACSystems Programming GE Intelligent Platforms

7. Click on the Members tab and you will see that block has two Member Variables labeled DELAY and
CR.

The member variables do not have the public property checked so they are only accessible inside the
UDFB.
8. Click the OK button to close the Parameter dialog box.
9. Double-click on the Start_Warning block to view its logic.

10-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

This UDFB provides a ten-second warning that a motor is about to start. During these 10 seconds, a
light blinks on and off and a horn sounds an alarm after which the motor output turns on.
10. Close the Start_Warning block by clicking on the in the corner of the editor window.
11. In the Navigator window, click on the Start_Warning block.
Drag-and-drop it to the open _MAIN block in the LD Editor window.
Drop the block in the first row of the second column. You now have a copy of the User-Defined
Function Block called Start_Warning in the _MAIN ladder block.

This block now needs to have an instance name assigned to it.

Note
All of the required variables and data structures have been created for you ahead of time in the Project
so you will only need to select them from a list.

12. Double-click inside the Start_Warning block.

GFS-426B 10-19
PACSystems Programming GE Intelligent Platforms

Select _MAIN.Conveyor_1 from the Function Block Properties list.

13. Next, connect the block directly to the left


power rail of the ladder using a horizontal
shunt.

14. Now, double-click in the cell next


to the STOP input parameter of
the block and select C1_Stop_PB
from the variable list.

10-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

15. Enter the remaining variables


as shown here:

16. Drag-and-drop two more


Start_Warning UDFBs into the _MAIN
block and configure them as shown
below.
You could copy and paste Rung 1
twice to accomplish the same thing.

GFS-426B 10-21
PACSystems Programming GE Intelligent Platforms

17. To change the instance variable associated with the second and third UDFB calls, select the UDFB Call
and press Enter to place the Instance Variable in Edit mode.

18. When you have finished, right-click on the Target


labeled PAC_1 and select Validate from the
Target right mouse menu,
Press F7,
-or -
Click on the Validate Active Target toolbar
button .
This will check your work for errors.

19. The result of the Validation will be displayed in the Build tab of the Feedback Zone. If any errors or
warnings occurred, you can press the F4 key to navigate to those items so that you can correct them.

10-22 GFS-426B
GE Intelligent Platforms PACSystems Programming

20. If no errors are present, right-click on the


PAC_1 Target and select Go Online from
the menu,
-or-
Press the Online/Offline toolbar
button.

21. Next, if necessary, right-click and select


the Online Commands Set
Programmer Mode menu,
-or-
Press the Toggle Online Mode toolbar
button.

22. Next, if necessary, select the Online


Commands Stop Controller menu,
-or-
Press the Stop Active Target toolbar
button.

23. Click OK to stop with outputs disabled.

GFS-426B 10-23
PACSystems Programming GE Intelligent Platforms

24. Right-click and select the Download to


Controller menu,
-or-
Press the F8 function key, or press the
Download Active Target toolbar button .

25. Make sure that the items in the dialog box


are checked as shown and then click OK.

26. Select the Online Commands Start


Controller menu,
-or-
Press the Start Active Target toolbar
button .

27. Click the OK button to start with Outputs


Enabled.

28. Check the information displayed on the Status Bar to verify that the PACSystems controller is in Run
Mode, and that the Configuration and Logic are both Equal.

Once you have successfully downloaded and started the controller, you can use the QuickPanel to
exercise the application. First you need to download the QuickPanel application to the demo unit.

10-24 GFS-426B
GE Intelligent Platforms PACSystems Programming

29. Right-click on the QP _1 Target and select


Download and Start from the menu.
Or you may Go Offline with the PAC_1
Target, select the QP _1 Target as the
Active Target, and then press the F9
function key,
-or-
Press the Download and Start Active
Target toolbar button.

30. After the QP_1 application has been successfully downloaded to the QuickPanel go to the QuickPanel
screen on the PACSystems demo unit and continue as instructed below.
31. Now use the QuickPanel screen to Start
and Stop the motors.
Notice that that each instance of the UDFB
is independent and controls its own motor.

GFS-426B 10-25
PACSystems Programming GE Intelligent Platforms

32. The Ladder Diagram editor will now display the online status of the Input and Output arguments for
each of the UDFB calls.

10-26 GFS-426B
GE Intelligent Platforms PACSystems Programming

33. Go to the _MAIN logic block, and Double-click on the first Start_Warning UDFB with the Instance Name
Conveyor_1. This will open the Start_Warning UDFB with the context of the calling block. You can now
examine the parameters that are being passed into the UDFB.

GFS-426B 10-27
PACSystems Programming GE Intelligent Platforms

Lab Exercise #2: Use a UDFB to Create a Tank Object


In this exercise you will be using a UDFB to create a Tank object that will be used as a major component of
a sample application that you will develop later in this course.

Tank Object
The Tank object with its components is depicted below.

Figure 21: Tank Object


The Tank object has the following Input Parameters with their appropriate Data Type:
Action [INT]: This is the action that the Tank is being commanded to perform with the indicated
value:
Process [0]: Perform the basic Tank operations. Continue current process and check for any alarms.
Initialize [1]: Initialize the Tank parameters for operation. This would include the specification of the tank:
Contents, Size, and Exit Pump Rate.
Reset [2]: Prepare Tank operation, clear any Alarms, place Tank in Ready state.
Dispense [3]: The Tank is commanded to dispense x volume of material from the tank in cubic feet (or
gallons).
Pause [4]: The Tank is commanded to Pause the dispensing operation.
Resume [5]: The Tank is commanded to Resume a Paused operation.
Dispense Amount [REAL]: The amount to dispense in Gallons if Action is Dispense.
Level [REAL]: This is a measurement of the current tank level, from 0.0 to 100.0 %.
Tank Height [REAL]: This is the tank height in feet.
Tank Diameter [REAL]: This is the tank diameter in feet.
Exit Pump Rate [REAL]: This is the speed in cubic feet per second that material is pumped out of the
tank.
The Tank object has the following Output Parameters with their appropriate Data Type:
State: This is the state of the Tank as it is used in operation. The State may have the following
meanings (with the indicated value):
Null [0]: The Tank object has been stored to the controller.
Initialized [1]: The Tank has had its parameters specified.

10-28 GFS-426B
GE Intelligent Platforms PACSystems Programming

Ready [2]: The Tank is ready to dispense material.


Dispensing [3]: The Tank is dispensing material, that is, material is being pumped out of the Tank.
Paused [4]: The Tank dispensing has been paused. The Tank is waiting to Resume the dispensing or to be
Reset.
Complete [5]: The Tank has successfully dispensed the specified amount of material.
Faulted [6]: The Tank is in an error state. Possible error causes can be :
Tank has run out of ingredients
Tank Valve or Pump has failed
Dispense Complete [BOOL]: This output indicates that the operation has completed.
Alarm [BOOL]: The tank is in an alarm state. This alarm may occur if the tank is in danger of running
out of material.
Exit Valve [BOOL]: This is the valve that must be opened in order for tank contents to be dispensed.
Exit Pump [BOOL]: This is the pump that must be turned on in order for tank contents to be
dispensed.
The Tank object has the following Members (internal) with their appropriate Data Type:
Size [REAL]: This is the capacity of the tank in cubic feet (or gallons).
Dispense Timer [TON]: This is the On Delay Timer Function that is used to time the dispense
operation. The Preset Value for this timer is calculated by dividing the amount of ingredients to
dispense by the rate at which the pump moves material out of the tank.
Dispense Timer PV [DINT]: This is the calculated Preset Value for the Dispense Timer based on the
Exit Pump Rate and the amount of ingredients to dispense.
Low Alarm [BOOL]: The tank is in a low alarm state. This alarm may occur if the tank is in danger of
running out of material.
High Alarm [BOOL]: The tank is in a high alarm state. This alarm may occur if the tank is in danger
of overfilling with material.

Tank Control Algorithm


The basic control algorithm of the Tank object could be summarized as follows:
If Action is Initialize then
Set State to Initialize;
Call the Calc_Tank_Volume block to Calculate Size of Tank in Gallons;
Turn Exit Pump Off;
Set Exit Valve to Closed;
Save Exit Pump Rate;
Else if Action is Reset then
Set State to Ready;
Reset Low Alarm, High Alarm, and Dispense Timer;
Set Exit Valve to Closed; If necessary
Turn Exit Pump Off; If necessary
Else if Action is Dispense then

GFS-426B 10-29
PACSystems Programming GE Intelligent Platforms

If amount of material to dispense exceeds amount of material available minus 10 percent


Then
Set State to Faulted;
Return Command Error;
End if;
Set State to Dispensing;
Calculate Dispense Timer Preset Value based on amount of material to dispense.
Start Dispense Timer;
Open Exit Valve;
Turn Exit Pump On;
Else if Action is Pause then
If State is Dispensing
Then
Set State to Paused;
Re-calculate Dispense Timer PV for when pause is resumed;
Turn Exit Pump Off;
Close Exit Valve;
End_if;
Else if Action is Resume then
If State is Paused
Then
Set State to Dispensing;
Resume Dispense Timer;
Open Exit Valve;
Turn Exit Pump On;
End if;
End_if;
Process Tank Operation
If State is Dispensing then
Execute Dispense Timer with Timer Enable On;
If Dispense Timer completed then
Set State to Complete;
Turn Exit Pump Off;
Set Exit Valve Off;
End if;

10-30 GFS-426B
GE Intelligent Platforms PACSystems Programming

Else_If State is Paused then


Execute Dispense Timer with Timer Enable Off;
End_if;
Check for Low Alarm and High Alarm by calling Check_Tank_Alarms Block

Tank State Diagram


The state diagram that explains the Tank object operation is show below. This diagram illustrates the
events that occur for the Tank object to go from one state to another.
When the Tank object (UDFB) is stored to the Controller, it is stored in the Null (0) state.
On #FST_SCN, the Tank object should be called to Initialize which will move it to the Initialized state.
The Tank object can then be commanded to go to the Ready state to start operation using the
Reset command.

GFS-426B 10-31
PACSystems Programming GE Intelligent Platforms

Create a Tank UDFB


1. Begin by opening the Project named GFS_426_UDFB_Lab.
2. Create a new LD bock in your Project.
3. Change the Block Type to Function Block and
give it the name Tank:

4. The Tank UDFB is going to use two of the blocks that you created in a previous module in this course.
Open the FBD_Lab or the ST_Lab Toolchest drawers, and Ctrl-Drag-and-Drop theses two blocks to
the Program Blocks node in your Project:

5. Define the Tank UDFBs Input, Output, and Member variables according to the Tanks definition
specified earlier in this exercise.

10-32 GFS-426B
GE Intelligent Platforms PACSystems Programming

Input Parameter Name Type Description


Action INT 0 = Process, 1 = Initialize, 2 = Reset, 3 = Dispense, 4 = Pause, 5 = Resume
Dispense_Amount REAL If Dispense Command, dispense this amount
Level REAL Level of Tank in Percent
Tank_Height REAL Tank height in feet
Tank_Diameter REAL Tank diameter in feet
Exit_Pump_Rate REAL Pump rate in gallons/minute

Output Parameter Name Type Description


State INT 0=Null, 1=Initialized, 2=Ready, 3=Dispensing, 4=Paused, 5=Complete,
6=Faulted
Dispense_Complete BOOL Set to TRUE if dispense is complete
Alarm BOOL Tank has an Alarm
Exit_Valve BOOL Exit valve on or off
Exit_Pump BOOL Exit pump on or off

Member Parameter Type Description


Name
Tank_Size_Gal REAL Storage capacity in gallons
Dispense_Timer TON Timing the dispensing operation
Dispense_Timer_PV DINT Preset value calculated for Dispense_Timer
Low_Alarm BOOL Low Alarm exists
High_Alarm BOOL High Alarm exists
Tank_Size_Ft3 REAL Storage capacity in cubic ft
Action_Process BOOL Internal bit: Action is Process
Action_Initialize BOOL Internal bit: Action is Initialize
Action_Reset BOOL Internal bit: Action is Reset
Action_Dispense BOOL Internal bit: Action is Dispense
Action_Pause BOOL Internal bit: Action is Pause
Action_Resume BOOL Internal bit: Action is Resume
Action_InvalidCmd BOOL Internal bit: Action is Invalid Command issued
Tank_Fault BOOL Internal bit: tank has a fault

GFS-426B 10-33
PACSystems Programming GE Intelligent Platforms

Pass the Level, Tank_Height, and Tank_Diameter Input parameters by Reference.

10-34 GFS-426B
GE Intelligent Platforms PACSystems Programming

6. Open the Tank UDFB and add logic to perform the Tank function. The basic layout of the logic for the
UDFB Block is as follows:
Perform function based on Action
If Initialize_Action then Perform Initialize Logic
If Reset_Action then Perform Reset Logic
If Dispense_Action then Perform Initialize Logic
If Pause_Action then Perform Pause Logic
If Resume_Action then Perform Reset Logic

GFS-426B 10-35
PACSystems Programming GE Intelligent Platforms

If Invalid Action then Return Invalid_Command


Process Tank Logic
If Tank Fault then Perform Tank Fault Logic
7. Create a Coil for each Action case to be used to enable the logic for the specific action. Logic is then
executed in each Logic section based on the Action.
8. Add Logic in Rungs 1-7 to enable each Logic section based on the Action:

10-36 GFS-426B
GE Intelligent Platforms PACSystems Programming

9. Add logic in Rungs 8 & 9 in the Initialize Action section:

10. Add logic for Reset Action section:

GFS-426B 10-37
PACSystems Programming GE Intelligent Platforms

11. Add logic for Dispense Action section:

10-38 GFS-426B
GE Intelligent Platforms PACSystems Programming

12. Add logic for Pause Action section:

GFS-426B 10-39
PACSystems Programming GE Intelligent Platforms

13. Add logic for Resume Action section:

10-40 GFS-426B
GE Intelligent Platforms PACSystems Programming

14. Add logic for Process Tank Operation section:

GFS-426B 10-41
PACSystems Programming GE Intelligent Platforms

10-42 GFS-426B
GE Intelligent Platforms PACSystems Programming

15. Add logic for Tank Fault and Invalid Command sections:

16. Validate your Project.


17. Call the Tank block in the _MAIN block to test it out.
Give this Tank an instance name of Tank_01.
Pass elements of the $Tank_1 data structure such as Action_Value and Level into the UDFB call to
exercise the logic.
The QP_1 HMI Target has a panel that can be used to test out the Tank logic.

GFS-426B 10-43
PACSystems Programming GE Intelligent Platforms

18. Add logic to reset the Action_Value to 0 after the call:

19. Add logic to move the Tank Volume calculations to the $Tank data structure.

20. Add logic to move the Tank High and Low Alarm indications to the $Tank data structure:

21. Add a CALL to the Tank_Sim UDFB in the _MAIN Block by dragging-and-dropping the Tank_Sim Block
from the GFS_426_Library Drawer in the Toolchest.
22. Create a UDFB Instance variable named $Tank1_Sim. Assign the Tank Sim input parameters to the
simulator UDFB as follows:

This logic will simulate the level changing in the tank as it dispenses.
23. Download the Tank test Project to the controller.

10-44 GFS-426B
GE Intelligent Platforms PACSystems Programming

24. Run the HMI Project to exercise the Tank object:


i. Enter values for: Diameter (I.e. 10), Height (I.e. 5), Exit Rate (I.e. 0.1)
ii. Enable the Tank 1 call.
iii. Enter Action_Value of 1 to initialize the Tank. Verify that new Tank State = 1. You can also modify
the Tank Level and watch Alarms occur.
iv. Enter Action_Value of 2 to reset the Tank. Verify that new Tank State = 2 (Ready).
v. Enter amount of material to dispense, I.e. 1. Enter Action_Value of 3 to dispense. Verify that Exit
Valve and Exit Pump are on.
vi. Examine the Tank UDFBs Timer for its execution. Use the Tank_1_Dispense_Timer Data Watch to
examine the Dispense Timers ET and PV values:

25. An example of the HMI screen is shown below:

GFS-426B 10-45
PACSystems Programming GE Intelligent Platforms

26. A further extension of this lab is to create the Tank UDFB in Structured Text. In this case the UDFB
parameters remain the same, but the logic creation is different.
27. Create a Tank_ST UDFB in the Structured Text
programming language.

28. Add the following Input and Output Variables to the UDFB definition, these parameters match what
you did for the LD UDFB.

Input Parameter Name Type Description


Action INT 0 = Process, 1 = Initialize, 2 = Reset, 3 = Dispense
Dispense_Amt REAL If Dispense Command, dispense this amount
Level REAL Level of Tank in Percent
Tank_Height REAL Tank height in feet
Tank_Diameter REAL Tank diameter in feet

10-46 GFS-426B
GE Intelligent Platforms PACSystems Programming

Exit_Pump_Rate REAL Pump rate in gallons/minute

Output Parameter Name Type Description


State INT 0=Null, 1=Initialized, 2=Ready, 3=Dispensing, etc.
Dispense_Complete BOOL Set to TRUE if dispense is complete
Alarm BOOL Tank has an Alarm
Exit_Valve BOOL Exit valve on or off
Exit_Pump BOOL Exit pump on or off

GFS-426B 10-47
PACSystems Programming GE Intelligent Platforms

29. Add the following Member Variables to the UDFB definition. In this case, there are a few additional
member variables that have been added to aid in the ST programming.

10-48 GFS-426B
GE Intelligent Platforms PACSystems Programming

Member Parameter Name Type Description


Tank_Size_Gal REAL Storage capacity in gallons
Dispense_Timer TON Timing the dispensing operation
Dispense_Timer_PV DINT Preset value calculated for Dispense_Timer
Low_Alarm BOOL Low Alarm exists
High_Alarm BOOL High Alarm exists
Tank_Size_Ft3 REAL Storage capacity in cubic ft
Initialize INT Initial Val = 1
Reset INT Initial Val = 2
Dispense INT Initial Val = 3
Pause INT Initial Val = 4
Resume INT Initial Val = 5
Off BOOL Initial Val = 0
On BOOL Initial Val = 1
Closed BOOL Initial Val = 0
Open BOOL Initial Val = 1
Initialized INT Initial Val = 1
Ready INT Initial Val = 2
Dispensing INT Initial Val = 3
Paused INT Initial Val = 4
Complete INT Initial Val = 5

GFS-426B 10-49
PACSystems Programming GE Intelligent Platforms

Faulted INT Initial Val = 6


DispTimerPV_Real REAL For calculating Dispense Timer PV

30. Add the ST Logic to the ST UDFB. An example solution is shown below.

10-50 GFS-426B
GE Intelligent Platforms PACSystems Programming

GFS-426B 10-51
PACSystems Programming GE Intelligent Platforms

31. Create $Tank_2 variable by duplicating the $Tank_1 variable.


32. Call the Tank_ST block in the _MAIN block to test it out.
Give this Tank an instance name of Tank2.
Pass elements of the $Tank_2 data structure such as Action_Value and Level into the UDFB call to
exercise the logic.

10-52 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review Questions
1. True or False: User-Defined Function Blocks are one of the programming languages in the IEC 61131-
3 Programming Set.

2. In which programming languages can a User-Defined Function Block be written?

3. A UDFB Instance is uniquely identified by its ____________________________________.

4. A UDFB is different from a Parameterized Block in that a UDFB also has ______________ parameters?

5. The _______________________ mechanism determines how parameter data is passed in to and out of
a UDFB. The 3 mechanisms that are available are: _____________________, _____________________,
and _____________________.

6. How many Instances of a UDFB may I have in 1 application?

7. How many UDFB Blocks may I define in 1 application?

8. How can I monitor a UDFBs Member Variables?

9. A UDFB is a good tool to leverage the concepts of O_______________ O______________


P________________.

10. How do I open a UDFB Instance in the context of the logic that is calling it?

GFS-426B 10-53
PACSystems Programming GE Intelligent Platforms

Review
In this module, you learned to:
Define User-Defined Function Blocks (UDFBs)
Write logic using User-Defined Function Blocks
Download the logic to a PACSystems controller
Interact with the logic utilizing UDFBs

10-54 GFS-426B
Table 0:Table 0:

Module 11
Sample Application

Sample Application
Topics

Upon completion of this module, you should be able to:


Understand basic application development guidelines
Create an application using Application Building Block concepts
PACSystems Programming GE Intelligent Platforms

Sample Application

Overview
This module provides the opportunity to create a sample application using the components that were
created in earlier steps of this course. The sample application is constructed using a Project template and
Toolchest drawers that contain Application Building Blocks.
This module also explains some basic application development guidelines.

Basic Software Architecture


A basic software architecture has the _MAIN Program Block call a series of Blocks that are grouped by
function. For example, if the application controls Air Compressors then a Program Block could be created
named Air_Compressor that contains calls to all the Air Compressor application building blocks (I.e. UDFBs).
An example of this is shown below:

Figure 1: Basic Software Architecture Example

11-2 GFS-426B
GE Intelligent Platforms PACSystems Programming

Organization Guidelines
1. Group similar objects into a single Program Block with CALLs to the objects application building block
(I.e. UDFB). This follows the basic software architecture described previously and provides a simple,
structured software organization.

Figure 2: Grouping Similar Object (UDFB) Example


2. When declaring Variables for use within an application building block (UDFB), do not use Mapped
Variables, use Member Variables. This prevents dependence on hard-coded reference memory
locations and provides easy portability to other applications.

Figure 3: Declaring Member Variables for use Within a UDFB

GFS-426B 11-3
PACSystems Programming GE Intelligent Platforms

3. Do not use Linked Toolchest objects . There are several potential issues when using Linked Toolchest
objects that can be avoided by not using the linked feature.
4. In Ladder Diagram logic, Set and Reset Coils should be located in adjacent Rungs and used only ONCE.

Figure 4: Adjacent Set and Reset Coils Example


5. In Ladder Diagram logic, Continuation Contacts and Coils should be located in adjacent Rungs.

Figure 5: Continuation Contact and Coil Example


6. Place a COMMENT Instruction as the first Rung in an LD Block to provide a Block summary.

Figure 6: LD Block Comment Example


7. For ST Blocks, provide a text block at the beginning of the ST Logic.

Figure 7: ST Block Comment Example

11-4 GFS-426B
GE Intelligent Platforms PACSystems Programming

8. Use COMMENT Instructions throughout the program logic to provide information that helps engineers
understand the How and Why an Application "works".

Figure 8: Rung Comment Example

Naming Guidelines
1. When defining Project, Target, Block, and Variable Names, use names that are clear and concise.
You have 32 characters to provide a "good" name!

Figure 9: "Good" Variable Name Example


2. When defining Project, Target, Block, and Variable Descriptions, provide clear and concise information.
You have 255 characters to provide a "good" description!

Figure 10: "Good" Variable Description Example


3. When defining Names, use Underscores and mix Capital and Lower case letters to make the name more
readable.
For example, a Variables Name and Description could be defined as :
d01_Station_Wait_Hood_C

GFS-426B 11-5
PACSystems Programming GE Intelligent Platforms

Dryer 01 Waiting for Hood to Close


4. "Good" Application Documentation is Clear, Concise, Non-redundant, Accurate, Accessible, and
Complete.

Revision Management
1. Provide and maintain Revision Control on all applications. Some revision control methods include:
i. Proficy Change Management A Server-based, comprehensive revision control system that
integrates with Machine Edition.
ii. Local Manager A Proficy Machine Edition function where files are saved local to the PC. This
function is provided *free* on the Machine Edition CD.
iii. User Defined - Create your own revision management methods. For example, use the Machine
Edition Backup function, assigning a date and version number as part of the archive file name. In
this case, use the Machine Edition Restore function to retrieve the archived files.

2. Use Revision Management Rules for


application building blocks, such as
UDFBs, using Version Settings properties.
Major Version A change in Major
Version means that the block signature
has changed. For example, number of
Input/Output parameters has
increased/decreased and- Block CALL
may not fit in the old space.
Minor Version A change in Minor
Version means that the block signature
has not changed. This could indicate
logic changes to fix a bug or a minor
change in functionality. Figure 11: Version Settings Block Property

3. Use the Supplemental Files function to include Files in the Project that describe the application. These
files may be Word Documents, Excel Spreadsheets, or Drawings.

Figure 12: Using Supplemental Files to Store Additional Files

11-6 GFS-426B
GE Intelligent Platforms PACSystems Programming

Sample Application Creation


The basic steps to create the sample application are described below. The labs in this module will walk you
through the process.
1. Create a New Project based on the Project template: GFS_426_App_Template. This project contains
the default Hardware Configuration, pre-defined Variables that will be used for assembling the
application, and a View machine level HMI application to monitor and control the process.
2. Copy the needed Functions and Function Blocks from the Toolchest drawer named
GFS_426_App_Bldg_Blks to the project.
Use the Ctrl+Drag-and-Drop procedure to copy the Functions and Function Blocks from the Toolchest,
following the sequential order of Step 1 to Step 7.

Figure 13: Steps and Order to Copy Functions from Toolchest

You may also use the Function and Function Blocks that you have developed in this course.

GFS-426B 11-7
PACSystems Programming GE Intelligent Platforms

3. CALL each of the Program Blocks from _MAIN to perform their function:

Figure 14: Call Main Program Blocks from _MAIN Block


4. Download the application to the controller, execute and debug the application if necessary using all
the tools that have been learned in this course.

11-8 GFS-426B
GE Intelligent Platforms PACSystems Programming

Application Overview
The sample control application to be developed is a Frozen Ice Cream Treat Production System. This
system dispenses the Frozen Ice Cream Treat ingredients from several tanks, mixes them in a large vessel,
then freezes and dispenses the final product into containers.
An overview of the application is shown below:

Figure 15: Frozen Ice Cream Treat Production System


The production system is made up of the following major components:
Material Storage System: The Material Storage System is a set of tanks that holds the ingredients for the
production system. This system consists of:
Two Large Storage Tanks for :
Dairy Solution (I.e. milk)
Sweetener Solution (I.e. Corn Syrup)
Three Small Storage Tanks for liquid flavorings:
Vanilla

GFS-426B 11-9
PACSystems Programming GE Intelligent Platforms

Chocolate
Strawberry

The Material Storage System includes the necessary valves and pumps to move the material from the
storage tank into the Material Mixing System.
Material Mixing System: The Material Mixing System is responsible for mixing the contents of the Mixing
vessel after the specified amounts of ingredients have been successfully pumped into the Mixing vessel.
When mixing is complete, the Material Mixing System will move the mixed material to the Material
Dispensing System.
Material Dispensing System: The Material Dispensing System is responsible for flash freezing and
dispensing the finished product into containers for final packaging.
Recipe Manager: The Recipe Manager is responsible for validating the recipe that has been entered by an
operator. It then initiates the start of a product batch.
Batch Sequence Manager: The Batch Sequence Manager coordinates the production of the product based
on the production state machine.
Temperature Monitoring System: The Temperature Monitoring System samples the temperature from
each of the production vessels (tanks) once per minute and calculates the standard deviation and variance
of the temperatures for the last 100 samples.
Each component of the production system is described in more detail later in this module.

11-10 GFS-426B
GE Intelligent Platforms PACSystems Programming

Application Structure
You display the application structure by running the Application Structure Report Logic Order report
from the Select a Report dialog.

Figure 16: Sample Application Structure


The application structure for the sample application is shown below. The structure shows the general
hierarchy of the routines and the order in which they are called.

Figure 17: Sample Application Structure

GFS-426B 11-11
PACSystems Programming GE Intelligent Platforms

Material Storage System


The Material Storage System consists of a set of 5 tanks that are used to store the basic ingredients that
are used to manufacture the Frozen Ice Cream Treat. The basic component of the Material Storage System
is the Tank object.

Tank Object
The Tank object is depicted below:

Figure 18: Tank Object


The Tank object is implemented using a User Defined Function Block.
Refer to the Chapter about Programming Using User-Defined Function Blocks, Lab Exercise #2: Using a UDFB to
Create a Tank Object for a detailed description of this object and its operation.

Check_Tank_Alarms Parameterized Block


The Check_Tank_Alarms Parameterized Block looks at the various status inputs for a Tank and determines
is any Alarm condition exists.
The Input parameters of this Parameterized Block as follows:
Tank_Level [REAL]: Input from Tank that indicates the Tank level from 0 to 100 %.
Exit_Valve [BOOL]: This is the current state of the Tank Exit_Valve.
Exit_Pump [BOOL]: This is the current state of the Tank Exit_Pump.
The Output parameters of this Parameterized Block as follows:
ENO [BOOL]: The Enable Output of this Block if True if the Block executed successfully; For example,
this Output may be Off if any input parameters to this Block are not valid.
Level_Low_Alarm [BOOL]: Set to True if the Tank_Level has fallen below 10%.
Level_High_Alarm [BOOL]: Set to True if the Tank_Level has risen above 90%.
Alarm [BOOL]: Set to True if a Low or High Alarm has occurred, or if some other alarm condition
exists.

Check_Tank_Alarms Parameterized Block Algorithm


The basic control algorithm of the Check_Tank_Alarms Parameterized Block is summarized as follows:

11-12 GFS-426B
GE Intelligent Platforms PACSystems Programming

If Tank_Level is not in the range of 0-100 % then


Set Y0 to False; Error indication to calling routine
Return;
End_if;
If Tank_Level is less than 10%
Then Low_Alarm is True;
Else Low_Alarm is False;
End_if;
If Tank_Level is greater than 90%
Then High_Alarm is True;
Else High_Alarm is False;
End_if;
If Low_Alarm is True or High_Alarm is True or (Exit_Pump is On and Exit_Valve is Off)
Then Alarm is True;
Else Alarm is False;

Calc_Tank_Volume Parameterized Block


The Calc_Tank_Volume Parameterized Block takes the dimensions of the Tank and calculates the Volume
of the Tank in cubic feet and Gallons.
The Input parameters of this Parameterized Block as follows:
Tank_Height [REAL]: Height of the Tank in Feet.
Tank_Diameter [REAL]: Diameter of the Tank in Feet.
The Output parameters of this Parameterized Block as follows:
ENO [BOOL]: The Enable Output of this Block if True if the Block executed successfully; For example,
this Output may be Off if any input parameters to this Block are not valid.
Tank_Volume_Ft3 [REAL]: Volume of the Tank in cubic feet.
Tank_Volume_Gal [REAL]: Volume of the Tank in gallons. (Cubic feet times 7.481)

Calc_Tank_Volume Parameterized Block Algorithm


The basic control algorithm of the Calc_Tank_Volume Parameterized Block is summarized as follows:
If Tank_Height less than 0.0 or Tank_Diameter less than 0.0 then
Set Y0 to False; Error indication to calling routine
Return;
End_if;
Tank_Volume_Ft3 equals 3.141592 * (Tank_Diameter / 2.0)**2 * Tank_Height ;
Tank_Volume_Gal equals Tank_Volume_Ft3 * 7.481;

GFS-426B 11-13
PACSystems Programming GE Intelligent Platforms

Material Mixing System


The Material Mixing System is responsible to mix the contents of the Mixing Vessel after the specified
amounts of ingredients have been successfully pumped into the Mixing Vessel. The main component of the
Material Mixing System is the Material Mixer. The Mixer is depicted by the illustration below:
Equation 2: Material Mixer

The Mixer object has the same basic attributes as the Tank object; therefore, we will derive the Mixer object
from the Tank object and then add some extensions.
The Mixer object has the following Input Parameters with their appropriate Data Type:
Action [INT]: This is the action that the Mixer is being commanded to perform. The Mixer object has
the following actions (or methods) that it can be directed to perform (with the indicated value).
Actions 0 through 5 are the actions for the basic Tank object:
Process [0]: Perform the basic Mixer operations. Continue current process and check for any alarms.
Initialize [1]: Initialize the Mixer parameters for operation. This would include the specification of the tank:
Contents, Size, and Exit Pump Rate.
Reset [2]: Prepare the Mixer for operation. Clear any Alarms and place Mixer in Ready state.
Dispense [3]: The Mixer is commanded to dispense x volume of material from the tank in cubic feet (or
gallons).
Pause [4]: The Mixer is commanded to Pause the dispensing operation.
Resume [5]: The Mixer is commanded to Resume a previously Paused operation.
Mix [6]: The Mixer is commanded to Mix the ingredients together for the specified number of seconds.
Mix Time [REAL]: This is the amount of time in Seconds to mix the ingredients.
Mixer Speed [REAL]: This is the speed in RPM that the mixer motor is to rotate to mix the material.
The Mixer object has the following Output Parameters with their appropriate Data Type:
Mixing State [INT]: This is the current state of the Mixer as it is in operation. The Mixer states include:
Ready [1]: The ingredients are not being mixed, the Mixer Motor is Off.
Mixing [2]: The ingredients are being mixed, the Mixer Motor is On.
Paused [3]: The ingredients are being mixed, the Mixer Motor is On.
Mixing Complete [4]: The current mix cycle has been paused.
Alarm [BOOL]: The Mixer is in an alarm state. This alarm may occur if the Mixer is in danger of
running out of material.

11-14 GFS-426B
GE Intelligent Platforms PACSystems Programming

Exit Valve [BOOL]: This is the valve that must be opened in order for Mixer contents to be dispensed.
Exit Pump [BOOL]: This is the pump that must be turned on in order for Mixer contents to be
dispensed.
The Mixer object has the following attributes with their appropriate Data Type:
Mixer [TANK]: These are the Tank attributes that are inherited from the basic Tank UDFB (object).
Mix Timer [TON]: This is the On Delay Timer Function that is used to time the Mixing operation.
Mix Timer PV [DINT]: This is the calculated Preset Value for the Mix Timer based on the Mix
command parameters.

Mixer Control Algorithm


The basic control algorithm of the Mixer object could be summarized as follows:
If Action is Initialize or Reset then
Set Mixer Motor Off;
Set Mixing State to Ready;
Else if Action is Pause then
If Mixing State is Mixing then
Set Mixer Motor Off;
Set State to Paused;
End if;
Else if Action is Resume then
If Mixing State is Paused then
Set State to Mixing;
Turn Mixer Motor On;
End if;
Else if Action is Mix then
Turn Mixer Motor On;
End_if;
If Mixing State is mixing then
Execute Mixer Timer with Timer enabled;
If Mixer Timer completed then
Set State to Mixing Complete;
Else_If Mixing State is Paused then
Execute Mixer Timer with Timer disabled;
Else
Call Tank UDFB to process Tank functions;
End if;

GFS-426B 11-15
PACSystems Programming GE Intelligent Platforms

Material Dispensing System


The Material Dispensing System is responsible for flash freezing and then
dispensing the finished product into containers for final packaging. The
Dispenser also uses liquid Nitrogen to flash freeze the contents of the frozen
treat immediately before being dispensed into containers.
We will not be developing this part of the application in this exercise. For the
sake of this exercise, you will call the provided Matl_Disp_System Function Block
to perform its function. In this case, it will generate a 10 second dwell in the
process for this stage and then complete.

Figure 19: Material


Dispenser

Recipe Management System


The Recipe Management System is responsible for validating the recipe that has been entered by an
operator, and then coordinating the executing of the Frozen Product Production based on the production
state machine.
The parameters of the production recipe are as follows:
Ingredients in Gallons for Dairy, Sweetener, Chocolate, Vanilla, and Strawberry
Mixing Time in Minutes
Standard Batch recipes

Batch Dairy Sweetener Chocolate Vanilla Strawberry Mix Time


Name
Coaco 50 10 .5 0 0 15
Vanilla Ice 50 10 0 .5 0 15
Strawberry 50 10 0 0 .5 20
Neopolitan 50 10 .25 .25 .25 15
Table 1: Basic Batch Formulas
Once a Recipe is selected or entered, the Recipe Management System will validate the recipe by checking
to make sure that enough ingredients are available to make the batch. If the needed ingredients are
available and the Recipe Sequence State Machine is in the Ready Stage, then the Recipe Management
System will execute the Start_Batch command to initiate the batch sequence.
As the Batch completes each stage of the process, it will move on to the next stage.

11-16 GFS-426B
GE Intelligent Platforms PACSystems Programming

If the Batch makes it to the final stage, it will stay in the Done stage until a Reset has been initiated by an
operator.
Anytime while in the Filling, Mixing, and Dispensing stages, the operator may choose to Pause the stage. At
that point, the Stage will stop its dispensing or mixing and wait for the operator to Resume the stage.
If at any time the process is Reset by the Operator, the current stage will terminate and the process will
return to the Ready stage.
If at any time the process encounters a Fault the process stage will terminate and the process will wait in
the Fault state until a Reset occurs.

Recipe Sequence Chart


The flow of the process application is represented by the Recipe Sequence Chart below.

Figure 20: Recipe Sequence Chart

Batch Sequence Manager


The Batch Sequence Manager Block executes the basic state machine of the process. It executes each
stage of the process by calling the necessary Function Blocks to perform their functions and determines
when to move to the next stage.

GFS-426B 11-17
PACSystems Programming GE Intelligent Platforms

The basic algorithm of the Batch Sequence Manager Block is summarized as follows:
If this is the first controller scan then
Set Process Stage to Initialized;
Set Process Paused to False;
Set Process Faulted to False;
End_if;
Set Command to Normal Processing;
Case Process Stage of
1: Initialized
Initialize Tank Function Blocks;
Initialize Mixer Function Block;
Set Process Stage to Ready;
2: Ready
If valid recipe is entered then
Tell Tank Function Blocks to Dispense ingredients into Mixer;
Set Process Stage to Filling;
End_if;
3: Filling Mixer
If Pause Command then
Set Process Paused to True;
Set Command to Pause;
End_if;
If Resume Command then
Set Process Paused to False;
Set Command to Resume;
End_if;
Execute Tank Function Blocks with Command;
If Tanks are done dispensing then
Set Process Stage to Mixing;
End_if;
4: Mixing
If Pause Command then
Set Process Paused to True;
Set Command to Pause;

11-18 GFS-426B
GE Intelligent Platforms PACSystems Programming

End_if;
If Resume Command then
Set Process Paused to False;
Set Command to Resume;
End_if;
Execute Mixing Function Block with Command;
If Mixing is Complete then
Set Process_Stage to Filling Dispensing;
Tell Mixer to start Dispensing;
End_if;
5: Filling Dispenser
If Pause Command then
Set Process Paused to True;
Set Command to Pause;
End_if;
If Resume Command then
Set Process Paused to False;
Set Command to Resume;
End_if;
Execute Mixer Function Block with Command;
If Mixer is done dispensing then
Set Process_Stage to Dispensing;
Tell Material Dispenser to dispense for 2 minutes
End_if;
6: Dispensing
Call Material Dispenser to continue dispensing;
If Dispensing complete then
Set Process_Stage to Done;
End_if;
7: Done
End_case;
If Reset command then
Reset Tank Function Blocks;
Reset Mixer Function Block;

GFS-426B 11-19
PACSystems Programming GE Intelligent Platforms

Set Process_Stage to Ready;


End_if;
Check for faults;

Recipe Manager
The Recipe Manager Block waits for a recipe to be selected or entered by the operator. If a standard batch
recipe is selected, then the Recipe Manager will determine the contents of each ingredient to be used to
create the batch. The Recipe Manager then validates the recipe to make sure that the recipe is valid. It
does this by making sure that the parameters are in range and that there are enough ingredients to make
the batch.
If the new batch can proceed, the Recipe Manager will inform the Batch Sequence Manager to start the
batch.
The basic algorithm of the Recipe Manager Block is summarized as follows:
If Standard Recipe has been selected then
Set ingredients from Standard Recipe Information;
End_if;
For each ingredient, Validate the recipe requirements for each
If Recipe is valid and process is in Ready state then
Start the Batch
End_if;

Validate_Recipe_Requirements Parameterized Block


The Validate_Recipe_Requirements Parameterized Block looks at the parameters of the recipe and
determines whether it is a valid recipe.
The Input parameters of this Parameterized Block are as follows:
Amt_Needed_For_Batch [REAL]: Amount of ingredients for batch in gallons.
Ingredient_Tank [Tank]: Tank whose ingredient level needs to be checked.
The Output parameters of this Parameterized Block as follows:
ENO [BOOL]: The Enable Output of this Block if True if the Block executed successfully;
Ingredients_Ok [BOOL]: Set to True if the tank has sufficient ingredients for the Batch.

Validate_Recipe_Requirements Parameterized Block Algorithm


The basic algorithm of the Validate_Recipe_Requirements Parameterized Block is summarized as follows:
If the Amt_Needed_For_Batch is greater than the Tank Contents less 10% then
Set Ingredients_Ok to False;
Else Set Ingredients_Ok to True;
End_if;

11-20 GFS-426B
GE Intelligent Platforms PACSystems Programming

Temperature Monitoring System


The Temperature Monitoring System samples the temperature from each of the production vessels (tanks)
once per minute and calculates the standard deviation and variance of the temperatures for the last 100
samples.
The basic algorithm of the Temperature Monitoring System Block is summarized as follows:
If one minute has elapsed since last checked then
For each Tank in the system
Get the current Tank Temperature and save it in the Tank Temperature Array
Pass the Tank Temperature Array to the Calc_Standard_Deviation block
Save the Tank Standard Deviation and Variance for Display by the HMI
End_if;

GFS-426B 11-21
PACSystems Programming GE Intelligent Platforms

Lab Exercises
These exercises are designed to demonstrate how to:
Create a Project based on another project
Include logic blocks from the Toolchest into a Project
Assemble a sample project from Application Building Blocks
Download and monitor resulting project in the PACSystems Controller

Lab Exercise #1: Create Sample Project


1. Open the GFS_426_App_Template Machine Edition Project. This is the basic project template that you
will be using. This project includes two targets: PACSystems RX3i Controller and QuickPanel View.
2. Use the File Save As menu item to save the project with a new name.

Lab Exercise #2: Include Logic Blocks from Toolchest


1. Open the Toolchest drawer named GFS_426_App_Bldg_Blks.
2. Use the Ctrl+Drag-and-Drop procedure to copy the Functions and Function Blocks from the Toolchest,
following the sequential order of Step 1 to Step 7. Within a Step, the order of bring a Block into the
Project does not matter.

3. If a Resolve Missing Blocks dialog is displayed, press OK to Resolve With Do Nothing.


4. After you bring the Batch_Sequence_Manager and the Application_Simulator items into the project,
you should select the default variable conflict resolution options.

11-22 GFS-426B
GE Intelligent Platforms PACSystems Programming

5. After the Batch_Sequence_Manager is included, you will need to create the Tank and Mixer Instance
Variables.
Open the Batch_Sequence_Manager ST Block, place the cursor over the Tank name, such as
"Sweetner_Tank".
Select the Create variable as Function Block right-click menu:

6. Choose the Tank Function Block from the


list:

GFS-426B 11-23
PACSystems Programming GE Intelligent Platforms

7. Perform the Create variable as Function Block operation for the following variables:
Dairy_Tank as Tank
Sweetner_Tank as Tank
Chocolate_Flav_Tank as Tank
Vanilla_Flav_Tank as Tank
Strawberry_Flav_Tank as Tank
Material_Mixer as Mixer

8. When creating the variables above, note that they are created by default as LOCAL scope variables to
the Batch_Seq_Mgr block. Change these variables to GLOBAL scope by editing their names in the
Inspector. Simply select the Batch_Seq_Mgr portion of the variable name and delete it to make the
variables Global in Scope.

For example, modify the From:


Sweetner_Tank variable
declaration.

To:

11-24 GFS-426B
GE Intelligent Platforms PACSystems Programming

Lab Exercise #3: Assemble the Sample Application


1. Open the _MAIN block in the project.
2. Drag-and-Drop the main Logic Blocks from the Navigator to the Ladder Diagram Editor to call the
sample application main components.
i. Application_Simulator
ii. Batch_Sequence_Manager
iii. Recipe_Manager
iv. Temperature_Monitor
3. The resulting _MAIN application code should look something like this :

Figure 21: Call Main Program Blocks from _MAIN Block

Lab Exercise #4: Download Project to Controller


1. Validate the sample project.
2. Correct any errors in the project.
3. Go online to the controller.
4. Select Programmer Mode (if necessary).
5. Download the application to the RX3i Controller.
6. Place the Controller in Run Mode.

GFS-426B 11-25
PACSystems Programming GE Intelligent Platforms

Lab Exercise #5: Operate the Sample Application


Interact with the application using Machine Edition and Proficy View.
1. Select the QuickPanel Target in the Navigator and select the Target Download and Start menu
item. The target will run in Simulate mode on your PC.
2. Press the Enter Recipe button to select a Recipe and Start the Process.
3. Use the Pause/Resume button to pause or resume the paused process.
4. Examine and Monitor the logic to see the application in operation.

11-26 GFS-426B
GE Intelligent Platforms PACSystems Programming

Review Questions
1. What is the purpose of the Major and Minor Version block properties?

2. What are good ways to organize your application?

3. What is a "good" variable or block name?

4. Should you use linked Toolchest items?

5. What are the benefits of UDFBs to application architectures?

GFS-426B 11-27
PACSystems Programming GE Intelligent Platforms

Review
In this module, you learned to:
Understand basic application development guidelines
Create an application using Application Building Block concepts
Table 0:

11-28 GFS-426B

You might also like