You are on page 1of 52

Aspen Cim-IO for

OPC

User’s Guide
Software Version: 2006 (9.0.0)
August 2006
Copyright (c) 1998-2006 by Aspen Technology, Inc. All rights reserved.

InfoPlus.21, Aspen Process Explorer, Cim-IO, and InfoPlus-X , GCS, CIM/21, Setcim, the aspen leaf logo,
Plantelligence and Enterprise Optimization are trademarks or registered trademarks of Aspen Technology, Inc.,
Cambridge, MA.

All other brand and product names are trademarks or registered trademarks of their respective companies.

This document is intended as a guide to using AspenTech's software. This documentation contains AspenTech
proprietary and confidential information and may not be disclosed, used, or copied without the prior consent of
AspenTech or as set forth in the applicable license agreement. Users are solely responsible for the proper use of the
software and the application of the results obtained.

Although AspenTech has tested the software and reviewed the documentation, the sole warranty for the software
may be found in the applicable license agreement between AspenTech and the user. ASPENTECH MAKES NO
WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS DOCUMENTATION,
ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.

Aspen Technology, Inc.


Ten Canal Park
Cambridge, MA 02141-2201
USA
Phone: (1) (617) 949-1000
Toll Free: (1) (888) 996-7001
Fax: (1) (617) 949-1030
Website: http://www.aspentech.com
Contents
User’s Guide.................................................................................................. 1

1 Introduction .........................................................................................................5
Content and Audience..................................................................................... 5
Related Documentation ................................................................................... 5
Technical Support .......................................................................................... 6

2 Release Notes ......................................................................................................7


Changes and Fixes ......................................................................................... 7

3 General Overview...............................................................................................13
Data Types ..................................................................................................14
Cim-IO Standard Data Types ................................................................14
Cim-IO Structure Data Types ................................................................14
Device Data Types...............................................................................14
Smart Data Types ...............................................................................14
Tag Name Addressing ....................................................................................15
Unit Number.................................................................................................15
Frequency ....................................................................................................15

4 Software Installation .........................................................................................17


Before Installing the Interface on Windows .............................................17
Installing the Interface on Windows .......................................................17

5 Interface Configuration and Startup ..................................................................21


Changes in Version 3.0.0 ...............................................................................21
OPCProperties ..............................................................................................22
Connection Settings.............................................................................22
The Timeout Window ...........................................................................23
General Settings .................................................................................23
The OPC Manager Configuration Window ................................................24
The Add Server Window .......................................................................24
The OPC Sub-Window ..........................................................................25
The Smart Data Types Window..............................................................26
Ok, Apply, and Cancel..........................................................................27
Manual Configuration.....................................................................................27
The TCP Services File...........................................................................27
The Cim-IO Logical Devices File.............................................................27
Updating the cimio_errors.def file ....................................................................28
Specifying Redundant OPC Server Nodes Using the Command Line ......................28

1 Introduction 3
Starting and Stopping the Cim-IO for OPC Interface Manager ..............................29
Starting the Cim-IO for OPC Interface Manager .......................................29
Stopping the Cim-IO for OPC Interface Manager ......................................29
Starting and Stopping Cim-IO for OPC Interface Servers Individually ....................30
Running Cim-IO for OPC Using the Command Line or Batch Files .........................30

6 Configuring the Cim-IO Client for InfoPlus.21....................................................31


Creating and Using Get, Put, and Unsol Records with Cim-IO for OPC ...................31
Cim-IO OPC as an OPC Client..........................................................................36
Transfer Records vs. Groups .................................................................36
Cim-IO OPC Get and Put I/O .................................................................37
Cim-IO OPC Unsolicited I/O ..................................................................37
Reading and Writing OPC Array Data......................................................37

7 Features for DA 3.0 Servers ...............................................................................41


Introduction .................................................................................................41
Deadbanding ................................................................................................41
DA 3.0 Data Access .......................................................................................41

8 Utility Programs .................................................................................................43


StartStop .....................................................................................................43
DisplayTags and FindRemote ..........................................................................43

9 Troubleshooting .................................................................................................45
Troubleshooting ............................................................................................45
Connectivity Issues .............................................................................45
DCOM UDP on Windows NT...................................................................45
Isolating a Fault to the Device Level.......................................................46
Isolating a Fault to the OPC Server Level ................................................47
Isolating a Fault to the Cim-IO Components ............................................47
Isolating a Fault to the Client Level ........................................................48
Failover and Redundancy ...............................................................................48
Frequently Asked Questions............................................................................49
Error Codes ..................................................................................................49

10 Glossary ...........................................................................................................51
Client ................................................................................................51
DIOP .................................................................................................51
DLGP.................................................................................................51
Logical Device.....................................................................................51
Logical Device Name............................................................................51
OPC ..................................................................................................51
OPC Group .........................................................................................52
OPC Cache .........................................................................................52
OPC Device ........................................................................................52
OPC Update Rate.................................................................................52
Service ..............................................................................................52
Service Name .....................................................................................52

4 1 Introduction
1 Introduction

Content and Audience


This document describes the installation, configuration, and use of the Aspen
Cim-IO™ to OPC Interface. Any aspect of this interface is subject to
refinement and reorganization by AspenTech as is deemed necessary. A basic
knowledge of Cim-IO is assumed (we recommended you read the Aspen Cim-
IO User’s Guide prior to reading this manual).
The manual is divided into several parts:
Introduction – provides a general overview of the interface.
Software Installation – describes the interface software installation.
Software Configuration and Startup – describes how to configure the
interface and how to start and stop it.
Error Codes – describes the various errors that occur.

Related Documentation
The following publications contain additional information that may be needed
to fully understand the Cim-IO for OPC Interface:
• Cim-IO User’s Guide, AspenTech
• OPC Data Access Specification versions 1.0a, 2.0, and 3.0
OPC Foundation

1 Introduction 5
Technical Support
AspenTech customers with a valid license and software maintenance
agreement can register to access the online AspenTech Support Center at:
http://support.aspentech.com
This Web support site allows you to:
• Access current product documentation
• Search for tech tips, solutions and frequently asked questions (FAQs)
• Search for and download application examples
• Search for and download service packs and product updates
• Submit and track technical issues
• Send suggestions
• Report product defects
• Review lists of known deficiencies and defects
Registered users can also subscribe to our Technical Support e-Bulletins.
These e-Bulletins are used to alert users to important technical support
information such as:
• Technical advisories
• Product updates and releases
Customer support is also available by phone, fax, and email. The most up-to-
date contact information is available at the AspenTech Support Center at
http://support.aspentech.com.

6 1 Introduction
2 Release Notes

This chapter describes known limitations and problems in the interface, recent
changes or fixes in the interface, and configuration and installation
comments.

Changes and Fixes


Changes, fixes, and known issues in Cim-IO for OPC version 3.0.1
ID Description

170582 Reading/Writing an Array of Strings does not work.


Known Issue
179390 Unexplained data conversion error message in log
CQ00181824 Misleading AsyncIO2 read results log line
CQ00187612 Remove AsyncDLGP automatic logical device and
service creation
CQ00192173 Make writing a UNC timestamp configurable
CQ00194465 Do not use default progid to connect to
Known Issue
CQ00195355 “Class not found” error when creation and start-up is
done using Cim-IO snap-in
CQ00199385 Cim-IO OPC does not always send an initial update out
Known Issue on a DECLARE if using failover.
CQ00199648 Nodename not validated by manager.exe; a
Known Issue nodename of 1 or more blanks result in Class Not
Registered errors.
CQ00199650 Browsing issues in FindRemote, DisplayTags, and
Known Issue OPCProperties.

2 Release Notes 7
Changes, fixes, and known issues in Cim-IO for OPC version 3.0.0
ID Description

137347 Add DA 3.0.0 features to Cim-IO for OPC. Upgraded


