Download as pdf or txt
Download as pdf or txt
You are on page 1of 174

® B0193YJ

REV B

I/A Series®
AIM*AT Suite
AIM*DataLink, Version 2.5
User’s Guide
August 6, 1999
AIM*API, AIM*AT Suite, AIM*DataLink, AIM*Historian, Foxboro, and I/A Series are trademarks of The Foxboro
Company.
UNIX is a registered trademark of X/Open Company Limited.
Sun SPARC and Solaris are registered trademarks of Sun Microsystems, Inc.
Lotus 1-2-3 is a registered trademark of Lotus Development Corp.
Microsoft, Windows 95, Windows 98, Windows NT, Excel, FoxPro, and Access are trademarks of
Microsoft Corporation.
Oracle is a trademark of Oracle Corporation.
Novell is a trademark of Novell, Inc.

Copyright 1999 by The Foxboro Company.


All rights reserved

SOFTWARE LICENSE AND COPYRIGHT INFORMATION


Before using the Foxboro supplied software supported by this Foxboro documentation, you
should read and understand the following information concerning copyrighted software.
1. The license provisions in the Foxboro Software License for your system govern
your obligations and usage rights to the software described in this documentation.
If any portion of those license provisions is violated, The Foxboro Company will
no longer provide you with support services and assumes no further responsibili-
ties for your system or its operation.
2. All software issued by The Foxboro Company, and copies of the software that you
are specifically permitted to make, are protected in accordance with Federal copy-
right laws. It is illegal to make copies of any software media provided to you by
The Foxboro Company for any purpose other than those purposes mentioned in
the Foxboro Software License.
Contents
Figures.............................................................................................................................. ix

Tables............................................................................................................................... xi

Preface............................................................................................................................ xiii
Audience .......................................................................................................................... xiii
Conventions ..................................................................................................................... xiii
Related Documents .......................................................................................................... xiii
Revision Information ....................................................................................................... xiii
Installation ....................................................................................................................... xiv
Conventions ..................................................................................................................... xiv
Request For Comments ................................................................................................... xiv

1. Overview ..................................................................................................................... 1
Version 2.5 Features ............................................................................................................ 1
Configuration and Interfaces ............................................................................................... 2
Key Concepts ...................................................................................................................... 3
DDE .............................................................................................................................. 3
OLE Automation ........................................................................................................... 3
AIM*DataLink Scan Time ............................................................................................. 4
Data Objects and Data Sets ............................................................................................ 4
Path Aliases .................................................................................................................... 4
Open Database Connectivity (ODBC) ........................................................................... 4
Operation and Functions .................................................................................................... 4
Browsers .............................................................................................................................. 5
Transferring Files ................................................................................................................ 5

2. Getting Started............................................................................................................ 7
Introduction ........................................................................................................................ 7
Available AIM*AT Data ...................................................................................................... 7
Launching AIM*DataLink .................................................................................................. 8
Main Window .................................................................................................................... 8
Mouse Buttons .......................................................................................................... 8
Toolbar ........................................................................................................................ 10

iii
B0193YJ – Rev B Contents

General Preferences .................................................................................................. 12


Menu Bar ..................................................................................................................... 13
File Menu ................................................................................................................ 13
Edit Menu ............................................................................................................... 13
View Menu .............................................................................................................. 13
Tools Menu ............................................................................................................. 14
Window Menu ........................................................................................................ 14
Help Menu .............................................................................................................. 15
Using AIM*DataLink ....................................................................................................... 15

3. Accessing Data Objects ............................................................................................. 17


Data Object Browser ......................................................................................................... 17
Accessing Objects Using the Database Objects Tab ........................................................... 19
Selecting Objects and Defining Views .......................................................................... 21
Data Object Wizard ..................................................................................................... 22
Main Window ......................................................................................................... 25
AIM*Historian Real-Time Filter .............................................................................. 26
Selecting Stations ..................................................................................................... 28
Selecting Compounds and Blocks ............................................................................ 31
Selecting Parameters ................................................................................................ 33
Filtering by I/A Series Descriptions .......................................................................... 34
Results ..................................................................................................................... 36
Options Dialog Box ................................................................................................. 38
Creating Sets ................................................................................................................ 39
Accessing Objects via AIM*API Sets ................................................................................. 40
Editing Sets .................................................................................................................. 44
Altering View Formats .................................................................................................. 45
Editing Views .................................................................................................................... 47

4. Accessing the Historian ............................................................................................. 49


Historian Browser ............................................................................................................. 49
Settings ............................................................................................................................. 50
Historian Browser Screen .................................................................................................. 51
Historian View .................................................................................................................. 55

5. Accessing Reports...................................................................................................... 57
Report Browser ................................................................................................................. 57
Settings Tab ...................................................................................................................... 58
Report Browser Tab .......................................................................................................... 59

iv
Contents B0193YJ – Rev B

6. Object Views ............................................................................................................. 61


Specifying and Accessing Views ......................................................................................... 61
Data Object Views ....................................................................................................... 62
Historian Views ............................................................................................................ 64
Report Views ................................................................................................................ 66
Saving Views ..................................................................................................................... 66
Printing Views .................................................................................................................. 67
Linking Objects to PC Applications .................................................................................. 67
Copying Historian Text ............................................................................................... 67
DDE Linking of Data Objects ...................................................................................... 68
Manually Connecting Data Objects ......................................................................... 69
Closing Views ................................................................................................................... 71

7. Spreadsheet Access to Historian Data........................................................................ 73


Preparing the Worksheet ................................................................................................... 73
Using the Wizard .............................................................................................................. 74
Selecting a Data Object ..................................................................................................... 77
Specifying Historian Parameters ........................................................................................ 78
Building and Modifying the Worksheet ............................................................................ 80

8. OLE Functionality .................................................................................................... 83


Introduction ...................................................................................................................... 83
Object Linking and Embedding ................................................................................... 83
OLE Automation ......................................................................................................... 84
Linking and Embedding AIM*DataLink Objects .............................................................. 84
Insert Object Function ................................................................................................. 84
Embedding Objects ...................................................................................................... 85
Embedding Data Object Documents ....................................................................... 85
Embedding Report Documents ............................................................................... 86
Embedding AIM*AT Server Files ............................................................................ 87
Linking Objects ............................................................................................................ 88
Linking Data Object View Files ............................................................................... 89
Linking Report View Files ....................................................................................... 89
AIM*DataLink OLE Automation Interface ...................................................................... 89
OLE Automation ......................................................................................................... 89
AIM*DataLink OLE Objects ....................................................................................... 90
VB Call Syntax for the AIMSets Object ........................................................................ 91
VB Call Syntax for AIMSets Object Properties and Methods ................................... 91
VB Call Syntax for the AIMFiles Object ..................................................................... 103
VB Call Syntax for the AIMFiles Method .............................................................. 103
Excel Spreadsheet Example ......................................................................................... 105

v
B0193YJ – Rev B Contents

File Transfer Example ................................................................................................. 106


Real-Time Update (VB Grid Control) Example ......................................................... 108

9. Transferring Files .................................................................................................... 111


File Transfer Function .................................................................................................... 111
Settings ........................................................................................................................... 112
File Transfer .................................................................................................................... 113

10. Overview of ODBC............................................................................................... 115


Definition of ODBC ....................................................................................................... 115
Design Overview ............................................................................................................. 115
ODBC Architecture ........................................................................................................ 117
Application ................................................................................................................. 118
Driver Manager .......................................................................................................... 119
Driver ......................................................................................................................... 119
Data Source ................................................................................................................ 120
The ODBC Driver for Historian .................................................................................... 121
Data Sources ............................................................................................................... 121
Historians ................................................................................................................... 122
Data Table Types ....................................................................................................... 122
Sample Data .......................................................................................................... 122
Historian Data Linearization ...................................................................................... 123
Reduction Data ...................................................................................................... 124
Message Data ......................................................................................................... 124
MDE Data ............................................................................................................. 125
Event Data ............................................................................................................. 125
Connecting to Data Sources ....................................................................................... 125
SQL Statements .............................................................................................................. 126
SQL Functionality ...................................................................................................... 126
SQL Data Types ......................................................................................................... 126
SQL Statement Syntax ............................................................................................... 127
Selecting Data Tables ................................................................................................. 127
Selecting Table Columns ............................................................................................ 128
Filtering Table Results ................................................................................................ 128
Organizing Table Results ............................................................................................ 129
Grouping Data ...................................................................................................... 129
Sorting Data .......................................................................................................... 129
Time Functions .......................................................................................................... 129
Aggregate Functions ................................................................................................... 129
Writing Data Values ................................................................................................... 130
Data Parameters ......................................................................................................... 130
Reading Data .............................................................................................................. 130
Writing Data from MDE and Event Tables ............................................................... 131

vi
Contents B0193YJ – Rev B

Using SQL ...................................................................................................................... 132


Selecting Time Periods ............................................................................................... 132
Retrieving Collection Tag Lists ................................................................................... 132
Using ODBC .................................................................................................................. 132
Using ODBC with Excel 5.0/7.0 VBA ....................................................................... 132
Retrieving Historian Lists ...................................................................................... 132
Retrieving Table Data Groups ............................................................................... 133
Retrieving Collection Tag Lists .............................................................................. 133
Retrieving Data ...................................................................................................... 133
Using ODBC with DAO ........................................................................................... 134
Retrieving Table Data Groups ............................................................................... 134
Retrieving Collection Tag Lists .............................................................................. 135
Retrieving Data ...................................................................................................... 136

Appendix A. Status Advisories and Messages ............................................................... 139


AIM*AT Server Status .................................................................................................... 139
DDE Status ..................................................................................................................... 140
Status Descriptions for Data Objects ............................................................................... 140
AIM*DataLink Error Messages ....................................................................................... 144
Foxboro ODBC Driver Errors ........................................................................................ 148
Excel Access Errors .......................................................................................................... 151

Index ............................................................................................................................ 153

vii
B0193YJ – Rev B Contents

viii
Figures
AIM*DataLink Client/Server Architecture ................................................................................ 2
AIM*DataLink Icon .................................................................................................................. 8
AIM*DataLink Main Window .................................................................................................. 9
AIM*DataLink Toolbar .......................................................................................................... 10
General Preferences ................................................................................................................. 12
Data Object Browser ............................................................................................................... 18
Selecting an Object from the Tree View Window ................................................................... 20
Data Object View with Two Objects ...................................................................................... 22
Data Object Wizard ................................................................................................................ 23
Data Object Wizard Main Window ........................................................................................ 25
AIM*Historian Real-Time Filter Window .............................................................................. 26
AIM*Historian Real-Time Filter with Filter Data Field Active ................................................ 27
AIM*Historian Real-Time Filter with Two Selections ............................................................ 28
Window for Selecting Stations ................................................................................................ 29
Selected Server Stations ........................................................................................................... 30
Compounds and Blocks Sorted by Compound ....................................................................... 31
Compounds and Blocks Sorted by Block ................................................................................. 32
Filter Window for Selecting Parameters .................................................................................. 33
Description Filter Window ..................................................................................................... 34
Searching Dialog Box .............................................................................................................. 35
Data Object Wizard Results Window ..................................................................................... 36
Add Item Dialog Box .............................................................................................................. 37
View Options Dialog Box ....................................................................................................... 38
Create Set Dialog Box ............................................................................................................. 39
Servers with Defined AIM*API Sets ........................................................................................ 40
Available AIM*API Sets .......................................................................................................... 42
Accessing a AIM*API Set from the Data Object Browser ........................................................ 43
Data Object View with Five Objects ....................................................................................... 44
Editing a AIM*API Set ........................................................................................................... 45
Setting View Formats from the Data Object View Page .......................................................... 46
Historian Browser Settings Tab ............................................................................................... 51
Historian Browser Tab with Sample Data ............................................................................... 52
Historian Browser Screen with Message Data .......................................................................... 53
Historian Browser Screen with Reduction Data ...................................................................... 54
Historian Browser Screen with Manual Data .......................................................................... 55
Report Browser Settings Tab ................................................................................................... 58
Report Browser Tab ................................................................................................................ 59
Report Browser Tab with Type and Report Selected ............................................................... 60
Data Object View Specifications ............................................................................................. 62
Example of a Data Object View .............................................................................................. 63
Historian View Specifications .................................................................................................. 64
Example of a Historian View ................................................................................................... 65
Example of a Report View ....................................................................................................... 66
Right Mouse Button Copy Menu from the Data Object Browser ........................................... 68

ix
B0193YJ – Rev B Figures

Right Mouse Button Copy Menu from a Data Object View ................................................... 69
Enabling the AIM*Historian Excel Add-In ............................................................................. 74
Introduction to the AIM*Historian Wizard ............................................................................ 75
Cell Range Specification .......................................................................................................... 75
Data Object Wizard ................................................................................................................ 76
Selected View .......................................................................................................................... 77
Selected View with Expanded Data Object Tree ..................................................................... 77
Operation Selection ................................................................................................................ 78
Selecting Dates and Times from the Date Selection Screen ..................................................... 79
Changing Dates and Times ..................................................................................................... 79
Finish Step .............................................................................................................................. 80
Representative Worksheet Linked to Historian Data ............................................................... 81
Insert Object Function of a Windows Application .................................................................. 85
Embedding Data Object Documents via OLE ........................................................................ 86
Embedding Report Documents via OLE ................................................................................. 86
Accessing Server Files .............................................................................................................. 87
Linking Files via OLE ............................................................................................................. 88
Excel Spreadsheet Example of OLE Automation ................................................................... 106
File Transfer Example of OLE Automation ........................................................................... 107
Set Browser Dialog Box in VB Grid Control Example .......................................................... 109
Updating Grid in VB Grid Control Example ........................................................................ 110
File Transfer Settings Tab ..................................................................................................... 112
File Transfer Tab .................................................................................................................. 113
Traditional DBMS Access ..................................................................................................... 116
ODBC DBMS Access ........................................................................................................... 116
ODBC Components ............................................................................................................. 118
ODBC for Historian Driver .................................................................................................. 121
Data Sources ......................................................................................................................... 123
ODBC Setup ........................................................................................................................ 124
AIM*AT Server Status Screen ............................................................................................... 139
DDE Status Screen ............................................................................................................... 140

x
Tables
Toolbar Functions ................................................................................................................... 11
Variant Layout ........................................................................................................................ 98
Structure of Historian Database Tables ................................................................................. 122
Historian Message Database .................................................................................................. 125
SQL Data Types Supported .................................................................................................. 126
Data Object Status Text for I/A Series Version 4.1 and Earlier ............................................. 141
Data Object Status Text for I/A Series Version 4.2 and Later ................................................ 142
AIM*DataLink Error Messages ............................................................................................. 144
Foxboro ODBC Driver Errors .............................................................................................. 148
Excel Access Errors ................................................................................................................ 151

xi
B0193YJ – Rev B Tables

xii
Preface
The AIM*DataLink client/server software links Foxboro I/A Series and AIM*Historian serv-
ers with client PCs operating in the Microsoft Windows environment. The software provides
users with convenient, real-time access to process information for planning, analysis, and
management using PC applications.
AIM*DataLink provides a standard Windows data interface (Dynamic Data Exchange
or DDE) for compatibility with a wide range of PC applications. Once AIM*DataLink is
active, it does not require user interaction to continue providing information to desktop
applications. The user interface can also be used while the program is serving the DDE
connections.

Audience
This document is designed for AIM*DataLink users. It describes how to start AIM*DataLink
on a client PC and use AIM*DataLink features to connect AIM*AT data objects to Microsoft
Windows applications. A separate AIM*AT Suite Installation Guide (B0193YM) provides
instructions for installing, configuring, and maintaining AIM*DataLink.

Conventions
References to the Historian include the I/A Series and AIM*Historian data unless otherwise
noted.

Related Documents
Refer to the following Foxboro documents for information on related AIM*AT Suite
products:
♦ AIM*AT Suite Installation Guide (B0193YM)
♦ AIM*API User’s Guide (B0193YN)
♦ AIM*Historian User’s Guide (B0193YL).
Refer to I/A Series documentation for information on how I/A Series software presents
process information.

Revision Information
This is the second version of this document as it accompanies the release of the AIM*AT Suite
Version 2.5 by The Foxboro Company.

xiii
B0193YJ – Rev B Preface

Installation
Before using AIM*DataLink, be sure that the application has been installed properly, config-
ured to access data from the target servers, and authorized for use according to The Foxboro
Company software license.
Use the AIM*AT Suite Installation CD, as documented in AIM*AT Suite Installation Guide
(B0193YM), for all setup actions.

Conventions
In this document, the following conventions are used:
Menu items, options, and buttons that are to be selected on the screen are shown in
this type.
Instructions for making selections from the application menu bar and associated
pull-down menus use the following format:
♦ Choose File > New.
The example is shorthand for “Pull down the File menu from the application
menu bar and select the New option from the menu.”
Instructions for using the mouse assume that the mouse is configured for the right
hand, that is, the left mouse button is used for normal select and drag operations, and
the right mouse button is used for context menus and special drag operations.

Request For Comments


Please direct your comments and suggestions concerning the AIM*DataLink software and
this documentation to:
Customer Satisfaction Center B52-AA
The Foxboro Company
33 Commercial Street
Foxboro, MA 02035
Telephone (within the U.S.): 1-888-FOXBORO
(1-888-369-2676)
Telephone (outside the U.S.): 508-549-2424
Fax: 508-549-4492

xiv
1. Overview
This chapter provides an overview of AIM*DataLink concepts, major features
and operating principles.
AIM*DataLink is a desktop information management tool which allows you to access process
data through Microsoft Windows applications running on PCs networked with AIM*AT
servers. Once you have activated the program and specified the data connections, the program
does not require further interaction as process data objects are delivered to the desktop.
With AIM*DataLink you can:
♦ Interactively select AIM*AT servers as sources of data
♦ Browse through available data sources, select the data objects of interest, and
define their presentation format
♦ Transfer data and files between the AIM*AT servers environment and a target PC
♦ Display and record user-specified process data on the PC immediately upon
request or on a continuous basis.
These capabilities permit persons not involved in day-to-day interactions with a controlled
process to monitor (read) selected process data and to set (write) certain process parameters.
These capabilities can be exploited with commonly available and popular desktop applica-
tions, such as spreadsheets, database managers, graphics programs, and data analysis packages,
using Microsoft Dynamic Data Exchange (DDE), Object Linking and Embedding (OLE),
and OLE Automation.

Version 2.5 Features


AIM*DataLink, Version 2.5, features the following capabilities:
♦ Real-time, read/write access to process data in I/A Series workstation and
AIM*Historian instances
♦ Read/write access to files residing in AIM*AT file servers
♦ DDE capability within the Microsoft Windows environment
♦ OLE and OLE Automation capabilities within the Microsoft Windows
environment
♦ Real-time desktop integration of I/A Series data and AIM*Historian data commu-
nicated to networked PCs
♦ Connectability of multiple I/A Series and AIM*Historian servers to multiple
Windows clients
♦ Optimal use of AIM*AT resources through AIM*API
♦ Configurable read and write access privileges by user and by data elements
♦ Access to Sample, Reduction, Message, and MDE data from various Historians

1
B0193YJ – Rev B 1. Overview

♦ SQL query capability for the I/A Series Historian and AIM*Historian via the
Microsoft Open Database Connectivity (ODBC) standard
♦ Browser access to Process Objects Parameter (Compound:Block.Parameter) names
and descriptions, AIM*API data sets, data object values, historian configurations,
and available reports
♦ Excel spreadsheet access to Historian data
♦ Real-time data object views
♦ Multipoint Historian views
♦ Support for Microsoft Windows 95, Windows 98, and Windows NT operating
systems on multiple hardware platforms
♦ Intuitive user interface
♦ Context-sensitive online Help

Configuration and Interfaces


AIM*DataLink is a Microsoft Windows PC application program which incorporates the
AIM*API server program. AIM*DataLink establishes a client/server relationship between PCs
and one or more I/A Series Application Processors and Application Workstations (I/A Series
AP/AWs 50, 51A, 51B, 51C, 51D, 51E, and 70). The optional Ethernet port in the I/A Series
AP/AW provides the physical connection to PCs on the information network. The software
can also access AIM*Historian instances on Sun SPARC or Windows NT 4.0 servers in the
information network. No specialized hardware is required for the PCs. The AIM*DataLink
client/server architecture is shown in Figure 1-1.

I/A Series Server #1 I/A Series Server #2 AIM*Historian Server


Object Object
Manager Historian Manager Historian AIM*Historian

I/A Series AP/AW I/A Series AP/AW


AIM*API AIM*API AIM*API

Information Network

AIM*API AIM*API AIM*API

AIM* AIM* AIM*


ODBC ODBC ODBC
DataLink DataLink DataLink

User Applications User Applications User Applications


• Spreadsheet • Spreadsheet • Spreadsheet
• Database Manager • Database Manager • Database Manager
• Presentation Graphics • Presentation Graphics • Presentation Graphics

Windows Client 1 Windows Client 2 Windows Client Y

Figure 1-1. AIM*DataLink Client/Server Architecture

2
1. Overview B0193YJ – Rev B

AIM*DataLink software installed on the servers and on selected PCs establishes those PCs as
clients of the servers. The software is configured at the server to establish:
♦ Which users can use AIM*DataLink from a PC client
♦ The security privileges granted to each user
♦ Each user’s accessibility to specific AIM*AT data
AIM*DataLink PC software automatically accommodates Windows 95, Windows 98 and
Windows NT.
AIM*DataLink is implemented as an OLE 2.0 Server (Object Linking and Embedding)
application. AIM*DataLink also uses DDE, a standard Microsoft Windows mechanism
enabling Windows-based applications to exchange data. DDE permits real-time data updates
in Microsoft Windows applications based upon changes in external databases. In
AIM*DataLink, spreadsheets, database managers, and other applications running on a Win-
dows client can be updated based on changes in connected data elements in the process envi-
ronment. The software also interfaces with AIM*Historian instances connected to the process
environment.
AIM*DataLink now includes OLE Automation capabilities, which enable Windows-based
programs to access process data directly from the AIM*DataLink program.
AIM*DataLink interfaces to the following three components of the I/A Series system, which
are accessed over the network connection of AIM*API:
♦ Object Manager
♦ Historian
♦ File System

Key Concepts
DDE
AIM*DataLink uses Dynamic Data Exchange (DDE), a standard Microsoft Windows mech-
anism that enables Windows-based applications to exchange data. DDE allows real-time
updates of Microsoft Windows applications based on changes in external databases. With
AIM*DataLink, applications running on a PC client can be updated based on changes in con-
nected data objects in the AIM*AT environment and Historians.

OLE Automation
AIM*DataLink functions as an OLE Automation server. Consequently, other Windows pro-
grams can access AIM*DataLink functions programmatically to retrieve AIM*AT data and
receive real-time updates.

Key Concepts 3
B0193YJ – Rev B 1. Overview

AIM*DataLink Scan Time


The DDE software in a Windows client polls the connected data objects at a set interval. If a
value in a connected data object has changed since the previous scan, DDE updates the
appropriate applications on the Windows client. AIM*DataLink allows unique scan times for
each Windows client. In AIM*DataLink, the Windows client scan time does not affect scan-
ning cycles in the I/A Series and AIM*Historian environments. However, you should take
into account the update frequency in both environments when judging the immediacy of the
data values.

Data Objects and Data Sets


In AIM*DataLink, data objects can be parameters in I/A Series compounds and blocks,
Shared Variables and AIM*Historian points. A data object includes a name, a data value and a
status. Data objects can be process inputs or outputs, block status codes or any other connect-
able parameter.
Data sets are data objects logically grouped together for simultaneous retrieval. Data objects in
a single set can be sourced from multiple stations. The data sets can reside on different
I/A Series AP/AWs. Data sets are not required with AIM*Historian servers.

Path Aliases
A path alias is a short name for the path between the PC client and the connected data or file
object. The path alias stands in for the name of the I/A Series AP/AW or AIM*Historian
server and directory names.

