Sei sulla pagina 1di 82

OPTOOPCSERVER USERS GUIDE

Form 1439-090309March, 2009

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: support@opto22.com 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

OptoOPCServer Users Guide

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

OptoOPCServer Users Guide

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

OptoOPCServer Users Guide

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

OptoOPCServer Users Guide

vv

vi

OptoOPCServer Users Guide

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.

About this Guide


This users guide shows you how to set up and use OptoOPCserver. This guide assumes that you are already familiar with Microsoft Windows on your personal computer, including how to use a mouse, standard commands, and menu items to open, save, and close files. If you are not familiar with Windows or your PC, refer to the documentation from Microsoft and your computer manufacturer. In addition, a basic understanding of network security would be helpful. Heres what is in this users guide: Chapter 1, IntroductionThis chapter provides information about the guide, and how to reach Opto 22 Product Support. Chapter 2, Using OptoOPCServerThis chapter provides information about system architecture and how to set up OptoOPCServer Chapter 3, Using DCOM SecurityThis chapter describes the security options you can use with Windows networks when the OptoOPCServer and its clients are installed on separate workstations. Chapter 4, Setting Up DCOM SecurityThis chapter details how to set up Distributed Component Object Model (DCOM) security on an OptoOPCServer network.

OptoOPCServer Users Guide

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 support@opto22.com www.opto22.com NOTE: Email messages and phone calls to Opto 22 Product Support are grouped together and answered in the order received.

Fax: Email: Opto 22 website:

OptoOPCServer Users Guide

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

OptoOPCServer Users Guide

33

SYSTEM REQUIREMENTS

OptoOPCServer Users Guide

2: Using OptoOPCServerChapter 2

Using OptoOPCServer

How OptoOPCServer Works


OptoOPCServer acts as an OPC translator by: Translating incoming OPC messages into the memory-mapped form used by the I/O side of SNAP PAC R-series controllers, including those in SNAP PAC EB-series brains, SNAP Ultimate I/O, SNAP Ethernet I/O and SNAP Simple I/O product families, as well as the Ethernet-based E1 and E2 brain boards. Translating incoming OPC messages into the form used by SNAP PAC S-series controllers, SNAP PAC R-series controllers, the SNAP Ultimate brain, the SNAP-LCM4 controller (with M4SENET-100 Ethernet adapter card), or the SNAP-LCE controller. Translating outgoing messages from Ethernet-based controllers, brains, and brain boards into the OPC format.

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.

OptoOPCServer Users Guide

55

INSTALLING OPTOOPCSERVER

OPC-compliant HMI Browser Configurator (Can be on the same computer running OptoOPCServer) Data OPC server layer

KEY:

Devices directlyscanned by OptoOPCServer

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

Legacy SNAP-LCM4 with ioControl

I/O layer SNAP I/O (Serial networks)

Real-world assets

Accessing Legacy Controllers


PAC Display (and other OPC-compliant HMIs) can access any PAC Controller or ioControl controller (Ultimate or LCE) as long as each controller has firmware 7.0 or newer. Therefore, if you are using one integrated HMI project that accesses multiple Opto 22 systems of varying vintages, in order to ensure proper communication to each component, make sure each controller has firmware 7.0 or newer.

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.

OptoOPCServer Users Guide

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

Browser databases OptoOPCServer

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.

SNAP PAC R-series I/O unit

Ethernet-based I/O SNAP-PAC S-series unit with a SNAP brain, controller or E1 or E2 brain board

Legacy SNAP-LCM4 controller

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

OptoOPCServer Users Guide

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 Control OptoControl

Strategy.idb Strategy.cdb Config.otg

PAC Manager

Browser database

data.bdb

OPC Server

OPC Clients

A. Create Browser Items


You create browser items when you create a strategy in PAC Control or create I/O unit configuration files in PAC Manager. For more information on creating strategies and I/O unit configuration files, see the PAC Control and PAC Manager users guides.

B. Open Browser Items File


Browser items are derived from the source file containing the PAC Control, I/O unit, or OptoControl tags that you want to expose to OPC clients. You can open multiple browser items files, and save the browser items in the same database. Once you use a tag in a browser database, its source browser item remains referenced in the database.

OptoOPCServer Users Guide

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.

4. Highlight the filename and click Open.

Depending on the type of file you opened, see the appropriate section below.