Enhancement features, upgrade to DisplayTags.
162008 “Class Not Registered” errors when attempting to
connect to a remote pre-DA 2.0 OPC server.
167019 String handling incorrect in Write section, causing data
“shifting” when writing strings.
170582 Reading/Writing an Array of Strings does not work.
Known Issue
170804 Add a DA3 compatible version (browse only) of
OPCAutomation for use with OPC Properties.
170858 Time data not written correctly to OPC server.
175301 Delimiter for EU, etc. is now variable. First character
in string determines what the delimiter is. For
example, if the user types in #EngUnit as the
engineering units string, the program will search the
tagname for the "#" character and replace everything
after it with "EngUnit".

Changes and fixes made to Cim-IO for OPC version 2.53


ID Description

159517 The StartStop Program does not run on XP


61401 The StartStop program does not have an option for
AlternateNodeName
164257 CIMIO OPC does not return correct # of items in
CIMIO Unsol reply, causing crashes
164594 Cache on OPC server getting corrupted. Data in IP.21
is incorrect (skewed after bad tags not receiving data).
166721 DisplayTags does not start properly.
166738 CIMIO OPC Installservice.exe doesn't run properly.

Changes and fixes made to Cim-IO for OPC version 2.52


ID Description

152912 OPC Server takes a very long time to Initialize all the
Enhancement points, during which time none of the points are
transmitting values.
An option has now been added to OPCProperties that
will allow the user to specify the initial read from the
CACHE of the OPC server, rather than a DEVICE read.

8 2 Release Notes
Changes and fixes made to Cim-IO for OPC version 2.51:
ID Description

130933 AsyncDLGP crashes when no CIMIO_INTID structure is


sent
132661 Findremote.exe has an incorrect version.
137346 If ignore no valid items is set to true, the Cim-IO client
never gets a response on write operations that do not
contain any valid tags
141006 Re-declaring a list from CIMIO_T_API crashes CIMIO
OPC
141007 AsyncDLGP does not handle shutdown properly with no
alternate nodename
141591 AsyncDLGP will crash when the opc server it is
connected to crashes.

Changes and fixes made to Cim-IO for OPC version 2.50:


ID Description

135228 Support for redundant OPC Servers. The Cim-IO for


Enhancement OPC AsyncDLGP process now tries to connect to
another OPC server with the same name but residing
on an alternate node in case the connection to the
primary node fails.

Changes and fixes made to Cim-IO for OPC version 2.41:


ID Description

136571 Problems connecting to Emerson DeltaV on reboot.


Enhancement CIMIO must be restarted after DeltaV service is running
in order to connect.

Changes and fixes made to Cim-IO for OPC version 2.40:


ID Description

110993 Cim-IO for OPC Interface Manager launches multiple


instances of Asyncdlgp.exe for a single OPC server
116646 UNSOL records don’t work with Devicedeadband
123263 CIMIO OPC crashes if started with incorrect service
name
127932 Making changes to unsolicited transfer records results
in "scan off" status for individual points

2 Release Notes 9
Changes and fixes made to Cim-IO for OPC version 2.35:
ID Description

91146 Puts seem to be successful, but data doesn’t show up


on DCS
95596 Error message: CIMIO_OPC_NOVALIDITEMS, No Valid
Items in the List, all the tags in the list are invalid.
96316 CIMIO always returns data with a status of suspect on
the demand requests.
97504 AsyncDLGP crashes when reconnecting to CIMIO Server

Changes and fixes made to Cim-IO for OPC version 2.01:


ID Description

132337 The Cim-IO for OPC interface can be started using NET
START.
132818 Fixed the problem where the interface was not using
the service name specified in the servicenames.txt file.

Changes and fixes made to Cim-IO for OPC version 2.0:


ID Description

Enhancement This version of Cim-IO for OPC works with OPC servers
complying to version 1.0A or 2.0 of the OPC
specification.
Enhancement Support for the “description” and “engineering units”
smart data types were added.
131754 If the OPC server is not up when the Cim-IO for OPC
131441 interface manager starts up, the interface retries a few
times before the Cim-IO for OPC interface program
(asyncdlgp.exe) exits. A message saying that the OPC
server is not installed is logged to the
CIMIO_MSG.LOG file.
131381 The StartStop Utility will return to the dialog box
instead of exiting after an error occurs.
131380 The StartStop Utility input strings of "TCP Service
Name" and “Node Name” are now limited to 32
characters, and the "OPC Service Name" input string is
unlimited.
131378 When the StartStop Utility is launched, the “OK”
button is no longer active until data has been entered
into the input areas.
131377 The Start menu was referred to as "StartStop Utility"
and on the application dialog box, it was referred to as
"StartAndStop". This has been changed to be
consistent.
131376 When the user is in the "StartStop Utility" the Start
and Stop buttons are now accessible using the TAB
key.

10 2 Release Notes
Changes and fixes made to Cim-IO for OPC version 1.4:
ID Description

README.TXT is not distributed anymore


131090 If a boolean is read and its value is true, the value 1 is
Enhancement returned.
131089 Under certain circumstances, the AsyncDlgp program
kept running after the Cim-IO for OPC Manager was
stopped.

Changes and fixes made to Cim-IO for OPC version 1.3:


ID Description

130808 If the Cim-IO client did not exit gracefully, OPC groups
were not properly released by the Cim-IO for OPC interface.
130809 After rebooting the system, the Cim-IO for OPC interface
service started before the OPC servers required for the
proper operation of the AsyncDLGP programs.
130811 When demand reads were made, the status of each point in
a Cim-IO list was set to the status of the first point in the
list.
130812 IO operation from/to OPC DEVICE (as opposed to OPC
CACHE) took at least one second.
129934 In certain circumstances, the program AsyncDlgp.exe
crashed when getting ASCII string data.
130813 Store and Forward could not be used if the service name
generated from OPC server name was longer than 15
characters.
NOTE: The solution to this problem required the generated
service name to be truncated to 15 characters.
Example: The Cim-IO service name for an OPC server name
called OPC.NAMELONGERTHAN15CHARS.1 will not be
CIOOPCNAMELONGE instead of
CIOOPCNAMELONGERTHAN15CHARS1
If for any reason the service name generated by the
interface is not acceptable, the user can specify what the
service name should be by adding a line to the file
ServiceNames.txt located where the interface was installed.
130814 When browsing the address space for some servers, the
DisplayTags Utility sometimes would crash.

Changes and fixes made to Cim-IO for OPC version 1.2:


ID Description

130815 In certain circumstances, the StartStop utility did not work.


130816 When the interface server shutdown, the OPC server was
not released properly.

2 Release Notes 11
Changes and fixes made to Cim-IO for OPC version 1.1:
ID Description

122510 Deadband was interpreted as absolute instead of percent.


129862 In certain circumstances, the interface could not access
tags when a frequency of 0 was specified or when
unsolicited mode was specified.
122510 With some OPC servers, a request to access a tag name
was rejected if the data type specified was not the same as
the data type of the tag in the device.
122510 Even if a Cim-IO service was mentioned in the file
excludedServices.txt, the manager still started the DLGP for
the OPC server associated to the Cim-IO service.
123532 The interface could not connect to OPC server with spaces
in their name.

12 2 Release Notes
3 General Overview

OLE for Process Control (OPC™) provides a common method for applications
to access data from any data source (such as a device or a database) without
having to know about the specificity of the device or the database.
Applications communicate with OPC servers in a standard way, independent
from the data source.
The Cim-IO for OPC Interface is used to transfer data between OPC servers
and Cim-IO Client programs, such as InfoPlus.21™, DMCplus™, user-written
Cim-IO Client programs, etc.
The Cim-IO for OPC Interface consists of a Manager program, which starts
and stops the Cim-IO for OPC Servers. Cim-IO for OPC Servers are processes
that communicate with OPC Servers. One Cim-IO for OPC Server exists for
each OPC Server installed on the system.
Cim-IO for OPC Servers receive Cim-IO requests from Cim-IO clients (GET,
PUT, UNSOLICITED GET) and send replies to these clients.