Open Database Connectivity (ODBC)


PC-user access to the Historian database is an important feature of AIM*DataLink. This fea-
ture has been implemented using ODBC 2.0, which is installed in each client PC with
AIM*DataLink (refer to Figure 1-1 on page 2).
ODBC is a standard application programming interface (API) for accessing data in both rela-
tional and nonrelational database management systems (DBMSs). The ODBC interface
allows applications to access data in diverse DBMSs using the Structured Query Language
(SQL) access standard. ODBC is a general interface not related to any particular DBMS. The
addition of the Foxboro ODBC Driver for Historian completes the Historian database access
capability.
For more information about ODBC and its use in AIM*DataLink, refer to Chapter 10
“Overview of ODBC” on page 115.

Operation and Functions


AIM*DataLink operates in two modes:
♦ The program's user interface is engaged, allowing you to select target data objects,
define how they appear, and then access the objects.
♦ The program runs in the background while the selected data objects are linked to
other Windows applications, viewed, stored, and recorded.

4
1. Overview B0193YJ – Rev B

The basic functions of AIM*DataLink are:


♦ Browsing server data to determine the data available to client PCs
♦ Selecting the data of interest
♦ Defining views of the data, that is, their precise content and format
♦ Defining user preferences, that is, parameters and output settings
♦ Accessing results
♦ Viewing and recording results

Browsers
A significant feature of AIM*DataLink is a suite of dialog boxes that permits you to view
which data objects are available. There are three browser dialog boxes corresponding to the
types of accessible data:
♦ Data Object Browser
♦ Historian Browser
♦ Report Browser
The Data Object Browser and Data Object Wizard are used to browse I/A Series databases,
AIM*Historian and AIM*API sets.
A browser is often the first capability employed in the process of extracting data for inspec-
tion, analysis or connection to networked PCs.

Transferring Files
AIM*DataLink also allows you to copy and link files between AIM*AT servers and networked
Windows clients.

Browsers 5
B0193YJ – Rev B 1. Overview

6
2. Getting Started
This chapter describes user interface components and defines the basic steps of
software operation.

Introduction
The primary function of AIM*DataLink is to move data from the server system to Windows
applications running on connected PCs. The user interface facilitates browsing for the data of
interest and establishes connections to PC applications. When the interface is inactive,
AIM*DataLink runs in minimized mode, maintaining connections established between pro-
cess objects and Windows applications.

Available AIM*AT Data


Five types of data are accessible to Windows applications. Subsequent sections of this docu-
ment deal with accessing each type of data.

Data Objects Data objects consist of Shared Variables and parameters in I/A Series
compounds and blocks and AIM*Historian current values. Each data
object includes a name, a data value, and a status. Data objects can be
process inputs, process outputs, block status codes, or any other con-
nectable parameters. See Chapter 3 “Accessing Data Objects” on
page 17 for more details.

Sets Sets are predefined collections of data objects residing on a server and
logically grouped for simultaneous retrieval. Data objects within a sin-
gle set may be extracted from multiple I/A Series workstations, and sets
can reside on different AP/AWs. See “Accessing Objects via AIM*API
Sets” on page 40 for more details.

Files AIM*AT server files are accessible via AIM*DataLink. They can be
read or written through the user interface or by other Windows appli-
cations. See “File Transfer Example” on page 106 for more details.

Historian AIM*DataLink provides access to the Historian’s Sample, Reduction,


Manual Data Entry (MDE), and Message databases. See Chapter 4
“Accessing the Historian” on page 49 for more details.

Reports ASCII Report files generated on the AIM*AT server can be automati-
cally retrieved for viewing or printing. See Chapter 5 “Accessing
Reports” on page 57 for more details.
Consult the appropriate section for the details on locating and selecting the objects of interest.

7
B0193YJ – Rev B 2. Getting Started

Launching AIM*DataLink
Before attempting to start the program, verify that AIM*DataLink has been properly installed
on all networked servers and Windows clients. Refer to “Related Documents” on page xiii.
AIM*DataLink runs under Windows 95, Windows 98 and Windows NT. Exiting
AIM*DataLink is accomplished via the main window’s Exit button, as described below, or by
closing the minimized AIM*DataLink icon.
To start the program:
1. Choose Start > Programs > AIM > AIM*DataLink.
This selection starts AIM*DataLink in minimized mode.
2. Click the AIM*DataLink icon (Figure 2-1) on the task bar to open the user inter-
face. The main window opens (Figure 2-2).

Figure 2-1. AIM*DataLink Icon

Main Window
The main window of AIM*DataLink is the basis for all user interface operations. It is a
Multiple Document Interface (MDI) style window, that is, there is a single menu system with
subsequent windows for display of data which may be tiled, cascaded, minimized, or maxi-
mized within the window.

Mouse Buttons
The left mouse button is used for normal select and drag operations. The right mouse button
is available to provide a context-sensitive menu of available actions corresponding to the win-
dow or current selection, and for special drag operations.

8
2. Getting Started B0193YJ – Rev B

Exit Button

System Button Maximize Button

Minimize Button

Menu Bar

Toolbar

Workspace

Status Bar

Cap lock

Num Lock

Scroll Lock

Figure 2-2. AIM*DataLink Main Window

The main window consists of the following components:

Title Bar The top element in the window includes the program title and four
buttons:
♦ The System button activates the System menu to permit stan-
dard Windows control commands to position and size the
window.
♦ Minimize closes and disables the user interface. AIM*DataLink
continues to run.

Main Window 9
B0193YJ – Rev B 2. Getting Started

♦ Maximize enlarges the application window to normal size or to


fill the desktop.
♦ Exit closes the user interface and exits the program.

Menu Bar Provides access to certain support functions and a subset of the toolbar
functions.

Toolbar Provides quick access to the primary AIM*DataLink functions.

Workspace Screen area where data and dialog boxes are displayed and input is
accepted.

Status Bar Displays context-sensitive messages and status indicators for three
keyboard functions:
♦ Num Lock
♦ Caps Lock
♦ Scroll Lock

Toolbar
The majority of AIM*DataLink functions can be implemented via the toolbar, shown in
Figure 2-3.

File DDE Historian


Open Copy Transfer Status Browser Contents

Save Preferences Server Data Object Report Context-Sensitive


Status Browser Browser Help

Figure 2-3. AIM*DataLink Toolbar

10
2. Getting Started B0193YJ – Rev B

The toolbar functions are summarized in Table 2-1.

Table 2-1. Toolbar Functions

Icon Function Description


Open Opens a selected file. Files are of two types:
♦ Data object and historian views (VEW) of real-time data
created by AIM*DataLink
♦ Customized reports (RPT) created on AIM*AT servers.
Save Saves a view created by AIM*DataLink.

Copy Copies information to the Windows clipboard linking objects to


other Windows applications. The standard Windows clipboard
function is used.

Preferences Configures default settings for views and dialog boxes. General
Preferences are described later in this section (page 12).
Context-sensitive preferences are covered in later sections.

File Transfer Transfers files in both directions between AIM*AT servers and
Windows clients (refer to “File Transfer Example” on page 106).

Server Status Reports status of configured servers and client privileges.

DDE Status Reports status of DDE connections to PC applications.

Data Object Provides access to existing data objects of connected AIM*AT


Browser servers and Historians (refer to Chapter 3 “Accessing Data Objects”
on page 17). Also provides access to existing defined sets of con-
nected I/A Series servers (refer to “Accessing Objects via AIM*API
Sets” on page 40).
Historian Provides access to Historians of connected AIM*AT servers (refer
Browser to Chapter 4 “Accessing the Historian” on page 49). Sample,
Reduction, Manual Data Entry (MDE), and Message databases are
available.
Report Provides access to existing AIM*AT server reports (refer to
Browser Chapter 5 “Accessing Reports” on page 57).

Contents Displays contents of the online Help file.

Main Window 11
B0193YJ – Rev B 2. Getting Started

Table 2-1. Toolbar Functions (Continued)

Icon Function Description


Help Provides context-sensitive help related to a target item. Click on the
Help button and then the target item.

General Preferences
You can specify several general settings via the Preferences button on the toolbar or the Pref-
erences component of the Tools pull-down menu. When either function is invoked, the
General Preferences screen appears, illustrated in Figure 2-4.

Figure 2-4. General Preferences

AIM*AT data points are scanned during a time interval called the Scan Time.
The General Preferences dialog box has three functions:
♦ Setting the Scan Time to a value between 500 and 30,000 milliseconds
(0.5 seconds to 30 seconds).
♦ Specifying whether the AIM*DataLink Object view is to be updated. The DDE
links always update at the scan time rate.
♦ Specifying whether data object values only or values and status information are to
be conveyed to DDE applications.

12
2. Getting Started B0193YJ – Rev B

Menu Bar
The menu bar provides support functions plus a subset of the toolbar functions. The menu
bar has six elements, each of which displays a pull-down menu.

File Menu
The File menu opens stored views and reports, saves views created with AIM*DataLink,
prints files, and exits AIM*DataLink. The most recently accessed files are listed for reference.
The File menu components are:

Open... Opens a AIM*DataLink file. There are two types of files:


♦ Data object and historian views (VEW) of real-time data cre-
ated by AIM*DataLink.
♦ Customized reports (RPT) created on AIM*AT servers.

Save As... Saves a view created by AIM*DataLink using a new name.

Print Displays the Print dialog box for historian and data object views.

Print Setup... Displays the Print Setup dialog box to modify print settings.

Recent File Once files are stored, lists the four most recently saved or opened files.

Exit Exits AIM*DataLink.

Edit Menu
The Edit menu copies data to the Windows clipboard for the purpose of linking the data to
other Windows applications, such as spreadsheets and database managers. The Edit menu has
two components:

Copy Copies information to the clipboard from data object views and histo-
rian views. The standard Windows clipboard function is used.

Select All Selects all lines in a data object or historian view.

View Menu
The View menu is used to alter the appearance of the main window or to minimize it.
The menu option is selected when a check mark appears to the left of the selection.
The View menu components are:

Toolbar Displays the toolbar immediately below the menu bar.

Large Button Enlarges the size of toolbar buttons.

Status Bar Shows the status bar at the bottom of the window.

Main Window 13
B0193YJ – Rev B 2. Getting Started

Iconize Closes the user interface, shrinking the application window to an icon
in the Windows task bar at the bottom of the desktop.

Tools Menu
The Tools menu provides alternate access to seven key functions of the toolbar:

Preferences Configures default settings for views and dialog boxes. General Prefer-
ences are described on page 12. Browser and view-specific preferences
are discussed in later sections.

File Transfer Transfers files in both directions between AIM*AT servers and
Windows clients (refer to “File Transfer Example” on page 106).

Data Object Provides access to existing data objects of connected AIM*AT servers
Browser and AIM*Historian (refer to Chapter 3 “Accessing Data Objects” on
page 17). Also provides access to existing defined sets of connected
I/A Series servers (refer to “Accessing Objects via AIM*API Sets” on
page 40).

Historian Provides access to Historians of connected AIM*AT servers (refer to


Browser “Accessing Reports” on page 57). Sample, Reduction, Manual Data
Entry (MDE), and Message databases are available.

Report Browser Provides access to existing AIM*AT server reports (refer to “Accessing
Reports” on page 57).

AIM*API Server Displays the status of configured servers and client privileges.
Status

DDE Connection Displays the status of DDE connections to PC applications (refer to


Status “DDE Status” on page 140).

Window Menu
The Window menu alters the appearance of user-created view windows. The Window menu
components are:
Cascade Arranges all open windows in cascade format.

Tile Arranges all open windows in tile format.

Close All Views Closes all open windows.

14
2. Getting Started B0193YJ – Rev B

Help Menu
The Help menu has five components:

Contents Displays the contents of the online Help file.

Search for Help Provides a search-driven index to the context-sensitive help function.
on

Using Help Provides standard Windows instructions on the use of online Help.

Technical Displays contact information for Foxboro technical support.


Support

About Shows the current version and copyright information about


AIM*DataLink.

Using AIM*DataLink
Using AIM*DataLink to connect objects to PC applications involves the following steps:
1. Open the user interface by clicking on the AIM*DataLink icon.
2. Access the objects of interest by invoking the appropriate browser from the toolbar
or the Tools menu.
3. Browse the available objects using the instructions from the applicable sections
(see “Browsers” on page 5).
4. Create a view of the desired objects and display the object data.
5. Once a view is created, you can take the following additional actions:
♦ Store the selected view by clicking the Save icon in the toolbar.
♦ Copy the view to the Windows clipboard by clicking the Copy icon in the
toolbar.
♦ Paste the view to a Windows application by clicking on Paste from the Edit
menu of some other application, such as Excel. This establishes a DDE link.
♦ Close the AIM*DataLink user interface by clicking the Minimize button.
In addition, PC applications such as Visual Basic programs can access objects directly from
AIM*DataLink by utilizing the AIM*DataLink OLE Automation interface, which is
described in “AIM*DataLink OLE Automation Interface” on page 89.

Using AIM*DataLink 15
B0193YJ – Rev B 2. Getting Started

16
3. Accessing Data Objects
This chapter introduces the Data Object Browser and provides step-by-step
instructions for accessing data objects and AIM*API set objects. The chapter also
covers data object views, their formats and their editing capabilities.
The Data Object Browser provides access to data objects, which include the Shared Variables
and parameters in I/A Series compounds and blocks, and AIM*Historian current values. Data
objects can be process inputs, process outputs, block status codes or any other connectable
parameter. Once data objects have been accessed, you can:
♦ View selected data objects
♦ Copy and link selected objects to a PC application using the clipboard
♦ Create an AIM*API Set (consisting of multiple objects) on a server
Follow the procedures outlined in this section to:
♦ Open the Data Object Browser
♦ Review data objects in the AIM*AT database and in AIM*API sets of all connected
servers
♦ Select the data objects of interest
♦ Create a new data object view containing selected objects
♦ Edit or reformat an active view
♦ Create and edit AIM*API sets on the server

Data Object Browser


The Data Object Browser is the tool used to select process and historian data objects at Win-
dows clients. Each data object appears in the browser as either a block parameter or com-
pound parameter using the I/A Series naming syntax:
<Compound>:<Block>.<Parameter>
<Compound>.<Parameter>
AIM*Historian current value data objects appear as strings of up to 32 characters derived
from the historian’s configured RTP name.
At the end of the browser session, you can add user-defined Shared Variables by entering the
server alias and the Shared Variable name.
The Data Object Browser provides the means to browse among all the data objects that are
configured in AIM*AT stations accessible to the PC. This browser capability yields two basic
features:
♦ You can utilize a Data Object Wizard to search among databases for objects of
interest using a series of database filters.
♦ You can access I/A Series objects contained within AIM*API sets.

17
B0193YJ – Rev B 3. Accessing Data Objects

When you complete your selection of objects, AIM*DataLink immediately presents a user-
configured data object view for examination at the desktop.
To open the Browser (Figure 3-1):
♦ Choose Tools > Data Object Browser or click the Data Object Browser Toolbar
icon.

Name of
Selected
Tree View
Tree View
Window

List View
Window

Figure 3-1. Data Object Browser

NOTE
When an AIM*DataLink instance is opened for the first time, it displays the
Data Object Wizard (Figure 3-4 on page 23) so you can create a tree view from
the connected servers. After that, AIM*DataLink opens with the Data Object
Browser (Figure 3-1).

The browser consists of three tabs. Both the Database Objects page and the AIM*API Set
Objects page contain a Tree View window and a List View window. (See “Altering View For-
mats” on page 45 for a description of the Data Object View page.) The objects are included
in a tree view appearing in the Tree View window on each of these two pages. The tree view
can be expanded and collapsed as needed to examine all the available objects.

18
3. Accessing Data Objects B0193YJ – Rev B

NOTE
Certain objects appearing in the tree view may not be available. Object names in
the tree view may be attached to servers not currently connected to the PC.

To create a data object view:


1. Click Database Objects.
2. Select objects in the Tree View window in this tab and drag them into the List
View window.
3. Click AIM*API Sets.
4. Select objects in the Tree View window and drag them into the List View window.
5. Click OK.
The new data object view consists of the combination of objects appearing in the
two List View windows on the Database Objects tab and the AIM*API Set
Objects tab.
The browser features to use depend upon your intent:
♦ To access objects using the Database Objects page, see the next section.
♦ To access objects using the AIM*API Set Objects page, see page 40.
♦ To specify data object view formats, use the Data Object View page described in
“Altering View Formats” on page 45.
♦ To edit data object views, see “Editing Sets” on page 44.

Accessing Objects Using the Database Objects Tab


To select objects for a Data Object view:
1. Select the Database Objects tab.
2. Expand the Data Object Tree to view objects of interest.
3. Identify the objects of interest in the Tree View window. Highlight those objects
and drag those objects into the List View window.
Figure 3-2 shows an example with a fully expanded tree consisting of one server and one high-
lighted data object.

Accessing Objects Using the Database Objects Tab 19


B0193YJ – Rev B 3. Accessing Data Objects

AIM*AT
Server

Highlighted
Data Object

Drag object
to select it

List View

Figure 3-2. Selecting an Object from the Tree View Window

The tree in Figure 3-2 was created with the hist02 view, which is marked with a red arrow at
the top of the tree. You can change the displayed tree by opening the Data Object Wizard to
select a different stored view or create a new one (see “Data Object Wizard” on page 22).
The tree has three levels of hierarchy when fully expanded:

Source The first level is marked by the * symbol and indicates the environment
providing the data objects. The Source is IA for the I/A Series control
and RTP for AIM*Historian current values environment. Expand (+)
and collapse (−) boxes appear to the left of the Source icon.

Servers The second level lists the servers by alias. Expand (+) and collapse (–)
boxes appear to the left of each server icon.

Objects The third level identifies the data objects available from each server.

20
3. Accessing Data Objects B0193YJ – Rev B

Selecting Objects and Defining Views


To select objects displayed in the tree:
♦ Highlight them and drag them down into the List View window.
In Figure 3-2 the one available data object has been selected and copied to the List
View.
To select whole groups of objects:
♦ Highlight the Source or Server and drag it down into the List View.
By default, all the objects in the List View are included in the constructed data object view.
To remove objects from the List View:
♦ Select the objects individually in the List View and click Delete.
or
♦ Click Select All and click Delete.
To sort the objects alphabetically:
1. Click Select All.
2. Click Source/Item Name in the bar above the List View window.
After all the desired data objects have been added to the List View, clicking on either the OK
or Apply action button causes a data object view to be created and displayed immediately.
The Create Set function is covered on page 39.
The functions of the four action buttons are:
OK Includes the selected objects in the List View window on the Database
Objects page and the List View window on the AIM*API Set Objects
page. Automatically creates a data object view including both groups of
objects, and closes the browser. Only available if there are objects in the
List View. By default, if none is selected, all the objects in the List View
are included.
Cancel Accepts none of the selections, if any were made, and closes the
browser. Always available.
Apply Includes the selected objects in the List View window on the Database
Objects page in the Data Object Browser and the List View window
on the AIM*API Set Objects page. Automatically creates a data object
view including both groups of objects, but does not close the browser.
Only available if there are objects in the List View. By default, if none is
selected, all the objects in the List View are included.
Help Invokes the AIM*DataLink Help function. Always available.
An example of a constructed data object view is shown in Figure 3-3 on page 22.

Accessing Objects Using the Database Objects Tab 21


B0193YJ – Rev B 3. Accessing Data Objects

Right-click within the view to edit;


see “Editing Views” on page 47.

Figure 3-3. Data Object View with Two Objects

The view in Figure 3-3 contains three data objects, each with five elements. Real-time objects
are updated in the view as they change values. The entire view is accessible by scrolling the
window horizontally and vertically. The view can be edited to add or delete data objects, as
described in “Altering View Formats” on page 45.

Data Object Wizard


AIM*DataLink can access the Data Object Wizard, a broadly applicable Foxboro tool for
identifying and selecting data objects over the network. The Data Object Wizard presents a
series of database filters that search the configured servers for data objects of interest. As you
specify each filter, the wizard searches the connected servers and returns a list of data objects
matching your selection criteria.
To open the Data Object Wizard:
1. Select the Database Objects tab.
2. Click Wizard in the top left corner of the tab.
The opening screen of the wizard (Figure 3-4) appears.

22
3. Accessing Data Objects B0193YJ – Rev B

Figure 3-4. Data Object Wizard

The dialog box has three view selection options on the left. When a previously accessed data
object view exists, the wizard opens with the first option, Use <current view name> selected.
In Figure 3-4, Use hist02 is selected, as the hist02t was the last view to be used. At this point,
you can:
♦ Modify the current view
♦ Create a new view by selecting Create New View
♦ Apply another saved view by selecting Use Stored View
To start with another saved view:
1. Select Use Stored View.
The view names in the list box become active.
2. Highlight the name of the view you want to use.
3. Click the Results tab and review the data objects selected.
4. Add or delete objects as needed.
5. Click Finish.
The wizard closes, and the data objects contained in the retrieved view appear in the Tree
View window (Figure 3-2 on page 20).

Accessing Objects Using the Database Objects Tab 23


B0193YJ – Rev B 3. Accessing Data Objects

To select all the objects in the Tree View window for inclusion in the data object view:
1. Highlight the top-most level of the tree and drag it down into the List View
window.
2. Click OK or Apply.
You can modify the currently active view or create a new one, use the wizard’s filtering and
search functions. When these processes are completed, you have a different view and the Tree
View window reflects its contents.
The following sections describe how to use the wizard’s filtering and search functions. They
take you through the process of creating a new data object view.
The wizard consists of seven tab windows:
Main Allows you to start a new view or select an existing one. The Main tab
also provides access to the View Options dialog box for importing,
exporting, and deleting views.

AIM*Historian Allows you to define the selection criteria to retrieve tag names (RTPs)
Realtime Filter from AIM*Historian.

AIM*AT Server Enables you to select control stations accessible through the I/A Series
Filter workstations configured as servers for the application.
Compound-Block Provides tools for identifying blocks in the selected stations as sources
Filter of the control objects.

Parameter Type Specifies data objects through selection of block parameters.


Filter The parameters are grouped by type: Input, Output and String.
Descriptor Filter Allows you to select I/A Series descriptors for
Compound:Block.Parameter retrieval.
Results Displays the data objects that meet the selection criteria and allows you
to make adjustments to the list.
As each tab is used to specify selection criteria, the wizard queries the configured servers and
identifies resources available for the next level.

24
3. Accessing Data Objects B0193YJ – Rev B

Main Window
To create a new data object view:
1. Open the wizard.
The Main window opens, as in Figure 3-5.

Figure 3-5. Data Object Wizard Main Window

2. Select Create New View.


3. Place the cursor in the View Name text box and enter a name not already used in
the application.
The name can be any alphanumeric string up to 32 characters in length (including
spaces) as long as the string is not already used in the application. The following
characters cannot be used: period (.), ellipsis (...), exclamation point (!), colon (:),
backslash (\) and slash (/).
4. Click Next.
The wizard displays a search icon as it connects with the configured servers on the
network. If the wizard finds at least one historian instance on a connected server, it
opens its AIM*Historian Realtime Filter window (Figure 3-6 on page 26). Other-
wise, the wizard opens the Server Filter window (Figure 3-9 on page 29).

Accessing Objects Using the Database Objects Tab 25


B0193YJ – Rev B 3. Accessing Data Objects

AIM*Historian Real-Time Filter


The AIM*Historian Realtime Filter window is shown in Figure 3-6.

Figure 3-6. AIM*Historian Real-Time Filter Window

AIM*Historian servers appear in the left pane of the window, each identified by an icon and
the alias of the AIM*AT server. A plus sign to the left of the icon indicates that you can
expand the display to show the AIM*Historian instances hosted by the server.
When the display is expanded or there are more servers than can be displayed in the left pane,
a scroll bar and arrow buttons on the right side of the pane become active.
To continue:
1. Expand the left pane display as needed, and click the name of the historian you
want to access.
The Filter data field becomes active and the bold arrow appears above the field
prompting you to enter selection criteria (Figure 3-7).

