Matrikon OPC SERVER FOR ALLEN-BRADLEY User Manual

Matrikon OPC Server fo
r
y
Allen Bradle
Matrikon OPC Server for Allen Bradley
Matrikon OPC Server for Allen Bradley - User's Manual
For additional information on this manual, this OPC server, or Matrikon, please contact: Address: Matrikon
1800, 10405 Jasper Avenue Edmonton, Alberta, Canada
T5J 3N4 Phone: 780-448-1010 Fax: 780-448-9191 Web: http://www.matrikon.com Sales: drivers@matrikon.com Support: support@matrikon.com
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.
© Copyright 2001 Matrikon Inc.
Page 2 of 49
Matrikon OPC Server for Allen Bradley
TABLE OF CONTENTS
1. Introduction...................................................................................................................................................................................................................................................................5
1.1 System Requirements.................................................................................................................................................................................................................................5
1.2 OPC Overview.................................................................................................................................................................................................................................................5
1.3 OPC Server Overview..............................................................................................................................................................................................................................6
2. Getting Started.............................................................................................................................................................................................................................................................7
2.1 Installation.......................................................................................................................................................................................................................................................7
2.1.1 Matrikon OPC Server........................................................................................................................................................................................................................7
2.1.2 Standard OPC Proxy/Stubs........................................................................................................................................................................................................7
2.1.3 Standard OPC Server Browser...............................................................................................................................................................................................8
2.1.4 Matrikon OPC Common Components.............................................................................................................................................................................8
2.1.5 Matrikon OPC Explorer...................................................................................................................................................................................................................8
2.1.6 Matrikon OPC Automation Component.........................................................................................................................................................................8
2.1.7 Installation Options.........................................................................................................................................................................................................................9
2.2 Licensing...........................................................................................................................................................................................................................................................9
2.3 Command-Line.............................................................................................................................................................................................................................................9
3. Configuration.............................................................................................................................................................................................................................................................10
3.1 Starting Up.....................................................................................................................................................................................................................................................10
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
3.7 DCOM Configuration.............................................................................................................................................................................................................................19
3.8 Statistics..........................................................................................................................................................................................................................................................19
3.9 Options...............................................................................................................................................................................................................................................................19
3.9.1 General......................................................................................................................................................................................................................................................20
3.9.2 Logging......................................................................................................................................................................................................................................................20
3.9.3 Advanced.................................................................................................................................................................................................................................................22
3.10 Shutting Down...........................................................................................................................................................................................................................................22
4. Matrikon OPC Explorer......................................................................................................................................................................................................................................23
4.1 View Available OPC Servers.........................................................................................................................................................................................................23
4.2 Connect to an OPC Server..............................................................................................................................................................................................................23
4.3 Add OPC Groups........................................................................................................................................................................................................................................24
4.4 Add OPC Items............................................................................................................................................................................................................................................24
4.4.1 Item ID........................................................................................................................................................................................................................................................25
4.4.2 Access Path...........................................................................................................................................................................................................................................25
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 Read Real-time Values.....................................................................................................................................................................................................................26
4.5.1 Update Rate...........................................................................................................................................................................................................................................26
Page 3 of 49
Matrikon OPC Server for Allen Bradley
4.5.2 Active State...........................................................................................................................................................................................................................................26
4.5.3 Data Display..........................................................................................................................................................................................................................................26
4.5.4 I/O Method...............................................................................................................................................................................................................................................27
4.5.5 Time Bias..................................................................................................................................................................................................................................................27
4.5.6 Dead-band..............................................................................................................................................................................................................................................28
4.5.7 Advise Log...............................................................................................................................................................................................................................................28
4.6 Write Control Values..........................................................................................................................................................................................................................28
4.7 Options..............................................................................................................................................................................................................................................................29
4.7.1 General......................................................................................................................................................................................................................................................29
4.7.2 Data Transfer.......................................................................................................................................................................................................................................29
4.7.3 Data Display..........................................................................................................................................................................................................................................29
4.7.4 COM................................................................................................................................................................................................................................................................29
4.8 Save the Session....................................................................................................................................................................................................................................29
5. Matrikon OPC Automation Component............................................................................................................................................................................................30
6. Troubleshooting.....................................................................................................................................................................................................................................................31
Appendix A - Item ID Syntax.......................................................................................................................................................................................................................................33
6.1 Add Items........................................................................................................................................................................................................................................................33
6.2 Read and Write Data............................................................................................................................................................................................................................33
Appendix B - Performance..........................................................................................................................................................................................................................................34
Appendix C - Distributed COM (DCOM)............................................................................................................................................................................................................35
C.1 DCOM Configuration Utility........................................................................................................................................................................................................................35
C.2 Default Properties ..............................................................................................................................................................................................................................................35
C.3 Security Permissions.....................................................................................................................................................................................................................................36
C.4 Server Identity.......................................................................................................................................................................................................................................................38
C.5 Default Protocols................................................................................................................................................................................................................................................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
H.1 Scaling Expressions..........................................................................................................................................................................................................................................47
H.2 Configuration CSV Format..........................................................................................................................................................................................................................48
Page 4 of 49
Matrikon OPC Server for Allen Bradley
1. INTRODUCTION
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 A Device 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).
Filename Description
PSTCFG.EXE Matrikon OPC Server Configuration Client PSTCFGPS.DLL Matrikon OPC Server Configuration Marshalling Library OEM_Matrikon_OPC.DLL Matrikon OPC OEM Badge Library EXPREVAL.DLL Expression Evaluation Library (for aliases)
2.1.5 MATRIKON OPC EXPLORER
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.
Page 10 of 49
Matrikon OPC Server for Allen Bradley
Note
PSTCFG.EXE PSTCFGMatrikon.OPC.Device.# Matrikon.OPC
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.
Loading...
+ 34 hidden pages