Upload
others
View
16
Download
0
Embed Size (px)
Citation preview
Navigating the World of Automation
Creation of a Custom Library Based on the APL Style Guide
Harry PiglerPigler Automation, LLC
2012 Automation Summit Washington, DC
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 2
2012 Automation Summit
Title: Creation of a Custom Library Based on the APL Style Guide
Track: Novel Approaches to Problem
Resolutions, Including Tips and Tricks
Topic: Customization of APL Functions
Presenter: Harry Pigler
Company: Pigler Automation, LLC
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 3
Pigler Automation, LLC was founded in 2005 by Karen and Harry Pigler after
17/20 years of employment with various Siemens organizations in both
Germany and the United States
System Integrator for PCS7 and S7 Process Control Applications
Located in Firestone, Colorado -- 30 miles north of Denver
5 Employees and Growing
Industries Served: Oil and Gas, Power, Pharmaceutical and Mining
For more information please visit:
www.piglerautomation.com
Or call : (866) 871-1456
Providing Excellence in Process Automation
Pigler Automation, LLC
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 4
Harry Pigler
Education and Employment
Born and raised in Germany
Electrical Engineering Degree from Universität Erlangen-Nürnberg, Germany
20+ years employment with Siemens in Germany and the US
Managing Member of Pigler Automation, LLC since 2005
PCS7 Experience
• First contact with PCS7 in 1996 : Developing add-ons for PCS7 to be applied
in the Power Industry (PCS7 V3)
• Lead System Engineer in the TVA Hydro Automation Project:
Retrofitted 29 Hydro Plants with PCS7 to be Operated from one Central
Headquarter
• As Managing Member of Pigler Automation: the main focus is to support our
Customers with their PCS7 Installation, Improvement and Addition needs
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 5
The Challenge
Supervisory Control for a Hydro Power Unit
Requirement from the Customer:Provide a compact representation for a Hydro Power Unit which displays all
important statuses, as well as allows for mode changes and the entry of set
points
Focus On:
-Two analog set points (Active and Reactive Power)
-Mode selector for multiple states (Local, Manual, Semi-Automatic, Automatic)
Solution with Standard PCS7 APL: The Advanced Process Library does not have such a specialized object out of
the box (who does?)
However, it is possible to create such an object by utilizing existing APL
elements (with some effort)
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
PCS7 Typicals : 101
Page 6
WinCC
S7 Controller
Function Block
Block Icon
Faceplate
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
PCS7 Advanced Process Library
Siemens provides the PCS7 User with extensive libraries for both the
Controller as well as the HMI
The APL scope of delivery includes:
• A comprehensive Function Block library with a detailed manual and online
help
• Block Icons for Function Blocks with HMI relevance. User can select from
different representations (@PCS7TypicalsAPL.pdl)
• Associated Faceplates, invoked by the Block Icons, that represent functions
allowing for Operator commands
For customization:
• APL Style Guide: a detailed manual for customization of Function Blocks,
Block Icons and Faceplates
• @PCS7ElementsAPL.PDL: building blocks for Faceplate customization
Page 7
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Out of the Box Solution
Page 8
If only existing elements are utilized:
multiple Function Blocks are needed
multiple Block Icons are placed on
the screen
multiple Faceplates used
Cannot fulfill the one compact object
requirement!!
Let’s build a customized Function
Block, with a matching Block Icon
and Faceplate!
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 1: The Function Block
Page 9
First Step: the Function Block
1) Find an existing Function Block that comes
close to what you need.
For this example we will use an OpAnL
(Operator Analog Signal Input) as a starting
point
2) In the Project Library create a new Chart
place the Block
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 1: The Function Block
Page 10
Create the I/O frame of the
Function Block
At least every I/O relevant
for the HMI needs to be
included
Drag and Drop inputs and
outputs to the CHART I/O
section
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 1: The Function Block
Compile Chart to
Function Block
Ensure the S7_m_C
attribute is set!
Page 11
Creates a SCL program with
proper I/O definition; ready to add
additional I/Os and to develop the
algorithm
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 1: The Function Block
Change I/O names to match the Function
Add I/Os where needed
Use existing I/Os as a template
NOW WRITE CODE
Page 12
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 13
NOTE: MODE / STATUS DWORD
APL uses WORDs or
DWORDs to
communicate statuses
between the HMI and
the Controller
ATTENTION: There is
a difference between
accessing a Bit in a
WORD or DWORD in
the Controller versus
WinCC.
0-31
16-3124-31
16-23
0-158-15
0-7
DWord
WordByte
0
1
2
3
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
How to use MODE DWORD
Page 14
Mode1{S7_visible:='false';S7_m_c := 'true'}:DWORD:=16#0000;
ModeBits AT Mode : ARRAY[0..31] OF BOOL;
//ModeBits[0] - Unit in Local Control - 24
//ModeBits[1] - Unit in Manual Control - 25
//ModeBits[2] - Unit in Semi-Automatic Control - 26
//ModeBits[3] - Unit in Automatic - 27
Mode1{S7_visible:='false';S7_m_c := 'true'}:DWORD:=16#0000;
ModeBits AT Mode : ARRAY[0..31] OF BOOL;
//ModeBits[0] - Unit in Local Control - 24
//ModeBits[1] - Unit in Manual Control - 25
//ModeBits[2] - Unit in Semi-Automatic Control - 26
//ModeBits[3] - Unit in Automatic - 27
IF FB_Local THEN
Mode1:=16#00000000; //clear all older bits
ModeBits[0]:=1;
END_IF;
IF FB_Local THEN
Mode1:=16#00000000; //clear all older bits
ModeBits[0]:=1;
END_IF;
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 1: The Function Block
The new Function Block is in the Project Library
Page 15
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 2: The Block Icon
A Block Icon Type has a fixed association with a Function Block Type.
A Block Icon can be pre-placed on a screen when compiling WinCC.
All existing Block Icons are stored in the file: @PCS7TypicalsAPL.PDL
Naming convention for the Custom Library:
@PCS7TypicalsAPL<ADDON>.PDL
Example: @PCS7TypicalsAPL_PA.PDL
Page 16
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 2: The Block Icon
Page 17
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 2: The Block Icon
Page 18
PCS7ElementsAPL.PDL contains building blocks for Faceplates and Block
Icons
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 2: The Block Icon
Page 19
Copy the OpAnL Block Icon
Use the ‘Customize Object’ function to modify the Block Icon graphic
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 2: The Block Icon
Page 20
Once the graphic is completed, configure the interface
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Part 2: The Block Icon
Page 21
Adjust the Type reference
Block Dynamic is entered with
the I/O Name only – WinCC
Compile will complete the Tag
Name
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 22
Part 3: The Faceplate
Copy the OpAnL Faceplate files in the GraCS folder and rename them:
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 23
Part 3: The Faceplate
Open the “Standard” view and adapt as needed
• Need additional modes other than “On” and “Out of Service”
• Need two PV/SP combinations
• Need two bar charts
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 24
Part 3: The Faceplate
New Elements placed Object Properties need to be adapted
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 25
Part 3: The Faceplate
Mode changes
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 26
Part 3: The Faceplate
Verify all scripts
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 27
Part 3: The Faceplate
Duplicated Elements Add to scripts
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
Page 28
Part 3: The Faceplate
View List Changes for the Open Picture script and the “Next View” button
If no Batch tab is needed,Set BATCH to “FALSE”
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
In Conclusion
Page 29
Find a Function that is close to what you need as a starting point.
Beats starting from scratch!
Due to the complexity of APL, it might be easier to isolate an aspect
and make it work; then integrate it in the final product
Never underestimate the time it takes to thoroughly test a customized
Function Block, Block Icon and Faceplate!
Check for Script Errors and fix them!
Changes in the I/O Interface of the Function Block require a CPU stop
to load them into the Controller
Navigating the World of AutomationCopyright © Siemens Industry, Inc. 2012. All Rights Reserved.
More Information
For more information please visit:
www.PiglerAutomation.com
Or call : (866) 871-1456
Email: [email protected]
Thank You!
Page 30