0% found this document useful (0 votes)
115 views186 pages

CS 1000/CS 3000 CENTUM Data Access Library

CS3000

Uploaded by

sellah samir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views186 pages

CS 1000/CS 3000 CENTUM Data Access Library

CS3000

Uploaded by

sellah samir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 186

Toc-1

CS 1000/CS 3000
CENTUM Data Access Library
IM 33S02T10-01E 6th Edition

CONTENTS
1. Overview ................................................................................................. 1-1
2. Library for Using with Visual Basic 6.0 .................................................. 2-1
2.1 Methods of CENTUM Data Access Library .................................................... 2-2
2.1.1 Get Station List ................................................................................. 2-3
2.1.2 Get Station Information ..................................................................... 2-4
2.1.3 Get Tag Data .................................................................................... 2-6
2.1.4 Put Tag Data ..................................................................................... 2-8
2.1.5 Get Tag List ...................................................................................... 2-9
2.1.6 Get Tag Information ........................................................................ 2-10
2.1.7 Get Tag Item List ............................................................................. 2-12
2.1.8 Get Tag Item Information ................................................................. 2-13
2.1.9 Get Common Block Data ................................................................ 2-16
2.1.10 Put Common Block Data ................................................................. 2-17
2.1.11 Get Control Recipe List ................................................................... 2-18
2.1.12 Get Common Block List .................................................................. 2-19
2.1.13 Get Recipe Header Information ...................................................... 2-20
2.1.14 Get Common Block Item List .......................................................... 2-22
2.1.15 Get Common Block Item Information .............................................. 2-23
2.1.16 Put Operator Guide Message ......................................................... 2-25
2.1.17 Get Historical Message ................................................................... 2-26
2.1.18 Search for Historical Message ........................................................ 2-28
2.1.19 Get Historical Trend Data ................................................................ 2-31
2.1.20 Get Historical Trend List .................................................................. 2-34
2.1.21 Get Closing Data ............................................................................ 2-37
2.1.22 Get Closed Data Item ID List ........................................................... 2-40
2.1.23 Get Data and Time that OPC Server starts in HIS ........................... 2-42
2.1.24 Event Notification Request .............................................................. 2-43
2.1.25 Shutdown Event Notification Request ............................................. 2-50
2.2 Properties of CENTUM Data Access Library ............................................... 2-51
2.2.1 OPC Server Property ...................................................................... 2-52
2.2.2 HIS Shutdown Notification .............................................................. 2-53
2.2.3 Library Test Mode ........................................................................... 2-54
2.2.4 Get Tag Quality Code ...................................................................... 2-55
2.2.5 Tree Type Display ........................................................................... 2-56

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


Toc-2
2.2.6 Alarm/Event Notification ................................................................. 2-57
2.2.7 Message Searching Direction ......................................................... 2-58
2.2.8 Trend Data Searching Direction ...................................................... 2-59
2.2.9 Get Trend Quality Code .................................................................. 2-60
2.2.10 Closing Data Searching Direction ................................................... 2-61
2.2.11 Get Closing Data Quality Code ....................................................... 2-62
2.3 Events in CENTUM Data Access Library ..................................................... 2-63
2.3.1 Alarms and Messages Notification .................................................. 2-64
2.3.2 HIS Shutdown Notification .............................................................. 2-66
2.4 Run Modes of CENTUM Data Access Library .............................................. 2-67
2.5 Error Handling for CENTUM Data Access Library ....................................... 2-68
2.6 Notes and Precautions ................................................................................. 2-71
3. Library for Using with Visual Basic .NET ............................................... 3-1
3.1 Methods of CENTUM Data Access Library .................................................... 3-2
3.1.1 Get Station List ................................................................................. 3-3
3.1.2 Get Station Information ..................................................................... 3-4
3.1.3 Get Tag Data .................................................................................... 3-6
3.1.4 Put Tag Data ..................................................................................... 3-8
3.1.5 Get Tag List .................................................................................... 3-10
3.1.6 Get Tag Information ......................................................................... 3-11
3.1.7 Get Tag Item List ............................................................................. 3-13
3.1.8 Get Tag Item Information................................................................. 3-14
3.1.9 Get Common Block Data ................................................................ 3-17
3.1.10 Put Common Block Data ................................................................. 3-19
3.1.11 Get Control Recipe List ................................................................... 3-21
3.1.12 Get Common Block List .................................................................. 3-23
3.1.13 Get Recipe Header Information ...................................................... 3-24
3.1.14 Get Common Block Item List .......................................................... 3-26
3.1.15 Get Common Block Item Information .............................................. 3-27
3.1.16 Put Operator Guide Message ......................................................... 3-29
3.1.17 Get Historical Message ................................................................... 3-30
3.1.18 Search for Historical Message ........................................................ 3-32
3.1.19 Get Historical Trend Data ................................................................ 3-35
3.1.20 Get Historical Trend List .................................................................. 3-38
3.1.21 Get Closing Data ............................................................................ 3-41
3.1.22 Get Closed Data Item ID List ........................................................... 3-45
3.1.23 Get Data and Time that OPC Server starts in HIS ........................... 3-48
3.1.24 Event Notification Request .............................................................. 3-49
3.1.25 Shutdown Event Notification Request ............................................. 3-56
3.2 Properties of CENTUM Data Access Library ............................................... 3-57
3.2.1 OPC Server Property ...................................................................... 3-58
3.2.2 HIS Shutdown Notification .............................................................. 3-59

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


Toc-3
3.2.3 Library Test Mode ........................................................................... 3-60
3.2.4 Get Tag Quality Code ...................................................................... 3-61
3.2.5 Tree Type Display ........................................................................... 3-62
3.2.6 Alarm/Event Notification ................................................................. 3-63
3.2.7 Message Searching Direction ......................................................... 3-64
3.2.8 Trend Data Searching Direction ...................................................... 3-65
3.2.9 Get Trend Quality Code .................................................................. 3-66
3.2.10 Closing Data Searching Direction ................................................... 3-67
3.2.11 Get Closing Data Quality Code ....................................................... 3-68
3.3 Events in CENTUM Data Access Library ..................................................... 3-69
3.3.1 Alarms and Messages Notification .................................................. 3-70
3.3.2 HIS Shutdown Notification ............................................................. 3-72
3.4 Run Modes of CENTUM Data Access Library .............................................. 3-73
3.5 Error Handling for CENTUM Data Access Library ....................................... 3-74
3.6 Notes and Precautions ................................................................................. 3-77
4. Basic Operation of CENTUM Data Access Library ................................ 4-1
4.1 Setting up the CENTUM Data Access Library in Another Computer ........... 4-2
4.2 Using the CENTUM Data Access Library ....................................................... 4-3
4.3 Sample Program using the Library ................................................................ 4-4
4.4 Setting HIS for Daylight Saving Time (DST) .................................................. 4-5
5. Referencing Information for Users ........................................................ 5-1

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


Blank Page
<1. Overview> 1-1

1. Overview
CENTUM data access library provides user programs with a function to communi-
cate with an ‘OLE for Process Control’ (OPC) server on an HIS in order to acquire
and set process data. This library is provided as an ActiveX control for Microsoft
Visual Basic 6.0 or Microsoft Visual Basic .NET so that you can use it when develop-
ing your own Visual Basic program.

SEE ALSO
For the user programming environment, see the following:
M1,“User Development Environment” in Reference (IM 33S01B30-01E)

■ Data Access Program


In general, a user program means a program that a user has developed for oneself. User
programs having a function to access data held in an HIS are referred to as data access
programs throughout this document.
The user programming environment in a CENTUM CS 1000 or CS 3000 system enables
you to develop and operate a user program that runs on an HIS and access various data in
the HIS via an open interface, OPC server or Direct Data Exchange (DDE) server in the
HIS.

HIS
Data Access
Program

Another PC

OPC Server
or Data Access
DDE Server Program

Various Data

HIS Functions

010001E.EPS

Figure Route of Data Access

You can also develop a data access program that runs on a computer connected via a
network.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<1. Overview> 1-2
■ Programming Using Library
The CENTUM data access library provides a function to access the various data held in an
HIS via an OPC server.
Generally, you have to code a troublesome OPC communication protocol in order to use an
OPC server, which is quite time consuming.
The CENTUM data access library handles this protocol inside the library so that you can
develop a data access program without considering the protocol. This facilitates data
access and allows for efficient programming.

Data Access Program

CENTUM Data
Access Library
*Programming time: SHORT

Data Access
Program
*Programming time: LONG

OPC Server

Various Data

HIS Functions

010002E.EPS

Figure Data Access Program Using Library

IMPORTANT
The CENTUM Data Access Library is only for OPC server in HIS. It can not be used for
Exaopc (NTPF100).

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-1

2. Library for Using with Visual Basic 6.0


This chapter describes the details of the CENTUM data access library for using with
Visual Basic 6.0.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-2

2.1 Methods of CENTUM Data Access Library


The CENTUM Data Access Library supports the following methods.
This chapter details methods.

Table Methods of CENTUM Data Access Library


Data Accessed Method Name Function OPC Server *1
Station and system GetStnList Retrieves a list of station names.
Information GetStnInf Retrieves the station information.
GetTagData Retrieves tag data.
PutTagData Sets tag data.
DA
GetTagList Retrieves a list of tag names.
Tag data
GetTagInf Retrieves tag information.
GetTagItemList Retrieves the list of data items of a tag.
GetTagItemInf Retrieves tag data information.
GetRcpData Retrieves common block data.
PutRcpData Sets common block data.
GetRcpStat Retrieves a list of control recipes.
Retrieves a list of the names of common
GetRcpBlkList
blocks.
Batch data
Retrieves the header information for a
GetRcpHeadInf
recipe.
Batch
Retrieves a list of the item names of a
GetRcpItemList
common block.
Retrieves the item information of a
GetRcpItemInf
common block.
PutGuideMsg Generate operator guide message.
Messages GetHistMsg Retrieves historical messages.
SearchHistMsg Searches historical messages.
GetTrendData Retrieves historical trend data.
Trend data
GetTrendList Retrieves a list of historical trend points.
GetCloseData Retrieves closing data. HDA
Closing data
GetCloseList Retrieves a list of data subject to closing.
HIS boot-up information BootCheck Retrieves the date when the HIS started.
EventRqst Requests for notification of events.
Event requests Requests for notification of shutdown A&E
ShutdownRqst
events.
Data Accessed Method Name Function OPC Server *1
020101E.EPS

*1: When a method is running, it connects to the OPC server.


DA : OPC DA Server
Batch : Enhanced OPC Batch Server
HDA : OPC HDA Server
A&E : OPC Alarms & Events Server

When a method ends its execution, it disconnects from the OPC server. The resources in
the OPC server used by the method are released. Nevertheless, the method requested by
an event will hold the connection and resources unless the Alarms & Events server is
ended or the application program of the method is ended.

IM 33S02T10-01E 4th Edition : Dec.18,2003-01


<2. Library for Using with Visual Basic 6.0> 2-3

2.1.1 Get Station List


Retrieves a list of names of all the stations defined in the system.

■ GetStnList Method

● Description
Retrieves a list of names of all the stations defined in the system.

● Syntax
vResults = object.GetStnList

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)

● Returns
• vResults
A one-dimensional array containing a list of station names is returned. Define the
variables of the Variant types that are to be used for storing the returns.

● Explanation
The returns are given as data of the String type, i.e., characters. If n stations are defined in
the system configuration, the station names are contained in array elements 1-n of the
returns, as follows:
vResults(1) = “FCS0101”
vResults(2) = “FCS0102”
...
vResults(n) = “HIS0124”

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-4

2.1.2 Get Station Information


Retrieves information on a station.

■ GetStnInf Method

● Description
Retrieves information on a station.

