GFS-426B PACSystems Programming
GFS-426B PACSystems Programming
GFS-426B
Blank
PACSystems Programming
Topics
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.
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..
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
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:
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.
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:
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.
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
GFS-426B 1-7
PACSystems Programming GE Intelligent Platforms
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.
1-8 GFS-426B
GE Intelligent Platforms PACSystems Programming
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:
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.
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.
GFS-426B 1-11
PACSystems Programming GE Intelligent Platforms
Graphical Textual
Ladder Diagram (LD) Structured Text (ST)
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.
GFS-426B 1-13
PACSystems Programming GE Intelligent Platforms
1-14 GFS-426B
GE Intelligent Platforms PACSystems Programming
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?
5. What are the two types of models of PACSystems Controllers? What are their primary differences?
8. What are the strengths of the Ladder Diagram programming language? Function Block Diagram?
Structured Text? C?
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
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
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.
GFS-426B 2-5
PACSystems Programming GE Intelligent Platforms
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.
2-6 GFS-426B
GE Intelligent Platforms PACSystems Programming
Communications
The RX3i controller supports Ethernet, Fieldbus, and Serial communications.
GFS-426B 2-7
PACSystems Programming GE Intelligent Platforms
Fieldbus Connections
Support for the RX3i includes the following Fieldbusses.
Profibus DP
DeviceNet
Genius Bus
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
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:
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.
GFS-426B 2-11
PACSystems Programming GE Intelligent Platforms
2-12 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 2-13
PACSystems Programming GE Intelligent Platforms
2-14 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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.
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.
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.
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.
2-18 GFS-426B
GE Intelligent Platforms PACSystems Programming
Lab Exercises
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
2-20 GFS-426B
GE Intelligent Platforms PACSystems Programming
Review Questions
1. What module is used to interface to expansion racks?
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
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.
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.
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.
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.
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:
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.
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.
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:
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
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.
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.
3-10 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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
3-12 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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
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.
GFS-426B 3-17
PACSystems Programming GE Intelligent Platforms
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
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.
GFS-426B 3-19
PACSystems Programming GE Intelligent Platforms
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:
GFS-426B 3-21
PACSystems Programming GE Intelligent Platforms
3-22 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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
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.
GFS-426B 3-25
PACSystems Programming GE Intelligent Platforms
3-26 GFS-426B
GE Intelligent Platforms PACSystems Programming
This will open the Supplemental Files directory using Windows Explorer:
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.
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.
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.
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
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
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
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
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
3-36 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
3-38 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
3-40 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 3-41
PACSystems Programming GE Intelligent Platforms
-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
GFS-426B 3-45
PACSystems Programming GE Intelligent Platforms
3. From Windows Explorer, highlight the "C" drive and click on the File pull-down menu and select New
Folder.
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
GFS-426B 3-47
PACSystems Programming GE Intelligent Platforms
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.
GFS-426B 3-49
PACSystems Programming GE Intelligent Platforms
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
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.
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
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
GFS-426B 4-3
PACSystems Programming GE Intelligent Platforms
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.
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
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:
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.
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.
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.
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
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
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.
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.
GFS-426B 4-13
PACSystems Programming GE Intelligent Platforms
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.
Constant values may be entered in Integer, Real, Binary, Octal, and Hexadecimal formats. An example of
each is shown below.
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.
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.
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.
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.
Use the Clear Memory operation to set all Initial and/or Forced Values to zero.
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.
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.
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.
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.
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
4-20 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 4-21
PACSystems Programming GE Intelligent Platforms
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.
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
4-24 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
4-26 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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.
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.
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
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
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.
In this case, the variable or variable element may be selected directly in the Alisa variable to: drop down
list.
4-32 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 4-33
PACSystems Programming GE Intelligent Platforms
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:
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].
Caution
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
Note
In most case, the use of Variable Indexed Arrays is easier to utilize than Indirect References.
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.
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.
4-38 GFS-426B
GE Intelligent Platforms PACSystems Programming
5. Press the Enter key. The variable Stop_PB1 has now been assigned to the normally closed contact.
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
4-40 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
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
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.
4-44 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
GFS-426B 4-45
PACSystems Programming GE Intelligent Platforms
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.
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.
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.
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".
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
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.
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.
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?
3. What is variable scope? What is the difference between Local and Global scopes?
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
4-56 GFS-426B
Table 0:
Module 5
Working with PACSystems Controllers
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.
2. In the Project tab of the Navigator, right-click the Target whose direct connection you
want to configure and select Properties.
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
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.
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.
5-4 GFS-426B
GE Intelligent Platforms PACSystems Programming
5. In the Project tab of the Navigator, right-click the Target that you wish to communicate to and select
Properties.
GFS-426B 5-5
PACSystems Programming GE Intelligent Platforms
or-
Press the Online/Offline toolbar
button.
2. The Feedback Zone displays messages to indicate the connection with the 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
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,
-or-
To validate All Targets in the Project:
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.
5-8 GFS-426B
GE Intelligent Platforms PACSystems Programming
4. The results of the Verify operation are displayed in the 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.
5-10 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 5-11
PACSystems Programming GE Intelligent Platforms
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.
Note
The Fault Table Viewer automatically closes when you select another InfoViewer help topic.
5-12 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 5-13
PACSystems Programming GE Intelligent Platforms
-or-
Press the Online/Offline toolbar
button.
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
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.
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.
GFS-426B 5-17
PACSystems Programming GE Intelligent Platforms
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.
Equality Status
The Status Bar also displays the Equality Status of the Hardware Configuration and of the Logic in the
message section.
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.
GFS-426B 5-19
PACSystems Programming GE Intelligent Platforms
5-20 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 5-21
PACSystems Programming GE Intelligent Platforms
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
3. The Uploading from the connected device dialog shows the upload progress.
GFS-426B 5-23
PACSystems Programming GE Intelligent Platforms
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
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
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.
5-28 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 5-29
PACSystems Programming GE Intelligent Platforms
5-30 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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
-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
5-34 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 5-35
PACSystems Programming GE Intelligent Platforms
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-36 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
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
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
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.
5-44 GFS-426B
GE Intelligent Platforms PACSystems Programming
Therefore, the Ethernet module status will consume 80 bits starting at %I20001.
GFS-426B 5-45
PACSystems Programming GE Intelligent Platforms
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:
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 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
5-48 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 5-49
PACSystems Programming GE Intelligent Platforms
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:
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:
GFS-426B 5-51
PACSystems Programming GE Intelligent Platforms
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
GFS-426B 5-53
PACSystems Programming GE Intelligent Platforms
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.
5-54 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
GFS-426B 5-57
PACSystems Programming GE Intelligent Platforms
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
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?
8. How can you tell what modules may be installed in a particular slot?
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
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.
6-2 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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.
6-4 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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.
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
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.
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:
GFS-426B 6-9
PACSystems Programming GE Intelligent Platforms
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:
6-10 GFS-426B
GE Intelligent Platforms PACSystems Programming
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:
6-12 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
GFS-426B 6-13
PACSystems Programming GE Intelligent Platforms
6-14 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
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.
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.
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
5. Examine the Feedback Zone and notice that the START_WARNING Logic is NOT EQUAL:
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?
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
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.
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
Figure 2: Toolchest
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.
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
GFS-426B 7-5
PACSystems Programming GE Intelligent Platforms
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.
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.
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.
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.
7-10 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
7-12 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
GFS-426B 7-13
PACSystems Programming GE Intelligent Platforms
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
GFS-426B 7-15
PACSystems Programming GE Intelligent Platforms
Lab Exercises
7-16 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
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
GFS-426B 7-19
PACSystems Programming GE Intelligent Platforms
Review Questions
1. What items are stored in the Toolchest?
4. When you drag-and-drop (without Ctrl) from the Toolchest to the Navigator, what is created?
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
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.
8-2 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 8-3
PACSystems Programming GE Intelligent Platforms
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
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.
GFS-426B 8-5
PACSystems Programming GE Intelligent Platforms
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.
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:
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.
8-8 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 8-9
PACSystems Programming GE Intelligent Platforms
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:
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:
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:
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
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:
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.
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
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.
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,
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.
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:
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
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
GFS-426B 8-19
PACSystems Programming GE Intelligent Platforms
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.
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.
8-24 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
GFS-426B 8-29
PACSystems Programming GE Intelligent Platforms
8-30 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
8-32 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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.
13. Add a line of logic at the top of the block to assign a value of 3.141592 to PI:
8-34 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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
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.
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 :
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
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
GFS-426B 8-43
PACSystems Programming GE Intelligent Platforms
8-44 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
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
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?
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
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.
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
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
9-6 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
An example of a Text
instruction is shown here:
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:
GFS-426B 9-9
PACSystems Programming GE Intelligent Platforms
9-10 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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.
9-12 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 9-13
PACSystems Programming GE Intelligent Platforms
9-14 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
3. Drag-and-drop the instruction you want, ADD for example, onto the FBD page.
GFS-426B 9-15
PACSystems Programming GE Intelligent Platforms
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.
9-16 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 9-17
PACSystems Programming GE Intelligent Platforms
9-18 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
9-20 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 9-21
PACSystems Programming GE Intelligent Platforms
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.
GFS-426B 9-23
PACSystems Programming GE Intelligent Platforms
9-24 GFS-426B
GE Intelligent Platforms PACSystems Programming
5. Click on the Outputs tab and enter the following output parameter:
GFS-426B 9-25
PACSystems Programming GE Intelligent Platforms
9-26 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 9-27
PACSystems Programming GE Intelligent Platforms
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.
GFS-426B 9-29
PACSystems Programming GE Intelligent Platforms
9-30 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
9-32 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 9-33
PACSystems Programming GE Intelligent Platforms
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.
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
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:
GFS-426B 9-37
PACSystems Programming GE Intelligent Platforms
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 ;
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.
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.
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.
9-42 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
9-44 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
GFS-426B 9-47
PACSystems Programming GE Intelligent Platforms
9-48 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
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
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.
10-2 GFS-426B
GE Intelligent Platforms PACSystems Programming
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,
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
10-4 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 10-5
PACSystems Programming GE Intelligent Platforms
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:
10-6 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 10-7
PACSystems Programming GE Intelligent Platforms
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
GFS-426B 10-9
PACSystems Programming GE Intelligent Platforms
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:
10-10 GFS-426B
GE Intelligent Platforms PACSystems Programming
5. Select the Outputs tab and Enter the Output parameter definitions:
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.
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).
GFS-426B 10-13
PACSystems Programming GE Intelligent Platforms
Note
The UDFB parameters are displayed in an olive color in the logic.
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
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
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.
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.
GFS-426B 10-19
PACSystems Programming GE Intelligent Platforms
10-20 GFS-426B
GE Intelligent Platforms PACSystems Programming
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.
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
GFS-426B 10-23
PACSystems Programming GE Intelligent Platforms
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
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
Tank Object
The Tank object with its components is depicted below.
10-28 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 10-29
PACSystems Programming GE Intelligent Platforms
10-30 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 10-31
PACSystems Programming GE Intelligent Platforms
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
GFS-426B 10-33
PACSystems Programming GE Intelligent Platforms
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
10-36 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 10-37
PACSystems Programming GE Intelligent Platforms
10-38 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 10-39
PACSystems Programming GE Intelligent Platforms
10-40 GFS-426B
GE Intelligent Platforms PACSystems Programming
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:
GFS-426B 10-43
PACSystems Programming GE Intelligent Platforms
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
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.
10-46 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
GFS-426B 10-49
PACSystems Programming GE Intelligent Platforms
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
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.
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 _____________________.
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
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.
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.
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.
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".
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!
GFS-426B 11-5
PACSystems Programming GE Intelligent Platforms
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.
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.
11-6 GFS-426B
GE Intelligent Platforms PACSystems Programming
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:
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:
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.
GFS-426B 11-11
PACSystems Programming GE Intelligent Platforms
Tank Object
The Tank object is depicted below:
11-12 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 11-13
PACSystems Programming GE Intelligent Platforms
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.
GFS-426B 11-15
PACSystems Programming GE Intelligent Platforms
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.
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
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;
11-20 GFS-426B
GE Intelligent Platforms PACSystems Programming
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
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:
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.
To:
11-24 GFS-426B
GE Intelligent Platforms PACSystems Programming
GFS-426B 11-25
PACSystems Programming GE Intelligent Platforms
11-26 GFS-426B
GE Intelligent Platforms PACSystems Programming
Review Questions
1. What is the purpose of the Major and Minor Version block properties?
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