Cim-IO Client

Cim-IO for OPC Cim-IO for OPC Cim-IO for OPC


Server A Server B Server C

OPC OPC OPC


Server A Server B Server C

The figure above illustrates a possible configuration. Modules on each side of


the lines in bold can reside on the same or different computers.

3 General Overview 13
Data Types
These data types are associated with the Cim-IO for OPC interface:
• Cim-IO-specific
• Device-specific
• Smart data types

Cim-IO Standard Data Types


The interface converts acquired data into a Cim-IO standard data type format
compatible with the client request. A Cim-IO standard data type is defined for
each tag or piece of data. The interface supports the following interface data
types:
• Single-precision floating point (REAL)
• Double-precision floating point (DOUBLE)
• 16-bit integer (SHORT)
• 32-bit integer (LONG)
• ASCII text string (ASCII)

Cim-IO Structure Data Types


Reading from and writing to OPC “ARRAY OF” points using IP.21 custom
record definitions is possible. See “Reading and Writing OPC Array Data”.
When the interface is used with an InfoPlus.21, InfoPlus-X, or Setcim client,
the Cim-IO data type is not directly defined in the data retrieval record
(defined by IoGetDef, IoGetHistDef, IoPutDef, or IoUnsolDef).
When the interface is used with another client, the Cim-IO data type must be
identified or defined in your data request structures, as described in the
documentation for your client.

Device Data Types


The only device data type used by this interface is the smart data type of
Control Block Anti-Windup status (CBAW). The other device data types are
NOT used by this interface.

Smart Data Types


The interface supports the following smart data types:
• Control Block AntiWindup (CBAW)
• Description (DESC)
• Engineering Unit Description (EUDESC)
The interface does NOT support the following smart data type:
• Control Block Status (CBST)

14 3 General Overview
Control Block Anti-Windup
The CIMIO for OPC server supports the CONTROL BLOCK ANTI-WINDUP
(CBAW) status but not all OPC servers will. If the OPC server supports the
limit bit field described in the OPC specification then the CBAW can be used to
read it.

Description & Engineering Units


The Cim-IO for OPC interface supports the smart data types of DESCRIPTION
and ENGINEERING UNITS. To use these smart data types, first modify the
extensions.txt file located where the interface was installed. This file is used
by the interface to determine if an attribute should be appended to the tag
name. Format of the file is:
OPC Server Name Description attribute EU attribute

Example: The extensions.txt file has the contents:


OPC.SERVER.1 .DESC .EU
If the client requested a tag FC1001 from the OPC server OPC.SERVER.1 with
a smart data type of DESCRIPTION, the interface would pass the tag name
FC1001.DESC to the OPC server.
If one of the attributes is not supported, enter N/A for the value of the
attribute.

Tag Name Addressing


The tag name syntax is dependent on the OPC server that is communicating
to the Cim-IO for OPC interface. Refer to the vendor’s OPC server
documentation for tag name syntax.

Unit Number
The interface does not use a device unit number specification.

Frequency
The interface does use a frequency specification. For GET requests, a
frequency of 0 specifies a single asynchronous device read. A frequency
greater than 0 specifies an OPC cache read, with the device updating at the
specified frequency. For performance reasons, it is recommended that you
use cache reads for most operations. For UNSOL requests, the frequency
specifies the rate at which the device is polled. 0 is an invalid frequency
for Unsolicited data transfer.

3 General Overview 15
16 3 General Overview
4 Software Installation

The system requirements for the Cim-IO for OPC interface on Windows are:
• Windows 2000 with Service Pack 4 or higher, Windows XP with Service
Pack 1 or higher, or Windows 2003 Server.

Cim-IO for OPC 3.0.1 and later are not supported on Windows NT.
• DVD-ROM disk drive, or network access to a DVD drive.
• Cim-IO version 4.9 or later installed on the computer where you are
installing the interface.

Note: Cim-IO for OPC version 3.0.0 requires Cim-IO version 7.0.0 or
later, and Cim-IO for OPC version 3.0.1 requires Cim-IO version 7.0.1
or later.
• TCP/IP network connection between the Cim-IO server and any Cim-IO
clients.
For more information about Cim-IO client and server requirements, see the
Aspen Cim-IO User’s Guide.

Before Installing the Interface on Windows


Before you install the interface, make sure that you determine the username
and the password of the account that will be used to start the Cim-IO for OPC
interface. Also, the account needs to have administrative privileges.

Installing the Interface on Windows


Whether you are installing the interface on the computer where the Cim-IO
client is running, or on a remote network computer, the installation procedure
is identical.

Installing from the DVD


If the interface is distributed on the aspenONE DVDfollow these steps to
install it:
1 Insert the DVD into the DVD drive and double-click Add/Remove
Programs in the Windows Control Panel.

4 Software Installation 17
2 On the Add/Remove Programs Properties dialog box, click the Install
button.
3 On the Install Program from Floppy Disk or CD-ROM dialog box, click
the Next button.
4 On the Run Installation Program dialog box, click the Finish button.
The installation program for the Cim-IO for OPC Interface begins.
5 The Welcome dialog box appears. Click <Next>.
6 The License Information dialog box appears.

If you are running a license server, select License Server and enter the
node name. Other wise, check Standalone License File and click
<Browse> to select the path to your license file. Click <Next>.
7 The License Agreement dialog box appears.
You must accept the terms of the license agreement to install the
software. Click <Next> to continue.
8 The Computer Configuration Type dialog box appears
Select your configuration type and click <Next> to continue.

18 4 Software Installation
9 The Feature Selection for Aspen Cim-IO Interfaces dialog box
appears.

Select Cim-IO for OPC. If Cim-IO is not installed on the system or if an


old version of Cim-IO is installed and you want to install the latest version
of Cim-IO, run the appropriate installer to install or upgrade the
Kernel/Core of Cim-IO.
If you wish to change the path Cim-IO for OPC is installed to, click
<Change> and select the path. Click <Next> continue.
10 The User name and Password dialog box appears.

4 Software Installation 19
The installation prompts you for account information needed to run the
Cim-IO for OPC Interface Manager service. Enter the account information
and click <Next>.
11 The installation will now show a summary of items to install and configure.
If you wish to make any changes to the installation, click <Back> and
make your changes. If you are satisfied with the items to be installed and
configured, click <Install> to continue.
12 The installation copies the interface files to your system.
13 When the installation is finished, you will receive a dialog box saying
“Wizard Completed". Click <Finish> on the next dialog box to complete
the installation.
You will be prompted to reboot your system after you click <Finish>. If
you do not wish to reboot your system at this time, click no. The system
must be rebooted prior to using the interface to ensure that the installed
files are correctly registered and that the Cim-IO to OPC manager service
is installed correctly.

20 4 Software Installation
5 Interface Configuration
and Startup

Changes in Version 3.0.0


In versions prior to 3.0.0, configuration and start-up of Cim-IO for OPC
required you to manipulate several files: the Windows Services file, the Cim-
IO Logical Devices file, and various files in the Cim-IO for OPC directory. This
file manipulation was done to indicate which servers you wanted to auto-
start, those you did not want to auto-start, and what service names to assign
to them.
This has been eliminated in version 3.0.1 to simplify configuring Cim-IO for
OPC.
The Cim-IO for OPC configuration text files have been eliminated in favor of
registry entries that are set by the configuration utilities.
The Cim-IO Logical Devices file and Windows Services file do not need to be
modified because the configuration utilities now modify them for you.
An automatic conversion program is executed during installation to ensure
that your startup files are migrated properly to the new format. If you have
upgraded and find your configuration was not migrated properly, please
contact AspenTech Support.
Although you no longer need to modify the Cim-IO Logical Devices file and
the Windows Services file, we provide the information for you in case you
wish to do so.