26
3. Accessing Data Objects B0193YJ – Rev B

Figure 3-7. AIM*Historian Real-Time Filter with Filter Data Field Active

You can use combinations of letters, numbers, and the wildcard asterisk to select
historian object names of interest. For example,
♦ Enter LA* to include all objects that begin with LA in the selected
historian.
♦ Enter UC* to include all objects that begin with UC in the selected
historian.
♦ Enter * to include all objects in the instance.
As you enter the criteria, the Add Filter button becomes active as indicated by the
arrow above the button.
2. Enter the criteria and click Add Filter.
The selection is displayed in the right pane, as shown in the example in Figure 3-8
where two selections have been made from the AIM*Historian instance histnt on
the server P7AW70.

Accessing Objects Using the Database Objects Tab 27


B0193YJ – Rev B 3. Accessing Data Objects

Figure 3-8. AIM*Historian Real-Time Filter with Two Selections

You can make additional selections from the same historian or from other
instances on the same or different servers.
3. When you have completed your selection of historian objects, click Next.
The wizard displays a search icon as it connects with the selected stations on the
network. When the search is complete, the wizard opens its Server Filter window.

Selecting Stations
The Server Filter window is shown in Figure 3-9. The window displays the aliases of the sta-
tions that have been configured as AIM*API servers. Each server is identified by an icon and
the alias.
A plus sign to the left of the icon indicates that you can expand the display to show the CPs
and other stations hosted by the server. To the left of each station letterbug is a check box to
indicate when a station has been selected. When the display is expanded or there are more
servers than can be displayed in the list box, the scroll bar and arrow buttons on the right side
of the box become active.

28
3. Accessing Data Objects B0193YJ – Rev B

Figure 3-9. Window for Selecting Stations

To continue:
1. Expand the list as needed, and click on the letterbug of each station you want to
include as a source of data objects.
To exclude a selected station, click on its letterbug a second time.
2. Exercise additional filter tab controls as needed. These controls are described in the
following subsection.

Filter Tab Controls


All the wizard filter windows offer additional button controls that assist in the selection of
objects:
Filter Filters the display to show only items that match the criteria specified
in the adjacent text box. The filter is applied to the lowest level of items
that can be displayed in the filter window, that is:
♦ Stations in the Server Filter window
♦ Blocks in the Compound-Block Filter window when sorted by
compound
♦ Compounds in the Compound-Block Filter window when
sorted by block
♦ Block parameters in the Parameter Type Filter window.

Accessing Objects Using the Database Objects Tab 29


B0193YJ – Rev B 3. Accessing Data Objects

You can use an asterisk as a wild card for one or more characters and a
question mark as a wild card for a single character. (For example,
*PKY? finds 57PKY1, 57PKY3, and 6PKYA, but not 6PKY01.)
Show Selected Opens a dialog box that displays the currently selected items in the
window. For example, Figure 3-10 is a Show Selected dialog box
opened from the Server Filter window.

Figure 3-10. Selected Server Stations

Expand Expands the display of each item in the list box to show the next level.
This button is the equivalent of clicking the plus sign adjacent to each
server, compound, block type or block icon.
Collapse Collapses the entire display to the next higher level. This button is the
equivalent of clicking the minus sign adjacent to each server, com-
pound, block type or block icon.
Select All Selects all items in the list box. This function is only applied to
the current filter window. For example, when you choose Select All in
the Compound-Block Filter window, it does not affect the CP selec-
tion made in the previous window.
If you have narrowed the displayed list using the filter button prior to
clicking Select All, all items matching the filter criteria, and only those
items, are selected.
Clear All Clears all selections displayed in the list box. This function is only
applied to the current filter window. For example, when you choose
Clear All in the Compound-Block Filter window, it does not affect
the CP selection made in the previous window.

30
3. Accessing Data Objects B0193YJ – Rev B

There are four function buttons across the bottom of each filter window:
Back Returns to the previous window. You can always return to the previous
window to make additional selections. Going back one window does
not clear the selections made at the lower levels.
Next Implements the selections made in the current window and opens the
next window in the wizard.
Cancel Closes the wizard. Canceling deletes the new view, allowing you to
reuse the view name.
Help Raises the Help window with information specific to the current
dialog box.
To continue creating the new data object view:
♦ Click on Next in the Server Filter window.
The wizard displays a search icon as servers for the compounds and blocks in the
control databases of the selected stations are queried. When the discovery is com-
plete, the wizard opens its Compound-Block Filter window.

Selecting Compounds and Blocks


After you narrow your selection to specific servers and stations using the Server Filter win-
dow, the wizard opens a window for selecting specific I/A Series blocks (Figure 3-11).

Figure 3-11. Compounds and Blocks Sorted by Compound

Accessing Objects Using the Database Objects Tab 31


B0193YJ – Rev B 3. Accessing Data Objects

The list box in this window shows I/A Series compounds and blocks in the stations you
selected in the previous window. The compounds are represented by the compound name and
a multicolored icon of three boxes. When a compound display is expanded, each of its blocks
is listed by the block name and the block type in parentheses. A check box to the left of the
block name allows you to select or deselect the block.
Two option buttons to the left of the list box allow you to sort the display first by compound
or first by block type:
♦ Click Compound-Block for an alphabetical list of compound names, which can
be expanded to show the blocks within each compound (Figure 3-11). When this
sort is used, the Filter command is applied to the blocks.
♦ Click Block-Compound for a list of block types, which can be expanded to
show the compounds that include these blocks (Figure 3-12). When this sort is
used, the Filter command is applied to the compounds.

Figure 3-12. Compounds and Blocks Sorted by Block

To continue creating the new data object view:


1. Select one or more blocks individually or by using the Filter and Select All
buttons.
2. Click on Next.
The wizard displays a search icon as it constructs a list of parameters for each block
type in the selection. When the discovery is complete, the wizard opens its
Parameter Type Filter window.

32
3. Accessing Data Objects B0193YJ – Rev B

Selecting Parameters
This window (Figure 3-13) allows you to define the block parameters used in the selection of
data objects. The list box has a three-level display of parameters:
♦ The first level divides all block parameters into Input, Output and String catego-
ries (represented by colored circles with I, O, and S, respectively).
♦ The next level is a list of block types having the parameter type.
♦ Each block type can be expanded to show its Input, Output, or String parameters
on the third level.

Figure 3-13. Filter Window for Selecting Parameters

To further define your selections for the new data object view:
1. Use the tree display or the Filter button to select the parameters of interest in the
selected blocks. For example:
a. Enter OUT in the text box and click on Filter to show only block types with an
OUT parameter.
b. Click on Select All.
The wizard is then set to find all OUT parameters in the selected blocks.
2. Click on Next.
The I/A Description Filter window opens.

Accessing Objects Using the Database Objects Tab 33


B0193YJ – Rev B 3. Accessing Data Objects

Filtering by I/A Series Descriptions


The I/A Series Description Filter (Figure 3-14) supports the selection of compounds and
blocks associated with certain descriptors.

Figure 3-14. Description Filter Window

To continue:
1. Using the Descriptor list as a guide, select the Compound:Block combinations of
interest.
2. Click on Next.
The Searching dialog box (Figure 3-15) opens.

34
3. Accessing Data Objects B0193YJ – Rev B

Figure 3-15. Searching Dialog Box

The Searching Criteria pull-down list at the top of the box provides various search options
based on your selections in the previous windows:

Compound-Block
This is the only option presented if you did not select parameters in the
Parameter Type Filter window. The wizard constructs a view that
includes all parameters of the selected blocks.
(Compound-Block or Descriptor) AND Parameter Type
This option is one of three available if you have selected one or more
parameters in the Parameter Type Filter window and identified one or
more blocks in either the Compound-Block Filter window or the
Descriptor window. Make this choice to construct a view that has only
the selected parameters in the selected blocks.
(Compound-Block or Parameter Type) AND Descriptors
This option is one of three available if you have selected one or more
descriptions in the Descriptors window and identified one or more
blocks in the Compound-Block Filter window or Parameters in the
Parameter Type window. Make this choice to construct a view that
has only the selected parameters in the selected blocks.
(Compound-Block or Descriptor) OR Parameters
This option is one of two available if you have selected parameters in
the Parameter Type Filter window and identified blocks in the Com-
pound-Block Filter window. Use this option to construct a view that
includes all parameters of the selected blocks, all instances of the
parameter types in the control databases of selected stations, and all
parameters with the descriptors.

Accessing Objects Using the Database Objects Tab 35


B0193YJ – Rev B 3. Accessing Data Objects

Parameters This is the only option presented if you did not select blocks in the
Compound-Block Filter window but did choose parameter types in
the next window. Use this option to construct a view that includes all
instances of the parameter types in the control databases of selected
stations.
RTP This option is available when the AIM*Historian filter has been
selected.
To start the search for the data points to include in the new data object view:
1. Click on the pull-down list arrow button and select a Searching Criteria option.
2. Click on Begin.
As the wizard conducts the search, it lists the data objects it discovers and reports
the total number found. When the search is complete, the wizard displays its
Results window, the final window in the filtering and object search sequence.

Results
The Results window (Figure 3-16) displays objects that met the selection criteria defined as
you stepped through the filter windows, and it allows you to make final adjustments to the
new data object view.

Figure 3-16. Data Object Wizard Results Window

36
3. Accessing Data Objects B0193YJ – Rev B

The list box contains a four-column display showing an object Descriptor, the object source
Type (currently all objects are I/A Series data points), the AIM*AT server alias, and the point
names.
A blue object Descriptor icon with an H in the center indicates that the data point is histor-
ized, that is, the block parameter is configured in at least one I/A Series Historian or
AIM*Historian instance accessible through the configured servers. A black circle with no let-
ter indicates a data object that is not historized.
Four control buttons above the list box allow you to make adjustments to your selection:
Add Enables you to add data points to the view without changing the search
criteria. Clicking on Add opens the Add Item dialog box (Figure 3-17).

Figure 3-17. Add Item Dialog Box

To add an object to the view:


♦ Select the source type using the drop-down menu.
♦ Enter the alias of the server in the Server text box.
♦ Identify the object in the Item text box by entering the object
tag.
♦ Enter the <Compound>:<Block>.<Parameter> for I/A Series
block parameters, the Shared Variable name for user-defined
variables on the I/A Series workstation, and the RTP name for
real-time points configured on the AIM*Historian instance.
Refresh Searches the servers using new selection criteria. Opens the Searching
dialog box (Figure 3-15 on page 35). This action reverses any additions
or deletions made from the Results window.
Select All Selects all items in the list box. Use this function to delete all items
from the view.
Clear All Clears all selections made in the list box.
To complete construction of the data object view:
1. Review the objects selected in the Results window (Figure 3-16).
2. Click Add to open the Add Item dialog box to include data objects not already
selected, then click OK.
3. Highlight objects you want to exclude and press the Delete key on your keyboard.

Accessing Objects Using the Database Objects Tab 37


B0193YJ – Rev B 3. Accessing Data Objects

4. Click Finish.
The Data Object Wizard closes, and all the data objects contained in the new view
appear in the Tree View window of the Data Object Browser (see Figure 3-2 on
page 20). To display the new view, drag all the objects into the browser’s List View
window and click OK.

Options Dialog Box


The Data Object Wizard provides several functions for managing the views developed in
AIM*DataLink.
1. Select the Main tab of the Data Object Wizard.
2. Click Options.
The View Options dialog box (Figure 3-18) opens.

Figure 3-18. View Options Dialog Box

The dialog box displays the available views in a list box, along with four options buttons:
Close Closes the dialog box and returns you to the Main window of the Data
Object Wizard.
Delete Deletes the selected (highlighted) view.
Export Opens a standard Windows Save dialog box so the view can be
copied to a storage file for use elsewhere. The default file extension
in the Windows Save As Type list box is .stg.
Import Displays a Windows Open dialog box so you can import a data object
view from a storage file previously created with the Export option.

38
3. Accessing Data Objects B0193YJ – Rev B

Creating Sets
AIM*API sets are user-defined collections of data objects which are typically related in some
way as a group.
To create an AIM*API set:
1. Select Database Objects.
2. Highlight the objects to be included in the new set in the List View window.
By default, if none is selected, all the objects in the List View are included.
3. Click on the Create Set button.
The Create Set dialog box (Figure 3-19) opens.
The Create Set button is accessible only when one or more data objects appear in
the List View window, so it is necessary to first select objects by dragging them
into the List View.

NOTE
If the Create Set button is not active, you do not have Create Set privileges.
Contact your Administrator.

Figure 3-19. Create Set Dialog Box

4. Enter a valid UNIX filename in the Set Name dialog box.


A UNIX name is a case-sensitive alphanumeric string with no white space. Use an
underscore to space between works in the name.
5. To open the new set immediately upon its creation, select Open Set.
This places a command in the open set file so that the set opens each time the
server is rebooted.
6. Alter the default settings for the Scan Time and Delta values, if desired.
The Scan Time is an integer from 1 to 20, corresponding to real-time sampling
intervals of 0.5 to 10 seconds, respectively.
Accessing Objects Using the Database Objects Tab 39
B0193YJ – Rev B 3. Accessing Data Objects

Delta is an absolute value in engineering units. If the change in the data object
value from the previous scan is not equal to or greater than the Delta, the value
from the previous scan is used.
7. Click OK to create the new set and close the screen.
The appropriate set data file (<set name>.dat) is created on the server.
Once a set has been created, you can access the set from the AIM*API Set Objects page,
described in the next section.

Accessing Objects via AIM*API Sets


This section describes how to access data objects contained within AIM*API sets, which are
user-defined collections of related data objects. These Sets can be accessed, along with any or
all of their constituent data objects, from the AIM*API Set Objects page of the data object
browser.
Set definitions allow you to establish a constant load on I/A Series CPs, as they allow you to
share exiting connections between the AIM*API server and the process control stations.
To create a view from using sets:
1. Click the AIM*API Set Objects.
The AIM*API Set Objects tab opens (Figure 3-20).

I/A Series
Servers
with
Defined Sets
Tree View
Window

List View
Window

Figure 3-20. Servers with Defined AIM*API Sets

40
3. Accessing Data Objects B0193YJ – Rev B

The tab includes an expandable tree view of all AIM*API sets, a List View window and four
action buttons arrayed across the bottom of the tab:
OK Includes the selected objects in the List View window on the Database
Objects page and the List View window on the AIM*API Set Objects
page. Automatically creates a data object view including both groups of
objects, and closes the browser. Only available if there are objects in the
List View. By default, if none is selected, all the objects in the List View
are included.
Cancel Accepts none of the selections, if any were made, and closes the
browser. Always available.
Apply Includes the selected objects in the List View window on the Database
Objects page in the Data Object Browser and the List View window
on the AIM*API Set Objects page. Automatically creates a data object
view including both groups of objects, but does not close the browser.
Only available if there are objects in the List View. By default, if none is
selected, all the objects in the List View are included.
Help Invokes the AIM*DataLink Help function. Always available.
The AIM*API Set Options button at the top of the tab opens a dialog box for editing a
selected set.
The tree view can be expanded to show three levels: servers, sets on each server, and data
objects in each set.
Sets that are currently closed are displayed in yellow and identified with a closed box icon to
the left of the set name.
Sets that are currently open are displayed in blue and identified with an open box icon to the
left of the set name.
1. Expand the tree view by clicking the plus sign to the left of the server alias.
The tree reveals all the AIM*API Sets that are configured on each server
(Figure 3-21on page 42). Both opened and closed sets are displayed. You can also
expand each set to reveal all the data objects it contains.

Accessing Objects via AIM*API Sets 41


B0193YJ – Rev B 3. Accessing Data Objects

Available sets in the


selected server;
all open.

Figure 3-21. Available AIM*API Sets

2. Select a set in the tree view and drag it into the List View.
3. The List View displays all of the objects in the set, showing the server alias and the
object tag. In Figure 3-22, the server is P7AW03 and the displayed objects are
I/A Series block parameters (shown in the <Compound>:<Block>.<Parameter>
format).

42
3. Accessing Data Objects B0193YJ – Rev B

Open Set

Selected Set

Drag the set


into the list
view to transfer
all of its objects.

Figure 3-22. Accessing a AIM*API Set from the Data Object Browser

You can also fully expand the tree view, select individual objects within a set and
drag them into the List View.
Or, you can select all sets on one server by highlighting the server alias in the tree
view and dragging it down into the List View. All the data objects in the selected
server’s sets appear in the List View. This action may result in a very large number
of objects being selected.
4. Click Source/Item Name in the bar at the top of the List View to sort the selected
objects alphabetically by object name or by source and object name.
5. Review the objects in the list.
6. Highlight unwanted objects and click Delete.
To start over, click Select All and then click Delete.
7. When you have finished object selection, click either OK or Apply to create the
data object view.
The view is displayed immediately (Figure 3-23 on page 44).

Accessing Objects via AIM*API Sets 43


B0193YJ – Rev B 3. Accessing Data Objects

Figure 3-23. Data Object View with Five Objects

The view in Figure 3-23 includes five data objects, each with five elements (three of which are
visible in Figure 3-23):
♦ Source (the server alias)
♦ Point name
♦ Value
♦ Status
♦ Description.
The entire view is accessible by scrolling the window horizontally and vertically.
Real-time objects are updated in the view as they change values.
The view can be edited to add or delete data objects, as described in “Altering View Formats”
on page 45.

Editing Sets
To edit an AIM*API set:
1. Select the set name in the tree view.
2. Click AIM*API Set Options.
The browser opens the AIM*API Set Options dialog box (Figure 3-24), which
offers three options:
♦ Open Set, which is available if the selected set is closed.
♦ Close Set, which is active if the selected set is open.
♦ Delete Set, which removes the selected set from the server.

44
3. Accessing Data Objects B0193YJ – Rev B

Figure 3-24. Editing a AIM*API Set

3. Click the operation you want to perform.


4. Click on Cancel when done.

Altering View Formats


The format of an active data object view can be specified using the browser’s Data Object
View tab.
To alter a view format:
1. Click Data Object View.
The browser brings the Data Object View tab forward (Figure 3-25 on page 46).

Accessing Objects via AIM*API Sets 45


B0193YJ – Rev B 3. Accessing Data Objects

Figure 3-25. Setting View Formats from the Data Object View Page

The box in the upper half of the tab deals with the clipboard format of data
objects, which must be compatible with the Windows applications to which they
are connected. The Display Columns box below it determines the information to
be included for each object.
2. Select Excel, Lotus 1-2-3 or Custom in the Clipboard Format box to specify an
application.
The Excel and Lotus 1-2-3 choices relate specifically to DDE connections.
For a Custom selection, any DDE application format may be specified in the asso-
ciated text box.
By default, %s is used as a placeholder for the combined path alias and data object
name. Any text may be entered before or after the placeholder. In addition, the
placeholder text may be changed to any unique text string by editing the Tag
Format dialog box.
3. In the Display Columns box, select the fields you want to appear in object view.
4. Click on OK to accept the format changes and close the screen.

46
3. Accessing Data Objects B0193YJ – Rev B

Editing Views
Once a data object view has been created, its contents can be modified. In fact, you can select
from multiple views and modify each of them as needed.
To modify an existing data object view:
1. Select the target view so it is displayed as the active window.
2. Right-click in the displayed active view, or choose Edit from the AIM*DataLink
menu bar.
The resulting menu lists the following options:
Copy Copies the selected (highlighted) lines of the displayed view to the
Windows clipboard in accordance with the specified clipboard format
of the view.
Delete Selected Deletes highlighted objects from the view.
Items

Add New Items Causes the data object browser to reappear with the active view objects
in the List View window of its Database Objects page. All the browser
capabilities are then available to add and delete objects from the active
view or change its format. The data object wizard is also available to
display or create a different data object view from which to select
objects.
Select All Highlights all data objects in the view.
Print Prints the displayed view.
Help Opens the AIM*DataLink Help function.

Editing Views 47
B0193YJ – Rev B 3. Accessing Data Objects

48
4. Accessing the Historian
This chapter describes access to I/A Series Historian and AIM*Historian
instances using the Historian Browser.
This chapter is used along with “Using AIM*DataLink” on page 15 and describes how to
access I/A Series Historians and AIM*Historian instances. Historians are collections of
historical data, each of which resides on an AIM*AT server. Through the AIM*API network
architecture, any of these historians is accessible through a single server via any networked
Windows client.
Each historian consists of four databases:
♦ Sample database
♦ Message database
♦ Reduction database
♦ Manual Data Entry (MDE) database
All historian databases are maintained in a time-stamped series. By default, AIM*DataLink
returns historian data sorted by time.
Once you access the historian data, you can:
♦ View certain data from a selected historian and one of its databases
♦ Link the data to a PC application
Follow the procedures outlined in this section to:
♦ Invoke the Historian Browser
♦ Define historian preferences or settings
♦ Select a historian and its data of interest
Once the historian data of interest is selected, create a view of these data and link the view to
a PC application if desired. For details see Chapter 6 “Object Views” on page 61.

Historian Browser
With the Historian Browser running on the client PC, you select the historian server, specify
instances, and view the contents of the databases for each instance. You also use the browser to
specify data format and create historian views.
The browser window (Figure 4-1 on page 51) consists of three tabs:
♦ Historian Browser for viewing and selecting RTPs and other data from a selected
historian instance
♦ Settings for selecting the historian server and instance, and setting the time span
♦ Historian View for specifying the format of the historian view

49
B0193YJ – Rev B 4. Accessing the Historian

Each browser tab uses four action buttons at the bottom of the browser window. The Cancel
and Help buttons are always available to discontinue the Historian Browser dialog box or to
access the AIM*DataLink Help function. OK and Apply become active following selection of
historian data items. Each causes an historian view to be created. The functions of these but-
tons are:

OK Creates a view with the selected historian item data and closes the
browser. Only available if objects have been selected.

Cancel Accepts none of the modifications, if any were made, and closes the
browser. Always available.

Apply Accepts the selected historian item data, but does not close the browser.
Only available if objects have been selected.

Help Opens the AIM*DataLink Help function. Always available.


To open the browser:
1. Choose Tools > Historian Browser or click the Historian Browser icon in the
toolbar.
If there has been no previous configuration, the browser opens with the Settings
tab selected (Figure 4-1). If a configuration has previously been set, the Historian
Browser screen (Figure 4-2 on page 52) appears first.

NOTE
Because the selections of server and historian are required before proceeding in
the browser, the Settings tab appears in front the first time the Historian
Browser is used.

Settings
The Settings tab is used to specify the target historian by server and instance names and to
set the time frame for the data of interest.
To use the Historian Browser Settings tab:
1. Open the browser and click Settings if the tab is not already displayed.
The Settings tab is shown in Figure 4-1.

50
4. Accessing the Historian B0193YJ – Rev B

Figure 4-1. Historian Browser Settings Tab

2. Select the target server using the drop-down menu in the Server box.
The Messages box displays corresponding server-specific messages.
3. Specify the historian instance using the drop-down menu in the center of the tab.
The menu lists all of the instances on the selected server.
4. Enter the desired date and time in both the Beginning and Ending boxes using
the formats illustrated in Figure 4-1.
The Beginning and Ending boxes define the time span for the data of interest.
By default, the Ending is the current date and time. The default for Beginning is
the date and time of Ending less the previously defined time span. When you
open the Historian Browser for the first time, Ending and Beginning are both set
at the current time and date.
The OK and Apply buttons are active only when objects in the selected historian
have been specified.
5. Choose one of the other two tabs to continue setting up the historian view.

Historian Browser Screen


The Historian Browser tab (Figure 4-2) is used to view and select data items from the
selected historian.

Historian Browser Screen 51


B0193YJ – Rev B 4. Accessing the Historian

Figure 4-2. Historian Browser Tab with Sample Data

To select historian data items:


