Professional Documents
Culture Documents
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.
1 Introduction .........................................................................................................5
Content and Audience..................................................................................... 5
Related Documentation ................................................................................... 5
Technical Support .......................................................................................... 6
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
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
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
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.
2 Release Notes 7
Changes, fixes, and known issues in Cim-IO for OPC version 3.0.0
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
2 Release Notes 9
Changes and fixes made to Cim-IO for OPC version 2.35:
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.
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
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.
2 Release Notes 11
Changes and fixes made to Cim-IO for OPC version 1.1:
ID Description
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
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
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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
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.
Note: In order for the utility to have any affect, the Cim-IO for OPC Interface
Manager must be running.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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