5 Interface Configuration and Startup 21


OPCProperties
Cim-IO for OPC now uses an entirely GUI-based configuration system. The
OPCProperties program will allow you to configure how Cim-IO for OPC
behaves.

Connection Settings
Timeout and Retries: If a connection to the OPC server takes more than
Timeout seconds, a new connection will be attempted. This will continue until
the number specified by Retries has been exhausted. At this point, if a
redundant OPC server has been specified using the –alternatenodename
parameter, it will switch to this server and attempt a connection again using
the Retries and Timeout settings.
Delayed OPC Servers: If you wish a delay between OPC server startup and
when the first OPC group is added, Press Edit and Add your OPC server and
timeout in the Timeout window.

22 5 Interface Configuration and Startup


The Timeout Window

To add a server, press Add and then type in the OPC server’s program ID and
the delay you wish into the appropriate boxes. Select OK to enter a server.
You will see that server appear in the top box. To change or remove a delay,
select the OPC server and press the appropriate button. Select Close to go
back to the initial window.

General Settings
Timezone: If you are reading or writing values of OPC type VT_DATE, you
may wish to specify your time zone so that the conversion to and from UCT is
performed appropriately. Simply select a time zone. The setting will default to
your computer’s current time zone. Note that time for Distributed Control
Systems is absolute as a timestamp identifies a particular absolute second of
time. It is not the result of a conversion to a time-of-day. If you wish to select
another, choose one from the pull-down menu.
Configure OPC Servers: If you wish an OPC server to be automatically
available when the computer reboots, you use this feature to configure it to
do so. Simply press the <Edit> button to bring up the configuration window
to select OPC servers to connect to automatically. This brings up the OPC
Manager Configuration Window, below.
Adding Smart Data Types: If your OPC server supports smart data types, you
can add them by clicking on “Configure Smart Data Types”. This brings up the
“Smart Data Types” window, as seen in the section “The Smart Data Types
Window” below.

5 Interface Configuration and Startup 23


The OPC Manager Configuration Window

To browse a computer, select Add Node. If you wish to get rid of this node
from the GUI, select Remove Node. To add a server to connect to on start-
up, select the OPC server, underneath the appropriate node, from the left
side and select Add Server. Add the server using the window below. To not
connect to it on start-up anymore, select the connection and press Remove
Server. Select Close when you are done.

The Add Server Window

Adding a server to the list is a simple process. Since you have clicked on the
OPC server, the server progid and primary node name will be filled in for
you. You must choose a logical device name, TCP service name, and TCP
port for your service. These will automatically be inserted into the operating
system’s services file and the Cim-IO Logical Devices file. If you wish to
specify an alternate node name for redundant operation, fill in the Alternate
Node box. When you are finished, press OK.

24 5 Interface Configuration and Startup


Known Issue:
OPCProperties will add the local node name to the Node Name text box
when adding an OPC server to the startup list. To force a local connection to a
local OPC server, simply remove the node name from the Node Name text
box before pressing OK. Entering white space (a space or tab) is not valid
and will cause errors.

The OPC Sub-Window


The Ignore No Valid Items in List error checkbox, when checked, will
suppress the “No Valid Items” log message when there are no valid items in a
Cim-IO request.
Perform Initial Synchronous CACHE Read determines the first action
Cim-IO for OPC will perform to get data from a point. Generally, when an OPC
client connects, the data in the OPC cache is of bad quality. The actual data is
obtained by doing a DEVICE read (reading directly from the device). This
operation can take a significant amount of time, so you are offered the option
of enabling this checkbox to do a CACHE read instead of a DEVICE read as
the first read operation.
Perform Synchronous Writes determines whether writes will be done using
SyncIO (checked) or AsyncIO (unchecked).
Timestamp Origin determines how the Cim-IO timestamp will be obtained:
either from the OPC server (OPC Server Time), or from the Cim-IO for OPC
server computer’s time when an OPC message is received (System Time).

5 Interface Configuration and Startup 25


The Smart Data Types Window
The “Configure Smart Data Types” window allows you to add and remove
Smart Data Type associations. To add a server, select “add”. To remove a
server, select “Remove”. If you select “Add”, the “Adding a Smart Data Type”
window appears below. When you are finished adding and removing
associations, press Close to close this window.

Type in your OPC server’s progid, and the description and engineering units
fields, with the appropriate starting delimiter. All characters starting with this
delimiter and onward will be replaced by the string you have typed in. For
example, server “Aspentech.OPC.Sample.1” might use “/ID” for its description
and “/UNITS” for its units. if the item “Boiler1.Valve25/PNT” was entered into
an IP.21 Get record, and the selected data type was “Engineering Units”, the
item ID would be modified to “Boiler1.Valve25/UNITS”, since all of the
characters starting with the delimiter “/” character would be replaced by the
Engineering Units string below. Note that if the delimiter exists in multiple
locations in the tag name, all characters starting with the last occurrence of
the delimiter will be replaced. Press OK to add the association, or press
Cancel to not add it.

26 5 Interface Configuration and Startup


Ok, Apply, and Cancel
Apply will apply the settings on this window. Cancel will close the window
and ignore the current settings. Ok will apply the current settings and close
the window.

Manual Configuration
We highly recommend that you use the OPCProperties program and the Cim-
IO for OPC Utilities (see the “Utility Programs” section) to configure Cim-IO
for OPC. This is the easiest method possible to get your Cim-IO for OPC
connection up and running with a minimum amount of work (and problems).
However, in some cases users may wish to manually modify the TCP services
file or the Cim-IO Logical Devices file. This section explains what values are
contained in each file.

The TCP Services File


When a Cim-IO for OPC Server process starts up, it adds its own TCP/IP
service name to the TCP/IP system file services (if the service name is not
already there). Thus if the Cim-IO Client and this interface reside on the same
node, you do not need to manually add any service name for the Cim-IO for
OPC Interface. If the Cim-IO client resides on another node, make sure you
enter the same service name and the same port number as the one inserted
on the server node by the interface after it started up in the services file
located on the client machine. If you use NIS to manage service names, you
will also have to manually create the service name on the client and server
machines with NIS. For more information about Cim-IO service names, refer
to the Cim-IO User’s Guide.
The service name is the concatenation of the string “CIO” with the OPC
Server name without any non-alphanumeric character periods. The service
name length must be less or equal to 15 characters.

Example1: If the Cim-IO Server is to communicate with the OPC Server


OPC.SERVER.1, the Cim-IO Server will add the following service name to the
services file:
CIOOPCSERVER1

Example2: If the Cim-IO Server is to communicate with the OPC Server OPC
SERVER FOR DEVICE 1.3, the Cim-IO Server will add the following service
name to the services file:
CIOOPCSERVERFOR

The Cim-IO Logical Devices File


As explained in the Cim-IO User’s Guide, the cimio_logical_devices.def
Cim-IO file contains a list of logical devices that Cim-IO Client application can
use to connect to a Cim-IO Server. For the Cim-IO for OPC Interface, when a
Cim-IO for OPC Server starts up, it adds itself to the

5 Interface Configuration and Startup 27


cimio_logical_devices.def file under a logical device name equal to its
service name. Using the previous example, the Cim-IO Server will add itself
under the logical device name CIOOPCSERVER1.

NOTE: The Cim-IO for OPC Manager uses the Cim-IO logical devices added
by the interface to shutdown Cim-IO for OPC Servers. Do not delete or
modified any line that was added by the interface.
You can add other logical devices manually to point to the Cim-IO for OPC
Server if the Cim-IO client you are using needs to access the server under a
different logical device name. Refer to the
Aspen Cim-IO User’s Guide in order to add logical devices to the
cimio_logical_devices.def file.
If the Cim-IO client resides on a different node, you need to manually update
the cimio_logical_devices.def file on the client machine as explained in the
Aspen Cim-IO User’s Guide.

