CONFIDENTIAL
The information contained herein is confidential and proprietary to Matrikon.
It may not be disclosed or transferred, directly or indirectly, to any third party without the
explicit written permission of Matrikon.
All rights reserved. No part of this document may be reproduced, stored in a retrieval system,
translated, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording, or otherwise, without prior written permission of Matrikon.
1.1 System Requirements.................................................................................................................................................................................................................................5
1.3 OPC Server Overview..............................................................................................................................................................................................................................6
2.1.2 Standard OPC Proxy/Stubs........................................................................................................................................................................................................7
2.1.3 Standard OPC Server Browser...............................................................................................................................................................................................8
2.1.4 Matrikon OPC Common Components.............................................................................................................................................................................8
3.2 Server Configuration...........................................................................................................................................................................................................................12
3.3 Allen Bradley ................................................................................................................................................................................................................................................14
3.4 Define an Allen-Bradley PLC.........................................................................................................................................................................................................15
3.5 Alias Configuration...............................................................................................................................................................................................................................16
3.6 Save the Configuration ......................................................................................................................................................................................................................18
4.1 View Available OPC Servers.........................................................................................................................................................................................................23
4.2 Connect to an OPC Server..............................................................................................................................................................................................................23
4.4.3 Browse the Server Address Space ................................................................................................................................................................................25
4.4.4 Requested Data Type...................................................................................................................................................................................................................26
4.4.5 Active State...........................................................................................................................................................................................................................................26
4.4.6 Validate the OPC Items..............................................................................................................................................................................................................26
4.5.2 Active State...........................................................................................................................................................................................................................................26
4.5.3 Data Display..........................................................................................................................................................................................................................................26
4.5.5 Time Bias..................................................................................................................................................................................................................................................27
4.6 Write Control Values..........................................................................................................................................................................................................................28
4.7.2 Data Transfer.......................................................................................................................................................................................................................................29
4.7.3 Data Display..........................................................................................................................................................................................................................................29
4.8 Save the Session....................................................................................................................................................................................................................................29
Appendix A - Item ID Syntax.......................................................................................................................................................................................................................................33
6.2 Read and Write Data............................................................................................................................................................................................................................33
Appendix B - Performance..........................................................................................................................................................................................................................................34
Appendix C - Distributed COM (DCOM)............................................................................................................................................................................................................35
C.4 Server Identity.......................................................................................................................................................................................................................................................38
C.6 Remote Program ID...........................................................................................................................................................................................................................................39
Appendix D - OPC Compliance.................................................................................................................................................................................................................................40
D.1 OPC Server Object...............................................................................................................................................................................................................................................40
D.2 OPC Group Object................................................................................................................................................................................................................................................40
D.3 Server Registration...........................................................................................................................................................................................................................................41
Appendix E - OPC Quality Flags................................................................................................................................................................................................................................42
Appendix F - VARIANT Data Types.........................................................................................................................................................................................................................44
Appendix G - OPC I/O Methods.................................................................................................................................................................................................................................45
G.1 Synchronous Versus Asynchronous I/O......................................................................................................................................................................................45
G.2 Device Versus Cache Reads....................................................................................................................................................................................................................45
G.3 OPC DA 2.0 versus 1.0a Asynchronous I/O..................................................................................................................................................................................46
Appendix H - Alias Configuration..........................................................................................................................................................................................................................47
This document is the user’s manual for the Matrikon OPC Server for Allen-Bradley PLCs. This
server is an OPC™ compliant program that allows access to Allen-Bradley ™ PLC registers.
The product has the following features:
• Fully compliant with OPC™ Data Access Specification 1.0a;
• Allows access all standard files and to structured data files in Allen-Bradley™ PLC-5
and SLC-500 PLCs;
• Supports Allen-Bradley™ PLC-5 and SLC-500 PLCs;
• Provides flexible communications options using RS-LINX as the communications
manager;
• Requires minimal configuration after installation;
• Performs extensive error tracking and management; and
•
Includes Matrikon’s OPC Explorer for testing and configuration.
1.1 SYSTEM REQUIREMENTS
This Matrikon OPC Server has the following minimum system requirements:
• Intel Pentium II 200MHz Processor
• 64 MB RAM
• 25 MB hard drive space
• Microsoft Windows NT 4.0 Service Pack 5 (or higher)
The server has the following additional requirements:
• This should include any specific hardware. Including version and model numbers!!!
1.2 OPC OVERVIEW
OLE for Process Control (OPC) was designed to bridge Windows based applications and process
control hardware and software applications. It is an open standard that permits a consistent
method of accessing field data from plant floor devices. This method remains the same
regardless of the type and source of data.
OPC servers provide a method for many different software packages to access data from a
process control device, such as a PLC or DCS. Traditionally, any time a package needed access
data from a device, a custom interface, or driver, had to be written. The purpose of OPC is to
define a common interface that is written once and then reused by any business, SCADA, HMI,
or custom software packages.
Page 5 of 49
Matrikon OPC Server for Allen Bradley
Client
Application
Client
Application
Client
Application
OPC Interface
OPC
Server
Device ADevice CDevice B
OPC
Server
Once an OPC server is written for a particular device, it can be reused by any application that is
able to act as an OPC client. OPC servers use Microsoft’s OLE technology (also known as the
Component Object Model, or COM) to communicate with clients. COM technology permits a
standard for real-time information exchange between software applications and process hardware
to be defined.
OPC
Server
1.3 OPC SERVER OVERVIEW
This OPC server follows the requirements of the OPC specificat ion to provide data access to an
OPC client. This server implements OPC Data Access (DA) version 1.0a and 2.0 of the OPC
custom interface.
Also, the server is optimized for high performance and uses multithreaded technology to provide
efficient response to client requests. This approach allows multiple clients to connect to and
effectively use the resources of a server.
This Matrikon OPC server requires very little configuration after installation. It manages its
communication automatically, providing optimal device polling with no additional configuration
required by the user. This provides a flexible and powerful method to access data that is still
simple to manage.
This OPC server (as all of Matrikon’s OPC servers) is guaranteed to be 100% compliant with the
OPC DA 1.0a and 2.0 specification. In addition, since our applications are sold world wide,
either by vendors or directly by Matrikon, we have developed a comprehensive set of standards
and tools to ensure that our interfaces are:
• Easy to use
• Robust
• Reliable
• Efficient
• Complete with error checking and recovery procedures
The focus of Matrikon is to develop strong long-term relationships with our clients. To that
extent we make it a priority to become familiar with both the business and technical
requirements of all our clients. This enables us to provide innovative services and solutions to
enhance the technology direction selected by our clients within the framework in place today. At
Matrikon we aim to provide solutions to meet your requirements.
Page 6 of 49
Matrikon OPC Server for Allen Bradley
Note
2. GETTING STARTED
This section guides you through the process of setting up a Matrikon OPC Server for real-time
data access. Please follow the instructions carefully to avoid problems.
2.1 INSTALLATION
The installation program for a Matrikon OPC Server comes on either CD-ROM or 3½” floppy
disks. Insert the media in the drive and choose Add/Remove Programs from the Control Panel.
Click Install and follow the instructions from the Installation Wizard.
The installation program copies all necessary files to the target computer, registers the various
software components, and creates short-cut icons in the Start menu.
2.1.1 MATRIKON OPC SERVER
In addition to the standard Matrikon OPC Server files, the Matrikon OPC Server for Device
installs the following files. These files are installed by default in the
MATRIKON\OPC\AllenBradley directory under the Program Files folder.
Filename Description
OPCAllenBradley.EXE Matrikon OPC Server for AllenBradley Devices Executable
PSTCFGAllenBradley LIB.OCX Configuration Panels ActiveX Component
The version-independent program ID for the server is "Matrikon.OPC.AllenBradley ". The
version-specific program ID for this version of the server is "Matrikon.OPC.AllenBradley.1".
The Matrikon OPC Server for AllenBradley Devices uses a software key for licensing. Contact
Matrikon at drivers@matrikon.com to obtain the registration code for this server.
2.1.2 STANDARD OPC PROXY/STUBS
In compliance with OPC standards, Matrikon OPC Servers install and register the official OPC
proxy/stub DLL’s in the Windows NT SYSTEM32 directory. These files contain version
information so that they avoid overwriting newer files with outdated ones.
Filename Description
OPCPROXY.DLL
OPCCOMN_PS.DLL OPC Common 1.0 Interfaces Marshalling Library
OPC_AEPS.DLL OPC Alarms and Events 1.0 Interfaces Marshalling Library
OPC Data Access 2.0 and 1.0a Interfaces Marshalling
Library
Vendors were originally required to supply their own version of the OPC proxy/stub.
Unfortunately, this proved to cause conflicts between various versions of the DLL’s
when products from different vendors were installed on the same machine. To solve
this problem, the OPC Foundation created official DLLs and they now require that all
vendors install these instead. However, older OPC server installation programs may
still install the old DLLs, preventing new servers from functioning properly. If this
Page 7 of 49
Matrikon OPC Server for Allen Bradley
occurs, simply run a newer installation again to ensure that the official DLLs are
installed.
2.1.3 STANDARD OPC SERVER BROWSER
In compliance with OPC standards, Matrikon OPC Servers install and register the official OPC
Server Browser in the Windows NT SYSTEM32 directory. This file contains version
information to avoid overwriting a newer file with an outdated one. The installation program
also ensures that the Act iveX Interface Marshalling Library is on the target machine so that the
server functions properly.
Filename Description
ACTXPRXY.DLL ActiveX Interface Marshalling Library
OPCENUM.EXE OPC Server Browser
2.1.4 MATRIKON OPC COMMON COMPONENTS
Matrikon OPC Servers require the following files to function properly. These files are installed
by default in the MATRIKON\OPC\COMMON directory under the Program Files folder (except
for EXPREVAL.DLL, which is installed in the SYSTEM32 directory).
Matrikon OPC Explorer is a general-purpose OPC client that is useful for testing the capabilities
of any OPC server. The file is installed by default in the MATRIKON\OPC\COMMON
directory under the Program Files folder. A shortcut icon for the program is added to the Start
menu (in the common group).
Filename Description
OPCEXPLORER.EXE Matrikon OPC Explorer (General-purpose OPC Client)
2.1.6 MATRIKON OPC AUTOMATION COMPONENT
The Matrikon OPC Automation Component enables developers to access OPC data from client
applications developed using Automation tools such as Visual Basic, VBA, and VB Script. This
component is installed by default in the MATRIKON\OPC\COMMON directory under Program
Files.
Filename Description
Page 8 of 49
Matrikon OPC Server for Allen Bradley
OPCDAAUTO.DLL Matrikon OPC Automation Component
2.1.7 INSTALLATION OPTIONS
Just before the installation program finishes, it offers two additional options. One option
specifies whether the server should be installed as an NT service instead of a local executable.
The other option provides a means to resto re the older “ProcessX.OPC.Device” program ID to
retain compatibility for clients that were coded to use earlier versions of the server.
2.2 LICENSING
Most Matrikon OPC Servers require some form of license criteria to be met in order to function
fully. Licensing for a particular server can use either a hardware key or a software key.
For servers requiring hardware licensing, a HASP hardware key coded to that particular program
can be purchased. This key must be securely fastened to the parallel port of the computer on
which the server is installed. It does not interfere with hardware keys from other vendors, nor
does it affect other normal parallel port applications, such as printing.
If a server uses hardware licensing, then the installation program will install a device driver for
HASP keys on the target system. When the server starts up, it will display a message box if it
does not detect the correct key. It will then function for a demonstration period of two hours
before “timing out”. At this point all devic e communication will cease.
For servers requiring software licensing, a special ten-digit number is supplied when the server is
purchased. This number must be entered in the Software Registration screen, available from the
About box for the server (see the section on configuration for instructions on how to access the
About box). The About box will include the words “UNREGISTERED COPY” if the number is
missing or incorrect.
2.3 COMMAND-LINE
The installation program registers the Matrikon OPC Server to run as either a local executable or
an NT service (based on user choices) and creates a shortcut in the Start menu. Use this shortcut
to invoke the configuration utility, which will in turn start up the server. For reference purposes,
the command-line parameters for the OPC server executable are as follows.
Parameter Description
/REGSERVER
–REGSERVER
/SERVICE
–SERVICE
/UNREGSERVER
–UNREGSERVER
Registers the OPC server to run as a local executable
(uninstalling the NT service if necessary).
Registers the OPC server to run as an NT service. By default
the service is set to run as the System account as an
interactive process.
Removes all registry entries for the OPC server (uninstalling
the NT service if necessary).
Starts up a copy of the OPC server as a local executable. It is
(no parameters)
preferable to start the server up from the configuration utility
or another OPC client instead of from the command line.
Page 9 of 49
Matrikon OPC Server for Allen Bradley
3. CONFIGURATION
Matrikon OPC Servers require a very small amount of configuration to function properly. This
section describes how to create a configuration for your OPC Server using the supplied PSTCFG
utility application. It begins with a generic discussion of using PSTCFG, and is followed by
specific details on configuring devices supported by this OPC Server.
3.1 STARTING UP
Choose the appropriate shortcut for the OPC server from the Start menu to invoke the PSTCFG
configuration utility. By default, the shortcut has the name “Matrikon OPC Server for Device”
and appears in “Matrikon OPC/Device” under the common section of the Programs folder.
If the OPC server is not currently running, then it will launch when the configuration utility is
started. If the server runs as a local executable, the splash screen is displayed and then a small
red X appears in the Tool Tray at the right-hand side of the Task Bar. Right-click on the X to
display the following menu.
Click “Show Control Panel” to display the control panel for the server. Double clicking on the X
accomplishes this as well. The control panel displays general statistics for the server, such as the
number of clients currently connected.
The control panel always stays on top of every other window on the desktop so that it can be
used to monitor the server at all times. Double-click on the title bar to make the control panel
“window shaded”. Click the X in the top right-hand corner to hide the control panel.
Click “configure” from the control panel or the pop-up menu to display the main configuration
window for the server. If the server runs as an NT service, the splash screen is not displayed, nor
does the X appear in the Tool Tray. Instead, the main configuration window is displayed
immediately.
Click “about” from the control panel, pop-up menu, or Help menu in the main configuration
window to display the Ab out Box for the server. The About Box contains the server name and
version number as well as other information about the software and Matrikon. It may also
contain a link to a software registration screen for servers that use software licensing.
The shortcut to the configuration utility has the following syntax for command -line options.
The second parameter specifies which OPC server is to be configured. A mechanism in
the utility prevents more than one copy of itself from connecting to the same OPC
server.
The main configuration window displays a tree-view of objects configured in the server. Select
an object to display its current configuration, which appears on the right -hand side of the
window.
If the server runs as a local executable, it will remain running even after the main configuration
window is closed, even if no clients are connected. Displaying the control panel or main
configuration window for the server will “lock” it so that it will not s hut down while
configuration is being performed.
If the server runs as an NT service, it will remain running so long as there are clients connected
to it. Closing the main configuration window will shut down the configuration utility, but will
not interfere with the normal operation of the server.
Page 11 of 49
Matrikon OPC Server for Allen Bradley
Note
3.2 SERVER CONFIGURATION
Select “Server Configuration” in the tree view and choose Define New… from the Edit menu.
The Insert New Object dialog box appears. Choose the desired type of object from the list and
click OK.
Different objects may be available depending on which object is currently selected in
the tree view.
Once an object is selected, its configuration panel appears. Each type of configurable object has
its own configuration panel allowing users to enter object-specific information. Change the
configuration settings as desired and press OK to create the object.
Three fields are common to all types of object: Name, Description, and Enabled. The Name field
specifies a unique name for the object. It is used later as part of any item ID’s that refer to data
Page 12 of 49
Matrikon OPC Server for Allen Bradley
items under this object. Object names are automatically converted to title case for display
purposes. The Description field can contain up to 63 characters of text for reference purposes.
The Enabled checkbox specifies whether or not communication should be enabled for an object.
Normally it should be checked. It may be useful to disable certain objects, especially if the
devices that they refer to are disconnected or malfunctioning, in order to improve the
performance of communication with the other objects. Real-time values are not available from
disabled objects.
Once an object is created, select it in the tree view and change the settings in its configuration
panel to alter its configuration. Click Apply to accept the changes, or Cancel to discard them. To
remove an object, select it in the tree view and choose Delete from the Edit menu.
It may be useful to change the default settings for a new object to avoid repetitive work. Choose
Defaults from the View menu in order to alter the default settings for available object types.
Simply edit the settings in the various configuration panels and choose OK. The next time an
object of a particular type is created, it will use these default settings for initial values.
Page 13 of 49
Matrikon OPC Server for Allen Bradley
The upcoming section contains further information on the specific types of objects available for
this OPC server, and how to configure them.
3.3 ALLEN BRADLEY
Click ‘configure’ on the control panel, or select ‘Configure…’ after right clicking on the tray
icon. This will show the configuration utility:
Page 14 of 49
Matrikon OPC Server for Allen Bradley
3.4 DEFINE AN ALLEN-BRADLEY PLC
Click ‘New’ on the ‘Edit’ menu to define a new PLC.
When defining an Allen-Bradley PLC, the following panel will appear:
The following table describes the settings found in this panel:
Setting Description
PLC Type
IP Address
Routing Select the routing type used by the Ethernet PLC.
Card Select the KT card to which the PLC is connected.
Page 15 of 49
Select the Allen-Bradley PLC type. If your specific PLC type does
not appear, select the closest matc h.
Enter the Hostname (found in the ‘hosts’ file or using a DNS server)
or the TCP/IP Address.
Additional types of connections can be used with this server by
specifying a card number that has been mapped in RS -LINX to a
‘virtual’ KT card. This procedure is described below.
Matrikon OPC Server for Allen Bradley
Setting Description
PLC Station Enter the PLC station address in octal.
Reply Timeout
Retries
Delay
After clicking OK, the new PLC definition will appear in the main screen.
If you wish to communicate with your PLC other than via an actual KT card or Ethernet, you
must establish a port mapping in RS -LINX. To perform this mapping, follow these steps:
1. After defining and configuring your communications driver in RS -LINX, select ‘Configure
Client Applications’ from the ‘Communications’ menu.
2. On the tab labelled ‘INTERCHANGE Port Mapping’, select an unused card number and
choose a driver to map to that card. You should try to use the higher numbers first, since
lower numbers may represent actual KT cards in your system.
3. Provide the newly mapped card number in the ‘Card’ field when defining your PLC in the
ProcessX Server Configuration Utility.
Enter the maximum time, in milliseconds, that the server should
wait for a response from the PLC.
Enter the maximum count of additional attempts the server should
make after a message has timed out.
Enter the time, in seconds, that the server should wait after
communication has failed before attempting communication again.
3.5 ALIAS CONFIGURATION
Matrikon OPC Servers provide the ability to create user-defined aliases that can be us ed in place
of regular OPC items. This is particularly useful when the item path for a given server is very
complex or difficult to remember (i.e. "DEV0.98.76.5.4321=AI.CV"). Servers can also be
configured so that client applications have access to configured aliases only, rather than every
available item.
Select "Alias Configuration" in the tree view, choose Insert Alias Group from the Edit menu, and
enter a name for the group. It is usually better to create aliases in these groups rather than
directly und er the root. Select the newly created group and choose "Insert New Alias" from the
Edit menu .
Page 16 of 49
Matrikon OPC Server for Allen Bradley
In the "Insert New Alias" dialog box, enter a name for the alias and the item path (item ID) for
the OPC item that it references. Click the ellipsis button to browse for available item ID's on the
server. Click Save to save the alias, or click "Save & Create New" to configure another one.
Select the “Default to new” checkbox to make the “Save & Create New” button the default
control when you press Enter, rather t han Save. Double-click an existing alias or press Enter
while it is selected to change its settings.
Additional options available when creating an alias are as follows. The Data Type drop-down
box allows the user to specify a "canonical" data type for the alias. The OPC item value is
coerced to this data type prior to being sent to the client. The Read-only checkbox prevents client
applications from writing to this item. The Update Rate and "Poll when inactive" fields work
together to ensure that data for the item is always received at a particular rate even if it is not
being read by the client.
Certain standard scaling formulas may also be applied to the alias. Click the button marked
"Scaling >>" to display the scaling portion of the dialog box. Click t he tab corresponding to the
desired type of scaling and fill in the parameters as needed. Click "<< No Scaling" to hide the
scaling portion. When the scaling portion is not visible, no scaling is applied to the alias.
The four available types of scaling are Linear, Square Root, Gain/Offset, and Expression. For
each type of scaling, a different algorithm is applied to the incoming value before it is passed on
to the client. A reverse algorithm is applied to any values written to the alias before they are
passed on to the OPC item.
Page 17 of 49
Matrikon OPC Server for Allen Bradley
Low
Offset
x
Gain+⋅
Offset
x
−
Scaling Algorithm Reverse Algorithm
Linear
Square Root
Gain/Offset
()
−
−
Rawx+
Low
Rawx+
Low
ScaledScaled
−
RawRaw
−
ScaledScaled
−
RawRaw
−
LowHigh
Scaled
LowHigh
LowHigh
Scaled
LowHigh
()
Low
()
Low
Scaledx+
−
Scaledx+
−
Low
2
Low
()
RawRaw
−
ScaledScaled
−
−
−
LowHigh
LowHigh
RawRaw
LowHigh
ScaledScaled
LowHigh
Raw
2
Low
Raw
Gain
Expression i.e. “SQRT(INPUT) + 5” i.e. “(OUTPUT – 5) * (OUTPUT – 5)”
Both Linear and Square Root scaling use the same parameter. Enter the high and low range for
the expected raw values and their corresponding high and low scaled values. Optionally, select
the corresponding checkboxes to "clamp" the value to its high or low limit to prevent it from
going out of range. Gain/Offset is a special type of linear scaling where only a scaling factor and
offset need to be specified (no limits are assumed). Incoming values must be numeric for these
scaling types to work.
Expression scaling provides the ability to enter simple text equations to be applied to incoming
and outgoing values. Enter the equation to be applied to incoming values in the Input field and
enter the equation to be applied to outgoing values in the Output field. Click one of the ellipsis
buttons to bring up the expression wizard to assist with the creation of a formula. See the Annex
for further information about expression syntax.
Select an alias group in the t ree view to display the aliases configured in that group. The name,
item path, data type, access rights, and update rate for each alias are listed in the right-hand side
of the window.
The alias database can be exported to and imported from comma-delimited text files (CSV).
Choose Export Aliases from the File menu and choose a file location to export the current
configuration. Choose Import Aliases from the File menu and choose the desired file to import
aliases into the current configuration. See the Annex for a description of the alias CSV file
format.
3.6 SAVE THE CONFIGURATION
Once the server and alias configuration is complete, be sure to save the settings to disk. Choose
Save from the File menu and enter a file name and location. Choose New to clear the
configuration. Choose Load and select a file in order to restore the settings contained in that file.
See the section on the Options dialog for a description of how to set the server to load a
configuration file automatically at start-up.
Page 18 of 49
Matrikon OPC Server for Allen Bradley
Note
3.7 DCOM CONFIGURATION
Choose DCOM Configuration from the Tools menu to edit DCOM settings in order to allow
clients on remote computers to connect to the server. DCOMCNFG is a standard Microsoft
utility and can be started from the command -line as well.
DCOM security settings are stored in the registry and loaded by COM when a server
starts up. Therefore, the OPC server must be shut down and restarted for DCOM
configuration changes to take effect. See the later section on Distributed COM for
further information on this subjec t.
3.8 STATISTICS
Select an object in the tree view under “Server Configuration”. If the statistics panel is not
already showing then choose Statistics from the View menu. The statistics panel appears just
below the object tree view. It displays any communicat ion statistics that are supported for the
selected object. Different objects supply different statistics as appropriate. The possible values
are as follows.
Statistic Description
Sent The number of messages (requests) sent to the device.
Received The number of messages (responses) received from the
device.
Timed Out The number of timeout periods that have elapsed waiting for a
response.
Retried The number of messages re-sent to the device.
Failed The number of failed transactions (due to timeouts or
communication errors).
Overrun The number of times that the program failed to get a response
from the device before it needed to send out the next request.
Statistics can be useful for troubleshooting communication problems. If the server stops
supplying data for items under a particular device then check the statistics for that device to see
if any problems are occurring (such as Time Outs, Overruns, or Failures). Many device
configurations support tuning parameters for communication such as time out inte rvals and
maximum number of retries. Changing some of these settings may help to overcome
communication problems.
Click the “Reset Statistics” button at the bottom of the Statistics panel or choose “Reset
Statistics” from the View menu in order to reset the counters for the selected object to zero. The
displayed statistics are updated roughly once every second.
3.9 OPTIONS
Choose Options from the View menu to change the advanced options for the server. These
values are stored in the registry and loaded by the server at start-up. Therefore, the server must
be shut down and restarted in order for changes in this dialog to take effect. Click the Defaults
button to restore the original settings for the server.
Page 19 of 49
Matrikon OPC Server for Allen Bradley
3.9.1 GENERAL
The General tab contains settings related to the configuration of a server. Select the “Load
configuration on start-up” checkbox and enter a filename in the edit box below it to have the
server automatically use the specified configuration file when it is launched. Click the ellipsis
button next to the edit box to browse for the file. Select the “Save current configuration on
shutdown” to have the server automatically save any changes to the configuration when it shuts
down (not usually needed).
Select the “Launch configuration program on start-up” checkbox to have the server automatically
spawn the configuration utility when it starts up as a local executable. Otherwise, the
configuration utility will have to be started manually from the Start menu. The configuration
utility must always be started manually when the server runs as an NT service.
Select the “Restrict items to pre-configured aliases only” checkbox to prevent client applications
from connecting to anything except for configured aliases in the server. When this box is
selected, client applications will not be able to access any “raw” OPC items. This may be useful
for security reasons.
3.9.2 LOGGING
All Matrikon OPC Servers produce log files that record errors and debugging information. If
difficulties occur with a server then the log files can be e xtremely valuable for troubleshooting.
By default, the servers log very little information. The Logging tab of the Options dialog
contains settings to control server logging.
Page 20 of 49
Matrikon OPC Server for Allen Bradley
Note
General Activity Logging records information about the internal workings of the OPC server. It
is useful for troubleshooting problems with configuration and device communication. Select the
“Enable activity logging” checkbox and choose the desired log level from the drop-down box.
Available log levels include Medium, Low, and None.
The higher the log level, the more information is recorded. However, server
performance may decrease at higher log levels. The recommended operating level is
Low.
Enter a filename in the edit box or click the ellipsis button to browse for a file location. The
default log file is “PSTCFGMatrikon.OPC.Device.#.LOG” in the MATRIKON\COMMON
directory under the Program Files folder. Select the “Overwrite old log information” checkbox to
overwrite this file each time the server starts up. Otherwise, it will rename the old file to start
with an underscore.
Select “Display activity log on screen” to show the log messages in a console window as they
occur. This may have a negative effect on server performance especially at higher log levels.
Interface Activity Logging records information about the client/server OPC communication. It is
useful for troubleshooting compliance issues. Select the “Enable logging” checkbox and choose
the desired log level. The server will generate a separate log file for each client named
“PST###.tmp” in the directory where it is installed. Interface Activity Logging is not generally
used.
Select the “Commit all log file writes” checkboxes for either log file to ensure that its buffer is
flushed each time a message is logged. This can be use ful when a fatal error that causes the
server program to crash is occurring regularly. However, it is not recommended for normal
operation as it greatly decreases the performance of the server.
Page 21 of 49
Matrikon OPC Server for Allen Bradley
More log levels are available for both types of logging which record more detailed information.
Contact Matrikon Technical Support for further instructions on how to enable the higher log
levels.
The Matrikon OPC Delegator is a useful tool for logging OPC client/server communication. It
enhances the server Interface Activity Logging by loading up in the client application and
recording the client -side transactions. It can also be used with other OPC servers. Contact the
Matrikon Sales department for further information about this product.
3.9.3 A DVANCED
The Advanced tab contains some special timing parameters sometimes used to improve the
performance of certain OPC servers. It is not usually a good idea to alter these settings unless
asked to do so by support staff. They have very little effect on device communication.
The first edit box specifies the minimum update rate that the server will allow for any OPC
group. This prevents client applications from requesting update rates that are impossible to
achieve or that cause heavy CPU loads. The default value is 100ms.
The second and third edit boxes work in conjunction to break up the scanning of items in large
groups with slow update rates in order to reduce CPU load. For every “OPC Items per Group
Scan (maximum)” number of items scanned, the scanning thread will pause for “OPC Group
Scan Pause (maximum)” number of milliseconds. The default values are zero, indicating that no
pause occurs in the scan loop.
3.10 SHUTTING DOWN
Click “shutdown” from the control panel, pop-up menu, or Shutdown Server from the File menu
to shut down the server if it runs as a local executable. A warning will appear if clients are
currently attached to the server. The shutdown command is not available for the server if it runs
as an NT service. Services can only be shut down from the Service Control Manager applet (in
the Windows NT Control Panel).
Page 22 of 49
Matrikon OPC Server for Allen Bradley
4. MATRIKON OPC EXPLORER
Matrikon OPC Explorer is a general-purpose OPC client. It is included with all Matrikon OPC
Servers to ensure that users always have a reliable means to test the capabilities of the software.
Choose Matrikon OPC Explorer from the Start menu, directly under the Programs folder, to start
the program.
4.1 VIEW AVAILABLE OPC SERVERS
Matrikon OPC Explorer is an OPC client application. It connects to OPC server applications and
displays real-time values as they are received. When OPC Explorer starts up, it searches the
registry on the local computer and generates a list of program ID’s for available OPC servers. It
displays this list in a drop-down box at the top left-hand corner of
the window.
Every OPC server has a unique program ID. This is a humanreadable text string that is converted to a globally unique
identification number which COM then uses to identify the server.
Each server may have a version-specific program ID (with a
number appended to the end of the string), a version-independent
program ID (no number), or both. All Matrikon OPC Servers have
both types, but only the version-independent program ID shows up in the list.
If an error occurs during the communication session between OPC Explorer and an OPC server,
a message box appears explaining this. Click the Details button to get a more descriptive
explanation of the error. Deselect the “Disconnect Server” checkbox to ignore the error and
continue without disconnecting from the server. Choose Error Log from the View menu to
display a log of past errors. Right-click on the window and choose “Clear Log” to clear the log.
4.2 CONNECT TO AN OPC SERVER
Select a program ID in the drop-down box. Choose Connect from the Server menu and then
choose either Local or Remote. The Local option will connect to a server running on the same
machine as the client while the Remote option will attempt to connect to an OPC server running
on another machine.
In the latter case, use the “Connect Remotely” dialog bo x to specify the remote machine. Remote
machines may be specified by UNC (i.e. “\\SYSDEV1”), DNS (i.e. “www.matrikon.com”), or IP
address (i.e. “198.162.0.1”). See the section on DCOM configuration for instructions on how to
configure OPC servers to receive remote connections.
COM will attempt to launch the OPC server if it is not currently running when the first client
attempts to connect to it. If the server runs as a local executable then COM will run it. If the
server runs as an NT service then COM will start it up.
Similarly, when the last client application disconnects from an OPC server, the server will shut
down. Matrikon OPC Servers wait for one minute before shutting down to avoid unnecessary
processing when client applications connect and disconne ct frequently.
Page 23 of 49
Matrikon OPC Server for Allen Bradley
4.3 ADD OPC GROUPS
Choose “Add Group” from the Server menu to create a new OPC group on the connected OPC
server. Enter a name for the group. If the edit box is left blank then the OPC server will assign a
unique name for the group. Change the other settings as desired and click OK to create the
group. Choose Properties from the Group menu to change these settings after the group is
created. See the section on reading real-time values for a further explanation of what these
settings do.
4.4 ADD OPC ITEMS
An OPC groups serves as a logical collection of data items. Choose “Add Items” from the Group
menu to display Tag Studio – a utility for creating, validating, and adding OPC items.
To create an OPC item, enter an item ID in the edit box and click the right-pointing arrow. The
item appears in the list box on the right-hand side of the window. Double-click on an item to edit
its settings (the appearance of the arrow changes). Choose “Update and Return to Explorer” to
add the created items to the OPC group and return to Matrikon OPC Explorer.
In addition to an item ID, users can also specify an access path, a requested data type, and an
active state. The following sections describe these settings in further detail.
Page 24 of 49
Matrikon OPC Server for Allen Bradley
4.4.1 ITEM ID
All OPC items must be ident ified by an item ID. This identifier is a server-specific string of
characters that uniquely identifies a source of data to an OPC server. More than one OPC item
may refer to the same item ID at the same time. Enter the item ID in the Item ID edit box. Click
the button next to this edit box to bring up the Tag Generator – a utility for creating large
numbers of tags that follow a known pattern.
Some examples of item ID’s might be “PLC1.4:0001”, “North:FIC101/CV”,
“\\ARCSVR:DBTAG001”, etc. Check Appendix A for information about the specific syntax of
the item ID’s.
4.4.2 A CCESS PATH
Some OPC servers may allow clients to specify an access path in addition to an item ID. An
access path may suggest to the server how it should get the data for a particular item. For
example, it might specify the method of communication to use for accessing the data (i.e. radio,
satellite, or modem).
Servers are under no obligation to use the access path, although they will return errors if the
access path is invalid. Click the ellipsis button next to the Access Path edit box to browse the
access paths that are available for the selected item ID (if the server supports this feature).
Matrikon OPC Servers do not use access paths. Leave the access path blank if it is not used.
4.4.3 BROWSE THE SERVER ADDRESS SPACE
Some OPC server support browsing as a means of isolating users from the exact syntax of its
item ID’s. Browsing allows users of OPC clients to view the “contents” of a server to find a
particular data item and resolve it into a valid ite m ID. It is not primarily intended for autogenerating OPC items. If the OPC server supports browsing then a tree view and list view appear
in tag studio.
The tree view displays “branches” in a hierarchical address space, while the list view displays the
“leaves” that are available under the selected “branch”. Each “leaf” either represents an actual
item or else it may provide a “hint” indicative of available items. For example, if there are
thousands of numbered items under a “branch”, the server might simply provide a single “leaf”
representing the range of numeric addresses available.
While browsing, the user may apply a number of filter criteria to search for a particular type of
item. The syntax of the filter is vendor-specific, but the algorithm recommended by the OPC
Foundation follows the same pattern as the Visual Basic “Like” function with respect to item
names. For example, “A*” filters out any item names that do not begin with the letter “A”. This
filter may also apply to branches.
Items may also be filtered by data type and access rights. Choosing a type other than
Empty/Default causes the browser to display only those items with the same canonical data type
as that selected. Access rights are non-exclusive. For example, selecting write access and
deselecting read access will display only items that can be written to, regardless of their read
accessibility. Selecting both should filter nothing out.
Double-click on a “leaf” and Tag Studio will place the fully qualified item ID for that item in the
edit box. If the item ID is a “hint” then change it to a “real” item, following the pattern provided
by the hint. Alternatively, right-click on the item and choose “Add to Tag List” to add the item
using the previous item’s settings. “Add All Items to Tag List” adds every item under the branch.
Page 25 of 49
Matrikon OPC Server for Allen Bradley
4.4.4 REQUESTED DATA TYPE
All OPC items have a native (“canonical”) data type. That is to say, there is a default format to
the data that the server supplies for an item. When creating OPC items, client applications can
specify a requested data type for each item. The OPC server will attempt to covert any data from
the item to this format if possible. If the requested and canonical data types are incompatible,
then the server will fail to validate the item when it is added.
4.4.5 ACTIVE STATE
Like groups, OPC items may be active or inactive. See the section on reading real-time values
for more information about this setting.
4.4.6 V ALIDATE THE OPC ITEMS
Choose “Validate Tags” from the File menu to check the created items for validity. Tag Studio
will query the OPC server to determine whether the items are correct. A small red X next to an
item indicates that it did not validate properly. A green checkmark indicates that the item is
valid. A blue question mark indicates that the item has not been validated yet.
4.5 READ REAL-TIME VALUES
Once items are added to an OPC group, Matrikon OPC Explorer continually updates the display
for that group with real-time data. The data values appear in the list view on the right-hand side
of the window. Each item is listed along with its item ID, access path, active state, value, quality,
and timestamp.
When there are a number of groups created on an OPC server, use the group list view to navigate
between different groups and to view the items in those groups. Use the drop-down box to
navigate between the groups on different server connections.
4.5.1 UPDATE RATE
The OPC server tries to keep Explorer informed with values for an OPC group at the requested
update rate for that group. If the requested update rate is too fast for the server to handle then it
will return a revised update rate that it will use instead. Internally, the server tries to keep the
data items at least as “fresh” as indicated by the update rate. However, the server will send
values to the client no faster than the update rate in order to avoid overwhelming it.
4.5.2 A CTIVE STATE
OPC servers only update values for active items in active groups. When an individual item is set
inactive, the server stops sending updates for the item. When a group is set inactive, the server
stops sending values for any items in that group. Client applications (such as HMI applications)
can help to reduce the processing load on an OPC server by deactivating groups and items that
are not currently needed.
Choose Activate/Deactivate from the Group or Item menus at any time to change the active state
of an OPC group or individual OPC items.
4.5.3 DATA DISPLAY
Page 26 of 49
Matrikon OPC Server for Allen Bradley
Although the OPC server may supply data changes to Matrikon OPC Explorer at the update rate
of the group, a global setting specif ies the refresh rate for the display in OPC Explorer. Choose
“Update Speed” from the View menu and select one of the four available options: High, Normal,
Low, or Paused. If the update speed is “Paused” then the user will have to refresh the display
manually (F5).
In the item display, the Value field shows the real-time value for the item. The Quality field
indicates whether or not this value is valid, and why (see the annex for a list of quality values).
The Timestamp field indicates how “fresh” the value is (the time that it was received from the
data source).
The information panel at the bottom of the window displays status information about the selected
server and group. Choose “Info Panel” from the view panel to hide and show this panel.
4.5.4 I/O METHOD
Matrikon OPC Explorer allows the user to specify the method of communication to use with a
group. Synchronous I/O is generally reserved for testing and special operations. Explorer also
allows the user to choose between the 1.0a or 2.0 style of asynchronous I /O. The normal
recommended setting is “Asynchronous I/O”, which attempts to use 2.0 first, and 1.0a if that
fails.
4.5.5 TIME BIAS
Some OPC client applications may use the OPC server time bias setting as a storage area for
time zone information. This information might be used to display server timestamps in a time
zone other than UTC or the local time zone. Matrikon OPC Explorer does not use this
information, but allows the user to write the information to the server as a test.
Page 27 of 49
Matrikon OPC Server for Allen Bradley
Note
4.5.6 DEAD-BAND
Some OPC servers support dead-band for updates from analog data sources. The dead-band
value is a percentage of full-scale deflection and so the high and low limits for the item must be
known ahead of time. Dead-band only affects updates between an OPC client and a server. It has
no effect on communication between an OPC server and its respective device(s).
4.5.7 A DVISE LOG
Choose Advise Log from the View menu to display a log of ongoing I/O transactions. Rightclick on the window and choose “Clear Log” to clear the log. Use the options to keep the
window above all other windows in the desktop and to keep the most recent entry visible at all
times.
4.6 WRITE CONTROL VALUES
Matrikon OPC Explorer allows the user to write control values to items in an OPC group. Select
the desired items in the list view and choose “Write Values” from the Item menu. In the dialog
box, enter the control values to be written in the “New Value” column. Specify the data types of
for the control values in the “Data Type” column. Use the checkboxes to avoid writing to
individual items. When ready, click the OK or Apply button to perform the write.
Control values may be written to items regardless of whether they or the group that they
are in are active or inactive. If the items and the group containing the items are both
active then the written control value should appear when the next update occurs. Also,
some OPC servers may contain read-only item. Values written to these items will be
discarded.
Matrikon OPC Explorer also contains a Signal Generator to write ramping control values to OPC
items. Choose the “Signal Generator” tab in the “Write Values” dialog box. Enter the high and
low limits and the increment factor for the ramp wave. Finally, enter the time period in
milliseconds and press Start. Press Stop or close the dialog box to finish writing the ramp wave.
Page 28 of 49
Matrikon OPC Server for Allen Bradley
4.7 OPTIONS
Choose Options from the View menu to display the Options dialog box. Users can change certain
aspects of OPC Explorer’s behavior with these options. Click the Defaults button to restore the
original settings
4.7.1 GENERAL
Use the Errors checkboxes to specify whether the error dialog box should be displayed when
COM or OPC errors occur, or when errors occur for individual items. The sanity check option
ensures that the OPC server keeps track of lists of groups and items properly. At present, session
files may only be stored as text files, so the binary format is unavailable.
4.7.2 DATA TRANSFER
Use the Data Source radio button to specify the data source that OPC Explorer should use when
requesting values from t he OPC Server. The data source should be CACHE for normal
operation. Only use DEVICE for special testing operations. DEVICE reads yield a serious
performance penalty and can prevent OPC servers from functioning properly if they are used too
often.
For 1.0a asynchronous I/O, select the “Request time stamps with notification” to receive
timestamps from the OPC server. Otherwise, OPC Explorer will assume the current time when it
receives new values.
Select “Request asynchronous refreshes” to use asynchronous refresh transactions when updating
the display. When grayed, OPC Explorer will use synchronous reads for 2.0 I/O or asynchronous
reads from CACHE for 1.0a I/O when updating the display. When unselected, OPC Explorer
simply receives values passively from the server.
Select “Respect access rights when writing values” to avoid including read-only items in the
Write Values dialog box. Otherwise, OPC Explorer will allow users to write values to any items.
4.7.3 DATA DISPLAY
Select “Display value qualities as text” to show a text description of the item quality in the
Quality field. Otherwise, OPC Explorer will display a numeric value. You might want to do the
latter if the quality value contains vendor-specific information in the upper byte. Deselect
“Display timestamps using local time zone” to display the timestamps in UTC rather than local
time.
4.7.4 COM
Use these checkboxes to specify the class context flags to be used when OPC Explorer attempts
to connect to an OPC server. Do not deselect any of these flags unless abso lutely necessary.
4.8 SAVE THE SESSION
Choose Save from the File menu and enter a file location to save the current session
configuration, including all server connections, groups, and items. These session files may be
reloaded by choosing Open from the File menu and reselecting the saved file. Choose “New
Session” from the File menu to clear the session.
Page 29 of 49
Matrikon OPC Server for Allen Bradley
5. MATRIKON OPC AUTOMATION COMPONENT
The Matrikon OPC Automation Component enables developers to access OPC data from client
applications developed using Automation tools such as Visual Basic, VBA, and VB Script.
Developers should be proficient in Visual Basic before trying to use this component.
To use the component through early binding, add the “Matrikon OPC Automation 2.0” type
library to the list of referenc es in the project. The objects supplied by the component appear
under “OPCAutomation” in the Object Browser. To create an OPCServer object through late
binding, call the CreateObject function with the program ID “Matrikon.OPC.Automation”.
Please refer to t he OPC Data Access 2.0 Automation Interface Standard for more information
about the automation objects.
Page 30 of 49
Matrikon OPC Server for Allen Bradley
6. TROUBLESHOOTING
The following sections address some of the most common problems encountered while using this
OPC server. Please check the following list before contacting Matrikon Technical Support.
• Problem: The OPC server stops updating the client with item values after two hours.
Solution: The demonstration period for the server has expired. Check that the correct HASP
hardware key is securely fastene d to the parallel port. If it is, run the HINSTALL program
that is located in the MATRIKON\COMMON directory under Program files with the “/I”
parameter.
• Problem: There is more than one HASP hardware key from Matrikon attached to the
parallel port, but only the first one is recognized by the software.
Solution: HASP keys from the same vendor can not be chained together. Send an email to
technical support (please refer to the beginning of this manual) to obtain a HASP key
containing the combined codes.
• Problem: The OPC client is unable to create or read items under a configured object
(device).
Solution: Check the object configuration. Ensure that the Enabled checkbox is selected.
• Problem: The OPC server does not retain its previous settings and needs to be
reconfigured each time it starts up.
Solution: In the configuration utility, choose Options from the View menu. Under the
General tab, ensure that the "Load configuration on startup" checkbox is selected and that the
correct file name appears in the edit box. See the section on configuration for more
information.
• Problem: The OPC server does not show up in a list of locally available program ID's in
my OPC client application.
Solution: Make certain that the OPC server is installed by a user with local adminis trative
rights so that it can make the necessary entries in the registry. Also, especially for older OPC
clients that do not use the OPC Server Browser, make certain that the client is running as a
user that has read access to the registry.
• Problem: The OPC server does not show up in a list of remotely available program ID's
in my OPC client application.
Solution: Follow the steps found in the section on DCOM configuration to copy the program
ID from the server machine to the client machine.
• Problem: "Access Denied" error or time out trying to connect to a remote OPC server
via DCOM.
Solution: Ensure that the access and launch permissions for the OPC server are set correctly
on the server machine. See the section on DCOM for more information.
• Problem: The splash screen and configuration utility do not show up when a remotely
connecting client or a client that runs as an NT service (such as Aspentech’s CIMIO
OPC Manager) tries to launch the OPC server.
Page 31 of 49
Matrikon OPC Server for Allen Bradley
Solution: Either set the identity for the OPC server to the interactive user, or else consider
run the server as an NT service. See the section on DCOM for more information.
• Problem: After installing an older OPC server, DA 2.0 asynchronous I/O no longer
works.
Solution: The old installation program installed and registered its own (older) version of the
OPC proxy/stub DLL. Reinstall the standard OPC proxy/stub DLL's using an up -to-date
installation program or re-register them using the REGSVR32 command -line utility. See the
section on server installation for more information.
• Problem: How can I get OPC data into Microsoft Excel, Microsoft Word, or another
application with support for Visual Basic, VBA, or VB Script?
Solution: Use the Matrikon OPC Automation Component to create a Visual Basic script that
connects to a server, creates groups and items, and receives data change updates. See the
installed files for examples of how to do this in Excel, Visual Basic, or an HTML document.
• Problem: How can I access individual bits from an integer item?
Solution: Create an alias that references the desired item and configure scaling for the alias to
use expression evaluation. Edit the input expression to use binary math to access a particular
bit (i.e. “IF((INPUT AND 4)=4, 1, 0)” to access bit 2). This method allows read access only.
Contact: support@matrikon.com
Page 32 of 49
Matrikon OPC Server for Allen Bradley
Appendix A - ITEM ID SYNTAX
6.1 ADD ITEMS
The last step before reading and writing data is to add items to your group. This is done by
providing an Access Path and Item ID pair. The server uses this information to find the data you
are interested in.
If your client supports server browsing, you may not need to provide an Item ID, since you can
point and click to specify an Access Path and Item ID from the server browser.
The ProcessX server for Allen-Bradley PLCs does not use Access Paths. If your client asks you
to provide an Access Path, supply a blank.
Use the following format for the ItemID:
PLCNAME@[AB STYLE ADDRESS]
ItemID Description
PLCNAME Enter the name you assigned to this PLC during configuration.
AB STYLE
ADDRESS
The following are examples of valid Item IDs:
Refer to Appendix A for a list of supported PLC -5 structured data types.
Enter the address you wish to access, using the standard A-B format.
Consult the appropriate Addressing Reference Manual for your PLC.
Plc1@N8:1
Plc1@N8:1/12
MyPLC@S:2/4
PLC-X@T4:1.EN
PLC-X@ST:1
6.2 READ AND WRITE DATA
Your client may now read and write data to and from Allen-Bradley PLC registers. Some clients
will perform this activity automatically for you. Others may require that you specifically enable
data retrieval. Consult your client documentation for more detail.
Page 33 of 49
Matrikon OPC Server for Allen Bradley
Appendix B - PERFORMANCE
Currently, there are no performance specs for this OPC server
Page 34 of 49
Matrikon OPC Server for Allen Bradley
Note
Note
Appendix C - DISTRIBUTED COM (DCOM)
DCOM is an object protocol that enables COM components (such as OPC clients and servers) to
communicate directly with each other across a network. A certain amount of configuration is
required on the system where the OPC server is installed to allow remote clients to connect to it
over the network.
The following steps are suggestions only. Ask your Windows NT System
Administrator for more information about the settings that you should use, especially
between different domains.
C.1 DCOM CONFIGURATION UTILITY
Start the DCOM configuration utility either from the server configuration utility or from the
command-line (DCOMCNFG). Answer "Yes" to any message boxes that appear, allowing the
utility to assign application ID entries to t hose servers that don't already have them.
The main window for DCOMCNFG allows the user to either configure default settings for all
COM servers or else to configure settings for a specific server chosen from the list. The former
will affect all servers configured to use the default settings. The latter will affect the selected
server only.
DCOM settings are stored in the registry and loaded by COM (and OPC) servers at
start-up. Therefore, server processes must be shut down and restarted in order for the se
changes to take effect.
C.2 DEFAULT PROPERTIES
The Default Properties tab contains settings that affect all DCOM communication on the
machine. First of all, ensure that the "Enable Distributed COM on this computer" is selected in
so that the machine is available to others via DCOM. Select the "Enable COM Internet Services
on this computer" to allow DCOM access to the machine from the Internet (check with your
administrator). In general, the other settings do not need to be changed.
The Authentication Level specifies when COM should authenticate the identity of calling clients
(each call, each packet, etc). Normally, it should be set to "Connect", indicating that COM
should authenticate clients when they first connect to a server. If it is set to "None" then COM
performs no authentication and ignores any access permission settings.
The Impersonation Level specifies whether servers can ascertain the identity of calling clients
and whether they can then perform operations on the client's behalf (as if the server is the client).
Normally, it should be set to "Identify", allowing the server to identify the calling client to see if
it is allowed access to a certain resource but not to actually access any of these resources as the
client.
Select the "Provide additional security for reference tracking" to make even the reference
counting on COM objects secure. This setting is not generally required.
Page 35 of 49
Matrikon OPC Server for Allen Bradley
C.3 SECURITY PERMISSIONS
The most important DCOM settings for an OPC server are the security permissions. Change the
default settings (not recommended) and make sure that the OPC server will use these or else
change the specific settings for the server (recommended). Either way, make certain that the
access and launch permissions for the server are correct.
To set the security permissions for an OPC Server first open the DCOM configuration utility.
After it is open click on the OPC server and then click Properties.
Click on the Security tab to set the Security for the Server.
Page 36 of 49
Matrikon OPC Server for Allen Bradley
The Access Permissions contain an Access Control List of principals that are allowed to interact
with objects supplied by a server. The Launch Permissions contain an Access Control List of
principals that are allowed to start up a server process or service. Include the names of users or
user groups from trusted domains that you wish to be able to use the OPC server on this
machine. Include the "Everyone" group to allow access to all users on a particular domain.
To set the Access permissions you would click “Use custom access permissions” and then click
edit. A screen similar to the following will appear:
To add users to the list click Add. Another screen similar to the following appears:
To add a user to the list click on that user and then click Add. If the user you wish to add does
not appear then click Show Users. When you are done adding users click OK to close “Add
Users and Groups”. You can then choose to “Allow Access” or “Deny Access” for each user.
Page 37 of 49
Matrikon OPC Server for Allen Bradley
Note
The procedure to set the launch permissions is similar to the above, but instead of choosing
“Allow Access” for a user you would choose “Allow Launch”.
The Configuration Permissions contain an Access Control List of principals that are allowed to
modify the configuration information for a server. In other words, it indicates who is allowed to
alter the registry entries for installed servers as well as who is able to access the registry for the
purposes of installing new servers. It is usually simpler to install and configure servers as a user
with local administrative rights.
To connect to an OPC server from outside of the domain create a local user account on both the
server and the client machine with identical username and password. Then add the local user on
the OPC server to the DCOM permissions. Then use the local account on the clie nt machine to
connect to the OPC server.
C.4 SERVER IDENTITY
The Identity tab for a selected COM (or OPC) server specifies the user account that should be
used when COM starts up the process. The available settings are different for servers that run as
local executables as opposed to those that run as NT services.
It is strongly recommended that OPC server should be installed to run as NT services if
they are going to be accessed by remote clients via DCOM. This ensures that the server
can always be accessed, even if no one is presently logged on to the machine, and only
one server process ever starts up. It also adds a greater degree of security in terms of
who is able to shut down the server process.
Servers that run as local executables have the option of running as the launching user (the calling
client –this is the default), the interactive user (the one currently logged onto the machine), or a
specified user. It is usually best to use the interactive user or a specified user. Otherwise, remote
clients might start up multiple separate server processes that are not accessible to others.
Servers that run as NT services should generally run as the local System account. Alternatively,
the server can be set to run as a specified user, although this is usually done from the Service
Control Manager applet rather than DCOMCNFG. Access and Launch permissions are
particularly important when installing a server to run as an NT service.
C.5 DEFAULT PROTOCOLS
The Default Protocols tab specifies the communication protocols available to DCOM. The order
that protocols appear in the list indicates the priority in which they will be used (the topmost
having the highest priority).
The more protocols that appear in the list, the better the chances of connecting to an OPC server
on an unknown remote machine (such as at an OPC Interoperability Workshop). However, it
may also take longer for DCOM to time out if a server machine is not present since it has to try
each protocol in turn.
For most situations it is best to remove all unus ed protocols from the list and only include those
that are necessary for your network. For example, on a TCP/IP network one would include the
"Connection-oriented TCP/IP" protocol. Contact your IT personnel for more information about
your network.
Page 38 of 49
Matrikon OPC Server for Allen Bradley
Note
Note
Evidence indicates that there are problems with the datagram-oriented protocols that
can cause memory leaks in DCOM. Therefore, it is strongly recommended that these
protocols not be used in the list of default protocols. Datagram-oriented protocols are
not supported under Windows 2000 (although the DCOM configuration utility allows
you to configure them).
C.6 REMOTE PROGRAM ID
Before the OPC Server Browser became available, OPC client applications had to search the
registry to generate a list of available OPC servers. Therefore, some older OPC clients need to
have a program ID in the local registry in order to connect to a particular OPC server.
The simplest solution is to install the OPC server software on the client machine even if it is not
used. Alternatively, us e the following steps to copy a program ID to the client machine.
This method may not work for every OPC client. Please check the client documentation
for more information.
1. On the server machine, run REGEDIT as a user that has access rights to the local registry.
2. Expand the HKEY_CLASSES_ROOT key.
3. Find the program ID(s) for the desired OPC server(s). In the case of Matrikon OPC Servers,
the ID has the form "Matrikon.OPC.Device". If you quickly type the first few letters then
REGEDIT should jump to the location of that key. Some servers may have both a versionspecific as well as a version-independent program ID. In this case both ID's should be copied
to the client machine.
4. For each program ID, select the key and choose "Export Registry File" from the Registry
menu. Enter a file name and choose Save. Be careful not to overwrite other export files that
you are creating.
5. Copy the exported REG files to the client machine.
6. Merge the REG files into the registry of the client machine. This should simply be a matter of
double clicking on the file from the desktop of the client machine. Alternatively, run
REGEDIT on the client machine and choose "Import Registry File" from the Registry menu,
selecting each file in turn. This must be done as a user who has write access to the local
registry.
7. Use REGEDIT to check that the program ID's have in fact been copied.
8. Delete the REG files since they are no longer needed.
Page 39 of 49
Matrikon OPC Server for Allen Bradley
Appendix D - OPC COMPLIANCE
All Matrikon OPC Servers comply fully with the OPC Data Access 2.0 Custom Interface
Standard. They also support some of the optional capabilities, including backward-compatibility
for the old style of asynchronous communication found in the 1.0a specification. The following
provides a technical description of supported features. Optional interfaces appear in square
brackets ([]).
D.1 OPC SERVER OBJECT
Interface Notes
ü
IUnknown
ü
IOPCCommon Locales Supported: English (United States)
ü
IOPCServer
[IOPCServerPublicGroups] Public groups not supported.
ü
[IOPCBrowseServerAddress
Space]
[IPersistFile] (not required)
Hierarchical, no access paths.
ü
IConnectionPointContainer
ü
IConnectionPoint
(IOPCShutdown)
ü
IOPCItemProperties All servers support the six OPC-specific properties. Some
Multiple connections allowed.
may also support other standard or custom properties.
D.2 OPC GROUP OBJECT
Interface Notes
ü
IUnknown
ü
IOPCItemMgt
ü
IOPCGroupStateMgt
[IOPCPublicGroupStateMgt] Public groups not supported.
ü
IOPCSyncIO
ü
IOPCAsyncIO2
ü
IConnectionPointContainer
ü
IConnectionPoint
(IOPCDataCallback)
Multiple connections allowed.
ü
[IOPCAsyncIO] (1.0a) Data streams support simple data types, strings, and one -
dimensional arrays of simple data types and strings.
ü
[IDataObject] (1.0a) Multiple connections allowed for all three formats.
Page 40 of 49
Matrikon OPC Server for Allen Bradley
D.3 SERVER REGISTRATION
In compliance with the OPC and COM specifications, Matrikon OPC Servers make the
following registry entries under HKEY_CLASSES_ROOT when registered on a target system.
These entries are removed when the server is unregistered.
Registry Key Value
Matrikon.OPC.DeviceMatrikon OPC Server for Device
Matrikon.OPC.Device\CLSID {CLSID1}
Matrikon.OPC.Device\CurVer Matrikon.OPC.Device.#
Matrikon.OPC.Device\OPC\Vendor Matrikon Consulting Inc (780) 448-1010
http://www.matrikon.com
Matrikon.OPC.Device.# Matrikon OPC Server for Device
Matrikon.OPC.Device.#\CLSID {CLSID1}
CLSID\{CLSID1} Matrikon OPC Server for Device
CLSID\{CLSID1}\APPID {APPID}
CLSID\{CLSID1}\DefaultConfig (initially empty)
CLSID\{CLSID1}\ProgID Matrikon.OPC.Device.#
CLSID\{CLSID1}\VersionIndependantProgID Matrikon.OPC.Device
CLSID\{CLSID1}\LocalServer32 (path to server executable)
PSTCFGMatrikon.OPC.Device.# Matrikon OPC Server for Device
PSTCFGMatrikon.OPC.Device.#\CLSID {CLSID2}
PSTCFGMatrikon.OPC.Device.#\ShellPath (path to PSTCFG.EXE)
PSTCFGMatrikon.OPC.Device.#\HelpFile (path to .HLP file, if it exists)
CLSID\{CLSID2} Matrikon OPC Server for Device
CLSID\{CLSID2}\APPID {APPID}
CLSID\{CLSID2}\ProgID Matrikon.OPC.Device.#
CLSID\{CLSID2}\LocalServer32 (path to server executable)
APPID\{APPID} Matrikon OPC Server for Device
Matrikon OPC Servers also register themselves with the Microsoft Standard Component
Category Manager. After ensuring that the OPC 1.0 and 2.0 categories e xist, the servers register
in both of these categories. The OPC Server Browser searches for servers that implement these
categories.
Page 41 of 49
Matrikon OPC Server for Allen Bradley
Appendix E - OPC QUALITY FLAGS
The OPC quality flags represent the quality of an item’s data value. The lower byte is a bit-field
used to convey standard quality values. The high byte is available for vendor-specific use
complementary to the standard values. The following table lists the range of valid quality values
(ignoring the vendor-specific bits). Please refer to the OPC DA 2.0 specification for further
information.
There is some server-specific
problem with the configuration.
The input should to be logically
connected to something but is
not.
A device failure has been
detected.
A sensor failure has been
detected. The value may be
“pegged” as indicated by the
limit field.
Communications have failed.
The item value represents the
last known.
Communications have failed.
There is no last known value.
The block is off-scan or
otherwise locked, or the group
or item is inactive.
01000000 64 Uncertain, Non-specific
The value is uncertain (no
specific reason).
Whatever was writing this value
01000100 68 Uncertain, Las t Usable Value
has stopped doing so. The value
is “stale”.
01010000
01010001
01010010
80
81
82
Uncertain, Sensor Not
Accurate
+ Low Limit
+ High Limit
The value may be “pegged” at
one of its limits or it is detected
as being out of calibration.
Binary Decimal Definition Description
Page 42 of 49
Matrikon OPC Server for Allen Bradley
01010100
01010101
01010110
01010111
01011000 88 Uncertain, Sub-normal
11000000 192 Good, Non-specific
11011000 216 Good, Local Override
84
85
86
87
Uncertain, EU Exceeded
+ Low Limit
+ High Limit
+ Constant
The returned value is outside of
the engineering unit limits
defined for this parameter.
The value is derived from
multiple sources, an insufficient
number of them are GOOD.
The value is good (no specific
reason).
The value has been overrid den
and forced to a manually entered
setting.
Page 43 of 49
Matrikon OPC Server for Allen Bradley
Appendix F - VARIANT DATA TYPES
The following is a list of the constant numeric values for VARIANT data types.
Value Data Type Description
0 VT_EMPTY Default/Empty (Nothing)
2 VT_I2 2 byte signed integer
3 VT_I4 4 byte signed integer
4 VT_R4 4 byte real
5 VT_R8 8 byte real
6 VT_CY currency
7 VT_DATE date
8 VT_BSTR text
10 VT_ERROR error code
11 VT_BOOL Boolean (TRUE = -1, FALSE = 0)
17 VT_I1 1 byte signed character
18 VT_UI1 1 byte unsigned character
19 VT_UI2 2 byte unsigned integer
20 VT_UI4 4 byte unsigned integer
+8192 VT_ARRAY Array of values (i.e. 8200 = array of text values)
Page 44 of 49
Matrikon OPC Server for Allen Bradley
Appendix G - OPC I/O METHODS
The following sections contain a more detailed description between the different I/O methods
available from OPC servers. Please refer to the OPC DA 2.0 specification for further
information.
G.1 SYNCHRONOUS VERSUS ASYNCHRONOUS I/O
All OPC compliant servers must provide two distinct methods for real-time data access. OPC
clients can choose between synchronous and asynchronous I/O for their operations. All OPC
servers must support both synchronous I/O and at least one form of asynchronous I/O (2.0 or
1.0a) to be compliant. These terms only refer to communication between the client and the
server, and not between the server and its data source.
Synchronous operations are blocking calls made to an OPC server to either read or write a group
of OPC items. When an OPC client makes a synchronous call, it passes control to the OPC
server and does not continue processing until the call is complete. Synchronous operations are
only ever used for testing, special operations (generally involving DEVICE reads), or in
extremely simple OPC clients.
Asynchronous operations are non-blocking. OPC Client applications establish "call-back"
objects to which the OPC server can interface to deliver item updates. Once this "call-back" is
established, the OPC server continually informs the client of changes in value to OPC items as
they occur, being careful not to exceed the OPC group update rate a nd potentially overwhelm the
client.
OPC clients may also create asynchronous "transactions" to perform non-passive operations.
These transactions include reading from DEVICE, refreshing of all active items in an active
group, and writing control values. O nce the client creates a transaction, it can carry on processing
until the OPC server informs it that the transaction is complete through the client's "call-back"
object. The server also returns an ID number when a transaction is created so that the client can
try to cancel it if it is taking too long.
Asynchronous I/O is the normal preferred method for continuous real-time data access.
However, synchronous I/O can be useful for scenarios involving infrequent or "one -shot" data
access operations.
G.2 DEVICE VERSUS CACHE READS
When an OPC client creates a group and adds items to it, the OPC server attempts to retrieve
values for active items from its source of data. Internally, it maintains a data "cache", which it
attempts to update at least as fast as indicated by the update rate of the group. The server
optimizes regular communication with its source of data for best performance while keeping the
cache "fresh".
However, the need may arise to retrieve real-time values directly from the data source, bypassing the regular optimization routines of the CACHE and the time delays they might impose.
OPC provides the means to do this using DEVICE reads through either synchronous or
asynchronous I/O.
DEVICE reads may be performed at any time on specific items in a group. They ignore the
update rate and active state of the group or items involved. Due to the fact that they by-pass
Page 45 of 49
Matrikon OPC Server for Allen Bradley
normal optimization routines, reads from DEVICE should be used sparingly as they may incur a
severe performance penalty in the server.
A scenario where a synchronous read from DEVICE might be useful is in the case of a utility for
altering a series of set points in a device. The client application might create an inactive group
with the desired items and perform a DEVICE read it. When the call completes, the item values
are as current as possible. The utility can then display the values, allow the user to alter them,
and synchronously write them out to the device. This could be followed by a second DEVICE
read to ensure that the values were written.
Had a DEVICE read not been used, it could take some time before the server receives the first
values for the group after it is activated. Additionally, there is no guarantee that the values would
all arrive in the same update. A DEVICE read ensures that the values all arrive at the same time.
Technically, write operations are always DEVICE writes. However, there is no point in writing
to the CACHE, so this terminology is redundant.
G.3 OPC DA 2.0 VERSUS 1.0A ASYNCHRONOUS I/O
With the release of the OPC Data Access Version 2.0 Custom Interface Standard, the OPC
Foundation included a new method for asynchronous I/O intended to replace the version 1.0a
standard. While some OPC servers may continue to support the old method of asynchronous I/O,
they are under no obligation to do so. The new method is simpler, easier to implement, and
avoids certain errors that could occur with slow client applications using the old method.
Older OPC clients that require 1.0a interfaces will not be able to communicate properly with new
OPC servers that only support the 2.0 interfaces. Similarly, newer OPC clients that require 2.0
interfaces will not be able to communicate with old OPC servers that only support the 1.0a
interfaces. Vendors of software that require or support 1.0a interfaces are encouraged to update
to the 2.0 standard, which is intended to replace the 1.0a standard.
All Matrikon OPC Servers support both DA 2.0 and 1.0a asynchronous I/O. As such, OPC
clients that depend on either method are able to communicate with them. OPC clients such as
Matrikon OPC Explorer that support both methods generally attempt to use the 2.0 method first
and then resort to 1.0a if that fails.
Page 46 of 49
Matrikon OPC Server for Allen Bradley
Appendix H - ALIAS CONFIGURATION
H.1 SCALING EXPRESSIONS
Expression Description Examples
‘text’ Text value (enclosed in single
quotation marks).
+ - * / Addition (or Append), Subtraction,
Multiplication, and Division
= < > <> <= >= Equal To, Less Than, Greater
Than, Unequal To, Less or Equal
To, Greater or Equal To
Not And Or Logical Not, Logical And, Logical
Or
May also be used for binary math.
TIME Current time as text ‘The time is ‘ + TIME
DATE Current date as text ‘Today is ‘ + DATE
INT(x) Returns the integer part of x INT(3.14) = 3
FRAC(x) Returns the fractional part of x FRAC(3.14) = 0.14
SQRT(x) Returns the square root of x SQRT(16) = 4
DIV(x, y) Divides x by y DIV(42, 7) = 6
IF(expression, x, y) Returns x if expression evaluates
to TRUE, otherwise returns y
‘hello’
‘Joe’’s Alias’
(3 * 7 + 1) / 8 – 2
‘hi ‘ + ‘there’
3 < 4
(7 >= 3) And (1 <> 0)
(12 And 5) = 4
IF(6 <= 12, ‘OK’, ‘Bad’) = ‘OK’
TRUE FALSE Constant Boolean true and false (5 > 6) = FALSE
TYPEOF(x) Returns the data type of x as a text
description (‘STRING’,
‘INTEGER’, ‘FLOAT,
‘BOOLEAN’, ‘ERROR’).
STR(x) Converts the numeric value x to
OPC
OUTPUT The outgoing value written to OPC OUTPUT / 3.1415
H.2 CONFIGURATION CSV FORMAT
Comma-delimited text files (CSV) contain records on each line. Commas separate the individual
fields in a record. If the data within a field contains commas or spaces in itself, then the data is
enclosed in double quotation marks (“”). If the data contains a double quotation mark within
itself, then two double quotation marks are used in place. Lines beginning with a hash mark (#)
are ignored as comments.
Each record in an alias CSV files has the following general format.
For example: "North.FIC101","CV","Com1.Plc1.4:0001F",5,1,0,0,0
Field Description
"Alias Group"
"Alias Name"
"Item Path"
<data type>
<read-only>
<poll always>,
<update rate>
The name of the alias group folder to add the alias item to.
Periods in this name indicate subfolders below the root (i.e.
North.FIC101 = folder "North" under the root and subfolder
"FIC101" under that).
The alias item name. To access a particular item from an
OPC client, the full path name is delimited with periods (i.e.
North.FIC101.CV).
The fully qualified item ID for the OPC item to which this
alias refers.
A number indicating the data type to convert the value to
before it is returned to the OPC client. This is also appears
as the "canonical" data type for the alias when brows ing.
Use as zero in this field for the default data type of the
referenced OPC item. See the annex for a list of possible
values.
The number one in this field indicates that the alias cannot
be written to. The number zero indicates that it can.
These values are used in conjunction to ensure that an OPC
item is always being scanned whether the client is presently
using it or not. Set the "poll always" value to a one for the
item to be scanned continuously, and specify the update rate
in milliseconds. Otherwise, set both values to zero.
Field Description
Page 48 of 49
Matrikon OPC Server for Allen Bradley
Indicates which type of scaling is applied to the alias item.
<scaling>
The parameters that follow this value depend on the type
used. Possible scaling types are 0 (none), 1 (linear), 2
(square root), 3 (gain/offset), and 4 (expression).
Linear or square-root scaling parameters include the raw
high and low values, scaled high and low values, and a
clamping option. Possible clamp types are 0 (none), 1
(clamp low value), 2 (clamp high value), and 3 (clamp both
high and low values).
Gain/offset scaling parameters include a scaling factor and
an offset.
Expression scaling parameters include input and output
expressions. The input expression is applied to the value
from the OPC item when reading. The output expression is
applied to values going to the OPC item when writing.
These equations should be reciprocals of each other.
Page 49 of 49
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.