● Syntax
vResults = object.GetStnInf(sStnName, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sStnName
Set the characters that identify the station name of the station whose information you
want, such as “FCS0101”.
• vErrors
Specify the variable of the variant type to be used for storing the error codes.

● Returns
• vResults
A one-dimensional array comprising nine array elements and containing the station
information is returned. Specify the variables of the variant types to be used for storing
the returns.

● Explanation
The table below shows the content of each element of the returns.
Table Returns
Subscript Item Data Type Description Library Constant
1 Station model String E.g., “PFCS-S” centumStnType
0: Station ready
1: Station not ready
2 Station status Integer centumStnStatus
2: Station reserved
9: Station fail
3 Host name for Ethernet String E.g., “E0164” centumStnEtName
4 IP address for Ethernet String E.g., “172.17.1.64” centumStnEtIPAdd
5 Subnet mask for Ethernet String E.g., “255.255.0.0” centumStnEtMask
6 Host name for Control bus String E.g., “M0164” centumStnVnName
7 IP address for Control bus String E.g., “172.16.1.64” centumStnVnIPAdd
8 Subnet mask for Control bus String E.g., “255.255.0.0” centumStnVnMask
9 Station number Integer E.g., 320 centumStnNo
020102E.EPS

Note: The library constants shown in the table can also be specified as subscripts.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-5
If data cannot be obtained correctly, the GetStnInf method sets the error codes correspond-
ing to the data of the returns, in vErrors as a one-dimensional array variable that comprises
nine array elements. Obtain an error code according to the following syntax:
vErrors(index) :Error Code

For index, set an integer from 1 to 9 or a library constant. For example, to check whether or
not the host name for Ethernet has been obtained correctly, check the error code in
vErrors(3) or vErrors(centumStnEtName).

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-6

2.1.3 Get Tag Data


Retrieves the current values and quality codes of tag data.

■ GetTagData Method

● Description
Retrieves the current values and quality codes of tag data.

● Syntax
vResults = object.GetTagData(sTagItems(), lNum, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sTagItems
Specify a one-dimensional array variable. Type a beginning and closing parentheses
after the variable name in order to pass the entire array to the method. In each array
element, specify a data item as a character string in the format of
“TagName.DataItem”.
• lNum
Specify how many array elements from array element 1 you want to retrieve data for.
A number up to 256 and not greater than the upper bound of the sTagItems array, can
be specified.
• vErrors
Specify a variable of the variant type for storing the error codes.

● Returns
• vResults
A one-dimensional array that contains current values or a two-dimensional array that
contains current values and quality codes, is returned. Specify the variables of Variant
types to be used for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-7
● Explanation
When the GetTagQuality property of the object is False, the GetTagData method returns a
one-dimensional array (number of array elements = lNum) that contains current values.
The current value of sTagItems(index) can be obtained as:
vResults(index) :Current Value of sTagItems(index)

For index, set an integer from 1 to lNum. The data type of the current value thus obtained
varies depending on the corresponding data item.
When the GetTagQuality property of the object is True, the GetTagData method returns a
two-dimensional array (number of array elements = lNum x 2) that contains current values
and quality codes. The current value and quality code of sTagItems(index) can be obtained
as:
vResults(index,type) :Current Value of sTagItems(index) or quality code

For index, set an integer from 1 to lNum. For type, set a number as shown in the table
below.
Table Setting of Type
Type Description Library Constant
Retrieves the current value of the data item (the data type
1 centumTagData
depends on the data item).
2 Retrieves the quality code (Long type) of the data item. centumTagQuality
020103E.EPS

Note: A number (1 or 2), a library constant shown in the table can also be used to specify the type.

There are three quality codes for tag data.


Table Quality Codes
Quality Code Meaning Library Constant
192 Good centumQualityTagGood
0 Bad centumQualityTagBad
64 Questionable centumQualityTagQuestionable
020104E.EPS

SEE ALSO
As quality codes, the library constants shown in the table above can also be used. For the details of
quality codes, see the following:
5, “Referencing Information for Users”

TIP
UNCERTAIN in OPC specification and QUESTIONNABLE in HIS trend specification are used for indicat-
ing questionable data.

If data cannot be obtained correctly, the GetTagData method sets the error codes corre-
sponding to the data of the returns, in vErrors as a one-dimensional array variable (number
of array elements = lNum). Obtain the error code corresponding to sTagItems(index),
according to the following syntax:
vErrors(index) :Error Code of sTagItems(index)

For index, set an integer from 1 to lNum.


IM 33S02T10-01E 4th Edition : Dec.18,2003-00
<2. Library for Using with Visual Basic 6.0> 2-8

2.1.4 Put Tag Data


Sets values in data of a tag.

■ PutTagData Method

● Description
Sets values in data of a tag.

● Syntax
vResults = object.PutTagData(sTagItems(), lNum, vData(), vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sTagItems
Specify a one-dimensional array variable. Type a beginning and closing parentheses
after the variable name to pass the entire array to the method. In each array element,
specify a data item as a character string in the format of “TagName.DataItem”.
• lNum
Specify how many array elements of sTagItems from array element 1 you want to set
values for. A number up to 256 and not greater than the upper bound of the sTagItems
array, can be specified.
• vData
Specify a one-dimensional array variable of the Variant type. The array size must be
the same as that of sTagItems. Type a beginning and closing parentheses after the
variable name to pass the entire array to the method. In each array element, specify
the value you want to set in the data item indicated by the same array subscript of
sTagItems.
• vErrors
Specify a variable of Variant type to be used for storing error codes.

● Returns
• vResults
A zero (0), indicating a normal end, is always returned.

● Explanation
If data cannot be set correctly, the PutTagData method sets the error codes corresponding
to the data items, in vErrors as a one-dimensional array variable (number of array elements
= lNum). Obtain the error code corresponding to sTagItems(index), according to the follow-
ing syntax:
vErrors(index) :Error Code of sTagItems(index)

For index, set an integer from 1 to lNum.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-9

2.1.5 Get Tag List


Retrieves a list of names of tags in a station.

■ GetTagList Method

● Description
Retrieves a list of names of tags in a station.

● Syntax
vResults = object.GetTagList(sStnName, sFilter)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sStnName
Specify the name of the station containing the tags whose names you want to retrieve,
in a character string such as “FCS0101”.
• sFilter
By specifying a matching pattern using a wildcard character, such as “FIC*”, you can
filter the tag names retrieved. When not filtering the tag names, specify a character
string whose length is zero or set an asterisk, “*”.

● Returns
• vResults
A one-dimensional array that contains a list of tag names that match the specified
pattern, is returned. Specify the variables of Variant types to be used for storing the
returns.

● Explanation
The returns are given as data of the String type, i.e., characters. If the number of tag
names that match the specified pattern is n, the tag names are contained in array elements
1-n of the returns, as follows:
vResults(1) = “PVI001”
vResults(2) = “PVI002”
...
vResults(n) = “PID015”

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-10

2.1.6 Get Tag Information


Retrieves information on a tag.

■ GetTagInf Method

● Description
Retrieves information on a tag.

● Syntax
vResults = object.GetTagInf(sTagName, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sTagName
Specify the name of the tag whose information you want, in a character string such as
“FIC001”.
• vErrors
Specify a variable of Variant type to be used for storing error codes.

● Returns
• vResults
A one-dimensional array comprising seven array elements and containing the tag
information, is returned. Specify the variables of Variant types to be used for storing
returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-11
● Explanation
The content of each array element of returns is as follows.
Table Returns
Data
Subscript Item Description Library Constant
Type
1 Tag comment String E.g., "Tank A Temperature" centumTagCMNT
2 Function block model String E.g., "PID" centumTagInstType
3 Alarm importance level Integer E.g., 1 centumTagALM
Station number of the
4 Station number Integer station containing the centumTagStnNo
specified tag name, e.g., "257"
Name of the station
5 Station name String containing the specified tag centumTagStnName
name,e.g., "FCS0101"
0: Reading is permitted
1: Reading is not permitted
because it is beyond the
scope of monitoring
2: Reading is not allowed
6 Read-permission security Integer centumTagRDSecurity
by the privileges currently
given
3: Reading is not allowed
because of both reasons
1and 2 above.
0: Writing is permitted
1: Writing is not permitted
because it is beyond the
scope of monitoring
2: Writing is not allowed by
7 Write-permission security Integer centumTagWRSecurity
the privileges currently
given.
3: Writing is not allowed by
both of the reasons 1 and
2 above.
020105E.EPS

Note: A number (1-7), a library constant shown in the table can also be used to specify a subscript.

If data cannot be obtained correctly, the GetTagInf method sets the error codes corre-
sponding to the data of the returns, in vErrors as a one-dimensional array variable compris-
ing seven array elements. To check whether each data can be obtained correctly, obtain an
error code according to the following syntax:
vErrors(index) :Error Code

For index, set an integer from 1 to 7 or a library constant. For example, to check whether or
not the alarm importance level has been obtained correctly, check the error code in
vErrors(3) or vErrors(centumTagALM).

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-12

2.1.7 Get Tag Item List


Retrieves a list of the data items of a tag.

■ GetTagItemList Method

● Description
Retrieves a list of the data items of a tag.

● Syntax
vResults = object.GetTagItemList(sTagName)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sTagName
Specify the name of the tag for which you want to retrieve a list of data items, using a
character string such as “FIC001”.

● Returns
• vResults
A one-dimensional array containing a list of data items is returned. Specify the vari-
ables of the Variant types that are to be used for storing the returns.

● Explanation
Each array element of the returns is of the character-string data type. If the specified tag
has n data items, the data item names are contained in array elements 1-n, as follows:
vResults(1) = “PV”
vResults(2) = “PH”
...
vResults(n) = “SL”

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-13

2.1.8 Get Tag Item Information


Retrieves information on a data item of a tag.

■ GetTagItemInf Method

● Description
Retrieves information on a data item of a tag.

● Syntax
vResults = object.GetTagItemInf(sItemName, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sItemName
Specify the tag’s data item whose information you want, using a character string in the
format of “TagName.DataItem”.
• vErrors
Specify a variable of Variant type to be used for storing error codes.

● Returns
• vResults
A one-dimensional array comprising ten array elements and containing tag data
information, is returned. Specify the variables of Variant types to be used for storing
returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-14
● Explanation
The content of each array element of returns is as follows.
Table Returns (1 of 2)
Data
Subscript Item Description Library Constant
Type
1 Engineering unit String E.g., "DEGC" centumItemEU
2 Data item comment String E.g., "Tank A Temperature" centumItemCMNT
3 Upper scale limit Double E.g., 150 centumItemHI
4 Lower scale limit Double E.g., -10 centumItemLO
5 Decimal point position Integer E.g., 1 centumItemDP
Number of array
6 elements of first Integer E.g., 2 centumItemArray1
dimension
Number of array
7 elements of second Integer E.g., 3 centumItemArray2
dimension
Indicates the data type in
the FCS.
0: Two-byte signed integer
1: Two-byte unsigned
integer
2: Four-byte signed integer
3: Four-byte unsigned
integer
4: Normal-precision
floating-point number
5: Double-precision floating-
point number
6: Character string
7: Two-byte signed integer
with data status
8: Two-byte unsigned
8 FCS data type String centumItemDataType
integer with data status
9: Four-byte signed integer
with data status
10: Four-byte unsigned
integer with data status
11: Normal-precision
floating-point number with
data status
12: Double-precision
floating-point number with
data status
13: Normal-precision
floating-point number with
data status and range
14: Counter value with data
status
Data
Subscript Item Description Library Constant
Type
020106E.EPS

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-15
Table Returns (2 of 2)
Data
Subscript Item Description Library Constant
Type
0: Reading is permitted
1: Reading is not permitted
because it is beyond the
scope of monitoring.
2: Reading is not allowed
9 Read-permission security Integer centumItemRDSecurity
by the privileges currently
given.
3: Reading is not allowed
because of both reasons
1 and 2 above.
0: Writing is permitted
1: Writing is not permitted
because it is beyond the
scope of monitoring.
2: Writing is not allowed by
10 Write-permission security Integer centumItemWRSecurity
the privileges currently
given.
3: Writing is not allowed by
because of both reasons
1 and 2 above.
020107E.EPS

Note: A number (1-10), a library constant shown in the table can also be used to specify a subscript.

If data cannot be obtained correctly, the GetTagItemInf method sets the error codes corre-
sponding to the data of the returns, in vErrors as a one-dimensional array variable compris-
ing ten array elements. To check whether each data can be obtained correctly, obtain an
error code according to the following syntax:
vErrors(index) :Error Code

For index, set an integer from 1 to 10 or a library constant. For example, to check whether
or not the item comment has been obtained correctly, check the error code in vErrors(2) or
vErrors(centumItemCMNT).

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-16

2.1.9 Get Common Block Data


Retrieves the current values of the data of a common block.

■ GetRcpData Method

● Description
Retrieves the current values of the data of a common block.

● Syntax
vResults = object.GetRcpData(sComItems(), lNum, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sComItems
Specify a one-dimensional array variable. Type a beginning and closing parentheses
after the variable name to pass the entire array to the method. In each array element,
specify a common block data item for accessing the current value using a character
string in the format of “RecipeGroupNumber,BatchID:CommonBlockName.DataItem.”
• lNum
Specify how many array elements from array element 1 you want to retrieve current
values for. A number up to 256 and not greater than the upper bound of the
sComItems array, can be specified.
• vErrors
Specify a variable of Variant type to be used for storing error codes.

● Returns
• vResults
A one-dimensional array and containing the current values is returned. Specify the
variables of the Variant types that are to be used for storing the returns.

● Explanation
The GetRcpData method returns a one-dimensional array (number of array elements =
lNum) that contains current values. The current value of sComItems(index) can be ob-
tained as:
vResults(index) :Current Value of sComItems(index)

For index, set an integer from 1 to lNum. The data type of the current value thus obtained
varies depending on the corresponding data item of the common block.
If data cannot be obtained correctly, the GetRcpData method sets the error codes corre-
sponding to the specified data items, in vErrors as a one-dimensional array variable (num-
ber of array elements = lNum). Obtain the error code corresponding to sComItems(index),
according to the following syntax:
vErrors(index) :Error Code of sComItems(index)

For index, set an integer from 1 to lNum.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-17

2.1.10 Put Common Block Data


Sets values in data of a common block.

■ PutRcpData Method

● Description
Sets values in data of a common block.

● Syntax
vResults = object.PutRcpData(sComItems(), lNum, vData(), vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sComItems
Specify a one-dimensional array variable. Type a beginning and closing parentheses
after the variable name to pass the entire array to the method. In each array element,
specify a data item as a character string in the format of
“RecipeGroupNumber,BatchID:CommonBlockName.DataItem”.
• lNum
Specify for how many array elements of sComItems from array element 1 you want to
set the data. A number up to 256, not greater than the upper bound of the sComItems
array, can be specified.
• vData
Specify a one-dimensional array variable of the Variant type. The array size must be
the same as that of sComItems. Type a beginning and closing parentheses after the
variable name to pass the entire array to the method. In each array element, specify
the value you want to set in the data item indicated by the same array subscript of
sComItems.
• vErrors
Specify a variable of Variant type storing the error codes.

● Returns
• vResults
A zero (0), indicating a normal end, is always returned.

● Explanation
If data cannot be set correctly, the PutRcpData method sets the error codes corresponding
to the data items, in vErrors as a one-dimensional array variable (number of array elements
= lNum). Obtain the error code corresponding to sComItems(index), according to the
following syntax:
vErrors(index) :Error Code of sComItems(index)

For index, set an integer from 1 to lNum.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-18

2.1.11 Get Control Recipe List


Retrieves a list of batch IDs of control recipes or a list of recipe names defined in the
recipe definitions.

■ GetRcpStat Method

● Description
Retrieves a list of batch IDs of control recipes or a list of recipe names defined in the recipe
definitions.

● Syntax
vResults = object.GetRcpStat

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)

● Returns
• vResults
A one-dimensional array containing batch IDs or recipe names is returned. Specify the
variables of the Variant types that are to be used for storing the returns.

● Explanation
When the TreeType property of the object is 1 (= centumTreeBatchID), the GetRcpStat
method returns batch IDs. The returns are given as data of the String type. If the number
of existing control recipes is n, character string data in the format of
“RecipeGroupNumber,BatchID” are contained in array elements 1-n of the returns, as
follows:
vResults(1) = “1,01-0001”
vResults(2) = “1,01-0002”
...
vResults(n) = “16,16-0100”
When the TreeType property of the object is 2 (= centumTreeRecipe), the GetRcpStat
method returns recipe names. The returns are also given as data of the String type. If the
number of existing, defined recipe is n, characters in the format of
“RecipeGroupNumber,RecipeName” are contained in array elements 1-n, as follows:
vResults(1) = “1,RECIPE01-01”
vResults(2) = “1,RECIPE01-02”
...
vResults(n) = “16,RECIPE16-01”

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-19

2.1.12 Get Common Block List


Retrieves a list of common block names.

■ GetRcpBlkList Method

● Description
Retrieves a list of common block names.

● Syntax
vResults = object.GetRcpBlkList

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)

● Returns
• vResults
A one-dimensional array containing a list of common block names is returned. Specify
the variables of Variant types to be used for storing returns.

● Explanation
The returns are given as data of the String type, i.e., characters. If the number of defined
common blocks is n, the common block names are contained in array elements 1-n of the
returns, as follows:
vResults(1) = “SYSPCM01”
vResults(2) = “SYSPCM02”
...
vResults(n) = “SYSRCM”

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-20

2.1.13 Get Recipe Header Information


Retrieves the header information of a recipe.

■ GetRcpHeadInf Method

● Description
Retrieves the header information of a recipe.

● Syntax
vResults = object.GetRcpHeadInf(sBatchID, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sBatchID
Specify the batch ID for accessing the header information using a character string in
the format of “RecipeGroupNumber,BatchID.”
• vErrors
Specify a variable of Variant type to be used for storing error codes.

● Returns
• vResults
A one-dimensional array comprising fifteen array elements and containing the recipe’s
header information, is returned. Specify the variables of Variant types to be used for
storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-21
● Explanation
The content of each array element of returns is as follows.
Table Returns

Data
Subscript Item Description Library Constant
Type
1 Recipe name String E.g., “RECIPE01” centumRcpName
Date when the recipe was
2 Date E.g., “30/08/2003 19:39:10” centumRcpCRData
created
3 Recipe comment String E.g., “Recipe for Product-A” centumRcpCMNT
4 Product name String E.g., “PRODUCT-A” centumRcpPRDCTName
5 Version of recipe Long E.g., 1 centumRcpVarNo
Date when the recipe was
6 Date E.g., “30/08/2003 23:39:10” centumRcpVarDate
last modified
7 Author of recipe String E.g., “James Jones” centumRcpCRName
Person approved the
8 String E.g., “Monica Smith” centumRcpAPPName
recipe
9 Date of approval Date E.g., “31/08/2003 10:39:10” centumRcpAPPDate
10 Master recipe status String E.g., “Approved” centumRcpStatus
11 Engineering unit of recipe String E.g., “DEGC” centumRcpEU
12 Security level String E.g., “2” centumRcpACCLevel
E.g., “Recipe for producing
13 Description for recipe String centumRcpDescription
product-A”
14 Batch start time Date E.g., “29/09/2003 23:39:10” centumRcpStartTime
15 Batch end time Date E.g., “30/09/2003 23:39:10” centumRcpEndType
020108E.EPS

Note: A number (1-15), a library constant shown in the table can also be used to specify a subscript.

If data cannot be obtained correctly, the GetRcpHeadInf method sets the error codes
corresponding to the data of the returns, in vErrors as a one-dimensional array variable
comprising fifteen array elements. To check whether each data can be obtained correctly,
obtain an error code according to the following syntax:
vErrors(index) :Error Code

For index, set an integer from 1 to 15 or a library constant. For example, to check whether
or not the author’s name has been obtained correctly, check whether the error code
vErrors(7) or vErrors(centumRcpCRName) is obtained.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-22

2.1.14 Get Common Block Item List


Retrieves a list of the names of the data items of a common block.

■ GetRcpItemList Method

● Description
Retrieves a list of the names of the data items of a common block.

● Syntax
vResults = object.GetRcpItemList(sComName)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sComName
Specify in a character string the name of the common block for which you want to
retrieve a list of the names of data items.

● Returns
• vResults
A one-dimensional array containing a list of the names of data items contained in the
specified common block is returned. Specify the variables of Variant types to be used
for storing returns.

● Explanation
The returns are given as data of the String type, i.e., characters. If the specified common
block has n data items, the item names are contained in array elements 1-n of the returns,
as follows:
vResults(1) = “RECIPEGR”
vResults(2) = “RECIPE”
...
vResults(n) = “STATUS”

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-23

2.1.15 Get Common Block Item Information


Retrieves information on a data item of a common block.

■ GetRcpItemInf Method

● Description
Retrieves information on a data item of a common block.

● Syntax
vResults = object.GetRcpItemInf(sComItem, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sComItem
Specify the common block data item whose information you want, in a character string
in the format of “RecipeGroupName,BatchID:CommonBlockName.ItemName”.
• vErrors
Specify a variable of Variant type to be used for storing error codes.

● Returns
• vResults
A one-dimensional array comprising six array elements and containing the information
of the specified data item, is returned. Specify the variables of Variant types to be used
for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-24
● Explanation
The content of each array element of returns is as follows.
Table Returns
Subscript Item Data Type Description Library Constant
A value indicating the data
type of the variable when it is
manipulated by Visual Basic;
1 Data type Integer for details, refer to the help in centumRcpItemDataType
Visual Basic about “data
typing.” E.g., 3 for the Long
type.
Depending
2 Value centumRcpItemDataValue
on the item
3 Engineering unit String E.g., “KG/H” centumRcpItemEU
4 Item comment String E.g., “Item Comment” centumRcpItemCMNT
E.g., 5 when the value =
5 Display digits Integer centumRcpItemRange
100.1
E.g., 1 when the value =
6 Number of decimals Integer centumRcpItemDP
100.1
020109E.EPS

Note: A number (1-6), a library constant shown in the table can also be used to specify a subscript.

Usually, the GetRcpItemInf method is used to retrieve the information of a data item of a
common block when used for a particular control recipe. However, the returns for the
engineering unit, item comment, and display digits are always the same for the same item
regardless of which control recipe you specify. Hence, if this is the only information you
want to retrieve, you can retrieve it by specifying the item in the format of
“*,*:CommonBlockName.ItemName”. In this case, error codes will be returned for the data
type and value.
If data cannot be obtained correctly, the GetRcpItemInf method sets the error codes corre-
sponding to the data of the returns, in vErrors as a one-dimensional array variable compris-
ing six array elements. To check whether each data can be obtained correctly, obtain an
error code according to the following syntax:
vErrors(index) :Error Code

For index, set an integer from 1 to 6, or a library constant. For example, to check whether
or not the item comment has been obtained correctly, check the error code in vErrors(4) or
vErrors(centumRcpItemCMNT).

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-25

2.1.16 Put Operator Guide Message


Generate an operator guide message.

■ PutGuideMsg Method

● Description
Generate an operator guide message.

● Syntax
vResults = object.PutGuideMsg(sMsgString)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• sMsgString
Set the text (string type) of the operator guide message you want to activate.

● Returns
• vResults
A zero (0), indicating a normal end, is always returned.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-26

2.1.17 Get Historical Message


Retrieves historical messages that occurred during a specified period.

■ GetHistMsg Method

● Description
Retrieves historical messages that occurred during a specified period.

● Syntax
vResults = object.GetHistMsg(vStartTime, vEndTime, lNum, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• vStartTime
Specify the beginning date and time (Date type) of the period during which the mes-
sages you want to retrieve, occurred.
• vEndTime
Specify the ending date and time (Date type) of the period during which the messages
you want to retrieve occurred. The vEndTime setting must be later than vStartTime.
• lNum
Specify how many messages you want to retrieve from among those that occurred
during the period between vStartTime and vEndTime.
• vErrors
Specify a variable of Variant type to be used for storing error codes.

● Returns
• vResults
A one-dimensional array containing the historical messages is returned. Specify the
variables of Variant types to be used for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-27
● Explanation
Messages are contained in vResults in chronological order; however, whether they are
stored from the newest one or the oldest one depends on the property of the object. When
the MsgDirectionPast property of the object is 1 (= centumDrctForward), the oldest mes-
sage is contained in element 1 of vResults, and the newer message is contained in the
element of the greater array subscript, as shown below.
vResults(1) = “11/11/2003 09:08:49...FCS0101,,,FCS0101 Fail”
vResults(2) = “11/11/2003 10:15:32...FCS0101,,,FCS0101 Recover”
...
vResults(lNum) = “11/11/2003 10:21:18...FCS0101,,,FCS0101 LEFT Control”
When the MsgDirectionPast property of the object is 2 (= centumDrctBackward), the
newest message is contained in element 1 of vResults, and the older message is con-
tained in the element of the greater array subscript, as shown below.
vResults(1) = “11/11/2003 10:21:18...FCS0101,,,FCS0101 LEFT Control”
...
vResults(lNum-1) = “11/11/2003 10:15:32...FCS0101,,,FCS0101 Recover”
vResults(lNum) = “11/11/2003 09:08:49...FCS0101,,,FCS0101 Fail”

SEE ALSO
• For the format of messages, see the following:
5, “Referencing Information for Users”
• If the library is used in the area where daylight saving time (DST) is observed, see the following:
2.6, “Notes and Precautions”

If data cannot be obtained correctly, the GetHistMsg method sets the error codes corre-
sponding to the messages, in vErrors as a one-dimensional array variable (the number of
elements = lNum). To check whether each message can be obtained correctly, obtain an
error code according to the following syntax:
vErrors(index) :Error Code

For index, set an integer from 1 to lNum.


If lNum is greater than the number of messages found, “&H42A94” (centumReturnNoData)
is set in the remaining array elements of vErrors, indicating “no data”. For example, when
you specify 100 for lNum but only 50 messages occurred during the period you specified,
array elements of subscripts 51 through 100 in vErrors contain “&H42A94”.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-28

2.1.18 Search for Historical Message


Searches through the historical messages that occurred during the specified period,
and finds the messages that match the specified conditions.

■ SearchHistMsg Method

● Description
Searches through the historical messages that occurred during the specified period, and
finds the messages that match the specified conditions.

● Syntax
vResults = object.SearchHistMsg(vStartTime, vEndTime, lSearchIDs(), _
vSearchStrings(), lSearchCategories(), lNum, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• vStartTime
Specify the beginning date and time (Date type) of the period during which the mes-
sages you want to search, occurred.
• vEndTime
Specify the ending date and time (Date type) of the period during which the messages
you want to search, occurred. The vEndTime setting must be later than vStartTime.
• lSearchIDs
Specify a one-dimensional array variable of the Long type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify a search condition ID.
• vSearchStrings
Specify a one-dimensional array variable of the Variant type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify a string or number corresponding to the search condition
ID that is set in the element of the same array subscript in lSearchIDs.
• lSearchCategories
Specify a one-dimensional array variable of the Long type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify the search category to be searched for, that corresponds
to the search condition ID set in the element of the same array subscript in lSearchIDs.
• lNum
Specify how many messages you want to retrieve from among those that occurred
during the period between vStartTime and vEndTime and match the specified condi-
tions.
• vErrors
Specify a variable of Variant type to be used for storing error codes.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-29
● Returns
• vResults
A one-dimensional array (number of elements = lNum) containing the historical
messages is returned. Specify the variables of Variant types to be used for storing
returns.

● Explanation
As is mentioned for the GetHistMsg method, whether the messages are stored to vResults
in order of the oldest or the newest can be changed by modifying the MsgDirectionPast
property of the object.

SEE ALSO
• For the MsgDirectionPast property, see the following:
2.1.17 , “Get Historical Message”
• For the format of messages, see the following:
5, “Referencing Information for Users”
• If the library is used in the area where daylight saving time (DST) is observed, see the following:
2.6, “Notes and Precautions”

The table below shows what you should specify in each array element of lSearchIDs as a
search condition ID, and in each array element of vSearchStrings as a string or number to
be searched for.
Table Search Condition IDs

As the Search Condition Data Type of String/Number


When You Want to
ID (in lSearchIDs(i)), You Want to Find (to be set Library Constant
Search through ...
Specify ... in vSearchStrings(i))
Station names 1 String centumMsgSrchIDStn
Tag names 2 String centumMsgSrchIDTag
User names 3 String centumMsgSrchIDUsr
Batch IDs 4 String centumMsgSrchIDBatch
Unit recipe numbers 5 Long centumMsgSrchIDUnit
Arbitrary characters 6 String centumMsgSrchIDString
Message numbers 7 Long centumMsgSrchIDMsgNo
020110E.EPS
Note: Instead of a number from 1 to 7, you can set a library constant shown in the table to specify the objects to be searched
through.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-30
The table below shows what you should specify in each array element of
lSearchCategories as the range of messages to be searched through.
Table Search Categories

When You Want to Search In lSearchCategories(i),


Library Constant
through Specify ...
All kinds of messages 0 centumMsgSrchCtgryALL
Process alarm messages 1 centumMsgSrchCtgryPRCALM
Status change messages 2 centumMsgSrchCtgryMODESTS
Operator guide messages 3 centumMsgSrchCtgryOPGUIDE
Sequence messages 4 centumMsgSrchCtgrySEQMSG
Maintenance messages 5 centumMsgSrchCtgryENGMNT
Operation record messages 6 centumMsgSrchCtgryOPREC
System alarm messages 7 centumMsgSrchCtgrySYSALRM
020111E.EPS
Note: Instead of a number from 0 to 7, you can set a library constant shown in the table to specify the messages to be
searched through.

Individual array elements of the same array subscript of lSearchIDs, vSearchStrings, and
lSearchCategories correspond with each other. When you specify two or more conditions
using arrays comprising more than one array element, the SearchHistMsg method finds
the historical messages that match all the specified conditions. For example, when you
want to find status change messages for tags whose tag names begin with the characters,
“PID”, and that exists in station FCS0101, specify the conditions as follows:
lSearchIDs(1) = 1 ’Station names
vSearchStrings(1) = “FCS0101”
lSearchCategories(1) = 2 ’Search through status change messages
and find the messages occurring in the
station having the station name of
“FCS0101”.
lSearchIDs(2) = 2 ’Tag names
vSearchStrings(2) = “PID*”
lSearchCategories(2) = 2 ’Search through status change messages
and find the messages for tags whose tag
name begins with “PID”.

If data cannot be obtained correctly, the SearchHistMsg method sets the error codes
corresponding to the messages, in vErrors as a one-dimensional array variable (the num-
ber of elements = lNum). To check whether each message can be obtained correctly,
obtain an error code according to the following syntax:
vErrors(index) :Error Code

For index, set an integer from 1 to lNum.


If lNum is greater than the number of messages found, “&H42A94” (centumReturnNoData)
is set in the remaining array elements of vErrors, indicating “no data”. For example, when
you specify 100 for lNum but only 50 messages occurred during the period you specified,
array elements of subscripts 51 through 100 in vErrors contain “&H42A94”.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-31

2.1.19 Get Historical Trend Data


Retrieves historical trend data during a specified period.

■ GetTrendData Method

● Description
Retrieves historical trend data during a specified period.

● Syntax
vResults = object.GetTrendData(vStartTime, vEndTime, sTrendItems(),_
lNumItems, vInterval, lNumValues, vNumRemains, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• vStartTime
Specify the beginning date and time (Date type) of the period of trend data you want to
retrieve.
• vEndTime
Specify the ending date and time (Date type) of the period of trend data you want to
retrieve. The vEndTime setting must be later than vStartTime.
• sTrendItems
Specify a one-dimensional array variable of the String type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify an item ID of trend data.
• lNumItems
Specify for how many array elements from array element 1 of sTrendItems you want to
retrieve the data. A number up to 256 and no greater than the number of array ele-
ments of sTrendItems, can be specified.
• vInterval
When you want to retrieve data of intervals longer than the trend acquisition period,
specify the interval of data. There are three ways to specify the interval: (1) a number,
0, for the meaning of a zero, (2) a string “xMIN” for minutes, or (3) a string “xSEC” for
seconds, where x is a positive integer.
When setting 0, trend data acquired at the trend data acquisition periods are obtained
as are. When specifying a data interval in the format of “xMIN” or “xSEC”, it must be
longer than the trend data acquisition period.
• lNumValues
Specify the number of data values of trend data you want to retrieve.
• vNumRemains
Specify a variable of Variant type for storing the number of remaining data values that
are not retrieved by the GetTrendData method.
• vErrors
Specify a variable of Variant type to be used for storing error codes.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-32
● Returns
• vResults
A three-dimensional array containing the trend data values, time stamps, and quality
codes (array size = lNumItems x lNumValues x 2 or x 3) is returned. Specify the
variables of Variant types to be used for storing returns.

● Explanation
The item ID to be set in each array element of sTrendItems can be specified as a string in
either of the following formats:
• “TagName.ItemName”
• “TagName.ItemName.DataSamplingInterval” (DataSamplingInterval = “xSEC” or
“xMIN” where x is an arbitrary decimal number”)
If multiple trend blocks are using different sampling period for the same TagName.
ItemName, DataSamplingInterval needs to be affixed to the TagName.ItemName so as to
be referenced for getting the trend data.
However, if the DataSamplingInterval is not affixed, among the multiple blocks for the same
TagName.ItemName, the trend block with the smallest block number will be aimed for
getting the trend data.

Each value corresponding to sTrendItems(index) can be obtained according to the follow-


ing syntax.
vResults(index,DataNumber,Type) :Data of sTrendItems(index)

For index, set an integer from 1 to lNumItems.


For DataNumber, which specifies the chronological position of the value in the array, set an
integer from 1 to lNumValues. When the TrendDirectionPast property of the object is 1 (=
centumDrctForward), the larger the DataNumber specified, the newer the data value you
will retrieve. When the TrendDirectionPast property of the object is 2 (=
centumDrctBackward), the larger the DataNumber specified, the older the data value you
will retrieve.
For Type, which specifies what kind of data to be retrieved, set a value from among the
following three options.
Table Types
Type Description Library Constant
Used to obtain the value of a trend data (the data type
1 centumTrdValue
depends on the item ID).
2 Used to obtain the time stamp of a trend data (Date type). centumTrdTimeStamp
3 Used to obtain the quality code of a trend data (Long type). centumTrdQuality
020113E.EPS

Note: Instead of a number from 1 to 3, a library constant shown in the table can be used to specify the type.

If the GetTrendQuality property of the object is False, the GetTrendData method returns
only the trend data values and time stamps. (In this case, the maximum subscript for the
third dimension of vResults is 2.)

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-33
There are four quality codes for trend data.
Table Quality Codes

Quality Code Description Library Constant


201 Good centumQualityTrendGood
305 Bad centumQualityTrendBad
309 Questionable centumQualityTrendQuestionable
307 No data centumQualityTrendNoData
020114E.EPS

Note: Instead of a number (201, 305, 309, or 307), a library constant shown in the table above can be used to specify the
quality code.

SEE ALSO
• For details of quality codes, see the following:
5, “Referencing Information for Users”
• If the library is used in the area where daylight saving time (DST) is observed, see the following:
2.6, “Notes and Precautions”

In sTrendItems, you can specify item IDs of different sampling intervals. When doing so,
you must set vInterval to 0 or the largest interval from among the sampling intervals set in
all item IDs in sTrendItems. (If vInterval is set to 0, then data of the sampling interval
specified in each item ID are obtained.)
If most of the trend data for a specified item ID existed during the period between
vStartTime and vEndTime, then the number specified by lNumValues, i.e., the number of
remaining data that are not retrieved, is set in the corresponding array element of
vNumRemains (a one-dimensional array, with its number of array elements = lNumItems).
The number of remaining data for sTrendItems(index) can be obtained according to the
following syntax:
vNumRemains(index) :sTrendItem(index) Number of residual data

For index, set an integer from 1 to lNumItems. When you set vInterval to 0, the values in all
array elements of vNumRemains are empty.
If data cannot be obtained correctly, the GetTrendData method sets the error codes corre-
sponding to individual item IDs and individual intervals, in vErrors as a two-dimensional
array variable (the number of elements = lNumItems x lNumValues). The error code for the
N-th value of sTrendItems(index) can be obtained according to the following syntax:
vErrors(index, number) :sTrendItem(index) Error code indicated by number

Trend data that can be obtained by the GetTrendData method are only those data collected
by the HIS (a personal computer running an OPC server) specified by the StationName
property of the object. Trend data that are collected by other HISs and referenced by the
specified HIS cannot be obtained.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-34

2.1.20 Get Historical Trend List


Retrieves a list of the item IDs of trend recording data.

■ GetTrendList Method

● Description
Retrieves a list of the item IDs of trend recording data.

● Syntax
vResults = object.GetTrendList(lNumFilter, lAttrIDs(), vFilters())

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• lNumFilter
Specify the number of filters you set. The number must be equal to or less than the
number of array elements of lAttrIDs.
• lAttrIDs
Specify a one-dimensional array variable of the Long type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify an attribute ID.
• vFilters
Specify a one-dimensional array variable of the Variant type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify a filter attribute.

● Returns
• vResults
A one-dimensional array containing a list of the item IDs of trend data is returned.
Specify the variables of Variant types to be used for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-35
● Explanation
As an attribute ID to be specified in each array element of lAttrIDs, set either of the num-
bers shown in the table below.
Table Attribute IDs
Filtering by Attribute ID Library Constant
Item IDs 113 centumTrendAttrIDItemID
Trend data acquisition periods 151 centumTrendAttrIDInterval
020115E.EPS

Note: A number (113 or 151), a library constant shown in the table can also be used to specify an attribute ID.

If you specify item IDs (113) as an attribute ID, specify the characters you want to find in the
item IDs as the corresponding filter attribute in vFilter. You can specify a pattern using
wildcard characters.

If you specify trend data acquisition periods (151) as an attribute ID, specify the number for
the corresponding filter attribute in vFilter, according to the table below.
Table Filter Attribute Values When Specifying Data Acquisition Periods as Attribute ID
Range of Item IDs to Be Searched Filter Attribute Value Library Constant
Trend recording points for which the
data acquisition period is set to 1 1 centumTrendFilter1SEC
second
Trend recording points for which the
data acquisition period is set to 10 2 centumTrendFilter10SEC
seconds
Trend recording points for which the
data acquisition period is set to 1 4 centumTrendFilter1MIN
minute
Trend recording points for which the
data acquisition period is set to 2 8 centumTrendFilter2MIN
minutes
Trend recording points for which the
data acquisition period is set to 5 16 centumTrendFilter5MIN
minutes
Trend recording points for which the
data acquisition period is set to 10 32 centumTrendFilter10MIN
minutes
020116E.EPS

Note: The values shown in the table, a library constant can also be used to specify a filter attribute.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-36
For example, when PID001’s PV is assigned to trend pens of all data acquisition periods
but you want to retrieve the item ID, “PID001.PV”, of the 1-second acquisition period,
specify the parameters as follows:
lNumFilters = 2
lAttrIDs(1) = centumTrendAttrIDItemID
vFilters(1) = “PID001.PV.*”
lAttrIDs(2) = centumTrendAttrIDInterval
vFilters(2) = centumTrendFilter1SEC

When both item IDs and trend data acquisition periods are specified as attribute IDs, like in
this example, item IDs that meet both conditions are obtained.
When you want to specify more than one data acquisition period, you can specify the
condition as follows. To obtain item IDs of trend data whose data acquisition period is 1
second or 10 minutes in the example above, specify:
vFilters(2) = centumTrendFilter1SEC + centumTrendFilter10MIN

The trend data item IDs that can be obtained by the GetTrendList method are only those
trend data IDs collected by the HIS (a personal computer running an OPC server) specified
by the StationName property of the object. The item IDs for trend data collected by another
HIS and referenced by the specified HIS, cannot be obtained.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-37

2.1.21 Get Closing Data


Retrieves closing data during a specified period.

■ GetCloseData Method

● Description
Retrieves closing data during a specified period.

● Syntax
vResults = object.GetCloseData(vStartTime, vEndTime, sCloseItems(),_
lNumItems, sInterval, lNumValues, vNumRemains, vErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• vStartTime
Specify the beginning date and time (Date type) of the period of closing data you want
to retrieve.
• vEndTime
Specify the ending date and time (Date type) of the period of closing data you want to
retrieve. The vEndTime setting must be later than vStartTime.
• sCloseItems
Specify a one-dimensional array variable of the String type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify an item ID of trend data.
• lNumItems
Specify for how many array elements from array element 1 of sCloseItems you want to
retrieve data. A number up to 256 and no greater than the number of array elements
of sCloseItems, can be specified.
• sInterval
Specify a string of “HOUR” when you want to retrieve hourly closing data, “DAY” for
daily closing data, or “MONTH” for monthly closing data.
• lNumValues
Specify the number of values of closing data you want to retrieve.
• vNumRemains
Specify a variable of the Variant type for storing the number of remaining closing data
values that are not retrieved by the GetCloseData method.
• vErrors
Specify a variable of the Variant type to be used for storing error codes.

● Returns
• vResults
A three-dimensional array containing the closing data values (array size = lNumItems
x lNumValues x 8) or a four-dimensional array containing the closing data values and
quality codes (array size = lNumItems x lNumValues x 8 x 2) is returned. Specify the
variables of the Variant types that are to be used for storing the returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-38
● Explanation
The item ID to be set in each array element of sCloseItems can be specified as a string in
the following format:
“TagName.ItemName”
When the GetCloseQuality property of the object is False, a value corresponding to
sCloseItems (index) can be obtained according to the following syntax:
vResults(index, number,data) :sCloseItems(index)’s data

For index, set an integer from 1 to lNumItems.


For DataNumber, which specifies the chronological position of the value in the array, set an
integer from 1 to lNumValues. When the CloseDirectionPast property of the object is 1 (=
centumDrctForward), a larger DataNumber you specify a newer data value you retrieve.
When the CloseDirectionPast property of the object is 2 (= centumDrctBackward), the
larger the DataNumber you specify, the older the data value retrieved.
For DataType, set a value from among the following to specify what kind of closing data is
to be retrieved.
Table DataType Settings
DataType Description Library Constant
Used to obtain the total (the data type depends on the
1 centumClsSUMValue
item ID).
Used to obtain the average (the data type depends on the
2 centumClsAVEValue
item ID).
3 Used to obtain the time of the minimum value (Date type). centumClsMINTime
Used to obtain the minimum value (the data type depends
4 centumClsMINValue
on the item ID).
5 Used to obtain the time of the maximum value (Date type). centumClsMAXTime
Used to obtain the maximum value (the data type depends
6 centumClsMAXValue
on the item ID).
Used to obtain the snapshot value (the data type depends
7 centumClsSTValue
on the item ID).
Used to obtain the difference between the maximum and
8 centumClsRange
minimum values (the data type depends on the item ID).
020117E.EPS

Note: Instead of a number from 1 to 8, a library constant shown in the table can be used to specify what kind of closing data
value is to be retrieved.

If the GetCloseQuality property of the object is True, the GetCloseData method returns
quality codes in addition to the summary of data values above. In this case, vResults is a
four-dimensional array, and a value corresponding to sCloseItems(index) can be obtained
according to the following syntax:
vResults(index, number,data,type) :sCloseItems(index)’s data

For DataOrQuality, specify whether you want the quality code or value of the closing data,
according to the table below.
Table DataOrQuality Settings

DataOrQuality Description Library Constant


Used to obtain the value of closing data
1 centumClsValue
(the data type depends on the item ID).
Used to obtain the quality code of the
2 centumClsQuality
closing data (Long type).
020118E.EPS

Note: Instead of a number (1 or 2), a library constant shown in the table can be used to specify whether to retrieve the quality
code or data value.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-39
There are four quality codes for closing data.
Table Quality Codes
Quality Code Description Library Constant
304 Good centumQualityCloseGood
305 Bad centumQualityCloseBad
309 Questionable centumQualityCloseQuestionable
307 No data centumQualityCloseNoData
020119E.EPS

Note: Instead of a number from 304 to 307, a library constant shown in the table can be used to specify the quality code.

SEE ALSO
• For details of quality codes, see the following:
5, “Referencing Information for Users”
• If the library is used in the area where daylight saving time (DST) is observed, see the following:
2.6, “Notes and Precautions”

In sCloseItems, you can specify item IDs of different summarization periods, such as hourly
and daily closing data. When doing so, you must set sInterval to the string that indicates
the longest period of closing data ("HOUR"< "DAY"< "MONTH") from among those set in all
item IDs in sCloseItems.
If most of the closing data for a specified item ID exists within the period between
vStartTime and vEndTime, then the number is specified by lNumValues. The number of
remaining data that are not retrieved is set in the corresponding array element of
vNumRemains (a one-dimensional array, the number of its array elements = lNumItems).
The number of remaining data for sCloseItems(index) can be obtained according to the
following syntax:
vNumRemains(index) :sCloseItems(index) residul data

For index, set an integer from 1 to lNumItems.


If data cannot be obtained correctly, the GetCloseData method sets the error codes corre-
sponding to individual item IDs and individual summarization periods, in vErrors as a two-
dimensional array variable (the number of elements = lNumItems • lNumValues). The error
code for N-th value of sCloseItems(index) can be obtained according to the following
syntax:
vErrors(index, number) :sCloseItems(index) Error Code indicated by number

Closing data that can be obtained by the GetCloseData method are only those data col-
lected by the HIS (a personal computer running an OPC server) specified by the
StationName property of the object.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-40

2.1.22 Get Closed Data Item ID List


Retrieves a list of the item IDs of data for which periodic summarization is specified.

■ GetCloseList Method

● Description
Retrieves a list of the item IDs of data for which periodic summarization is specified.

● Syntax
vResults = object.GetCloseList(lNumFilter, lAttrIDs(), vFilters())

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• lNumFilter
Specify the number of filters you set. The number must be equal to or less than the
number of array elements of lAttrIDs.
• lAttrIDs
Specify a one-dimensional array variable of the Long type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify an attribute ID.
• vFilters
Specify a one-dimensional array variable of the Variant type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify a filter attribute.

● Returns
• vResults
A one-dimensional array containing a list of the item IDs of data for which periodic
summarization is specified, is returned. Specify the variables of Variant types to be
used for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-41
● Explanation
As an attribute ID to be specified in each array element of lAttrIDs, set either of the two
numbers shown in the table below.
Table Attribute IDs
Filtering by Attribute ID Library Constant
Item IDs 113 centumCloseAttrIDItemID
Summarization periods 151 centumCloseAttrIDInterval
020120E.EPS

Note: A number (113 or 151), a library constant shown in the table can also be used to specify an attribute ID.

If you specify item IDs as an attribute ID, specify the characters you want to find in item IDs,
as the corresponding filter attribute in vFilter. You can specify a pattern using wildcard
characters.

If you specify summarization periods as an attribute ID, specify a number as the corre-
sponding filter attribute in vFilter, according to the table below.
Table Filter Attribute Values

Item IDs to Be Searched Filter Attribute Value Library Constant


Item IDs of data for which hourly
256 centumCloseFilterHOUR
summarization is specified
Item IDs of data for which daily
512 centumCloseFilterDAY
summarization is specified
Item IDs of data for which monthly
1024 centumCloseFilterMONTH
summarization is specified
020121E.EPS

Note: Instead of a value shown in the table, a library constant can also be used for specifying a filter attribute.

For example, when you want to retrieve the item IDs of any data (1) which belong to tags
whose tag number begins with “PID”, and (2) for which daily summarization is specified;
specify the parameters as follows:
lNumFilters = 2
lAttrIDs(1) = centumCloseAttrIDItemID
vFilters(1) = “PID*.*”
lAttrIDs(2) = centumCloseAttrIDInterval
vFilters(2) = centumCloseFilterDAY

When both item IDs and summarization periods are specified as attribute IDs, as shown in
this example, item IDs that meet both conditions are obtained.
When you want to specify more than one summarization period, you can specify the
condition as follows. To obtain item IDs of data for which daily or monthly summarization is
specified, specify:
vFilters(2) = centumCloseFilterDAY + centumCloseFilterMONTH

Item IDs of closing data that can be obtained by the GetCloseList method are only those
IDs of trend data collected by the HIS (a personal computer running an OPC server)
specified by the StationName property of the object.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-42

2.1.23 Get Data and Time that OPC Server starts in HIS
Retrieves the date and time when the HIS (OPC) server started.

■ BootCheck Method

● Description
Retrieves the date and time when the HIS(OPC) server started.

● Syntax
vResults = object.BootCheck

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)

● Returns
• vResults
The date and time when the OPC server started is returned as a value of the Date
type. For storing the return, define a variable of the Variant type.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-43

2.1.24 Event Notification Request


Request the OPC server to notify occurrences of events (sequence messages,
operator guide messages, etc.).

■ EventRqst Method

● Description
Request the OPC server to notify occurrences of events (sequence messages, operator
guide messages, etc.).

● Syntax
vResults = object.EventRqst(lNumCategories, lCategories(), lNumAttrIDs,_
lAttrIDs(), vAttributes(), lNumSources, sSourceLists())

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• lNumCategories
Specify the number of event categories you defined. The number must be equal to or
less than the number of array elements of lCategories.
• lCategories
Specify a one-dimensional array variable of the Long type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify an event category.
• lNumAttrIDs
Specify the number of attribute IDs you defined. The number must be equal to or less
than the number of array elements of lAttrIDs and vAttributes.
• lAttrIDs
Specify a one-dimensional array variable of the Long type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify an attribute ID.
• vAttributes
Specify a one-dimensional array variable of the Variant type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify an attribute value for the attribute ID that you defined for
the corresponding array element of lAttrIDs.
• lNumSources
Specify the number of event sources you defined. The number must be equal to or
less than the number of array elements of sSourceLists.
• sSourceLists
Specify a one-dimensional array variable of the Long type. Type a beginning and
closing parentheses after the variable name to pass the entire array to the method. In
each array element, specify an event source.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-44
● Returns
• vResults
A zero (0), indicating a normal end, is always returned.

● Explanation
Event categories to be set in lCategories specify the kinds of events for which notification
can be requested.
Table Event Categories
Events Event Category Library Constant
System alarms 101 centumEventCtgrySYSALRM
Process alarms 102 centumEventCtgryPRCALRM
Mode/status changes 103 centumEventCtgryMODESTS
Sequence messages 104 centumEventCtgrySEQMSG
Operator guide messages 105 centumEventCtgryOPGUIDE
Engineering maintenance records 106 centumEventCtgryENGMNT
Operation records 107 centumEventCtgryOPREC
Errors in OPC server 109 centumEventCtgrySERVERERROR
020122E.EPS

Note: Instead of the numbers from 101 to 109, library constants can be used for specifying event categories.

For example, when you request sequence messages and operator guide messages to be
notified, specify:
lNumCategories = 2
lCategories(1) = centumEventCtgrySEQMSG
lCategories(2) = centumEventCtgryOPGUIDE

If two or more event categories are specified, as shown in this example, an event belonging
to any of the specified categories will be notified upon occurrence.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<2. Library for Using with Visual Basic 6.0> 2-45
Attribute IDs to be set in lAttrIDs specify the attributes (information) of each message, as
shown in the table below.
Table Attribute IDs
Attribute Attribute ID Data Type Library Constant
Message number 160 Long centumEventAttrIDMSGID
Station name 161 String centumEventAttrIDSTNNM
Tag name 162 String centumEventAttrIDTAG
Item name 163 String centumEventAttrIDITEM
Depending on
Data value 164 centumEventAttrIDVALUE
data item
Recipe group number 165 Long centumEventAttrIDRCPGRP
Recipe name 166 String centumEventAttrIDRCPNM
Batch ID 167 String centumEventAttrIDBCHID
Unit recipe number 168 Long centumEventAttrIDUTRCP
Engineering unit 169 String centumEventAttrIDEU
Mode/status name 170 String centumEventAttrIDSTAT
Element name 171 String centumEventAttrIDELMNM
Filename of operator station
172 String centumEventAttrIDODBFL
database
Engineering station name 173 String centumEventAttrIDENGNM
Name of operator 174 String centumEventAttrIDOPENM
Name of station where operation
175 String centumEventAttrIDOPESTN
was performed
Loaded station name 178 String –
Event occurrence time (serial number
179 Date –
of GMT seconds)
Event occurrence time (milliseconds) 180 Long –
Path of plant hierarchy 181 String –
Station number 182 Long –
Area number 183 Long –
Common block name 184 String –
Sequence message number 185 Long –
Alarm level 187 Long –
Alarm off 188 Long –
Alarm blink 189 Long –
Alarm filter 190 Long –
Project ID 191 String –
020123E.EPS

Note: Instead of the numbers from 160-175, you can also use the library constants shown in the table to specify the attribute
ID.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-46
For each attribute specified by an attribute ID, specify a condition (attribute value) so that
only the messages whose specified attribute matches the condition will be notified. Set an
appropriate value for each attribute value in reference to the table above (taking care to
note the data type). When setting characters, you can specify a pattern using wildcard
characters. Each array element of vAttributes corresponds to the array element of lAttrID
with the same array subscript. For example, when you request notification of events on
tags having the tag names of “PVI001” and “PID123”, specify:
lNumAttrIDs = 2
lAttrIDs(1) = centumEventAttrIDTAG
vAttributes(1) = “PVI001”
lAttrIDs(2) = centumEventAttrIDTAG
vAttributes(2) = “PID123”

Like this, if two or more attribute conditions are specified, any event that meets any one or
more of the specified conditions will be notified. If you do not set any condition, set
lNumAttrIDs to zero (0).

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-47
The attributes that can be specified for attribute IDs vary depending on the event catego-
ries you specified in lCategories. The table below shows the attributes associated with
each event category.
Table Attributes Associated with Each Event Category
Event Categories

Operator Guide Messages

Engineering Maintenance
Mode/Status Changes

Errors in OPC Server


Sequence Messages

Operation Records
Process Alarms
System Alarms

Records
Attribute
Message number 1 1 1 1 1 1 1
Station name 2 2 2 2 2 2 2
Name of operator 5 3
Name of station where operation 6 4
was performed
Tag name 3 3 5
Item name 4 6
Data value 5 7
Recipe group number 7 6 4 6 3 8
Recipe name 8 7 5 7 4 9
Batch ID 9 8 6 8 5  10
Unit recipe number  10  9 7 9 6  11
Engineering unit  10  12
Mode/status name  14  8  13
Element name  15 3 7
Engineering station name 3
Filename of operator station
4
database
Loaded Station Name 5
Event Occurrence Time
 3  11  9 4 8  6  14
(Serial Number of GMT Seconds)
Event Occurrence Time
 4  12  10  5 9  7  15
(Milliseconds)
Path of Plant Hierarchy  11  13  11  10  10  16
Station number  12  16  12  11  11  8  17
Area number  13  17  13  12  12  9  18
Common block name  14  18  14  13  13  19
Sequence message number  19  14  14
Alarm level  20
Alarm off  21
Alarm blink  22
Alarm filter  23
Project ID  15  24  16  15  15  10  21
020124E.EPS

: Available

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-48
For example, when you choose ‘system alarms’ for the event category, and ‘tag name’ for
the attribute, no event will be notified.
The numbers next to the  in the above table indicate the orders to be attached to the
MsgEvent.
However, the 15th attribute of “Mode/Status Changes” and 20th attribute of “Operation
Records” are reserved.
For an event source to be specified in sSourceLists, type characters indicating a station
name (e.g., FCS0101), tag name (e.g., PID001), message name (e.g.,
%OG0001S010101), and so on. You can specify a pattern using wildcard characters, such
as “*S0101*”.
When you do not specify an event source, set lNumSources to zero (0).

IMPORTANT
When designating event source for obtaining an event name, the area number (01) is
required to be put to the event source, otherwise, the event name can not be obtained.
Moreover, the wild card (*) can be used (For an example: %OG0001S0101*) instead of an
area number.

The kind of event source that you can specify differs depending on the corresponding event
category specified in lCategories. The table below shows the valid specifications for event
sources.
Table Valid Specifications for Event Sources
Event Category Event Source
System alarms
Station name; e.g., “FCS0101”, “FCS01??”
Engineering maintenance records
Process alarms
Tag name; e.g., “PID001”, “%SW0100S0101”,
Mode/status changes
“%AN0001S0101*”
Operation records
Sequence messages Message number; e.g., “%M30001S0101*”,
Operator guide messages “%OG0001S0101*”
020125E.EPS

When you specify event categories, attributes, and event sources at the same time, only
the events that meet all the specified conditions will be notified upon their occurrence.
Thus, it is important to be aware that when more than one condition is specified for catego-
ries, or for attributes, or for event sources, events may not be notified as intended.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-49
For example, assume that the following conditions are coded in order to request notification
of operator guide messages related to the batch ID of “ABC123” occurring in the FCS of
station no. 1 in domain no. 1 as well as sequence messages occurring in the same FCS.
lNumCategories = 2 ‘Number of categories specified
lCategories(1) = centumEventCtgrySEQMSG ‘Sequence messages
lCategories(2) = centumEventCtgryOPGUIDE ‘Operator guide messages
lNumAttrIDs = 1 ‘Number of attributes specified
lAttrIDs(1) = centumEventAttrIDBCHID ‘Batch ID
vAttributes(1) = “ABC123”
lNumSources = 1
sSourceLists(1) = “*S0101*”

You cannot use the EventRqst method to cancel a request made by the EventRqst method.
To stop event notification, change the MsgNotify property of the object to False.
If the EventRqst method is called more than once, only the request made by the most
recent call of the EventRqst method is valid; requests made by all previous calls are invalid.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-50

2.1.25 Shutdown Event Notification Request


Request the OPC server to notify a shutdown of the HIS upon occurrence.

■ ShutdownRqst Method

● Description
Request the OPC server to notify a shutdown of the HIS upon occurrence.

● Syntax
vResults = object.ShutdownRqst

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)

● Returns
• vResults
A zero (0), indicating a normal end, is always returned.

● Explanation
Calling this method will allow the local program to recognize a shutdown of the HIS as an
event. Actually, the program will obtain shutdown events from an A&E server, and the
program will be connected continuously after the ShutdownRqst method is called.
You cannot cancel the request by using the ShutdownRqst method. To stop notification of
HIS’s shutdowns, modify the ShutdownNotify property of the object to False.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-51

2.2 Properties of CENTUM Data Access Library


The table below shows the properties of the CENTUM data access library.

Table Properties of CENTUM Data Access Library


Data Concerned Property Name Setting OPC Server*1
StationName Station name of OPC server DA,Batch,HDA,A&E
Common to ShutdownNotify Whether to be notified of server's shutdown A&E
all functions
Whether to run the CENTUM data access
TestMode
library in the test mode
Tag data GetTagQuality Whether to retrieve quality codes of data DA
Display format in browse function (about
Batch data TreeType Batch
batch IDs and recipe names)
Whether to be notified of alarm and event
MsgNotify A&E
messages
Messages Search direction for messages (either
MsgDirectionPast reverse-chronological or chronological Batch
order)
Search direction for trend data (ascending
TrendDirectionPast
Trend data or descending chronological order)
GetTrendQuality Whether to retrieve quality codes of data
HDA
Search direction for closing data (ascending
CloseDirectionPast
Closing data or descending chronological order)
GetCloseQuality Whether to retrieve quality codes of data
020201E.EPS

*1: When a method is referencing a property, it connects to the OPC server.


DA: OPC DA Server
Batch: Enhanced OPC Batch Server
HDA: OPC HDA Server
A&E: OPC Alarms & Events Server

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-52

2.2.1 OPC Server Property


Set station name (computer name) to the OPC server where the data to be accessed.
The setting information can be returned.

■ StationName Property

● Description
Set station name (computer name) to the OPC server where the data to be accessed. The
setting information can be returned.

● Syntax for Setting


object.StationName[=string]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• string
Specify the station name of the OPC server you want to access.

● Explanation
Be sure to set the SationName property when using the CENTUM data access library at a
computer running an OPC client.
If the setting is omitted when using the CENTUM data access library at a computer running
an OPC server, access for data acquisition and setting is made to the local computer (My
Computer).

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-53

2.2.2 HIS Shutdown Notification


Whether to be notified of shutdowns of the HIS (that runs the OPC server)

■ ShutdownNotify Property

● Description
Whether to be notified of shutdowns of the HIS (that runs the OPC server)

● Syntax for Setting


object.ShutdownNotify[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• boolean
To enable notification of shutdowns of the HIS, set True. To disable, set False.

● Explanation
If the ShutdownNotify property is set at True and notification of shutdown events has been
requested using the ShutdownRqst method, the CENTUM data access library generates a
ShutdownEvent upon occurrence of a shutdown of the HIS (running the OPC server).

SEE ALSO
For details of the ShutdownRqst Method, see the following:
2.1.25, “Shutdown Event Notification Request”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-54

2.2.3 Library Test Mode


The current run mode of the CENTUM data access library

■ TestMode Property

● Description
The current run mode of the CENTUM data access library

● Syntax for Setting


object.TestMode[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• boolean
To run the CENTUM data access library in the test mode, set True. To run it in the
target-machine mode, set False.

SEE ALSO
For details of run modes of CENTUM Data Access Library, see the following:
2.4, “Run Modes of CENTUM Data Access Library”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-55

2.2.4 Get Tag Quality Code


Whether or not quality codes should be acquired when the GetTagData method is
called

■ GetTagQuality Property

● Description
Whether or not quality codes should be acquired when the GetTagData method is called

● Syntax for Setting


object.GetTagQuality[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• boolean
To acquire quality codes, set True. Otherwise, set False.

SEE ALSO
For details of GetTagData method, see the following:
2.1.3, “Get Tag Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-56

2.2.5 Tree Type Display


Whether batch IDs or recipe names should be acquired by the GetRcpStat method (a
method for acquiring a list of control recipes)

■ TreeType Property

● Description
Whether batch IDs or recipe names should be acquired by the GetRcpStat method (a
method for acquiring a list of control recipes)

● Syntax for Setting


object.TreeType[=integer]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• integer
To acquire batch IDs, set 1 (= centumTreeBatchID). To acquire recipe names, set 2 (=
centumTreeRecipe).

SEE ALSO
For details of GetRcpStat method, see the following:
2.1.11, “Get Control Recipe List”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-57

2.2.6 Alarm/Event Notification


Whether to enable events such as alarms and messages to be notified upon their
occurrences

■ MsgNotify Property

● Description
Whether to enable events such as alarms and messages to be notified upon their occur-
rences

● Syntax for Setting


object.MsgNotify[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• boolean
To enable notification of events, set True. To disable, set False.

● Explanation
If the MsgNotify property is set at True and notification of event occurrences has been
requested using the EventRqst method, the CENTUM data access library generates a
MsgEvent upon occurrence of an alarm or message.

SEE ALSO
For details of EventRqst method, see the following:
2.1.24, “Event Notification Request”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-58

2.2.7 Message Searching Direction


Whether historical messages should be acquired in order of the oldest messages or
newest messages by the GetHistMsg method (a method for acquiring historical
messages) and SearchHistMsg method (a method for searching historical mes-
sages)

■ MsgDirectionPast Property

● Description
Whether historical messages should be acquired in order of the oldest messages or new-
est messages by the GetHistMsg method (a method for acquiring historical messages) and
SearchHistMsg method (a method for searching historical messages)

● Syntax for Setting


object.MsgDirectionPast[=integer]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• integer
To acquire messages in reverse chronological order such that the oldest message is
first and the newest last, set 1 (=centumDrctForward). To acquire messages in
chronological order such that the newest message is first and the oldest last, set 2 (=
centumDrctBackward).

SEE ALSO
• For details of GetHistMsg method, see the following:
2.1.17, “Get Historical Message”
• For details of SearchHistMsg method, see the following:
2.1.18, “Search for Historical Message”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-59

2.2.8 Trend Data Searching Direction


Whether trend data should be acquired in order of the oldest data or the newest data
by the GetTrendData method (a method for acquiring trend data)

■ TrendDirectionPast Property

● Description
Whether trend data should be acquired in order of the oldest data or the newest data by the
GetTrendData method (a method for acquiring trend data)

● Syntax for Setting


object.TrendDirectionPast[=integer]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• integer
To acquire data in reverse chronological order such that the oldest data is first and the
newest last, set 1 (=centumDrctForward). To acquire data in chronological order such
that the newest data is first and the oldest last, set 2 (=centumDrctBackward).

SEE ALSO
For details of GetTrendData method, see the following:
2.1.19, “Get Historical Trend Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-60

2.2.9 Get Trend Quality Code


Whether or not quality codes should be acquired when the GetTrendData method is
called

■ GetTrendQuality Property

● Description
Whether or not quality codes should be acquired when the GetTrendData method is called

● Syntax for Setting


object.GetTrendQuality[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• boolean
To acquire quality codes, set True. Otherwise, set False.

SEE ALSO
For details of GetTrendData method, see the following:
2.1.19, “Get Historical Trend Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-61

2.2.10 Closing Data Searching Direction


Whether closing data should be acquired in the order of the oldest data or the new-
est data by the GetCloseData method (a method for acquiring closing data)

■ CloseDirectionPast Property

● Description
Whether closing data should be acquired in the order of the oldest data or the newest data
by the GetCloseData method (a method for acquiring closing data)

● Syntax for Setting


object.CloseDirectionPast[=integer]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• integer
To acquire data in reverse chronological order such that the oldest data is first and the
newest last, set 1 (=centumDrctForward). To acquire data in chronological order such
that the newest data is first and the oldest last, set 2 (=centumDrctBackward).

SEE ALSO
For details of GetCloseData method, see the following:
2.1.21, “Get Closing Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-62

2.2.11 Get Closing Data Quality Code


Whether or not quality codes should be acquired when the GetCloseData method is
called

■ GetCloseQuality Property

● Description
Whether or not quality codes should be acquired when the GetCloseData method is called

● Syntax for Setting


object.GetCloseQuality[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• boolean
To acquire quality codes, set True. Otherwise, set False.

SEE ALSO
For details of GetCloseData method, see the following:
2.1.21, “Get Closing Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-63

2.3 Events in CENTUM Data Access Library


The table below shows the events generated in the CENTUM data access library.

Table Events in CENTUM Data Access Library

Corresponding Events in HIS Event Name Function


Notifies alarms and messages occurring in the
Messages MsgEvent
HIS and FCSs.
HIS shutdown events ShutdownEvent Notifies shutdown of the HIS.
020301E.EPS

The above events are nothing from OPC Alarms&Events Server.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-64

2.3.1 Alarms and Messages Notification


A MsgEvent is generated when an (an alarm, message, etc.) for which notification
has been requested occurs.

■ MsgEvent Event

● Description
A MsgEvent is generated when an event (an alarm, message, etc.) for which notification
has been requested occurs.

● Syntax
Private Sub object_ MsgEvent(EventData As Variant)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)
• EventData
Two-dimensional array variables of the Variant type, that contain various information
on events that occur.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-65
● Explanation
Information contained in EventData can be obtained by specifying the following syntax:
EventData(index, item)

For index, specify the number identifying the desired event. If the number of events that
have occurred is n, then you can specify a number from 1 to n. The number of events that
have occurred can be obtained by using the Ubound function (namely, Ubound
(EventData,1)).
For item, specify the information item according to the table below.
Table Information Items
Item Information Item Library Constant
1 Date and time of occurrence centumEventData
2 Name of station in which the event occurred centumEventStation
3 Message text centumEventMsg
4 Event category centumEventCategory
5 Alarm status centumEventCondition
6 Number of attributes centumEventNumAttrs
6+1 Attribute 1 centumEventAttrs + 1
6+2 Attribute 2 centumEventAttrs + 2
...

...

...
6 + (m - 1) Attribute (m - 1) centumEventAttrs + (m - 1)
6+m Attribute m centumEventAttrs + m
020302E.EPS

In the table above, “m” represents the number of attributes. Namely, the value of “m” is the
number when specifying item = 6, and it differs depending on the event category.

SEE ALSO
For the event category and attribute, see the following:
2.1.24, “Event Notification Request”

Only when both of the following conditions are met, is a MsgEvent generated:
• An event for which notification has been requested by using the EventRqst method,
occurs.
• The MsgNotify property is True.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-66

2.3.2 HIS Shutdown Notification


A ShutdownEvent is generated when the HIS (running the OPC server) is shut down.

■ ShutdownEvent Event

● Description
A ShutdownEvent is generated when the HIS (running the OPC server) is shut down.

● Syntax
Private Sub object_ ShutdownEvent()

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(CENTUMDataAccess1 by default)

● Explanation
Only when all of the following conditions are met, is a ShutdownEvent generated:
• Notification of a ShutdownEvent has been requested using the ShutdownRqst
method.
• The ShutdownNotify property is True.
• The HIS is shut down.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-67

2.4 Run Modes of CENTUM Data Access Library


When using the CENTUM data access library, choose the mode suitable for the
current phase of your user program development, as outlined in the table below.

Table Run Modes of CENTUM Data Access Library and Their Actions
Mode Actions When This Mode Should Be Chosen
The CENTUM data access library Choose this mode when you are
does not actually perform data developing a user program at a stand-
Test mode
access but returns fixed values alone computer before you start testing
(i.e., used for debugging). the program on an integrated system.
The CENTUM data access library
performs data access to the Choose this mode during actual
Target-machine target stations, such as an FCS, operation. This mode requires both the
mode via the OPC server and returns OPC server and the FCS(s) to be
the results (i.e., used for normal running.
functions).
020401E.EPS

To change the mode, change the setting of the TestMode property of the CENTUM Data
Access Control (CENTUMDataAccess1 by default).
• TestMode property = True: Test mode
• TestMode property = False: Target-machine mode

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-68

2.5 Error Handling for CENTUM Data Access


Library
When the CENTUM data access library cannot accomplish a process, i.e., when an
error occurs in a process, an unanticipated action may occur. To prevent this, you
need to embed countermeasures against errors within the program code before-
hand.

■ Run-Time Errors
When a method or property of the CENTUM Data Access Control is implemented during
run time but the array of returns cannot be obtained because of the shortage of memory, or
when communication with the OPC server fails, the CENTUM data access library may
generate a run-time error. At this time, execution of the code is aborted, and in most cases,
cannot be restarted.
To avoid this crisis, you need to embed an error handling routine in the code prior to run
time so that error occurrences can be trapped and the appropriate countermeasures can
be taken. Occurrences of errors can be trapped using the On Error statement.
The following shows an example of an error trap used when implementing the GetStnList
method.
Private Sub Subroutine()
Dim vResults As Variant
On Error goto ErrHandler ‘Activate an error trap.
vResults = CENTUMDataAccess1.GetStnList ‘Call a method.
‘Execute the code to “Exit Sub” if the method can be implemented correctly.
...
Erase vResults
Exit Sub
ErrHandler: ‘Error handling routine
‘Handling of errors
...
Erase vResults
End Sub

The error that has occurred can be identified in the error handling routine by checking the
properties of the Err object.

Run-time errors can be generally divided into ones generated by Visual Basic, ones by the
CENTUM data access library itself, and ones by the OPC server. When the OPC server
generates an error, the CENTUM data access library simply passes the error to the user as
is.

SEE ALSO
For the errors generated by the OPC server, see the following:
5, “Referencing Information for Users”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-69
■ Methods that Return an Error Code for the Result of Execution
Even if execution of a code is completed without the occurrence of an error, it does not
always mean that the coded process has been implemented correctly. To check this,
several methods of the CENTUM Data Access Control, such as GetStnInf and
GetTagData, return an error code that represents the cause of error. These methods
require a variable of the Variant type as a parameter for storing the error code (see the
declaration on the third line of the code below, for example). When the process cannot be
implemented correctly, these methods store the error code (Long type) in this variable. (At
the same time, the empty values, vbEmpty, are set in the returns.) The details of the error
can be identified from the Long-type variable obtained from the error code using the Clng
function.
The following shows an example of an error handling procedure used when calling the
GetTagData method.
Private Sub Subroutine()
Dim vResults As Variant
Dim vErrors As Variant
Dim sTagItems(1 to 2) As String
sTagItems(1) = “PID001.PV”
sTagItems(2) = “PID002.PV”
vResults = CENTUMDataAccess1.GetTagData(sTagItems(),2,vErrors)
‘Implement a method of library
‘*** Judgement for whether PID001.PV could be obtained ***
If Clng(vErrors(1)) = 0 then
‘If PID001.PV could be obtained correctly
Else
‘If PID001.PV could not be obtained correctly
End If
‘If PID002.PV could be obtained correctly
If Clng(vErrors(2)) = 0 then
‘If PID002.PV could be obtained correctly
Else
‘If PID002.PV could not be obtained correctly
End If
...
Erase vResults:Erase vErrors
End Sub

In this case, the OPC server generates all of the occurring errors. The CENTUM data
access library simply passes the errors to the user as they are.

SEE ALSO
For the errors generated by the OPC server, see the following:
5, “Referencing Information for Users”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-70
■ Error Codes
The table below shows a list of error codes (error codes for run-time errors) generated by
the CENTUM data access library itself.
Table Error Codes
Error Code Details
&H80000010 The number of data is invalid.
&H80000011 The number of arrays is invalid.
&H80000012 No browsing data
&H80000030 The number of values is invalid.
&H80000031 The item ID is not specified.
&H80000032 The value is not specified.
&H80000033 The time is invalid.
&H80000034 The search ID is not specified.
&H80000035 The search string is not specified.
&H80000036 The search category is not specified.
&H80000037 The numbers of search IDs, strings, and categories specified do not correspond.
&H80000050 The time is invalid.
&H80000051 The number of item IDs is invalid.
&H80000052 The number of values is invalid.
&H80000053 The item ID is not specified.
&H80000054 The number of filters is invalid.
&H80000055 The attribute ID is not specified.
&H80000056 The filter is not specified.
&H80000057 The attribute ID is invalid.
&H80000058 The interval value is invalid.
&H80000059 An item handler release error
&H8000005A A CreateBrowser error
&H80000070 The number of categories is invalid.
&H80000071 The category is not specified.
&H80000072 The number of attributes is invalid.
&H80000073 The attribute ID is not specified.
&H80000074 The attribute is not specified.
&H80000075 The number of event sources is invalid.
&H80000076 The event source is not specified.
&H80000077 The category is invalid.
&H80000078 The attribute ID is invalid.
&H80000090 The server name is invalid.
&H80000091 Server connection failed.
&H80000092 Server disconnection failed.
&H80000093 This property can only be changed in the design mode.
Error Code Details
020501E.EPS

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-71

2.6 Notes and Precautions


There are a few things that should be noted when using the CENTUM data access
library. When the script you coded does not function as intended, such as when
unexpected values are returned following implementation of a method, check if the
code is scripted correctly, i.e., scripted in accordance with the following notes and
precautions.

■ Application Capacity
There is no limitation for the number of CENTUM Data Access Controls used at the same
time. However, when the running methods connecting to corresponding OPC servers, the
number of simultaneously running methods is limited by the application capacity.

SEE ALSO
For more information about the methods and their corresponding OPC servers, see the following:
2.1, “Methods of CENTUM Data Access Library”

■ Logon Account
When you execute an application which uses this library, logon to the Windows by “CEN-
TUM”. Even if you use an another computer which does not function as a HIS, logon to the
Windows by “CENTUM”. This account is created when the OPC client is set up on that
computer.

■ Access Authority
The authority for accessing tags is specified by OPC interface package. An application
which is standard EXE accesses tags according to the privilege level of PROG user. The
default privilege level of PROG user is S1. This level is same as OFFUSER. If you want the
application to have higher level than it, change the level of PROG user by using security
builder.
An application which is the ActiveX control and embedded in the graphic accesses tags
according to the privilege level of the current logon user. It means that when you logon by
OFFUSER and call a graphic, an ActiveX control on that graphic accesses tags according
to the privilege level of OFFUSER.

■ Case-Sensitivity for String-Type Parameters


Unless noted specifically, all parameters of the String type are case-sensitive. For ex-
ample, the GetStnInf method requires the name of the station whose information is to be
retrieved, to be specified. The string you set for this parameter must agree perfectly with a
station name defined in the system configuration of the CENTUM CS 1000 or CS 3000
system. Namely, if you set the parameter to fcs0101 although the intended station is
defined as “FCS0101” in the system configuration, you will not retrieve information cor-
rectly.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-72
■ Lower Bound of Array
Some methods of the CENTUM Data Access Control require one or more array variables
as parameters. Unless specifically noted otherwise, always define the lower bound (lowest
subscript) of the array for these variables as 1. Once you declare “Option Base 1” in the
module level of your Visual Basic application, the lower bound of a fixed-size array variable
(static array variable) is always 1. It is recommended that the “Option Base 1” declaration
be coded unless there is some special reason why this cannot be done. If so, code an
explicit declaration to define each array variable, such as following.
Dim sArray(1 to 5) As String

For methods that return an array, the lowest subscript of the returned array is always 1
unless noted otherwise.

■ Array Size of Returns from Method


Some methods of the CENTUM Data Access Control, such as GetTagList, return an array
of values that meet the specified conditions. The array size, i.e., the highest subscript, is
modified dynamically by the CENTUM Data Access Control to fit the number of retrieved
values. Like when ten values are found to be meeting the specified conditions, the CEN-
TUM Data Access Control sets the lower and upper bounds of the array to 1 and 10. To
know the lower and upper bounds of an array, use the LBound and UBound functions. The
following code shows an example of a procedure for displaying a list of the tags retrieved
by the GetTagList method in the Immediate window.
Private Sub Subroutine()
Dim vResults As Variant
Dim i As Long
vResults = CENTUMDataAccess1.GetTagList(“FCS0101”,“*”)
‘Call a method of library
‘*** Loop of processing all elements in the returned array ***
For i = LBound(vResults) To UBound(vResults)
Debug.Print vResults(i)
Next i
Erase vResults ‘Release the memory
End Sub

Even if the GetTagList method finds only one value that meets the specified conditions, it
returns an array of a single element (lower and upper bounds = 1). You do not need to
worry about the number of array elements in the returns as far as a loop, as shown in this
example, is incorporated in the code. On the other hand, if no value is found to meet the
specified conditions, an array of a single element containing the empty value (vbEmpty) is
returned. If this causes a problem, you need to incorporate a logic element in order to (1)
check the upper bound of the returned array and (2) check whether the empty value is
contained when the upper bound is 1.

IMPORTANT
As is mentioned above, the returns are given in a dynamic array. For a variable whose size
is dynamically modified by the CENTUM Data Access Control, be sure to release the
memory of the dynamic array explicitly using the Erase statement when ending the proce-
dure. If the procedure is repeated without releasing the memory, an unpredictable event
may occur. In addition to returns, parameters for storing error codes are also dynamic
arrays.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<2. Library for Using with Visual Basic 6.0> 2-73
■ Method Overlap Calling
Methods of CENTUM Data Access Control returns after communication with the OPC
server few times. Before a method does not return, if calling a method (whether same
method or not) is overlapped, procedures with the server are mixed up and the method
returns error.
Standard EXE of Visual Basic is a single thread model. Therefore, we may think there are
no case such as overlap calling. But, there is. For example, consider an application which
calls GetTagData when a command button is clicked. Even if the command button is
quickly clicked many times, a subroutine which is called when the button is clicked is
executed serially. There is no problem so far. As next step, suppose this application is
added the function that it calls GetTagData periodically by the event from timer control. If
click event has come at a same time when timer event has come, both subroutines are
executed parallel. Therefore calling GetTagData overlaps.
In this case, either or both GetTagData returns error. Please note parallel executing like this
is COM (Component Object Model) specification on Visual Basic. Programmer must avoid
to cause error.
The above example is the same as the case when you call GetTagData in the MsgEvent
subroutine which is called by this library. Please check whether calling GetTagData in the
MsgEvent overlaps calling method of the library in another subroutine or not.
Easiest way to avoid to cause error is embedding more than one ActiveX control in the
form. For example, embed two CENTUM Data Access Control in the form, use
CENTUMDataAccess1 object for the timer event and use CENTUMDataAccess2 object for
click event of command button. By this way, even if calling GetTagData overlaps, each
calling is treated as another client. Therefore, both calling return success.

■ Precautions of Debugger of Visual Basic 6.0


These are precautions when you debug an application by using debugger of Visual Basic
6.0.

● End of Debugger
When you end debugger, click close button of form. Do not click debugger end button, else
Form_Unload is executed. If end procedure of form is not executed, end procedure of
ActiveX control embedded in the form is not executed. In this case, connection information
remains in the server side. And after repeating some times, you can not connect to the
server. When you see this phenomenon, you must reboot HIS.

■ Usage in the Area where Daylight Saving Time (DST) is Observed


If the library is used in the area where DST is observed, you need to modify registry in
addition to the typical installation procedure.

SEE ALSO
For details of the library usage in the area where daylight saving time (DST) is observed, see the follow-
ing:
4.1, “Setting up the CENTUM Data Access Library in Another Computer”
4.4, “Setting HIS for Daylight Saving Time (DST)”

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-74
■ Setting Time in Daylight Saving Time (DST)
Daylight saving time (DST) is globally observed. It starts and ends in the areas as listed
below. (As of 2005)
• USA, Canada, Mexico (Some areas excluded)
2 a.m. on 1st Sunday of Apr. - 2 a.m. on last Sunday of Oct. (Local Time)
• European nations (Some areas excluded)
1 a.m. on last Sunday of Mar. - 1 a.m. on last Sunday of Oct. (UTC)
• Russia 2 a.m. on last Sunday of Mar. - 3 a.m. on last Sunday of Oct. (Local Time)
• Australia (Northern and western areas excluded)
2 a.m. on last Sunday of Oct. - 3 a.m. on last Sunday of Mar. (Local Time)
• New Zealand (Some areas excluded)
2 a.m. on 1st Sunday of Oct. - 3 a.m. on 3rd Sunday of Mar. (Local Time)
DST transition is illustrated below. (Case: Central European Summer Time)

2006/03/26 2006/10/29
01:59:59 02:00:00
Normal Time

DST

2006/03/26 2006/10/29
03:00:00 02:59:59
020601E.EPS

Figure Daylight Saving Time

One second after 2006/03/26 01:59:59, the clocks indicate 2006/03/26 03:00:00 forwarding
one hour.
And one second after 2006/10/29 02:59:59, the clocks indicate 2006/10/29 02:00:00
turning one hour back.
If Local Time is specified using the CENTUM data access library, OPC server converts the
time to Coordinated Universal Time (UTC) observing DST.
But when the DST ends, the clocks are turned back one hour. In this case, the time conver-
sion by the OPC server to Coordinated Universal Time (UTC) is not always as user ex-
pects.

● DST End Transition (Case: Central European Summer Time)


This describes the behavior of CENTUM data access library when DST ends.

2006/10/28 2006/10/29 2006/10/29 2006/10/29


23:00:00 00:00:00 01:00:00 02:00:00
UTC If [2006/10/29 02:00:00] is
specified in Local Time(DST),
Local Time(DST) OPC cannot determine if it is
the time in DST or the time
after DST.
2006/10/29 2006/10/29 2006/10/29 2006/10/29
01:00:00 02:00:00 02:00:00 03:00:00
020602E.EPS

Figure DST End Transition

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-75
Conversion from DST to UTC by the OPC server differs depending on the following:
If data is fetched in the order, ‘from the oldest to the newest’ (1*), the time is converted as
follows:
*1: Cases where the properties “MsgDirectionPast”, “TrendDirectionPast”, and “CloseDirectionPast” are set to
“centumDrctForward”.

• If the time to start data acquisition is set to the time in the repeated hour at the end of
DST, the time is converted based on the DST.
• If the time to end data acquisition is set to the time in the repeated hour at the end of
DST, the time is converted based on normal time.

If data is fetched in the order, ‘from the newest to the oldest’ (*2), the time is converted as
follows:
*2: Cases where the properties “MsgDirectionPast”, “TrendDirectionPast”, and “CloseDirectionPast” are set to
“centumDrctBackward”.

• If the time to start data acquisition is set to the time in the repeated hour at the end of
DST, the time is converted based on normal time.
• If the time to end data acquisition is set to the time in the repeated hour at the end of
DST, the time is converted based on the DST.

Examples of time conversion in cases where data is acquired in the order, ‘from the oldest
to the newest’ and vice versa are shown below.
Example: Case where data acquisition starts at 2006/10/29 02:00:00 and ends at 2006/10/
29 02:30:00 (in Central European nations)
Table Converted time if data is fetched in the order, ‘from the oldest to the newest’
Time specified by User Time Converted time (OPC server)
Computation
Local Time in OPC UTC
GMT+1 2006/10/29
Start acquisition at 2006/10/29
02:00:00 DST+1 00:00:00
2006/10/29 2006/10/29
End acquisition at GMT+1
02:30:00 01:30:00
020603E.EPS

Table Converted time if data is fetched in the order, ‘from the newest to the oldest’
Time specified by User Time Converted time (OPC server)
Computation
Local Time in OPC UTC
2006/10/29
Start acquisition at 2006/10/29 GMT+1
02:30:00 01:30:00
2006/10/29 GMT+1 2006/10/29
End acquisition at
02:00:00 DST+1 00:00:00
020604E.EPS

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-76
2006/10/28 2006/10/29 2006/10/29 2006/10/29
23:00:00 00:00:00 01:00:00 02:00:00
UTC

Local Time(DST)

2006/10/29 2006/10/29 2006/10/29 2006/10/29


01:00:00 02:00:00 02:00:00 03:00:00
Duration CENTUM data
access library fetches data

Duration 1: User’s Request

Duration 2: User’s Request

Duration 3: User’s Request


020605E.EPS

Figure Duration when the library can fetch data and Duration requested by user

If start time and end time for data acquisition are specified by user as 02:00:00 - 02:30:00 in
Local Time, CENTUM Data Access Library cannot determine which one of the above three
the user intends.
To prevent any missing data, CENTUM Data Access Library returns all the available data to
the requesting application. The application is expected to extract the data user requests.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<2. Library for Using with Visual Basic 6.0> 2-77

IMPORTANT
• Do not set the start time or the end time for data acquisition to the time in the skipped
hour before the beginning of DST because unintended data may be returned.

A case where unintended data are returned:


In central European nations, one second after 2006/03/26 01:59:59 (Normal time), the
clocks indicate 2006/03/26 03:00:00 (DST).
If you specify to fetch data as follows, unintended data are returned:
Start time : 2006/03/26 02:30:00 (in skipped hour)
End time : 2006/03/26 03:00:00 (DST)

• Avoid setting the start time and the end time for data acquisition to the same time in
the DST end transition period because the system returns data for one second in
normal time. (Start time = End time = any time in the DST end transition period)

A case where the start time and the end time for data acquisition are specified to the
same time in the DST end transition period:
In central European nations, one second after 2006/10/29 02:59:59(DST), the clocks
indicate 2006/10/29 02:00:00 (Normal time).
If you specify to fetch data as follows, CENTUM Data Access Library determines both
the start time and the end time in normal time, and returns the data for one second of
2006/10/29 02:00:00.
Start time : 2006/10/29 02:00:00
End time : 2006/10/29 02:00:00

This restriction applies only to the case where you specify the same time to both the
start time and the end time for data acquisition.
If you specify to fetch data as follows, for example, CENTUM Data Access Library
determines the start time in DST and the end time in normal time, and returns the data
for one hour and one second.
Start time : 2006/10/29 02:00:00
End time : 2006/10/29 02:00:01

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


Blank Page
<3. Library for Using with Visual Basic .NET> 3-1

3. Library for Using with Visual Basic .NET


This chapter describes the details of the CENTUM data access library for using with
Visual Basic .NET.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-2

3.1 Methods of CENTUM Data Access Library


The CENTUM Data Access Library supports the following methods.
This chapter details methods.

Table Methods of CENTUM Data Access Library


Data Accessed Method Name Function OPC Server *1
Station and system GetStnList Retrieves a list of station names.
Information GetStnInf Retrieves the station information.
GetTagData Retrieves tag data.
PutTagData Sets tag data.
DA
GetTagList Retrieves a list of tag names.
Tag data
GetTagInf Retrieves tag information.
GetTagItemList Retrieves the list of data items of a tag.
GetTagItemInf Retrieves tag data information.
GetRcpData Retrieves common block data.
PutRcpData Sets common block data.
GetRcpStat Retrieves a list of control recipes.
Retrieves a list of the names of common
GetRcpBlkList
blocks.
Batch data
Retrieves the header information for a
GetRcpHeadInf
recipe.
Batch
Retrieves a list of the item names of a
GetRcpItemList
common block.
Retrieves the item information of a
GetRcpItemInf
common block.
PutGuideMsg Generate operator guide message.
Messages GetHistMsg Retrieves historical messages.
SearchHistMsg Searches historical messages.
GetTrendData Retrieves historical trend data.
Trend data
GetTrendList Retrieves a list of historical trend points.
GetCloseData Retrieves closing data. HDA
Closing data
GetCloseList Retrieves a list of data subject to closing.
HIS boot-up information BootCheck Retrieves the date when the HIS started.
EventRqst Requests for notification of events.
Event requests Requests for notification of shutdown A&E
ShutdownRqst
events.
Data Accessed Method Name Function OPC Server *1
030101E.EPS

*1: When a method is running, it connects to the OPC server.


DA : OPC DA Server
Batch : Enhanced OPC Batch Server
HDA : OPC HDA Server
A&E : OPC Alarms & Events Server

When a method ends its execution, it disconnects from the OPC server. The resources in
the OPC server used by the method are released. Nevertheless, the method requested by
an event will hold the connection and resources unless the Alarms & Events server is
ended or the application program of the method is ended.

IM 33S02T10-01E 4th Edition : Dec.18,2003-01


<3. Library for Using with Visual Basic .NET> 3-3

3.1.1 Get Station List


Retrieves a list of names of all the stations defined in the system.

■ GetStnList Method

● Description
Retrieves a list of names of all the stations defined in the system.

● Syntax
objResults = object.GetStnList

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)

● Returns
• objResults
A one-dimensional array containing a list of station names is returned. Define the
variables of the Object types that are to be used for storing the returns.

● Explanation
The returns are given as data of the String type, i.e., characters. If n stations are defined in
the system configuration, the station names are contained in array elements 1-n of the
returns, as follows:
objResults(1) = “FCS0101”
objResults(2) = “FCS0102”
...
objResults(n) = “HIS0124”

IMPORTANT
The subscripts of objResults for referencing the elements should start from 1, if start from
0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-4

3.1.2 Get Station Information


Retrieves information on a station.

■ GetStnInf Method

● Description
Retrieves information on a station.

● Syntax
objResults = object.GetStnInf(sStnName, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sStnName
Set the characters that identify the station name of the station whose information you
want, such as “FCS0101”.
• objErrors
Specify the variable of the Object type to be used for storing the error codes.

● Returns
• objResults
A one-dimensional array comprising nine array elements and containing the station
information is returned. Specify the variables of the Object types to be used for storing
the returns.

● Explanation
The table below shows the content of each element of the returns.
Table Returns
Subscript Item Data Type Description Library Constant
1 Station model String E.g., “PFCS-S” centumStnType
0: Station ready
1: Station not ready
2 Station status Integer centumStnStatus
2: Station reserved
9: Station fail
3 Host name for Ethernet String E.g., “E0164” centumStnEtName
4 IP address for Ethernet String E.g., “172.17.1.64” centumStnEtIPAdd
5 Subnet mask for Ethernet String E.g., “255.255.0.0” centumStnEtMask
6 Host name for Control bus String E.g., “M0164” centumStnVnName
7 IP address for Control bus String E.g., “172.16.1.64” centumStnVnIPAdd
8 Subnet mask for Control bus String E.g., “255.255.0.0” centumStnVnMask
9 Station number Integer E.g., 320 centumStnNo
030102E.EPS

Note: The library constants shown in the table can also be specified as subscripts.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-5
If data cannot be obtained correctly, the GetStnInf method sets the error codes correspond-
ing to the data of the returns, in objErrors as a one-dimensional array variable that com-
prises nine array elements. Obtain an error code according to the following syntax:
objErrors(index) :Error Code

For index, set an integer from 1 to 9 or a library constant. For example, to check whether or
not the host name for Ethernet has been obtained correctly, check the error code in
objErrors(3) or objErrors(libbkuCENTUM.centumStn.centumStnEtName).

IMPORTANT
The subscripts of objResults and objErrors for referencing the elements should start from 1,
if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-6

3.1.3 Get Tag Data


Retrieves the current values and quality codes of tag data.

■ GetTagData Method

● Description
Retrieves the current values and quality codes of tag data.

● Syntax
objResults = object.GetTagData(sTagItems, iNum, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sTagItems
Specify a one-dimensional array variable. In each array element, specify a data item
as a character string in the format of “TagName.DataItem”.
• iNum
Specify how many array elements from array element 1 you want to retrieve data for.
A number up to 256 and not greater than the upper bound of the sTagItems array, can
be specified.
• objErrors
Specify a variable of the Object type for storing the error codes.

● Returns
• objResults
A one-dimensional array that contains current values or a two-dimensional array that
contains current values and quality codes, is returned. Specify the variables of Object
types to be used for storing returns.

● Explanation
When the GetTagQuality property of the object is False, the GetTagData method returns a
one-dimensional array (number of array elements = iNum) that contains current values.
The current value of sTagItems(index) can be obtained as:
objResults(index) :Current Value of sTagItems(index)

For index, set an integer from 1 to iNum. The data type of the current value thus obtained
varies depending on the corresponding data item.
When the GetTagQuality property of the object is True, the GetTagData method returns a
two-dimensional array (number of array elements = iNum x 2) that contains current values
and quality codes. The current value and quality code of sTagItems(index) can be obtained
as:
objResults(index,type) :Current Value of sTagItems(index) or quality code

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-7
For index, set an integer from 1 to iNum. For type, set a number as shown in the table
below.
Table Setting of Type
Type Description Library Constant
Retrieves the current value of the data item (the data type
1 centumTagData
depends on the data item).
2 Retrieves the quality code (Integer type) of the data item. centumTagQuality
030103E.EPS

Note: A number (1 or 2), a library constant shown in the table can also be used to specify the type.

There are three quality codes for tag data.


Table Quality Codes
Quality Code Meaning Library Constant
192 Good centumQualityTagGood
0 Bad centumQualityTagBad
64 Questionable centumQualityTagQuestionable
030104E.EPS

SEE ALSO
As quality codes, the library constants shown in the table above can also be used. For the details of
quality codes, see the following:
5, “Referencing Information for Users”

TIP
UNCERTAIN in OPC specification and QUESTIONNABLE in HIS trend specification are used for indicat-
ing questionable data.

If data cannot be obtained correctly, the GetTagData method sets the error codes corre-
sponding to the data of the returns, in objErrors as a one-dimensional array variable (num-
ber of array elements = iNum). Obtain the error code corresponding to sTagItems(index),
according to the following syntax:
objErrors(index) :Error Code of sTagItems(index)

For index, set an integer from 1 to iNum.

IMPORTANT
• The subscripts of sTagItems for holding data should start from 1.
• The subscripts of objResults and objErrors for referencing the elements should start
from 1, if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-8

3.1.4 Put Tag Data


Sets values in data of a tag.

■ PutTagData Method

● Description
Sets values in data of a tag.

● Syntax
objResults = object.PutTagData(sTagItems, iNum, objData, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sTagItems
Specify a one-dimensional array variable. In each array element, specify a data item
as a character string in the format of “TagName.DataItem”.
• iNum
Specify how many array elements of sTagItems from array element 1 you want to set
values for. A number up to 256 and not greater than the upper bound of the sTagItems
array, can be specified.
• objData
Specify a one-dimensional array variable of the Object type. The array size must be
the same as that of sTagItems. Type a beginning and closing parentheses after the
variable name to pass the entire array to the method. In each array element, specify
the value you want to set in the data item indicated by the same array subscript of
sTagItems.
• objErrors
Specify a variable of Object type to be used for storing error codes.

● Returns
• objResults
A zero (0), indicating a normal end, is always returned.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-9
● Explanation
If data cannot be set correctly, the PutTagData method sets the error codes corresponding
to the data items, in objErrors as a one-dimensional array variable (number of array ele-
ments = iNum). Obtain the error code corresponding to sTagItems(index), according to the
following syntax:
objErrors(index) :Error Code of sTagItems(index)

For index, set an integer from 1 to iNum.

IMPORTANT
• The subscripts of sTagItems and objData for holding data should start from 1.
• The subscripts of objResults and objErrors for referencing the elements should start
from 1, if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-10

3.1.5 Get Tag List


Retrieves a list of names of tags in a station.

■ GetTagList Method

● Description
Retrieves a list of names of tags in a station.

● Syntax
objResults = object.GetTagList(sStnName, sFilter)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sStnName
Specify the name of the station containing the tags whose names you want to retrieve,
in a character string such as “FCS0101”.
• sFilter
By specifying a matching pattern using a wildcard character, such as “FIC*”, you can
filter the tag names retrieved. When not filtering the tag names, specify a character
string whose length is zero or set an asterisk, “*”.

● Returns
• objResults
A one-dimensional array that contains a list of tag names that match the specified
pattern, is returned. Specify the variables of Object types to be used for storing the
returns.

● Explanation
The returns are given as data of the String type, i.e., characters. If the number of tag
names that match the specified pattern is n, the tag names are contained in array elements
1-n of the returns, as follows:
objResults(1) = “PVI001”
objResults(2) = “PVI002”
...
objResults(n) = “PID015”

IMPORTANT
The subscripts of objResults for referencing the elements should start from 1, if start from
0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-11

3.1.6 Get Tag Information


Retrieves information on a tag.

■ GetTagInf Method

● Description
Retrieves information on a tag.

● Syntax
objResults = object.GetTagInf(sTagName, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sTagName
Specify the name of the tag whose information you want, in a character string such as
“FIC001”.
• objErrors
Specify a variable of Object type to be used for storing error codes.

● Returns
• objResults
A one-dimensional array comprising seven array elements and containing the tag
information, is returned. Specify the variables of Object types to be used for storing
returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-12
● Explanation
The content of each array element of returns is as follows.
Table Returns

Data
Subscript Item Description Library Constant
Type
1 Tag comment String E.g., "Tank A Temperature" centumTagCMNT
2 Function block model String E.g., "PID" centumTagInstType
3 Alarm importance level Integer E.g., 1 centumTagALM
Station number of the
4 Station number Integer station containing the centumTagStnNo
specified tag name, e.g., "257"
Name of the station
5 Station name String containing the specified tag centumTagStnName
name,e.g., "FCS0101"
0: Reading is permitted
1: Reading is not permitted
because it is beyond the
scope of monitoring
2: Reading is not allowed
6 Read-permission security Integer centumTagRDSecurity
by the privileges currently
given
3: Reading is not allowed
because of both reasons
1and 2 above.
0: Writing is permitted
1: Writing is not permitted
because it is beyond the
scope of monitoring
2: Writing is not allowed by
7 Write-permission security Integer centumTagWRSecurity
the privileges currently
given.
3: Writing is not allowed by
both of the reasons 1 and
2 above.
030105E.EPS

Note: A number (1-7), a library constant shown in the table can also be used to specify a subscript.

If data cannot be obtained correctly, the GetTagInf method sets the error codes corre-
sponding to the data of the returns, in objErrors as a one-dimensional array variable com-
prising seven array elements. To check whether each data can be obtained correctly,
obtain an error code according to the following syntax:
objErrors(index) :Error Code

For index, set an integer from 1 to 7 or a library constant. For example, to check whether or
not the alarm importance level has been obtained correctly, check the error code in
objErrors(3) or objErrors(libbkuCENTUM.centumTag.centumTagALM).

IMPORTANT
The subscripts of objResults and objErrors for referencing the elements should start from 1,
if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-13

3.1.7 Get Tag Item List


Retrieves a list of the data items of a tag.

■ GetTagItemList Method

● Description
Retrieves a list of the data items of a tag.

● Syntax
objResults = object.GetTagItemList(sTagName)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sTagName
Specify the name of the tag for which you want to retrieve a list of data items, using a
character string such as “FIC001”.

● Returns
• objResults
A one-dimensional array containing a list of data items is returned. Specify the vari-
ables of the Object types that are to be used for storing the returns.

● Explanation
Each array element of the returns is of the character-string data type. If the specified tag
has n data items, the data item names are contained in array elements 1-n, as follows:
objResults(1) = “PV”
objResults(2) = “PH”
...
objResults(n) = “SL”

IMPORTANT
The subscripts of objResults and objErrors for referencing the elements should start from 1,
if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-14

3.1.8 Get Tag Item Information


Retrieves information on a data item of a tag.

■ GetTagItemInf Method

● Description
Retrieves information on a data item of a tag.

● Syntax
objResults = object.GetTagItemInf(sItemName, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sItemName
Specify the tag’s data item whose information you want, using a character string in the
format of “TagName.DataItem”.
• objErrors
Specify a variable of Object type to be used for storing error codes.

● Returns
• objResults
A one-dimensional array comprising ten array elements and containing tag data
information, is returned. Specify the variables of Object types to be used for storing
returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-15
● Explanation
The content of each array element of returns is as follows.
Table Returns (1 of 2)
Data
Subscript Item Description Library Constant
Type
1 Engineering unit String E.g., “DEGC” centumItemEU
2 Data item comment String E.g., “Tank A Temperature” centumItemCMNT
3 Upper scale limit Double E.g., 150 centumItemHI
4 Lower scale limit Double E.g., -10 centumItemLO
5 Decimal point position Integer E.g., 1 centumItemDP
Number of array
6 elements of first Integer E.g., 2 centumItemArray1
dimension
Number of array
7 elements of second Integer E.g., 3 centumItemArray2
dimension
Indicates the data type in
the FCS.
0: Two-byte signed integer
1: Two-byte unsigned
integer
2: Four-byte signed integer
3: Four-byte unsigned
integer
4: Normal-precision
floating-point number
5: Double-precision floating-
point number
6: Character string
7: Two-byte signed integer
with data status
8: Two-byte unsigned
8 FCS data type String centumItemDataType
integer with data status
9: Four-byte signed integer
with data status
10: Four-byte unsigned
integer with data status
11: Normal-precision
floating-point number with
data status
12: Double-precision
floating-point number with
data status
13: Normal-precision
floating-point number with
data status and range
14: Counter value with data
status
Data
Subscript Item Description Library Constant
Type
030106E.EPS

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-16
Table Returns (2 of 2)
Data
Subscript Item Description Library Constant
Type
0: Reading is permitted
1: Reading is not permitted
because it is beyond the
scope of monitoring.
2: Reading is not allowed
9 Read-permission security Integer centumItemRDSecurity
by the privileges currently
given.
3: Reading is not allowed
because of both reasons
1 and 2 above.
0: Writing is permitted
1: Writing is not permitted
because it is beyond the
scope of monitoring.
2: Writing is not allowed by
10 Write-permission security Integer centumItemWRSecurity
the privileges currently
given.
3: Writing is not allowed by
because of both reasons
1 and 2 above.
030107E.EPS

Note: A number (1-10), a library constant shown in the table can also be used to specify a subscript.

If data cannot be obtained correctly, the GetTagItemInf method sets the error codes corre-
sponding to the data of the returns, in objErrors as a one-dimensional array variable com-
prising ten array elements. To check whether each data can be obtained correctly, obtain
an error code according to the following syntax:
objErrors(index) :Error Code

For index, set an integer from 1 to 10 or a library constant. For example, to check whether
or not the item comment has been obtained correctly, check the error code in objErrors(2)
or objErrors(libbkuCENTUM.centumItem.centumItemCMNT).

IMPORTANT
The subscripts of objResults and objErrors for referencing the elements should start from 1,
if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-17

3.1.9 Get Common Block Data


Retrieves the current values of the data of a common block.

■ GetRcpData Method

● Description
Retrieves the current values of the data of a common block.

● Syntax
objResults = object.GetRcpData(sComItems, iNum, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sComItems
Specify a one-dimensional array variable. In each array element, specify a common
block data item for accessing the current value using a character string in the format of
“RecipeGroupNumber,BatchID:CommonBlockName.DataItem.”
• iNum
Specify how many array elements from array element 1 you want to retrieve current
values for. A number up to 256 and not greater than the upper bound of the
sComItems array, can be specified.
• objErrors
Specify a variable of Object type to be used for storing error codes.

● Returns
• objResults
A one-dimensional array and containing the current values is returned. Specify the
variables of the Object types that are to be used for storing the returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-18
● Explanation
The GetRcpData method returns a one-dimensional array (number of array elements =
iNum) that contains current values. The current value of sComItems(index) can be ob-
tained as:
objResults(index) :Current Value of sComItems(index)

For index, set an integer from 1 to iNum. The data type of the current value thus obtained
varies depending on the corresponding data item of the common block.
If data cannot be obtained correctly, the GetRcpData method sets the error codes corre-
sponding to the specified data items, in objErrors as a one-dimensional array variable
(number of array elements = iNum). Obtain the error code corresponding to
sComItems(index), according to the following syntax:
objErrors(index) :Error Code of sComItems(index)

For index, set an integer from 1 to iNum.

IMPORTANT
• The subscripts of sComItems for holding data should start from 1.
• The subscripts of objResults and objErrors for referencing the elements should start
from 1, if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-19

3.1.10 Put Common Block Data


Sets values in data of a common block.

■ PutRcpData Method

● Description
Sets values in data of a common block.

● Syntax
objResults = object.PutRcpData(sComItems, iNum, objData, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sComItems
Specify a one-dimensional array variable. In each array element, specify a data item
as a character string in the format of
“RecipeGroupNumber,BatchID:CommonBlockName.DataItem”.
• iNum
Specify for how many array elements of sComItems from array element 1 you want to
set the data. A number up to 256, not greater than the upper bound of the sComItems
array, can be specified.
• objData
Specify a one-dimensional array variable of the Object type. The array size must be
the same as that of sComItems. Type a beginning and closing parentheses after the
variable name to pass the entire array to the method. In each array element, specify
the value you want to set in the data item indicated by the same array subscript of
sComItems.
• objErrors
Specify a variable of Object type storing the error codes.

● Returns
• objResults
A zero (0), indicating a normal end, is always returned.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-20
● Explanation
If data cannot be set correctly, the PutRcpData method sets the error codes corresponding
to the data items, in objErrors as a one-dimensional array variable (number of array ele-
ments = iNum). Obtain the error code corresponding to sComItems(index), according to
the following syntax:
objErrors(index) :Error Code of sComItems(index)

For index, set an integer from 1 to iNum.

IMPORTANT
• The subscripts of sComItems and objData for holding data should start from 1.
• The subscripts of objResults and objErrors for referencing the elements should start
from 1, if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-21

3.1.11 Get Control Recipe List


Retrieves a list of batch IDs of control recipes or a list of recipe names defined in the
recipe definitions.

■ GetRcpStat Method

● Description
Retrieves a list of batch IDs of control recipes or a list of recipe names defined in the recipe
definitions.

● Syntax
objResults = object.GetRcpStat

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)

● Returns
• objResults
A one-dimensional array containing batch IDs or recipe names is returned. Specify the
variables of the Object types that are to be used for storing the returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-22
● Explanation
When the TreeType property of the object is 1 (= libbkuCENTUM.centumTree.
centumTreeBatchID), the GetRcpStat method returns batch IDs. The returns are given as
data of the String type. If the number of existing control recipes is n, character string data
in the format of “RecipeGroupNumber,BatchID” are contained in array elements 1-n of the
returns, as follows:
objResults(1) = “1,01-0001”
objResults(2) = “1,01-0002”
...
objResults(n) = “16,16-0100”
When the TreeType property of the object is 2 (= libbkuCENTUM.centumTree.
centumTreeRecipe), the GetRcpStat method returns recipe names. The returns are also
given as data of the String type. If the number of existing, defined recipe is n, characters in
the format of “RecipeGroupNumber,RecipeName” are contained in array elements 1-n, as
follows:
objResults(1) = “1,RECIPE01-01”
objResults(2) = “1,RECIPE01-02”
...
objResults(n) = “16,RECIPE16-01”

IMPORTANT
The subscripts of objResults for referencing the elements should start from 1, if start from
0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-23

3.1.12 Get Common Block List


Retrieves a list of common block names.

■ GetRcpBlkList Method

● Description
Retrieves a list of common block names.

● Syntax
objResults = object.GetRcpBlkList

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)

● Returns
• objResults
A one-dimensional array containing a list of common block names is returned. Specify
the variables of Object types to be used for storing returns.

● Explanation
The returns are given as data of the String type, i.e., characters. If the number of defined
common blocks is n, the common block names are contained in array elements 1-n of the
returns, as follows:
objResults(1) = “SYSPCM01”
objResults(2) = “SYSPCM02”
...
objResults(n) = “SYSRCM”

IMPORTANT
The subscripts of objResults for referencing the elements should start from 1, if start from
0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-24

3.1.13 Get Recipe Header Information


Retrieves the header information of a recipe.

■ GetRcpHeadInf Method

● Description
Retrieves the header information of a recipe.

● Syntax
objResults = object.GetRcpHeadInf(sBatchID, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sBatchID
Specify the batch ID for accessing the header information using a character string in
the format of “RecipeGroupNumber,BatchID.”
• objErrors
Specify a variable of Object type to be used for storing error codes.

● Returns
• objResults
A one-dimensional array comprising fifteen array elements and containing the recipe’s
header information, is returned. Specify the variables of Object types to be used for
storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-25
● Explanation
The content of each array element of returns is as follows.
Table Returns

Data
Subscript Item Description Library Constant
Type
1 Recipe name String E.g., “RECIPE01” centumRcpName
Date when the recipe was
2 Date E.g., “30/08/2003 19:39:10” centumRcpCRData
created
3 Recipe comment String E.g., “Recipe for Product-A” centumRcpCMNT
4 Product name String E.g., “PRODUCT-A” centumRcpPRDCTName
5 Version of recipe Integer E.g., 1 centumRcpVarNo
Date when the recipe was
6 Date E.g., “30/08/2003 23:39:10” centumRcpVarDate
last modified
7 Author of recipe String E.g., “James Jones” centumRcpCRName
Person approved the
8 String E.g., “Monica Smith” centumRcpAPPName
recipe
9 Date of approval Date E.g., “31/08/2003 10:39:10” centumRcpAPPDate
10 Master recipe status String E.g., “Approved” centumRcpStatus
11 Engineering unit of recipe String E.g., “DEGC” centumRcpEU
12 Security level String E.g., “2” centumRcpACCLevel
E.g., “Recipe for producing
13 Description for recipe String centumRcpDescription
product-A”
14 Batch start time Date E.g., “29/09/2003 23:39:10” centumRcpStartTime
15 Batch end time Date E.g., “30/09/2003 23:39:10” centumRcpEndType
030108E.EPS

Note: A number (1-15), a library constant shown in the table can also be used to specify a subscript.

If data cannot be obtained correctly, the GetRcpHeadInf method sets the error codes
corresponding to the data of the returns, in objErrors as a one-dimensional array variable
comprising fifteen array elements. To check whether each data can be obtained correctly,
obtain an error code according to the following syntax:
objErrors(index) :Error Code

For index, set an integer from 1 to 15 or a library constant. For example, to check whether
or not the author’s name has been obtained correctly, check whether the error code
objErrors(7) or objErrors(libbkuCENTUM.centumRcp.centumRcpCRName) is obtained.

IMPORTANT
The subscripts of objResults and objErrors for referencing the elements should start from 1,
if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-26

3.1.14 Get Common Block Item List


Retrieves a list of the names of the data items of a common block.

■ GetRcpItemList Method

● Description
Retrieves a list of the names of the data items of a common block.

● Syntax
objResults = object.GetRcpItemList(sComName)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sComName
Specify in a character string the name of the common block for which you want to
retrieve a list of the names of data items.

● Returns
• objResults
A one-dimensional array containing a list of the names of data items contained in the
specified common block is returned. Specify the variables of Object types to be used
for storing returns.

● Explanation
The returns are given as data of the String type, i.e., characters. If the specified common
block has n data items, the item names are contained in array elements 1-n of the returns,
as follows:
objResults(1) = “RECIPEGR”
objResults(2) = “RECIPE”
...
objResults(n) = “STATUS”

IMPORTANT
The subscripts of objResults for referencing the elements should start from 1, if start from
0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-27

3.1.15 Get Common Block Item Information


Retrieves information on a data item of a common block.

■ GetRcpItemInf Method

● Description
Retrieves information on a data item of a common block.

● Syntax
objResults = object.GetRcpItemInf(sComItem, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sComItem
Specify the common block data item whose information you want, in a character string
in the format of “RecipeGroupName,BatchID:CommonBlockName.ItemName”.
• objErrors
Specify a variable of Object type to be used for storing error codes.

● Returns
• objResults
A one-dimensional array comprising six array elements and containing the information
of the specified data item, is returned. Specify the variables of Object types to be used
for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-28
● Explanation
The content of each array element of returns is as follows.
Table Returns

Subscript Item Data Type Description Library Constant


A value indicating the data
type of the variable when it is
manipulated by Visual Basic;
1 Data type Integer for details, refer to the help in centumRcpItemDataType
Visual Basic about “data
typing.” E.g., 3 for the Long
type.
Depending
2 Value centumRcpItemDataValue
on the item
3 Engineering unit String E.g., “KG/H” centumRcpItemEU
4 Item comment String E.g., “Item Comment” centumRcpItemCMNT
E.g., 5 when the value =
5 Display digits Integer centumRcpItemRange
100.1
E.g., 1 when the value =
6 Number of decimals Integer centumRcpItemDP
100.1
030109E.EPS

Note: A number (1-6), a library constant shown in the table can also be used to specify a subscript.

Usually, the GetRcpItemInf method is used to retrieve the information of a data item of a
common block when used for a particular control recipe. However, the returns for the
engineering unit, item comment, and display digits are always the same for the same item
regardless of which control recipe you specify. Hence, if this is the only information you
want to retrieve, you can retrieve it by specifying the item in the format of
“*,*:CommonBlockName.ItemName”. In this case, error codes will be returned for the data
type and value.
If data cannot be obtained correctly, the GetRcpItemInf method sets the error codes corre-
sponding to the data of the returns, in objErrors as a one-dimensional array variable com-
prising six array elements. To check whether each data can be obtained correctly, obtain
an error code according to the following syntax:
objErrors(index) :Error Code

For index, set an integer from 1 to 6, or a library constant. For example, to check whether
or not the item comment has been obtained correctly, check the error code in objErrors(4)
or objErrors(libbkuCENTUM.centumRcpItem.centumRcpItemCMNT).

IMPORTANT
The subscripts of objResults and objErrors for referencing the elements should start from 1,
if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-29

3.1.16 Put Operator Guide Message


Generate an operator guide message.

■ PutGuideMsg Method

● Description
Generate an operator guide message.

● Syntax
objResults = object.PutGuideMsg(sMsgString)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• sMsgString
Set the text (string type) of the operator guide message you want to activate.

● Returns
• objResults
A zero (0), indicating a normal end, is always returned.

IMPORTANT
The subscripts of objResults for referencing the elements should start from 1, if start from
0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-30

3.1.17 Get Historical Message


Retrieves historical messages that occurred during a specified period.

■ GetHistMsg Method

● Description
Retrieves historical messages that occurred during a specified period.

● Syntax
objResults = object.GetHistMsg(dStartTime, dEndTime, iNum, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• dStartTime
Specify the beginning date and time (Date type) of the period during which the mes-
sages you want to retrieve, occurred.
• dEndTime
Specify the ending date and time (Date type) of the period during which the messages
you want to retrieve occurred. The dEndTime setting must be later than dStartTime.
• iNum
Specify how many messages you want to retrieve from among those that occurred
during the period between dStartTime and dEndTime.
• objErrors
Specify a variable of Object type to be used for storing error codes.

● Returns
• objResults
A one-dimensional array (number of elements = iNum) containing the historical mes-
sages is returned. Specify the variables of Object types to be used for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-31
● Explanation
Messages are contained in objResults in chronological order; however, whether they are
stored from the newest one or the oldest one depends on the property of the object. When
the MsgDirectionPast property of the object is 1 (= libbkuCENTUM.centumDrct.
centumDrctForward), the oldest message is contained in element 1 of objResults, and the
newer message is contained in the element of the greater array subscript, as shown below.
objResults(1) = “11/11/2003 09:08:49...FCS0101,,,FCS0101 Fail”
objResults(2) = “11/11/2003 10:15:32...FCS0101,,,FCS0101 Recover”
...
objResults(iNum) = “11/11/2003 10:21:18...FCS0101,,,FCS0101 LEFT Control”
When the MsgDirectionPast property of the object is 2 (= libbkuCENTUM.centumDrct.
centumDrctBackward), the newest message is contained in element 1 of objResults, and
the older message is contained in the element of the greater array subscript, as shown
below.
objResults(1) = “11/11/2003 10:21:18...FCS0101,,,FCS0101 LEFT Control”
...
objResults(iNum-1) = “11/11/2003 10:15:32...FCS0101,,,FCS0101 Recover”
objResults(iNum) = “11/11/2003 09:08:49...FCS0101,,,FCS0101 Fail”

SEE ALSO
• For the format of messages, see the following:
5, “Referencing Information for Users”
• If the library is used in the area where daylight saving time (DST) is observed, see the following:
3.6, “Notes and Precautions”

If data cannot be obtained correctly, the GetHistMsg method sets the error codes corre-
sponding to the messages, in objErrors as a one-dimensional array variable (the number of
elements = iNum). To check whether each message can be obtained correctly, obtain an
error code according to the following syntax:
objErrors(index) :Error Code

For index, set an integer from 1 to iNum.


If iNum is greater than the number of messages found, “&H42A94” (libbkuCENTUM.
centumReturn.centumReturnNoData) is set in the remaining array elements of objErrors,
indicating “no data”. For example, when you specify 100 for iNum but only 50 messages
occurred during the period you specified, array elements of subscripts 51 through 100 in
objErrors contain “&H42A94”.

IMPORTANT
The subscripts of objResults and objErrors for referencing the elements should start from 1,
if start from 0, an error will occur.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<3. Library for Using with Visual Basic .NET> 3-32

3.1.18 Search for Historical Message


Searches through the historical messages that occurred during the specified period,
and finds the messages that match the specified conditions.

■ SearchHistMsg Method

● Description
Searches through the historical messages that occurred during the specified period, and
finds the messages that match the specified conditions.

● Syntax
objResults = object.SearchHistMsg(dStartTime, dEndTime, iSearchIDs, _
objSearchStrings, iSearchCategories, iNum, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• dStartTime
Specify the beginning date and time (Date type) of the period during which the mes-
sages you want to search, occurred.
• dEndTime
Specify the ending date and time (Date type) of the period during which the messages
you want to search, occurred. The dEndTime setting must be later than dStartTime.
• iSearchIDs
Specify a one-dimensional array variable of the Integer type. In each array element,
specify a search condition ID.
• objSearchStrings
Specify a one-dimensional array variable of the Object type. In each array element,
specify a string or number corresponding to the search condition ID that is set in the
element of the same array subscript in iSearchIDs.
• iSearchCategories
Specify a one-dimensional array variable of the Integer type. In each array element,
specify the search category to be searched for, that corresponds to the search condi-
tion ID set in the element of the same array subscript in iSearchIDs.
• iNum
Specify how many messages you want to retrieve from among those that occurred
during the period between dStartTime and dEndTime and match the specified condi-
tions.
• objErrors
Specify a variable of Object type to be used for storing error codes.

● Returns
• objResults
A one-dimensional array (number of elements = iNum) containing the historical
messages is returned. Specify the variables of Object types to be used for storing
returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-33
● Explanation
As is mentioned for the GetHistMsg method, whether the messages are stored to
objResults in order of the oldest or the newest can be changed by modifying the
MsgDirectionPast property of the object.

SEE ALSO
• For the MsgDirectionPast property, see the following:
3.1.17, “Get Historical Message”
• For the format of messages, see the following:
5, “Referencing Information for Users”
• If the library is used in the area where daylight saving time (DST) is observed, see the following:
3.6, “Notes and Precautions”

The table below shows what you should specify in each array element of iSearchIDs as a
search condition ID, and in each array element of objSearchStrings as a string or number
to be searched for.
Table Search Condition IDs

As the Search Condition Data Type of String/Number


When You Want to
ID (in iSearchIDs), You Want to Find (to be set Library Constant
Search through ...
Specify ... in objSearchStrings)
Station names 1 String centumMsgSrchIDStn
Tag names 2 String centumMsgSrchIDTag
User names 3 String centumMsgSrchIDUsr
Batch IDs 4 String centumMsgSrchIDBatch
Unit recipe numbers 5 Integer centumMsgSrchIDUnit
Arbitrary characters 6 String centumMsgSrchIDString
Message numbers 7 Integer centumMsgSrchIDMsgNo
030110E.EPS

Note: Instead of a number from 1 to 7, you can set a library constant shown in the table to specify the objects to be searched
through.

The table below shows what you should specify in each array element of
iSearchCategories as the range of messages to be searched through.
Table Search Categories

When You Want to Search In iSearchCategories,


Library Constant
through Specify ...
All kinds of messages 0 centumMsgSrchCtgryALL
Process alarm messages 1 centumMsgSrchCtgryPRCALM
Status change messages 2 centumMsgSrchCtgryMODESTS
Operator guide messages 3 centumMsgSrchCtgryOPGUIDE
Sequence messages 4 centumMsgSrchCtgrySEQMSG
Maintenance messages 5 centumMsgSrchCtgryENGMNT
Operation record messages 6 centumMsgSrchCtgryOPREC
System alarm messages 7 centumMsgSrchCtgrySYSALRM
030111E.EPS

Note: Instead of a number from 0 to 7, you can set a library constant shown in the table to specify the messages to be
searched through.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<3. Library for Using with Visual Basic .NET> 3-34
Individual array elements of the same array subscript of iSearchIDs, objSearchStrings, and
iSearchCategories correspond with each other. When you specify two or more conditions
using arrays comprising more than one array element, the SearchHistMsg method finds
the historical messages that match all the specified conditions. For example, when you
want to find status change messages for tags whose tag names begin with the characters,
“PID”, and that exists in station FCS0101, specify the conditions as follows:
iSearchIDs(1) = 1 ’Station names
objSearchStrings(1) = “FCS0101”
iSearchCategories(1) = 2 ’Search through status change messages
and find the messages occurring in the
station having the station name of
“FCS0101”.
iSearchIDs(2) = 2 ’Tag names
objSearchStrings(2) = “PID*”
iSearchCategories(2) = 2 ’Search through status change messages
and find the messages for tags whose tag
name begins with “PID”.

If data cannot be obtained correctly, the SearchHistMsg method sets the error codes
corresponding to the messages, in objErrors as a one-dimensional array variable (the
number of elements = iNum). To check whether each message can be obtained correctly,
obtain an error code according to the following syntax:
objErrors(index) :Error Code

For index, set an integer from 1 to iNum.


If iNum is greater than the number of messages found, “&H42A94”
(libbkuCENTUM.centumReturn.centumReturnNoData) is set in the remaining array ele-
ments of objErrors, indicating “no data”. For example, when you specify 100 for iNum but
only 50 messages occurred during the period you specified, array elements of subscripts
51 through 100 in objErrors contain “&H42A94”.

IMPORTANT
• The subscripts of iSearchIDs, objSearchStrings and iSearchCategories for holding
data should start from 1.
• The subscripts of objResults and objErrors for referencing the elements should start
from 1, if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-35

3.1.19 Get Historical Trend Data


Retrieves historical trend data during a specified period.

■ GetTrendData Method

● Description
Retrieves historical trend data during a specified period.

● Syntax
objResults = object.GetTrendData(dStartTime, dEndTime, sTrendItems,_
iNumItems, objInterval, iNumValues, objNumRemains, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• dStartTime
Specify the beginning date and time (Date type) of the period of trend data you want to
retrieve.
• dEndTime
Specify the ending date and time (Date type) of the period of trend data you want to
retrieve. The dEndTime setting must be later than dStartTime.
• sTrendItems
Specify a one-dimensional array variable of the String type. In each array element,
specify an item ID of trend data.
• iNumItems
Specify for how many array elements from array element 1 of sTrendItems you want to
retrieve the data. A number up to 256 and no greater than the number of array ele-
ments of sTrendItems, can be specified.
• objInterval
When you want to retrieve data of intervals longer than the trend acquisition period,
specify the interval of data. There are three ways to specify the interval: (1) a number,
0, for the meaning of a zero, (2) a string “xMIN” for minutes, or (3) a string “xSEC” for
seconds, where x is a positive integer.
When setting 0, trend data acquired at the trend data acquisition periods are obtained
as are. When specifying a data interval in the format of “xMIN” or “xSEC”, it must be
longer than the trend data acquisition period.
• iNumValues
Specify the number of data values of trend data you want to retrieve.
• objNumRemains
Specify a variable of Object type for storing the number of remaining data values that
are not retrieved by the GetTrendData method.
• objErrors
Specify a variable of Object type to be used for storing error codes.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-36
● Returns
• objResults
A three-dimensional array containing the trend data values, time stamps, and quality
codes (array size = iNumItems x iNumValues x 2 or x 3) is returned. Specify the
variables of Object types to be used for storing returns.

● Explanation
The item ID to be set in each array element of sTrendItems can be specified as a string in
either of the following formats:
• “TagName.ItemName”
• “TagName.ItemName.DataSamplingInterval” (DataSamplingInterval = “xSEC” or
“xMIN” where x is an arbitrary decimal number”)
If multiple trend blocks are using different sampling period for the same TagName.
ItemName, DataSamplingInterval needs to be affixed to the TagName.ItemName so as to
be referenced for getting the trend data.
However, if the DataSamplingInterval is not affixed, among the multiple blocks for the same
TagName.ItemName, the trend block with the smallest block number will be aimed for
getting the trend data.

Each value corresponding to sTrendItems(index) can be obtained according to the follow-


ing syntax.
objResults(index,DataNumber,Type) :Data of sTrendItems(index)

For index, set an integer from 1 to iNumItems.


For DataNumber, which specifies the chronological position of the value in the array, set an
integer from 1 to iNumValues. When the TrendDirectionPast property of the object is 1 (=
libbkuCENTUM.centumDrct.centumDrctForward), the larger the DataNumber specified,
the newer the data value you will retrieve. When the TrendDirectionPast property of the
object is 2 (= libbkuCENTUM.centumDrct.centumDrctBackward), the larger the
DataNumber specified, the older the data value you will retrieve.
For Type, which specifies what kind of data to be retrieved, set a value from among the
following three options.
Table Types

Type Description Library Constant


Used to obtain the value of a trend data (the data type
1 centumTrdValue
depends on the item ID).
2 Used to obtain the time stamp of a trend data (Date type). centumTrdTimeStamp
3 Used to obtain the quality code of a trend data (Integer type). centumTrdQuality
030113E.EPS

Note: Instead of a number from 1 to 3, a library constant shown in the table can be used to specify the type.

If the GetTrendQuality property of the object is False, the GetTrendData method returns
only the trend data values and time stamps. (In this case, the maximum subscript for the
third dimension of objResults is 2.)

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-37
There are four quality codes for trend data.
Table Quality Codes

Quality Code Description Library Constant


201 Good centumQualityTrendGood
305 Bad centumQualityTrendBad
309 Questionable centumQualityTrendQuestionable
307 No data centumQualityTrendNoData
030114E.EPS

Note: Instead of a number (201, 305, 309, or 307), a library constant shown in the table above can be used to specify the
quality code.

SEE ALSO
• For details of quality codes, see the following:
5, “Referencing Information for Users”
• If the library is used in the area where daylight saving time (DST) is observed, see the following:
3.6, “Notes and Precautions”

In sTrendItems, you can specify item IDs of different sampling intervals. When doing so,
you must set objInterval to 0 or the largest interval from among the sampling intervals set in
all item IDs in sTrendItems. (If objInterval is set to 0, then data of the sampling interval
specified in each item ID are obtained.)
If most of the trend data for a specified item ID existed during the period between
dStartTime and dEndTime, then the number specified by iNumValues, i.e., the number of
remaining data that are not retrieved, is set in the corresponding array element of
objNumRemains (a one-dimensional array, with its number of array elements =
iNumItems). The number of remaining data for sTrendItems(index) can be obtained
according to the following syntax:
objNumRemains(index) :sTrendItem(index) Number of residual data

For index, set an integer from 1 to iNumItems. When you set objInterval to 0, the values in
all array elements of objNumRemains are empty.
If data cannot be obtained correctly, the GetTrendData method sets the error codes corre-
sponding to individual item IDs and individual intervals, in objErrors as a two-dimensional
array variable (the number of elements = iNumItems x iNumValues). The error code for the
N-th value of sTrendItems(index) can be obtained according to the following syntax:
objErrors(index, number) :sTrendItem(index) Error code indicated by number

Trend data that can be obtained by the GetTrendData method are only those data collected
by the HIS (a personal computer running an OPC server) specified by the StationName
property of the object. Trend data that are collected by other HISs and referenced by the
specified HIS cannot be obtained.

IMPORTANT
• The subscripts of sTrendItems for holding data should start from 1.
• The subscripts of objResults, objErrors and objNumRemains for referencing the
elements should start from 1, if start from 0, an error will occur.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<3. Library for Using with Visual Basic .NET> 3-38

3.1.20 Get Historical Trend List


Retrieves a list of the item IDs of trend recording data.

■ GetTrendList Method

● Description
Retrieves a list of the item IDs of trend recording data.

● Syntax
objResults = object.GetTrendList(iNumFilter, iAttrIDs, objFilters)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• iNumFilter
Specify the number of filters you set. The number must be equal to or less than the
number of array elements of iAttrIDs.
• iAttrIDs
Specify a one-dimensional array variable of the Integer type. In each array element,
specify an attribute ID.
• objFilters
Specify a one-dimensional array variable of the Object type. In each array element,
specify a filter attribute.

● Returns
• objResults
A one-dimensional array containing a list of the item IDs of trend data is returned.
Specify the variables of Object types to be used for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-39
● Explanation
As an attribute ID to be specified in each array element of iAttrIDs, set either of the num-
bers shown in the table below.
Table Attribute IDs

Filtering by Attribute ID Library Constant


Item IDs 113 centumTrendAttrIDItemID
Trend data acquisition periods 151 centumTrendAttrIDInterval
030115E.EPS

Note: A number (113 or 151), a library constant shown in the table can also be used to specify an attribute ID.

If you specify item IDs (113) as an attribute ID, specify the characters you want to find in the
item IDs as the corresponding filter attribute in objFilters. You can specify a pattern using
wildcard characters.

If you specify trend data acquisition periods (151) as an attribute ID, specify the number for
the corresponding filter attribute in objFilters, according to the table below.
Table Filter Attribute Values When Specifying Data Acquisition Periods as Attribute ID
Range of Item IDs to Be Searched Filter Attribute Value Library Constant
Trend recording points for which the
data acquisition period is set to 1 1 centumTrendFilter1SEC
second
Trend recording points for which the
data acquisition period is set to 10 2 centumTrendFilter10SEC
seconds
Trend recording points for which the
data acquisition period is set to 1 4 centumTrendFilter1MIN
minute
Trend recording points for which the
data acquisition period is set to 2 8 centumTrendFilter2MIN
minutes
Trend recording points for which the
data acquisition period is set to 5 16 centumTrendFilter5MIN
minutes
Trend recording points for which the
data acquisition period is set to 10 32 centumTrendFilter10MIN
minutes
030116E.EPS

Note: The values shown in the table, a library constant can also be used to specify a filter attribute.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-40
For example, when PID001’s PV is assigned to trend pens of all data acquisition periods
but you want to retrieve the item ID, “PID001.PV”, of the 1-second acquisition period,
specify the parameters as follows:
iNumFilters = 2
iAttrIDs(1) = libbkuCENTUM.centumTrendAttrID.centumTrendAttrIDItemID
objFilters(1) = “PID001.PV.*”
iAttrIDs(2) = libbkuCENTUM.centumTrendAttrID.centumTrendAttrIDInterval
objFilters(2) = libbkuCENTUM.centumTrendFilter.centumTrendFilter1SEC

When both item IDs and trend data acquisition periods are specified as attribute IDs, like in
this example, item IDs that meet both conditions are obtained.
When you want to specify more than one data acquisition period, you can specify the
condition as follows. To obtain item IDs of trend data whose data acquisition period is 1
second or 10 minutes in the example above, specify:
objFilters(2) = libbkuCENTUM.centumTrendFilter.centumTrendFilter1SEC +
libbkuCENTUM.centumTrendFilter.centumTrendFilter10MIN

The trend data item IDs that can be obtained by the GetTrendList method are only those
trend data IDs collected by the HIS (a personal computer running an OPC server) specified
by the StationName property of the object. The item IDs for trend data collected by another
HIS and referenced by the specified HIS, cannot be obtained.

IMPORTANT
• The subscripts of iAttrIDs and objFilters for holding data should start from 1.
• The subscripts of objResults for referencing the elements should start from 1, if start
from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-41

3.1.21 Get Closing Data


Retrieves closing data during a specified period.

■ GetCloseData Method

● Description
Retrieves closing data during a specified period.

● Syntax
objResults = object.GetCloseData(dStartTime, dEndTime, sCloseItems,_
iNumItems, sInterval, iNumValues, objNumRemains, objErrors)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• dStartTime
Specify the beginning date and time (Date type) of the period of closing data you want
to retrieve.
• dEndTime
Specify the ending date and time (Date type) of the period of closing data you want to
retrieve. The dEndTime setting must be later than dStartTime.
• sCloseItems
Specify a one-dimensional array variable of the String type. In each array element,
specify an item ID of trend data.
• iNumItems
Specify for how many array elements from array element 1 of sCloseItems you want to
retrieve data. A number up to 256 and no greater than the number of array elements
of sCloseItems, can be specified.
• sInterval
Specify a string of “HOUR” when you want to retrieve hourly closing data, “DAY” for
daily closing data, or “MONTH” for monthly closing data.
• iNumValues
Specify the number of values of closing data you want to retrieve.
• objNumRemains
Specify a variable of the Object type for storing the number of remaining closing data
values that are not retrieved by the GetCloseData method.
• objErrors
Specify a variable of the Object type to be used for storing error codes.

● Returns
• objResults
A three-dimensional array containing the closing data values (array size = iNumItems
x iNumValues x 8) or a four-dimensional array containing the closing data values and
quality codes (array size = iNumItems x iNumValues x 8 x 2) is returned. Specify the
variables of the Object types that are to be used for storing the returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-42
● Explanation
The item ID to be set in each array element of sCloseItems can be specified as a string in
the following format:
“TagName.ItemName”
When the GetCloseQuality property of the object is False, a value corresponding to
sCloseItems (index) can be obtained according to the following syntax:
objResults(index, number,data) :sCloseItems(index)’s data

For index, set an integer from 1 to iNumItems.


For DataNumber, which specifies the chronological position of the value in the array, set an
integer from 1 to iNumValues. When the CloseDirectionPast property of the object is 1 (=
libbkuCENTUM.centumDrct.centumDrctForward), a larger DataNumber you specify a
newer data value you retrieve. When the CloseDirectionPast property of the object is 2 (=
libbkuCENTUM.centumDrct.centumDrctBackward), the larger the DataNumber you
specify, the older the data value retrieved.
For DataType, set a value from among the following to specify what kind of closing data is
to be retrieved.
Table DataType Settings
DataType Description Library Constant
Used to obtain the total (the data type depends on the
1 centumClsSUMValue
item ID).
Used to obtain the average (the data type depends on the
2 centumClsAVEValue
item ID).
3 Used to obtain the time of the minimum value (Date type). centumClsMINTime
Used to obtain the minimum value (the data type depends
4 centumClsMINValue
on the item ID).
5 Used to obtain the time of the maximum value (Date type). centumClsMAXTime
Used to obtain the maximum value (the data type depends
6 centumClsMAXValue
on the item ID).
Used to obtain the snapshot value (the data type depends
7 centumClsSTValue
on the item ID).
Used to obtain the difference between the maximum and
8 centumClsRange
minimum values (the data type depends on the item ID).
030117E.EPS

Note: Instead of a number from 1 to 8, a library constant shown in the table can be used to specify what kind of closing data
value is to be retrieved.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-43
If the GetCloseQuality property of the object is True, the GetCloseData method returns
quality codes in addition to the summary of data values above. In this case, objResults is a
four-dimensional array, and a value corresponding to sCloseItems(index) can be obtained
according to the following syntax:
objResults(index, number,data,type) :sCloseItems(index)’s data

For DataOrQuality, specify whether you want the quality code or value of the closing data,
according to the table below.
Table DataOrQuality Settings

DataOrQuality Description Library Constant


Used to obtain the value of closing data
1 centumClsValue
(the data type depends on the item ID).
Used to obtain the quality code of the
2 centumClsQuality
closing data (Integer type).
030118E.EPS

Note: Instead of a number (1 or 2), a library constant shown in the table can be used to specify whether to retrieve the quality
code or data value.

There are four quality codes for closing data.


Table Quality Codes

Quality Code Description Library Constant


304 Good centumQualityCloseGood
305 Bad centumQualityCloseBad
309 Questionable centumQualityCloseQuestionable
307 No data centumQualityCloseNoData
030119E.EPS

Note: Instead of a number from 304 to 307, a library constant shown in the table can be used to specify the quality code.

SEE ALSO
• For details of quality codes, see the following:
5, “Referencing Information for Users”
• If the library is used in the area where daylight saving time (DST) is observed, see the following:
3.6, “Notes and Precautions”

In sCloseItems, you can specify item IDs of different summarization periods, such as hourly
and daily closing data. When doing so, you must set sInterval to the string that indicates
the longest period of closing data ("HOUR"< "DAY"< "MONTH") from among those set in all
item IDs in sCloseItems.
If most of the closing data for a specified item ID exists within the period between
dStartTime and dEndTime, then the number is specified by iNumValues. The number of
remaining data that are not retrieved is set in the corresponding array element of
objNumRemains (a one-dimensional array, the number of its array elements = iNumItems).
The number of remaining data for sCloseItems(index) can be obtained according to the
following syntax:
objNumRemains(index) :sCloseItems(index) residul data

For index, set an integer from 1 to iNumItems.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<3. Library for Using with Visual Basic .NET> 3-44
If data cannot be obtained correctly, the GetCloseData method sets the error codes corre-
sponding to individual item IDs and individual summarization periods, in objErrors as a two-
dimensional array variable (the number of elements = iNumItems • iNumValues). The error
code for N-th value of sCloseItems(index) can be obtained according to the following
syntax:
objErrors(index, number) :sCloseItems(index) Error Code indicated by number

Closing data that can be obtained by the GetCloseData method are only those data col-
lected by the HIS (a personal computer running an OPC server) specified by the
StationName property of the object.

IMPORTANT
• The subscripts of sCloseItems for holding data should start from 1.
• The subscripts of objNumRemains, objErrors and objResults for referencing the
elements should start from 1, if start from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-45

3.1.22 Get Closed Data Item ID List


Retrieves a list of the item IDs of data for which periodic summarization is specified.

■ GetCloseList Method

● Description
Retrieves a list of the item IDs of data for which periodic summarization is specified.

● Syntax
objResults = object.GetCloseList(iNumFilter, iAttrIDs, objFilters)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• iNumFilter
Specify the number of filters you set. The number must be equal to or less than the
number of array elements of iAttrIDs.
• iAttrIDs
Specify a one-dimensional array variable of the Integer type. In each array element,
specify an attribute ID.
• objFilters
Specify a one-dimensional array variable of the Object type. In each array element,
specify a filter attribute.

● Returns
• objResults
A one-dimensional array containing a list of the item IDs of data for which periodic
summarization is specified, is returned. Specify the variables of Object types to be
used for storing returns.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-46
● Explanation
As an attribute ID to be specified in each array element of iAttrIDs, set either of the two
numbers shown in the table below.
Table Attribute IDs

Filtering by Attribute ID Library Constant


Item IDs 113 centumCloseAttrIDItemID
Summarization periods 151 centumCloseAttrIDInterval
030120E.EPS

Note: A number (113 or 151), a library constant shown in the table can also be used to specify an attribute ID.

If you specify item IDs as an attribute ID, specify the characters you want to find in item IDs,
as the corresponding filter attribute in objFilters. You can specify a pattern using wildcard
characters.

If you specify summarization periods as an attribute ID, specify a number as the corre-
sponding filter attribute in objFilters, according to the table below.
Table Filter Attribute Values

Item IDs to Be Searched Filter Attribute Value Library Constant


Item IDs of data for which hourly
256 centumCloseFilterHOUR
summarization is specified
Item IDs of data for which daily
512 centumCloseFilterDAY
summarization is specified
Item IDs of data for which monthly
1024 centumCloseFilterMONTH
summarization is specified
030121E.EPS

Note: Instead of a value shown in the table, a library constant can also be used for specifying a filter attribute.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-47
For example, when you want to retrieve the item IDs of any data (1) which belong to tags
whose tag number begins with “PID”, and (2) for which daily summarization is specified;
specify the parameters as follows:
iNumFilters = 2
iAttrIDs(1) = libbkuCENTUM.centumCloseAttrID.centumCloseAttrIDItemID
objFilters(1) = “PID*.*”
iAttrIDs(2) = libbkuCENTUM.centumCloseAttrID.centumCloseAttrIDInterval
objFilters(2) = libbkuCENTUM.centumCloseFilter.centumCloseFilterDAY

When both item IDs and summarization periods are specified as attribute IDs, as shown in
this example, item IDs that meet both conditions are obtained.
When you want to specify more than one summarization period, you can specify the
condition as follows. To obtain item IDs of data for which daily or monthly summarization is
specified, specify:
objFilters(2) = libbkuCENTUM.centumCloseFilter.centumCloseFilterDAY +
libbkuCENTUM.centumCloseFilter.centumCloseFilterMONTH

Item IDs of closing data that can be obtained by the GetCloseList method are only those
IDs of trend data collected by the HIS (a personal computer running an OPC server)
specified by the StationName property of the object.

IMPORTANT
• The subscripts of iAttrIDs for holding data should start from 1.
• The subscripts of objResults for referencing the elements should start from 1, if start
from 0, an error will occur.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-48

3.1.23 Get Data and Time that OPC Server starts in HIS
Retrieves the date and time when the HIS (OPC) server started.

■ BootCheck Method

● Description
Retrieves the date and time when the HIS(OPC) server started.

● Syntax
objResults = object.BootCheck

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)

● Returns
• objResults
The date and time when the OPC server started is returned as a value of the Date
type. For storing the return, define a variable of the Object type.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-49

3.1.24 Event Notification Request


Request the OPC server to notify occurrences of events (sequence messages,
operator guide messages, etc.).

■ EventRqst Method

● Description
Request the OPC server to notify occurrences of events (sequence messages, operator
guide messages, etc.).

● Syntax
objResults = object.EventRqst(iNumCategories, iCategories, iNumAttrIDs,_
iAttrIDs, objAttributes, iNumSources, sSourceLists)

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• iNumCategories
Specify the number of event categories you defined. The number must be equal to or
less than the number of array elements of iCategories.
• iCategories
Specify a one-dimensional array variable of the Integer type. In each array element,
specify an event category.
• iNumAttrIDs
Specify the number of attribute IDs you defined. The number must be equal to or less
than the number of array elements of iAttrIDs and objAttributes.
• iAttrIDs
Specify a one-dimensional array variable of the Integer type. In each array element,
specify an attribute ID.
• objAttributes
Specify a one-dimensional array variable of the Object type. In each array element,
specify an attribute value for the attribute ID that you defined for the corresponding
array element of lAttrIDs.
• iNumSources
Specify the number of event sources you defined. The number must be equal to or
less than the number of array elements of sSourceLists.
• sSourceLists
Specify a one-dimensional array variable of the String type. In each array element,
specify an event source.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-50
● Returns
• objResults
A zero (0), indicating a normal end, is always returned.

● Explanation
Event categories to be set in iCategories specify the kinds of events for which notification
can be requested.
Table Event Categories

Events Event Category Library Constant


System alarms 101 centumEventCtgrySYSALRM
Process alarms 102 centumEventCtgryPRCALRM
Mode/status changes 103 centumEventCtgryMODESTS
Sequence messages 104 centumEventCtgrySEQMSG
Operator guide messages 105 centumEventCtgryOPGUIDE
Engineering maintenance records 106 centumEventCtgryENGMNT
Operation records 107 centumEventCtgryOPREC
Errors in OPC server 109 centumEventCtgrySERVERERROR
030122E.EPS

Note: Instead of the numbers from 101 to 109, library constants can be used for specifying event categories.

For example, when you request sequence messages and operator guide messages to be
notified, specify:
iNumCategories = 2
iCategories(1) = libbkuCENTUM.centumEventCtgry.centumEventCtgrySEQMSG
iCategories(2) = libbkuCENTUM.centumEventCtgry.centumEventCtgryOPGUIDE

If two or more event categories are specified, as shown in this example, an event belonging
to any of the specified categories will be notified upon occurrence.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<3. Library for Using with Visual Basic .NET> 3-51
Attribute IDs to be set in iAttrIDs specify the attributes (information) of each message, as
shown in the table below.
Table Attribute IDs
Attribute Attribute ID Data Type Library Constant
Message number 160 Integer centumEventAttrIDMSGID
Station name 161 String centumEventAttrIDSTNNM
Tag name 162 String centumEventAttrIDTAG
Item name 163 String centumEventAttrIDITEM
Depending on
Data value 164 centumEventAttrIDVALUE
data item
Recipe group number 165 Integer centumEventAttrIDRCPGRP
Recipe name 166 String centumEventAttrIDRCPNM
Batch ID 167 String centumEventAttrIDBCHID
Unit recipe number 168 Integer centumEventAttrIDUTRCP
Engineering unit 169 String centumEventAttrIDEU
Mode/status name 170 String centumEventAttrIDSTAT
Element name 171 String centumEventAttrIDELMNM
Filename of operator station
172 String centumEventAttrIDODBFL
database
Engineering station name 173 String centumEventAttrIDENGNM
Name of operator 174 String centumEventAttrIDOPENM
Name of station where operation
175 String centumEventAttrIDOPESTN
was performed
Loaded station name 178 String –
Event occurrence time (serial number
179 Date –
of GMT seconds)
Event occurrence time (milliseconds) 180 Integer –
Path of plant hierarchy 181 String –
Station number 182 Integer –
Area number 183 Integer –
Common block name 184 String –
Sequence message number 185 Integer –
Alarm level 187 Integer –
Alarm off 188 Integer –
Alarm blink 189 Integer –
Alarm filter 190 Integer –
Project ID 191 String –
030123E.EPS

Note: Instead of the numbers from 160-175, you can also use the library constants shown in the table to specify the attribute
ID.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-52
For each attribute specified by an attribute ID, specify a condition (attribute value) so that
only the messages whose specified attribute matches the condition will be notified. Set an
appropriate value for each attribute value in reference to the table above (taking care to
note the data type). When setting characters, you can specify a pattern using wildcard
characters. Each array element of objAttributes corresponds to the array element of
iAttrIDs with the same array subscript. For example, when you request notification of
events on tags having the tag names of “PVI001” and “PID123”, specify:
iNumAttrIDs = 2
iAttrIDs(1) = libbkuCENTUM.centumEventAttrID.centumEventAttrIDTAG
objAttributes(1) = “PVI001”
iAttrIDs(2) = libbkuCENTUM.centumEventAttrID.centumEventAttrIDTAG
objAttributes(2) = “PID123”

Like this, if two or more attribute conditions are specified, any event that meets any one or
more of the specified conditions will be notified. If you do not set any condition, set
iNumAttrIDs to zero (0).

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-53
The attributes that can be specified for attribute IDs vary depending on the event catego-
ries you specified in iCategories. The table below shows the attributes associated with
each event category.
Table Attributes Associated with Each Event Category
Event Categories

Operator Guide Messages

Engineering Maintenance
Mode/Status Changes

Errors in OPC Server


Sequence Messages

Operation Records
Process Alarms
System Alarms

Records
Attribute
Message number 1 1 1 1 1 1 1
Station name 2 2 2 2 2 2 2
Name of operator 5 3
Name of station where operation 6 4
was performed
Tag name 3 3 5
Item name 4 6
Data value 5 7
Recipe group number 7 6 4 6 3 8
Recipe name 8 7 5 7 4 9
Batch ID 9 8 6 8 5  10
Unit recipe number  10  9 7 9 6  11
Engineering unit  10  12
Mode/status name  14  8  13
Element name  15 3 7
Engineering station name 3
Filename of operator station
4
database
Loaded Station Name 5
Event Occurrence Time
 3  11  9 4 8  6  14
(Serial Number of GMT Seconds)
Event Occurrence Time
 4  12  10  5 9  7  15
(Milliseconds)
Path of Plant Hierarchy  11  13  11  10  10  16
Station number  12  16  12  11  11  8  17
Area number  13  17  13  12  12  9  18
Common block name  14  18  14  13  13  19
Sequence message number  19  14  14
Alarm level  20
Alarm off  21
Alarm blink  22
Alarm filter  23
Project ID  15  24  16  15  15  10  21
030124E.EPS

: Available

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-54
For example, when you choose ‘system alarms’ for the event category, and ‘tag name’ for
the attribute, no event will be notified.
The numbers next to the  in the above table indicate the orders to be attached to the
MsgEvent.
However, the 15th attribute of “Mode/Status Changes” and 20th attribute of “Operation
Records” are reserved.
For an event source to be specified in sSourceLists, type characters indicating a station
name (e.g., FCS0101), tag name (e.g., PID001), message name (e.g., %OG0001S
010101), and so on. You can specify a pattern using wildcard characters, such as
“*S0101*”.
When you do not specify an event source, set iNumSources to zero (0).

IMPORTANT
When designating event source for obtaining an event name, the area number (01) is
required to be put to the event source, otherwise, the event name can not be obtained.
Moreover, the wild card (*) can be used (For an example: %OG0001S0101*) instead of an
area number.

The kind of event source that you can specify differs depending on the corresponding event
category specified in iCategories. The table below shows the valid specifications for event
sources.
Table Valid Specifications for Event Sources

Event Category Event Source


System alarms
Station name; e.g., “FCS0101”, “FCS01??”
Engineering maintenance records
Process alarms
Tag name; e.g., “PID001”, “%SW0100S0101”,
Mode/status changes
“%AN0001S0101*”
Operation records
Sequence messages Message number; e.g., “%M30001S0101*”,
Operator guide messages “%OG0001S0101*”
030125E.EPS

When you specify event categories, attributes, and event sources at the same time, only
the events that meet all the specified conditions will be notified upon their occurrence.
Thus, it is important to be aware that when more than one condition is specified for catego-
ries, or for attributes, or for event sources, events may not be notified as intended.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-55
For example, assume that the following conditions are coded in order to request notification
of operator guide messages related to the batch ID of “ABC123” occurring in the FCS of
station no. 1 in domain no. 1 as well as sequence messages occurring in the same FCS.
iNumCategories = 2 ‘Number of categories specified
iCategories(1) = libbkuCENTUM.centumEventCtgry.centumEventCtgrySEQMSG
‘Sequence messages
iCategories(2) = libbkuCENTUM.centumEventCtgry.centumEventCtgryOPGUIDE
‘Operator guide messages
iNumAttrIDs = 1 ‘Number of attributes specified
iAttrIDs(1) = libbkuCENTUM.centumEventAttrID.centumEventAttrIDBCHID
‘Batch ID
objAttributes(1) = “ABC123”
iNumSources = 1
sSourceLists(1) = “*S0101*”

You cannot use the EventRqst method to cancel a request made by the EventRqst method.
To stop event notification, change the MsgNotify property of the object to False.
If the EventRqst method is called more than once, only the request made by the most
recent call of the EventRqst method is valid; requests made by all previous calls are invalid.

IMPORTANT
• The subscripts of iCategories, iAttrIDs, objAttributes and sSourceLists for holding data
should start from 1.
• The subscripts of objResults for referencing the elements should start from 1, if start
from 0, an error will occur.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-56

3.1.25 Shutdown Event Notification Request


Request the OPC server to notify a shutdown of the HIS upon occurrence.

■ ShutdownRqst Method

● Description
Request the OPC server to notify a shutdown of the HIS upon occurrence.

● Syntax
objResults = object.ShutdownRqst

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)

● Returns
• objResults
A zero (0), indicating a normal end, is always returned.

● Explanation
Calling this method will allow the local program to recognize a shutdown of the HIS as an
event. Actually, the program will obtain shutdown events from an A&E server, and the
program will be connected continuously after the ShutdownRqst method is called.
You cannot cancel the request by using the ShutdownRqst method. To stop notification of
HIS’s shutdowns, modify the ShutdownNotify property of the object to False.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-57

3.2 Properties of CENTUM Data Access Library


The table below shows the properties of the CENTUM data access library.

Table Properties of CENTUM Data Access Library


Data Concerned Property Name Setting OPC Server*1
StationName Station name of OPC server DA,Batch,HDA,A&E
Common to ShutdownNotify Whether to be notified of server's shutdown A&E
all functions
Whether to run the CENTUM data access
TestMode
library in the test mode
Tag data GetTagQuality Whether to retrieve quality codes of data DA
Display format in browse function (about
Batch data TreeType Batch
batch IDs and recipe names)
Whether to be notified of alarm and event
MsgNotify A&E
messages
Messages Search direction for messages (either
MsgDirectionPast reverse-chronological or chronological Batch
order)
Search direction for trend data (ascending
TrendDirectionPast
Trend data or descending chronological order)
GetTrendQuality Whether to retrieve quality codes of data
HDA
Search direction for closing data (ascending
CloseDirectionPast
Closing data or descending chronological order)
GetCloseQuality Whether to retrieve quality codes of data
030201E.EPS

*1: When a method is referencing a property, it connects to the OPC server.


DA: OPC DA Server
Batch: Enhanced OPC Batch Server
HDA: OPC HDA Server
A&E: OPC Alarms & Events Server

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-58

3.2.1 OPC Server Property


Set station name (computer name) to the OPC server where the data to be accessed.
The setting information can be returned.

■ StationName Property

● Description
Set station name (computer name) to the OPC server where the data to be accessed. The
setting information can be returned.

● Syntax for Setting


object.StationName[=string]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• string
Specify the station name of the OPC server you want to access.

● Explanation
Be sure to set the SationName property when using the CENTUM data access library at a
computer running an OPC client.
If the setting is omitted when using the CENTUM data access library at a computer running
an OPC server, access for data acquisition and setting is made to the local computer (My
Computer).

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-59

3.2.2 HIS Shutdown Notification


Whether to be notified of shutdowns of the HIS (that runs the OPC server)

■ ShutdownNotify Property

● Description
Whether to be notified of shutdowns of the HIS (that runs the OPC server)

● Syntax for Setting


object.ShutdownNotify[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• boolean
To enable notification of shutdowns of the HIS, set True. To disable, set False.

● Explanation
If the ShutdownNotify property is set at True and notification of ShutdownEvent has been
requested using the ShutdownRqst method, the CENTUM data access library generates a
ShutdownEvent upon occurrence of a shutdown of the HIS (running the OPC server).

SEE ALSO
For details of the ShutdownRqst Method, see the following:
3.1.25, “Shutdown Event Notification Request”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-60

3.2.3 Library Test Mode


The current run mode of the CENTUM data access library

■ TestMode Property

● Description
The current run mode of the CENTUM data access library

● Syntax for Setting


object.TestMode[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• boolean
To run the CENTUM data access library in the test mode, set True. To run it in the
target-machine mode, set False.

SEE ALSO
For details of run modes of CENTUM Data Access Library, see the following:
3.4, “Run Modes of CENTUM Data Access Library”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-61

3.2.4 Get Tag Quality Code


Whether or not quality codes should be acquired when the GetTagData method is
called

■ GetTagQuality Property

● Description
Whether or not quality codes should be acquired when the GetTagData method is called

● Syntax for Setting


object.GetTagQuality[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• boolean
To acquire quality codes, set True. Otherwise, set False.

SEE ALSO
For details of GetTagData method, see the following:
3.1.3, “Get Tag Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-62

3.2.5 Tree Type Display


Whether batch IDs or recipe names should be acquired by the GetRcpStat method (a
method for acquiring a list of control recipes)

■ TreeType Property

● Description
Whether batch IDs or recipe names should be acquired by the GetRcpStat method (a
method for acquiring a list of control recipes)

● Syntax for Setting


object.TreeType[=integer]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• integer
To acquire batch IDs, set 1 (= libbkuCENTUM.centumTree.centumTreeBatchID). To
acquire recipe names, set 2 (= libbkuCENTUM.centumTree.centumTreeRecipe).

SEE ALSO
For details of GetRcpStat method, see the following:
3.1.11, “Get Control Recipe List”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-63

3.2.6 Alarm/Event Notification


Whether to enable events such as alarms and messages to be notified upon their
occurrences

■ MsgNotify Property

● Description
Whether to enable events such as alarms and messages to be notified upon their occur-
rences

● Syntax for Setting


object.MsgNotify[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• boolean
To enable notification of events, set True. To disable, set False.

● Explanation
If the MsgNotify property is set at True and notification of event occurrences has been
requested using the EventRqst method, the CENTUM data access library generates a
MsgEvent upon occurrence of an alarm or message.

SEE ALSO
For details of EventRqst method, see the following:
3.1.24, “Event Notification Request”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-64

3.2.7 Message Searching Direction


Whether historical messages should be acquired in order of the oldest messages or
newest messages by the GetHistMsg method (a method for acquiring historical
messages) and SearchHistMsg method (a method for searching historical mes-
sages)

■ MsgDirectionPast Property

● Description
Whether historical messages should be acquired in order of the oldest messages or new-
est messages by the GetHistMsg method (a method for acquiring historical messages) and
SearchHistMsg method (a method for searching historical messages)

● Syntax for Setting


object.MsgDirectionPast[=integer]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• integer
To acquire messages in reverse chronological order such that the oldest message is
first and the newest last, set 1 (= libbkuCENTUM.centumDrct.centumDrctForward).
To acquire messages in chronological order such that the newest message is first and
the oldest last, set 2 (= libbkuCENTUM.centumDrct.centumDrctBackward).

SEE ALSO
• For details of GetHistMsg method, see the following:
3.1.17, “Get Historical Message”
• For details of SearchHistMsg method, see the following:
3.1.18, “Search for Historical Message”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-65

3.2.8 Trend Data Searching Direction


Whether trend data should be acquired in order of the oldest data or the newest data
by the GetTrendData method (a method for acquiring trend data)

■ TrendDirectionPast Property

● Description
Whether trend data should be acquired in order of the oldest data or the newest data by the
GetTrendData method (a method for acquiring trend data)

● Syntax for Setting


object.TrendDirectionPast[=integer]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• integer
To acquire data in reverse chronological order such that the oldest data is first and the
newest last, set 1 (= libbkuCENTUM.centumDrct.centumDrctForward). To acquire
data in chronological order such that the newest data is first and the oldest last, set 2
(= libbkuCENTUM.centumDrct.centumDrctBackward).

SEE ALSO
For details of GetTrendData method, see the following:
3.1.19, “Get Historical Trend Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-66

3.2.9 Get Trend Quality Code


Whether or not quality codes should be acquired when the GetTrendData method is
called

■ GetTrendQuality Property

● Description
Whether or not quality codes should be acquired when the GetTrendData method is called

● Syntax for Setting


object.GetTrendQuality[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• boolean
To acquire quality codes, set True. Otherwise, set False.

SEE ALSO
For details of GetTrendData method, see the following:
3.1.19, “Get Historical Trend Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-67

3.2.10 Closing Data Searching Direction


Whether closing data should be acquired in the order of the oldest data or the new-
est data by the GetCloseData method (a method for acquiring closing data)

■ CloseDirectionPast Property

● Description
Whether closing data should be acquired in the order of the oldest data or the newest data
by the GetCloseData method (a method for acquiring closing data)

● Syntax for Setting


object.CloseDirectionPast[=integer]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• integer
To acquire data in reverse chronological order such that the oldest data is first and the
newest last, set 1 (= libbkuCENTUM.centumDrct.centumDrctForward). To acquire
data in chronological order such that the newest data is first and the oldest last, set 2
(= libbkuCENTUM.centumDrct.centumDrctBackward).

SEE ALSO
For details of GetCloseData method, see the following:
3.1.21, “Get Closing Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-68

3.2.11 Get Closing Data Quality Code


Whether or not quality codes should be acquired when the GetCloseData method is
called

■ GetCloseQuality Property

● Description
Whether or not quality codes should be acquired when the GetCloseData method is called

● Syntax for Setting


object.GetCloseQuality[=boolean]

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• boolean
To acquire quality codes, set True. Otherwise, set False.

SEE ALSO
For details of GetCloseData method, see the following:
3.1.21, “Get Closing Data”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-69

3.3 Events in CENTUM Data Access Library


The table below shows the events generated in the CENTUM data access library.

Table Events in CENTUM Data Access Library

Corresponding Events in HIS Event Name Function


Notifies alarms and messages occurring in the
Messages MsgEvent
HIS and FCSs.
HIS shutdown events ShutdownEvent Notifies shutdown of the HIS.
030301E.EPS

The above events are nothing from OPC Alarms&Events Server.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-70

3.3.1 Alarms and Messages Notification


A MsgEvent is generated when an event (an alarm, message, etc.) for which notifica-
tion has been requested occurs.

■ MsgEvent Event

● Description
A MsgEvent is generated when an event (an alarm, message, etc.) for which notification
has been requested occurs.

● Syntax
Private Sub AxCENTUMDataAccess1_MsgEvent(_
By Val sender As System.Object,_
By Val eEventArgs As AxlibbkuCENTUM.__CENTUMDataAccess_MsgEventEvent_
)Handles AxCENTUMDataAccess1.MsgEvent

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• eEventArgs
Two-dimensional array variables of the Variant type, that contain various information
on events that occur.
• sender
The default argument of Visual Basic .NET
• AxCENTUMDataAccess1.MsgEvent
The default Handle statement of Visual Basic .NET

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-71
● Explanation
Information contained in eEventArgs can be obtained by specifying the following syntax:
eEventArgs(index, item)

For index, specify the number identifying the desired event. If the number of events that
have occurred is n, then you can specify a number from 1 to n. The number of events that
have occurred can be obtained by using the Ubound function (namely, Ubound
(eEventArgs,1)).
For item, specify the information item according to the table below.
Table Information Items

Item Information Item Library Constant


1 Date and time of occurrence centumEventData
2 Name of station in which the event occurred centumEventStation
3 Message text centumEventMsg
4 Event category centumEventCategory
5 Alarm status centumEventCondition
6 Number of attributes centumEventNumAttrs
6+1 Attribute 1 centumEventAttrs + 1
6+2 Attribute 2 centumEventAttrs + 2
...

...

...
6 + (m - 1) Attribute (m - 1) centumEventAttrs + (m - 1)
6+m Attribute m centumEventAttrs + m
030302E.EPS

In the table above, “m” represents the number of attributes. Namely, the value of “m” is the
number when specifying item = 6, and it differs depending on the event category.

SEE ALSO
For the event category and attribute, see the following:
3.1.24, “Event Notification Request”

Only when both of the following conditions are met, is a MsgEvent generated:
• An event for which notification has been requested by using the EventRqst method,
occurs.
• The MsgNotify property is True.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-72

3.3.2 HIS Shutdown Notification


A ShutdownEvent is generated when the HIS (running the OPC server) is shut down.

■ ShutdownEvent Event

● Description
A ShutdownEvent is generated when the HIS (running the OPC server) is shut down.

● Syntax
Private Sub object_ ShutdownEvent(_
By Val sender As Object,_
By Val e As System.EventArgs)_
Handles AxCENTUMDataAccess1.ShutdownEvent

● Parameters
• object
The expression for calling an object of the CENTUM Data Access Control
(AxCENTUMDataAccess1 by default)
• e
The default argument of Visual Basic .NET
• sender
The default argument of Visual Basic .NET
• AxCENTUMDataAccess1.MsgEvent
The default Handle statement of Visual Basic .NET

● Explanation
Only when all of the following conditions are met, is a ShutdownEvent generated:
• Notification of a ShutdownEvent has been requested using the ShutdownRqst
method.
• The ShutdownNotify property is True.
• The HIS is shut down.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-73

3.4 Run Modes of CENTUM Data Access Library


When using the CENTUM data access library, choose the mode suitable for the
current phase of your user program development, as outlined in the table below.

Table Run Modes of CENTUM Data Access Library and Their Actions
Mode Actions When This Mode Should Be Chosen
The CENTUM data access library Choose this mode when you are
does not actually perform data developing a user program at a stand-
Test mode
access but returns fixed values alone computer before you start testing
(i.e., used for debugging). the program on an integrated system.
The CENTUM data access library
performs data access to the Choose this mode during actual
Target-machine target stations, such as an FCS, operation. This mode requires both the
mode via the OPC server and returns OPC server and the FCS(s) to be
the results (i.e., used for normal running.
functions).
030401E.EPS

To change the mode, change the setting of the TestMode property of the CENTUM Data
Access Control (AxCENTUMDataAccess1 by default).
• TestMode property = True: Test mode
• TestMode property = False: Target-machine mode

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-74

3.5 Error Handling for CENTUM Data Access


Library
When the CENTUM data access library cannot accomplish a process, i.e., when an
error occurs in a process, an unanticipated action may occur. To prevent this, you
need to embed countermeasures against errors within the program code before-
hand.

■ Run-Time Errors
When a method or property of the CENTUM Data Access Control is implemented during
run time but the array of returns cannot be obtained because of the shortage of memory, or
when communication with the OPC server fails, the CENTUM data access library may
generate a run-time error. At this time, execution of the code is aborted, and in most cases,
cannot be restarted.
To avoid this crisis, you need to embed an error handling routine in the code prior to run
time so that error occurrences can be trapped and the appropriate countermeasures can
be taken. Occurrences of errors can be trapped using the Try...Catch...Finally statement.
The following shows an example of an error trap used when implementing the GetStnList
method.
Private Sub Subroutine()
Dim objResults As Object
Try ‘Enable error trap.
objResults = AxCENTUMDataAccess1.GetStnList ‘Run library method.
‘If the program runs normally, it continues to run the statements up to Catch.
...
Erase objResults
Catch
‘Error handling subroutine
‘Exceptional process on error occurrence
...
Erase objResults
End Try
End Sub

The error that has occurred can be identified in the error handling routine by checking the
properties of the Err object.

Run-time errors can be generally divided into ones generated by Visual Basic .NET, ones
by the CENTUM data access library itself, and ones by the OPC server. When the OPC
server generates an error, the CENTUM data access library simply passes the error to the
user as is.

SEE ALSO
For the errors generated by the OPC server, see the following:
5, “Referencing Information for Users”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-75
■ Methods that Return an Error Code for the Result of Execution
Even if execution of a code is completed without the occurrence of an error, it does not
always mean that the coded process has been implemented correctly. To check this,
several methods of the CENTUM Data Access Control, such as GetStnInf and
GetTagData, return an error code that represents the cause of error. These methods
require a variable of the Object type as a parameter for storing the error code (see the
declaration on the third line of the code below, for example). When the process cannot be
implemented correctly, these methods store the error code (Integer type) in this variable.
(At the same time, the empty values, vbEmpty, are set in the returns.) The details of the
error can be identified from the Integer type variable obtained from the error code using the
CInt function.
The following shows an example of an error handling procedure used when calling the
GetTagData method.
Private Sub Subroutine()
Dim objResults As Object
Dim objErrors As Object
Dim sTagItems(2) As String
sTagItems(1) = “PID001.PV”
sTagItems(2) = “PID002.PV”
objResults = AxCENTUMDataAccess1.GetTagData(sTagItems,2,objErrors)
‘Run library method
‘*** Test getting PID001.PV ***
If CInt(objErrors(1)) = 0 then
‘Process on success of getting the PV
Else
‘Process on failure of getting the PV
End If
‘*** Test getting PID002.PV ***
If CInt(objErrors(2)) = 0 then
‘Process on success of getting the PV
Else
‘Process on failure of getting the PV
End If
...
Erase objResults
Erase objErrors
End Sub

In this case, the OPC server generates all of the occurring errors. The CENTUM data
access library simply passes the errors to the user as they are.

SEE ALSO
For the errors generated by the OPC server, see the following:
5, “Referencing Information for Users”

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-76
■ Error Codes
The table below shows a list of error codes (error codes for run-time errors) generated by
the CENTUM data access library itself.
Table Error Codes

Error Code Details


&H80000010 The number of data is invalid.
&H80000011 The number of arrays is invalid.
&H80000012 No browsing data
&H80000030 The number of values is invalid.
&H80000031 The item ID is not specified.
&H80000032 The value is not specified.
&H80000033 The time is invalid.
&H80000034 The search ID is not specified.
&H80000035 The search string is not specified.
&H80000036 The search category is not specified.
&H80000037 The numbers of search IDs, strings, and categories specified do not correspond.
&H80000050 The time is invalid.
&H80000051 The number of item IDs is invalid.
&H80000052 The number of values is invalid.
&H80000053 The item ID is not specified.
&H80000054 The number of filters is invalid.
&H80000055 The attribute ID is not specified.
&H80000056 The filter is not specified.
&H80000057 The attribute ID is invalid.
&H80000058 The interval value is invalid.
&H80000059 An item handler release error
&H8000005A A CreateBrowser error
&H80000070 The number of categories is invalid.
&H80000071 The category is not specified.
&H80000072 The number of attributes is invalid.
&H80000073 The attribute ID is not specified.
&H80000074 The attribute is not specified.
&H80000075 The number of event sources is invalid.
&H80000076 The event source is not specified.
&H80000077 The category is invalid.
&H80000078 The attribute ID is invalid.
&H80000090 The server name is invalid.
&H80000091 Server connection failed.
&H80000092 Server disconnection failed.
&H80000093 This property can only be changed in the design mode.
Error Code Details
030501E.EPS

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-77

3.6 Notes and Precautions


There are a few things that should be noted when using the CENTUM data access
library. When the script you coded does not function as intended, such as when
unexpected values are returned following implementation of a method, check if the
code is scripted correctly, i.e., scripted in accordance with the following notes and
precautions.

■ Application Capacity
There is no limitation for the number of CENTUM Data Access Controls used at the same
time. However, when the running methods connecting to corresponding OPC servers, the
number of simultaneously running methods is limited by the application capacity.

SEE ALSO
For more information about the methods and their corresponding OPC servers, see the following:
3.1, “Methods of CENTUM Data Access Library”

■ Logon Account
When you execute an application which uses this library, logon to the Windows by “CEN-
TUM”. Even if you use an another computer which does not function as a HIS, logon to the
Windows by “CENTUM”. This account is created when the OPC client is set up on that
computer.

■ Access Authority
The authority for accessing tags is specified by OPC interface package. An application
which is standard EXE accesses tags according to the privilege level of PROG user. The
default privilege level of PROG user is S1. This level is same as OFFUSER. If you want the
application to have higher level than it, change the level of PROG user by using security
builder.

■ Case-Sensitivity for String-Type Parameters


Unless noted specifically, all parameters of the String type are case-sensitive. For ex-
ample, the GetStnInf method requires the name of the station whose information is to be
retrieved, to be specified. The string you set for this parameter must agree perfectly with a
station name defined in the system configuration of the CENTUM CS 1000 or CS 3000
system. Namely, if you set the parameter to fcs0101 although the intended station is
defined as “FCS0101” in the system configuration, you will not retrieve information cor-
rectly.

■ Lower Bound of Array


Some methods of the CENTUM Data Access Control require one or more array variables
as parameters. Though Visual Basic .NET allow the subscripts for the array to be 0, when
passing the arrayed data as an argument of library method, the subscripts should start from
1.
Moreover, the subscripts of library method for referencing the elements should start from 1.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-78
■ Array Size of Returns from Method
Some methods of the CENTUM Data Access Control, such as GetTagList, return an array
of values that meet the specified conditions. The array size, i.e., the highest subscript, is
modified dynamically by the CENTUM Data Access Control to fit the number of retrieved
values. Like when ten values are found to be meeting the specified conditions, the CEN-
TUM Data Access Control sets the lower and upper bounds of the array to 1 and 10. To
know the lower and upper bounds of an array, use the LBound and UBound functions.
The following code shows an example of a procedure for displaying a list of the tags re-
trieved by the GetTagList method in the Immediate window.
Private Sub Subroutine()
Dim objResults As Object
Dim i As Integer
objResults = AxCENTUMDataAccess1.GetTagList(“FCS0101”,“*”)
‘Call a method of library
‘*** Loop of processing all elements in the returned array ***
For i = LBound(objResults) To UBound(objResults)
Debug.Print objResults(i)
Next i
Erase objResults ‘Release the memory
End Sub

Even if the GetTagList method finds only one value that meets the specified conditions, it
returns an array of a single element (lower and upper bounds = 1). You do not need to
worry about the number of array elements in the returns as far as a loop, as shown in this
example, is incorporated in the code. On the other hand, if no value is found to meet the
specified conditions, an array of a single element containing the empty value (vbEmpty) is
returned. If this causes a problem, you need to incorporate a logic element in order to (1)
check the upper bound of the returned array and (2) check whether the empty value is
contained when the upper bound is 1.

IMPORTANT
As is mentioned above, the returns are given in a dynamic array. For a variable whose size
is dynamically modified by the CENTUM Data Access Control, be sure to release the
memory of the dynamic array explicitly using the Erase statement when ending the proce-
dure. If the procedure is repeated without releasing the memory, an unpredictable event
may occur. In addition to returns, parameters for storing error codes are also dynamic
arrays.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<3. Library for Using with Visual Basic .NET> 3-79
■ Method Overlap Calling
Methods of CENTUM Data Access Control returns after communication with the OPC
server few times. Before a method does not return, if calling a method (whether same
method or not) is overlapped, procedures with the server are mixed up and the method
returns error.
Standard EXE of Visual Basic .NET is a single thread model. Therefore, we may think there
are no case such as overlap calling. But, there is. For example, consider an application
which calls GetTagData when a command button is clicked. Even if the command button is
quickly clicked many times, a subroutine which is called when the button is clicked is
executed serially. There is no problem so far. As next step, suppose this application is
added the function that it calls GetTagData periodically by the event from timer control. If
click event has come at a same time when timer event has come, both subroutines are
executed parallel. Therefore calling GetTagData overlaps.
In this case, either or both GetTagData returns error. Please note parallel executing like this
is COM (Component Object Model) specification on Visual Basic .NET. Programmer must
avoid to cause error.
The above example is the same as the case when you call GetTagData in the MsgEvent
subroutine which is called by this library. Please check whether calling GetTagData in the
MsgEvent overlaps calling method of the library in another subroutine or not.
Easiest way to avoid to cause error is embedding more than one ActiveX control in the
form. For example, embed two CENTUM Data Access Control in the form, use
AxCENTUMDataAccess1 object for the timer event and use AxCENTUMDataAccess2
object for click event of command button. By this way, even if calling GetTagData overlaps,
each calling is treated as another client. Therefore, both calling return success.

■ Precautions of Debugger of Visual Basic .NET


These are precautions when you debug an application by using debugger of Visual Basic
.NET.

● End of Debugger
When you end debugger, click close button of form. Do not click debugger end button, else
Form_Closed is executed. If end procedure of form is not executed, end procedure of
ActiveX control embedded in the form is not executed. In this case, connection information
remains in the server side. And after repeating some times, you can not connect to the
server. When you see this phenomenon, you must reboot HIS.

■ Usage in the Area where Daylight Saving Time (DST) is Observed


If the library is used in the area where DST is observed, you need to modify registry in
addition to the typical installation procedure.

SEE ALSO
For details of the library usage in the area where daylight saving time (DST) is observed, see the follow-
ing:
4.1, “Setting up the CENTUM Data Access Library in Another Computer”
4.4, “Setting HIS for Daylight Saving Time (DST)”

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<3. Library for Using with Visual Basic .NET> 3-80
■ Setting Time in Daylight Saving Time (DST)
Daylight saving time (DST) is globally observed. It starts and ends in the areas as listed
below. (As of 2005)
• USA, Canada, Mexico (Some areas excluded)
2 a.m. on 1st Sunday of Apr. - 2 a.m. on last Sunday of Oct. (Local Time)
• European nations (Some areas excluded)
1 a.m. on last Sunday of Mar. - 1 a.m. on last Sunday of Oct. (UTC)
• Russia 2 a.m. on last Sunday of Mar. - 3 a.m. on last Sunday of Oct. (Local Time)
• Australia (Northern and western areas excluded)
2 a.m. on last Sunday of Oct. - 3 a.m. on last Sunday of Mar. (Local Time)
• New Zealand (Some areas excluded)
2 a.m. on 1st Sunday of Oct. - 3 a.m. on 3rd Sunday of Mar. (Local Time)
DST transition is illustrated below. (Case: Central European Summer Time)

2006/03/26 2006/10/29
01:59:59 02:00:00
Normal Time

DST

2006/03/26 2006/10/29
03:00:00 02:59:59
030601E.EPS

Figure Daylight Saving Time

One second after 2006/03/26 01:59:59, the clocks indicate 2006/03/26 03:00:00 forwarding
one hour.
And one second after 2006/10/29 02:59:59, the clocks indicate 2006/10/29 02:00:00
turning one hour back.
If Local Time is specified using the CENTUM data access library, OPC server converts the
time to Coordinated Universal Time (UTC) observing DST.
But when the DST ends, the clocks are turned back one hour. In this case, the time conver-
sion by the OPC server to Coordinated Universal Time (UTC) is not always as user ex-
pects.

● DST End Transition (Case: Central European Summer Time)


This describes the behavior of CENTUM data access library when DST ends.

2006/10/28 2006/10/29 2006/10/29 2006/10/29


23:00:00 00:00:00 01:00:00 02:00:00
UTC If [2006/10/29 02:00:00] is
specified in Local Time(DST),
Local Time(DST) OPC cannot determine if it is
the time in DST or the time
after DST.
2006/10/29 2006/10/29 2006/10/29 2006/10/29
01:00:00 02:00:00 02:00:00 03:00:00
030602E.EPS

Figure DST End Transition

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<3. Library for Using with Visual Basic .NET> 3-81
Conversion from DST to UTC by the OPC server differs depending on the following:
If data is fetched in the order, ‘from the oldest to the newest’ (1*), the time is converted as
follows:
*1: Cases where the properties “MsgDirectionPast”, “TrendDirectionPast”, and “CloseDirectionPast” are set to
“centumDrctForward”.

• If the time to start data acquisition is set to the time in the repeated hour at the end of
DST, the time is converted based on the DST.
• If the time to end data acquisition is set to the time in the repeated hour at the end of
DST, the time is converted based on normal time.

If data is fetched in the order, ‘from the newest to the oldest’ (*2), the time is converted as
follows:
*2: Cases where the properties “MsgDirectionPast”, “TrendDirectionPast”, and “CloseDirectionPast” are set to
“centumDrctBackward”.

• If the time to start data acquisition is set to the time in the repeated hour at the end of
DST, the time is converted based on normal time.
• If the time to end data acquisition is set to the time in the repeated hour at the end of
DST, the time is converted based on the DST.

Examples of time conversion in cases where data is acquired in the order, ‘from the oldest
to the newest’ and vice versa are shown below.
Example: Case where data acquisition starts at 2006/10/29 02:00:00 and ends at 2006/10/
29 02:30:00 (in Central European nations)
Table Converted time if data is fetched in the order, ‘from the oldest to the newest’
Time specified by User Time Converted time (OPC server)
Computation
Local Time in OPC UTC
GMT+1 2006/10/29
Start acquisition at 2006/10/29
02:00:00 DST+1 00:00:00
2006/10/29 2006/10/29
End acquisition at GMT+1
02:30:00 01:30:00
030603E.EPS

Table Converted time if data is fetched in the order, ‘from the newest to the oldest’
Time specified by User Time Converted time (OPC server)
Computation
Local Time in OPC UTC
2006/10/29
Start acquisition at 2006/10/29 GMT+1
02:30:00 01:30:00
2006/10/29 GMT+1 2006/10/29
End acquisition at
02:00:00 DST+1 00:00:00
030604E.EPS

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<3. Library for Using with Visual Basic .NET> 3-82
2006/10/28 2006/10/29 2006/10/29 2006/10/29
23:00:00 00:00:00 01:00:00 02:00:00
UTC

Local Time(DST)

2006/10/29 2006/10/29 2006/10/29 2006/10/29


01:00:00 02:00:00 02:00:00 03:00:00
Duration CENTUM data
access library fetches data

Duration 1: User’s Request

Duration 2: User’s Request

Duration 3: User’s Request


030605E.EPS

Figure Duration when the library can fetch data and Duration requested by user

If start time and end time for data acquisition are specified by user as 02:00:00 - 02:30:00 in
Local Time, CENTUM Data Access Library cannot determine which one of the above three
the user intends.
To prevent any missing data, CENTUM Data Access Library returns all the available data to
the requesting application. The application is expected to extract the data user requests.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<3. Library for Using with Visual Basic .NET> 3-83

IMPORTANT
• Do not set the start time or the end time for data acquisition to the time in the skipped
hour before the beginning of DST because unintended data may be returned.

A case where unintended data are returned:


In central European nations, one second after 2006/03/26 01:59:59 (Normal time), the
clocks indicate 2006/03/26 03:00:00 (DST).
If you specify to fetch data as follows, unintended data are returned:
Start time : 2006/03/26 02:30:00 (in skipped hour)
End time : 2006/03/26 03:00:00 (DST)

• Avoid setting the start time and the end time for data acquisition to the same time in
the DST end transition period because the system returns data for one second in
normal time. (Start time = End time = any time in the DST end transition period)

A case where the start time and the end time for data acquisition are specified to the
same time in the DST end transition period:
In central European nations, one second after 2006/10/29 02:59:59(DST), the clocks
indicate 2006/10/29 02:00:00 (Normal time).
If you specify to fetch data as follows, CENTUM Data Access Library determines both
the start time and the end time in normal time, and returns the data for one second of
2006/10/29 02:00:00.
Start time : 2006/10/29 02:00:00
End time : 2006/10/29 02:00:00

This restriction applies only to the case where you specify the same time to both the
start time and the end time for data acquisition.
If you specify to fetch data as follows, for example, CENTUM Data Access Library
determines the start time in DST and the end time in normal time, and returns the data
for one hour and one second.
Start time : 2006/10/29 02:00:00
End time : 2006/10/29 02:00:01

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


Blank Page
<4. Basic Operation of CENTUM Data Access Library> 4-1

4. Basic Operation of CENTUM Data


Access Library
This chapter describes the basic operation of the CENTUM data access library.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<4. Basic Operation of CENTUM Data Access Library> 4-2

4.1 Setting up the CENTUM Data Access Library in


Another Computer
Before setting up the CENTUM data access library in a computer that does not
function as an HIS, the OPC Client must be set up on that computer and the OPC
Server set up on another computer that functions as an HIS and is connected on the
same network.

SEE ALSO
• For how to set up the OPC Client, see the following:
M1, “User Development Environment” in Reference (IM 33S01B30-01E)
• For how to set up an HIS, see the followings:
CS 1000 Installation (IM 33S01C10-01E)
CS 3000 Installation (IM 33Q01C10-01E)

Follow the procedure below to set up the CENTUM data access library.

● Making a Library Setup Disk


1. Insert a formatted disk into the floppy disk drive of the computer in which the OPC
Server (hereinafter referred to as the OPC Server computer) is set up.
2. On the OPC Server computer, using the Windows Explorer or the like, browse the
\his\users\program folder in the folder where the CENTUM CS 1000 or 3000 system
has been installed to find the BKUCopyCTMDAL.exe file, and run it. The program
then creates the Setup.exe file in the floppy disk.

● Setting up the Library


1. At the computer in which you want to set up the library, log on to an account that has
administrative privileges.
2. Insert the floppy disk containing the Setup.exe file into the drive.
3. Run Setup.exe in the floppy disk. Setup.exe then sets up the library.

If the library is used in the area where daylight saving time (DST) is observed, do the
following.
4. Run BKUDstSetUp.reg below the RegSetUp folder on the Setup disk.
This will set up the library for DST.

OPC Server BKUCopyCTMDAL.exe Setup.exe

HIS PC

Floppy Disk

040101E.EPS

Figure Setting up the Library

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


<4. Basic Operation of CENTUM Data Access Library> 4-3

4.2 Using the CENTUM Data Access Library


This section describes how to use the CENTUM Data Access Library

■ Adding the CENTUM Data Access Control


The CENTUM data access library is supplied as an ActiveX control under the name of the
CENTUM Data Access Control. To use the CENTUM Data Access Control in your project,
first add it to the toolbox of your Visual Basic.
For Visual Basic 6.0, the control can be added to the toolbox with the following procedure.
1. Click [Components] in the [Project] menu. The Components dialog box appears and
displays a list of the objects, designers, and ActiveX controls that have been regis-
tered and available to your project.
2. Check the [CENTUM Data Access Library] option box.
3. Click [OK]. The Components dialog box closes and the CENTUM Data Access
Library control is now added to the toolbox.

If you cannot find CENTUM Data Access Library in the Components dialog box, it may not
be set up correctly. Set it up again according to the procedure mentioned before.

For Visual Basic .NET, the control can be added to the toolbox with the following procedure.
1. Click [Add/Remove Toolbox Items] in the [Tools] menu to display [Customize Toolbox]
dialog box. In this dialog box, the registered objects, designers and ActiveX controls
that can be added are all displayed.
2. Choose [COM Components] tab on the [Customize Toolbox] dialog box. And check
the [libbkuCENTUM.CENTUMDataAccess] option box.
3. Click [OK] on the [Customize Toolbox] dialog box so as to close the dialog box. Then
the [libbkuCENTUM.CENTUMDataAccess] control is displayed on the toolbox.

If the [libbkuCENTUM.CENTUMDataAccess] option cannot be found in the [Customize


Toolbox] dialog box, it means the library was not properly setup. Under this circumstance,
the setup procedure should checked and the library should be properly setup again.

■ Assigning an Object of the CENTUM Data Access Control onto a Form


The CENTUM Data Access Library control added to the toolbox is displayed as the icon
shown below.

040201E.EPS

Figure CENTUM Data Access Control’s Icon

The default object name of the CENTUM Data Access Control placed in the form is
CENTUMDataAccess1 for Visual Basic 6.0 and AxCENTUMDataAccess1 for Visual Basic
.NET. The object name can be changed if necessary.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<4. Basic Operation of CENTUM Data Access Library> 4-4

4.3 Sample Program using the Library


This section describes sample programs using CENTUM Data Access Library.

■ Kinds of Sample Program


Sample programs using CENTUM Data Access Library are installed the following folder.
• Folder for Visual Basic 6.0 sample programs
<CS 1000/CS 3000 installed folder>\his\users\sample\CTMDAL\VB6
• Folder for Visual Basic .NET sample programs
<CS 1000/CS 3000 installed folder>\his\users\sample\CTMDAL\VB.NET
The contents are as follows.
1. Folder DA
There is sample program for tag access.
2. Folder BatchData
There is sample program for Batch data access.
3. Folder GetDataSample
There is sample program for trend data access, close data access and historical
message access.
4. Folder BootCheck
There is sample program for BootCheck method.
5. Folder Event
There is sample program for receiving CENTUM message.
6. Folder ShtdwnSample
There is sample program for Shutdown event and Operation Guide message output.

These sample programs are installed to the HIS, when this library is installed. But if Visual
Basic is not installed in the HIS, you can not open the program. And, setting up the library in
an another computer, which is described in 4.1, does not install these sample programs. In
this case, copy these from HIS to that computer and refer them.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<4. Basic Operation of CENTUM Data Access Library> 4-5

4.4 Setting HIS for Daylight Saving Time (DST)


If the CENTUM Data Access Library is used in the area where DST is observed, you
need to set HIS as described below.
The setting is not required in the area where DST is not observed.

■ Setting HIS
If the CENTUM Data Access Library is used in the area where DST is observed, the follow-
ing is required on the OPC-server-preinstalled HIS.
1. Log on to HIS as an Administrator.
2. In the folder where CS 1000 or CS 3000 is installed, locate the folder
\his\users\program\RegSetUp. Run BKUDstHis.reg in the folder.
3. Restart the HIS.

If you want to run on the HIS the application that uses CENTUM Data Access Library, the
following is also required on the HIS.
1. Log on to HIS as an Administrator.
2. In the folder where CS 1000 or CS 3000 is installed, locate the folder
\his\users\program\RegSetUp. Run BKUDstSetUp.reg in the folder.
3. Restart the HIS.

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


Blank Page
<5. Referencing Information for Users> 5-1

5. Referencing Information for Users


The referencing information for users of CENTUM Data Access Library is explained
in this chapter.

TIP
The contents of this chapter are not descriptions directly related to the specifications of the CENTUM
data access library, but give information about other related components and systems for reference.
Hence, the information provided in this chapter is for reference only.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<5. Referencing Information for Users> 5-2
■ Quality Codes
Returns retrieved by the GetTagData, GetTrendData, and GetCloseData method include
quality codes of the retrieved data. The following table lists the values of quality codes.
Table Quality Codes

Tag Data Trend Data Closing data


Quality Code
(GetTagData) (GetTrendData) (GetCloseData)
GOOD Yes Yes Yes
BAD Yes Yes Yes
QUESTIONABLE Yes Yes Yes
NODATA or NOTHING Yes Yes
050001E.EPS

Further, for tag data and trend data, the GOOD, BAD, and QUESTIONABLE codes are
divided into the following data statuses.
Table Quality Codes and Data Statuses
GOOD BAD QUESTIONABLE
MINT (Master Initialize) BAD (Bad value) QST (Questionable Value)
SINT (Slave Initialize) O/S (Out of service) NCOM (No Communication)
SV (Set Value) MNT (Maintenance) NFP (Not From Process)
CAL (Calibration) IOP+ (Input Open High) PTPF (Path To Process Failed)
IOP- (Input Open Low) CLP+ (Clamp High)
OOP (Output Open) CLP- (Clamp Low)
NRDY (PI/O Not Ready) CND (Conditional)
PFAL (PI/O Power Failure) NEFV (Not Effective)
LPFL (PI/O Long Power Failure)
050002E.EPS

If the requested data do not have data statuses, the quality codes are always GOOD as far
as the data can be retrieved.
The values of the quality codes for closing data are determined by the trend data values
from which closing data are calculated.
The quality codes are determined by the OPC server’s functions or HIS’s trend functions,
and the CENTUM data access library has nothing to do with value decisions.

SEE ALSO
• For the data statuses, see the following:
C6.4, “Data Status” in Reference (IM 33S01B30-01E)
• For the logic of how the quality codes of closing data, see the following:
E9.3.2, “Structure of the Closing Processed Data” in Reference (IM 33S01B30-01E)

TIP
UNCERTAIN in OPC specification and QUESTIONABLE in HIS trend specification are used for indicating
questionable data.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<5. Referencing Information for Users> 5-3
■ Historical Messages
Each historical message retrieved by the GetHistMsg and SearchHistMsg methods is
composed of the following twelve parts, which are separated from each other by commas.
Table Structure of Each Historical Message

Part Description Example


Time of message reception (DD/MM/YYYY HH:MM:SS
1 19/03/2003 16:34:00 +0700
+hhmm)
2 Message category name BSYS:MFCS:SALM
3 Message number 1601
4 Serial number 1325880
Name of the user who performed the operation (only for
5 TOM
operation records)
6 Time of occurrence in FCS (to millisecond order) 19/03/2003 16:34:00.120 +0700
7 Hierarchy (station name - drawing name - unit name) FCS0101:DR0002:UNIT01
8 Other information (e.g., alarm importance level) 1
9 Name of station in which the message occurred FCS0101
10 Tag name FIC001
11 Batch information (batch ID - recipe name - unit number) LOT001:RECIPE01:0
12 Message text “FIC001 Valve3 LO”
050003E.EPS

Not all of these parts are present for every message; however, the order of individual parts
is fixed.

● Part 1: Time of Message Reception


Represents the time when the message management of the HID receives the message
based on the time zone set in the HIS in the fixed format shown above. The time difference
from the GMT is appended in the format of “+HHMM”.

● Part 2: Message Category Name


Messages are categorized into three levels: major, medium, and detailed categories.

IMPORTANT
Message categories discussed here are completely different from the search categories
specified as a parameter when using the SearchHistMsg method.

● Part 3: Message Number


The unique number assigned to each message

● Part 4: Serial Number


The number serially assigned to each message (from 0 to 4294967295 (0xFFFFFFFF))
since the HIS functions were installed; this number is not reset by restart.

IM 33S02T10-01E 5th Edition : Oct.28,2004-00


<5. Referencing Information for Users> 5-4
● Part 5: User Name of Operator
Represents the name of the user who performed the operation for the nth operation record.

● Part 6: Time of Occurrence in FCS


Represents the time when the message occurred, based on the clock in the station that
generated the message up to the millisecond order. The format is the same as that for the
time of message reception, but the millisecond is appended.

● Part 7: Hierarchy
Represents to which unit on which control drawing inside which station the tag belongs.
The station, drawing, and unit names are connected by colons and given as one string.

● Part 8: Other information


Multiple sets of information are filled in as a string in which individual sets of information are
separated from each other by colons, such as “A:B:C:....”

● Part 9: Name of Station in Which the Message Occurred


Represents:
* Name of the FCS that generated the message, for an alarm in an FCS
* Name of the HIS at which the operation was performed, for an operation record
For a message announcing that a tag has been manipulated at an HIS, the HIS name is set
as the name of the station in which the message occurred (part 9), and the corresponding
tag’s information (station, drawing, and unit names) as the hierarchy (part 7).

● Part 10: Tag Name


The tag name is set for messages on a tag only.

● Part 11: Batch Information


Provides information in the format of “batch ID:recipe name:unit number.” When the mes-
sage is not related to unit recipes, the unit number is 0. If the message is not related to the
batch control, no data exists in this part.

● Part 12: Message Text


The message text is set.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<5. Referencing Information for Users> 5-5
Table Message Categories

Major Category Medium Category Detailed Category


SALM: Occurrence
MFCS: Alarms occurring in FCS SRCV: Recovery
SSTS: Change in state
MCOM: System alarms on communication and BCV (None)
BSYS:
SEQZ: Equalization notification
System alarms MMNT: Maintenance
SEQER: Equalization error
MOPE: System operation records None
SALM: Occurrence
MAPP: System alarms from application
SRCV: Recovery
SALM: Occurrence
SRCV: Recovery of each alarm
MBLOCK: Alarms in function block SRALM: Re-warning
SNR: Recovery of all alarms
SACK: Acknowledgment
SALM: Occurrence
BPRO: SRALM: Re-warning
MANN: Annunciators
Process alarms SNR: Recovery
SACK: Acknowledgment
SMODE: Mode change
MSTS: Changes in status of function block SAOF: Change to AOF
SAON: Change to AON
SSTS: Change in recipe
MRECP: Changes in recipe status
SUNIT: Change in unit recipe
MOPG: Operator guide messages None
MDLG: Dialog messages None
BSEQ:
MPRT: Printout messages None
Sequence messages
MREQ: Request messages None
MVO: Voice messages None
SDATA: Data entry
SMODE: Mode change
MPRO: Process operation records
SACK: Acknowledgment
BOPE:
Operation record SDLG: Entry in dialog box
messages
SDATA: Recipe data entry
MRECP: Operation record for batch control
SSTS: Change in recipe status
MTREND: Operation records on trend data acquisition None
Major Category Medium Category Detailed Category
050004E.EPS

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<5. Referencing Information for Users> 5-6
■ Station Numbers
The GetStnInf method of the CENTUM Data Access Control returns information on the
station including the station number in addition to the station name.
For example, when retrieving the information of a station whose name is “FCS0101”,
whose station number is 1, and which belongs to domain No. 1, the station number is
returned as 257. This is why the station number is given as the result of [domain number x
256 + station number]. Hence, to identify the actual station number from the return re-
trieved by the GetStnInf method given as the station number, divide it by 256 and regard
the integer of the quotient as the domain number and a reminder of the station number.

■ Specification of Pattern using Wildcard Characters


Some methods of the CENTUM Data Access Control allow you to specify a pattern as a
parameter. The table below shows the wildcard characters available.
Table Available Wildcard Characters

Wildcard Character Meaning


? Represents a single character.
* Represents one or more (including zero) characters.
# Represents a single-digit number
[charlist] Represents any one character in the charlist. E.g., [A,B,C] and [A-Z]
Represents any one character that is not included the charlist. E.g.,
[!charlist]
[!A,B,C] and [!A-Z]
050005E.EPS

For example, if you specify “FIC*” as the parameter for the filter condition when using the
GetTagList method that retrieves a list of tags, a list of only the tags whose tag names begin
with “FIC”, can be retrieved. When you do not want to filter the returns, specify “” or “*”.

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<5. Referencing Information for Users> 5-7
■ Error Codes Generated by OPC Servers
The following tables list error codes generated by each type of OPC server.

● Data Access Server


Table Error Codes Generated by Data Access Server

Error Code Details


The server does not support the requested rate, but does use the closest
&H0004000D
available.
&H0004000E A value passed to WRITE was accepted, but was clamped.
&H0004000F The operation cannot be completed because the object still has active references.
&HC0040001 An invalid handle was passed.
&HC0040002 A duplicate parameter was passed where one is not allowed.
&HC0040003 The server does not support the specified local ID.
The server cannot convert the passed or requested data type to the canonical
&HC0040004
type.
&HC0040005 The requested operation cannot be done on a public group.
&HC0040006 The item's access rights do not allow the operation.
&HC0040007 The item definition does not exist within the servers address space.
&HC0040008 The item definition does not comform to the server's syntax.
&HC0040009 The filter string is not valid.
&HC004000A The item's access path is not known to the server.
&HC004000B The value passed to WRITE was out of range.
&HC004000C A group with the same name already exists in the server.
&HC0040010 The server's configuration file is in an invalid format.
&HC0040011 The server could not locate the requested object.
&HC0040012 The server does not recognize the passed property ID.
&HC0041F40 Your user group is not allowed to monitor.
&HC0041F41 Your user group is not allowed to operate.
&HC0041F42 Your security level is not allowed to monitor.
&HC0041F43 Your security level is not allowed to operator.
&HC0041F44 The maximum number of servers is exceeded.
&HC0041F45 The specified user name does not exist.
&HC0041F46 Error in password.
&HC0041F47 FCS busy.
&HC0041F48 The maximum number of groups is exceeded.
&HC004800B The station is not ready.
&HC004800C Communication error with FCS.
&HC004800D Status change error.
&HC004800E Entry check error.
&HC004800F No data.
Error Code Details
050006E.EPS

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<5. Referencing Information for Users> 5-8
● Alarm and Event Server
Table Error Codes Generated by Alarm and Event Server

Error Code Details


&H00040200 The condition had already been acknowledged.
&HC0040201 The buffer time parameter was invalid.
&HC0040202 The maximum size parameter was invalid.
&HC0040203 The string was not recognized as an area name.
&HC0040204 The time does not match the latest active time.
&HC0040205 A refresh is currently in progress.
&HC0040206 Information is not available.
&HC0042329 The maximum number of A&E servers is exceeded.
&HC004232A The maximum number of subscriptions is exceeded.
&HC004232B The maximum number of alarm buffers is exceeded.
050007E.EPS

● Historical Data Access Server


Table Error Codes Generated by Historical Data Access Server

Error Code Details


&H00042A94 The function found no data to return.
More data is available in the time range, beyond that of the number of values
&H00042A95
requested.
&H00042A9B No history available for this attribute.
&HC0042710 The maximum number of HDA servers is exceeded.
&HC0042711 The maximum number of HDA browsers is exceeded.
&HC0042A96 The server does not support this attribute.
&HC0042A97 The server does not support this filter.
&HC0042A98 The supplied value for the attribute is not a correct data type.
&HC0042A99 The requested aggregate is not available from the provided item.
&HC0042A9A The attribute ID is invalid.
050008E.EPS

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


<5. Referencing Information for Users> 5-9
● Batch Data Access Server
Table Error Codes Generated by Batch Data Access Server

Error Code Details


&HC0042AF8 An invalid batch ID
&HC0042AF9 An invalid item
&HC0042AFA FCS busy
&HC0042AFB An invalid recipe number
&HC0042AFC CSOPC_BDA_E_RD_ErrDt_Unit
&HC0042AFC CSOPC_BDA_E_RD_ErrDt_Unit
&HC0042AFD CSOPC_BDA_E_RD_ErrDt_Plant
&HC0042AFE CSOPC_BDA_E_RD_ErrDt_ID
&HC0042AFF CSOPC_BDA_E_RD_ErrDt_Block
&HC0042B00 CSOPC_BDA_E_RD_ErrDt_Item
&HC0042B01 CSOPC_BDA_E_RD_ErrDt_FileMng
&HC0042B02 CSOPC_BDA_E_RD_ErrDt_Recp
&HC0042B03 CSOPC_BDA_E_RD_ErrDt_TblOver
&HC0042B04 CSOPC_BDA_E_RD_ErrDt_StnNotReady
&HC0042B05 CSOPC_BDA_E_RD_ErrDt_FrameData
&HC0042B06 CSOPC_BDA_E_RD_ErrDt_FrameSz
&HC0042B07 CSOPC_BDA_E_RD_ErrDt_SendFrm
&HC0042B08 CSOPC_BDA_E_RD_ErrDt_VhfWrite
&HC0042B09 CSOPC_BDA_E_RD_ErrDt_VhfPoll
&HC0042B0A CSOPC_BDA_E_RD_ErrDt_VhfRead
&HC0042B0B CSOPC_BDA_E_RD_ErrDt_VhfTimeOut
&HC0042B0C CSOPC_BDA_E_RD_ErrDt_FileTimeOut
&HC0042B0D CSOPC_BDA_E_RD_ErrDt_SendBdfh
&HC0042B0E CSOPC_BDA_E_RD_ErrDt_SendVhf
&HC0042B0F CSOPC_BDA_E_RD_ErrDt_NotWrt
&HC0042B10 CSOPC_BDA_E_BFH_ErrDt_ID
&HC0042B11 CSOPC_BDA_E_BFH_ErrDt_EngUnit
&HC0042B12 CSOPC_BDA_E_BFH_ErrDt_Array
&HC0042B13 CSOPC_BDA_E_BFH_ErrDt_Type
&HC0042B14 CSOPC_BDA_E_BFH_ErrDt_Access
&HC0042B15 CSOPC_BDA_E_BFH_ErrDt_UnitRcpNo
&HC0042B16 CSOPC_BDA_E_BFH_ErrDt_DBFile
&HC0042B17 CSOPC_BDA_E_BFH_ErrDt_NoSuchFile
&HC0042B18 CSOPC_BDA_E_BFH_ErrDt_Value
&HC0042B19 CSOPC_BDA_E_BFH_ErrDt_NotWrite
&HC0042B1A CSOPC_BDA_E_BFH_DBERALUDFPARPTR
&HC0042B1B CSOPC_BDA_E_BFH_DBERALUDFRTNPTR
&HC0042B1C CSOPC_BDA_E_BFH_DBERALINVDTYPE
&HC0042B1D CSOPC_BDA_E_BFH_DBERALNOTCASTDTYPE
&HC0042B1E CSOPC_BDA_E_BFH_DBERALINVDACASTMIN
&HC0042B1F CSOPC_BDA_E_BFH_DBERALINVDACASTMAX
Error Code Details
050009E.EPS

IM 33S02T10-01E 4th Edition : Dec.18,2003-00


Blank Page
Ind-1

CS 1000/CS 3000
CENTUM
Data Access Library
IM 33S02T10-01E 6th Edition

INDEX
B GetTagItemList Method ................................ 3-13
GetTagList Method ...................................... 3-10
Basic Operation .................................................. 4-1
GetTagQuality Property ............................... 3-61
GetTrendData Method ................................. 3-35
E
GetTrendList Method ................................... 3-38
Error Codes ........................................................ 5-7 GetTrendQuality Property ............................ 3-66
Library ........................................................... 3-1
H Methods ........................................................ 3-2
Historical Messages ............................................ 5-3 MsgDirectionPast Property .......................... 3-64
MsgEvent Event .......................................... 3-70
Q MsgNotify Property ...................................... 3-63
Quality Codes ..................................................... 5-2 Properties .................................................... 3-57
PutGuideMsg Method .................................. 3-29
S PutRcpData Method .................................... 3-19
PutTagData Method ....................................... 3-8
Sample Program ................................................. 4-4
Run Modes .................................................. 3-73
Station Numbers ................................................. 5-6
SearchHistMsg Method ............................... 3-32
ShutdownEvent Event ................................. 3-72
V ShutdownNotify Property ............................. 3-59
Visual Basic .NET ShutdownRqst Method ................................ 3-56
BootCheck Method ...................................... 3-48 StationName Property ................................. 3-58
CloseDirectionPast Property ........................ 3-67 TestMode Property ...................................... 3-60
Error Codes ................................................. 3-76 TreeType Property ....................................... 3-62
Error Handling ............................................. 3-74 TrendDirectionPast Property ........................ 3-65
EventRqst Method ....................................... 3-49 Visual Basic 6.0
Events ......................................................... 3-69 BootCheck Method ...................................... 2-42
GetCloseData Method ................................. 3-41 CloseDirectionPast Property ........................ 2-61
GetCloseList Method ................................... 3-45 Error Codes ................................................. 2-70
GetCloseQuality Property ............................ 3-68 Error Handling ............................................. 2-68
GetHistMsg Method ..................................... 3-30 EventRqst Method ....................................... 2-43
GetRcpBlkList Method ................................. 3-23 Events ......................................................... 2-63
GetRcpData Method .................................... 3-17 GetCloseData Method ................................. 2-37
GetRcpHeadInf Method ............................... 3-24 GetCloseList Method ................................... 2-40
GetRcpItemInf Method ................................. 3-27 GetCloseQuality Property ............................ 2-62
GetRcpItemList Method ............................... 3-26 GetHistMsg Method ..................................... 2-26
GetRcpStat Method ..................................... 3-21 GetRcpBlkList Method ................................. 2-19
GetStnInf Method .......................................... 3-4 GetRcpData Method .................................... 2-16
GetStnList Method ......................................... 3-3 GetRcpHeadInf Method ............................... 2-20
GetTagData Method ...................................... 3-6 GetRcpItemInf Method ................................. 2-23
GetTagInf Method ........................................ 3-11 GetRcpItemList Method ............................... 2-22
GetTagItemInf Method ................................. 3-14 GetRcpStat Method ..................................... 2-18

IM 33S02T10-01E 6th Edition : Dec.26,2006-00


Ind-2
GetStnInf Method .......................................... 2-4
GetStnList Method ......................................... 2-3
GetTagData Method ...................................... 2-6
GetTagInf Method ........................................ 2-10
GetTagItemInf Method ................................. 2-13
GetTagItemList Method ................................ 2-12
GetTagList Method ........................................ 2-9
GetTagQuality Property ............................... 2-55
GetTrendData Method ................................. 2-31
GetTrendList Method ................................... 2-34
GetTrendQuality Property ............................ 2-60
Library ........................................................... 2-1
Methods ........................................................ 2-2
MsgDirectionPast Property .......................... 2-58
MsgEvent Event .......................................... 2-64
MsgNotify Property ...................................... 2-57
Properties .................................................... 2-51
PutGuideMsg Method .................................. 2-25
PutRcpData Method .................................... 2-17
PutTagData Method ....................................... 2-8
Run Modes .................................................. 2-67
SearchHistMsg Method ............................... 2-28
ShutdownEvent Event ................................. 2-66
ShutdownNotify Property ............................. 2-53
ShutdownRqst Method ................................ 2-50
StationName Property ................................. 2-52
TestMode Property ...................................... 2-54
TreeType Property ....................................... 2-56
TrendDirectionPast Property ........................ 2-59

W
Wildcard Characters ........................................... 5-6

IM 33S02T10-01E 5th Edition : Oct.28,2004-00

You might also like