NOTE: If the Cim-IO for OPC Interface is used with Infoplus.21, the logical
device name must not be longer than 15 characters.

Updating the cimio_errors.def


file
The cimio_errors.def file contains a list of error files. Each file contains error
codes and descriptions. The interface installation automatically adds its own
error file (cimio_opc.def) in the cimio_errors.def file. If the Cim-IO Client
resides on a different node than the one where the interface is installed, you
need to manually add the line:
cimio_opc.def
to the cimio_errors.def file located in the etc directory under the Cim-IO
root directory on the client computer.

Specifying Redundant OPC


Server Nodes Using the
Command Line
Cim-IO for OPC supports automatic fail-over functionality. When configured,
the interface will attempt to connect to a backup OPC server of the same
name, but residing on an alternate node, when the connection to the primary
server fails. The fail-over will occur if the primary OPC server stops running or
the communication link between the server and the client is lost. The backup
OPC server node may be specified at the command line or in the
configuration. See the –alternatenodename parameter in the section
“Running Cim-IO for OPC Using the Command Line or Batch Files” below.

28 5 Interface Configuration and Startup


Starting and Stopping the Cim-
IO for OPC Interface Manager
The Cim-IO for OPC Interface Manager was installed as a Windows service by
the installation procedure.

Starting the Cim-IO for OPC Interface


Manager
To start the Cim-IO for OPC Interface Manager, do the
following:
1 Open the Windows Control Panel.
2 Click on the Services icon to start the Services applet.
3 In the Services dialog box, select the Cim-IO for OPC Interface Manager
service and click the Start button.
4 The Cim-IO for OPC Interface Manager will start a Cim-IO for OPC Server
(running the image AsyncDlgp.exe) for each OPC server you have
configured for startup using the OPCProperties program.

Stopping the Cim-IO for OPC Interface


Manager
Shutting Down the Cim-IO for OPC Interface
To shutdown the Cim-IO for OPC Interface Manager, do the following:
1 Open the Windows Control Panel.
2 Click on the Services icon to start the Services applet.
3 In the Services dialog box, select the Cim-IO for OPC Interface Manager
service and click the Stop button.
Shutting down the manager will also gracefully shut down all instances of
Cim-IO for OPC (AsyncDlgp.exe) that you have configured.

5 Interface Configuration and Startup 29


Starting and Stopping Cim-IO
for OPC Interface Servers
Individually
When the Cim-IO for OPC Interface Manager starts, it starts all the Cim-IO for
OPC Servers that are configured to start automatically. When the manager
stops, it stops all the Cim-IO for OPC Servers that were running. If you wish
to start or stop one particular server, you will need to use the StartStop utility
listed in chapter 8.

Note: In order for the utility to have any affect, the Cim-IO for OPC Interface
Manager must be running.

Running Cim-IO for OPC Using


the Command Line or Batch
Files
If you wish to run Cim-IO for OPC from a command line or batch file, you will
need to run the DLGP, AsyncDlgp.EXE. AsyncDlgp.EXE supports the following
command line options:
-tcpserviceTcpServiceName
This specifies what TCP service name this connection uses.
Example: -tcpserviceCIOASPENINFOPLU
-opcserverOPCServerName
This specifies the progid of the OPC server that you wish to connect to.
Example: -opcserverAspen.Infoplus21_DA.1
-nodenameNodeName
If the OPC server is not on the same computer as Cim-IO for OPC, use this
option to tell Cim-IO for OPC which node it is on.
Example: -nodenameTESTNODE1
-alternatenodenameAlternateNodeName
If you wish to have Cim-IO for OPC to be able to connect to a redundant node
if the primary node fails, specify the redundant node using this parameter.
This parameter is optional.
Example: -alternatenodenameTESTNODE2

30 5 Interface Configuration and Startup


6 Configuring the Cim-IO
Client for InfoPlus.21

Creating and Using Get, Put,


and Unsol Records with Cim-IO
for OPC
Note: If you are not using Infoplus.21, skip this chapter.
Assume that you want to read and write data from the OPC Server
OPC.SERVER.1. To have the Infoplus.21 database communicate with this OPC
Server (in read/write and unsolicited mode), the following steps need to be
taken:
1 Create Cim-IO external task records:
Using the IoExternalTskDef definition record, create a Cim-IO external
task record named TSK_M_OPC1 for the main task. If asynchronous
request are to be made, create a Cim-IO external task record for the
asynchronous task: TSK_A_OPC1. If unsolicited data acquisition is to be
used, create a Cim-IO external task record for the unsolicited task:
TSK_U_OPC1. Set the field IO_DEVICE to CIOOPCSERVER1 (the same
name as the logical device name in the cimio_logical_devices.def file).
2 Create the logical device record.
Using the IoDeviceRecdef definition record, create a Cim-IO logical
device record named CIOOPCSERVER1 (the same name as the one
specified in the IO_DEVICE field of the external task record).The
IO_MAIN_TASK field must be set to the name of the task record for the
main task: TSK_M_OPC1. If asynchronous requests are made, set the
field IO_ASYNC? to YES and set the field IO_ASYNC_TASK to the name of
the task record for the asynchronous task: TSK_A_OPC1. If unsolicited
data is to be received, set the field IO_UNSOL? to YES and set the field
IO_UNSOL _TASK to the name of the task record for the unsolicited task:
TSK_U_OPC1. The other fields can be ignored .

6 Configuring the Cim-IO Client for InfoPlus.21 31


3 Create GET records:
A standard Cim-IO GET record is used to retrieve data from the device
and store the values in the database. The layout of the GET record and
details of the fields are provided in the Aspen Cim-IO User’s Guide. This
section emphasizes only those fields to which settings have to be made
for the Cim-IO for OPC Interface.
o Create a GET record using IoGetDef as the definition record.
o Fill in the fixed area of the Cim-IO GET record as described in the
following table:
Required GET Record Description
Field

IO_MAIN_TASK Set to the Cim-IO main client task:


TSK_M_OPC1 in this example.
IO_DEVICE_UNIT Not used by this interface.
IO_GROUP Optionally specify the group name
with which the set of points is
associated. Note: This field is NOT
related to the OPC group.
IO_PRIORITY Specify the priority (1-9, 1 highest)
that the client uses to send the
request to the interface when the
record is activated.
IO_DEFAULT_DATA_TYP Not used by the interface.
E
IO_TIMEOUT_VALUE Specify a positive timeout value, such
as 00:00:10 (for 10 seconds). If a
negative or null value is specified, the
client task waits forever for a reply
from the interface.
IO_FREQUENCY Frequency at which the OPC Server
should poll the data. If 0 is specified,
the data is read from the device,
otherwise it is read from the OPC
server cache.
IO_#TAGS Specify the number of points to read.
o Complete the information for each point to be read from the device.
Enter the fields in the GET record as described in the following table:
Required GET Record Description
Field

IO_TAGNAME Specify the device tagname to


access the data. The syntax for the
tagname depends on the device
accessed by the OPC Server. Refer
to the OPC server manual for the
tagname syntax.
IO_DATA_PROCESSING Specify if the indicated point is to
be processed. Possible values are:
OFF: Do not read the value of this
point from the device, but scan
other points whose
IO_DATA_PROCESSING field is ON.

32 6 Configuring the Cim-IO Client for InfoPlus.21


Required GET Record Description
Field

ON: Read the value of this point


from the device.
IO_DATA_TYPE Not used by this interface.
IO_VALUE_RECORD&FLD Specify the names of the data
record and field to store the value
of the point. The data record must
already exist.
4 Create PUT Records:
A standard Cim-IO PUT record is used to write data to the InfoPlus.21
database. The record specifies where to find the values in the database
and where to place the values in the database. The layout of the PUT
record and details of the fields are provided in the Aspen Cim-IO User’s
Guide. This section emphasizes only fields to which settings have to be
made for the Cim-IO for OPC Interface.
o Create a PUT record using IoPutDef as the definition record.
o Fill in the fixed area of the Cim-IO PUT record as described in the
following table:
Required PUT Record Description
Field

