pi-processbook developer chris coen brian bostwick

24
PI-ProcessBook Developer Chris Coen Brian Bostwick

Upload: clarence-cameron

Post on 12-Jan-2016

235 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PI-ProcessBook Developer Chris Coen Brian Bostwick

PI-ProcessBook Developer

Chris Coen Brian Bostwick

Page 2: PI-ProcessBook Developer Chris Coen Brian Bostwick

Overview

PI-ActiveView

PI-ProcessBook Object ModelBatch Trend and SQC Chart

Developing for ProcessBook

Page 3: PI-ProcessBook Developer Chris Coen Brian Bostwick

PI-ActiveView

ActiveX Control

Use in and develop with MS Internet Explorer

MS FrontPage

Visual Basic

MS Office

Page 4: PI-ProcessBook Developer Chris Coen Brian Bostwick

PI-ActiveView Scripting

Locally configure the PI Server settingsPBD.ServerIniUrl

Change the Display PBD.DisplayURL

Wait for the ready state,pbReadyStateComplete

Access the Display object model

Page 5: PI-ProcessBook Developer Chris Coen Brian Bostwick

Deploying PI-ActiveView

Setup kit or Cab files

Build Cabs with the CabWizardCollects the modules to deploy ActiveView

Includes necessary PI Server information

Stamps with your digital signature

Includes additional components

Page 6: PI-ProcessBook Developer Chris Coen Brian Bostwick

ActiveView Examples

Samples installed with the product

Additional Samples on product CDor OSISoft.com

The HTML produced by Export.pdi

Page 7: PI-ProcessBook Developer Chris Coen Brian Bostwick

Overview

PI-ActiveView

PI-ProcessBook Object ModelBatch Trend and SQC Chart

Developing for ProcessBook

Page 8: PI-ProcessBook Developer Chris Coen Brian Bostwick

New with PI-ProcessBook 2.1

Various automation fixes

No more display flickering

The Trend includes a Format Object

Create trends with zero traces

Tag Access, Multistate objects

Page 9: PI-ProcessBook Developer Chris Coen Brian Bostwick

Batch Trend 2.1 Run time

Enumerate LiveBatches and their associated Traces

Manipulate Cursors and viewTime, Value and Batch

information

EventsMouse events

DataUpdate(Batch and Trace)

BatchComplete(Batch)

Page 10: PI-ProcessBook Developer Chris Coen Brian Bostwick

Batch Trend 2.1 Configuration

Access configuration by Get/SetDefinition

Configure FixedBatches

Set the Query for batches

Add/remove Tags and Aliases

Configure the Time settings

Adjust the trend’s formatting

Page 11: PI-ProcessBook Developer Chris Coen Brian Bostwick

SQC Chart 1.2 (Coming Soon)

Access configuration by Get/SetDefinition

Set the Chart Tag and Chart Type

Full control of the sampling parameters

View and configure the control limits

View and configure Alarm settings

Page 12: PI-ProcessBook Developer Chris Coen Brian Bostwick

Overview

PI-ActiveView

PI-ProcessBook Object ModelBatch Trend and SQC Chart

Developing for ProcessBook

Page 13: PI-ProcessBook Developer Chris Coen Brian Bostwick

Working with Symbols

Configure an object using its Properties and Methods

Respond to and object’s Events

Code Demo

Page 14: PI-ProcessBook Developer Chris Coen Brian Bostwick

What just happened?

How to change a batch trend’s fixed batches

Reusable UI with the BatchView Control

Reusable code with the BatchView Object

Use the same script for two trends

Easy to add feature to other trends because the code is partitioned

But . . . What if I have 100 trends?

Page 15: PI-ProcessBook Developer Chris Coen Brian Bostwick

With Events

Scripting events for object references

Dim WithEvents <varname> as <object type>

Write code for a class of objects

Code Demo

Page 16: PI-ProcessBook Developer Chris Coen Brian Bostwick

What just happened?

Dim a global variable WithEvents

Set the variable reference on selectionto attach the event handler code

One set of code is used for all trends in the display, even new ones

But . . . What if I have 100 Displays?

Page 17: PI-ProcessBook Developer Chris Coen Brian Bostwick

Add-ins

Based upon the COM interfaces Extensibility

Supported by PI-ProcessBook 2.1PI-ActiveView 2.1Visual StudioOffice 2000

Develop Add-ins using VB, VC++, VBA (and ODE)

Page 18: PI-ProcessBook Developer Chris Coen Brian Bostwick

ProcessBook Add-ins

Add features to the application

Develop code that works for any display

Change the feature set for a symbol

Characterize a new symbol

Code Demo

Page 19: PI-ProcessBook Developer Chris Coen Brian Bostwick

What just happened?

Create and Add-in for PI-ProcessBook

Track the active Display

Track the selected Trend andselect Fixedbatches

Build, run and debug

This project creates an ActiveX Dll

Page 20: PI-ProcessBook Developer Chris Coen Brian Bostwick

Custom Datasets

A special type of Add-in

Extends Datasets for PB and AV

Historical with real time updates

Data is transferred via ADO Recordsets

Includes custom UI for configuration

“What is he talking about . . .?”

Page 21: PI-ProcessBook Developer Chris Coen Brian Bostwick

Review

Code for a Single symbolcharacterizes that symbol

Code for a Single Displayglues together an applet

Use ActiveX Controls chunks of reusable UI

Use ActiveX DLL’s shared code and functionality

PI-ProcessBook Add-in, new features toProcessBook

“Hey, works on my machine!”

Page 22: PI-ProcessBook Developer Chris Coen Brian Bostwick

Deployment

The Package and Deployment WizardSteps through building a setup kit

Displays, use ODE packaging tool

Add-ins, use the VB utility

Controls may need licensing

(Tip: Add-ins need MSADDNDR.DLL)

Page 23: PI-ProcessBook Developer Chris Coen Brian Bostwick

Resources

OSI Developers Network

Custom Datasets white paper and sample, download from OSISoft.com

VBA Developer’s Handbookby Getz and Gilbert

MS Office Developer Magazine

MSDN.microsoft.com

Page 24: PI-ProcessBook Developer Chris Coen Brian Bostwick

Thanks

Chris Coen Brian Bostwick