1439 OptoOPCServer Users Guide
1439 OptoOPCServer Users Guide
43044 Business Park Drive Temecula CA 92590-3614 Phone: 800-321-OPTO (6786) or 951-695-3000 Fax: 800-832-OPTO (6786) or 951-695-2712 www.opto22.com Product Support Services 800-TEK-OPTO (835-6786) or 951-695-3080 Fax: 951-695-3017 Email: [email protected] Web: support.opto22.com
OptoOPCServer Users Guide Form 1439-090309March, 2009 Copyright 2009 Opto 22. All rights reserved. Printed in the United States of America. The information in this manual has been checked carefully and is believed to be accurate; however, Opto 22 assumes no responsibility for possible inaccuracies or omissions. Specifications are subject to change without notice. Opto 22 warrants all of its products to be free from defects in material or workmanship for 30 months from the manufacturing date code. This warranty is limited to the original cost of the unit only and does not cover installation, labor, or any other contingent costs. Opto 22 I/O modules and solid-state relays with date codes of 1/96 or later are guaranteed for life. This lifetime warranty excludes reed relay, SNAP serial communication modules, SNAP PID modules, and modules that contain mechanical contacts or switches. Opto 22 does not warrant any product, components, or parts not manufactured by Opto 22; for these items, the warranty from the original manufacturer applies. These products include, but are not limited to, OptoTerminal-G70, OptoTerminal-G75, and Sony Ericsson GT-48; see the product data sheet for specific warranty information. Refer to Opto 22 form number 1042 for complete warranty information.
Cyrano, Opto 22 FactoryFloor, Optomux, and Pamux are registered trademarks of Opto 22. Generation 4, ioControl, ioDisplay, ioManager, ioProject, ioUtilities, mistic, Nvio, Nvio.net Web Portal, OptoConnect, OptoControl, OptoDataLink, OptoDisplay, OptoOPCServer, OptoScript, OptoServer, OptoTerminal, OptoUtilities, PAC Control, PAC Display, PAC Manager, PAC Project, SNAP Ethernet I/O, SNAP I/O, SNAP OEM I/O, SNAP PAC System, SNAP Simple I/O, SNAP Ultimate I/O, and SNAP Wireless LAN I/O are trademarks of Opto 22. ActiveX, JScript, Microsoft, MS-DOS, VBScript, Visual Basic, Visual C++, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. Linux is a registered trademark of Linus Torvalds. Unicenter is a registered trademark of Computer Associates International, Inc. ARCNET is a registered trademark of Datapoint Corporation. Modbus is a registered trademark of Schneider Electric. Wiegand is a registered trademark of Sensor Engineering Corporation. Nokia, Nokia M2M Platform, Nokia M2M Gateway Software, and Nokia 31 GSM Connectivity Terminal are trademarks or registered trademarks of Nokia Corporation. Sony is a trademark of Sony Corporation. Ericsson is a trademark of Telefonaktiebolaget LM Ericsson. CompactLogix, and RSLogix are trademarks of Rockwell Automation. Allen-Bradley and ControlLogix are a registered trademarks of Rockwell Automation. EtherNet/IP is a trademark of ODVA. All other brand or product names are trademarks or registered trademarks of their respective companies or organizations.
ii
Table of Contents
Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 About this Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 For Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Special Note on Windows XP Service Pack 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 2: Using OptoOPCServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 How OptoOPCServer Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Accessing Legacy Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Installing OptoOPCServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 System Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Setting Up OptoOPCServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 A. Create Browser Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 B. Open Browser Items File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 C. Build Browser Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 D. Load Browser Database to OptoOPCServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 E. Connect OPC Client to Browser Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Defining High-Density Digital Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Removing a Browser Database from OptoOPCServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Chapter 3: Using DCOM Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 Typical DCOM Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Scenario 1: Open Access (No Security) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Scenario 2: Restricted Access with Single Authorized User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Scenario 3: Restricted Access with Multiple Authorized Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
iii iii
Client Access Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 OPC Client and Server Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 Domains and Workgroups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Chapter 4: Setting Up DCOM Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Configuring the OPC Server Workstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 A. (Workgroup Only) Creating a User Account on the Server Workstation . . . . . . . . . . . . . . . . . . . . .32 B. Enabling Network Sharing on the OPC Server Workstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 C. Configuring the Windows Firewall on the OPC Server Computer . . . . . . . . . . . . . . . . . . . . . . . . . . .35 D. Configuring the OptoOPCServer DCOM Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 Configuring a Remote Client Workstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 E. Configuring the Windows Firewall on the Client Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 F. Configuring the OptoOPCServer DCOM Properties on the Client Computer . . . . . . . . . . . . . . . . . .50 G. Enabling Network Sharing on the Client Workstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 Chapter 5: Creating Communication Messages . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Item IDs for I/O Points and Memory Map Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Analog Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 Digital Point (4-Channel Digital Modules) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 High-Density Digital (HDD) Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Point Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 Alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 Scratch Pad (SNAP PAC controllers and Ultimate brains only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 PID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 Item ID Examples: I/O Points and Memory Map Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Item IDs for Control Strategy Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Integers, Floats, Strings, and Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 Strategy Charts, I/O Units, and Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 Analog Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 Digital Points (All I/O Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 Ethernet PIDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Mistic PIDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Mistic Events/Reactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Item ID Examples: PAC Control Strategy Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Using Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
iv
Chapter 6: Debugging and Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 Debugging in the OptoOPCServer Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Using the Registry Checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Testing a Browser Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Appendix A: Data Quality Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 How Data Quality is Determined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
vv
vi
1: IntroductionChapter 1
Introduction
This guide describes how to configure and use OptoOPCServer, an OLE for Process Control (OPC) 2.0 server, to communicate with these Ethernet-based Opto 22 devices: SNAP industrial controllers, including the standalone SNAP PAC S-series, the rack-mounted SNAP PAC R-series, the SNAP-LCE, and the SNAP-LCM4 with an Ethernet adapter card SNAP brains in the SNAP PAC EB-series, SNAP Ultimate I/O, SNAP Ethernet I/O, and SNAP Simple I/O families E1 and E2 brain boards
This guide assumes that you already have a basic understanding of OPC. If you need to learn about OPC, a good place to start is the OPC Foundation, at www.opcfoundation.org.
11
RELATED DOCUMENTATION Chapter 5, Creating Communication MessagesThis chapter explains how to use the OptoOPCServer window for debugging. It also describes how to access I/O point data, memory map information, and PAC Control strategy variables.
Related Documentation
See the following documents for additional information:
For this information Designing flowchart-based control programs for the system Configuring I/O points and system functions Installing and using SNAP PAC Brains. Installing and using E1 and E2 brain boards. Installing and using Opto 22's SNAP PAC R-series of programmable automation controllers See this guide Form # 1700 1701 1440 1690 1563 1595
PAC Control Users Guide PAC Control Command Reference PAC Manager Users Guide Snap PAC Brains Users Guide E1 and E2 Users Guide SNAP PAC R-Series Controllers User's Guide
For Help
If you have problems installing or using OptoOPCServer, first check this guide and the Troubleshooting section of the users guide for your Opto 22 hardware. If you cannot find the help you need in the guides or on the Opto 22 Web site, contact Opto 22 Product Support. Phone: 800-TEK-OPTO (835-6786) 951-695-3080 (Hours are Monday through Friday, 7 a.m. to 5 p.m. Pacific Time) 951-695-3017 [email protected] www.opto22.com NOTE: Email messages and phone calls to Opto 22 Product Support are grouped together and answered in the order received.
CHAPTER 1: INTRODUCTION
System Requirements
Heres what you need to install and run OptoOPCServer: A computer with at least the minimum processor required for your version of Microsoft Windows (1 GHz Pentium-class or better recommended) and Ethernet capability VGA or higher resolution monitor (Super VGA recommended). Minimum size: 800x600 with small fonts. Mouse or other pointing device Installed Windows printer (optional) Microsoft Windows XP (with Service Pack 2 or higher) or Windows 2000 (with Service Pack 4) workstation operating system. Microsoft Windows server and 64-bit versions of Windows workstation operating systems are not supported. At least 512 MB RAM At least 50 MB of available hard drive space.
Special Note on Windows XP Service Pack 2 New installations of Windows XP include Service Pack 2. This service pack requires that you configure OPC client and OPC server identities and privileges to allow communication between an OPC Server and OPC client. Chapter 3 describes this configuration. For additional information on OPC and DCOM, see the OPC Foundation paper Using OPC via DCOM with XP SP2. The paper is available at this location: http://www.opcfoundation.org/DownloadFile.aspx?CM=3&RI=161&CN=KEY&CI=282&CU=21
33
SYSTEM REQUIREMENTS
2: Using OptoOPCServerChapter 2
Using OptoOPCServer
OptoOPCServer can be used to integrate Ethernet-based controllers, brains, and brain boards with PCs running Microsoft products, OPC-compliant third-party packages, and custom applications you create with tools such as Visual C++. Since OptoOPCServer can communicate with both I/O units and controllers, it provides data about both I/O points and strategy variables.
55
INSTALLING OPTOOPCSERVER
OPC-compliant HMI Browser Configurator (Can be on the same computer running OptoOPCServer) Data OPC server layer
KEY:
OptoOPCServer Controller data Controller data I/O unit data Control engine and I/O unit data SNAP on-the-rack controllers Any Ethernet-based I/O unit with a SNAP PAC brain, or E1 or E2 brain board
Controller layer
SNAP-PAC-S1 with PAC Control Put I/O data into controller variables
Real-world assets
Installing OptoOPCServer
NOTE: The OptoOPCServer client and server can reside on the same or on different computers depending on your application requirements. However, if the OPC server and client (or PAC Display) are to be on different computers, DCOM must be configured on both computers. For more information, see Using DCOM Security on page 23. Insert the CD containing OptoOPCServer in your CD-ROM drive, and the installation wizard should appear. If the wizard does not appear, start Windows Explorer and navigate to your CD-ROM drive. Double-click Setup.exe to begin installation.
CHAPTER 2: USING OPTOOPCSERVER If you have trouble installing OptoOPCServer contact Opto 22 Product Support at 800-835-6786 or 951-695-3080.
System Architecture
To build OPC Browser Databases that expose controller information to OPC clients, install Opto Browser Configurator on the same workstation where you developed your control strategies.
Browser OPC clients connect to Configurator Browser Databases through the OptoOPCServer. PAC Control or OptoControl
OPC Client
Strategy
Opto Browser Configurator can load Browser Database files to a local or remote OptoOPCServer. OptoOPCServer can be on the same computer as the Browser Configurator or on its own server, as shown here. OptoOPCServer scans devices for tags chosen by the OPC clients.
Ethernet-based I/O SNAP-PAC S-series unit with a SNAP brain, controller or E1 or E2 brain board
Setting Up OptoOPCServer
If your OPC client supports the OPC 2.0 tag browser interface, the PAC Control, I/O unit, or OptoControl tags needed for communication with OPC clients can be automatically copied from the strategy and I/O configuration files. In OptoOPCServer, these files are called browser items. Browser items from multiple controllers and brains can be opened in the Opto Browser Configurator and some or all of their tags copied to a single file referred to as a browser database. A browser database is loaded to OptoOPCServer to expose controller and I/O unit tags to OPC clients. You can create one or several browser databases as needed. For initial setup, you will use the Opto Browser Configurator. After setup, OptoOPCServer starts automatically and runs without a visible window. For debugging the OPC server, you can open
77
SETTING UP OPTOOPCSERVER OptoOPCServer before an OPC client is connected to it, launch the client, and then observe OptoOPCServer to see the information requested by the client. (See Creating Communication Messages on page 55 for more information.) NOTE: The OptoOPCServer client and server can reside on the same or on different computers depending on your application requirements. However, if the OPC server and client (or PAC Display) are to be on different computers, DCOM must be configured on both computers. For more information, see Using DCOM Security on page 23. Youll use the following steps to set up OptoOPCServer: A. Create Browser Items. See page 8. B. Open Browser Items File. See page 8. C. Build Browser Database. See page 11. D. Load Browser Database to OptoOPCServer. See page 13. E. Connect OPC Client to Browser Database. See page 14.
A B
PAC Manager
Browser database
data.bdb
OPC Server
OPC Clients
CHAPTER 2: USING OPTOOPCSERVER Therefore, you do not need to open the browser item again until it is changed or you wish to include the same tag in another OPC browser database. You need to know the location of the browser item you created in PAC Manager (*.otg), PAC Control (*.idb), or OptoControl (*.cdb). To open a browser items file: 1. From the Start menu, choose ProgramsOpto 22PAC ProjectOptoOPCServerBrowser Configurator. The Opto Browser Configurator window appears with a new, untitled browser database.
2. From the File menu, choose Browser ItemsOpen Browser Items File. 3. In the Open File(s) dialog box, navigate to the .otg, .idb, or .cdb file you want to use as a source for OPC items.
Depending on the type of file you opened, see the appropriate section below.
99
SETTING UP OPTOOPCSERVER For .otg Files If you opened an .otg file for an I/O unit, the contents are now shown in the left pane of the Opto Browser Configurator. The right pane displays the specific tags associated with the browser item selected in the left pane.
For .idb or .cdb Files If you opened an .idb or .cdb file, the following dialog box appears. NOTE: If no controller is listed, your strategy may not have a valid controller configured, and the strategy may not be the one running on the controller. To correct this, you will need to open your strategy in PAC Control or OptoControl and configure a controller.
1. In the Select a Strategy File and Controller dialog box, select controllers. If your strategy has multiple controllers from which your OPC client will need data, you need to choose one or more controllers, shift-click to add additional controllers. 2. Click OK.
The browser items are now shown in the left pane of the Opto Browser Configurator. The right pane displays the specific tags associated with the browser item selected in the left pane.
10
11 11
SETTING UP OPTOOPCSERVER
Browser database
Select tag and drag to this window to add tag to Browser Database.
3. Select the tag in the top right pane and drag it to the bottom pane. You can select single or multiple tags.
NOTE: For high-density digital tags, you need to provide additional information. See Defining High-Density Digital Tags on page 19. This technique works at all layers of the hierarchy. For example, if you want to copy all of the numeric variables of a strategy into the browser database, select the Variables folder and then drag the Numeric Variables folder from the right pane into the browser database.
4. Repeat Steps 2 and 3 until all the desired tags are in the browser database. 5. Verify that all desired tags are in the browser database.
The bottom pane displays the browser database. Expand items to check that you've included all the tags you intended to include. If you find tags you didn't intend to include, you can select these and press the Delete key to remove them.
12
A meaningful description is especially helpful if you plan to load multiple browser databases to your OptoOPCServer. The saved browser database must be loaded to the OPC server before it is available to OPC clients. See page 13.
3. If OptoOPCServer resides on the same workstation as Opto Browser Configurator, choose Local. However, if OptoOPCServer resides on another computer on the network, choose Remote.
If you chose Remote, type the name of the machine running OptoOPCServer.
13 13
SETTING UP OPTOOPCSERVER
The machine name is the network identification of the computer running OptoOPCServer. You can find its machine name by viewing the computers System Properties.
4. Click the Update button.
If you are overwriting a browser database, youll see a warning. Click Yes to proceed.
5. Click OK to acknowledge the update.
14
Node name
NOTE: If Opto22.OpcServer.2 does not appear in the list, OptoOPCServer or client-side development tools were not installed correctly.
4. If the OPC server and the OPC client are running on the same computer, leave the Node Name field blank. If the OPC server is running on a different computer, enter the name of the computer running OptoOPCServer in the Node Name field.
15 15
SETTING UP OPTOOPCSERVER
6. From the Group menu, choose Add Group.
The client requires that you designate a group for the items the client is requesting. Groups are a way to separate items by the rate at which they need to be scanned. For example, temperature in a small chamber may need to be scanned very frequently, while an outdoor temperature may change much more slowly and need less frequent scanning. You can add as many groups as you need.
7. Enter a Group Name. In the Update Rate (mSec) field, enter the rate in milliseconds at which items in the group should be scanned. Click OK.
9. In the lower-left part of the window, click the plus signs to expand the list of items.
16
The items attributes (leaves) appear in the Item Leaf list on the lower right.
11. In the Item Leaf list, click the attribute to use.
Its item ID appears in the Item Name field and in the Items to be Added list.
Access Path is not used; leave the field blank. The OPC item ID is automatically entered in the Item Name field when you choose the item and attribute.
In this example, the value of the PAC Control strategy variable Humity has been chosen.
The item is added and the Item Name field is cleared. Add other items in the same way.
13. When you have finished adding items, click OK.
The main client window shows the items you have added. The following example shows two items added to Group A.
17 17
SETTING UP OPTOOPCSERVER
Group list Items added to highlighted group Scanned values Message log
If the sample connection is successfully completed, you can watch the item values being updated in the Sub Value column. If the OPC server cannot connect to the IP address, the Sub Quality column shows Bad Communication for that item.
14. To add more groups and items, return to step 6. 15. To write to items, right-click the item you want to write to.
18
Change both these fields to the new value you want to write to this item. Type the value in the top field, and then click the lower value. This sets both fields to the new value (For boolean values, type 0, 1, on, or off.) Click OK to send the change to OptoOPCServer.
17. In the Write Item dialog box, type the new value in the Value(s) field. (For boolean values, type 0, 1, on, or off.) Then click the highlighted value just below it. 18. Click OK to send the new value to OptoOPCServer.
19 19
Provide the module number here. Choose point or range. If choosing a range of points on an HDD module, specify the start and end of the range here.
NOTE: When using high-density digital points, it is necessary to specify the module and points. You must provide a module number from 015, which corresponds to the modules position on the SNAP rack. For points, you have an option of indicating an individual point or a range or points.
20
CHAPTER 2: USING OPTOOPCSERVER If you chose Remote, type the name of the machine running OptoOPCServer.
4. Select the browser database you want to delete and click Remove. 5. Repeat Steps 1 through 4 to remove additional browser databases.
21 21
22
This chapter describes the security options you can use with Windows networks when the OptoOPCServer and its clients are installed on separate workstations. This type of network security is known as the Distributed Component Object Model (DCOM). This chapter contains the following sections: Typical DCOM Scenarios (below) provides three basic scenarios for using DCOM settings to set up network security. Client Access Control on page 25 describes how a user identity controls which user or applications can launch OptoOPCServer and access its data. Domains and Workgroups on page 28 describes the two basic types of DCOM networks: domains and workgroups.
For additional information on OPC and DCOM, see the OPC Foundation paper Using OPC via DCOM with XP SP2. The paper is available at this location: http://www.opcfoundation.org/DownloadFile.aspx?CM=3&RI=161&CN=KEY&CI=282&CU=21
23 23
In this scenario, any OPC client with access to the server can read from and write to the tags via OptoOPCServer. Additionally, any client using Opto Browser Configurator can load and remove browser databases. This scenario is not using the networks inherent security.
User 1 is logged in as current user of client and server Network server with OptoOPCServer
Access Denied
OPC Client
In Scenario 2, User 1 is logged in to both the client and the server. Any OPC client can access OptoOPCServer if the operator is also logged in as User 1. Other users are denied access.
24
Access Denied Server and client workstations logged in as members of the same user group
OPC Client
This scenario uses Windows network management to provide security while allowing multiple users access to OptoOPCServer. To enable access by multiple users under a group name or their unique log-ins, youll need to edit the DCOM configuration on both the OPC server and client computers.
25 25
Access OptoOPCServer writes data to client OPC clients launch and/or access OptoOPCServer Launch Access Read/write browser database
Client Workstation
OptoOPCServer
This figure shows three types of communication between an OPC server and client. Upon starting up, the OPC client may also want to start the OptoOPCServer; therefore, the client needs launch permission. It then needs access permission to read and write data. The abilities to launch and access the server are properties that can be individually assigned to clients by way of their client user name and password. Client users can be characterized by these options: Client may launch OptoOPCServer. Client may access OptoOPCServer. Client may launch and access OptoOPCServer.
In these examples, the network server evaluates a launch or data access request from the client application by its client user name and decides whether to perform the request. The client workstations also need to evaluate access requests from OptoOPCServer. (OptoOPCServer achieves its efficiency in part by updating the OPC client when theres a change in a tag [event driven], rather than needing the OPC client to poll tags. To update the client, OptoOPCServer needs access to the client.) In the diagram below, the same elements are shown, but network identities and security are used to manage communication. The client needs to launch and access OptoOPCServer, which in turn needs access to the client. The white lines and highlights show the configuration settings used to open the path of the communication.
26
DCOM Configuration Options enabling secure communication between OptoOPCServer and an OPC client.
On the network server: OptoOPCServer Identity: OptoOPCServer (program ID Opto22.OpcServer.2) must be assigned an identity. DCOM offers three identities: the Interactive User, the Launching User, and This User. Launching User is the default; therefore, you must change OptoOPCServers identity to This User and provide a user name and password. Specifically, you could use your user name and password if you have administrator rights to this machine. (You will need administrator rights to assign security.) OptoOPCServer Security: DCOM Configuration maintains lists of who may launch and who may have access to OptoOPCServer (program ID Opto22.OpcServer.2). Each of these is a list of user names or user groups that you can add.
27 27
DOMAINS AND WORKGROUPS On the client: Default Permissions on the client workstation. This is a general setting for the workstation rather than the OPC client. Since OptoOPCServer has a specific (and presumably trusted) user name, it can be granted access to the client. The Default Security setting allows you to create a list of trusted users with Access Permission, Launch Permission, and Configuration Permission. On the client workstation, you add the user name of This User (from item 1 above) to the Access Permissions. Make no other changes to default security. The specific steps to make these changes are provided below.
User logs in to a domain controller by providing a user name and password. The domain controller contains all user definitions in one location. After logging in, the user has access to services provided by the network.
28
User logs in to the local workstation. All workstations in the workgroup must have information for all users. Once logged in, the user has access to common resources of the workgroup.
29 29
30
Use this chapter to set up network security for OptoOPCServer using the Distributed Components Object Model (DCOM). The network can either be a workgroup or one that is managed by a domain controller. You need to have administrator privileges on both the OPC server and client workstations. Network Managed by a Domain Controller In a domain, a domain controller manages the network, contains all user definitions, and provides network services. The user logs in to a domain controller by providing a user name and password. After logging in, the user has access to services provided by the network. OptoOPCServer resides on a user workstation. One or more users on client workstations access the OptoOPCServer software that resides on the OPC server.
Domain Controller
User2 / Client
User1 OptoOPCServer
User3 / Client
31 31
CONFIGURING THE OPC SERVER WORKSTATION Workgroup A workgroup is a peer-to-peer network between computers with no domain controller. An OptoOPCServer workgroup has a OPC server workstation and one or more OPC server workstations. The OPC server runs the OptoOPCServer software, and each client workstation is set up to access the OptoOPCServer software that resides on the OPC server.
Client
OPC server
Client
32
4. 5. 6. 7. 8.
In the New User dialog box, enter a name for the new user. Type the password in the Password and Confirm Password fields, and then click Create. If you want to add additional users, repeat steps 4-5 for each new user. When you have added all the new users, click Close. In the list of users, double-click on a new user name.
9. In the Properties dialog box, click the Member Of tab, and then click the Add button.
33 33
11. Repeat steps 8-10 on the OPC server workstation for each client user account that will access the OPC server. 12. Click OK to close the Properties dialog box.
If you see the sentence that says, If you understand the security risks but want to share files without running the wizard, click here, click on the sentence. Another dialog will appear with a similar statement. Select the items that enable network sharing. If you see two boxes for enabling network sharing, make sure that both boxes are checked. 4. Click OK to close the Properties dialog box.
34
Open the Control Panel. Double-click Windows Firewall. In the Windows Firewall dialog box, click the Exceptions tab. Click the Add Port button.
5. 6. 7. 8.
In the Name field, type DCOM. In the Port number field, type 135. Make sure TCP is selected. Click OK to close the Add a Port dialog box.
35 35
The Component Services dialog appears. In Vista, if the User Account Control dialog appears instead, click Continue.
3. Expand the Component Services folders, and then select DCOM Config under My Computer.
36
4. To set the Custom Launch Permissions for OptoOPCServer, right-click Opto22.OPCServer.2 and select Properties. 5. On the Identity tab, select This user. 6. In order to identify the user under which OPCServer will run on this machine, enter a user name you created previously.
NOTE: When operating on a domain, the user must have a domain account with administrator priviledges.
7. Type the password in the Password and Confirm Password fields. 8. Click Apply.
37 37
CONFIGURING THE OPC SERVER WORKSTATION Use the following table as a checklist for the COM security settings for the OptoOPCServer workstation described in steps 9 through 25 below.
Custom Opto22.OPCServer.2 Launch Permissions Administrators Local Launch Remote Launch Local Activation Remote Activation X X X X X INTERACTIVE X SYSTEM X X X X Everyone X X X X This user X X X X Default Launch Permissions Administrators X X X X Everyone X X X X
9. On the Security tab, select Customize under Launch and Activation Permissions, and then click Edit.
38
39 39
14. Type Everyone, and then click Check Names. 15. Click OK to close the dialog box. 16. Select Everyone and check all of the Allow boxes.
17. Add each new user you created in the section on page 32 as follows: a. Click Add. b. Type the name of the user you previously created. c. Click Check Names. The workstation name and user name appear underlined.
40
18. For each new user, select the new user, check all of the Allow boxes, and then click OK.
19. Click OK to close the Opto22.OPCServer.2 properties dialog box, but leave the Component Services window open.
41 41
21. To allow permissions, click the COM Security tab. 22. In the Launch and Activation Permissions area, click Edit Limits.
42
Use the following table as a checklist for the default COM security settings for the OptoOPCServer workstation described in steps 26 through 38 below.
Default COM Security Settings Access Permissions Limits Access Permissions Defaults
Everyone X X
SELF X X
SYSTEM X X
This user X X
Everyone X X
26. To allow ANONYMOUS LOGON, click the COM Security tab. 27. Under Access Permissions, click Edit Limits.
43 43
29. Select Everyone, check both Allow boxes, and then click OK to close the Access Permission dialog box.
44
31. Select SELF and check both Allow boxes. 32. Select SYSTEM and check both Allow boxes.
45 45
34. Type Everyone, click Check Names, and then click OK. 35. Select Everyone and click both Allow boxes.
36. To add permissions for the user specified in step 6 on page 37, click Add, and type the name of that user. 37. Add each user who will need to access OptoOPCServer as follows: a. Click Add.
46
38. For each new user name added, check both Allow boxes, and then click OK.
39. To set the Default DCOM Communication Properties, click the Default Properties tab and do the following: a. Select Enable Distributed COM on this computer.
47 47
40. Click OK to close the My Computer dialog box, and then close the other open dialog boxes.
Make sure that the OptoOPCServer software is installed on the client computer. Open the Control Panel. Double-click Windows Firewall. In the Windows Firewall dialog box, click the Exceptions tab. Click the Add Port button and do the following: a. In the Name field, type DCOM. b. In the Port number field, type 135.
48
49 49
The Component Services dialog appears. In Vista, if the User Account Control dialog appears instead, click Continue.
3. Expand the Component Services folders, and select DCOM Config under My Computer.
50
Use the following table as a checklist for the default COM security settings for the client workstation described in steps 5 through 11 below.
Access Permissions Limits ANONYMOUS LOGON Local Access Remote Access X X Everyone Access Permissions Defaults SELF SYSTEM
X X
X X
X X
5. Under Access Permissions on the COM Security tab, click Edit Limits.
51 51
7. Select Everyone, check both Allow boxes, and then click OK to close the Access Permission dialog box.
52
9. Select SELF and check both Allow boxes. 10. Select SYSTEM, check both Allow boxes 11. Click OK to close the Access Permission dialog box.
12. Click the Default Properties tab and do the following: a. Select Enable Distributed COM on this computer.
53 53
13. Click OK to close the My Computer dialog box, and then close the other open dialog boxes.
If you see the sentence that says, If you understand the security risks but want to share files without running the wizard, click here, click on the sentence. Another dialog box will appear with a similar statement. Select the items that enable network sharing. If you see two boxes for enabling network sharing, make sure that both boxes are checked. 4. Click OK to close the Properties dialog box.
54
NOTE: To access variables in a control strategy running on an on-the-rack or standalone controller, you must use a different item ID string. See Item IDs for Control Strategy Variables on page 62.
55 55
ITEM IDS FOR I/O POINTS AND MEMORY MAP DATA Heres what these parameters mean:
Device: Protocol: MMIO (Opto 22 memory-mapped device, including on-the-rack controllers, EB-series brains, and E1 and E2 brain boards) ip (network protocol) tcp: followed by the IP address, in dot notation, and port number of the SNAP PAC or the SNAPUltimate brain. The port number defaults to 2001 and is separated from the IP address by a colon. Example: tcp:10.192.55.81:2001 The type of data to read or write. See the table below for the ItemName to use for what you want to do. NOTE: Reading an invalid float value (for example, reading engineering units on a digital point) returns a value of -99999. The IO unit point number (063 or 04096) or the Scratch Pad element to read or write to. NOTE: For high-density digital points, you provide a Module Number and a Point Number.
Location:
ItemName:
PointNumber:
The following tables show item names to use for the item ID. Note the following: Data Type: The data types Bool, Long, Float, and Str have enumerated VARTYPE values of VT_BOOL, VT_I4, VT_R4, and VT_BSTR, respectively. Action: The Action column shows whether the item name can be read, written to, or both. Scanned: Item names marked with a No in the Scanned column are not continually scanned. Consequently, an OPC client will not receive subscription data for these ItemNames. To read data for these ItemNames, an OPC client must perform an explicit read using the Async Read or Sync Read from Device commands. Elements: For I/O point ItemNames, the Elements column shows the I/O unit channel numbers available, either 063 for the old memory map areas or 04095 for the expanded areas. Scratch Pad ItemNames show the number of elements that can be read from and written to a Scratch Pad memory area. To determine the channel number, see Item ID Examples: I/O Points and Memory Map Data on page 61. Array Allowed?: ItemNames marked with a Yes in the Array Allowed? column can be accessed as multiple elements in an array. Example: COUNTERDATA[60-63] returns counter data for I/O points 60 through 63. See the following sections: Analog Point on page 57 Digital Point (4-Channel Digital Modules) on page 57 High-Density Digital (HDD) Point on page 58 Point Configuration on page 59 Alarm on page 59 Scratch Pad (SNAP PAC controllers and Ultimate brains only) on page 60 PID on page 60
56
Analog Point
To do this Use this ItemName Data Type Float Float Float Float Float Float Float Float Float Float Float Float Action Scanned Elements Array Allowed? Yes Yes Yes Yes Yes Yes No No No No No No
Read or write current engineering units value Old Memory Map Area Read or write current counts value Read current minimum value Read current maximum value Read then clear minimum value Read then clear maximum value Expanded Memory Map Area Read or write current engineering units value Read or write current counts value Read current minimum value Read current maximum value Read then clear minimum value Read then clear maximum value
EU COUNTS MIN MAX MIN_READCLEAR MAX_READCLEAR EU_4096 COUNTS_4096 MIN_4096 MAX_4096 MIN_READCLEAR_4096 MAX_READCLEAR_4096
063 063 063 063 063 063 04095 04095 04095 04095 04095 04095
use a digital input point as a counter, you must configure it as a counter, and the counter must be active (that is, the active counter flag is set to true). For more information on counters, see the users guide for the device.
* To
Read or write current on/off state Read on-latch state Read off-latch state Read or write state of active counter flag* Read current counter value* Read then clear on-latch state Read then clear off-latch state Read then clear current counter value
R/W R R R/W R R R R
* To use a digital input point as a counter, you must configure it as a counter, and the counter must be active (that is, the active counter flag is set to true). For more information on counters, see the users guide for the device.
57 57
Read or write current on/off state of point 'p' of HDD module 'm' Read on-latch state of point 'p' of HDD module 'm' Read off-latch state of point 'p' of HDD module 'm' Clear on-latch state of point 'p' of HDD module 'm' 1 Clear off-latch state of point 'p' of HDD module 'm' 1 Read current counter value of point 'p' of HDD module 'm' Read then clear current counter value of point 'p' of HDD module 'm' 2 Read or write current on/off state for all 32 points of HDD module 'm' 3 Read current on-latch state for all 32 points of HDD module 'm' 3 Read current off-latch state for all 32 points of HDD module 'm' 3 Clear current on-latch state for all 32 points of HDD module 'm' 1, 4 Clear current off-latch state for all 32 points of HDD module 'm' 1, 4
1
HDD_STATE(m)[p]
R/W
Yes
015
031
HDD_ONLATCH(m)[p]
Bool
Yes
015
031
No
HDD_OFFLATCH(m)[p]
Bool
Yes
015
031
No
HDD_ONLATCH_CLEAR(m)[p]
Bool
No
015
031
No
HDD_OFFLATCH_CLEAR(m)[p]
Bool
No
015
031
No
Long
Yes
015
031
No
Long
Yes
015
031
No
Long
R/W
Yes
015
n/a
No
HDD_BANK_ONLATCH(m)
Long
Yes
015
n/a
No
Long
Yes
015
n/a
No
Long
No
015
n/a
No
Long
No
015
n/a
No
Notice this action is write only. Write a value of true to clear the respective latch. This is not a "Read and Clear"; it is more like a "Write to Clear." This action is a "Read and Clear" (unlike the latches). The value sent is a 32-bit mask where high bits equal On and low bits equal Off. value sent is a 32-bit mask where high bits equal "Clear respective latch" and low bits equal "Do nothing."
2 3
4 The
58
Point Configuration
To do this Use this ItemName Data Type Long Long Long Float Action Scanned Elements Array Allowed? No No No No
Read module configuration type Read or write point configuration type Old Memory Map Area Read or write point feature Read or write offset value (analog calibration) Read or write gain value (analog calibration) Read or write analog high scaling factor Read or write analog low scaling factor Read module configuration type Expanded Memory Map Area Read or write point configuration type Read or write point feature Read or write offset value (analog calibration) Read or write gain value (analog calibration) Read or write analog high scaling factor Read or write analog low scaling factor
No No No No
No No No No No No No
No No No No No No No
No No No
No No No
Alarm
To do this Use this ItemName Data Type Bool Bool Float Float Bool Bool Float Float Action Scanned Elements Array Allowed? No No No No No No No No
Set high alarm state Enable high alarm Set high alarm setpoint Set high alarm deadband Set low alarm state Enable low alarm Set low alarm setpoint Set low alarm deadband
59 59
PID
To do this Use this ItemName Data Type F F F F F F F F F F F I I I F F F F F F F F Action Scanned Elements Array Allowed? N N N N N N N N N N N N N N N N N N N N N N
Current value: Input Current value: Setpoint Current value: Output Current value: Feed Forward Current value: Error Current value: Gain contribution Current value: Integral contribution Current value: Derivative contribution Current value: Integral Last scanned value: Input Last scanned value: Setpoint Status flags Status flags on mask Status flags off mask Tuning: Proportional value Tuning: Integral value Tuning: Derivative value Tuning: Feed Forward gain Configuration: Max output change allowed] Configuration: Min output change allowed Configuration: Scan time in seconds Configuration: Output when input is low
PID_CV_IN PID_CV_SP PID_CV_OUT PID_CV_FF PID_CV_ERROR PID_CV_P PID_CV_I PID_CV_D PID_CV_INTEGRAL PID_LSV_IN PID_LSV_SP PID_STATUS PID_STATUS_ON PID_STATUS_OFF PID_TUNE_P PID_TUNE_I PID_TUNE_D PID_TUNE_FF PID_CFG_MAX_OUT PID_CFG_MIN_OUT PID_CFG_SCAN_TIME PID_CFG_LOW_RANGE
R R R/W R/W R R R R R R/W R/W R/W W W R/W R/W R/W R/W R/W R/W R/W R/W
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127
60
To do this
Data Type F I I I I I I I I F F F F I
Action
Scanned
Elements
Array Allowed? N N N N N N N N N N N N N N
Configuration: Output when input is high Configuration: Algorithm choice Configuration: Manual mode - 1=Yes 0=No Configuration: Flags Configuration: Flags on mask Configuration: Flags off mask Configuration: Input mem map address Configuration: Setpoint mem map address] Configuration: Output mem map address Scaling: Input low range Scaling: Input high range Scaling: Output lower clamp Scaling: Output upper clamp Scan Counter
PID_CFG_HI_RANGE PID_CFG_ALG PID_CFG_MAN_MODE PID_CFG_FLAGS PID_CFG_FLAGS_ON PID_CFG_FLAGS_OFF PID_CFG_MM_IN PID_CFG_MM_SP PID_CFG_MM_OUT PID_SCALE_IN_LOW PID_SCALE_IN_HI PID_SCALE_OUT_LOW PID_SCALE_OUT_HI PID_SCAN_COUNTER
R/W R/W R/W R/W W W R/W R/W R/W R/W R/W R/W R/W R/W
Y Y Y Y Y Y Y Y Y Y Y Y Y Y
0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127
The following table shows some item expressions you could use to communicate with this I/O unit:
To do this Read or change the state of digital point at module 1, point 2 Read or change the engineering units of analog point at module 2, point 0 Read and clear the counter of digital input point at module 0, point 2 Read register element 23 of the Scratch Pad float table for the specified brain You would use this item expression [MMIO|ip|tcp:10.192.55.1:2001]state[6]
[MMIO|ip|tcp:10.192.55.1:2001]eu[8]
[MMIO|ip|tcp:10.192.55.1:2001]counterdata_readclear[2]
[MMIO|ip|tcp:10.192.55.1:2001]sp_float[23]
To calculate the channel number from the module and point, use the following formula:
nChannel=(nModule * nPointsPerModule) + nPoint
where: nModule=module number: 0-63 nPoint=point number: 0-63 nPointsPerModule=points per module: 4 or 64 (for expanded memory map tags such as eu_4096)
61 61
NOTE: To access I/O point data and information in the memory map of a SNAP PAC on-the rack controller or brain, or E1 or E2 brain board, you must use a different item ID. This string is described in Item IDs for I/O Points and Memory Map Data on page 55. Heres what these parameters mean:
Device: Protocol: CONT (Opto 22 SNAP PAC or SNAP Ultimate I/O control engine) or OC (OptoControl controllers with Ethernet) ip (network protocol) tcp: followed by the IP address, in dot notation, and port number for the SNAP PAC R-series or SNAP Ultimate brains control engine (22001). This is the default port number, and is separated from the IP address by a colon. Example: tcp:10.192.55.81:22001 The type of strategy data to read or write on the control engine. See the table below for the DataType to use for what you want to do. The value, state, or other property of the DataType. The name of the strategy variable, chart, or I/O unit.
Location:
The following table shows item names to use for the item ID. The Action column shows whether the item name can be read, written to, or both. Item names marked with a No in the Scanned column are not continually scanned. Consequently, an OPC client will not receive subscription data for these ItemNames. To read data for these ItemNames, an OPC client must perform an explicit read using the Async Read or Sync Read from Device commands. Integers, Floats, Strings, and Timers on page 63 Tables on page 63 Strategy Charts, I/O Units, and Controllers on page 64 Analog Points on page 64 Digital Points (All I/O Units) on page 65 Ethernet PIDs on page 66 Mistic PIDs on page 66 Mistic Events/Reactions on page 66
62
Available Properties
Action
Scanned
VALUE
R/W
Yes
VALUE
R/W
Yes
VALUE
R/W
Yes
VALUE
R/W
Yes
In a 32-bit integer, add a period and the bit number after Value For example, I32;Value.2;nTotalWidgets reads bit 2 in the integer variable nTotalWidgets. If you want a 64-bit integer variable you must write your own custom client. A string variable cannot have embedded nulls.
2 3
Tables
To do this Read or write one or more elements in a 32-bit integer table variable Read or write one or more elements in a 64-bit integer table variable Read or write one or more elements in a floating-point table variable Read or write one or more elements in a string table variable1
1 2
Action R/W
Scanned Yes
VALUE
R/W
Yes
FT
VALUE
R/W
Yes
ST
VALUE
R/W
Yes
A string variable cannot have embedded nulls. If you want a 64-bit integer table variable you must write your own custom client.
Notes: In a 32-bit integer table, add a period and the bit number after the table element number. For example, I32T;Value[3].2;ntTotalWidgets reads bit 2 of element 3 in the integer table variable ntTotalWidgets. To read or write one or more table elements, add the element number or range of elements after Value. For example, I32T;Value[1-3];ntTotalWidgets reads elements 1 through 3 in the integer table ntTotalWidgets.
63 63
W R/W R/W R
No Yes Yes No
* Reading chart states will return the following values: 1 = stopped; 2 = suspended; 3 = running. To change chart states, use the following parameters: 1 = stop; 2 = suspend; 3 = start; 4 = continue.
Analog Points
To do this Read or write analog values in engineering units to or from an I/O unit Retrieve the lowest value of a specified analog input since its last reading Retrieve the lowest value of a specified analog input since its last reading, then reset it to the current value Retrieve the peak value of a specified analog input since its last reading Retrieve the peak value of a specified analog input since its last reading, then reset it to the current value Use this DataType APOINT EU Available Properties Action R/W Scanned Yes
APOINT
MIN
Yes
APOINT
MIN_GET_CLEAR
R/W
No
APOINT
MAX
Yes
APOINT
MAX_GET_CLEAR
No
64
Action R W
Scanned Yes No
R R R R
No Yes Yes No
DPOINT
OFF_PULSE
Yes
R R R R R
No Yes No Yes No
DPOINT
ON_PULSE
Yes
R R R R
No Yes No Yes
R R R R/W R/W
DPOINT
TPO_PERIOD
R/W
Yes
require a firmware upgrade. Not available on legacy I/O units (UIO, EIO, SIO).
65 65
Ethernet PIDs
To do this Read the input value (also known as the process variable) of the PID Read or write the output value of the PID Read or write the setpoint value of the PID Read or write the gain value from the PID Read or write the integral value of the PID Read or write the derivative value of the PID Change the mode of the PID to auto Read or write the scan rate (update period) for a PID calculation Use this DataType PID PID PID PID PID PID PID PID Available Properties INPUT OUTPUT SETPOINT GAIN INTEGRAL DERIVATIVE AUTO SCAN_RATE Action R R/W R/W R/W R/W R/W R/W R/W Scanned Yes Yes Yes Yes Yes Yes Yes Yes
Mistic PIDs
To do this Read the input value (also known as the process variable) of the PID Read or write the output value of the PID Read or write the setpoint value of the PID Read or write the gain value of the PID Read or write the integral value of the PID Read or write the derivative value of the PID Set the loop setpoint equal to the current loop input value Set the loop output to proportionally track the input Enable the PID to update its associated analog output channel Change the mode of the PID to auto Change mode from reset to active Use this DataType MPID MPID MPID MPID MPID MPID MPID Available Properties INPUT OUTPUT SETPOINT GAIN INTEGRAL DERIVATIVE SETPOINT_TRACK_INPUT Action R R/W R/W R/W R/W R/W R/W Scanned Yes Yes Yes Yes Yes Yes Yes
MPID
OUTPUT_TRACK_INPUT
R/W
Yes
Mistic Events/Reactions
To do this Activate a specific event/reaction Determine if a specific event has occurred Determine if the criteria for a specific event is currently true Use this DataType ER ER ER Available Properties SCAN_ENABLE HAS_OCCURRED IS_OCCURRING Action R/W R R Scanned Yes Yes Yes
66
The following table shows some item expressions you could use to communicate with this controller:
To do this Read or change the value of the float variable fSetpoint Read or change the 32-bit integers in elements 6 through 11 of the integer table variable ntRetryLimits. Read or change bit 2 in the 32-bit integer variable nSwitchCounts Read or change the value of the 64-bit integer nnModulesMask Suspend the running chart Process_Monitor Read analog point engineering units of point named fTankLevel Read/Write the gain of mistic PID named MyMisticPID Read/Write the setpoint of Ethernet PID named MyEthernetPID You would use this item expression [CONT|ip|tcp:10.192.55.1:22001]F;Value;fSetpoint
[CONT|ip|tcp:10.192.55.1:22001]I32T;Value[6-11];ntRetryLimits
[CONT|ip|tcp:10.192.55.1:22001]I32;Value.2;nSwitchCounts
[CONT|ip|tcp:10.192.55.1:22001]I64;Value;nnModulesMask
[CONT|ip|tcp:10.192.55.1:22001]CHART;Suspend;Process_Monitor
[CONT|ip|tcp:10.192.55.1:22001]Apoint;EU;fTankLevel
[CONT|ip|tcp:10.192.55.1:22001]MPID;Gain;MyMisticPID
[CONT|ip|tcp:10.192.55.1:22001]PID;Setpoint;MyEthernetPID
Using Pointers
You can get values for PAC Control strategy pointer variables by pre-pending PTR_ to the datatype being pointed to. For example, PTR_I32. You can use pointers for all data types except CTRLR.
67 67
68
Currently connected clients and their groups When items are shown, click Item ID or Type column heading to sort them.
69 69
USING THE REGISTRY CHECKER The server window shows all communication with currently connected clients. If you are monitoring more than one OPC client, each client will have its own set of windows. In addition, you can use the View menu to change the data you see: To see individual item IDs, choose ViewShow Items in List. When items are not shown, the OPC server does not waste time updating the item list. To see item values change, choose ViewUpdate Item Values. o change communication details shown in the window, choose ViewLog Level.
70
OptoOPCServer updates client applications with subscription data from configured devices. A value returned from an input or output point includes the value, data quality, and time stamp. This appendix explains the data quality messages, which may be reported in the client application as a text string, decimal, or hexidecimal value as shown in the following table:
Data Quality Description OPC_QUALITY_BAD OPC_QUALITY_COMM_FAILURE OPC_QUALITY_DEVICE_FAILURE OPC_QUALITY_GOOD OPC_QUALITY_LAST_KNOWN OPC_QUALITY_NOT_CONNECTED OPC_QUALITY_OUT_OF_SERVICE Decimal 0 24 12 192 20 8 28 Hex
0x00
0x18 0x0C 0xC0 0x14 0x08 0x1C
OPC_QUALITY_BAD (0 decimal; 00 hex) In one situation where the tag has been scanned successfully, the quality may be set to OPC_QUALITY_BAD. This occurs when a float value is a NAN (not a number). This can occur with an analog value when the analog module is not accessible to the brain for the rack it is mounted on. OPC_QUALITY_COMM_FAILURE (24 decimal; 18 hex) The OPC server tries to connect to the appropriate device to obtain data for the tag. If it cannot connect, the quality is set to OPC_QUALITY_COMM_FAILURE. The scanner will keep trying to connect, but the quality will remain at OPC_QUALITY_COMM_FAILURE until it connects. The quality will never return to OPC_QUALITY_NOT_CONNECTED for this connection. OPC_QUALITY_ COMM_FAILURE could be caused by the following:
A unit is not powered up. The Ethernet cable is not connected. The network is down. A hub/switch/router is offline.
71 71
OPC_QUALITY_DEVICE_FAILURE (12 decimal; 0C hex) If the connection to the device is good, but either the device is busy or the tag is undefined at the device, the quality changes to OPC_QUALITY_DEVICE_FAILURE.
A device is busy when the controller's host ports have been locked temporarily for one of the following reasons: During PAC Control strategy downloads While saving a strategy archive to the control engine (normally done in conjunction with a strategy download) While transferring files to the control engine using PAC Terminal While viewing control engine error queue errors via PAC Control or PAC Terminal The strategy could have been modified and some of the tags may have been deleted, and then the modified strategy downloaded to the controller. Trying to access those tags will result in OPC_QUALITY_DEVICE_FAILURE because the tags are undefined. The tag name is misspelled. All tag names are case sensitive, so if the tag name in the strategy is in lowercase, for example, and the OPC client is using the tag name with all caps, then it will not match. The strategy was modified and one or more of the tag names were changed. The strategy was cleared from the controller. You are trying to read a table element beyond the end of the table.
OPC_QUALITY_GOOD (192 decimal; C0 hex) If the tag is scanned successfully, the quality changes to OPC_QUALITY_GOOD. OPC_QUALITY_LAST_KNOWN (20 decimal; 14 hex) If a tag has been successfully scanned and then communication to the device is lost, the quality changes to OPC_QUALITY_LAST_KNOWN. OPC_QUALITY_NOT_CONNECTED (8 decimal; 08 hex) When tags are added to the OptoOPCServer, the quality is set to OPC_QUALITY_NOT_CONNECTED. Once the connection is established or fails, then the data quality is updated. This initial attempt to connect may take a while, during which time the quality stays at OPC_QUALITY_NOT_CONNECTED. Every item quality is set to this when the item is first added, and there is no other use of this quality code. OPC_QUALITY_OUT_OF_SERVICE (28 decimal; 1C hex) This message occurs when a value is requested for an item that is not active or for an item whose group is not active.
72
73 73
74
IndexOptoOPCServer
Index
A
Access Permission dialog box, 44, 52 accessing bits integer variables, 63 table variables, 63 Add a Port dialog box, 35, 49 Update Server, 13 Windows Firewall, 35, 48 Write Item, 19 domain controller, 31 domains, 28
F B
bits accessing bits of integer variables, 63 accessing bits of table variables, 63 browser database, 7, 11 removing, 20 uploading, 13 browser items, 7, 11 copying, 11 firewall, 35, 48
H
high-density digital tags, 19
I
I/O points, 55, 61 item ID, 17, 55, 61
C
client access, 25 copying browser items, 11
L
Launch Permission dialog box, 38
D
data quality, determining, 73 data types, 56 debugging, 2, 69 server, 7 dialog boxes Access Permission, 52 Add a Port, 35, 49 Launch Permission, 38 Select a Strategy File and Controller, 10
M
memory map, 55 data, 61 messages, data quality, 71
N
network security, 23
75 75
O
OPC syntax rules, 55 OPC Test Client, 14 open access, 24 Opto 22 tag database (.otg), 55
T
tag browser interface, 7 tags, 7 high-density digital, 19 test client, 14
P
peer-to-peer network, 28 pointers, 67
U
Update Server dialog box, 13 user access, 24 user group, 25 user identity, 25 users, types of, 27
R
Registry Checker utility program, 70 restricted access, 24
W
Windows firewall dialog box, 35, 48 workgroups, 28 Write Item dialog box, 19
S
sample client, 14 Select a Strategy File and Controller dialog box, 10 server window, 70 setting up, 7 subscription data, 56
76