IO_MAIN_TASK Set to the Cim-IO main client task:


TSK_M_OPC1 in this example.
IO_DEVICE_UNIT Not used by this interface.
IO_GROUP Optionally specify the group name
with which the set of points is
associated. This field is NOT related
to the OPC group.
IO_PRIORITY Specify the priority (1-9, 1 highest)
that the client uses to send the
request to the interface when the
record is activated.
IO_DEFAULT_DATA_TYP Not used by this interface.
E
IO_TIMEOUT_VALUE Specify a positive timeout value, such
as 00:00:10 (for 10 seconds). If a
negative or null value is specified, the
client task waits forever for a reply
from the interface.
IO_#TAGS Specify the number of points to write.
o Complete the information for each point to be read from the device.
Enter the fields in the PUT record as described in the following table:
Required PUT Record Description
Field

IO_TAGNAME Specify the tagname on the device to


access the data. The syntax for the
tagname depends on the device
accessed by the OPC Server. Refer to
the OPC server manual for the
tagname syntax.

6 Configuring the Cim-IO Client for InfoPlus.21 33


Required PUT Record Description
Field

IO_DATA_PROCESSING Specify if the indicated point is to be


processed. Possible values are:
OFF: Do not write the value of the
point to the device, but write other
points whose IO_DATA_PROCESSING
field is ON.
ON: Write the value of this point to the
device.
IO_DATA_TYPE Not used by this interface.
IO_VALUE_RECORD&FL Specify the names of the data record
D and field to store the value of the
point. The data record must already
exist.
5 Create UNSOL READ records:
A standard Cim-IO Unsol Read record is used to read data in the
InfoPlus.21 database from the OPC Server in an unsolicited way. The
layout of the GET record and details of the fields are provided in the
Aspen Cim-IO User’s Guide. This section emphasizes only those fields to
which settings have to be made for the Cim-IO for OPC Interface.
o Create an UNSOL READ record using IoUnsolDef as the definition
record.
o Fill in the fixed area of the record as described in the following table:
Required UNSOL Description
READ Record Field

IO_MAIN_TASK Set to the Cim-IO main client task:


TSK_M_OPC1 in this example.
IO_DEVICE_UNIT Not used by this interface.
IO_GROUP Optionally specify the group name with
which the set of points is associated.
Note: This field is NOT related to the
OPC group.
IO_PRIORITY Specify the priority (1-9, 1 highest)
that the client uses to send the
request to the interface when the
record is activated.
IO_DEFAULT_DATA_TYP Not used by the interface.
E
IO_TIMEOUT_VALUE Specify a positive timeout value, such
as 00:00:10 (for 10 seconds). If a
negative or null value is specified, the
client task waits forever for a reply
from the interface.
IO_FREQUENCY Frequency at which the OPC Server
should poll the data. This value must
be greater than 0.
IO_#TAGS Specify the number of points to read.

34 6 Configuring the Cim-IO Client for InfoPlus.21


o Complete the information for each point to be read from the device.
Enter the fields in the UNSOL READ record as described in the
following table:
Required UNSOL READ Description
Record Field

IO_TAGNAME Specify the device tagname to access


the data. The syntax for the tagname
depends on the device accessed by
the OPC Server. Refer to the OPC
server manual for the tagname
syntax.
IO_DATA_PROCESSING Specify if the indicated point is to be
processed. Possible values are:
OFF: Do not read the value of this
point from the device, but scan other
points whose IO_DATA_PROCESSING
field is ON.
ON: Read the value of this point from
the device.
IO_DATA_TYPE Not used by this interface.
IO_VALUE_RECORD&FLD Specify the names of the data record
and field to store the value of the
point. The data record must already
exist.
IO_DEVICE_DEADBAND Point-by-point relative deadbanding
is only supported in OPC DA 3.0. If
you are connecting to an OPC DA 3.0
server, you may use relative
(percent) deadbanding, which will
be passed on to the OPC server. In
all other cases (including attempting
to pass an absolute deadband to a
DA 3.0 server), this field is ignored.
6 In the Infoplus.21 Manager, configure the Cim-IO Client tasks associated
to the external task records previously created.
There should be at least one Cim-IO main client task per logical device
you want to communicate with ( in our case, just one task, TSK_M_OPC1
for the logical device CIOOPCSERVER1).
Optionally, you may start an asynchronous task (TSK_A_OPC1) for
asynchronous communications and an unsolicited task (TSK_U_OPC1) to
receive unsolicited data. All Cim-IO Client tasks are specified like any
other InfoPlus.21 external tasks using the InfoPlus.21 Manager. In our
example, three Cim-IO Client tasks are to be created:
o TSK_M_OPC1 as the Cim-IO main client task
o TSK_A_OPC1 as the Cim-IO asynchronous receive task
o TSK_U_OPC1 as the Cim-IO unsolicited receive task
7 Start the InfoPlus.21 Manager.
8 To create the TSK_M_OPC1 task, enter the following in the NEW TASK
DEFINITION area:
o TSK_M_OPC1 in the task name field.
o cimio_c_client.exe in the executable field.

6 Configuring the Cim-IO Client for InfoPlus.21 35


Make sure that the External Task checkbox is checked. Click the ADD
button to add the task to the Defined Tasks list.
9 To create the TSK_A_OPC1 task, enter the following in the NEW TASK
DEFINITION area:
o TSK_A_OPC1 in the task name field.
o cimio_c_async.exe in the executable field.
Make sure that the External Task checkbox is checked. Click the ADD
button to add the task to the Defined Tasks list.
10 To create the TSK_U_OPC1 task, enter the following in the NEW TASK
DEFINITION area:
o TSK_U_OPC1 in the task name field.
o cimio_c_unsol.exe in the executable field.
Make sure that the External Task checkbox is checked. Click the ADD
button to add the task to the Defined Tasks list.
11 To start these Cim-IO Client tasks, select them one at a time in the
Defined Tasks window and click the RUN TASK button for each task. This
action will start all three tasks. After these tasks have been started, they
should appear in the Running Tasks window. If they do not appear, there
was a problem starting them. Check the output and the error files for the
task(s) that could not be started.. Also check the Cim-IO log file
(CIMIO_MSG.LOG) for any error messages from Cim-IO.

Cim-IO OPC as an OPC Client


Transfer Records vs. Groups
Cim-IO OPC acts as a normal OPC client. It will connect to the OPC server and
establish one OPC group per I/O transfer record according to the following
table:

I/O Cim-IO Group OPC Group Rd/Wr


Transfer Xfer Rate Enabled Update From/To
Record Rate
Type
Io…GetDef 0 No 0 SyncRead
OPC Device
Io…GetDef >0 Yes Same as AsyncRead
Cim-IO OPC Cache
Io…UnsolDef =0 NOT ALLOWED
Io…UnsolDef >0 Yes Same as OPC
Cim-IO Callback
Io…PutDef N/A No 0 AsyncWrite
OPC Device

36 6 Configuring the Cim-IO Client for InfoPlus.21


Cim-IO OPC Get and Put I/O
Get and Put records are handled by synchronous or asynchronous OPC reads
and writes, not by subscription. For Get records with an update rate of 0, and
Put records, a disabled group with an update rate of 0 is created and all
transfers are done using OPC_DEVICE as the source. Since OPC_DEVICE
takes precedence over whether the group is active or not, these commands
should always succeed. If, however, an OPC server is not correctly written,
this action may fail. This would not be the fault of Cim-IO for OPC or a
transfer record configuration issue, but the fault of the OPC server not
conforming to the OPC specification.

Cim-IO OPC Unsolicited I/O