1. Click Historian Browser if the tab is not already displayed.
The upper portion of the tab displays the choice made with the Settings tab: the
server, historian instance, and start and end times. By default, the
END: Date - Time is the current date and time. The START: Date - Time also
takes on a default value if a time span has been specified in the Registry. Other-
wise, it is blank.
2. Select one of the four historian databases or tables from the Table menu.
A list of items appears in the Historian Item List box. Figure 4-2 is an example
with sample tables selected. Figure 4-3, Figure 4-4 on page 54, and Figure 4-5 on
page 55 are examples of the Historian Browser specifying Message, Reduction,
and Manual Data, respectively.
Sample provides a list of RTPs configured for the historian. For each object listed,
there is a single table consisting of three columns: Time Stamps, Status, and
Value. Data points can be retrieved in time-compressed format or time-linearized
format. Figure 4-2 is an example of objects available from sample tables.
Message tables include event messages and other non-integer data collected by
AIM*Historian instances. Figure 4-3 is an example of the Message table.
A Reduction table is a set of results from reduction operations performed on a set
of collection points on a periodic basis. The columns of this table include Time
Stamp, Status, Source, and from one to seven Value columns. The Value col-

52
4. Accessing the Historian B0193YJ – Rev B

umns assume the names configured in the historian for the reduction operation.
By default, the results of reduction operations are grouped by Source at each time
interval. Figure 4-4 on page 54 is an example of the Historian Browser with
Reduction selected.
A Manual Data Entry (MDE) table consists of columns for Time Stamp, Entry
Name, Status, and Value. By default, the table entries are grouped by Entry
Name at each time interval. Figure 4-5 on page 55 is an example of the Historian
Browser with Manual Data selected.
3. If Reduction or Manual Data was selected, choose a group by clicking on the
pull-down list arrow in the Group box.
4. Highlight one or more items from the Historian Item List box.
5. Click on OK to create an historian view that includes the selected objects and close
the browser.
To choose additional items in the browser, click on Apply to create an historian
view that includes the selected objects.
For sample data, each collection point corresponds to a single table composed of three
columns: Time Stamp, Status, and Value. Data points can be retrieved in time-compressed
format or time-linearized format.

Figure 4-3. Historian Browser Screen with Message Data

Figure 4-3 shows 12 Message tables available with fixed names. The list of available message
tables can be scrolled.

Historian Browser Screen 53


B0193YJ – Rev B 4. Accessing the Historian

Figure 4-4. Historian Browser Screen with Reduction Data

Figure 4-4 shows reduction tables available for five objects in the Cosine Reduction group.
A Reduction table is a set of results from reduction operations performed on a set of collec-
tion points on a periodic basis. The columns of this table include Time Stamp, Status,
Source, and from one to seven Value columns. The Value columns assume the names con-
figured in the historian for the reduction operation. By default, the results of reduction opera-
tions are grouped by Source at each time interval.

54
4. Accessing the Historian B0193YJ – Rev B

Figure 4-5. Historian Browser Screen with Manual Data

Figure 4-5 shows two tables available from the lab1 MDE group.
A Manual Data Entry (MDE) table consists of columns for Time Stamp, Entry Name, Sta-
tus, and Value. By default, the table entries are grouped by Entry Name at each time interval.

Historian View
At any time during a browser session, you can specify certain contents of historian views,
including specification of their displayed elements, format, point limit, timing criteria and
linearization setting. Click on the Historian View tab to invoke these capabilities. See
Chapter 6 “Object Views” on page 61for detailed instructions.

Historian View 55
B0193YJ – Rev B 4. Accessing the Historian

56
5. Accessing Reports
This chapter describes use of the Reports Browser to access reports from the
connected I/A Series servers.
This section is used, along with “Using AIM*DataLink” on page 15, to provide information
on accessing reports created on an AIM*AT server.
The Reports Browser allows you to take the following actions:
♦ Select a server
♦ Identify the reports available from the chosen server
♦ Select one or more of these reports
♦ View and print selected reports
♦ Link selected reports to a PC application
Follow the procedures outlined in this section to:
♦ Invoke the Report Browser
♦ Define report preferences or settings
♦ Select reports of interest

Report Browser
With the Report Browser on the client PC, you select the server, examine the available reports
from that server, and create a Report View. The browser also enables you to print copies of the
selected reports.
Once you have selected a report of interest and created a view of this object, you can add it to
a PC application. For details, see Chapter 6 “Object Views” on page 61.
To use the browser:
♦ Choose Tools > Report Browser or click the Report Browser icon in the
toolbar.
The Report Browser window consists of two tabs. If there has been no previous
configuration, the Settings tab (Figure 5-1 on page 58) is displayed. If a configu-
ration has previously been set, the Report Browser tab (Figure 5-2 on page 59)
appears first.

NOTE
Because selection of a server is required before proceeding in the browser, the
Settings screen only appears the first time the Report Browser is used.

57
B0193YJ – Rev B 5. Accessing Reports

The browser displays four action buttons across the bottom of the window:

OK Accepts all data as displayed, creates a view, and closes the browser.
Only available if objects have been selected.

Cancel Accepts none of the modifications, if any were made, and closes the
browser. Always available.

Apply Accepts all data as displayed and creates a view, but does not close the
browser. Only available if objects have been selected.

Help Opens the AIM*DataLink Help function. Always available.

Settings Tab
The Settings tab is used to select the target I/A Series server and specify the report action
(Figure 5-1).
To set Report, use the Settings tab:
1. Click Settings if the tab is not already displayed.

Figure 5-1. Report Browser Settings Tab

2. Select the target server using the pull-down menu.


The Messages field displays corresponding server-specific messages.
58
5. Accessing Reports B0193YJ – Rev B

3. Select whether you want to view or print the selected messages by clicking one of
the two options in the Report Action box.
4. Select the Report Browser tab and specify which report types to include.

Report Browser Tab


The Report Browser tab (Figure 5-2) is used to select a specific report from the chosen
server.

Figure 5-2. Report Browser Tab

To specify a report:
1. Click Report Browser if the tab is not already displayed.
The tab displays the alias of the server selected in the Settings tab and two list
boxes. One list shows available report types and the other list reports the selected
types.
2. Highlight one of the report types.
The available reports of the selected type are displayed in the adjacent list box
(Figure 5-3 on page 60).

Report Browser Tab 59


B0193YJ – Rev B 5. Accessing Reports

Figure 5-3. Report Browser Tab with Type and Report Selected

3. Highlight the report of interest.


You can only select one report.
4. Click OK to create a Report View consisting of the selected object.
The browser closes.
Alternatively, click Apply to create a Report View consisting of the selected object.
The browser remains open to choose additional reports.

60
6. Object Views
This chapter describes the creation, saving and printing of data object views and
historian views. It also covers basic linking capabilities of AIM*DataLink.
I/A Series object views are created in the browsers by the AIM*DataLink user and can be
saved as files on Windows clients.
There are three kinds of object views:
♦ Data object views
♦ Historian views
♦ Report views
Follow the procedures outlined in this section to:
♦ Specify and access object views
♦ Save object views
♦ Print object views
♦ Link particular objects in views to PC applications
♦ Close views

Specifying and Accessing Views


To access an object view:
♦ Click either OK or Apply from the browser to create and display a new view
or
♦ Retrieve a view previously saved as a file
Once the view is displayed, you can save it as a file and close it.
The contents and format of an object view are specified from within the Browser or Prefer-
ences dialog box. The view contents are dependent upon the type of object being specified.
To specify the format of an object view, refer to the appropriate procedures outlined in “Data
Object Views” on page 62.

61
B0193YJ – Rev B 6. Object Views

Data Object Views


The formats of data object views can be specified at any time during a Data Object Browser
session including their displayed elements and their Windows clipboard.
To format a view:
1. Click Data Object View to display the Data Object View tab (Figure 6-1).

Figure 6-1. Data Object View Specifications

2. Choose Microsoft Excel, Lotus 1-2-3, or Custom in the Clipboard Format


selection box.
The Windows clipboard is used in a copy and paste operation to link data objects
to PC applications (see “Linking Objects to PC Applications” on page 67).
The data objects format must be compatible with the Windows application to
which they are connected.
For a Custom selection, any DDE application format may be defined. By default,
%s is used as a placeholder for the combined path alias and data object name. Any
text may be placed before or after the placeholder. In addition, the placeholder text
may be changed to any unique text by editing the Tag Format field.
Excel and Lotus 1-2-3 are specific to DDE connections.

62
6. Object Views B0193YJ – Rev B

3. In the Display Columns box, click the data object components to be included in
the display.

Description Block description text from the I/A Series


Compound Name Compound:Block.Parameter or Shared
Variable name
Value Floating point, integer, or string (first four
characters)
Status Value Numeric status code
Status Description Mnemonic description of Status

4. Click OK.
AIM*DataLink closes the browser and displays the view within the main window
(Figure 6-2).

Figure 6-2. Example of a Data Object View

To change the format while the view is displayed:


1. Choose Tools > Preferences or click the Preferences icon in the toolbar.
2. Make the required changes.
3. Click OK.
All settings are stored to serve as the default configuration for new views.

Specifying and Accessing Views 63


B0193YJ – Rev B 6. Object Views

Historian Views
At any time during an Historian Browser session you can format historian views, including
specifications of their displayed elements, point limit, timing criteria and linearization setting.
1. Click Historian View, or choose Tools > Preferences.
The browser displays the Historian View tab (Figure 6-3).

Figure 6-3. Historian View Specifications

The tab displays six parameters to be specified.


2. In View Format, select the items to be included in the display: Value, Status, and
Time Stamp.
3. In Clipboard Format, choose either Time Stamp or Value to appear first.
The Windows clipboard is used in a copy and paste operation to link historian
object text to PC applications (see “Linking Objects to PC Applications” on
page 67). When copied to the Windows clipboard, either of the objects can appear
first.
4. Specify the maximum number of data points to be included in the view by enter-
ing a value in the Max Points field.
For no limit on the number of points, enter 0 or any number less than 1 (as in
Figure 6-3).

64
6. Object Views B0193YJ – Rev B

5. Specify the application of the Time Span as either Absolute or Relative.


When a view is created, beginning and ending times are associated with the view.
This time span can be applied absolutely or relatively to the display time.
An Absolute time span starts and end as determined.
A Relative time span ends at the time the view is displayed.
6. Select Ascending or Descending from sort order on the display.
7. In the Sample Data box, specify if the information is to be linearized and, if so,
the time interval (in seconds) between data points.
Data accumulated in each historian’s sample database are stored in compressed
form, in which a data point is added to the table every time the value changes.
To decompress the data and make it available in a form more suitable for presenta-
tion, the sample data can be linearized.
If data is not linearized, the historian view consists of all data points as recorded
within the selected Time Span, up to the limit specified in Max Points.
8. Click OK.
The browser closes and displays the resulting view in the main window. Figure 6-4
is an example of a Data View.

Figure 6-4. Example of a Historian View

To change the format while the view is displayed:


1. Choose Tools > Preferences or click the Preferences icon in the toolbar.
2. Make the required changes.
3. Click OK.
All settings are stored to serve as the default configuration for new views.

Specifying and Accessing Views 65


B0193YJ – Rev B 6. Object Views

Report Views
Reports are defined documents residing on various servers and are displayed as is in the
AIM*Datalink Report View (Figure 6-5).

Figure 6-5. Example of a Report View

The format and contents of a Report View cannot be modified and are displayed in the view
exactly as they appear on the server.

Saving Views
To save an active view (that is, one currently being displayed) as a file:
1. Click the Save icon in the toolbar or choose File > Save.
AIM*DataLink opens a standard Windows Save dialog box.
2. Change the file name and location supplied by AIM*DataLink, if you want.
Data object views and historian views can be saved with any filename extension,
but report views can only be saved with the report extension.
3. Click Save.
AIM*DataLink saves the view to a file, but the view remains active.

66
6. Object Views B0193YJ – Rev B

Printing Views
To print an active view (that is, one currently being displayed):
1. Choose File > Print.
AIM*DataLink opens a standard Windows Print dialog box.
2. Set the desired print parameters.
3. Click Print.

Linking Objects to PC Applications


Objects can be linked to PC applications by:
♦ OLE support
♦ Copying historian text
♦ DDE linking of data objects
AIM*DataLink provides OLE server support. This mechanism of object linking and embed-
ding is described in Chapter 8 “OLE Functionality” on page 83. Other mechanisms are
described below.
Text from historian views can be copied to PC applications, and real-time DDE links can be
established for data objects. Both mechanisms utilize a copy and paste operation via the Win-
dows clipboard.
To copy to the clipboard:
1. Highlight the objects of interest in the displayed view or browser.
2. Use one of the following copy options:
♦ Click the right mouse button to raise the context menu and choose Copy
♦ Click the Copy icon in the toolbar
♦ Choose Edit > Copy
♦ Press Ctrl+C
To copy all items within a view including the header:
1. Choose Edit > Select All.
2. Choose Edit > Copy.

Copying Historian Text


To copy text from an historian view to a PC application:
1. Highlight the text.
2. Copy the text to the clipboard.
3. Follow normal Windows protocol to paste the clipboard contents into any other
applicable Windows application, such as Microsoft Excel or Lotus 1-2-3.

Printing Views 67
B0193YJ – Rev B 6. Object Views

DDE Linking of Data Objects


To establish a real-time link to a data object:
1. Highlight the data objects of interest.
2. Copy the data objects to the Windows clipboard.
Copying can be accomplished from the Data Object Browser or directly from a
data object view. Figure 6-6 and Figure 6-7 show use of the right mouse button
pop-up menus for copying to the clipboard by each method.

Figure 6-6. Right Mouse Button Copy Menu from the Data Object Browser

NOTE
The Create Set button may be inactive for one of two reasons: the server is not
an I/A Series AP/AW, or you do not have Create Set privileges.

68
6. Object Views B0193YJ – Rev B

Figure 6-7. Right Mouse Button Copy Menu from a Data Object View

3. Follow normal Windows protocol to paste the clipboard contents into any other
applicable Windows application.
The items are pasted to the PC application with the format specified in the
Browser or View settings.
The syntax used for DDE links between Microsoft Excel or Lotus 1-2-3 is described in the
next section. You may specify any format by selecting Custom format in the View Settings
screens.

Manually Connecting Data Objects

Excel 4.0 and 5.0 Spreadsheets


To make a data object connection from within an Excel 4.0 or 5.0 spreadsheet, enter a func-
tion in each destination cell using the following format:
=aimdlink|objectaccess!’<Path Alias>/<Data Object>’

aimdlink DDE server application name for the data object access. Always use
aimdlink.

| The bar character is the separator between the DDE server application
name and the DDE topic name.

objectaccess DDE topic name for the data object access. Always use objectaccess.

! The exclamation point is the separator between the DDE topic name
and the DDE item name.
Linking Objects to PC Applications 69
B0193YJ – Rev B 6. Object Views

’<Path Alias>/<Data Object>’


DDE item name consists of the Path Alias and the Data Object sepa-
rated by a slash. Note that the DDE item name is enclosed in literals.

3DWK$OLDV! Path alias name from which you want the I/A Series data object
updates.

/ The forward slash character is the separator between the Path Alias and
the data object.

 'DWD2EMHFW ! Control variable or Shared Variable.

For example, the entry:


=aimdlink|objectaccess!’AP501B/BLR1:FC301.MEAS’
connects an Microsoft Excel cell to DDE server aimdlink, with DDE topic name
objectaccess, Path Alias AP501B, and data object BLR1:FC301.MEAS.

Lotus 1-2-3 for Windows Spreadsheets


To make an I/A Series data object connection from within Lotus 1-2-3 for Windows spread-
sheet, enter a function in each destination cell using the following format:
@DDELINK("aimdlink","objectaccess","<Path Alias>/<Data Object>")

aimdlink DDE server application name for the I/A Series data object access.
Always use aimdlink.

, A comma separates the DDE server application name and the DDE
topic name.

objectaccess DDE topic name for the I/A Series data object access. Always use
objectaccess.

, A comma separates the DDE topic name and the DDE item name.

"<Path Alias>/<Data Object>"


DDE item name consists of the Path Alias and the Data Object sepa-
rated by a slash. Note that the DDE item name is enclosed in literals.

 3DWK$OLDV ! Path Alias name you want the data object updates from.

/ The forward slash character is the separator between the path alias and
the data object.

70
6. Object Views B0193YJ – Rev B

 'DWD2EMHFW ! Control variable or Shared Variable.


For example, the entry:
@DDELINK("aimdlink", "objectaccess","AP501B/BLR1:FC301.MEAS")
connects a Lotus 1-2-3 cell to DDE server aimdlink, with DDE topic name objectaccess,
Path Alias AP501B, and data object BLR:FC301.MEAS.

Closing Views
To close an active view:
♦ Click the Exit button in the upper right corner of the Object View display

Closing Views 71
B0193YJ – Rev B 6. Object Views

72
7. Spreadsheet Access to Historian
Data
This chapter provides an overview of direct spreadsheet access to historian data.
This chapter describes how to access I/A Series Historian and AIM*Historian data directly
from the Microsoft Excel spreadsheet program, Versions 7.0 and 8.0. This capability provides
an easy way to develop and produce Excel-based reports at a networked Windows client using
information available from the historians.
While working in the Excel environment at a Windows client, you can easily build Excel
worksheets which import, process and display I/A Series historian data of any type. You can
link one cell to a single data object at one point in time, import a specified time history into a
range of cells for a single object, or create multiple cell ranges and multiple sheets to capture
multiple data objects over time. The full range of Excel capabilities are available to post-pro-
cess the historian data, add explanatory information and present a refined report in Excel tab-
ular and graphical formats. You can also reuse the Excel formulas that are created by copying
or modifying them.
Follow the procedures outlined in this section to:
♦ Prepare an Excel Worksheet to receive historian data
♦ Open the Historian Wizard Excel add-in program
♦ Specify the historian data object of interest
♦ Specify the date/time range, data type and sampling period of the target data
♦ Automatically generate Excel formulas and build the worksheet
♦ Modify the worksheet for other applications

Preparing the Worksheet


To prepare the worksheet:
1. Open the Microsoft Excel application to a new or existing worksheet to receive the
data.
2. Highlight a single cell or a range of cells as a destination for the data on a single
data object.
Selection of a single cell is appropriate for data representing one point in time or a
single processed value, such as an average, derived from a time series.
To capture a time sequence of data on a single object, select either a one- or two-
dimensional array of cells.
3. From the Microsoft Excel menu bar, choose Tools > Add-Ins.
Excel opens the Add-Ins dialog box (Figure 7-1).

73
B0193YJ – Rev B 7. Spreadsheet Access to Historian Data

Figure 7-1. Enabling the AIM*Historian Excel Add-In

4. Scroll down the list of available add-ins to select Foxboro AIM*Historian and
click OK.
The Add-Ins dialog box closes and the Foxboro AIM*Historian Data add-in func-
tion is enabled.

NOTE
If the Foxboro data entry is not found among the Microsoft Excel add-ins, click
Browse and locate that entry in the Foxboro AIM*DataLink directory.

Using the Wizard


The AIM*Historian Wizard steps you through the process of linking historian data to the
worksheet cells you have selected.
1. To open the wizard, click on Wizard in Microsoft Excel’s Tools menu.
The introductory screen, Figure 7-2, appears.

74
7. Spreadsheet Access to Historian Data B0193YJ – Rev B

An Invensys company

Figure 7-2. Introduction to the AIM*Historian Wizard

2. Click on Next to continue, revealing the screen shown in Figure 7-3.

Figure 7-3. Cell Range Specification

This screen offers an opportunity to adjust the previously selected worksheet cell
range, and it explains two ways to make a change. Note that the range is specified
in absolute terms. The range must contain a number of cells sufficient to hold all
the specified historical data points for a single data object. The number of data
points is inferred from the historian parameters entered later in this process. See
“Specifying Historian Parameters” on page 78.
3. When the Cell Range contains the correct values, click on Next to continue, which
opens the Data Object Wizard shown in Figure 7-4.
Using the Wizard 75
B0193YJ – Rev B 7. Spreadsheet Access to Historian Data

Figure 7-4. Data Object Wizard

The Data Object Wizard is a broadly applicable tool for identifying and selecting data objects
over the network. In this context, it is used to identify and select the data object whose histo-
rian data is to be linked to the specified worksheet cells.
Start the object selection process with a previously stored view which is known to contain the
object of interest. To do this, take the following steps:
♦ Select Use Stored View. The view names in the adjacent list selection box
become active.
♦ Highlight the name of the view you want to use
♦ Click on Finish
The Data Object Wizard closes, and a screen like that in Figure 7-5 appears.
Instead of using a stored view as the starting point, you can modify the currently active view
or create a new one using the Data Object Wizard’s filtering and search functions. As you
specify each filter, the wizard searches the connected servers and returns a list of data objects
matching your selection criteria. When these processes are completed and you have clicked on
Finish, you have a different view.

NOTE
The filtering and search functions of the Data Object Wizard are detailed in
“Data Object Wizard” on page 22.

76
7. Spreadsheet Access to Historian Data B0193YJ – Rev B

Selecting a Data Object


After recalling a stored view or creating a new one, you select exactly one data object from the
view to link to your Excel worksheet.
When you select a view, you see a screen like the one in Figure 7-5.

Selected View

Data Object Tree


(Shown Fully
Collapsed)

Figure 7-5. Selected View

This screen displays the data object view you selected, a view called test, in Figure 7-5.
The corresponding data object tree is fully collapsed.
Expand the tree by clicking on the + icon. When the tree is fully expanded, the display
changes to one like Figure 7-6, which lists all available historian data objects on each server.

Server

Data Object
to be Linked to the
Excel Worksheet

Figure 7-6. Selected View with Expanded Data Object Tree

Selecting a Data Object 77


B0193YJ – Rev B 7. Spreadsheet Access to Historian Data

Highlight the object you wish to link to the worksheet, then click on Next >> to continue.
The Date Selection screen (Figure 7-8 on page 79) appears.

Specifying Historian Parameters


After you select an object to link to the worksheet, you must specify several more parameters
to define the data you wish to link:
♦ Starting and ending dates/times for the data history
♦ Type of data corresponding to the selected object
♦ Time between data samples.
When you select a data object, the Operation Selection screen (Figure 7-7) opens.

Data Type

Time Between
Data Samples

Figure 7-7. Operation Selection

1. Specify the type of data representing the linked object and the time between data
samples for multi-point histories:
2. Select a data type from the Operation pull-down list. In addition to raw Sample
Data, the following processed data types can be chosen:
♦ HiLo
♦ Sum
♦ Average
♦ Maximum
♦ Minimum
♦ Std Dev
♦ Kurtosis
3. Enter a Frequency value (in seconds) if multiple data points are being linked.
4. Click on Next >> to bring up the Date Selection screen (Figure 7-8).

78
7. Spreadsheet Access to Historian Data B0193YJ – Rev B

Select date
and time
specifications.

Figure 7-8. Selecting Dates and Times from the Date Selection Screen

5. Designate whether the date specification is to be Absolute or Relative (to today).


6. Choose the Start and End dates/times using the Change buttons.
Clicking on either Change button yields the dialog box of Figure 7-9.
In Figure 7-8 there is a one-second difference between Start and End times, so
only one data point is linked to a single cell in the worksheet.

Figure 7-9. Changing Dates and Times

A wide variety of date specifications are available, including time histories mea-
sured in days, work shifts, and the prior month. Time specifications are entered
using run-up and run-down buttons for the hour, minute, and second.
7. Specify the Start and End dates and times using both Change buttons as needed.
Specifying Historian Parameters 79
B0193YJ – Rev B 7. Spreadsheet Access to Historian Data

8. Click on OK in each change dialog box (Figure 7-9) to return to the Date
Selection screen (Figure 7-8).
9. When both Start and End dates and times have been selected, click Next to pro-
ceed to the Finish Step (Figure 7-10).

Figure 7-10. Finish Step

