devnet unplugged 2002 “express your innovations” 1 develop efficiently and consistently with pi...
Post on 18-Dec-2015
217 views
TRANSCRIPT
![Page 1: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/1.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 1
Develop Efficiently and Consistentlywith PI ACE
Advanced Computing Engine
Martin Jetté, [email protected]
OSI Developers Network
Copyright © 2002 OSI Software, Inc. All rights reserved.
![Page 2: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/2.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 2
ACE applications
PI Universal Data Server
• Data filtering • Engineering calculations• Financial calculations• K.P.I.• Communication (e.g., paging, emailing, etc.)• Data transfer
PI-PE Subsystem PI-ACE
![Page 3: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/3.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 3
Advantages of using ACE for your applications
• ACE structure helps organize computations (EXE files, modules, contexts)
• ACE computations can be deployed in a distributed environment
• ACE can use tags from different PI servers• ACE can perform several computations in the
same module (no need to ‘cascade’ equations)• Comments are easily added to the VB code
![Page 4: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/4.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 4
Advantages of using ACE for your applications
• Natural triggering - can use multiple input tags for computation triggering
• Can debug and test the equation interactively• Can stop and restart independently any EXE,
module or context• Built in data filtering, clamping and substitution• Several logging levels and options• Advanced programming functions are available
(For… Next loops, Cases, external libraries, iterative computations,…)
![Page 5: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/5.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 5
Advantages of using ACE for your applications
ACE is "module database aware”– Calculations can easily be re-implemented on other pieces of
equipment simply by assigning a new context (PI Module) for that calculation.
– You can exploit the scalability of PI Properties and PI Aliases collection of a PI Module with for/each loops. Computation can be reconfigured simply by editing the PI Module database.
'where mymodule contains an unknown number'of temperature aliasesFor Each MyAlias in mymodule.aliases
temp = temp + MyAlias.datasource.data.snapshotc = c+1
Next MyAliasAvgtemp = temp / c
![Page 6: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/6.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 6
PI Module Database - Refresher• The PI Module Database is a hierarchical Database
with Historical capability and much more– Released with PI Universal Data Server 3.3 April 2001– Integrated to our Archive Database, PI Batch Database and PI
Transfer Record Database– Scalable– Secure– ActiveX based development tools to access the PI Module
Database. (PI-SDK)• The PI Module database is an organized/hierarchical
collection of PI Modules.• The PI Module Database adds structure and relation to
your data– TAGNAME, TIMESTAMP, VALUE ???
![Page 7: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/7.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 7
PI ModuleDB – Physical Model
Division
Location
Unit
Department
Equipment
Equipment Class
EnterpriseThe structure of the PI ModuleDB allows the information to be stored hierarchically in relation to a physical model, a business model or an application model .
![Page 8: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/8.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 8
PI ModuleDB - Business modelThe ModuleDB hierarchy can be used to organize a group of modules in multiple ways on your PI Server. Since you can insert Module links anywhere in the ModuleDB structure, you may want to allow users to choose from several different navigational paths to access information from a particular plant.
All Sites Business groups Regional Divisions
![Page 9: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/9.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 9
PI ModuleDB - Application model
• PI ModuleDB can provide a structure at the server level for organizing your PI application settings.
• PI ModuleDB can be used as a registry for your PI applications.
• PI tools using PI ModuleDB: PI ACE, PI ICU, PI BatchView 3, PI ModuleDB Editor, PI RTSQC, Process Templates,…
![Page 10: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/10.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 10
PI Module Characteristics
• Each module has:– Configurable information about itself - PIProperties– Linked tags - PIAliases– Dated versions - Revision number, Version number,
EffectiveDate and ObsoleteDate– System assigned information – UniqueID, Owner, Parent
list,…– Submodules with the same characteristics - PIModules
![Page 11: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/11.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 11
PIProperties• The PIProperties are collection of named values that can
store information related to a PI module• A PIProperty has a name and a value that can be almost
any type: string, numeric, date,…• PIProperties are used to store information about a
module, example:– Serial number– Installation date– Name of the technician that performed the installation
• The PI ModuleDB lets you keep history of changes in properties– Note: We recommend to use tags to archive high frequency
changing properties > 1 week rather than PI Properties
![Page 12: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/12.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 12
Module Properties• PIProperties are hierarchical
![Page 13: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/13.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 13
PIAliases
• PIAliases let you configure common names to access real time information => PI tags
![Page 14: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/14.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 14
PIAliases
Temperature identification without aliases
RX:TC143.PV RX:TC144.PV RX:TC145.PV RX:TC146.PV
Temperature identification with aliases
Temperature Temperature Temperature TemperatureReactor1 Reactor 2 Reactor 3 Reactor 4
Reactor1 Reactor 2 Reactor 3 Reactor 4
![Page 15: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/15.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 15
Versions and Revisions
• Each PI Module has a set of properties to control versioning :– EffectiveDate : Date when the module was put into
service (12/31/1969 7:00:01 by default)– ObsoleteDate : Out of service date– Version number : Let you keep track of major changes in
the configuration of your modules– Revision number : lets you keep track of minor changes
to modules Modify a propriety or alias Rename a module Change effective date…
![Page 16: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/16.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 16
Track History of Changes to Modules• The information in a module is kept throughout time, so it is possible to
look at a module to see its configuration back in time.
![Page 17: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/17.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 17
• ACE Wizard (Visual Basic Add-In)– A wizard for setting up, testing, and scheduling
calculations– All PI API and PI SDK code is provided behind the
scenes
• ACE Manager– Control panel for starting and stopping calculations– Provides means for assigning a calculation to Modules
• ACE Scheduler– Coordinates execution of calculation
The Three Parts of ACE
![Page 18: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/18.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 18
ACE Scheduler
ACE VBWizard
ACE Manager
![Page 19: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/19.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 19
Structure of ACE Modules
ACE Executable 1
ACE Module 1
ACE Module N
ACE Executable M
ACE Executables
ACE Context 1
ACE Context K
Information stored in PI ModuleDB
ACE EXE file
![Page 20: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/20.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 20
Example 1 My First ACE Computation
![Page 21: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/21.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 21
ACE Wizard (VB Add-in)Step 1 : Defining Input and Outputs
Either PI Tags or Module aliases may be used.
PI ACE will create output tags if they don’t already exist.
![Page 22: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/22.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 22
• Rich development environment
• COM servers
– Formula library
– Steam functions
• PI tags as ACE objects
– Methods
– Properties
• ACE built-in functions
Step 2 : Writing Your Calculation
ACE Wizard (VB Add-in)
![Page 23: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/23.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 23
Step 3 : Debugging Your Calculation
The Visual Basic debugger can be used to check calculation, step-by-step.
Waving the cursor over variables will show their values.
ACE Wizard (VB Add-in)
![Page 24: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/24.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 24
Step 4 : Testing Your Calculation
PI ACE provides additional testing under various conditions that may occur during real time execution.
ACE Wizard (VB Add-in)
![Page 25: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/25.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 25
Step 5 : Scheduling Your Calculation
Natural Scheduling
Timed Scheduling
ACE Wizard (VB Add-in)
![Page 26: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/26.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 26
ACE Manager• Monitor ACE Modules• Modify calculation status of ACE Modules
– Take out of service– Resume– Delete
• Edit scheduling information• Edit tag options (clamping and substitution)• Define the scheduling of a calculation and the PI
module (if any) associated with it. – This is a “context”
• Copy structural information of ACE Modules from one PI server to another
![Page 27: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/27.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 27
![Page 28: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/28.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 28
ACE Scheduler
• A Windows NT/2000 service
– Communicates with the default PI Server for the
computer where the ACE Scheduler is installed.
– Periodically checks for changes in the ACE
configuration information. • For example, after a context for an ACE Module is
successfully registered or added (via the ACE Wizard or
ACE Manager), the ACE Scheduler would automatically
start the ACE Context (i.e., the ACE Module with the
specified context). The status for the context becomes
"On" if successful and "Error" otherwise.
![Page 29: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/29.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 29
Example 2 Energy Calculation
![Page 30: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/30.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 30
Steam functions
• Steam tables are accessible for PE and ACE
• The steam functions calculate the thermodynamic
properties of a stream.
• These functions are derived from the software
distribution of ASME's Steam Tables, 6th Edition. The
functions support both English units and SI units.
• The PISteamTableFunctions.dll is not included
automatically in the references for new ACE project
(EXE).
![Page 31: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/31.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 31
Steam functions
• 24 different functions for both English
and SI units: StmEng_xxx or StmSI_xxx
• Examples
– StmSI_VPS(P, S) calculates the vapor specific
volume as a function of pressure and entropy. Use
for both superheated or wet steam.
– StmEng_VsatP(P) calculates the saturated vapor
specific volume as a function of pressure
![Page 32: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/32.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 32
Steam Functions - Example
![Page 33: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/33.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 33
Steam Functions - Example
![Page 34: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/34.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 34
Steam Functions - Example
![Page 35: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/35.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 35
Example 3 The Power of Multiple contexts using the PI Module Database
Deploy quickly a consistent set computations across the enterprise.
![Page 36: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/36.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 36
Flow compensation example
![Page 37: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/37.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 37
Example 4 DevNet Email Notifier
(available soon)
This download will be available in 2 flavors:a) Simple one line function call (.Bas include file)
b) Module database aware alarm engine
![Page 38: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/38.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 38
A – Single function callThis function sends an email. Prerequisites:• Include DevNetEmail.Bas file to your ACE project• Make reference to the Microsoft CDO for Exchange 2000 Library or
the Microsoft CDO for Windows 2000 library
Function SendMessage(strMsg As String, strSubject _ As String, strMailingList As String, strMailingCC As _ String, strSMTPServer As String, strFrom As String)_ As Boolean
Parameter Description
strMsg (passed) This is the message that appears in the email body
StrSubject (passed) This is the subject of the email message
strMailingList (passed) List of email addresses to send the message
strMailingCC (passed) List of email addresses (carbon copy) to send the message
strSMTPServer (passed)
SMTP server to be used for the email message delivery
strFROM (passed) Email address of the sender
![Page 39: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/39.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 39
B – Module Database aware Alarm engine
Key features:• Send automatically an email message for HIGH and LOW
alarms• Alarm level are configurable via the PI Module database
properties• Alarms can be triggered via snapshot data or summary
calculations• Configurable Alarm repeat delay• The addition of new Alarms are automatically picked up by
PI ACE (no stopping and starting of ACE computation simply add a PI module with the corresponding properties)
![Page 40: DevNet Unplugged 2002 “Express Your Innovations” 1 Develop Efficiently and Consistently with PI ACE Advanced Computing Engine Martin Jetté, mjette@osisoft.com](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d255503460f949fc74e/html5/thumbnails/40.jpg)
DevNet Unplugged 2002 “Express Your Innovations” 40