OptoOPCServer Users Guide

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.

Click plus and minus symbols to expand and collapse

Tags associated with the selected browser item

Select browser items from I/O unit configuration file

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

OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

Click plus and minus symbols to expand and collapse

Tags associated with the selected browser item

Select browser items from I/O unit configuration file

C. Build Browser Database


NOTE: High Density Digital tags require special treatment. See Defining High-Density Digital Tags on page 19. After opening one or more browser items files, you can add tags to your browser database. The source files of any tag in your browser database remain referenced, so you will not need to add the same browser items again if you reopen your browser database. However, if your source file has new tags and you want to expose them to OPC clients, you will need to reopen the file to get the new tags. To build the browser database, do the following: 1. Use the hierarchical tree in the top left side of the application window to locate specific tags. Click the plus symbols to expand groups. Click the minus symbols to collapse groups.
2. Select an item or folder in the top left source pane to display all of the selections associated tags in the top right pane.

OptoOPCServer Users Guide

11 11

SETTING UP OPTOOPCSERVER

Browser item: PAC Control strategy

You can drag entire folders into the browser database.

Variables folder selected

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

OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER


6. To save your browser database, select Save from the File menu.

7. Type a meaningful description, and then click OK.

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.

D. Load Browser Database to OptoOPCServer


You use the Opto Browser Configurator to load browser databases to OptoOPCServer. Once loaded to the OPC server, OPC client programs will have access to the tags through their browser capability. Loading a browser database overwrites a previously loaded database of the same name. Use unique filenames to upload multiple browser database files. To upload a browser database, do the following: 1. If you do not have a browser database open, choose FileOpen and navigate to your browser database. 2. Choose ServerUpdate Server with Current Browser Database. The Update Server dialog box appears.

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.

OptoOPCServer Users Guide

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.

E. Connect OPC Client to Browser Database


OptoOPCServer includes a sample OPC client that you can use to test OptoOPCServer and the browser databases you create. This application provides a minimal means of connecting and interacting with OptoOPCServer and is provided as a test utility only. To run the client with OptoOPCServer: 1. From the Start menu, choose ProgramsOpto 22PAC ProjectOptoOPCServerOPC Test Client. 2. From the Server menu, choose Connect to display a dialog box with a list of registered servers on the local computer.

14

OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

Registered OPC server

Node name

3. Click Opto22.OpcServer.2 in the Located Servers list.

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.

The node name of a remote computer is the machine name.


5. Click OK to return to the clients main window.

Group list area

Item list area, showing Items for the highlighted group

Message log area

OptoOPCServer Users Guide

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.

The new group appears in the main window.


8. From the Item menu, choose Add Item. (Or right-click the item area of the window and choose Add Item from the pop-up menu.)

9. In the lower-left part of the window, click the plus signs to expand the list of items.

16

OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

Click the plus signs to expand the list.

10. Click to highlight an input or output point you want to use.

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.

The OPC item ID also appears in the Items to be Added list.

In this example, the value of the PAC Control strategy variable Humity has been chosen.

12. Click the Add Item button.

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

OptoOPCServer Users Guide

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.

16. From the pop-up menu, choose Sync Write.

18

OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

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.

The new value is written to the item.

Defining High-Density Digital Tags


Tags for points on SNAP high-density digital modules are handled somewhat differently from other tags in OptoOPCServer. 1. Do not drag the group High Density Digital into the browser database. Instead, select High Density Digital to display the specific tags, such as HDD_STATE, HDD_ONLATCH, and HDD_OFFLATCH, and then drag these tags into the browser database. 2. Specify the module number (the modules position on the rack) and the point numbers as shown below.

OptoOPCServer Users Guide

19 19

REMOVING A BROWSER DATABASE FROM OPTOOPCSERVER

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.

Removing a Browser Database from OptoOPCServer


1. From the OptoBrowser Configurator application window, choose ServerRemove Browser Database from Server. 2. If OptoOPCServer resides on the same workstation as Opto Browser Configurator, choose Local. If OptoOPCServer resides on another computer on the network, choose Remote.

20

OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER If you chose Remote, type the name of the machine running OptoOPCServer.

3. Click Connect to Server.

All browser databases loaded to OptoOPCServer are listed by their description.

4. Select the browser database you want to delete and click Remove. 5. Repeat Steps 1 through 4 to remove additional browser databases.

