CS 1000/CS 3000 CENTUM Data Access Library
CS 1000/CS 3000 CENTUM Data Access Library
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
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)
HIS
Data Access
Program
Another PC
OPC Server
or Data Access
DDE Server Program
Various Data
HIS Functions
010001E.EPS
You can also develop a data access program that runs on a computer connected via a
network.
CENTUM Data
Access Library
*Programming time: SHORT
Data Access
Program
*Programming time: LONG
OPC Server
Various Data
HIS Functions
010002E.EPS
IMPORTANT
The CENTUM Data Access Library is only for OPC server in HIS. It can not be used for
Exaopc (NTPF100).
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.
■ 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”
■ 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.
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).
■ 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.
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.
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)
■ 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)
■ 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”
■ 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.
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).
■ 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”
■ 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.
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).
■ 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)
■ 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)
■ 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”
■ 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”
■ 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.
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.
■ 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”
■ 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.
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).
■ 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.
■ 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.
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
■ 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.
● 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
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
■ 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.
● 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.
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.)
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.
■ 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.
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.
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.
■ 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.
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
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.
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
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.
■ 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.
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
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.
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.
■ 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.
● 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.
Note: Instead of the numbers from 160-175, you can also use the library constants shown in the table to specify the attribute
ID.
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).
Engineering Maintenance
Mode/Status Changes
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
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.
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.
■ 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.
■ StationName Property
● Description
Set station name (computer name) to the OPC server where the data to be accessed. The
setting information can be returned.
● 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).
■ ShutdownNotify Property
● Description
Whether to be notified of shutdowns of the HIS (that runs the OPC server)
● 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”
■ TestMode Property
● Description
The current run mode of the CENTUM data access library
● 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”
■ GetTagQuality Property
● Description
Whether or not quality codes should be acquired when the GetTagData method is called
● 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”
■ 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)
● 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”
■ MsgNotify Property
● Description
Whether to enable events such as alarms and messages to be notified upon their occur-
rences
● 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”
■ 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)
● 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”
■ 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)
● 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”
■ GetTrendQuality Property
● Description
Whether or not quality codes should be acquired when the GetTrendData method is called
● 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”
■ 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)
● 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”
■ GetCloseQuality Property
● Description
Whether or not quality codes should be acquired when the GetCloseData method is called
● 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”
■ 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.
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.
■ 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.
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
■ 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”
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”
■ 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.
For methods that return an array, the lowest subscript of the returned array is always 1
unless noted otherwise.
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.
● 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.
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)”
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
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.
• 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
Local Time(DST)
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.
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.
• 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
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.
■ 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.
■ 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.
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.
■ 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
Note: A number (1 or 2), a library constant shown in the table can also be used to specify the type.
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)
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.
■ 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.
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.
■ 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.
■ 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.
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.
■ 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.
■ 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.
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.
■ 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.
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)
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.
■ 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.
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.
■ 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.
IMPORTANT
The subscripts of objResults for referencing the elements should start from 1, if start from
0, an error will occur.
■ 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.
■ 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.
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.
■ 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.
■ 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.
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.
■ 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.
■ 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.
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
IMPORTANT
The subscripts of objResults and objErrors for referencing the elements should start from 1,
if start from 0, an error will occur.
■ 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.
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
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
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.
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
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.
■ 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.
● 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.
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.)
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.
■ 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.
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.
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.
■ 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.
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.
For DataOrQuality, specify whether you want the quality code or value of the closing data,
according to the table below.
Table DataOrQuality Settings
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.
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
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.
■ 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.
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
Note: Instead of a value shown in the table, a library constant can also be used for specifying a filter attribute.
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.
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.
■ 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.
● Explanation
Event categories to be set in iCategories specify the kinds of events for which notification
can be requested.
Table Event Categories
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.
Note: Instead of the numbers from 160-175, you can also use the library constants shown in the table to specify the attribute
ID.
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).
Engineering Maintenance
Mode/Status Changes
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
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
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.
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.
■ 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.
■ StationName Property
● Description
Set station name (computer name) to the OPC server where the data to be accessed. The
setting information can be returned.
● 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).
■ ShutdownNotify Property
● Description
Whether to be notified of shutdowns of the HIS (that runs the OPC server)
● 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”
■ TestMode Property
● Description
The current run mode of the CENTUM data access library
● 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”
■ GetTagQuality Property
● Description
Whether or not quality codes should be acquired when the GetTagData method is called
● 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”
■ 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)
● 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”
■ MsgNotify Property
● Description
Whether to enable events such as alarms and messages to be notified upon their occur-
rences
● 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”
■ 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)
● 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”
■ 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)
● 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”
■ GetTrendQuality Property
● Description
Whether or not quality codes should be acquired when the GetTrendData method is called
● 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”
■ 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)
● 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”
■ GetCloseQuality Property
● Description
Whether or not quality codes should be acquired when the GetCloseData method is called
● 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”
■ 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
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
...
...
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.
■ 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.
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
■ 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”
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”
■ 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.
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.
● 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.
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)”
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
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.
• 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
Local Time(DST)
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.
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.
• 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
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.
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.
HIS PC
Floppy Disk
040101E.EPS
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.
040201E.EPS
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.
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.
■ 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.
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.
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.
Not all of these parts are present for every message; however, the order of individual parts
is fixed.
IMPORTANT
Message categories discussed here are completely different from the search categories
specified as a parameter when using the SearchHistMsg method.
● 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.
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 “*”.
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
W
Wildcard Characters ........................................... 5-6