This screen signals the completion of AIM*Historian Wizard functions. All your selections
are summarized. You can alter one or more specifications by clicking on Back to revisit prior
screens. When your selections appear to be correct, click on Finish. The wizard disappears,
and the target data appears in your Excel worksheet.

Building and Modifying the Worksheet


The worksheet in Figure 7-11 contains a range of cells with 14 data points from the historian
data object of interest (LEAD:COSINE.MEAS). Time runs forward from cells J14 through
J20, then to K14 through K20. The complete formulas necessary to access these data points
from the Historian via your networked Windows client appear in Excel’s formula bar.

80
7. Spreadsheet Access to Historian Data B0193YJ – Rev B

Figure 7-11. Representative Worksheet Linked to Historian Data

Multiple data objects are easily linked by selecting additional cells for each new object of
interest and repeating the process described in this section from start to finish.
All the usual Excel functions are available. For example, you can:
♦ Copy and paste cell contents
♦ Move contents
♦ Copy and paste formulas
♦ Change formulas
♦ Develop stylized tabular reports
♦ Create graphical presentations

Building and Modifying the Worksheet 81


B0193YJ – Rev B 7. Spreadsheet Access to Historian Data

82
8. OLE Functionality
This chapter provides an overview of AIM*DataLink object linking and
embedding (OLE) capabilities, including basic OLE functionality and new OLE
automation features.
AIM*DataLink provides two levels of Microsoft OLE functionality:
♦ Object linking and embedding (OLE)
♦ OLE automation
This section provides guidance on fully exploiting each of these two levels of capability
within AIM*DataLink, starting with an introduction to both categories.

Introduction
Object Linking and Embedding
AIM*DataLink is implemented as an OLE 2.0 server application, so it can support both link-
ing and embedding functions. You can link and embed AIM*DataLink objects into other
Microsoft Windows applications that support OLE, such as Word, Excel, and Access. It is not
necessary to invoke the AIM*DataLink application manually to access these capabilities.
AIM*DataLink exposes two document-type objects for linking and embedding: data object
document and the report document. When these objects are inserted into another applica-
tion, the respective AIM*DataLink browser tools become available:
♦ Data Object Browser
♦ Historian Browser
♦ Report Browser
♦ Server File Browser
You can use the appropriate browser to create the respective data object view, historian view,
or report view, or to select a server file. The resulting view or file is then automatically embed-
ded into the client application.
A Windows application that supports object linking can link to existing AIM*DataLink view
files that have been saved on the PC.
To provide real-time updates of object values, AIM*DataLink also supports DDE linking of
objects in an embedded data object view.
Details of these OLE functions are described in “Linking and Embedding AIM*DataLink
Objects” on page 84.

83
B0193YJ – Rev B 8. OLE Functionality

OLE Automation
OLE Automation is a powerful AIM*DataLink capability based on the Microsoft OLE Com-
ponent Object Model (COM) interface. This interface offers access to certain AIM*DataLink
functions directly from a user-written program or from a Virtual Basic (VB) module in a
Microsoft Excel (Version 8.0) spreadsheet application. Implementing this OLE Automation
interface allows you to programmatically perform the following functions without having to
manually launch and access the AIM*DataLink application program:
♦ Access objects and have their real-time update values sent directly to a user-written
program or an Excel spreadsheet
♦ Change the scan rate of real-time updates
♦ Transfer files to and from a PC and a server
Three examples have been provided on the AIM*AT Suite CD to demonstrate how to imple-
ment this new interface:
♦ An Excel spreadsheet example that writes real-time data directly to worksheets
(see the file AIMOleExample.xls)
♦ A VB program example that demonstrates file transfer
(VB project files are included in the subdirectory AIMVBFILEXFER)
♦ A VB program example that writes real-time values to a Grid control
(VB project files are included in the subdirectory AIMVBUPDATEGRID)
Except for a slight modification required in the Excel spreadsheet, these example programs
can be loaded and used as is on your PC. These three examples are also briefly discussed later
in this section.
Refer to “AIM*DataLink OLE Automation Interface” on page 89 for more information on
OLE Automation and specifically on how this interface is implemented in user application
programs.

Linking and Embedding AIM*DataLink Objects


This section describes in general terms (that is, not specific to any PC application) how to
insert, embed, and link an AIM*DataLink object in a PC application.
Additional details on object linking and embedding (OLE) can be found in your PC applica-
tion documentation and in the Windows documentation.

Insert Object Function


Windows applications that support OLE include an Insert Object function.
To connect an I/A Series object to your PC application:
1. Invoke the Insert Object function of the PC application.
The application opens the Object dialog box (Figure 8-1).

84
8. OLE Functionality B0193YJ – Rev B

Figure 8-1. Insert Object Function of a Windows Application

The Object Type selection box lists the types of objects which can be connected
and which have been registered in Windows. The two types of objects made avail-
able by AIM*DataLink:
♦ Data object documents, which support the embedding of data object views
and historian views
♦ Report documents, which support the embedding of reports and files

Embedding Objects
To embed an AIM*DataLink object in a PC application:
1. Select one of the two AIM*DataLink object types from the Object Type selection
box.
2. Select Create New if the object of interest does not yet exist, or Create from File
if it does.
3. Click on OK to accept your choices and proceed.
If you chose an AIM*DataLink Data Object Document, the toolbar and menu bar reflect that
choice, as in Figure 8-2 on page 86. If you chose an AIM*DataLink Report Document, the
toolbar and menu bar reflect that choice, as in Figure 8-3 on page 86.

Embedding Data Object Documents


Figure 8-2 presents a toolbar and menu bar subset of AIM*DataLink functions.

Linking and Embedding AIM*DataLink Objects 85


B0193YJ – Rev B 8. OLE Functionality

Figure 8-2. Embedding Data Object Documents via OLE

To add data objects to your view:


♦ Activate either the Data Object Browser or the Historian Browser from the toolbar
or from the Tools menu
To embed an existing data object view or historian view in your PC application:
1. Select the Create From File tab from the Object dialog box (Figure 8-5 on
page 88).
2. Specify the File Name.
3. Click on OK.
The selected view is then embedded in your PC application at the location you
specified.

NOTE
The embedded data object view is not updated until it is linked by
double-clicking within the embedded view.

Embedding Report Documents


Figure 8-3 presents a toolbar and menu bar subset of AIM*DataLink functions.

Figure 8-3. Embedding Report Documents via OLE

To add a report document to your view:


♦ Activate the Report Browser from the toolbar or choose Tools > Report Browser
To embed an existing report into your PC application:
1. Select the Create From File tab from the Object dialog box (Figure 8-5 on
page 88).
2. Specify the File Name.
3. Click OK.
The selected view is then embedded in your PC application at the location you
specified.
86
8. OLE Functionality B0193YJ – Rev B

Embedding AIM*AT Server Files


It is also possible to embed any server file in your PC application, whether or not it was cre-
ated under, or even accessible through, AIM*DataLink.
To embed a server file:
1. Choose Tools > Server File Browser, or click the Server File Browser icon in
the toolbar.
AIM*DataLink opens the Server File Browser (Figure 8-4).

Figure 8-4. Accessing Server Files

2. Use the pull down Server Directory selection box.


A pull-down menu appears with the available servers.
3. Select a server.
4. Click on the down arrow in the Look In selection box.
A pull-down menu appears with the available pathnames.
5. Select a pathname.
A list of filenames appears in the Server Directory selection box.
6. Select a filename.
The full path and filename appears in the File Name field.
7. Click on OK.
The selected file is now embedded in the PC application at the specified location.

Linking and Embedding AIM*DataLink Objects 87


B0193YJ – Rev B 8. OLE Functionality

Linking Objects
Windows applications that support linking of OLE objects also offer the Link to File option
for connecting I/A Series objects to PC applications. When this option is selected, a file dialog
box is displayed, which allows you to make a file selection and establish a link. The PC appli-
cation automatically detects the type of object being linked.
To use the Link to File option:
1. Select the Insert Object function from the PC application (see Figure 8-1
on page 85).
2. Click on the Create from File tab to open a file-selection dialog box like that in
Figure 8-5.

NOTE
Objects to be linked to PC applications must already exist, that is, the view must
already have been created in AIM*DataLink and saved to a .vew file.

Figure 8-5. Linking Files via OLE

88
8. OLE Functionality B0193YJ – Rev B

Linking Data Object View Files


To link a data object document to a PC application:
1. Select the AIM*DataLink file of interest (any file with the extension .vew) using
the Browse function as necessary.
2. Choose Link to File.
3. Click on OK to establish the link.

Linking Report View Files


To link a report document to a PC application:
1. Select the AIM*DataLink file of interest (any file with the extension .RPT) using
the Browse function as necessary.
2. Select Link to File.
3. Click on OK.

AIM*DataLink OLE Automation Interface


OLE Automation
OLE Automation is an industry-standard technology that conforming applications such as
AIM*DataLink use to expose their OLE objects to development tools, macro languages, and
other applications. OLE Automation makes it possible for anyone to write a scripting tool
(controller) that works in any language in order to access all the available automation objects
residing in another application.
When an application supports OLE Automation, the objects it exposes can be accessed by
VB. Hence, the programmer can use VB to manipulate these exposed objects by invoking
their methods and properties. Methods perform actions on an object; they are analogous to
function calls. Properties are characteristics of an object; they are like variable values.
OLE Automation offers the following benefits to application programmers:
♦ Code can be shared and reused
♦ Applications can be created using components built with a variety of tools and
languages
♦ Objects are accessible from any macro language or programming tool supporting
OLE Automation
♦ Versioning of object interfaces allows enhancements of OLE components without
causing errors in existing applications
With respect to AIM*DataLink, the following specific capabilities are available today:
♦ Sending real-time updates of data objects (points) to a VB application or an Excel
spreadsheet
♦ Changing the scan rate of real-time points
♦ Transferring files to and from a PC and a connected server

AIM*DataLink OLE Automation Interface 89


B0193YJ – Rev B 8. OLE Functionality

AIM*DataLink takes on the role of an OLE server, the entity which exposes one or more
objects for use by other applications. The applications and programming tools which access
those objects are called OLE clients. The OLE client determines which objects to use and
when to use them. The OLE server provides references to the requested objects on demand.
The objects which a conforming application (for example, AIM*DataLink) exposes to other
applications are called OLE Automation Objects or OLE objects. OLE Automation allows
the programmer to access exposed AIM*DataLink objects from outside AIM*DataLink.
It is not necessary to manually run or access the AIM*DataLink application program in order
to exploit this new capability. A single instance of the AIM*DataLink application is automati-
cally launched and runs in the background when an AIM*DataLink OLE object is first cre-
ated in the user application. All subsequent calls to the AIM*DataLink OLE object’s
properties and methods from the same calling program or from different programs access the
same instance of the AIM*DataLink application that is currently running. Separate, multiple
instances of AIM*DataLink are not created. The AIM*DataLink application is automatically
closed when the last OLE client application is closed.

AIM*DataLink OLE Objects


AIM*DataLink exposes two OLE automation objects that can be accessed by other applica-
tions: aimdlink.AIMSets and aimdlink.AIMFiles.
The AIMSets object exposes properties and methods that allow a programmer to:
♦ List the server alias names that the PC is configured to communicate with
♦ List the opened AIM*AT sets available on a given server
♦ Get the names of all the data objects contained within an AIM*AT set
♦ Provide real-time update values of any data object to a VB application program
♦ Provide real-time update values of any data object to an Excel
spreadsheet application
♦ Get or set the AIM*DataLink scan rate for real-time updates
♦ Request snapshot data from one or more data objects
The AIMFiles object exposes a single method that transfers files to and from a PC and a con-
nected server.
The remainder of this section covers VB call syntax for the AIMSets object and AIMFiles
object followed by the following three examples of applying OLE Automation capabilities to
AIM*DataLink OLE objects:
♦ Excel spreadsheet
♦ VB file transfer
♦ VB real-time update

90
8. OLE Functionality B0193YJ – Rev B

VB Call Syntax for the AIMSets Object


The following layout describes the VB call syntax for all the OLE Automation properties
and methods that are exposed by the AIMSets OLE object in the AIM*DataLink application.
♦ Create the AIMSets object in your VB program in order to access its properties
and methods
For example:
Dim AIMObj As Object
On Error Resume Next
Set AIMObj = CreateObject(“aimdlink.AIMSets”)
If Err > 0 Then
MsgBox “Cannot create the AIM Object”
Exit Sub
End If

VB Call Syntax for AIMSets Object Properties and Methods

ServerCount

Description Returns the number of servers that the PC is configured to communi-


cate with.
These are the servers that are configured in the PC’s an_init.cfg file.

Required variables nServers As Integer

VB call syntax nServers = AIMObject.ServerCount()


where:
♦ nServers is the returned number of servers

NOTE
This count is needed to size the string array for the GetServerNames call.

GetServerNames

Description Gets all the server alias names that the PC is configured to communi-
cate with.
These are the servers that are configured in the PC an_init.cfg file.

Required variables nServers As Integer


ServerNames(n) As String (n = the number of servers configured on
the PC)
Error As String

AIM*DataLink OLE Automation Interface 91


B0193YJ – Rev B 8. OLE Functionality

VB call syntax nServers = AIMObject.GetServerNames(ServerNames, Error)


where:
♦ nServers is the returned number of servers, or negative one (−1)
if there was an error.
♦ ServerNames is an empty array passed in the call that is sized for
the number of expected server names. Upon returning from the
call, the array contains the server name strings.
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

NOTE
The size of the ServerNames array is first determined by calling ServerCount.
The number returned is used to ReDim the ServerNames array before making
the GetServerNames call. Check the value of nServers upon return from the call.
If it is negative one (−1), display the Error string in a Message box to alert other
users as to the cause of the error.

SetCount

Description Returns the number of opened AIM*API sets that are on the named
server.

Required variables nSets As Integer


ServerName As String
SetName As String
Error As String

VB call syntax nSets = AIMObject.SetCount(ServerName, Error)


where:
♦ nSets is the returned number of sets, or negative one (−1) if
there was an error.
♦ ServerName is the server alias name of the server that has the
sets.
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

NOTE
This count is needed to size the string array for the GetSetNames call. Check the
value of nSets upon return from the call. If it is negative one (−1), display the
Error string in a Message box to alert other users as to the cause of the error.

92
8. OLE Functionality B0193YJ – Rev B

GetSetNames

Description Gets the names of all the opened AIM*API sets that are on the named
server.

Required variables nSets As Integer


ServerName As String
SetNames(n) As String (n = the expected number of returned set
names)
Error As String

VB call syntax nSets = AIMObject.GetSetNames(ServerName, SetNames, Error)


where:
♦ nSets is the returned number of sets, or negative one (−1) if
there was an error.
♦ ServerName is the server alias name of the server that has the
sets.
♦ SetNames is an empty array passed in the call that is sized for
the number of expected set names. Upon returning from the
call, the array contains the set name strings.
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

NOTE
The size of the SetNames array is first determined by calling SetCount.
The number returned is used to ReDim the SetNames array before making the
GetSetNames call. Check the value of nSets upon return from the call. If it is
negative one (−1), display the Error string in a Message box to alert other users
as to the cause of the error.

ItemCount

Description Returns the number of items contained in the named AIM*API set.

Required variables nItems As Integer


ServerName As String
SetName As String
Error As String

AIM*DataLink OLE Automation Interface 93


B0193YJ – Rev B 8. OLE Functionality

VB call syntax nItems = AIMObject.ItemCount(ServerName, SetName, Error)


where:
♦ nItems is the returned number of set items, or negative one (−1)
if there was an error.
♦ ServerName is the server alias name of the server that has the
set.
♦ SetName is the name of the set that has the items.
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

NOTE
This count is needed to size the string array for the GetSetItems call. Check the
value of nItems upon return from the call. If it is negative one (−1), display the
Error string in a Message box to alert other users as to the cause of the error.

GetSetItems

Description Gets the names of all the items contained in the named AIM*API set.

Required variables nItems As Integer


ServerName As String
SetName As String
SetItems(n) As String (n = the expected number of returned set names)
Error As String

VB call syntax nItems = AIMObject.GetSetItems(ServerName, SetName,


SetItems, Error)
where:
♦ nItems is the returned number of set items, or negative one (−1)
if there was an error.
♦ ServerName is the name of the server that has the set.
♦ SetName is the name of the set that has the items.
♦ SetItems is an empty array passed in the call that is sized for
the number of expected set items. Upon returning from the
call, the array contains the set item strings. Each string is the
Compound:Block.Parameter name of a point, or a
Shared Variable name.
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

94
8. OLE Functionality B0193YJ – Rev B

NOTE
The size of the SetItems array (n) is first determined by calling ItemCount.
The number returned is used to ReDim the SetItems array before making the
GetSetItems call.
Check the value of nItems upon return from the call. If it is negative one (−1),
display the Error string in a Message box to alert other users as to the cause of
the error.

GetScanTime

Description Gets the scan time value from the AIM*DataLink application.

Required variables nScanTime As Integer

VB call syntax nScanTime = AIMObject.GetScanTime


where:
♦ nScanTime is the returned scan time value (in milliseconds).

SetScanTime

Description Sets the scan time value for the AIM*DataLink application.

Required variables result As Boolean


nNewValue As Integer
Error As String

VB call syntax result = AIMObject.SetScanTime(nNewValue, Error)


where:
♦ result indicates success (True) or failure (False) of the call
♦ nNewValue is the value to which the scan time is set
(in milliseconds)
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

NOTE
If the result is False, display the Error string in a Message box to alert other
users as to the cause of the failure.

AIM*DataLink OLE Automation Interface 95


B0193YJ – Rev B 8. OLE Functionality

AddOleItemsToVB

Description This call is made from a VB application. OLE items are created in the
AIM*DataLink application from the names that are in an array passed
as an argument in this call. Once this call is made, the AIM*DataLink
application automatically sends real-time updates for the defined items
back to the VB application. AIM*DataLink sends the updates to the
named function in a VB Class Module. The pointer to the Class Mod-
ule and the name of the function are included as arguments in this call.

Required variables nItems As Integer


UpdateModule As New <Class Module Name>
FunctionName As String
ServerName As String
NamesArray(n) As String (n = the number of names in this array)
Error As String

VB call syntax nItems = AIMObject.AddOleItemsToVB(UpdateModule,


FunctionName, ServerName, NamesArray, Error)
where:
♦ nItems is the returned number of OLE items that were added to
the AIM*DataLink application, or negative one (−1) if there
was an error.
♦ UpdateModule* is a pointer to the VB Class Module that
receives the update messages sent from the AIM*DataLink
application for the defined items.
♦ FunctionName* is the name of the function in the Class
Module that processes the update message sent from the
AIM*DataLink application.
♦ ServerName is the server alias name of the server that has the
items.
♦ NamesArray is the array of names that are added as OLE items
in the AIM*DataLink application.
♦ LocationsArray is the array of strings that define the corre-
sponding cell locations for the items defined in the
NamesArray.
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

96
8. OLE Functionality B0193YJ – Rev B

NOTE
Refer to the VB Class Module description below. Duplicate OLE items are not
created in the AIM*DataLink application for any names listed in the call that
have already been added as OLE items. No error is indicated in the return from
the call. However, the returned number of items indicates how many unique
items were added. Check the value of nItems upon return from the call. If it is
negative one (−1), display the Error string in a Message box to alert other users
as to the cause of the error.

VB Class Module

Description One or more VB Class Modules must be used in conjunction with the
AddOleItemsToVB call. This call requires a pointer to the VB Object
(the Class Module) and the name of the function within the module
that processes the real-time update messages sent from the
AIM*DataLink application. The AIM*DataLink application automati-
cally sends an update message for each OLE item when the value for
that item changes.
For example, assume a class module name AIMUpdateModule1 has an update function
named IA_Updates.
To create a pointer to the VB Class Module, implementation is as follows:
1. Create the Class Module in the VB project named AIMUpdateModule1.
2. Create a pointer to the module with the following declaration statement:
Public UpdateModule1 As New AIMUpdateModule1
UpdateModule1 is the pointer that is used as the argument in the
AddOleItemsToVB call.
About the update function:
1. Declare an update function in the Class Module with a single Variant parameter as
follows:
Public Function AIM_Updates (AIMData As Variant)
The function name AIM_Updates is entered as a string argument in the
AddOleItemsToVB call.
The AIMData Variant is the value that is sent from the AIM*DataLink applica-
tion. The AIM*DataLink application sends individual Variant values for a specific
OLE item. The Variant value consists of an array of four values that are associated
with the OLE item.
The layout of the Variant is shown in Table 8-1 on page 98.

AIM*DataLink OLE Automation Interface 97


B0193YJ – Rev B 8. OLE Functionality

Table 8-1. Variant Layout

AIMData Index Description Data Type


(0) AIM*APIindex Integer
(1) ServerAlias/Name String
(2) Value Variant
(3) Status Integer

2. Access the values in AIMData as necessary to update your VB application with


real-time values.

AddOleItemsToXL

Description This call is made from an Excel spreadsheet application. OLE items
are created in the AIM*DataLink application from the I/A Series
names that are in an array that is passed as an argument in this call.
Once this call is made, the AIM*DataLink application automatically
writes the real-time update values for the defined items directly to the
Excel worksheet. The worksheet locations are also user-defined in an
array that is passed in the call.

Required variables nItems As Integer


WkSheetObj As Object
ServerName As String
NamesArray(n) As String (n = the number of names in this array)
LocationsArray(n) As String (n = the number of Location Strings in
this array)
Error As String

VB call syntax nItems = AIMObject.AddOleItemsToVB(WkSheetObj,


ServerName, NamesArray, LocationsArray, Error)
where:
♦ nItems is the returned number of OLE items that were added to
the AIM*DataLink application, or negative one (−1) if there
was an error.
♦ WkSheetObj is the Excel worksheet object where updates are
written.
♦ ServerName is the server alias name of the server that has the
items.
♦ NamesArray is the array of Compound:Block.Parameter names
added as OLE items in the AIM*DataLink application.

98
8. OLE Functionality B0193YJ – Rev B

♦ LocationsArray is the array strings that define the corresponding


cell locations for the items defined in the NamesArray.
♦ Error is an empty string passed with the call that contains error
information if the call was unsuccessful.
About the LocationsArray:
♦ Each of the names that are defined in the NamesArray must have a corresponding
location string defined in LocationsArray. Each location string defines the three
cell locations for plotting the Name, Value and Status for an I/A Series point.
Each location string is separated with a Tab character and must appear as follows:
“A1” + cTab + “F1” + cTab + “G1”
where:
♦ “A1” is where the Name is plotted
♦ “F1” is where the Value is plotted
♦ “G1” is where the Status is plotted
♦ cTab is the tab delimiter character and must be included
♦ It also defines the cell locations as:
♦ “A1:A1” rather than “A1”
♦ If you just want the Value and not the Name or Status, do this:
♦ cTab + “F1” + cTab
♦ If you just want the Status, do this:
♦ cTab + cTab + “G1”
Each string must include the two tab delimiter characters and must have at least
one cell location defined.
♦ Duplicate OLE items are not created in the AIM*DataLink application for any
names listed in the call that have already been added as OLE items. No error is
indicated in the return from the call. However, the returned number of items indi-
cates how many unique items were added.
♦ Check the value of nItems upon return from the call. If it is negative one (−1), dis-
play the Error string in a Message box to alert other users as to the cause of the
error.

GetOleItemCount

Description Gets the count of the number of OLE items that currently exist in the
AIM*DataLink application. This count is relative to the defined server
and the defined client object that are passed as arguments in the call.

Required variables nItems As Integer


UpdateObject As Object
ServerName As String
Error As String

AIM*DataLink OLE Automation Interface 99


B0193YJ – Rev B 8. OLE Functionality