OptoOPCServer Users Guide

21 21

REMOVING A BROWSER DATABASE FROM OPTOOPCSERVER

22

OptoOPCServer Users Guide

3: Using DCOM SecurityChapter 3

Using DCOM Security

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

Typical DCOM Scenarios


The following three scenarios offer some general possibilities that may apply to your situation. You can use this information to talk to your network administrator or with Opto 22 Product Support if you should need to troubleshoot communication problems or change the default security settings. Scenarios 1 and 2 use default network settings and have typical variations of network log-ins. Scenario 3 takes advantage of the advanced DCOM network security features. To use these features you will need to edit the DCOM configuration settings on both OPC server and OPC client workstations. In addition, you might consider the following possibilities when setting up your network: OptoOPCServer can operate as an OPC server either on a local or remote computer. OPC clients may be on one workstation or on different workstations. Operators of the OPC clients may log in using the same or different user names.

OptoOPCServer Users Guide

23 23

TYPICAL DCOM SCENARIOS

Scenario 1: Open Access (No Security)


OptoOPCServer is running on a network server with no user logged in to the server.

Network server with OptoOPCServer No user logged in to server

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.

Scenario 2: Restricted Access with Single Authorized User


OptoOPCServer is running on a workstation or network server that has a user logged in to it.

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

OptoOPCServer Users Guide

CHAPTER 3: USING DCOM SECURITY

Scenario 3: Restricted Access with Multiple Authorized Users


OptoOPCServer is running on a server or workstation that has had its default security settings modified to allow access by members of a user group.

Access Denied Server and client workstations logged in as members of the same user group

Network server with OptoOPCServer

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.

Client Access Control


When OptoOPCServer resides on a workstation separate from the clients, you may want to control who or which applications can launch OptoOPCServer and have access to its data. An administrator on a workstation can designate that an installed program run under a user identity. Similar to a network user identity, an application user identity requires a user to log in with a name and password in order to launch the program and have access to its data.

OPC Client and Server Communication


The types of communication that need to take place between an OPC client and server determine the configuration settings you must make to each computer. The communication between client and server consists of a series of requests to launch programs and to gain access to the programs information. DCOM provides features to manage this communication at both the computer and application levels. In other words, a computer can be configured to grant access to specific users, and an application can be configured to grant access to other users.

OptoOPCServer Users Guide

25 25

CLIENT ACCESS CONTROL

OPC Client Client Username Password Typical user log-in

Network Dedicated Network Server

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

OptoOPCServer Users Guide

CHAPTER 3: USING DCOM SECURITY

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.

OptoOPCServer Users Guide

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.

Domains and Workgroups


You can use OptoOPCServer in a DCOM network that is set up either as a domain or as a workgroup. For more information see Setting Up DCOM Security on page 31: A domain has a domain controller that users must log in to in order to access the system. A workgroup is peer-to-peer network with no domain controller. Each workstation has a copy of the workgroup configuration for users to log in.

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

OptoOPCServer Users Guide

CHAPTER 3: USING DCOM SECURITY

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.

OptoOPCServer Users Guide

29 29

DOMAINS AND WORKGROUPS

30

OptoOPCServer Users Guide

4: Setting Up DCOM SecurityChapter 4

Setting Up DCOM Security

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

OptoOPCServer Users Guide

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

Configuring the OPC Server Workstation


You need to configure the OPC server workstation only if OptoOPCServer and the client software are on separate workstations. The instructions are for Windows XP with Service Pack 2. Differences for the Vista operating system are noted.

A. (Workgroup Only) Creating a User Account on the Server Workstation


If you have a workgroup, you need to create a user account on the OPC server workstation for each client user account that will access the OPC server. 1. On the Start menu, right-click My Computer (or just Computer in Vista) and select Manage. The Computer Management dialog box appears.
2. Expand Local Users and Groups, and then open the Users folder.

32

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


3. Place the cursor under the list of users, right-click and select New User.

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.

OptoOPCServer Users Guide

33 33

CONFIGURING THE OPC SERVER WORKSTATION


10. In the Select Groups dialog box, type Administrators, and then click OK.

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.

B. Enabling Network Sharing on the OPC Server Workstation


1. Open My Computer. 2. Right-click the C: drive and select Properties. 3. Click the Sharing tab, find the area called Network sharing and security, and do one of the following as appropriate:

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

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