Unsolicited I/O is implemented in Cim-IO for OPC by subscribing to group
callbacks on the created group. Because Cim-IO Unsolicited traffic occurs no
faster than the update rate, on a point-by-point basis, points will be sent no
faster than the update rate even if they change values once, or even multiple
times, in the meantime. If a point changes multiple times before an update
gets sent, only the last value is sent; any data spikes are lost.
OPC callbacks come no faster than the subscribed update rate on a group-by-
group basis. Even if a point has not changed in a time greater than the
update rate, it must still wait the update rate after the most recent
transmission before it can send its value. If a value changes multiple times in
the requested OPC update rate, only the last value is sent; any data spikes
are lost.
Cim-IO for OPC sends a group update rate equal to the Cim-IO record update
rate. By OPC specification, the OPC server should try to ensure that data from
the device is at least this fresh. Since an update rate of 0 (instantaneous) not
possible (there is always some delay when accessing the device), and can
result in the OPC server using up nearly 100% of the CPU time trying to scan
the device every 0ms (and additional problems if the server is not well
written), a Cim-IO update rate of 0 is not supported. Note also that according
to the OPC specification, an OPC server can “override” an OPC client’s update
rate if it, or the device, cannot support polling at that fast a rate. Thus, even
if a value of, say, 500ms is sent as the requested group update rate, the OPC
server may reset this to, say, 1000ms when the group is created.

Reading and Writing OPC Array Data


Array data is returned into a record as a structure data type. Structure data
types are available in versions 4.7 and higher of Cim-IO.
Each element of an array is returned to IP21 as individual fields. To read the
data, a custom record must be created with at least the number of value
fields to match the size of the array. The records must be of the same or
equivalent data type as their IP.21 counterparts (Analog=Real or
Discrete=Integer) and the IP.21 size (FIELD_LENGTH) of each data item, in
bytes, must match the size of the OPC item. The following array types are
supported:

6 Configuring the Cim-IO Client for InfoPlus.21 37


• Integer type arrays (VT_I1, VT_I2, VT_I4, VT_UI1,VT_UI2,VT_UI4).
• Real Arrays (VT_R4 and VT_R8)
The following array types are not supported:
• Error arrays (VT_ERROR)
• Timestamp arrays (VT_DATE)
• Currency arrays (VT_CY)
• String Arrays (VT_BSTR)
1. Create new records defined by FieldNameDef or FieldLongNameDef, one
for each data element in the array. For example; if the all array tags
contain ‘n’ elements or less, then create n value records with non
repeating id values (value_1….value_n).
The name for this record is arbitrary.
2. Create a new custom definition record from DefinitionDef. Use the
FieldName records created above as the element receiving fields. Below is
an example of a custom record that can be used to read an array of 10
elements.
DATA FIELDS

OPC Array Test IP_DESCRIPTION


opc_array_tag NAME
04-JUN-03 15:22:14.0 IP_INPUT_TIME
F10. 7 IP_VALUE_FORMAT
Initial IP_VALUE_QUALITY
1368.2087 value_1
10907.975 value_2
4931.8676 value_3
4704.1724 value_4
2340.1157 value_5
15861.237 value_6
5881.3616 value_7
3099.6090 value_8
7625.3897 value_9
7625.4912 value_10

3. Create an IOGetDef record to receive the data from the Cim-IO for OPC
client using the information at the start of this chapter. For
IO_DEFAULT_DATA_TYPE select “Structure” if all tags in the get record
are of array data types. Select “default” as the IO_DEFAULT_DATA_TYPE
when tags of different data types are used in the same get record.
In the repeat area choose “Structure” as the IO_DATA_TYPE for all array
tags.

38 6 Configuring the Cim-IO Client for InfoPlus.21


4. For IO_VALUE_RECORD&FLD enter the name of the custom record and
the name of the first value field in the record separated by a space.
In the above example the string used is: opc_array_tag value_1
The structure data type begins by placing the first array element values in the
starting location specified by the IO_VALUE_RECORD&FLD string and
subsequent values are placed in the remaining fields.
The number of value fields must match or exceed the elements in the
array. The data read will fail if there are more elements than available
fields.

Note: For an example array definition file for IP.21, see SampleArrayDef.rld
located in %CIMIOROOT%\io\cio_opc_api
When IO_DATA_PROCESSING for all tags is set to ‘ON’ and
IO_RECORD_PROCESSING and IO_DEVICE_PROCESSING are ‘ON’ the
value data fields in the custom record will populate with array values.

6 Configuring the Cim-IO Client for InfoPlus.21 39


40 6 Configuring the Cim-IO Client for InfoPlus.21
7 Features for DA 3.0 Servers

Introduction
Cim-IO for OPC 3.0.0 contains extra features for OPC servers that support the
OPC DA 3.0 specification. This chapter covers these new features and how to
access them using IP.21. Please note that these features are only useful if the
OPC DA server you are using is DA 3.0 compliant.

Deadbanding
IP.21 unsolicited records feature a point-by-point device deadband. Because
OPC DA 3.0 supports relative deadbanding, any percent deadband will be
passed on to the OPC server. Since OPC DA 3.0 does not support absolute
deadbands, an absolute deadband will not be passed on to the OPC server.

DA 3.0 Data Access


An OPC server’s DA 3.0 Data Access interface (IOPCSyncIO2 and
IOPCAsyncIO3) will be used if available. Using this interface does not support
any additional features over DA 2.0 at this time.

7 Features for DA 3.0 Servers 41


42 7 Features for DA 3.0 Servers
8 Utility Programs

StartStop
There may be times where you wish to manually start or stop the Cim-IO for
OPC server that is connected to a particular OPC server. To do this, use the
StartStop utility.
Running the StartStop utility produces the following window.

Type in the server name you wish to start or stop. You can specify it by
either specifying the TCP Service name or the OPC server name (progid). If
you specify the TCP service name, it will be used. If you do not specify the
TCP service name, the name will be created from the OPC Server Name. If
the OPC server is running on a remote node, specify the node name it is
running on.
To start the server select the Start radio button and press OK. To stop the
server select the Stop radio button and press OK.

DisplayTags and FindRemote


These programs are no longer supported as of version 3.0.1 (AMS 2004.1).
Please use the browsing utility in OPCProperties to browse OPC servers.

8 Utility Programs 43
44 8 Utility Programs
9 Troubleshooting

This chapter then describes troubleshooting for specific problems and defines
the error messages that the interface processes.

Troubleshooting
Troubleshooting helps to isolate a problem to either the interface or its client.
When a problem occurs, such as a database point having an invalid status or
having an incorrect value, the investigation starts at the device level and
moves upward to the application. This section describes the general steps
used to determine what part of the interface is causing a problem.

Connectivity Issues
If Cim-IO OPC cannot connect to the OPC server, you are likely having issues
with Microsoft Distributed COM (DCOM) permissions or with application IDs.
Call Aspen Support for assistance.

DCOM UDP on Windows NT


If you are using Windows NT, the computer may be in a configuration which
does not enforce reliable DCOM communications between two computers. To
check this, click Start | Run and enter dcomcnfg

9 Troubleshooting 45
The DCOM configuration panel will appear. Select the Default Protocols tab
as shown below.

If the protocol “Connectionless UDP” appears at the top of the list, select it,
select Remove, select OK, and reboot your computer. This protocol is not
generally beneficial for good DCOM communications and was removed from
the default list in Windows 2000 and later operating systems.

Isolating a Fault to the Device Level


Use any device utilities that are available to determine if a point exists on the
device, and is available to be accessed. If a device utility shows the value of a
point to be incorrect or the status of the point to be bad, the problem resides
on the device level. This is not an interface problem.