VB call syntax nItems = AIMObject.GetOleItemCount(UpdateObject,


ServerName, Error)
where:
♦ nItems is the returned count of the number of OLE items.
UpdateObject
♦ If making this call from a VB application, UpdateObject is a
pointer to the Class Module.
♦ If making this call from an Excel spreadsheet application,
UpdateObject is a pointer to a worksheet object.
ServerName is the server alias name of the server that has the items.
Error is an empty string that is passed with the call that contains error
information if the call was unsuccessful.

NOTE
This count is needed to size the string array for the GetOleItems call.
Duplicate OLE items are not created in the AIM*DataLink application for any
names listed in the call that have already been added as OLE items. No error is
indicated in the return from the call. However, the returned number of items
indicates how many unique items were added. Check the value of nItems upon
return from the call. If it is negative one (−1), display the Error string in a
Message box to alert other users as to the cause of the error.

GetOleItems

Description Gets the data for all OLE items for the specified client application
object. The returned OLE item data is relative to the defined server and
the defined client object that are passed as arguments in the call. All the
data for the OLE items are returned in a string array which is passed as
an argument in the call. Use this call to poll all the OLE items and get
all the snapshot values.

Required variables nItems As Integer


UpdateObject As Object
ServerName As String
OleItemsArray(n) As String (n = the number of expected OLE item
strings)
Error As String

100
8. OLE Functionality B0193YJ – Rev B

VB call syntax nItems = AIMObject.GetOleItems(UpdateObject, ServerName,


OleItemsArray, Error)
where:
♦ nItems is the returned count of the number of OLE items.
UpdateObject
♦ If making this call from a VB application, UpdateObject is a
pointer to the Class Module.
♦ If making this call from an Excel spreadsheet application,
UpdateObject is a pointer to a worksheet object.
ServerName is the server alias name of the server that has the items.
OleItemsArray is an empty array passed in the call that is sized for the
number of expected OLE item strings. Upon returning from the call,
the array contains the OLE item strings. Each string contains the data
for a single OLE item and appears as follows:
♦ “APIindex <tab> IAName <tab> Value <tab> Status”
where:
♦ APIindex is the unique AIM*API index number of the item
♦ <tab> is a tab delimiter character
♦ Name is the name or Shared Variable
♦ Value is the value of the item
♦ Status is the status value of the item
♦ All the above item values are contained in the single string.
Therefore, all values are in ASCII format
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

NOTE
Check the value of nItems upon return from the call. If it is negative one (−1),
display the Error string in a Message box to alert other users as to the cause of
the error.

GetItemData

Description Gets the data for any single I/A Series object. The data is returned in a
single formatted string.

Required variables DataString As String


ServerName As String
ItemName As String
Error As String

AIM*DataLink OLE Automation Interface 101


B0193YJ – Rev B 8. OLE Functionality

VB call syntax DataString = AIMObject.GetItemData(ServerName, ItemName,


Error)
where:
♦ DataString is the returned data string for the specified item and
appears as follows:
“APIindex <tab> Name <tab> Value <tab> Status”
and where:
♦ APIindex is the unique AMI*API index number of the item
♦ <tab> is a tab delimiter character
♦ Name is the Compound:Block.Parameter name or Shared
Variable
♦ Value is the value of the item
♦ Status is the status value of the item
♦ All the above item values are contained in the single string.
Therefore, all values are in ASCII format
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

NOTE
Check the value of nItems upon return from the call. If it is negative one (−1),
display the Error string in a Message box to alert other users as to the cause of
the error.

DeleteOleItems

Description Delete the named OLE items from the AIM*DataLink application.
The names of the OLE items to be deleted are listed in
OleItem NamesArray, which is passed as an argument in the call. These
items are relative to the defined server and the defined client object that
are also passed as arguments in the call.

Required variables nItems As Integer


UpdateObject As Object
ServerName As String
OleItemNamesArray(n) As String (n = the number of OLE item
names)
Error As String

102
8. OLE Functionality B0193YJ – Rev B

VB call syntax nItems = AIMObject.DeleteOleItems(UpdateObject, ServerName,


OleItemNamesArray, Error)
where:
♦ nItems is the returned count of the number of OLE items
which were deleted.
♦ UpdateObject is a pointer to the Class Module, if making this
call from a VB application.
♦ UpdateObject is a pointer to a worksheet object, if making this
call from an Excel spreadsheet application.
♦ ServerName is the server alias name of the server that has the
items.
♦ OleItemNamesArray is the array of point names of the OLE
items that are deleted from the AIM*DataLink application.
♦ Error is an empty string that is passed with the call that contains
error information if the call was unsuccessful.

NOTE
Check the value of nItems upon return from the call. If it is negative one (−1),
display the Error string in a Message box to alert other users as to the cause of
the error.

VB Call Syntax for the AIMFiles Object


The following layout describes the VB call syntax for the OLE Automation method that is
exposed by the AIMFiles OLE object in the AIM*DataLink application.
Create the AIMFiles object in your VB program in order to access its method. For example:
Dim AIMFileObj As Object
On Error Resume Next
Set AIMFileObj = CreateObject(“aimdlink.AIMFiles”)
If Err > 0 Then
MsgBox “Cannot create the AIM Object”
Exit Sub
End If

VB Call Syntax for the AIMFiles Method

TransferFile

Description Executes the file transfer when given the server path, the PC path, the
direction flag, and the ASCII/binary flag.

AIM*DataLink OLE Automation Interface 103


B0193YJ – Rev B 8. OLE Functionality

Required variables result As Integer


ServerPath As String
PCPath As String
ServertoPC As Boolean
ASCII As Boolean
ResultString As String

VB call syntax result = AIMFileObj.TransferFile(ServerPath, PCPath, ServerToPC,


ASCII, ResultString)
where:
♦ result is the returned result of the file transfer:
1 If successful transfer from PC to server
2 If successful transfer from server to PC
0 If unsuccessful
♦ ServerPath is a string which defines the server path and file
name. The server path is of the following format:
SERVERALIAS/dir/dir/filename.ext
♦ PCPath is a string which defines the PC path and file name.
The PC path is of the following format:
C:\dir\dir\filename.ext
♦ ServerToPC is a flag which indicates the direction of the file
transfer. Set to True if transferring a file from the server to the
PC. Set to False if transferring a file from the PC to the server.
♦ ASCII is a flag that indicates the format of the file transfer. Set
to True if transferring a file in ASCII format. Set to False if
transferring a file in binary format.
♦ ResultString is an empty string that is passed with the call that
informs the user of the results of the file transfer.

NOTE
1. Check the value of the returned result integer to determine if the transfer
was successful. If nonzero, the transfer was successful.
2. Display ResultString to inform other users of the results of the file transfer. If
a destination file name is not entered, the source file name is automatically used
as the destination file name. However, the destination path string must end in a
/ or \ character.
If transferring a file from the server to the PC, and the PC path is not entered
(blank), then, by default, the file is transferred to the current directory on
the PC.

104
8. OLE Functionality B0193YJ – Rev B

Excel Spreadsheet Example


An example has been created to demonstrate how to use the AIM*DataLink OLE Automa-
tion functionality for displaying (plotting) real-time I/A Series data objects (points) on an
Excel spreadsheet. The example consists of two VB subroutines, Simple_Plot and Plot_A_Set.

NOTE
The Excel Spreadsheet Example is available on the AMI*AT Suite CD. You can
copy the example to your system and alter the code to suit your needs. The
Plot_A_Set subroutine can be used as is by substituting your server alias name
and a valid set name.

Note the following:


♦ The AIM*DataLink application starts automatically and runs in the
background the first time the AIM*DataLink OLE automation object is created in
these routines. The AIM*DataLink application automatically closes when you
close the Excel application.
♦ Each of the example subroutines (Simple_Plot and Plot_A_Set) plots the
I/A Series points on a separate worksheet (AIMSheet1 and AIMSheet2, respec-
tively), and each has its own disconnect routine (Disconnect_Sheet1 and
Disconnect_Sheet2, respectively).
♦ You can plot the same points on different sheets. The updates for the points on
any sheet are independent of other sheets. Multiple sheets can be active at the same
time.
♦ You can use these subroutine examples to add more sheets.
Plotting points on an Excel worksheet is accomplished by following these steps:
1. In Excel, choose Tools > Macro > VB Editor to access the VB Editor.
2. Create the AIM*DataLink OLE Automation object.
3. Define the names of the data objects you want to plot in one array.
4. Define the corresponding Excel sheet locations in another array.
5. Make the call to the AIM*DataLink OLE method AddOleItemsToXL to add the
points and start the real-time updates.
6. Call the AIM*DataLink OLE method Disconnect.
This step informs the AIM*DataLink application that it can stop sending updates
to that sheet, and it can delete the OLE objects that were created for that sheet.
7. Close the Excel application.
The Plot_A_Set example creates an Excel worksheet like that shown in Figure 8-6 on
page 106.

AIM*DataLink OLE Automation Interface 105


B0193YJ – Rev B 8. OLE Functionality

Figure 8-6. Excel Spreadsheet Example of OLE Automation

The names, values and status codes of 16 data objects are plotted on AIMSheet2 and updated
in real time.

File Transfer Example


An example has been created to demonstrate how to use the AIM*DataLink OLE
Automation functionality to transfer files in both directions between a Windows client and a
server station. The example consists of VB project files.

NOTE
The File Transfer Example is available on the AIM*AT Suite CD. You can copy
the example to your system and use it as is, or you can alter the code to suit your
needs.

106
8. OLE Functionality B0193YJ – Rev B

The example routines correspond to a few simple steps:


1. Create the AIM*DataLink object aimdlink.AIMFiles.
2. Call the AIM*DataLink automation method TransferFile to transfer a file between
the PC and server.
The method parameters specify the source and destination file paths, the transfer
direction, and the transfer result.
The example creates the AIM*DataLink File Transfer dialog box shown in Figure 8-7.

Figure 8-7. File Transfer Example of OLE Automation

The file paths shown in the text boxes of Figure 8-7 are defined to copy the opensets file on
the server to the PC path shown.
A few ground rules apply to entering file path specifications:
♦ If no file name is entered at the end of the destination path, the destination file
name automatically defaults to the file name listed in the source path.
♦ If no file name is entered at the end of a server destination path, the path must end
with a forward slash.
♦ If no file name is entered at the end of a PC destination path, the path must end
with a forward slash.
♦ If a PC destination path is not entered (empty string), the AIM*DataLink applica-
tion defaults the PC path to the current directory.

AIM*DataLink OLE Automation Interface 107


B0193YJ – Rev B 8. OLE Functionality

Real-Time Update (VB Grid Control) Example


An example has been created to demonstrate how to use the AIM*DataLink OLE Automa-
tion functionality to create a Set Browser from which objects can be selected, then plotted on
a VB Grid control. Once the I/A Series objects have been selected from the browser and
added as OLE items to AIM*DataLink, real-time update values are automatically sent from
the AIM*DataLink application and plotted to the grid. The example consists of VB project
files.

NOTE
The real-time update example is available on the AIM*AT suite CD. You can
copy the example to your system and use it as is, or you can alter the code to suit
your needs.

This example employs Class Modules and includes all the AIM*DataLink OLE Automation
calls except for AddOleItemsToXL and TransferFile, which are included in the previous exam-
ples.
The Set Browser dialog box created in this example appears in Figure 8-8, and the updating
grid is shown in Figure 8-9 on page 110.

108
8. OLE Functionality B0193YJ – Rev B

Figure 8-8. Set Browser Dialog Box in VB Grid Control Example

AIM*DataLink OLE Automation Interface 109


B0193YJ – Rev B 8. OLE Functionality

Figure 8-9. Updating Grid in VB Grid Control Example

110
9. Transferring Files
This chapter describes bidirectional transfers of files between servers and
connected PCs.
This section concerns transferring files between servers and networked Windows clients.
Through the file transfer capability of AIM*DataLink, you can:
♦ Select a server and PC disk drive
♦ Choose a server path and PC path
♦ Review available server and PC directories and files
♦ Select a source file
♦ Specify the destination file format and a new file name if desired
♦ Transfer the selected source file to its destination
Follow the procedures outlined in this section to:
♦ Invoke the File Transfer function
♦ Define file transfer preferences or settings
♦ Select and transfer files in either direction between servers and Windows clients

File Transfer Function


The File Transfer function is a tool for copying files between servers and networked Windows
clients. Once paths are chosen in both a selected server and in the client, you can examine all
available files, select one, and transfer it in either direction.
To transfer files:
1. Choose Tools > File Transfer, or click the File Transfer icon on the toolbar.
AIM*DataLink opens the File Transfer window, which consists of two tabs:
Settings and File Transfer. If there has been no previous configuration, the Set-
tings tab (Figure 9-1 on page 112) is displayed. If a configuration has previously
been set, the File Transfer tab (Figure 9-2 on page 113) appears first.

NOTE
Because selection of a server is required before initiating a file transfer, the Set-
tings tab only appears the first time the File Transfer function is used.

Two action buttons are available at the bottom of the File Transfer window:

Close Closes the File Transfer dialog box without further action.

Help Opens the AIM*DataLink Help function.

111
B0193YJ – Rev B 9. Transferring Files

Settings
To configure file transfer settings:
1. Click Settings if the Settings tab (Figure 9-1) is not already displayed.

Figure 9-1. File Transfer Settings Tab

The File Transfer window Settings tab is used to select the server and specify the
data format and transfer options.
2. Use the drop-down Server menu to select from among the connected servers.
The Messages field displays corresponding server-specific messages.
3. Select ASCII or Binary as the format of the file at the destination system.
The transferred file is converted automatically to the appropriate format.

NOTE
File transfers occur whether or not a file format has been specified. Be sure to
check the Format selection box for the appropriate setting, and, if necessary,
change it prior to transferring any file.

4. Click Prompt Before Transferring Files if you wish to verify a copy operation
before it is performed.

112
9. Transferring Files B0193YJ – Rev B

File Transfer
To transfer files:
1. Click File Transfer if the File Transfer tab is not already displayed (Figure 9-2).

Figure 9-2. File Transfer Tab

The top portion of the File Transfer tab shows the currently selected server and
client paths. Below each path description is a list of folders and files in each loca-
tion. At the bottom of the tab the two File Name fields specify the complete path
names for the selected items and offer an opportunity to rename any file to be
transferred.
2. Use the drop-down menu in the upper right corner of the tab to change the client
drive selection.
The current server is specified in the Settings tab.
3. Use the drop-down menus labeled Look In to select directories in the server and
client file systems.
The arrow buttons move the Look In selection up one-level in their respective
directory structures.
The text boxes show directories and files in the selected path.

File Transfer 113


B0193YJ – Rev B 9. Transferring Files

4. Double-click on a directory in the list box to display items it contains.


5. Highlight the source file in either the server or client list to enter the full path
name in the File Name box.

NOTE
Files can only be transferred one at a time. Directories cannot be transferred.

6. Review the file name and path in the other File Name box.
7. Click the appropriate arrow in the middle of the tab to transfer the file.
♦ The right-facing arrow copies the file specified in the server File Name box to
the location in the PC File Name box.
♦ The left-facing arrow copies the file specified in the PC File Name box to the
location in the server File Name box.

NOTE
If the left file transfer button is not active, your PC does not have the capability
to write files to a server. To establish this privilege, see your system
administrator.

If you have set the prompt action in the Settings tab, the AIM*DataLink prompts
you to confirm the transfer before it performs the copy.
8. When the transfer is complete, set up another file transfer, or click Close to shut
the File Transfer window.

114
10. Overview of ODBC
This chapter introduces the Open Database Connectivity (ODBC) API, describes
the capabilities of the ODBC Driver for Historian, defines applicable SQL
syntax, and provides examples of ODBC applications.
Networked Windows clients gain access to the I/A Series Historian database or
AIM*Historian using the de facto standard Open Database Connectivity (ODBC) applica-
tion programming interface (API). Microsoft’s ODBC 2.0 provides applications access to
DBMSs independent of their location, structure, or origin.

Definition of ODBC
ODBC is a standard API for accessing data in both relational and nonrelational database
management systems (DBMSs). Using the ODBC API, applications can access data stored in
a variety of PC, minicomputer, and mainframe DBMSs, even when each DBMS uses a differ-
ent data storage format and programming interface. To accomplish this DBMS indepen-
dence, ODBC architecture provides a logical separation between the application and the
DBMS. Conceptually, the ODBC API is to database access what the Microsoft Windows API
is to video displays, as ODBC provides device independence.
ODBC is based on the call level interface (CLI) specification of the X/Open SQL Access
Group, which is likely to become an ANSI and ISO standard. In addition to its influence in
the formal standards process, ODBC is becoming the informal standard for database connec-
tivity through its use in many software products:
♦ By 1994, all major Microsoft applications and development tools had supported
ODBC. Excel, Word, Access, Visual Basic, FoxPro, Microsoft SQL Server for
Windows NT, and Visual C++ use ODBC technology to access a variety of
DBMSs.
♦ Support for ODBC is not limited to Microsoft products. Nearly all DBMS ven-
dors and major independent software vendors support ODBC, including Lotus,
Powersoft, IBM, Oracle, Novell, and Borland.

Design Overview
ODBC frees application programmers from having to code their applications to different pro-
gramming interfaces when access or portability to multiple DBMSs is required.
Figure 10-1on page 116 depicts the alternative of coding to each DBMS vendor’s native API.

115
B0193YJ – Rev B 10. Overview of ODBC

Application Application Application

API 1 API 2 API 3 API 1 API 2 API 3 API 1 API 2 API 3

DBMS 1 DBMS 1 DBMS 1

Figure 10-1. Traditional DBMS Access

ODBC eliminates the API confusion by providing a single programming interface to


multiple DBMSs (Figure 10-2).

Application Application Application

ODBC

DBMS 1 DBMS 1 DBMS 1

Figure 10-2. ODBC DBMS Access

A single application can use data sources of various types without having to be recompiled for
each type of data source. This is accomplished with Windows dynamic link libraries (DLLs),
which can be loaded at runtime. To use a different type of data source, you must install a new
DLL and set up the ODBC driver in the Windows Control Panel.
The design of ODBC relies upon the widespread support by DBMS vendors of structured
query language (SQL). ODBC uses SQL and supports the relational data model in which
data can be described by the simple abstraction of tables with rows and columns and in which
relationships between tables can be described by the values that match in related columns.
With only these concepts, it is possible to model almost any kind of data and its relationships.
Because SQL is a language, it is more extensible than non-language-based solutions. It is eas-
ier to execute a statement with a new keyword or type of expression than it is to recode an
application to use a new kind of data structure.

116
10. Overview of ODBC B0193YJ – Rev B

A major problem for application writers is accessing a DBMS which is running on another
system across a network. ODBC shields application programmers from the details of the
underlying database and communications software needed to access the target data. ODBC
defines an abstraction called a data source, which is a name such as boiler one or pulper that
has meaning to the end user. ODBC maps this name to the appropriate implementation, net-
work software, server name or address, and context within the DBMS. The goal is to make it
easy for the application programmer to get the end user connected to the appropriate source
of data without having to become a networking expert.
Finally, ODBC provides functionality that can be used with all DBMSs while allowing an
application to exploit unique capabilities of a single DBMS. This application uses interroga-
tion functions that dynamically determine the capabilities of a DBMS. The application
programmer can then choose which capabilities to use either by hard-coding choices at devel-
opment time or by coding the application to make these choices at runtime.

ODBC Architecture
The architecture of ODBC is based upon the client/server model, yet it is flexible enough to
handle DBMSs that do not follow this model. The four components of this architecture are
application, driver manager, driver and data source. The relationships between these compo-
nents are depicted in Figure 10-3 on page 118.

ODBC Architecture 117


B0193YJ – Rev B 10. Overview of ODBC

User Interface

Client
Application

Driver Manager

Driver

Network/Communications
Software

DBMS
Server Data Storage Data Source

Figure 10-3. ODBC Components

Application
Applications are responsible for interacting with users via the user interface and for calling
ODBC functions to submit SQL statements and retrieve results.
Applications do all the work external to the ODBC interface. For example, a spreadsheet
application uses ODBC to access data in a database, then presents that data to users for
manipulation. Applications use ODBC to connect to data sources, send SQL requests to
those data sources, and retrieve results. An application using the ODBC interface performs
the following tasks:
♦ Requests a connection, or session, with a data source
♦ Sends SQL requests to the data source
♦ Defines storage areas and data format SQL request results
♦ Requests results
♦ Processes errors
♦ Reports results back to a user
♦ Terminates the connection to the data source

118
10. Overview of ODBC B0193YJ – Rev B

An application typically provides a variety of features external to the ODBC interface, for
example, spreadsheet capabilities, mail, online transaction processing, and report generation.
The application may or may not interact with users.

Driver Manager
The ODBC Driver Manager controls interactions between application programs and drivers.
Multiple applications and multiple drivers can be managed simultaneously.
An application calls an ODBC function in the Driver Manager, and the Driver Manager
routes the call to the correct driver. When an application first uses ODBC to connect to some
source of data, the Driver Manager determines which driver is required and loads that driver
into memory. From that moment forward, the Driver Manager simply takes any incoming
function call from the application and calls the function of the same name in the driver.
When the application calls the ODBC function to disconnect, the Driver Manager unloads
the driver from memory.
The Driver Manager performs the following tasks:
♦ Loads drivers as required
♦ Uses the OBDC registry to map a data source name to a specific driver DLL
♦ Processes several ODBC initialization calls
♦ Provides entry points to ODBC functions for each driver
♦ Provides parameter validation and sequence validation for ODBC calls

Driver
A Driver is a Dynamic Link Library (DLL) that implements ODBC function calls and inter-
acts with a data source. The Driver performs the following tasks in response to ODBC func-
tion calls from an application:
♦ Establishes a connection to a data source
♦ Submits requests to the data source
♦ Translates data to or from other formats if requested by the application
♦ Returns results to the application
♦ Formats errors into standard error codes and returns them to the application
♦ Declares and manipulates cursors if necessary
♦ Initiates transactions if the data source requires explicit transaction initiation

ODBC Architecture 119


B0193YJ – Rev B 10. Overview of ODBC

ODBC defines two types of drivers:

Single-Tier A single-tier driver processes both ODBC calls and SQL statements,
that is, the driver performs part of the data source functionality. This
configuration typically accesses a desktop database file, an ISAM, or a
flat file. A single-tier driver may limit the set of SQL statements that
may be submitted. The minimum set of SQL statements that must be
supported is the Minimum SQL Grammar.

Multiple-Tier A multiple-tier driver processes ODBC calls and passes SQL state-
ments to the data source.
ODBC requires drivers to provide standard error codes in addition to DBMS-specific error
codes to give applications a standard way of dealing with error conditions. ODBC provides:
♦ A simple return code mechanism that reports success or failure for each function
♦ A single standard error function that applications call every time an ODBC func-
tion fails or reports a warning
♦ Standard error codes for more than 85 error conditions
♦ All error information from the driver or the DBMS in addition to the standard
error codes
♦ A tagging scheme for identifying the component that reported the error
♦ A provision for returning multiple errors that occur from a single ODBC function
call

Data Source
Part of the ODBC mission is to hide much of the complexity of the underlying communica-
tions software that is present on client/server systems. Instead, for each data source to be
accessed, ODBC uses an abstraction that maps a single data source name (DSN) to all the
necessary underlying software components required to access the data. The DSN is chosen for
the end user to clarify the kind of data it represents.
In ODBC, the term data source is used for two purposes:
♦ As a conceptual term that defines the kind of data that the end user wants to access
(for example, Boiler 1, Pulper, or Pump House). In practice, the data source
includes the DBMS software running on a physical machine with some operating
system on some hardware platform, and the networking software required to
access the machine from the client. Refer again to Figure 10-3.
♦ As the actual name an end user or a system administrator assigns via an ODBC
utility to describe a particular collection of software components, such as an
ODBC driver and other software components such as a network library, a server
name or address, or a DBMS.

120
10. Overview of ODBC B0193YJ – Rev B

The ODBC Driver for Historian


In order to make use of ODBC, you should understand the level of ODBC conformance
and support available in the Foxboro ODBC Driver for Historian and, more generally, in
connected historian instances for I/A Series Historian and AIM*Historian.