C. Configuring the Windows Firewall on the OPC Server Computer


1. 2. 3. 4.

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.

OptoOPCServer Users Guide

35 35

CONFIGURING THE OPC SERVER WORKSTATION


9. Click the Add Program button.

10. Select OptoOPCServer, then click OK.

OptoOPCServer appears in the list of Exceptions.


11. Click OK to close the Windows Firewall dialog box.

D. Configuring the OptoOPCServer DCOM Properties


1. Select StartRun (or use Windows key + R) to open the Run dialog box. 2. Enter dcomcnfg, and then click OK.

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

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


The applications with DCOM configurations appear in the right pane.

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.

OptoOPCServer Users Guide

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.

10. Select Administrators and check all of the Allow boxes.

38

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


11. Select INTERACTIVE and check the Allow boxes for Local Launch and Local Activation.

12. Select SYSTEM and check all of the Allow boxes.

OptoOPCServer Users Guide

39 39

CONFIGURING THE OPC SERVER WORKSTATION


13. To add the Everyone group, click Add.

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

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


d. Click OK.

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.

OptoOPCServer Users Guide

41 41

CONFIGURING THE OPC SERVER WORKSTATION


20. To set the Default Launch Permissions, right-click on My Computer in the directory tree and select Properties from the pop-up menu.

21. To allow permissions, click the COM Security tab. 22. In the Launch and Activation Permissions area, click Edit Limits.

23. Select Administrators, and check all of the Allow boxes.

42

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


24. Select Everyone, and check all of the Allow boxes.

25. Click OK to close the Launch Permission dialog box.

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

ANONYMOUS LOGON Local Access Remote Access X X

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.

OptoOPCServer Users Guide

43 43

CONFIGURING THE OPC SERVER WORKSTATION


28. In the Access Permission dialog box, select ANONYMOUS LOGON and check both Allow boxes.

29. Select Everyone, check both Allow boxes, and then click OK to close the Access Permission dialog box.

44

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


30. To allow SELF and SYSTEM permissions, click Edit Default under Access Permissions.

31. Select SELF and check both Allow boxes. 32. Select SYSTEM and check both Allow boxes.

OptoOPCServer Users Guide

45 45

CONFIGURING THE OPC SERVER WORKSTATION


33. To add permissions for Everyone, click Add to open the Select Users or Groups dialog.

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

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


b. Type the name of the user. c. Click Check Names. The workstation name and user name appear underlined. d. Click OK.

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.

OptoOPCServer Users Guide

47 47

CONFIGURING A REMOTE CLIENT WORKSTATION


b. Do not select Enable COM Internet Services on this computer. c. Under Default Authentication Level, select None. d. Under Default Impersonation Level, select Identify.

40. Click OK to close the My Computer dialog box, and then close the other open dialog boxes.

Configuring a Remote Client Workstation


The following steps are for Windows XP with Service Pack 2. You can have one or more OptoOPCServer client workstations. However, make sure that the OptoOPCServer software is installed on every client workstation, and that each remote client workstation is configured as described below. NOTE: If you have already configured the OPC server workstation, and the client software is on the same OPC server workstation, you dont need to configure the OPC server workstation again for the client.

E. Configuring the Windows Firewall on the Client Computer


1. 2. 3. 4. 5.

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

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


c. Make sure TCP is selected. d. Click OK to close the Add a Port dialog box.

6. To add client programs, click the Add Program button.

7. Select OPC Test Client then click OK.

OPC Test Client appears in the list of Exceptions.

OptoOPCServer Users Guide

49 49

CONFIGURING A REMOTE CLIENT WORKSTATION


8. Repeat step 6 and 7 for each client program that needs to communicate with OptoOPCServer, such as PAC Display. 9. Click OK to close the Windows Firewall dialog box.

F. Configuring the OptoOPCServer DCOM Properties on the Client Computer


1. Select StartRun (or use Windows key + R) to open the Run dialog box. 2. Enter dcomcnfg, and then click OK.

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

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY


4. Right-click on My Computer in the directory tree and select Properties from the pop-up menu.

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.

OptoOPCServer Users Guide

51 51

CONFIGURING A REMOTE CLIENT WORKSTATION


6. In the Access Permission dialog box, select ANONYMOUS LOGON and check both Allow boxes.