46 9 Troubleshooting
Isolating a Fault to the OPC Server Level
Use an OPC client tool, such as Matrikon’s OPC Explorer, to create OPC
groups similar to what you are creating using Cim-IO for OPC, and observer
the OPC server’s behavior. If the server is not returning the data correctly or
is not behaving properly, the problem resides with the OPC server. Further
information on what both Cim-IO for OPC and the OPC server are doing can
be obtained by using Matrikon’s OPC Sniffer. Matrikon OPC Explorer and
Matrikon OPC Sniffer are available as free downloads from
www.matrikon.com.

Isolating a Fault to the Cim-IO Components


If the point exists on the device, and your OPC client tool shows the point
working correctly, observe the behavior of Cim-IO for OPC and the Cim-IO
client. Using Cim-IO Kernel Diagnostics, create a log file logging the
appropriate requests and replies (Get, Put, Unsol). Also check your
CIMIO_MSG.LOG file to see if the messages are getting through, or if there
are network connectivity problems.
Alternatively, you can use the Cim-IO test utility (cimio_t_api) to determine if
the point is being correctly obtained from the device.
Following is an example of using the cimio_t_api test program for using
option 9 to read a point from the device:
1 At the "Logical device name for the Cim-IO for OPC interface" prompt,
enter the default logical device name.
2 Now you are presented with several more prompts. Respond to these as
indicated in the following table.
Test Utility Information to Enter
Prompt

Unit number Default number, because this parameter is


not used by the interface.
Number of tags Number of tags to read.
Priority "1" for the highest priority.
Timeout At least "10", for 10 seconds.
Access type CIMIO_AT_SYNC for synchronous.
Frequency "0" for demand read.
List ID "-1".
Tag names Tag names, either manually or through a
file.
Data type Data type with which the point is returned.
Set this field if manual entry is used.
Device data Device data type for point, if manual entry
type is used.
Test Utility Prompts

9 Troubleshooting 47
3 Now the request is processed. Note the following returned information:
value Value of the return code.
timestamp Timestamp of the return code.
status One of the valid Cim-IO status codes,
discussed in "Error Messages."
facility number 77.
driver status Raw status returned by the interface,
described in "Error Messages."

If the error is with Cim-IO for OPC, contact AspenTech support. Please retain
any logs produced to assist AspenTech support in quickly locating your
problem.

Isolating a Fault to the Client Level


If the Cim-IO test utility (cimio_t_api) shows a point to be correct and the
application shows the point information to be incorrect, then the problem
resides in the application. If using InfoPlus.21, InfoPlus-X, or Setcim, the Get
or Put transfer records need to be checked for status information about the
particular point. If these are correctly configured, there may be a problem
with the Cim-IO client. Contact AspenTech for assistance.

Failover and Redundancy


If a redundant server is specified, Cim-IO for OPC will fail over to the
redundant server when the primary goes down, and will fail back to the
primary server when the redundant server goes down.
Failover is not immediate. It only occurs after a break in the OPC connection
is detected. Because OPC depends on Microsoft DCOM for communications, an
OPC call times out only if its DCOM call times out. This only occurs if:
The OPC server goes down but the computer on which it was running stays
up, and an OPC call is done, or
The computer on which the OPC server is running goes down, or the network
connection between the two is broken, and up to 6 minutes (the DCOM
timeout hard-coded in Microsoft operating systems and not user or program
settable) elapses.
A timeout will not occur if the server, for whatever reason, hangs or stops
functioning while an OPC call is being made to it, but does not crash or
otherwise go down.

48 9 Troubleshooting
Frequently Asked Questions
Below is a list of common questions about the Cim-IO for OPC Interface:
• I have trouble using cimio_t_api to check the connection to the Cim-IO for
OPC Interface. The AsyncDlgp process dies, and I get
CIMIO_USR_GET_CONNECT and "OPC Server Not Installed, - exiting"
messages in the CIMIO_MSG.LOG file.
Some OPC servers require DCOM settings different from those established by
default during installation. Click "Start|Run" and type in "dcomcnfg". Select
the OPC server from the list and click on "Properties". Click on the "Identity"
tab and make sure "The interactive user" is selected rather than "The
launching user". DCOM settings connecting a client and server on different
domains or on a workgroup may involve further difficulties.

Error Codes
The following table lists the error codes and text that the interface may log in
the Cim-IO log file:
Code Description

0 Operation Succeeded
77001 Operation Failed
77002 Unsupported Data Type
77003 Unknown Data Type
77004 Failed to Allocate Memory
77005 Unsupported Output Type
77006 The AddGroup Method Failed
77007 The AddItems Method Failed
77008 The OPC QueryInterface Method Failed
77009 The Register function Failed
77010 Invalid Transaction Type
77011 The NewList function Failed
77012 The SyncRead function Failed
77013 The SyncWrite Function Failed
77014 The GetList Function Failed
77015 The BuildReply Function Failed
77016 The ServerTag Function Failed
77017 The ServerTemplate Function Failed
77018 The SeverIntID function Failed
77020 Unsupported Device Data Type
77021 Unsupported Data Type
77022 No OPC Server running
77023 The AsyncRead Function Failed
77024 The AsyncWrite Function Failed
77025 Failed to Connect Sink

9 Troubleshooting 49
Code Description

77026 No callback was registered


77027 One of the arguments passed to the function was invalid
77028 Item Was Not Found in Internal List
77029 The BuildDummyResults Function Failed
77030 Output Type and Data Type Mismatched
77031 Invalid Item
77032 No Access Right
77033 The passed item handle was invalid
77034 The Item is no longer available in the Server Address Space
77035 The value was out of range
77036 The passed data type can not be accepted for this item
77037 The item's access path is not known to the server
77038 Dadvise is not implemented on the data object
77039 Dadvise failed: Invalid value for lindex; currently only −1 is
supported
77040 Dadvise failed: Invalid value for pFormatetc
77041 Dadvise Failed: The data object does not support change
notification
77042 Invalid array size returned for array data type
77101 Invalid Tag
77103 Tag was skipped because output type was set to NOSTORE
77104 The AddItems method failed
77105 Status pattern not used by OPC
77106 No specific reason is known
77107 Last Usable Value
77108 Sensor Not Accurate
77109 Engineering Units Exceeded
77110 Sub-Normal
77111 Configuration Error
77112 Not Connected
77113 Device Failure
77114 Sensor Failure
77115 Last Known Value
77116 Communication Failure
77117 Out of Service
77118 Local Override

50 9 Troubleshooting
10 Glossary

Client
A program capable of initiating communications with a service program. Cim-
IO clients talk to Cim-IO servers.

DIOP
Device Input/Output Process. A DIOP is a Cim-IO interface task that performs
low-level communications with external hardware devices or other databases.

DLGP
Device Logical Gateway Process. A DLGP is a Cim-IO interface task that
communicates with client tasks, forwards messages to DIOPs in the interface,
and returns messages to the client tasks that initiated the requests.

Logical Device
Representation of the interface supported by the Cim-IO interface platform.
Cim-IO can support several different interfaces at the same time.

Logical Device Name


Name representing a Cim-IO logical device. Each interface must be identified
by a unique logical device name.

OPC
Microsoft Object Linking and Embedding for Process Control. OPC is a
standard in the process control industry. Standards are set by the OPC
Foundation.

10 Glossary 51
OPC Group
A collection of points to be read or written, similar to a Cim-IO Transfer
Record.

OPC Cache
OPC Specification requires that an OPC server obtain data regularly if
requested, and store this in an internal cache. Reads requesting the cache as
the data source, and all unsolicited callbacks, come from data stored in this
cache.

OPC Device
An OPC Client may request that its data be directly read from the device. This
bypasses the OPC cache (see above). Writes are always to the device.

OPC Update Rate


The maximum rate at which requested data is expected to flow from the OPC
Server to CimIO for OPC.

Service
A program that provides services to other programs. A service has a defined,
constant, TCP port number that it listens on for incoming connections. The
service’s name and port number must be defined in the operating systems’
Services file.

Service Name
A name for a particular service.

52 10 Glossary

You might also like