Figure 10-4. ODBC for Historian Driver

Any Windows client equipped with the ODBC Driver for Historian is capable of accessing
any of the historian databases on the Information Network. Any networked PC can read data
from any of these databases, while only MDE data can be written to a server from the PC.
Within each database, data is structured as a series of tables with rows and columns. There-
fore, to access data on the network from a Windows client, it is necessary to specify:
♦ Data source
♦ Historian name
♦ Database name
♦ Table name
♦ Column names

Data Sources
Each server that is connected to a plant’s Information Network and has been configured as an
ODBC server is a potential ODBC Data Source. Data Sources on the Information Network
are identified by the ODBC Driver for Historian and are accessed by the server’s Alias name.
When the ODBC Driver attempts to access the server, users are validated by the server and
allowed access if authorized.
The ODBC Driver for Historian 121
B0193YJ – Rev B 10. Overview of ODBC

Historians
A single Data Source connection can provide the ODBC Driver for Historian transparent
access to any Historian on the I/A Series Node or to an AIM*Historian instance. Historians
on the node are classified as historians local to the server, or as remote historians (on other
AW/AP’s). Access to either historian type is equivalent with the following exceptions:
♦ Access to local historians is faster.
♦ Sample Database Archive access is only available from the local historian.
Whether an historian is local or remote is unknown to the ODBC Driver for Historian. It is
strictly up to a user to determine if an historian is local or remote.

Data Table Types


Each server which includes an historian consists of five databases:
♦ Sample data
♦ Reduction data
♦ Message data
♦ Manual Data Entry (MDE) data
♦ Event data (AIM*Historian only)
Each database is viewed as a set of tables. The dimensions of historian database tables are sum-
marized in Table 10-1.

Table 10-1. Structure of Historian Database Tables

Number of
Database Type Number of Tables Columns
Sample unspecified 5
Reduction unspecified >4
Message 14 4
MDE unspecified 6
Event unspecified >=3>4

Sample Data
The Sample database always contains at least one table (Current) which contains the current
collection data. Other tables that may be available are Sample Archive and Playback.
Each table consists of five columns: Time, Status, Source, Description, and Value. Data points
can be returned in either time-compressed format or time-linearized format.
The AIM*Historian view of sample data, that is, the view based on retrieval using an
AIM*Historian server, is of a single table, Current, containing the Time, Status, Source,
Description, and Value column names. There are no separate tables for Sample Archive and
Playback data.

122
10. Overview of ODBC B0193YJ – Rev B

Historian Data Linearization


Data accumulated in each historian’s sample database are stored in compressed form. A row is
added to the table only when a value changes. To decompress the data and make values avail-
able in a form suitable for presentation, the data must be time linearized. This is accomplished
by invoking the Historian ODBC Setup.
To linearize sample data:
1. Choose Start > Settings > Control Panel.
2. Click the ODBC Administrator icon.
Windows opens the Data Sources dialog box (Figure 10-5).

Figure 10-5. Data Sources

3. Select the appropriate historian driver in the data sources list and click SETUP.
Windows opens an ODBC Setup dialog box (Figure 10-6 on page 124).

The ODBC Driver for Historian 123


B0193YJ – Rev B 10. Overview of ODBC

Figure 10-6. ODBC Setup

4. Click in the Linearize Sample Data check box.


5. Enter the desired Sample Interval in seconds and the total Number of Samples to
be stored.
6. Click OK.

Reduction Data
The Reduction database contains tables consisting of the named reduction groups as defined
in the historian configuration.
For I/A Series Historians, a Reduction table consists of a set of reduction operations per-
formed on a set of collection points on a periodic basis. The columns of this table include
Time, Status, Source, Description, and from one to seven named value columns. The named
value columns assume the names configured in the historian for the reduction operation.
The AIM*Historian view of reduction data is identical to that of the I/A Series, except that up
to eight operational columns which may be configured, and one or more of the supported
I/A Series reduction operations are replaced by other operations. In addition, the reduced val-
ues have a somewhat different algorithmic origin.

Message Data
The Message database contains the fourteen message tables listed in Table 10-2.

124
10. Overview of ODBC B0193YJ – Rev B

Table 10-2. Historian Message Database

Message Table Related I/A Series Process


applic general application use
batch batch
equipment PAM<
form batch
mesgsys message file
opraction operator action
path PAM
path – excep PAM
procedure batch (BPM)
report batch
run batch
sysmonmsg monitor
unit batch
unknown

MDE Data
A Manual Data Entry (MDE) database contains tables consisting of the named groups as
defined in the historian configuration. A table consists of columns for Time, Status, Name,
Description, Units, and Value.
MDE databases served by a AIM*Historian data server consist of a single table
(MDE_Group) containing the same columns.

Event Data
An event database contains tables each of which represents an event message type. The table
name is <message group>:<message name>, where message group and message name together
define a message type. There are 14 preconfigured message tables corresponding to the
I/A Series Historian message types (for example, <legacy:path>), but viewed through the
AIM*Historian server interface, as well as tables representing user-defined event message
types. Every table contains three preconfigured columns: Time, MessageName and Message,
which hold the system timestamp, event message name and message body respectively.

Connecting to Data Sources


Before you submit SQL queries or retrieve data from ODBC you must establish a connection.
Establishing a connection identifies the ODBC Driver to be used, the I/A Series server and
optionally the default database to use. The selection of an ODBC Driver is accomplished by
using a DSN (Data Source Name). The default DSN for the Foxboro Historian Driver is
AIM_Historian. The syntax for this is:
“DSN=AIM_Historian”

The ODBC Driver for Historian 125


B0193YJ – Rev B 10. Overview of ODBC

In addition to the DSN you also need to specify which server to connect to. Other Data
Source Names may be set up that include the server or database to be used. If the server con-
nection is not specified as part of the connection string, the AIM Historian Driver either fails
the connection or displays a dialog box to allow you to select the server (this option is deter-
mined by the application). The syntax for specifying the server in the connection string is:
“DSN=AIM_Historian;AP=<server>”
Where <server> is the server’s Alias name.
As an option, the database to be used can be specified in the connection string. The syntax is:
“DSN=AIM_Historian;AP=<server>;DB=<database type>”
Where <database type> is Sample, Reduction, Message, MDE, or Event.
Some applications may require this option in order to work properly. Most notable is
Microsoft Access.

SQL Statements
SQL statements are ASCII string commands that define what data to retrieve from a selected
database table. The ODBC Driver for Historian supports a subset of SQL statements suffi-
cient to read and write data to historian database tables. The syntax of supported statements
along with examples are described below.

SQL Functionality
The historian driver is a single-tier driver implementation. The driver itself processes ODBC
SQL statements and retrieves the requested data from the servers.
The historian driver supports the ODBC API Conformance Level 1 functionality, the ODBC
Minimum SQL grammar, the BETWEEN predicate from the Core grammar, and the
TIMESTAMP data type from the Extended grammar.
Accordingly, the historian SQL parameters include the following:
sql_driver_ver = "2.1.0";
sql_odbc_api_conformance = SQL_OAC_LEVEL1;
sql_odbc_sag_cli_conformance = SQL_OSCC_COMPLIANT;
sql_odbc_sql_conformance = SQL_OSC_MINIMUM;

SQL Data Types


The ODBC Driver for Historian supports the SQL data types listed in Table 10-3.

Table 10-3. SQL Data Types Supported

SQL Data Type Server Application


SQL_CHAR Data source
SQL_TIMESTAMP UCT time stamp
SQL_SMALLINT I/A Series value status

126
10. Overview of ODBC B0193YJ – Rev B

Table 10-3. SQL Data Types Supported (Continued)

SQL Data Type Server Application


SQL_REAL Collection point data
SQL_VARCHAR Message data
SQL_INTEGER Integer data
SQL_DECIMAL Decimal
SQL_NUMERIC Numeric
SQL_FLOAT Floating point
SQL_DOUBLE Double precision

SQL Statement Syntax


An SQL statement is composed of several grammatical parts that express what, where, and
how data points are to be retrieved. For MDE databases, the grammar also expresses how
Event information is to be stored. The basic SQL statement for retrieving data contains two
clauses, a SELECT and a FROM. This simple form retrieves all available data. More advanced
SQL statements let you filter data by specifying additional search information. The WHERE,
GROUP BY, and ORDER BY clauses implement this.
To store MDE and Event data, the syntax also contains INSERT INTO and VALUES
clauses.

Selecting Data Tables


The FROM clause of the SQL statement allows you to specify the database, historian, and
table name to retrieve data from. The format for the FROM clause is:
♦ FROM table [synonym]
Where table represents the complete database, historian and table name. This three part table
specification has a defined syntax with some flexibility in the order of the parameters. Syntax
combinations are:
♦ database/historian.table_name
♦ historian.database/table_name
♦ historian.table_name
The last form is only applicable for the Sample database, or if the database was specified as
part of the Data Source connection.
Synonym is an option used to define a shorthand notation for the complete table. The syn-
onym is used in other parts of the SQL statement to refer to the table.
The INSERT INTO clause of the SQL statement allows you to specify the database, histo-
rian, and table name to store data to. The format for the INSERT INTO clause is:
♦ INSERT INTO table
where:
♦ table represents the complete database, historian and table name as
described above

SQL Statements 127


B0193YJ – Rev B 10. Overview of ODBC

Selecting Table Columns


The SELECT clause of the SQL statement allows you to specify the data columns to return
from the specified tables. The format for the SELECT clause is:
♦ SELECT [* | column_name(s)] [as new_column_name]
The ‘*’ specifies all data columns for all the specified tables. If only specific columns are to be
returned, then each desired column name needs to be specified. In this case the format is:
♦ SELECT column_1, column_2, column_3
If more than one table is to have data returned from it, the format is:
♦ SELECT synonym_1.column_1, synonym_2.column_1
When specifying specific columns, the order that columns are defined in determines the order
of the result table.
The column name may be changed by using the AS new_name specification. This new col-
umn name may be referenced in the remainder of the SQL string and is returned as the col-
umn name.
For storing data to a table, the columns need to be specified as part of the INSERT INTO
clause, such as:
♦ INSERT INTO table (column_1, column_2, column_3)

Filtering Table Results


The WHERE clause of the SQL statement allows you to specify how data is to be returned
from the specified tables. The format for the WHERE clause is:
♦ WHERE (operator_expression [AND/OR operator_expression])
Where the operator_expression can be any one of the following:
♦ column_name = value (equal)
♦ column_name <> value (not equal)
♦ column_name > value (greater than)
♦ column_name >= value (greater than or equal)
♦ column_name < value (less than)
♦ column_name <= value (less than or equal)
♦ column_name BETWEEN value1 AND value2 (inclusive)
♦ column_name NOT BETWEEN value1 AND value2 (exclusive)
♦ column_name LIKE value (string values only)
LIKE support includes single (_) and multiple (%) wildcard substitution character,
as well as escape character support.
♦ column_name NOT LIKE value (string values only)

128
10. Overview of ODBC B0193YJ – Rev B

Operator expressions are evaluated from left to right and can be combined in the
WHERE clause using either of the following:
♦ AND
♦ OR.
The value component of the operator expression can be a literal value, for time comparisons
of a time function (CURDATE, NOW), or a data parameter specifier. See “Data Parameters”
on page 130.
There are two special cases of literal values:
♦ String values that contain a period (.) must be quoted (single or double quotes)
♦ Timestamp values, which must be expressed in the form:
{ts ‘yyyy-mm-dd hh:mm:ss’}

Organizing Table Results


All historian tables maintain data in a time-stamped series. By default, the ODBC Driver for
Historian returns data sorted by time stamp. Using SQL statements, the default sort parame-
ter can be modified.

Grouping Data
The GROUP BY clause groups results by column data content. Multiple levels of groupings
are possible by defining more than one column. The format is:
GROUP BY (column_name[, column_name])

Sorting Data
The ORDER BY clause rearranges result set data, based on the ordering of a column’s data
content. The format is:
ORDER BY (column_name) [DESC | ASCEND]

Time Functions
In the WHERE clause, a time comparison can be specified against the current date/time or
the date/time representing today at 0 hours. These function are:

{fn NOW()} current date/time

{fn CURDATE()} current date at 0 hours

Aggregate Functions
The SELECT clause, in addition to specifying the columns and their order, allows you to per-
form specific functions on the column data. These function are:
♦ AVG (reals, & integers, floats, doubles, that is, all numeric datatypes)
♦ SUM (reals, & integers, floats, doubles, that is, all numeric datatypes)

SQL Statements 129


B0193YJ – Rev B 10. Overview of ODBC

♦ COUNT (all datatypes)


♦ MAX (all datatypes)
♦ MIN (all datatypes)
♦ FIRST (all datatypes)
♦ LAST (all datatypes)
Each function may take as parameter the keywords “ALL” or “DISTINCT,” referring to oper-
ations on all column values or only the unique values, respectively.

Writing Data Values


The VALUES clause, when used with the INSERT INTO clause of a SQL statement, allows
you to specify the data content to store in the specified table. The format is:
VALUES (value_1, value_2, value_3)
The order of the values is determined by the order of the columns defined in the INSERT
INTO clause. The value component can be a literal value, or a data parameter (see below).

Data Parameters
Substituting a ? for a value in a WHERE or VALUES clause allows data parameters to be sup-
plied dynamically when the SQL statement is executed and therefore does not need a literal
value to be built into the SQL query string.

Reading Data
The basic syntax is:
SELECT columns FROM table
Using data qualifiers:
SELECT columns FROM table WHERE column=value
Examples of read statements are as follows:
♦ SELECT applic_0.Time, applic_0.'Message ID', applic_0.Station
FROM Message/hist01.applic applic_0
♦ SELECT Time, Status, Name, Value
FROM MDE/hist01.lab1
WHERE (name=Value_1)
♦ SELECT Time, Value
FROM Sample/hist01.Current
WHERE (Source = 'UC01_LEAD:COSINE.MEAS')
ORDER BY Time DESC
♦ SELECT 'MDE/lab1_0'.Time, 'MDE/lab1_0'.Name, 'MDE/lab1_0'.Value
FROM MDE/hist01.MDE/labl 'MDE/lab1_0'
GROUP BY 'MDE/lab1_0'.Name

130
10. Overview of ODBC B0193YJ – Rev B

Writing Data from MDE and Event Tables


The basic syntax is:
INSERT INTO table (columns)
VALUES ( , , )
No qualifiers are supported.
The following is an example of a write statement:
INSERT INTO MDE/hist01.lab1 (time, status, name, value)
VALUES ({ts ’1995-08-08 08:50:00’}, 3, Value_1, 100.0)
The syntax of the INSERT statement is:
INSERT INTO event/hist01.mssggroup:msgname (column list) Values (value list)
where:
♦ event is the qualifier or type of table
♦ hist01 is the name of the database to which the Table belongs
♦ msggroup:msgname specifies the table name
♦ msggroup is the message group
♦ msgname is the message name
♦ column list is the list of message fields for which values are supplied in the
value list; if no column list, all columns are implied
The syntax of the CREATE TABLE statement is:
CREATE TABLE event/histname.msggroup:msgname(column1_name
column1_datatype(nelem1) column1_constraint, column2_name
column2_datatype(nelem2) column2_constraint...Columnj_name
columnj_datatype(nelemj) columnj_constaint table_constaint1...
table_constraintn)
where:
♦ event is the qualifier or type of table data
♦ histname is the name of the database to which the table belongs
♦ msggroup:msgname refers to the table name
♦ msggroup is the message group
♦ msgname is the message name
♦ column_name is the column name
♦ column_datatype is the column data type
♦ column_constraint is the constraining condition on the column
♦ nelem is the number of elements for array datatypes
♦ table_constraint is a constraining condition on multiple columns within the
table

SQL Statements 131


B0193YJ – Rev B 10. Overview of ODBC

Using SQL
Selecting Time Periods
Records are retrieved using a WHERE clause on the TIME column. Times are expressed in
ODBC TIMESTAMP format:
{ts ‘yyyy-mm-dd hh:mm:ss’}
If no time specification is given, all records for the table are retrieved, or if no starting time is
specified, records are retrieved starting from the beginning of the collection span. This behav-
ior is undesirable when retrieving Linearized Sample data, since the first record is assumed to
be Midnight, Jan. 1, 1970.
♦ SELECT Time, Value
FROM Sample/hist01.Current
WHERE (Source = 'UC01_LEAD:COSINE.MEAS' and
Time BETWEEN {ts '1996-08-08 08:50:00'} AND
{ts '1996-08-08 10:50:00'})

Retrieving Collection Tag Lists


SELECT Source FROM table GROUP BY Source
♦ SELECT lab1_0.Source
FROM Reduction/hist01.labl lab1_0
GROUP BY lab1_0.Source

Using ODBC
Using ODBC with Excel 5.0/7.0 VBA
Retrieving Historian Lists
Sub Get Historians()
Dim Historians

’Build the SQL connection string


connstr = “DSN=AIM_Historian;AP=P7AW01”
'Open the server connection
connectionID = sqlopen(connstr)

Historians = SQLGetSchema(connectionID, 3, "sample ")

sqlclose (connectionID)

End Sub

132
10. Overview of ODBC B0193YJ – Rev B

Retrieving Table Data Groups


Sub GetTableGroups()
Dim TableGroups

’Build the SQL connection string


connstr = “DSN=AIM_Historian;AP=P7AW01”
'Open the server connection
connectionID = sqlopen(connstr)

TableGroups = SQLGetSchema(connectionID, 4, "sample.hist01")

sqlclose (connectionID)

End Sub

Retrieving Collection Tag Lists


'
'Retrieves the collection group Tag names (Source)
'
Sub GetSelGroupItems()

'Get the selected database table names


connstr = “DSN=AIM_Historian;AP=P7AW01”
SelHistorian = “hist01”
SelGroup = “Pressures”

'Open the server connection


connectionID = sqlopen(connstr)

'Build the SQL query string


SQLString = "SELECT Source FROM " & SelHistorian & ".sample/" _
& SelGroup & " GROUP BY Source"

numColumns = sqlexecquery(connectionID, SQLString)

numrows = sqlretrieve(connectionID, ActiveCell, , , False)

sqlclose (connectionID)
End Sub

Retrieving Data
'
'Retrieve the data for the specified Tag
'
Sub GetSelTagColumns(TagID As Integer)

Using ODBC 133


B0193YJ – Rev B 10. Overview of ODBC

Dim SelServer As Integer

’Get the selected database table names


SelTag = ActiveSheet.Cells(TagID, 1)
SelHistorian = ActiveSheet.Cells(TagID, 2)
SelGroup = ActiveSheet.Cells(TagID, 3)
ServerStr = ActiveSheet.Cells(TagID, 4)

’Build the SQL connection string


connstr = "DSN=AIM_Historian;AP=" & ServerStr
’Open the server connection
connectionID = sqlopen(connstr)

’Build the SQL query string


QueryStart = ActiveSheet.Cells(1, 5)
QueryEnd = ActiveSheet.Cells(2, 5)
SQLString = "SELECT * FROM " + SelHistorian & ".sample/" & _
SelGroup & " WHERE (Source = ’" & SelTag & "’) AND (Time BETWEEN
"& _ QueryStart & " AND " & QueryEnd & ")"

’Execute the query


numColumns = sqlexecquery(connectionID, SQLString)

’Retrieve the data to the worksheet


numrows = sqlretrieve(connectionID, ActiveSheet.Cells(1, 6), ,
,True)
sqlclose (connectionID)
End Sub

Using ODBC with DAO

Retrieving Table Data Groups


Sub GetTableGroups()
Dim TableGroups
’When an error is encountered go to the label errorhandler:
On Error GoTo errorhandler
’Don’t display built in error messages
Application.DisplayAlerts = False

Dim Db As database, rec As Recordset


Dim ConnectStr As String
Dim sql As String
Dim fieldcount, i, j As Long

’Create connection string


ConnectStr = "odbc;dsn=AIM_Historian;AP=P7AW01;DB=sample"

134
10. Overview of ODBC B0193YJ – Rev B

’Open the server connection


Set Db = OpenDatabase("", 0, 0, ConnectStr) ’Open the database
tablecount = Db.TableDefs.Count ’Count the number of tables
For i = 0 To tablecount - 1 ’Loop to display all table names
ActiveSheet.Cells(1+i, 1) = Db.TableDefs(i).Name
Next
Db.Close
Exit Sub ’Exit the sub if no errors encountered
errorhandler:
MsgBox DBEngine.Errors(0).Description ’Text of error message
MsgBox DBEngine.Errors(0).Number ’Error number
MsgBox DBEngine.Errors(0).Source ’Where error occured
MsgBox DBEngine.Errors(0).HelpContext
End Sub

Retrieving Collection Tag Lists



’Retrieves the collection group Tag names (Source)

Sub GetSelGroupItems()
’When an error is encountered go to the label errorhandler:
On Error GoTo errorhandler
’Don’t display built in error messages
Application.DisplayAlerts = False

Dim Db As database, rec As Recordset


Dim ConnectStr As String
Dim sql As String
Dim fieldcount, i, j As Long

’Get the selected database table names


SelHistorian = ThisWorkbook.Worksheets("rawdata").Cells(1, 2)
SelGroup = ThisWorkbook.Worksheets("rawdata").Cells(1, 3)

’Create connection string


ConnectStr = "odbc;dsn=AIM_Historian;AP=P7AW01;DB=sample"

’Open the server connection


Set Db = OpenDatabase("", 0, 0, ConnectStr) ’Open the database

’Build the SQL query string


sql$ = "SELECT Source FROM " & SelHistorian & _
& SelGroup & " GROUP BY Source"
’Open database
Set rec = Db.OpenRecordset(sql$, dbOpenSnapshot, dbForwardOnly

Using ODBC 135


B0193YJ – Rev B 10. Overview of ODBC

+ _
dbSQLPassThrough)

j = 1
Do Until rec.EOF ’Continue until the last record
ActiveSheet.[e3].Offset(j, 1).Value = rec.Fields(1).Value
j = j + 1
rec.MoveNext ’Move to next record
Loop

Db.Close
Exit Sub ’Exit the sub if no errors encountered
errorhandler:
MsgBox DBEngine.Errors(0).Description ’Text of error message
MsgBox DBEngine.Errors(0).Number ’Error number
MsgBox DBEngine.Errors(0).Source ’Where error occured
MsgBox DBEngine.Errors(0).HelpContext
End Sub

Retrieving Data

’Retrieve the data for the specified Tag

Sub GetSelTagColumns(TagID As Integer)
’When an error is encountered go to the label errorhandler:
On Error GoTo errorhandler
’Don’t display built in error messages
Application.DisplayAlerts = False

Dim Db As database, rec As Recordset


Dim ConnectStr As String
Dim sql As String
Dim fieldcount, i, j As Long
Dim SelServer As Integer

’Get the selected database table names


SelTag = ActiveSheet.Cells(TagID, 1)
SelHistorian = ActiveSheet.Cells(TagID, 2)
SelGroup = ActiveSheet.Cells(TagID, 3)
ServerStr = ActiveSheet.Cells(TagID, 4)

’Create connection string


ConnectStr = "odbc;dsn=AIM_Historian;AP=P7AW01;DB=sample"

’Open the server connection


Set Db = OpenDatabase("", 0, 0, ConnectStr) ’Open the database

’Build the SQL query string

136
10. Overview of ODBC B0193YJ – Rev B

QueryStart = ActiveSheet.Cells(1, 5)
QueryEnd = ActiveSheet.Cells(2, 5)
SQLString = "SELECT * FROM " + SelHistorian & _
SelGroup & " WHERE (Source = ’" & SelTag & "’) AND (Time BETWEEN
"
& _
QueryStart & " AND " & QueryEnd & ")"

’Execute the query