7. Select Everyone, check both Allow boxes, and then click OK to close the Access Permission dialog box.

8. Under Access Permissions, click Edit Default.

52

OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY The Access Permission dialog appears.

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.

OptoOPCServer Users Guide

53 53

CONFIGURING A REMOTE CLIENT WORKSTATION


b. Do not select Enable COM Internet Services on this computer. c. Under Default Authentication Level, select None. d. Under Default Impersonation Level, select Identify.

13. Click OK to close the My Computer dialog box, and then close the other open dialog boxes.

G. Enabling Network Sharing on the Client Workstation


1. Open My Computer. 2. Right-click on the C: drive and select Properties. 3. Click the Sharing tab, find the area called Network sharing and security, and do one of the following as appropriate:

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

OptoOPCServer Users Guide

5: Creating Communication MessagesChapter 5

Creating Communication Messages


The client communicates with the OPC server through standard links or messages. If your OPC client supports the OPC 2.0 tag browser interface, you normally will not need to create these messages; they will be automatically copied directly from the Opto 22 tag database (the .otg, .idb, or .cdb file created in PAC Manager, PAC Control, or OptoControl). If your client does not support the tag browser interface, however, or if you need an item ID that is not listed in the tag browser, you must create the messages. This section shows you how. OPC syntax rules are the same for all clients. The link or message consists of three parts, or expressions: server, access path, and item ID. The server is the name and location of the server supplying the data. Use Opto22.OpcServer.2 as the server. If the server is on the same PC as the client, thats all you need. If the server is on a different PC, use the name of that PC as the node name, to indicate the servers location. The access path is an optional piece of information. OptoOPCServer ignores the access path and will accept any data. The item ID is a string that specifies the data requested. See Item IDs for I/O Points and Memory Map Data below and Item IDs for Control Strategy Variables on page 62 for more information.

Item IDs for I/O Points and Memory Map Data


The item ID string for accessing I/O point data and information in a SNAP Ethernet-based memory map looks like this:
[Device|Protocol|Location]ItemName[PointNumber]

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.

OptoOPCServer Users Guide

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

OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

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

R/W R/W R R R R R/W R/W R R R R

Yes Yes Yes Yes No No Yes Yes Yes Yes No No

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

Digital Point (4-Channel Digital Modules)


To do this Use this ItemName Data Type Bool Bool Bool Bool Long Bool Bool Long Action Scanned Elements Array Allowed? No No No No Yes Yes Yes Yes

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

STATE ONLATCH OFFLATCH ACTIVECOUNTER COUNTERDATA ONLATCH_READCLEAR OFFLATCH_READCLEAR COUNTERDATA_READCLEAR

R/W R R R/W R R R R

Yes Yes Yes Yes Yes No No No

063 063 063 063 063 063 063 063

* 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.

OptoOPCServer Users Guide

57 57

ITEM IDS FOR I/O POINTS AND MEMORY MAP DATA

High-Density Digital (HDD) Point


To do this Use this ItemName Data Type Bool Action Scanned Module Point Array Allowed? No

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

HDD_COUNTER(m)[p] HDD_COUNTER_READCLEAR( m)[p] HDD_BANK_STATE(m)

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

HDD_BANK_OFFLATCH(m) HDD_BANK_ONLATCH_CLEAR (m) HDD_BANK_OFFLATCH_CLEA R(m)

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

OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

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

MODULETYPE POINTTYPE FEATURE OFFSET

R R/W R/W R/W

No No No No

063 063 063 063

GAIN HISCALE LOSCALE MODULETYPE_4096 POINTTYPE_4096 FEATURE_4096 OFFSET_4096

Float Float Float Long Long Long Float

R/W R/W R/W R R/W R/W R/W

No No No No No No No

063 063 063 04095 04095 04095 04095

No No No No No No No

GAIN_4096 HISCALE_4096 LOSCALE_4096

Float Float Float

R/W R/W R/W

No No No

04095 04095 04095

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

ALARM_HI_STATE ALARM_HI_ENABLE ALARM_HI_SETPOINT ALARM_HI_DEADBAND ALARM_LO_STATE ALARM_LO_ENABLE ALARM_LO_SETPOINT ALARM_LO_DEADBAND

R R/W R/W R/W R R/W R/W R/W

Yes Yes Yes Yes Yes Yes Yes Yes

