You are on page 1of 58

PI ActiveView User Guide

Version 3.2

OSIsoft, Inc.
777 Davis St., Suite 250
San Leandro, CA 94577 USA
Additional Offices
Houston, TX
Johnson City, TN
Longview, TX
Mayfield Heights, OH
Philadelphia, PA
Phoenix, AZ
Savannah, GA
Yardley, PA
Sales Outlets/Distributors
Middle East/North Africa
Republic of South Africa
Russia/Central Asia
South America/Caribbean
Southeast Asia
South Korea Taiwan

International Offices
OSIsoft Australia
Perth, Australia
Auckland, New Zealand
OSIsoft Germany GmbH
Altenstadt, Germany
OSIsoft Asia Pte Ltd.
Singapore
OSIsoft Canada ULC
Montreal, Canada
Calgary, Canada
OSIsoft, Inc. Representative Office
Shanghai, Peoples Republic of China
OSIsoft Japan KK
Tokyo, Japan
OSIsoft Mexico S. De R.L. De C.V.
Mexico City, Mexico
OSIsoft do Brasil Sistemas Ltda.
Sao Paulo, Brazil

Contact and Support:


Main phone:
Fax:
Support phone:

(01) 510-297-5800
(01) 510-357-8136
(01) 510-297-5828

Web site:
Support web site:

http://www.osisoft.com
http://techsupport.osisoft.com

Support email:

techsupport@osisoft.com