Set rec = Db.OpenRecordset(SQLString, dbOpenSnapshot,
dbForwardOnly + _
dbSQLPassThrough) ’Open database
j = 1
Do Until rec.EOF ’Continue until the last record
For i = 0 To fieldcount - 1 ’Loop same num. times as num. of
fields
ActiveSheet.[e3].Offset(j, i).Value = rec.Fields(i).Value
Next
j = j + 1
rec.MoveNext ’Move to next record
Loop
Db.Close
Exit Sub ’Exit the sub if no errors encountered
errorhandler:
MsgBox DBEngine.Errors(0).Description ’Text of error message
MsgBox DBEngine.Errors(0).Number ’Error number
MsgBox DBEngine.Errors(0).Source ’Where error occurred
MsgBox DBEngine.Errors(0).HelpContext
End Sub

Using ODBC 137


B0193YJ – Rev B 10. Overview of ODBC

138
Appendix A. Status Advisories and
Messages
This Appendix summarizes a variety of error codes and messages.
AIM*DataLink offers a variety of status reports and error messages for the following:
♦ Server status
♦ DDE status
♦ Status descriptions for data objects
♦ AIM*DataLink error messages
♦ Historian ODBC driver errors

AIM*AT Server Status


Server status is available as a toolbar function. When selected, this function displays the
AIM*AT Server Status screen shown in Figure A-1.

Figure A-1. AIM*AT Server Status Screen

139
B0193YJ – Rev B Appendix A. Status Advisories and Messages

Three kinds of information are reported:


♦ Connected server and any associated messages
♦ PC client machine and its registered user name
♦ User access privileges
(To alter any of these, see your System Administrator.)
In Figure A-1, the Reconnect button is active only when the server is not connected. Click-
ing on Reconnect initiates an attempt to connect the server.

DDE Status
DDE status is available as a toolbar function. When selected, this function displays the DDE
Status screen (Figure A-2).

Figure A-2. DDE Status Screen

The information in the DDE Status screen relates to the DDE connections established
through AIM*DataLink and their update activity.

Status Descriptions for Data Objects


Each data object is associated with a status code and description. The data object status
description is encoded as a 16-bit word.
There are six fields in the status description:
<Data Type>-<Connect Status>-<Object Status>-<Security Bit>-
<Compound On/Off>-<Out of Service>
AIM*Historian current values follow the I/A Series Server 4.2 conventions.
As reported in a data object view, each of these fields is specified using a mnemonic text
descriptor. These text descriptors and their descriptions are listed in Table A-1 on page 141
for I/A Series Version 4.1 and earlier, and in Table A-2 on page 142 for I/A Series Version 4.2
and later.

140
Appendix A. Status Advisories and Messages B0193YJ – Rev B

Table A-1. Data Object Status Text for I/A Series Version 4.1 and Earlier

Bits 0 to 4: Object Value Description (Data Type)


Value Type Abbreviation in Description String
1 character CHR
2 integer INT
3 Float FLT
4 String STR
5 1 byte Boolean BOL
6 Long Integer LNG
9 Packed Boolean PBL
10 Packed Long PLN
Bits 5 to 7: Object Connect Status
Value Status Abbreviation in Description String
0 No Response NRSP
1 Being Scanned SCAN
2 Disconnected DISC
3 Deleted DEL
4 Bad Data Type NCON (Bad Data Type or unconnectable
compound)
6 Non Connectable NDND
If none of the above, the field defaults to blank.
Bit 8: Value Status
Value Meaning Abbreviation in Description String
0 OK OK
1 Object bad or disconnect BAD
If none of the above, the field defaults to blank.
Bit 9: Security Bit
Value Secured? Abbreviation in Description String
0 Unsecured NSEC
1 Secured SEC
If none of the above, the field defaults to blank.
Bit 10: On/Off
Value On/Off Abbreviation in Description String
0 Off Off
1 On On
If none of the above, the field defaults to blank.

Status Descriptions for Data Objects 141


B0193YJ – Rev B Appendix A. Status Advisories and Messages

Table A-1. Data Object Status Text for I/A Series Version 4.1 and Earlier (Continued)

Bit 11: Out-of-Service


Value Active/Inactive Abbreviation in Description String
0 Active {blank}
1 Inactive OOS
If the Out-of-Service bit is not set, the field is blank, which indicates that the parameter is in
service.
Bits 12 to 15 are reserved

Table A-2. Data Object Status Text for I/A Series Version 4.2 and Later

Bits 0 to 3: Object Value Description (Data Type)


Value Type Abbreviation in Description String
1 character CHR
2 integer INT
3 Float FLT
4 String STR
5 1 byte Boolean BOL
6 Long Integer LNG
9 Packed Boolean PBL
10 Packed Long PLN
Bit 4: Status Change
Value Meaning Abbreviation in Description String
1 Changed
0 Not Changed
Bits 5 to 7: Object Connect Status
Value Status Abbreviation in Description String
0 No Response NRSP
1 Being Scanned SCAN
2 Disconnected DISC
3 Deleted DEL
4 Bad Data Type NCON (Bad Data Type or unconnectable
compound)
6 Non Connectable NDND
If none of the above, the field defaults to blank.

142
Appendix A. Status Advisories and Messages B0193YJ – Rev B

Table A-2. Data Object Status Text for I/A Series Version 4.2 and Later (Continued)

Bit 8: Value Status


Value Meaning Abbreviation in Description String
0 OK OK
1 Object bad or BAD
disconnect
If none of the above, the field defaults to blank.
Bit 9: Security Bit
Value Secured? Abbreviation in Description String
0 Unsecured NSEC
1 Secured SEC
If none of the above, the field defaults to blank.
Bit 10: Ack/Uncond. Init.
Value Ack./Uncond. Init.? Abbreviation in Description String
0 No
1 Yes
If none of the above, the field defaults to blank.
Bit 11: Out-of-Service
Value Active/Inactive Abbreviation in Description String
0 Active {blank}
1 Inactive OOS
If the Out-of-Service bit is not set, the field is blank, which indicates that the parameter is in
service.
Bit 12: Shadow Parameter
Value Parameter Abbreviation in Description String
0 Non-shadow
1 Shadow
Bit 13: Limited High
Value Limited High? Abbreviation in Description String
0 No
1 Yes
Bit 14: Limited Low
Value Limited Low? Abbreviation in Description String
0 No
1 Yes

Status Descriptions for Data Objects 143


B0193YJ – Rev B Appendix A. Status Advisories and Messages

Table A-2. Data Object Status Text for I/A Series Version 4.2 and Later (Continued)

Bit 15: Configurable Error


Value Status Abbreviation in Description String
0 OK
1 Error
Bits 16 to 31 are reserved

AIM*DataLink Error Messages


The error codes and messages generated by AIM*DataLink are summarized in Table A-3.

Table A-3. AIM*DataLink Error Messages

AIS
ID ID Message
4132 1 Invalid number of entries (call-level error).
4133 1 Unable to access object (object-level error).
4134 2 Invalid access type.
4135 3 Unable to allocate resources.
4136 4 All databases are used.
4138 6 All change queues are used.
4139 7 Out of resources (rw when load leveling).
4140 8 Out of resources (rw when gws specified).
4141 9 I/O error on request file.
4142 10 I/O error on rebuild file.
4143 11 Central Task is unable to open this INI-10 list.
4144 12 Central Task is unable to close this INI-10 list.
4145 13 At least one of the value types does not match.
4146 14 Data set is not within range.
4147 15 Data set not currently opened.
4148 16 System dependent error. (General routines).
4149 17 File I/O error. (General routines).
4150 18 X.25 I/) error. (General routines).
4151 19 Not locked. (General routines).
4152 20 Reassign in progress. (General routines).
4153 21 Invalid queue number.
4154 22 Queue is empty.
4155 23 Queue is not empty.
4156 24 Fewer changes returned than requested.
4157 25 Invalid gateway.

144
Appendix A. Status Advisories and Messages B0193YJ – Rev B

Table A-3. AIM*DataLink Error Messages (Continued)

AIS
ID ID Message
4158 26 At least one of the entries has an error.
4159 27 Illegal number of entries.
4160 28 Type mismatch (uread only).
4161 95 UNIX command line file open error.
4162 96 UNIX response file open error.
4163 97 No letterbug prompt returned from gateway.
4164 98 Login name character not echoed.
4165 99 Command line character not echoed.
4166 100 Not able to logoff from UNIX.
4167 101 Response buffer not big enough.
4168 102 File error on write to UNIX response file.
4169 103 Internal error.
4170 94 Invalid password or primary prompt string.
4171 29 Write to read-only data set.
4172 30 Unconfigured gateway (’node’ 0).
4173 31 Invalid circuit type.
4174 32 Have already specified ’keep’ with GETCIR.
4175 33 Have NOT specified ’keep’ with GETCIR.
4176 34 Not string to get.
4177 35 Invalid group for load levelling.
4178 36 Invalid value type (NOT IN [1,2,3,4,5,6]).
4179 37 Invalid write delta.
4180 38 Invalid read scan rate.
4181 39 Invalid write scan rate.
4182 40 Invalid match of read and write scan rate.
4183 41-42 Invalid match of read and write delta.
4184 46 Remote directory not writable.
4185 47 HOSTNAM not found.
4186 48 HOSTNAMcw or HOSTDIR not found, directory invalid, etc.
4187 49 No Read or Read/Write access.
4188 50 Host I/O error.
4189 51 Host file cannot be opened and/or created.
4190 52 Host file cannot be opened.
4191 53 Unable to assign channel.
4192 54 Unable to set up the circuit.
4193 55 Server file cannot be opened.
4194 56 Server file cannot be read.

AIM*DataLink Error Messages 145


B0193YJ – Rev B Appendix A. Status Advisories and Messages

Table A-3. AIM*DataLink Error Messages (Continued)

AIS
ID ID Message
4195 57 Host file cannot be written.
4196 58 Host file cannot be read.
4197 59 Unable to set pointer to server file.
4198 60 Server file cannot be written.
4199 61 Server file cannot be closed.
4201 62 Unable to clear circuit.
4202 63 Unable to deassign channel
4203 64 Not in range ’0’ to ’9’.
4204 65 No null terminator.
4205 66 Offset and/or numchr not valid.
4206 67 Unable to specify conversion files.
4207 68 Unable to specify convert qualifiers.
4208 69 Unable to perform conversion of file.
4209 70 Unable to open strmfile.tmp after conversion.
4210 71 Unable to close strmfile.tmp after conversion.
4211 72 Unconfigured remote file system logical name.
4212 73 Unable to mount remote file system.
4213 74 Host file cannot be closed.
4214 75 pfwrit numchr > 1000.
4215 80 Invalid gateway.
4216 81 Unconfigured gateway.
4217 82 Unable to assign a channel.
4218 83 Unable to set up a circuit.
4219 84 Unable to read x.25 channel.
4220 85 Unable to access terminal characteristics.
4221 86 Unable to modify terminal characteristics.
4222 87 Unable to restore terminal characteristics.
4223 88 Unable to read character from keyboard.
4224 89 Unable to write to gateway.
4225 90 Unable to release circuit.
4226 91 Unable to deassign channel.
4227 92 Virtual terminal disconnect.
4228 93 Invalid login name.
4248 File Open is only allowed on View files (.VEW) and Report Files (.RPT).
4339 Invalid Beginning Date/Time!
4340 Invalid Ending Date/Time!
4352 Cannot Connect to Alias Name : %1\nOn AIM*API Server : %2.

146
Appendix A. Status Advisories and Messages B0193YJ – Rev B

Table A-3. AIM*DataLink Error Messages (Continued)

AIS
ID ID Message
4354 AIM*DataLink NOT Authorized for Alias Name : %1\nOn AIM*API
Server : %2\n\t\t\t\t.
4355 Communications Problem with Alias Name : %1\nOn
AIM*API Server : %2.
4356 Lost Connection to Server.
4357 NO READ Access for Alias Name : %1\nOn AIM*API Server : %2.
4360 Read Data Error : %1.
4362 Missing ’[’
4363 Invalid Command
4364 Missing ’)’.
4365 Too few arguments.
4366 Too many arguments.
4367 Error Converting Files.
4369 No Stations selected. Please select desired stations from Control Sta-
tions filter tab.
4370 Historian Collection Point List NOT Available.
4371 Unable to read drive: %1
4372 Unable to get station names.
4373 Unable to find server information. No servers have been configured or
no server has been selected from settings page.
4374 The specified Tag was not found in the Custom Format string. The
clipboard item(s) will have no value(s). Use as is and Continue?
4375 200 Object not opened in AIM*API database.
4376 201 Object not added to CDX.
4377 202 an_dq_changes allowed, not others.
4378 203 No active servers with objects in CDX.
4379 205 Object already added, multiples not allowed.
4380 206 Invalid delta value.
4381 207 No current server.
4382 208 Object not added for Read/Write access.
4383 209 Some object has warning error.
4384 210 Number of entries is bigger than MaxEnt.
4385 211 No objects in CDX.
4386 212 No security access to desired function.
4387 1001 Memory allocation error.
4388 1002 Protocol not specified.
4389 1003 Invalid Message.
4390 1004 Invalid Opcode.

AIM*DataLink Error Messages 147


B0193YJ – Rev B Appendix A. Status Advisories and Messages

Table A-3. AIM*DataLink Error Messages (Continued)

AIS
ID ID Message
4391 1005 Host name not specified.
4392 1006 All server entries in use.
4393 1007 Unable to communicate with server.
4394 1008 Server ID out of range.
4395 1013 Invalid argument.
4398 Invalid filename specified : %1.
4441 Report files always have a ““:a””.rpt”“ extension!\nThe file
“”%s””%s”” \n will automatically be modified to have
a”a””.rpt”a”a””.rpt”” extension
4442 File %1 not found. \nPlease verify that the file exists.
4449 AIM*API call TimeOut.

Foxboro ODBC Driver Errors


The ODBC Driver utilized by I/A Series Historians generates the error messages listed in
Table A-4.

Table A-4. Foxboro ODBC Driver Errors

Error Code Definition


00000 No Error
01000 General warning
01002 Disconnect error
01004 Data truncated
01006 Privilege not revoked
01S00 Invalid connection string attribute
01S01 Error in row
01S02 Option value changed
01S03 No rows updated or deleted
01S04 More than one row updated or deleted
07001 Wrong number of parameters
07006 Restricted data type attribute violation
08001 Unable to connect to data source
08002 Connection in use
08003 Connection not open
08004 Data source rejected establishment of connection
08007 Connection failure during transaction
08S01 Communication link failure

148
Appendix A. Status Advisories and Messages B0193YJ – Rev B

Table A-4. Foxboro ODBC Driver Errors (Continued)

Error Code Definition


21S01 Insert value list does not match column list
21S02 Degree of derived table does not match column list
22001 String data right truncation
22003 Numeric value out of range
22005 Error in assignment
22008 Datetime field overflow
22012 Division by zero
22026 String data, length mismatch
23000 Integrity constraint violation
24000 Invalid cursor state
25000 Invalid transaction state
28000 Invalid authorization specification
34000 Invalid cursor name
37000 Syntax error or access violation
3C000 Duplicate cursor name
40001 Serialization failure
42000 Syntax error or access violation
70100 Operation aborted
IM001 Driver does not support this function
IM002 Data source name not found and no default driver specified
IM003 Specified driver could not be loaded
IM004 Driver’s SQLAllocEnv failed
IM005 Driver’s SQLAllocConnect failed
IM006 Driver’s SQLSetConnect-Option failed
IM007 No data source or driver specified; dialog prohibited
IM008 Dialog failed
IM009 Unable to load translation DLL
IM010 Data source name too long
IM011 Driver name too long
IM012 DRIVER keyword syntax error
IM013 Trace file error
S0001 Base table or view already exists
S0002 Base table not found
S0011 Index already exists
S0012 Index not found
S0021 Column already exists
S0022 Column not found
S0023 No default for column

Foxboro ODBC Driver Errors 149


B0193YJ – Rev B Appendix A. Status Advisories and Messages

Table A-4. Foxboro ODBC Driver Errors (Continued)

Error Code Definition


S1000 General error
S1001 Memory allocation failure
S1002 Invalid column number
S1003 Program type out of range
S1004 SQL data type out of range
S1008 Operation canceled
S1009 Invalid argument value
S1010 Function sequence error
S1011 Operation invalid at this time
S1012 Invalid transaction operation code specified
S1015 No cursor name available
S1090 Invalid string or buffer length
S1091 Descriptor type out of range
S1092 Option type out of range
S1093 Invalid parameter number
S1095 Function type out of range
S1096 Information type out of range
S1097 Column type out of range
S1098 Scope type out of range
S1099 Nullable type out of range
S1100 Uniqueness option type out of range
S1101 Accuracy option type out of range
S1103 Direction option out of range
S1105 Invalid parameter type
S1106 Fetch type out of range
S1107 Row value out of range
S1108 Concurrency option out of range
S1109 Invalid cursor position
S1110 Invalid driver completion
S1111 Invalid bookmark value
S1C00 Driver not capable
S1T00 Timeout expired

150
Appendix A. Status Advisories and Messages B0193YJ – Rev B

Excel Access Errors


Errors associated with Excel access to historian data are listed in Table A-5. These errors can
arise during use of the Foxboro AIM*Historian Excel Add-In function.

Table A-5. Excel Access Errors

Error Message Definition


The following errors can be caused by an historian or AIM*Historian problem, such as asking
for nonexistent points, or data outside the time period during which historian data values were
collected.
Historian off Caused by -1 in AIM*Historian status
Data created Caused by -2 in AIM*Historian status
(AIM*Historian created value?)
Object bad Caused by status word having Bit 8 set
Out of service Caused by status word having Bit 11 set
FH sts=XXX Caused by other unknown status word
Value = “XXX”
Unhandled data type Caused by OM data type unknown to Add-in
Disconnected Caused by OM status = 2
Deleted Caused by OM status = 3
Bad data type or unconnectable Caused by OM status = 4
Non-connectable Caused by OM status = 6
NA Caused by OM status unknown to Add-in
GetTimeLinearData returned error Actual error is not passed back

The following errors can be caused by a programming bug in the Excel Add-in or in the DLL.
Invalid point name Bad point name argument passed to DLL
Unable to find server and point names DLL could not find the “/” character
Date argument pointer error Bad date argument passed to DLL
Operation argument error Bad operation argument passed to DLL
No connected server Cannot connect to designated server
No data returned No error status from GetTimeLinearData, but no data
points returned
Invalid value array Bad data array pointer argument passed to DLL
Invalid value array: number of Bad data array pointer argument passed to DLL
dimensions must equal 1
Failed to determine value array bounds Bad data array pointer argument passed to DLL
Invalid status array Bad status array pointer argument passed to DLL
Invalid frequency Bad frequency argument passed to DLL
SafeArrayPutElement value failed DLL failure while writing to caller’s data array

Excel Access Errors 151


B0193YJ – Rev B Appendix A. Status Advisories and Messages

152
Index
A
Accessing the Historian 49
Action buttons 50, 59, 113
Add button 37
Add item dialog box 37
AIM*API server status tool 14
AIM*DataLink
error messages 144
exit 8
usage summary 15
Application processors 2
Application workstations 2

B
Back button 31
Block-compound sort option 32
Blocks 4
Browsers
accessing 14

C
Cancel button 31
Clear all button 30, 37
Client/server relationship 2
Clipboard 13
Clipboard format
custom 62
Lotus 1-2-3 62
Microsoft Excel 62
Close button 38
Closing views 71
Collapse button 30
Comments
where to direct comments xiv
Compound-block AND parameters search option 35
Compound-block filter tab 24, 31
Compound-block search option 35
Compound-block sort option 32
Compounds 4
Connecting data objects
Excel 4.0 and 5.0 69

153
Contents icon 11
Copy icon 11
Custom 62

D
Data object browser icon 11
Data object browser tool 14
Data object views 62
DDE 62
Example of 63
Data object wizard
I/A server filter tab 29
main tab 24
results tab 36
view options dialog box 38
Data object wizard search options
Compound-block 35
Compound-block AND parameters 35
parameters 36
Data objects 4
Data sets 4
Database Management Systems (DBM) 4
DDE 3
connection status tool 14
status icon 11
DDE connection status tool 14
DDE status icon 11
Delete button 38
Dynamic Data Exchange (DDE) 1

E
Edit menu 13
components 13
Embedding objects 85
data object documents 85
I/A Series server files 87
report documents 86
Entry name column 53, 55
Error messages 144
Ethernet 2
Excel 4.0 and 5.0 69
Exit AIM*DataLink 8
Expand button 30
Export button 38

154
F
File menu 13
File menu components 13
File system 3
File transfer 111, 113
no previous configuration 111
previous configuration 111
screen components 113
settings 112
File transfer icon 11
File transfer tool 14
Files
description of 7
Filter button 29
Filter tab controls 29
back 31
cancel 31
clear all 30
collapse 30
expand 30
filter 29
help 31
next 31
select all 30
show selected 30
Foxboro Customer Satisfaction Center xiv
Functions
preferences 5
views 5

H
Help button 31
Help icon 12
Help menu 15
Historian 3, 49
action buttons 50
browser icon 11
browser screen 51
databases 49
description 7
message tables 53
ODBC driver errors 148
view 55

155
Historian browser 49
icon 11
select a server 51
select data items 52
settings 50
tool 14
Historian view
example of 65

I
I/A parameter type
filter 33
I/A Series data
data objects description 7
files description 7
Historian description 7
reports description 7
sets description 7
I/A server filter tab 29
Iconize 14
Import button 38
Insert object function 84

L
Linking objects 88
data object documents 89
report documents 89
Linking objects to PC applications 67
copying Historian text 67
DDE linking data objects 68
Lotus 1-2-3 62
Lotus 1-2-3 for Windows 70

M
Main tab 24
Main window 8
components 9
Manual Data entry
database 49
Manual data entry 53, 55

156
Menu bar
edit 13
file 13
help 15
tools 14
view 13
Message database 49
Microsoft Excel 62
Microsoft Windows
Windows 3.1 3
Windows NT 3
Mouse buttons 8

N
Networked AIM*API
file system 3
Historian 3
Object Manager 3
Next button 31

O
Object embedding 3
Object linking
right mouse button menus 68
Object Manager 3
Object search dialog box 35
Object views 61
ODBC 4
OLE 2.0 3
Open a file icon 11
Open database connectivity 4

P
Parameter type
filter 24
results tab 24
Parameters search option 36
Path aliases 4
Preferences
screen 12
Preferences icon 11
Preferences tool 14
Printing views 67

157
R
Reduction database 49
Reduction table 52, 54
Refresh button 37
Report browser
components 59
screen 59
settings 58
Report browser icon 11
Report browser tool 14, 57
Report views 66
Reports description 7
Results tab 36
add option 37
clear all option 37
refresh option 37
select all option 37
Revision information xiii

S
Sample database 49
Save icon 11
Saving views 66
Scan time 4
Select all button 30, 37
Server status icon 11
Set browser usage 108
Sets description 7
Settings 50, 58
action buttons 59
Shared variables 4
Show selected button 30
Show selected dialog box 30
Source 52, 54
SQL 4
Status 52, 53, 54, 55
Status column 53
Status reports
data objects 140
DDE 140
Structured Query Language 4

T
Time stamp 52, 53, 54, 55
Time stamp column 53
Toolbar functions 11

158
Tools menu 14
Transferring files 111
action buttons 113
prompt before 112
Troubleshooting 139

V
Value 53, 54, 55
Value column 52, 53
View menu 13
View menu components 13
View options dialog box 38
close 38
delete 38
export 38
import 38
Views
accessing 61
closing 71
specifying 61

W
Window menu components 14

159
B0193YJ – Rev B Index

The Foxboro Company


33 Commercial Street
Foxboro, Massachusetts 02035-2099
United States of America
http://www.foxboro.com
Inside U.S. 1-508-543-8750 or 1-888-FOXBORO (1-888-369-2676)
Outside U.S. - Contact your local Foxboro Representative.

Printed in U.S.A. 0899


An Invensys company

You might also like