063 063 063 063 063 063 063 063

OptoOPCServer Users Guide

59 59

ITEM IDS FOR I/O POINTS AND MEMORY MAP DATA

Scratch Pad (SNAP PAC controllers and Ultimate brains only)


To do this Read or write Scratch Pad bit Read or write Scratch Pad integer Read or write Scratch Pad integer Read or write Scratch Pad float Read or write Scratch Pad float Read or write Scratch Pad string Use this ItemName SP_BIT SP_INTEGER SP_INTEGER_EXT SP_FLOAT SP_FLOAT_EXT SP_STRING Data Type Bool Long Long Float Float Str Action R/W R/W R/W R/W R/W R/W Scanned Yes Yes Yes Yes Yes Yes Elements 063 01023 102410239 01023 102410239 063 Array Allowed? Yes Yes Yes Yes Yes Yes

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

OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

To do this

Use this ItemName

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

Item ID Examples: I/O Points and Memory Map Data


Suppose you are communicating to a SNAP PAC R-series I/O unit with an IP address of 10.192.55.1. Remember that the item expression syntax is like this:
[Device|Protocol|Location]ItemName[PointNumber]

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)

OptoOPCServer Users Guide

61 61

ITEM IDS FOR CONTROL STRATEGY VARIABLES

Item IDs for Control Strategy Variables


The item ID string for accessing variables in PAC Control and OptoControl strategies running on a SNAP Ethernet-based controller looks like this:
[Device|Protocol|Location]DataType;Property;VariableName

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:

DataType Property VariableName

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

See the following sections:

62

OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

Integers, Floats, Strings, and Timers


To do this Use this DataType Integers Read or write 32-bit integer variable I321, 2 Floats Read or write floating-point variable F Strings Read or write string variable3 S Timers Read or write timer variable
1

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

Use this DataType I32T2 I64T

Available Properties VALUE

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.

OptoOPCServer Users Guide

63 63

ITEM IDS FOR CONTROL STRATEGY VARIABLES

Strategy Charts, I/O Units, and Controllers


To do this Start or stop a chart in a control strategy Suspend a running chart in a control strategy, or re-start a suspended chart Change the state of a chart in a control strategy Enable or disable an I/O unit defined in a control strategy Read the following control engine information: Available memory Current time Current date Name of control strategy running Total number of errors since the strategy started Description of the last error that occurred Time stamp of the strategy file on the controller Date stamp of the strategy file on the controller Synchronize the controller time to the time on the PC thats running OptoOPCServer. CTRLR Use this DataType CHART Available Properties START STOP SUSPEND CONTINUE STATE* ENABLE Action W Scanned No

CHART CHART IOUNIT CTRLR

W R/W R/W R

No Yes Yes No

MEMORY TIME DATE STRATEGYNAME ERRORCOUNT LASTERROR STRATEGYTIME STRATEGYDATE SYNCDATETIME W 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

OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

Digital Points (All I/O Units)


To do this Read a standard digital input counter counter value Reactivate a standard digital input counter or quadrature counter Read and clear a standard digital input counter or quadrature counter value Read digital input frequency value1 Read the state of an off-latch Read and re-arm a high-speed off-latch associated with a standard digital input Read the off-time duration of a digital input that has had an on-off-on transition1 Read and clear the off-time duration of a digital input that has had an on-off-on transition1 Read digital input total off time1 Read digital input total off time and restart1 Read the state of an on-latch Read and re-arm a high-speed on-latch associated with a standard digital input Read the on-time duration of a digital input that has had an off-on-off transition1 Read and clear the on-time duration of a digital input that has had an off-on-off transition1 Read digital input total on time1 Read digital input total on time and restart1 Read the elapsed time during an on-off-on or an off-on-off transition of a digital input1 Read and clear the elapsed time during an on-off-on or an off-on-off transition of a digital input1 Read the completion status of a period measurement1 Read a quadrature counter value1 Read the current state (ON or OFF) of a digital point Read or write the on time of an output point as a percentage1 Read or write the time proportional output (TPO) period of an output point1
1 May

Use this DataType DPOINT DPOINT

Available Properties COUNTER COUNTER_ENABLE

Action R W

Scanned Yes No

DPOINT DPOINT DPOINT DPOINT

COUNTER_GET_CLEAR FREQUENCY OFF_LATCH OFF_LATCH_GET_CLEAR