Copyright: 2003-2009 OSIsoft, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, mechanical, photocopying, recording, or otherwise, without the prior written permission of
OSIsoft, Inc.
OSIsoft, the OSIsoft logo and logotype, PI Analytics, PI ProcessBook, PI DataLink, ProcessPoint, Sigmafine, Analysis Framework, IT
Monitor, MCN Health Monitor, PI System, PI ActiveView, PI ACE, PI AlarmView, PI BatchView, PI Manual Logger, PI ProfileView,
ProTRAQ, RLINK, RtAnalytics, RtBaseline, RtPortal, RtPM, RtReports and RtWebParts are all trademarks of OSIsoft, Inc. All other
trademarks or trade names used herein are the property of their respective owners.
This product includes software (SSubTmr6.dll) developed by vbAccelerator (http://vbaccelerator.com/).
Copyright (c) 2002 vbAccelerator.com
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL VBACCELERATOR OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

RESTRICTED RIGHTS LEGEND


Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the
Rights in Technical Data and Computer Software clause at DFARS 252.227-7013
Published: 5/22/2009

Table of Contents
Chapter 1 Introduction .................................................................................................................. 1
PI ActiveView Product Contents ........................................................................................ 2
Chapter 2 For End Users: Viewing PI Data with PI ActiveView ................................................ 3
Content of a PI Display Document ..................................................................................... 4
Updates to Data in a Display .............................................................................................. 5
Interact with the PI Display Document ............................................................................... 5
Chapter 3 For Developers: PI ActiveView Administration....................................................... 21
Flow of Information ........................................................................................................... 21
PI ActiveView Executable ................................................................................................ 22
PI ActiveView Control ....................................................................................................... 23
Expiration of Displays ....................................................................................................... 23
PI ActiveView Setup ......................................................................................................... 24
ActiveX Controls and PI ProcessBook Add-ins ................................................................ 25
Create PI Display Documents .......................................................................................... 26
Work with Element Relative Displays............................................................................... 29
PI ActiveView Configuration ............................................................................................. 30
Develop Web Pages......................................................................................................... 32
Embed PI Displays in Other Containers........................................................................... 36
Appendix A Troubleshooting .....................................................................................................39
Browser Security Settings ................................................................................................ 39
Displays and Connection Failure ..................................................................................... 39
Revisions to a Display Don't Appear ................................................................................ 40
Using PI ActiveView and Windows Server 2003.............................................................. 40
Appendix B Installation ............................................................................................................... 43
System Requirements ...................................................................................................... 43
System Prerequisites ....................................................................................................... 44
Install PI ActiveView ......................................................................................................... 44
Uninstall PI ActiveView.....................................................................................................45
Appendix C Glossary .................................................................................................................. 47
ActiveData Objects (ADO) ............................................................................................... 47
ActiveX Control................................................................................................................. 47
Active Server Page (ASP) ................................................................................................ 47
Browser ............................................................................................................................ 47
Corporate Intranet ............................................................................................................ 47
0BPI ActiveView User Guide

iii

Table of Contents

Digital Signature ............................................................................................................... 47


Dynamic Symbol .............................................................................................................. 48
PI Display Document (.pdi file) ......................................................................................... 48
PI System Administrator ...................................................................................................48
PI Server .......................................................................................................................... 48
Trace ................................................................................................................................ 48
VBA ..................................................................................................................................48
Web server ....................................................................................................................... 48
Appendix D Technical Support and Resources ....................................................................... 49
Index .............................................................................................................................................. 53

iv

Chapter 1

Introduction
PI ActiveView is a tool for viewing live and historical data from a variety of data sources. It
presents displays of live data from the PI Server as well as information from ODBC sources
(via ADO or VBA). Using Microsoft Internet Explorer you can view these displays with PI
ActiveView on the Internet or within a corporate intranet. You can insert PI ActiveView
displays as ActiveX controls in existing Microsoft Excel spreadsheets or other reporting tools
used in your environment.
The live data displays, called PI Display Documents (see "PI Display Document (.pdi file)"
on page 48), are prepared from displays built in PI ProcessBook.

When you open a PI Display Document in Internet Explorer, the display automatically
updates with new data from the PI Server. Dynamic symbolssuch as trends, bars, or
valuesupdate just as they would in PI ProcessBook. Certain VBA scripting in a display is
also available in PI ActiveView.

0BPI ActiveView User Guide

Introduction

PI ActiveView Product Contents


PI ActiveView includes the following components:

Developer's Kit (page 25)

PI ActiveView software for end users: includes PI SQC, PI BatchView, VBA, and
ADO components

PI ActiveView ActiveX control: a control with a simple set of properties that allows
viewing of the PI Display Document

PI ActiveView Executable: a set of files installed on the client computer that provide
data updates and VBA execution services

Documentation:
Comprehensive PI ActiveView User Guide in help file format, installed in the
PIPC\HELP folder (PIActiveView.chm). To view the PI ActiveView help,
right-click on a PI ActiveView display and choose Help.
PI ActiveView User Guide in PDF format. The User Guide PDF is located on the CD
but not installed by setup.exe. You can also download it from the OSIsoft
Technical Support Web site.

Chapter 2

For End Users: Viewing PI Data with PI


ActiveView
PI ActiveView allows you to browse displays of live data from the PI Server on the Internet
or on a corporate intranet or from within a hosting application.
When you view a PI Display Document in Internet Explorer, for example, the display
automatically updates every few seconds with new data that reaches the PI Server. Dynamic
symbols such as trends, bars, or values update just as they would in PI ProcessBook.
You can obtain specific data values from a trend, change the size of a trend, or adjust the time
period being displayed in a trend.
The steps involved in viewing a PI Display Document on a Web page with PI ActiveView
are:
1. Browse to an Internet or corporate intranet Web page that refers to a PI Display
Document. The Web page downloads to your PC unless it is already cached there.
2. The browser loads the PI ActiveView Control, which starts the PI ActiveView executable
in the background. PI ActiveView presents the PI Display Document on the HTML Web
page on your screen.
Note: If you need a password to connect to the PI Server, a dialog box for logging on
appears at this point.

3. PI ActiveView (acview.exe) gets the appropriate data from the PI Server and loads
the data into the PI Display Document. This data continues to update as new data
becomes available on the PI Server.

0BPI ActiveView User Guide

For End Users: Viewing PI Data with PI ActiveView

For more details, see Flow of Information (page 21).

Content of a PI Display Document


A PI Display Document viewed through PI ActiveView can contain both static and dynamic
content. Static content may include bitmaps, schematics, or text. Dynamic symbols include
values, bars, XY plots, and trends that are updated when the data in the PI Server changes. A
display developer can also include symbols that change colors as certain values are reached.
Trends are plots of point data over time. A Value is a numeric value for a particular point in
the PI Server. A value may or may not include a tag (point name) and a time stamp. Bars are
used to show values graphically as a percentage of a rectangle.

Each trend has at least one plot. The various plots and their labels may be displayed in
matching colors. If the trend extends to the current time, a dotted line represents the current
time. Labels may include the point name, description, value, and engineering units.

Updates to Data in a Display

Updates to Data in a Display


Every few seconds, PI ActiveView updates the open displays with all the new values for tags.
The trends, bars, other symbols, and values from PI calculations in each Display update to
reflect the new information.
The PI ActiveView developer can alter this update scan rate.

Interact with the PI Display Document


The user interface is similar to that of a PI ProcessBook Display in view-only mode. You can
interact with dynamic symbols in a PI Display Document in several ways:

Expand a trend (page 6)

Use trend cursors (page 6) to see values

Change the time range (page 17) forward or back

Change the time zone (page 18) shown to Client or Server time

For a display with layers, choose which layers to show and hide (page 8)

View the status of displays (page 10)

Use the Time Range toolbar (page 18) to modify time range

Configure the trend scale to switch to another type of value range (Autorange, Database,
Absolute)

If there is a VBA script in the PI Display Document, you can initiate other functionality, such
as selecting from a list of PI Display Documents or switching data points or servers being
viewed.
You cannot perform analysis operations that call a dialog or new window (such as a Trend
Display window or Point Attributes dialog). You cannot change the display, save it
separately, or resize display documents. No other menus or toolbars are available.

0BPI ActiveView User Guide

For End Users: Viewing PI Data with PI ActiveView

After you finish viewing a document and close the page, any interactive features that you
used revert to their original configuration.

Expand a Trend
To expand a trend or XY plot to fill the PI Display Document, double-click it. To restore the
original dimensions, double-click the plot again.

Trend Cursors
Use trend cursors to determine values at particular points on a trend or XY plots.
To initiate a cursor, point with the mouse at the value axis of the plot until the cursor pointer
appears and then drag toward the opposite axis. As you drag the cursor across the plot, the
value shown corresponds to the point on the plot where the cursor is. When you release the
mouse button, the line and value remain on the display. You can drag multiple cursors onto
the plot. When you close the page, the cursors disappear.
If a plot has multiple traces, the value box shows the value of each trace.
In the following illustration, a trend cursor has a value of 2.1095 and a time stamp of
6/27/2006 9:23:02.83055 AM.

To remove a trend cursor without closing the page, drag it off the plot.

Interact with the PI Display Document

Configure Trend Scale


The Trend Scale dialog provides easy access to the value scale settings for each tag in a
trend, SQC chart or XYPlot. If the plot uses a data set, only the Autorange and Absolute
options are available for the Maximum and Minimum scale settings.

1. In Run mode, double-click the plot's value scale to open the Trend Scale dialog.
Note: In PI ProcessBook you can also click View > Trend Scale. This menu object
is not available in PI ActiveView.

2. Select the Single Scale or Multiple Scales radio button.


3. If you are using multiple scales, then select the tag for which to set the scale options from
the Tags drop-down list.
4. Select Autorange, Database, or Absolute options for the Maximum and Minimum
values of the scale.

Autorange: sets the value scale using the minimum and maximum tag values
between the trend start time and end time.
Database: sets the value scale using the tag attribute values in the Point Database.
Zero is the minimum. Zero + Span is the maximum. See the PI Server Reference
Guide for more information on tag attributes.
Absolute: allows you to enter a custom value for the value scale of a tag. Enter the
value in the adjacent box.

5. If you have selected the Absolute option, then type in the Maximum and Minimum
values of the scale in the adjacent boxes.
6. Click OK.
Modifications made to a trend through use of this dialog do not affect the stored settings of
the trend.
Note: To return the trend scale to its original settings, click Revert on the context menu.

0BPI ActiveView User Guide

For End Users: Viewing PI Data with PI ActiveView

View Layers
Layers can be created in PI ProcessBook displays. Layers allow you to treat related graphical
elements as a group. You can hide or show a layer at run time. There is an interface for
showing and hiding layers this in both PI ProcessBook and PI ActiveView.
To view or hide layers in a display, right-click the display and choose Layers In the Layers
dialog, select the Visible check box for any layer you want to show, and clear the check box
for any layer you want to hide.

The Index column shows the layer's order in the collection. The Count column shows the
number of symbols on the layer.

Show or Hide Traces


Trend traces can be temporarily hidden at Run time so that other data on a trend is easier to
view.
1. Click on a legend item to hide or show the associate trace on the plot,
-orIf viewing a trend, right-click on a trend symbol.
2. On the Trend symbol submenu, select Trend Traces. A sub-menu appears allowing you
to:

Show All
Hide All
Show/Hide individual traces

Interact with the PI Display Document

3. Select an option to hide or show the trace on the plot. If the trace has a regression line
configured, the regression line is also hidden. When a trace is hidden:

the trace name is dimmed in the legend and the description, value, and engineering
units are hidden (if they were shown before).
the space reserved on the legend for the description, value, and engineering units
collapses so that the trace under the hidden trace is moved. This clearly shows the
visible traces on the legend, especially on a trend with many traces.
on a multi-scale trend, the value scale associated with the hidden trace is hidden.
on a single scale trend, the minimum and maximum values shown on the scale may
be adjusted.
You can show hidden traces by clicking their names a second time in the legend, or
by clicking the Revert button.

0BPI ActiveView User Guide

For End Users: Viewing PI Data with PI ActiveView

View a Status Report


The appearance of the Status button on the ActiveView toolbar indicates the current state of
dynamic symbols on the display:
State

Description
No errors
A dynamic symbol in the display contains a warning
A symbol is reporting bad data or shutdown status
A symbol shows questionable data
A symbol shows annotated data
A symbol shows substituted data

To view a status report for all of the symbols in a display, click the Status button on the PI
ActiveView toolbar.

To view a log of system messages, click Message Log...


To save the status report, click Save to File.

10

Interact with the PI Display Document

XYPlot Statistics
The XYPlot Statistics dialog allows you to view and export raw data values and statistics,
such as the mean and standard deviation of each tags data.
You can also view these statistics in the Details Window in PI ProcessBook.
To open the XYPlot Statistics dialog:
1. In Run Mode, double-click the XYPlot symbol. The Statistics dialog appears.
2. In the Options drop-down list, select Raw Data or Statistics.

0BPI ActiveView User Guide

11

For End Users: Viewing PI Data with PI ActiveView

To save this data to a text file:


1. Click the Save Data to File button. The Save As dialog appears.
2. Enter a file name in the Save As dialog. The data is saved to the file in the following
format:
Tag, <tag name>
Start Time, <start time>
End Time, <end time>
Count, < number of points paired>
Mean, <mean>
STDEV, <standard deviation>
Data Type, <data type>
Index, Time, Value, Status
<index>, <time>, <value>, <status>
<index>, <time>, <value>, <status>

Tag, <tag name>


Start Time, <start time>
12

Interact with the PI Display Document

End Time, <end time>


Count, < number of points paired>
Mean, <mean>
STDEV, <standard deviation>
Correlation, <correlation coefficient>
Slope, <slope>
Intercept, <intercept>
Data Type, <data type>
Index, Time, Value, Status
<index>, <time>, <value>, <status>
<index>, <time>, <value>, <status>

Etc.

Time and Time Ranges


The following example is a trend displaying data through the current time. The right border
of the trend is dotted, signifying current time, rather than solid, signifying a specific time in
the past or future. The value scale may also change if the trend is formatted to have
Autorange scaling.

Depending on your configuration, the time zone represented on a display is either the client
machine time or the time relative to the PI Server. For details, see Change Time Zone (page
18).

0BPI ActiveView User Guide

13

For End Users: Viewing PI Data with PI ActiveView

Time Range Formats


All trends have beginning and ending time values that define the span of time for which data
is plotted. These values can be expressed in absolute or relative time.
Other symbols on a display are also affected by time ranges.
PI Time
PI Time abbreviations and PI Time expressions allow you to specify times and time ranges
for data using constants, variables, and short expressions.
PI Time Abbreviations
An interval is a unit of time that can be used in time entries. Intervals that support fractional
values are listed below. For intervals where the Fractions column indicates No, fractional
amounts cannot be used in time strings.
Name

Short name

Plural name

Member names

Fractions

second

seconds

no

yes

minute

minutes

no

yes

hour

hours

no

yes

day

days

no

no

month

mo

months

yes (for example, December)

no

year

years

no

no

week

weeks

no

no

weekday

wd

weekdays

yes (for example, Tuesday)

no

yearday

yd

yeardays

no

no

You can spell out month and weekday names, or enter the first three letters (for example,
Dec, Tue).
PI Times can also be expressed using certain constants:
Constant

Result

The current time.

Today or t

12:00 am of the current day.

Yesterday or y

12:00 am of the previous day.

Sunday or sun

00:00:00 (midnight) on the most recent past Sunday (in


reference to the PI Server).

PI Time Expressions
PI allows three types of time expressions: relative time, combined time, and absolute time.
These time expression types are defined in the following table.

14

Interact with the PI Display Document

Expression

Description

Examples

Relative Time

Relative time expressions specify a number of days,


hours, minutes, or seconds with either a leading plus
sign or a leading minus sign.
The reference time, or starting time, for the relative time
expression is the current time if both start and end times
are relative.

+1d

A combined time expression is a specific reference time


followed by a relative time expression.

*+8h

Combined
Time

-24h
-3m

+24s

18-dec-02 3m
t+32s

Absolute Time

An absolute time expression is any time expression that


is neither a relative nor a combined time expression.

14-Dec-97

11-Nov-96
2:00:00.000
1
t
y

When using PI times, follow these guidelines:

Use absolute or combined time expressions. Avoid using relative time expressions.
Multiple relative time expressions in a time range may cause an incorrect start time or an
error message, depending on the context of the expression.

Relative and combined time expressions contain only a single operator: either a single
plus sign (+) or a single minus sign (-). Additional operators can lead to unpredictable
results. For example, the following are not valid time expressions:
*+1d+4h
T-1d+12h

The name or short name for an interval used to denote PI time is not case-sensitive.

PI Time String Examples


Time Syntax Examples
PI Time String

Meaning

06-dec-91 15:00:00

3:00:00 pm on December 6, 1991

Current time (now)

25

00:00:00 (midnight) on the 25th of the current


month

25-aug-92

00:00:00 (midnight) on August 25th, 1992

8:

08:00:00 on the current date

25 8:

08:00:00 on the 25th of the current month

00:00:00 on the current date (today)

00:00:00 on the previous date (yesterday)

0BPI ActiveView User Guide

15

For End Users: Viewing PI Data with PI ActiveView

PI Time String

Meaning

sun, mon, tue, wed, thu, fri, sat

00:00:00 on the most recent Sunday, Monday, ...


Saturday

*-1h

One hour ago

t+8h

8:00:00 am today

y-8h

4:00:00 pm on the day before yesterday

mon+14.5h

2:30:00 pm last Monday

sat-1m

11:59:00 pm last Friday

Time Interval Examples


In interval expressions, a positive or unmarked interval is based on the starttime, and a
negative interval is based on the endtime of a time expression.
For example, if starttime is y, endtime is t, and interval is +5h for a Sampled Data function,
then interpolated values are generated at y, y+5h, y+10h, y+15h, and y+20h. If the interval is
-5h, the interpolated values are generated at y+4h, y+9h, y+14h, y+19h and t.

16

PI Time String

Meaning

1.5h

One and one-half hours

32m

Thirty-two minutes

49s

Forty-nine seconds

+5h

Five hours added to the time beginning with


the starttime

-5h

Five hours subtracted from the time


beginning with the endtime

Interact with the PI Display Document

Change Time Range


To change the time range represented by a dynamic symbol:
1. Scroll time ranges directly on a trend by using the Step Forward or Backward buttons
on the time scale. These time changes are not saved with the symbol.
-orClick to select the symbol you want to change. To select multiple symbols, hold down the
Shift key while selecting symbols. To change the time range for every symbol in the display,
click on an unused area of the display.
2. Right-click and choose Time Range.

3. In the Change Time Range dialog box that appears, select a range from the two dropdown lists or enter a range. You can enter time ranges in relative time, absolute time, or a
combination of the two. For details, see Time Range Formats (page 13).

4. Click OK. The new values for the selected dynamic symbols appear.

0BPI ActiveView User Guide

17

For End Users: Viewing PI Data with PI ActiveView

Note: You can also use the scroll bar in the PI ActiveView toolbar to change the time
range.

Trends with Future Time Ranges


Trends with time ranges that extend into the future update normally if the end time uses an
asterisk (*). Use an asterisk plus a time interval (for example, *+4h) to display updating
future time. The asterisk and plus sign are necessary; this feature does not work if you input
the time in a format such as 10-Jan-00 or T+10H.
Change Time Zone
You can show times in the Client or Server time zone for each PI ActiveView display. To see
or change the time zone in use, right-click the display and choose Time Zone, then choose
either Client or Server. The current selection is shown with a check mark.
If you choose Client time, all the times displayed are in your client machine's time zone. If
you select Server time, all times appear with respect to the time zone of each PI server from
which the tag data is retrieved.
Any times that are input by the user (such as in changing the time range) are interpreted in the
selected time zone.

The PI ActiveView Toolbar


To display a toolbar, right-click the display and choose Tool Bar.

18

Interact with the PI Display Document

The toolbar options are:


Tool

Description
Time Range scroll bar. To adjust the time range, select a
dynamic symbol. (To select multiple symbols, hold down the
Shift key. To change all the symbols in a display, click in an
unused area of the display.) Move the slider or click the
arrow buttons to change the time range being displayed.
Return to the configured time range of a selected symbol. If
no symbols are selected, every symbol in the display returns
to its original time range.
Displays the Layers (page 8) dialog.

Indicates the presence and nature of status information. The


appearance of the Status button indicates a display's current
state:
Stat
e

Description
No errors
A dynamic symbol in the display contains a
warning
A symbol is reporting bad data or shutdown status
A symbol shows questionable data
A symbol shows annotated data
A symbol shows substituted data

Click this button to view the Status Report (page 10) dialog.
Displays the PI ActiveView help
Displays the About PI ActiveView dialog, which includes the
PI ActiveView executable version number and ActiveX
control information.

To hide the toolbar, right-click the display (not the toolbar) and choose Tool Bar.

Trend Interactions
Trend Zoom 2x In or Out

Click the Zoom In or Out button at the bottom of a trend to reduce or expand the time range
of that trend by a factor of 2. In other words, if your time range is 8 hours, Trend Zoom 2x

0BPI ActiveView User Guide

19

For End Users: Viewing PI Data with PI ActiveView

In divides the time range by 2 and displays the trend for a 4 hour time period. Trend Zoom
2x Out multiplies the time range by 2 and displays the trend for a 16 hour time period.
You can remove changes to the time range by clicking the Revert button

Note: If a trend is too small these buttons may not appear. Double-click a trend to
expand its size and display hidden buttons.

If there are no trend cursors, the Trend Zoom 2x command zooms in or out of the last
portion of the time period. For example, if the initial time range is 60 minutes and you select
Trend Zoom 2x In, the trend displays the last 30 minutes. Trend Zoom 2x Out displays 120
minutes adding 60 minutes to the beginning of the trend.
When a trend cursor is displayed, the command uses the trend cursor as the center of the
zoomed trend. If several cursors are used, the last one set is used as the center of the zoomed
trend. See Trend Cursor, for more information on trend cursors.
Back and Forward Trend Buttons
Click the Back and Forward buttons on the trend time scale to scroll the time forward or
backward one increment. Each click adjusts the time scale by the current time range.
For example, if a trend shows 4 hours of data, clicking the Back button shows the previous 4
hours and clicking the Forward button shows the next 4 hours.

Browser Interactions
Back and Forward Browser Buttons
Click the Back and Forward buttons to switch to the previous or next Web page.
Refresh Button
Data is refreshed automatically. You can click the Refresh button on the Internet Explorer
toolbar to download a new HTML Web page, but it does not obtain either new data or a new
PI Display Document. PI Display Documents are stored in your cache until they expire.

20

Chapter 3

For Developers: PI ActiveView Administration


Flow of Information
When you open a Web page with PI ActiveView content, the flow of information occurs as
follows:
1. Open Internet Explorer and browse to an Internet or intranet address (URL) for a stored
HTML Web page. The Web page downloads from the Web server unless it is already
cached on your PC. The PC's Internet settings determine how long an existing page is
stored before it is discarded.
2. The Web page instructs the browser to create an instance of the PI ActiveView Control
(pbdctrl.ocx) on your PC.
3. The Web page sets the DisplayURL property of the PI ActiveView Control. This
property tells where the PI Display Document (.pdi) is stored. The Control downloads
the display (.pdi), which may be stored separately from the HTML page. The Control
then opens acview.exe. See also Expiration of Displays.

4. Acview.exe connects to the PI Server through the PI-SDK and retrieves actual data for
the display. You can see the data on the display within the HTML page.

0BPI ActiveView User Guide

21

For Developers: PI ActiveView Administration

PI ActiveView Executable
The PI ActiveView executable, acview.exe, displays data in the Display file. If you open
additional PI Display documents, the same instance of acview.exe continues to be used as
the ActiveX (OLE) server; it is not necessary to log in to the PI Server again.
To improve performance, acview.exe caches the five most recently viewed displays on
your PC. To maintain the cache of recently viewed displays as well as to preserve the
necessary PI Server connections, acview.exe continues to run, by default, for five minutes
after the last instance of pbdctrl.ocx is closed.
To maintain the server connection and prevent repeated logins, the acview.exe process
runs for the length of the timeout settingafter the last instance of the PI ActiveView Control is
destroyed. For example, if you navigate from one Web page to another and both use the PI
ActiveView control, acview.exe continues to run. The default timeout period is five
minutes.
In order to operate, acview.exe requires several supporting .dlls, ADO core
components, and VBA core components.

acview.exe Timeout
You can change the acview.exe timeout duration by resetting the registry key value:
HKEY_CLASSES_ROOT\CLSID\{576EFBE0-77F3-11D2-A05B00105A07D444}\TimeOut

Where TimeOut is the number of seconds after which acview.exe stops running after all
the open instances of the control are closed.
The timer only fires every minute, so do not set this value below 60 seconds.

22

PI ActiveView Control

PI ActiveView Control
The PI ActiveView Control, pbdctrl.ocx, is an ActiveX control. It enables PI Display
Documents to be viewed inside ActiveX containers, including Web browsers. The PI
ActiveView Control relies on an ActiveX server for much of its functionality. The PI
ActiveView executable, acview.exe, provides this support. The control is marked Safe for
Initialization.
The control is embedded in Web pages using the OBJECT tag in an HTML document.
The PI ActiveView Control provides a read-write property (DisplayURL) that points to a PI
Display Document (.pdi file) for viewing. The control provides a read-only property
(Display) that permits access to the Display Object's automation interface so that you can
manipulate the display from browser scripts. For details, see Automation in the online help.

Expiration of Displays
There are two kinds of caching of the PDI files.

Both HTML and PDI displays are cached when downloaded from a website to the local
machine. This is managed in part by Internet Explorer and the files are stored as
temporary internet files, also called browser cache. This type of file expires exactly 24
hours from the time it is loaded.

PI ActiveView caches the last 5 displays within its memory. Once a display is
downloaded, the PI ActiveView Control uses it without further downloading, unless the
display has expired. This allows for fast loading of the display if you switch to a different
display and then switch back. These files drop off the last five list as other files are used.

Data updates to cached files occur dynamically through the PI System. It is not necessary to
refresh the display to receive data updates.
You must reload a display to receive content updates. For example, you will not see a new
symbol that is added to a display that is already in your cache until you clear the cache so that
ActiveView can reload it the next time you view the display.
To remove a file from the cache in Internet Explorer:
1. ClickTools > Internet Options > General tab > Temporary Internet Files.
2. Click Delete Files.
3. Click OK.
You can change the default for expiration of displays within PI ActiveView by setting the
PDI time (PDITTL)to a live value. You must be using the HTTP protocol when you set the
DisplayURL property of the control. The new setting applies to displays that are added to the
cache after the setting is changed.
1. Open the Registry Editor.
2. Navigate to the CurrentVersion key:
HKEY_LOCAL_MACHINE\Software\PISystem\PIActiveView\CurrentVersion
0BPI ActiveView User Guide

23

For Developers: PI ActiveView Administration

3. Right-click in the right-hand pane and select New/String Value.


4. Enter PDITTL as the name of the value.
5. Right-click PDITTL, select Modify, and enter the value in seconds.
6. Click OK.
This image shows an expiration value of 600 seconds.

PI ActiveView Setup
The Developer's Role
In PI ActiveView, the developer's role is to provide an environment for the end user to view
real-time data from the PI Server and other data.
In providing the software to end users, the developer must:

Make sure PI ActiveView is installed on end users' machines

Provide PI Server information to end users

Customize PI ActiveView settings (page 30) (optional)

Install any custom components used in your displays that are not installed by PI
ActiveView. For example, if you purchased a third-party chart to view data within a
display, you must distribute this chart to all PI ActiveView machines so that users can
view the chart in PI ActiveView.

You can create an environment using Web pages, Excel spreadsheets, or any other ActiveX
container. This documentation focuses primarily on the Web environment.

24

Provide PI Display Documents (page 26)

Create Web pages (page 32)

Use the Export utility (page 27)

Support environments other than the Web (page 36)

ActiveX Controls and PI ProcessBook Add-ins

Developer's Kit
Use the Developer's Installation (page 44) method to install the Developer's Kit.
Development tools are installed in the \pipc\acview\webdev directory.
The Developer's Kit helps you incorporate PI ActiveView into new or existing Web pages. It
includes:

sample.htm: a sample HTML page

export.pdi: an export utility for converting existing ProcessBooks (PIW files) to PI


Display Documents with web pages

PIAPIConnections.exe: a tool for configuring PI Servers

Security
Internet Explorer security settings can determine whether users can view PI Display
Documents. To view these settings, choose Tools > Internet Options > Security.
For HTML pages distributed through a corporate Intranet, you may want to use a different
security zone with different settings than for external sites.
The security levels that are available for Internet Explorer are:
Setting

Response

High

Does not download or run ActiveX Controls, either signed or unsigned. PI


ActiveView does not run.

Medium

The user is prompted to download digitally signed components. Unsigned


components are not allowed to download. PI ActiveView does not run if unsigned
components are required.

Mediumlow

The user is prompted to download digitally signed ActiveX controls and plugins.
Unsigned components are not allowed to download. PI ActiveView does not run if
unsigned components are required.

Low

Signed components are downloaded without any user interaction. The user is
prompted to download unsigned components.

Custom

Allows you to configure every security setting, rather than groups of settings. For
users who define custom security levels, we recommend that you set Run
ActiveX controls and plug-ins and Script ActiveX controls marked as safe
for scripting to Enable.

DEP Security
Data Execution Prevention (DEP) is a setting in newer operating systems, such as Vista, that
prevents malicious code attacks. PI ActiveView works correctly when this setting is enabled.

ActiveX Controls and PI ProcessBook Add-ins


Third party add-ins or ActiveX controls can provide additional functionality and visual
symbols in PI ProcessBook.
0BPI ActiveView User Guide

25

For Developers: PI ActiveView Administration

To use these add-ins with PI ActiveView, review the information in the OSIsoft Technical
Support article, Developing PI ProcessBook Add-ins that are compatible with PI ActiveView
(http://techsupport.osisoft.com/support+solution/8/kb00257.htm) (KB Article #KB00257). PI
ProcessBook Add-ins that attempt to open a docking window or a toolbar fail in PI
ActiveView. This article provides details about the limitations.
If you have a 3rd party ActiveX control you want to use, you must distribute it to all your PI
ActiveView users, just as you would to any PI ProcessBook users. Consult the documentation
that came with the control to learn how best to deploy it throughout your organization.
Close PI ActiveView and verify in Task Manager that acview.exe is not running before you
install and register an add-in.

Create PI Display Documents


You can create PI Display Documents using PI ProcessBook. You can also convert them
from existing displays within ProcessBooks (PIW files) used in your facility. PI Display
Documents are saved as individual files with a .pdi extension.
In designing PI Display Documents either within a ProcessBook or as independent displays,
consider the following content guidelines.

PI BatchView Symbols and PI SQC Chart


You can include PI BatchView symbols (trends, Gantt charts, results tables, and runtime
searches) and PI SQC charts in a display if you have these ProcessBook symbols installed in
PI ProcessBook when the display is created. PI BatchView and PI SQC are both installed
with PI ActiveView for viewing displays with those symbols.
PI BatchView licenses are required for developers using PI ProcessBook but not for PI
ActiveView users.

VBA Programming
PI Display Documents may include additional functionality through VBA scripting. The
Save, Save As, and Print Preview Methods of the Display object may not be used in VBA
script.

Size the PI ActiveView Control and the PI Display Document


PI ActiveView does not permit scrolling through a PI Display Document. For best results,
design the display to fill a maximum of one screen.
The aspect ratio of the PI Display Document is maintained when the PI ActiveView Control
displays it. That is, the entire PI Display Document appears, no matter how small the space
provided.

26

Create PI Display Documents

For best results, develop your displays using a lower screen resolution (such as 800 x 600).
Otherwise, if a PI Display Document is created on a high resolution display and viewed on a
low resolution display, the text inside the controls may truncate.

Guidelines for Building Displays


Abide by the following practices when building a display:

If you know the size of the PI ActiveView control ahead of time, design the display to
keep scaling to a minimum. To accomplish this, restore the display window in PI
ProcessBook and then size the window to match the size of the PI ActiveView control's
window. Very large displays that are viewed in small PI ActiveView controls usually do
not show as well as smaller displays.

You can host more than one control on a page. Consider dividing dense content into a set
of displays.

For a display to scale well, keep each of the elements within the display scalable. In
particular, use TrueType fonts for PIValues, PIButtons, PIText, and any ActiveX
controls, because they scale well.

When working with ActiveX controls, text elements on those controls may not scale
exactly. Allow extra space for disproportionately scaled text by sizing controls to give
room for text to grow beyond the bounds of the original design. For example, make a
command button larger and use a shorter caption string instead of sizing the button to
match the caption's size.

Select fonts for the PI Display Document that are likely to be available on each user's PC.
TrueType fonts are preferred because of their scalability. Your organization may have
standards for font use.

Any embedded ActiveX controls within a PI Display Document must be installed


separately on every user's PC.
Embedded ActiveX controls, such as drop-down lists, usually do not resize well when the
PI Display Document resizes to fit the PI ActiveView Control.

If you include ADO data through PI Data Sets in the PI Display Document, ensure that
the ODBC data source is configured on each user's PC. If you use custom data sets from
a PI ProcessBook add-in, that add-in must also be installed on the user's PC.

Export Displays from PI ProcessBook


PI ActiveView recognizes PI Display Documents (.pdi files) but not displays within
ProcessBooks (.piw files). There are several ways to convert existing displays in
ProcessBooks, either individually or a whole book at a time, to PI Display Documents.
To convert an individual display within a ProcessBook:
1. Open the PI ProcessBook application, the ProcessBook you wish to export, and the
display you wish to export.
2. Click File > Save As. The Save As dialog appears.
0BPI ActiveView User Guide

27

For Developers: PI ActiveView Administration

3. Navigate to the folder where you want to save your display.


4. Enter a filename in the File name box.
5. In the Save as type box, choose Display Files (.pdi).
6. Click Save.
To convert all of the displays in an existing ProcessBook and store them in a single directory,
use the export.pdi file in PI ProcessBook. This utility also creates Web pages referencing
the resulting PDI files, although you are not required to use the pages.
1. In PI ProcessBook, open the ProcessBook you want to export.
2. Open export.pdi (located in the acview\webdev directory).
3. In the Export Path box, enter the destination folder path. You can export the results
directly to a web server.
4. Click OK. The Export Status dialog opens so you can follow the export progress. Each
of the displays opens and the connections to the PI Server are verified. You may need to
log in during the process. If any button links in the display fail, a message appears in the
dialog box.
5. Scroll down as the messages appear until you see "Export Successful."
6. If you want to save a log file, click Save Log As and enter a path and filename for the
log file.
7. Click Close to exit the Export Status dialog.
8. Close the export.pdi window.
9. Close PI ProcessBook.
10. Browse to the destination folder and open pbhome.htm to view the displays.
How the Export Utility Works
The export utility, export.pdi, allows you to specify a ProcessBook to convert into PI
Display Documents (.pdi files) and builds Web pages for viewing the displays.
Once you identify a ProcessBook for conversion and an output directory, export.pdi
opens each display in the ProcessBook, verifies PI Server connections, and then saves each
display as a PI Display Document. It creates the following files:

Pbhome.htm: Users point to this page with their browsers

Pbmenu.htm: Menu of available displays shown on pbhome.htm

Pbdsply.htm: Where the PI ActiveView control is instantiated and displays are shown

external_script.js: Used to activate the PI ActiveView Control in the Web page

Next, export.pdi connects all the existing links in the displays and puts the icon,
disp.bmp, in the destination directory. Links between displays within the original

28

Work with Element Relative Displays

ProcessBook continue to work; other links may not. For more information, see Create Links
Between Displays or Applications (page 29).
Once export.pdi is completed processing, you can move the contents of the export
directory to other locations, such as your corporate Web sites. Links continue to work
because they are relative.
The export.pdi utility is written in VBA. You can adapt the code to your specific needs.

Create Links Between Displays or Applications


Use caution when including buttons that link to other displays in your PI Display Document,
because these buttons may look for specific or relative paths in the file system and the paths
may differ among PCs.
One approach to avoid this problem is to assemble all your displays within one ProcessBook
in PI ProcessBook, link them, and then export the ProcessBook to PI ActiveView using the
export.pdi utility.
Another approach is to include buttons in the HTML page that open other displays by
resetting the DisplayURL property of the PI ActiveView Control.
When you create a link, it stores both the relative and absolute paths. In the PI ProcessBook
Define Button dialog, when the Use relative path before absolute path box is checked, the
program checks the relative path first. When this option is not checked, the program checks
the absolute path first. If you are moving files around for two kinds of users then you may
prefer the relative path (check the box). On the other hand, if the files move individually and
the directory structure might change, it is better to prefer absolute paths (uncheck the box).

When End-Users See Updates


When you change or replace a PI Display Document on your Web site, users do not see this
change until the previously downloaded PI Display Document expires in their cache. See
Expiration of Displays (page 23) for details. There is no automated way for a developer to
refresh the displays that are cached on each user's PC.

Work with Element Relative Displays


Displays can reference points that vary based on their context, as defined using element
Relative Displays. In PI ActiveView, the window used to select a different element in PI
ProcessBook is not available. Use other programmatic means to change the context.

0BPI ActiveView User Guide

29

For Developers: PI ActiveView Administration

PI ActiveView Configuration
The acview.ini file contains configuration and preference settings for PI ActiveView
(similar to the procbook.ini used for PI ProcessBook, and identical in format). This file
resides in the pipc\Dat directory. The significant keywords are:

30

Keyword

Section(s)

Description

ToolbarVisibility

Startup

Specifies whether the toolbar is visible. When set to 1, the


toolbar is visible, when set to 0 (zero), it is hidden. When
a user turns the toolbar on or off, this setting updates
automatically.

Show Value
Attributes

Startup

Specifies whether value attribute flag icons appear. When


set to 1, (the default) value attributes appear. When set to
0, value attribute flags do not appear. Note that this
keyword contains spaces.

ConnectUsingAPI

Startup

This option is useful if you have VBA code or


ProcessBook add-ins that use the PI API to retrieve data
from the PI server. When set to 0 (the default), PI
ActiveView makes connections to servers using only PISDK. When set to 1, PI ActiveView makes connections to
each server using both the PI-SDK and PI API.

UpdateTimeRange

Trend
Definition,
XYPlot
Definition

The maximum time range, in seconds, under which a


trend or XY plot symbol updates. The default value is
604800 seconds (7 days). If the time range is greater than
this value, the symbol does not refresh automatically even
when the end time is "*". This value is different from the
update rate (Timer), which is the frequency with which
new data from the PI Server is added to the display (by
default, every 5 seconds).

Timer

Data
Manager

Sets the poll timer, in milliseconds, for PI ActiveView to


update the display with any data updates and then
updates the display. These updates include event pipe
data from the PI Server and any new data source requeries. The maximum value is 60,000; the default is
5000.

Collective Name

Collective
Preference

Overrides the default PI ActiveView setting for connecting


to the named PI Server collective.
Any specifies that PI ActiveView can connect to any PI
Server in the collective. This is the default.
PreferPrimary specifies that PI ActiveView can connect
to any PI Server in the collective but tries to connect to
the primary PI Server in the collective. In addition, if a
secondary server is connected but the primary server
becomes available, PI ActiveView reverts to the primary
server.
RequirePrimary specifies that PI ActiveView only
connects to the primary server in the collective.

PI ActiveView Configuration

Keyword

Section(s)

Description

PB2TagResolution

Data
Manager

Specifies how tags are resolved.


When set to 0, the default value, PI ActiveView uses the
saved Point ID over the saved tag name. Use
PB2TagResolution = 0, when renaming PI tags to
resolve the tags using the Point ID.
When set to 1, PI ActiveView uses the saved tag name
over the Point ID. use PB2TagResolution = 1, when
you want to use the same tag but the tag has been
moved from one PI Server (R&D) to another PI Server
(Production)

The values in the following example are not necessarily the default values.
[Startup]
ToolbarVisibility = 0
Show Value Attributes = 1
ConnectUsingAPI = 0
[Trend Definition]
MarkerWarning = 1
UpdateTimeRange = 604800
[XYPlot Definition]
UpdateTimeRange = 604800
[Data Manager]
TIMER = 5000

Migrate Displays to Another PI Server


When you want to use an existing tag with a different PI Server, PI ActiveView attempts to
locate the correct tags. Beginning with PI SDK 1.3.6, when you use a ProcessBook symbol
with a PI Server other than the one for which it was created, the PI Server is added
automatically if it is discoverable on the network.
If the PI Server is not discoverable, then PI ActiveView prompts you to select a new PI
Server. Once the new PI Server is selected, PI ActiveView searches the database for a
matching tag ID.

If a match is found, PI ActiveView retrieves the tag name associated with the tag ID and
compares the tag name with the saved tag name.

If the tag names are the same, the value is shown in the entry.

If the tag names are different, PI ActiveView searches the database for the tag ID of the
saved tag name. If a match is found, the value is shown in the entry.

If a match is not found, PI ActiveView uses the tag ID saved with the ActiveView
regardless of the different tag names.

If no tag ID or tag name is found in the database, PI ActiveView displays a message


informing you of the missing tag.

0BPI ActiveView User Guide

31

For Developers: PI ActiveView Administration

This behavior is governed by the value of PB2TagResolution, located in the


procbook.ini file's Data Manager section. PB2TagResolution can take the following values:

0[default] the Point ID is used to match a missing tag before the stored point name

1uses the tag name before checking Point ID. This mimics behavior of older version of PI
ActiveView that are based on the PI API.

Develop Web Pages


To develop a Web page with PI ActiveView content:
1. Create an HTML Web page.
2. Incorporate the PI ActiveView Control, pbdctrl.ocx, in the HTML page and set the
control's DisplayURL property to the intended location of the Display file.
Note: The Display file may be placed in a separate location from the Web page.
However, the DisplayURL property of the PI ActiveView Control,
pbdctrl.ocx, that you set in this step must point to the exact location of the
Display file. Remember, if you want to have the displays automatically expire
from the cache, the DisplayURL property must use an HTTP address.

3. Copy files as follows:

Copy the Display file into the location designated by the DisplayURL property of
pbdctrl.ocx
Put the Web page on the server

If you are unsure how to create an HTML page incorporating a control, you may adapt the
sample.htm in the webdev directory. It is a Web page with an embedded PI ActiveView
Control using VBScript. To use this file, provide the location of the .pdi file.
Alternately, you can use a software tool, such as Microsoft FrontPageTM. For details, see
Embed a Display into an HTML Page (page 33).

Display Sizing
Browser windows may vary from one user to another. To make a display resize appropriately
as the browser window size changes, set the HTML OBJECT tag's Height and Width
properties using either pixels or percentages. With pixels, the display size remains constant,
regardless of the browser window size. With percentages, the display size adjusts when a user
resizes the browser window.
Examples:
With pixels:
<object id
width
height

32

= "Pbd1"
= "382"
= "191"

Develop Web Pages

classid = "CLSID:4F26B906-2854-11D1-9597-00A0C931BFC8">

With percentages:
<object id
width
height
classid

=
=
=
=

"Pbd1"
"80%"
"50%"
"CLSID:4F26B906-2854-11D1-9597-00A0C931BFC8">

Add a Component with an .inf File


Any additional components (such as ActiveX controls) necessary to view a display can also
be downloaded automatically through the Web.
If the additional component is installed with an .inf file, you can add code similar to the
following to your HTML file before the PI ActiveView Control OBJECT tag:
<object id
= "UserControl1"
width
= 0
height
= 0
classid = "CLSID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
codebase =
"ProtocolPrefix/Location/YourINF.inf#version=x,x,x,x">
</object>

If the additional component is a stand-alone ocx that is registered on the system, you can add
code similar to the following to your HTML file before the PI ActiveView Control OBJECT
tag. The ClassID refers to the component you are installing. The version, which is optional,
also refers to the component you are installing.
<object id
= "UserControl1"
width
= 0
height
= 0
classid = "CLSID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
codebase =
"ProtocolPrefix/Location/YourOCX.ocx#version=x,x,x,x">
</object>

Embed a Display into an HTML Page


To embed a display into an HTML page using Microsoft FrontPage:
1. Create a new page using Microsoft FrontPage.
2. To insert the PI ActiveView Control, select Insert > Web Component.
3. In the Insert Web Component dialog, select Advanced Controls > ActiveX Control,
and click Next.
4. Select the PI ActiveView Control from the list and click Finish. If the PI ActiveView
Control is not visible, click Customize and select from the Customize ActiveX Control
List dialog.

0BPI ActiveView User Guide

33

For Developers: PI ActiveView Administration

5. In FrontPage, the message Display URL is empty appears. The control itself is invisible.
Right-click the message and choose ActiveX Control Properties from the menu. The
ActiveX Control Properties dialog box appears.
6. Optional: In the Server Ini page, enter the path to the .ini file for the list of PI Servers
required for the display, if the user does not have that server configured.

7. Click the Display URL tab. Enter the path to the display file.

34

Develop Web Pages

8. Click the Object Tag tab. Enter a name for this instance of the Control. (You can add
multiple instances of the Control to your page, each pointing to a different display
document.) Use this Name property to add a script to the Web page that accesses the PI
ActiveView Control, if needed.

9. Set the other values on the dialog as needed to adjust appearance attributes. To allow easy
viewing of the PI Display Document file, set Width to at least 550 and Height to at least
350 (pixels).
10. Click OK to apply the Properties.
11. In FrontPage, click Save. The .pdi file appears in the Front Page Preview window. The
HTML code window displays code similar to the following sample code:
<html>
0BPI ActiveView User Guide

35

For Developers: PI ActiveView Administration

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p>
<object classid="clsid:4F26B906-2854-11D1-9597-00A0C931BFC8"
id="Pbd1" width="100%" height="100%">
<param name="ServerIniURL" ref
value="http://MyWebServer/pi/servers.ini">
<param name="DisplayURL"
value="http://MyWebServer/pi/display.pdi">
</object>
</p>
</body>
</html>

12. Place the .htm file on your Web site.

Embed PI Displays in Other Containers


In addition to HTML pages, you can use the PI ActiveView Control in other containers
capable of supporting ActiveX controls, such as Microsoft Excel, Visual Basic or VBA
forms. The Control is essentially a container for a PI Display Document object. The Control
starts the PI ActiveView application, which is used as a local server for the Display. The user
can interact with the display from the Control's window.
This means, for example, that you can view a dynamic display of PI data inside an Excel
spreadsheet. After you load Excel and PI ActiveView on a PC, the PI ActiveView Control is
available to be inserted into Excel. For details, see Embed a Display in a Spreadsheet (page
36); you would use similar procedures to embed a PI Display Document in other containers.

Embed a Display in a Spreadsheet


To create and embed a PI Display Document in Microsoft Excel:
1. Create a PI Display Document (page 26).
2. Open a Microsoft Excel spreadsheet, right-click on the Toolbars, and choose Control
Toolbox.
3. In the Control toolbox, choose

> PI-ActiveView Control.

4. Position the PI ActiveView Control on the spreadsheet and adjust the size as appropriate.

36

Embed PI Displays in Other Containers

5. Right-click the PI ActiveView Control and choose PI ActiveView Control Object >
Properties. The PI ActiveView Control Properties dialog box appears. This field is
optional and may be left blank.
6. Click the Display URL tab.
7. Enter the path to the .pdi file that you want to view in the spreadsheet.

In VBA terminology, you are setting the ServerIniURL and DisplayURL Properties of
the Control. The DisplayURL is required.
8. Click OK.
9. In the spreadsheet, click the Design Mode button
to switch from VBA Design Mode
to Run Mode. This allows the PI ActiveView Control to load acview.exe and show
the PI Display Document file.

0BPI ActiveView User Guide

37

For Developers: PI ActiveView Administration

Once you establish a PI Display Document in a spreadsheet, you can alter the document's size
or position by clicking the Design Mode button on the VBA Toolbar or Controls Toolbox
and moving or resizing the display.

38

Appendix A

Troubleshooting
Browser Security Settings
To use PI ActiveView, users need to be able to run ActiveX controls on the HTML page.
This ability may be prohibited if the user's PC has excessively restrictive security settings.
To view security settings in Internet Explorer:
1. Choose Tools > Internet Options
2. In the Internet Options dialog, click the Security tab.
3. Click Custom Level... In the Security Settings dialog, you can set a general level, from
Low to High, or adjust the custom settings. In general:
If security settings are High, you may get a message stating that ActiveX controls are not
allowed and the PI ActiveView content on the page does not appear.
If security settings are Medium, the page and ActiveX controls appear.

Displays and Connection Failure


If the connection to your data is not successful, the display is still drawn, but data in dynamic
elements are replaced with indicators signifying that no data is available.

Trends are labeled Invalid and no information is plotted.

Values are replaced with pound signs (###) and the message Disconnected appears.

Bar graphs are drawn using hash marks (//////).

Multi-State symbols show the configured color for bad data.

If a server has been disconnected, and/or cannot be reached, the Select New Node dialog
appears.

0BPI ActiveView User Guide

39

Troubleshooting

Click Connections to launch the PI Connection Manager dialog. From there you can
choose a new server from the drop-down list of connected servers.

Revisions to a Display Don't Appear


Data values refresh automatically. If you choose View > Refresh on the Internet Explorer
main menu, the Web page, but not the PI Display Document, refreshes. The PI Display
Document refreshes after it expires according to a timer, which defaults to 24 hours.
You can refresh the display by deleting all the temporary files in Microsoft Internet Explorer:
choose Tools > Internet Options, then in the Internet Options dialog click Delete Files.
For instructions on setting the expiration timer, see Expiration of Displays (page 23).

Using PI ActiveView and Windows Server 2003


Windows 2003 is shipped with higher security than its predecessors. Not all file types are
served to clients by IIS. By default, *.HTM files are considered safe but *.PDI files are not.
Therefore you may see error messages when running ActiveView from the client machine,
even though the NTFS permissions are the same on the HTML and the PDI files.
To fix this, add a MIME type to the IIS for the site directories from which ActiveView opens
the PDI file. MIME types can be defined globally for IIS, and additional MIME types can be
defined at the Web site, Web site directory, and Web site virtual directory level.
To add .PDI files as "ok to serve:"
1. In IIS Manager, right-click on the level of hierarchy for which to change the setting and
select Properties.
2. Go to the tab HTTP Headers and click the MIME Types button.
3. Select New and enter the following information
for Extension: .PDI
for MIME type: application/octet-stream

4. You should now see the .PDI under the Registered MIME Types list.

40

Using PI ActiveView and Windows Server 2003

5. Click OK.
6. Stop and restart your IIS service for the changes to take effect.

0BPI ActiveView User Guide

41

Appendix B

Installation
For information on deploying PI ActiveView using SMS or other automated methods, see the
following OSIsoft Technical Support articles.

KB Article # 3136OSI8 Using Active Directory Policies


(http://techsupport.osisoft.com/support+solution/3/649f07944d374ca78b7fa3aa377a2b36.
htm)

KB Article # 3044OSI8 Silent Installation of PI ProcessBook


(http://techsupport.osisoft.com/support+solution/6/e4c59394bced40769eadbcfd6ac18878.
htm); most of this article applies to PI ActiveView as well.

System Requirements
PI ActiveView is distributed as a complete package for a developer to use in preparing Web
pages with content from the PI Server. The runtime version for users is derived from the
complete package and may be installed either by automated distribution, or by the use of
setup.exe. See the KB articles (page 43).
For Users

Windows XP, Windows Vista, or newer operating systems

Microsoft Internet Explorer 5.5 with Service Pack 2, or higher

A software license for each user

Administrator privileges on the PC are required to install PI ActiveView, regardless of


the installation method

For Developers

A version of PI ProcessBook that matches the version of PI ActiveView (if they are to be
installed on the same machine). If you need to use a different version of PI ProcessBook,
install it on a separate machine.

PI BatchView is necessary to build displays with BatchView symbols.

Tools for creating Web pages

Windows XP, Windows Vista, or newer operating systems

A minimum of 175 MB of disk space

Microsoft Internet Explorer 5.5 with Service Pack 2, or higher

0BPI ActiveView User Guide

43

Installation

System Prerequisites
Installation of an OSIsoft product relies on the presence of operating system components such
as the Microsoft .NET Framework. OSIsoft product setup kits check for prerequisite software
during installation. If not found, the installation will stop and you will be prompted to install
prerequisites.
To determine which MS Operating System prerequisites you need, see the OSIsoft Tech
Support Web site Prerequisite Kits pages
(http://techsupport.osisoft.com/Products/Prerequisite+Kits/Prerequisite+Kits+Overview.htm).

Install PI ActiveView
You can install PI ActiveView in the following ways:

Developer installation through setup.exe

User installation by running a modified version of setup.ini

You can install PI ActiveView without removing previous versions. However, note that if
you have accessed the software within the previous five minutes, the acview.exe process
may still be running. You must stop it using the Task Manager before you start installation.

Developer Installation
You can install and run PI ActiveView and PI ProcessBook on the same PC if they are the
same version number. When both applications are present, acview.exe, rather than
ProcBook.exe, becomes the automation server for the PI ActiveView control. The PI
BatchView symbol is installed with the PI ActiveView installation, but you must install the
PI ProcessBook add-in separately to create or modify those symbols in PI ProcessBook.
The only difference between a developer installation and a user installation is that the
developer installation installs the directory pipc\acview\webdev.
Use the default installation of PI ActiveView provided by OSIsoft to develop PI ActiveView
Web sites.
Run setup.exe. The setup asks for a target directory. The default target directory is
C:\Program Files\pipc, the default location for PI client products. If you have other
PI software installed, the setup defaults to the location of the existing pipc directory.
If there is no PI product already installed in the target directory, setup asks for PI Server
connection information.
Depending on the target operating system and existing software, setup may install several
required system components. Or, you may be directed to run the Prerequisites setup kit. You
may be required to reboot your system one or more times during the setup process.
The installation process creates diagnostic files that are useful for troubleshooting.

44

Uninstall PI ActiveView

User Installation
Users can configure PI ActiveView manually using setup.exe if they have administrative
privileges on their computer. For details on security options and other planning decisions for
user installation, see PI ActiveView Setup (page 24).
Prepare PI ActiveView for User Installation
1. Copy the PI ActiveView files to a separate, writeable location that you can use for user
installations.
2. Open setup.ini in a text editor such as Notepad.
3. Find the line with activeview.mst and make sure the end of the line contains:
DEVELOPER= N

4. Save and close setup.ini.


Setup omits the Developer's Kit during installation.
Installation on a User's PC
Log on to a user's PC with an account that has administrative privileges. Run setup.exe.
Upon completing the setup, the installation log files, ActiveViewmaster.log and,
SetupActiveView.log are installed in the directory pipc\dat.

Uninstall PI ActiveView
Use the Add/Remove Programs utility on the Windows Control Panel to remove PI
ActiveView. Prerequisite components, such as VBA and the PI SDK are not removed.

0BPI ActiveView User Guide

45

Appendix C

Glossary
ActiveData Objects (ADO)
ActiveX implementation of ODBC for the Internet.

ActiveX Control
A Microsoft ActiveX component with a user interface. An ActiveX control has a filename
ending in .ocx.

Active Server Page (ASP)


Scripted HTML documents supported by Microsoft Internet Information Server.

Browser
Software application used to display Internet material on a PC.

Corporate Intranet
A collection of networks restricted to a limited group of users, such as one corporation's
employees.

Digital Signature
A means of labeling Web site files with the name of the company responsible for developing
them. Some companies do not permit downloading unsigned files.

0BPI ActiveView User Guide

47

Glossary

Dynamic Symbol
A symbolsuch as a trend, XY plot, value, or barthat displays a data value that updates
with time.

PI Display Document (.pdi file)


File that determines what PI data is viewed and the format in which it is presented.

PI System Administrator
Person or team responsible for configuring and maintaining the PI Server.

PI Server
Repository of data for monitoring and analysis of control data, lab data, specifications, and so
on.

Trace
A single line on a trend. When a trace is continuous, a line is drawn from measurement to
measurement. When a trace is discrete, the value is propagated forward until a new value is
recorded in the database. This results in a horizontal line and a vertical line for the tag
(staircase trace). Digital points in the PI Server are discrete type measurements, producing
staircase traces. For digital points, the offset from the starting digital state code is plotted.
When the value is shown in a trend cursor or legend, the text translation is displayed (for
example, ON or OFF). Certain other attributes for points in the PI Server also produce
staircase traces.

VBA
Visual Basic for Applications.

Web server
Computer where a Web site is located. Its software accepts browser requests for data or
documents.

48

Appendix D

Technical Support and Resources


You can read complete information about technical support options, and access all of the
following resources at the OSIsoft Technical Support Web site:
http://techsupport.osisoft.com (http://techsupport.osisoft.com)

Before You Call or Write for Help


When you contact OSIsoft Technical Support, please provide:

Product name, version, and/or build numbers

Computer platform (CPU type, operating system, and version number)

The time that the difficulty started

The message log(s) at that time

Help Desk and Telephone Support


You can contact OSIsoft Technical Support 24 hours a day. Use the numbers in the table
below to find the most appropriate number for your area. Dialing any of these numbers will
route your call into our global support queue to be answered by engineers stationed around
the world.
Office Location

Access Number

Local Language Options

San Leandro, CA, USA

1 510 297 5828

English

Philadelphia, PA, USA

1 215 606 0705

English

Johnson City, TN, USA

1 423 610 3800

English

Montreal, QC, Canada

1 514 493 0663

English, French

So Paulo, Brazil

55 11 3053 5040

English, Portuguese

Altenstadt, Germany

49 6047 9890

English, German

Manama, Bahrain

973 1758 4429

English, Arabic

Singapore

65 6391 1811
86 021 2327 8686

English, Mandarin
Mandarin

Perth, WA, Australia

61 8 9282 9220

English

Support may be provided in languages other than English in certain centers (listed above)
based on availability of attendants. If you select a local language option, we will make best
efforts to connect you with an available Technical Support Engineer (TSE) with that language

0BPI ActiveView User Guide

49

Technical Support and Resources

skill. If no local language TSE is available to assist you, you will be routed to the first
available attendant.
If all available TSEs are busy assisting other customers when you call, you will be prompted
to remain on the line to wait for the next available TSE or else leave a voicemail message. If
you choose to leave a message, you will not lose your place in the queue. Your voicemail
will be treated as a regular phone call and will be directed to the first TSE who
becomes available.
If you are calling about an ongoing case, be sure to reference your case number when you call
so we can connect you to the engineer currently assigned to your case. If that engineer is not
available, another engineer will attempt to assist you.

Search Support
From the OSIsoft Technical Support Web site, click Search Support.
Quickly and easily search the OSIsoft Technical Support Web site's Support Solutions,
Documentation, and Support Bulletins using the advanced MS SharePoint search engine.

Email-based Technical Support


techsupport@osisoft.com
When contacting OSIsoft Technical Support by email, it is helpful to send the following
information:

Description of issue: Short description of issue, symptoms, informational or error


messages, history of issue

Message logs: See documentation for your PI System for information on obtaining
message logs pertinent to the situation.

Online Technical Support


From the OSIsoft Technical Support Web site, click Contact us > My Support > My Calls.
Using OSIsoft's Online Technical Support, you can:

Enter a new call directly into OSIsoft's database (monitored 24 hours a day)

View or edit existing OSIsoft calls that you entered

View any of the calls entered by your organization or site, if enabled

See your licensed software and dates of your Service Reliance Program agreements

Remote Access
From the OSIsoft Technical Support Web site, click Contact Us > Remote Support
Options.

50

Web server

OSIsoft Support Engineers may remotely access your server in order to provide hands-on
troubleshooting and assistance. See the Remote Access page for details on the various
methods you can use.

On-site service
From the OSIsoft Technical Support Web site, click Contact Us > On-site Field Service
Visit.
OSIsoft provides on-site service for a fee. Visit our On-site Field Service Visit page for more
information.

Knowledge Center
From the OSIsoft Technical Support Web site, click Knowledge Center.
The Knowledge Center provides a searchable library of documentation and technical data, as
well as a special collection of resources for system managers. For these options, click
Knowledge Center on the Technical Support Web site.

The Search feature allows you to search Support Solutions, Bulletins, Support Pages,
Known Issues, Enhancements, and Documentation (including user manuals, release
notes, and white papers).

System Manager Resources include tools and instructions that help you manage: Archive
sizing, backup scripts, daily health checks, daylight savings time configuration, PI Server
security, PI System sizing and configuration, PI trusts for interface nodes, and more.

Upgrades
From the OSIsoft Technical Support Web site, click Contact Us > Obtaining Upgrades.
You are eligible to download or order any available version of a product for which you have
an active Service Reliance Program (SRP), formerly known as Tech Support Agreement
(TSA). To verify or change your SRP status, contact your Sales Representative or Technical
Support (http://techsupport.osisoft.com/) for assistance.

0BPI ActiveView User Guide

51

Index
A
ActiveData objects 47
ActiveX control 26, 36, 47
accessing pages with 39
distributing additional 26
Properties dialog 33
acview.exe 22
acview.ini 30
administrative privileges 44
ADO 47
ASP 47
automation interface 23

B
Back button 20
browser 47
security 39
window size 32

C
cache 22
components, distributing 33
configuration 30
corporate intranet 47

independent display files 26


linking to 29
sizing 32
user interaction with 21
DisplayURL property 21, 23, 32, 33
download
browser security 39
dynamic elements 4

E
embedding
display in a spreadsheet 36
display in other containers 36
display into an HTML page 33
Excel spreadsheet 36
export.pdi 27, 28

F
firewall 44
Forward button 20
FrontPage 32, 33

H
HTML page
developing 32

data 5
dynamic updating of 5
Internet Explorer Refresh button 5
scan rate 5
set refresh rate 24
updates 5
data set
dynamic updating of 5
developer responsibilities 24
developer's kit 25
digital signature 47
Display property 23
displays
altering 29
creating 26, 27
embedding 33, 36
expiration of 23
exporting 27

INF file 33
installation 43, 44
developer 44
requirements 43
users 45
Internet Explorer
security 25, 39
intranet 1, 25, 47

0BPI ActiveView User Guide

L
layers, viewing 7
license requirements 26

M
Microsoft Excel 36
Microsoft FrontPage 32
Module Relative Displays 29

53

Index

O
OBJECT tag 23, 32, 33
ODBC 22

P
password 25
pbdctrl.ocx 32
pdi file 26, 27, 48
PI ActiveView 1
administration 21
components 2
configuration 30
developers 21
end users 4
executable 22
flow of information 21
installation 43, 44
previous versions 44
setup 24
toolbar 18
uninstalling 45
PI ActiveView Control 23, 32, 33
sizing 26
PI BatchView 26
PI data 21
connection to 24, 44
PI Display Documents 48
altering 29
contents 4
creating 26
embedding 33, 36
exporting 27, 28
interacting with 5
sizing 26
PI ProcessBook 1, 3
add-ins 26
PI Server 4, 21, 48
security 25
static content 4
PI SQC 26
PI system administration 24, 48
pilogin.ini 44
procbook.ini 5

R
Refresh 40
button 5, 20
data 20
displays 20, 23

54

rate for data 24


resizing displays 32

S
sample.htm 32
scan rate 5
security 1, 25, 44
Web sites 25, 39
setup.exe 44
status report, viewing 9

T
technical support 49
time range
changing 16
formats 14
future 17
viewing 13
time zones 13, 18
toolbar 18
trace types 48
trends 4
cursors 5
expanding 5
future time range and 17
troubleshooting 39

U
uninstalling PI ActiveView 45

V
VBA 48
core components 22
programming restrictions 26

W
Web pages, developing 32
Web server 48

You might also like