R R R R

No Yes Yes No

DPOINT

OFF_PULSE

Yes

DPOINT DPOINT DPOINT DPOINT DPOINT

OFF_PULSE_GET_RESTART OFF_TIME OFF_TIME_GET_RESTART ON_LATCH ON_LATCH_GET_CLEAR

R R R R R

No Yes No Yes No

DPOINT

ON_PULSE

Yes

DPOINT DPOINT DPOINT DPOINT

ON_PULSE_GET_RESTART ON_TIME ON_TIME_GET_RESTART PERIOD

R R R R

No Yes No Yes

DPOINT DPOINT DPOINT DPOINT DPOINT

PERIOD_GET_RESTART PULSE_PERIOD_COMPLETE QUAD_COUNTER STATE TPO_PERCENT

R R R R/W R/W

No Yes Yes Yes Yes

DPOINT

TPO_PERIOD

R/W

Yes

require a firmware upgrade. Not available on legacy I/O units (UIO, EIO, SIO).

OptoOPCServer Users Guide

65 65

ITEM IDS FOR CONTROL STRATEGY VARIABLES

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

MPID MPID MPID

OUTPUT_ENABLE AUTO ACTIVE

R/W R/W R/W

Yes Yes 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

OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

Item ID Examples: PAC Control Strategy Variables


Suppose you are communicating to a SNAP -PAC-S1 controller running an PAC Control strategy. This controller has the IP address of 10.192.55.1. Remember that the item expression syntax for accessing strategy variables and other information is like this:
[Device|Protocol|Location]DataType;Property;VariableName

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.

OptoOPCServer Users Guide

67 67

ITEM ID EXAMPLES: PAC CONTROL STRATEGY VARIABLES

68

OptoOPCServer Users Guide

6: Debugging and TroubleshootingChapter 6

Debugging and Troubleshooting


Debugging in the OptoOPCServer Window
You may find data in the OptoOPCServer window useful for debugging. The OPC server is normally launched by the client and runs invisibly; in order to see its data, you must start it before starting the client. You cannot open the OPC server window after the client has launched the OPC server. 1. From the Start menu, choose ProgramsOpto 22PAC ProjectOptoOPCServerOptoOPCServer. The blank server window opens.
2. Launch the OPC client. For the sample client, you would choose StartProgramsOpto 22PAC ProjectOptoOPCServerOPC Test Client. 3. In the client window, create groups and add items as needed. For more information, see Setting Up OptoOPCServer on page 7. 4. Click inside the server window.

Currently connected clients and their groups When items are shown, click Item ID or Type column heading to sort them.

Communication log for all connected clients

OptoOPCServer Users Guide

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.

Using the Registry Checker


OptoOPCServer includes the Registry Checker utility program, which you may be asked to run if you contact Opto 22 Product Support with a problem with OptoOPCServer. This program displays the registry values for each item listed in the file GUIDS.TXT, which shows how different software components installed with OptoOPCServer are registered on your computer. This information helps Opto 22 Product Support staff to diagnose possible problems with how OptoOPCServer software components are installed on your computer. To open Registry Checker, choose ProgramsOpto 22PAC ProjectOptoOPCServerRegistry Checker.

Testing a Browser Database


If you need to check which browser databases are loaded on OptoOPCServer but your OPC client fails to connect to OptoOPCServer, you can use the Delete Browser Database function on the Opto Browser Configurator to see the list of browser databases. See Removing a Browser Database from OptoOPCServer on page 20. In addition, you can test a browser database using the sample OPC client provided with the client-side development tools. For more information, see page 14.

70

OptoOPCServer Users Guide

A: Data Quality MessagesAppendix A

Data Quality Messages

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.

OptoOPCServer Users Guide

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.

An undefined tag can be caused by a number of things:

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

OptoOPCServer Users Guide

APPENDIX A: DATA QUALITY MESSAGES

How Data Quality is Determined


This simplified flowchart shows how the data quality is determined when OptoOPCServer updates the device subscription data. OptoOPCServer only reports new data when either the value or the data quality has changed.

OptoOPCServer Users Guide

73 73

HOW DATA QUALITY IS DETERMINED

74

OptoOPCServer Users Guide

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

OptoOPCServer Users Guide

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

OptoOPCServer Users Guide

Potrebbero piacerti anche