1439 optoopcserver users guide

82
OPTOOPCSERVER™ USER’S GUIDE Form 1439-090309—March, 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: [email protected] Web: support.opto22.com

Upload: yamith-david

Post on 21-Feb-2015

101 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 1439 OptoOPCServer Users Guide

OPTOOPCSERVER™

USER’S GUIDE

Form 1439-090309—March, 2009

43044 Business Park Drive • Temecula • CA 92590-3614Phone: 800-321-OPTO (6786) or 951-695-3000

Fax: 800-832-OPTO (6786) or 951-695-2712www.opto22.com

Product Support Services800-TEK-OPTO (835-6786) or 951-695-3080

Fax: 951-695-3017Email: [email protected]

Web: support.opto22.com

Page 2: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guideii

OptoOPCServer User’s GuideForm 1439-090309—March, 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.

Page 3: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide iiiiii

Table of Contents

Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

About this Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

For Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Special 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

Page 4: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guideiv

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

Page 5: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide vv

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

Page 6: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guidevi

Page 7: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide 11

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 GuideThis user’s 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.

Here’s what is in this user’s guide:

Chapter 1, “Introduction”—This chapter provides information about the guide, and how to reach Opto 22 Product Support.

Chapter 2, “Using OptoOPCServer”—This chapter provides information about system architecture and how to set up OptoOPCServer

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

Chapter 4, “Setting Up DCOM Security”—This chapter details how to set up Distributed Component Object Model (DCOM) security on an OptoOPCServer network.

Page 8: 1439 OptoOPCServer Users Guide

RELATED DOCUMENTATION

OptoOPCServer User’s Guide2

Chapter 5, “Creating Communication Messages”—This 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 DocumentationSee the following documents for additional information:

For HelpIf you have problems installing or using OptoOPCServer, first check this guide and the Troubleshooting section of the user’s 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)

Fax: 951-695-3017

Email: [email protected]

Opto 22 website: www.opto22.com

For this information See this guide Form #

Designing flowchart-based control programs for the system

PAC Control User’s Guide1700

PAC Control Command Reference 1701

Configuring I/O points and system functions PAC Manager User’s Guide 1440

Installing and using SNAP PAC Brains. Snap PAC Brains User’s Guide 1690

Installing and using E1 and E2 brain boards. E1 and E2 User’s Guide 1563

Installing and using Opto 22's SNAP PAC R-series of programmable automation controllers

SNAP PAC R-Series Controllers User's Guide

1595

NOTE: Email messages and phone calls to Opto 22 Product Support are grouped together and answered in the order received.

Page 9: 1439 OptoOPCServer Users Guide

CHAPTER 1: INTRODUCTION

OptoOPCServer User’s Guide 33

System RequirementsHere’s 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

Page 10: 1439 OptoOPCServer Users Guide

SYSTEM REQUIREMENTS

OptoOPCServer User’s Guide4

Page 11: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide 55

2: Using OptoOPCServerChapter 2

Using OptoOPCServer

How OptoOPCServer WorksOptoOPCServer 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.

Page 12: 1439 OptoOPCServer Users Guide

INSTALLING OPTOOPCSERVER

OptoOPCServer User’s Guide6

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 OptoOPCServerNOTE: 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.

OPC-compliant HMI

Browser Configurator(Can be on the same computer running OptoOPCServer)

I/O layer

Controller layer

Data OPC server layer OptoOPCServer

SNAP-PAC-S1 with PAC Control

Controller data

Put I/O data into controller variables

SNAP I/O(Serial networks)

Controller data

Legacy SNAP-LCM4 with ioControl

I/O unit data

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

Devices directlyscanned by OptoOPCServer

SNAP on-the-rack controllers

Control engine and I/O unit data

KEY:

Real-world assets

Page 13: 1439 OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

OptoOPCServer User’s Guide 77

If you have trouble installing OptoOPCServer contact Opto 22 Product Support at 800-835-6786 or 951-695-3080.

System ArchitectureTo 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.

Setting Up OptoOPCServerIf 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

OPC clients connect to Browser Databases through the 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.

OptoOPCServer

• Browser databases

SNAP PAC R-series I/O unit

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

Legacy SNAP-LCM4 controller

Browser Configurator

PAC Control or OptoControl

StrategyOPC Client

SNAP-PAC S-series controller

Page 14: 1439 OptoOPCServer Users Guide

SETTING UP OPTOOPCSERVER

OptoOPCServer User’s Guide8

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.

You’ll 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. 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 user’s 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.

PAC Manager

OPC Clients

Config.otg

A B

C D

OPC Server

PAC ControlOptoControl

Strategy.idbStrategy.cdb

Browser database data.bdb

E

Page 15: 1439 OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

OptoOPCServer User’s Guide 99

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 Programs→Opto 22→PAC Project→OptoOPCServer→Browser Configurator.

The Opto Browser Configurator window appears with a new, untitled browser database.

2. From the File menu, choose Browser Items→Open 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.

Page 16: 1439 OptoOPCServer Users Guide

SETTING UP OPTOOPCSERVER

OptoOPCServer User’s Guide10

For .otg Files

If you opened an .otg file for an I/O unit, the contents are now shown in the left pane of the Opto Browser Configurator. The right pane displays the specific tags associated with the browser item selected in the left pane.

For .idb or .cdb Files

If you opened an .idb or .cdb file, the following dialog box appears.

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.

Tags associated with the selected browser item

Click plus and minus symbols to expand and collapse

Select browser items from I/O unit configuration file

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.

Page 17: 1439 OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

OptoOPCServer User’s Guide 1111

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 selection’s associated tags in the top right pane.

Tags associated with the selected browser item

Click plus and minus symbols to expand and collapse

Select browser items from I/O unit configuration file

Page 18: 1439 OptoOPCServer Users Guide

SETTING UP OPTOOPCSERVER

OptoOPCServer User’s Guide12

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.

You can drag entire folders into the browser database.

Browser item: PAC Control strategy

Browser database

Variables folder selected

Select tag and drag to this window to add tag to Browser Database.

Page 19: 1439 OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

OptoOPCServer User’s Guide 1313

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 File→Open and navigate to your browser database.

2. Choose Server→Update 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.

Page 20: 1439 OptoOPCServer Users Guide

SETTING UP OPTOOPCSERVER

OptoOPCServer User’s Guide14

The machine name is the network identification of the computer running OptoOPCServer. You can find its machine name by viewing the computer’s System Properties.

4. Click the Update button.

If you are overwriting a browser database, you’ll 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 Programs→Opto 22→PAC Project→OptoOPCServer→OPC Test Client.

2. From the Server menu, choose Connect to display a dialog box with a list of registered servers on the local computer.

Page 21: 1439 OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

OptoOPCServer User’s Guide 1515

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 client’s main window.

Registered OPC server

Node name

Group list areaItem list area, showing Items for the highlighted group

Message log area

Page 22: 1439 OptoOPCServer Users Guide

SETTING UP OPTOOPCSERVER

OptoOPCServer User’s Guide16

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.

Page 23: 1439 OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

OptoOPCServer User’s Guide 1717

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

The item’s 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.

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.

Click the plus signs to expand the list.

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.

Access Path is not used; leave the field blank.

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

Page 24: 1439 OptoOPCServer Users Guide

SETTING UP OPTOOPCSERVER

OptoOPCServer User’s Guide18

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.

Items added to highlighted group

Scanned values

Group list

Message log

Page 25: 1439 OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

OptoOPCServer User’s Guide 1919

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 TagsTags 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 module’s position on the rack) and the point numbers as shown below.

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.

Page 26: 1439 OptoOPCServer Users Guide

REMOVING A BROWSER DATABASE FROM OPTOOPCSERVER

OptoOPCServer User’s Guide20

NOTE: When using high-density digital points, it is necessary to specify the module and points. You must provide a module number from 0–15, which corresponds to the module’s 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 OptoOPCServer1. From the OptoBrowser Configurator application window, choose Server→Remove 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.

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.

Page 27: 1439 OptoOPCServer Users Guide

CHAPTER 2: USING OPTOOPCSERVER

OptoOPCServer User’s Guide 2121

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.

Page 28: 1439 OptoOPCServer Users Guide

REMOVING A BROWSER DATABASE FROM OPTOOPCSERVER

OptoOPCServer User’s Guide22

Page 29: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide 2323

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

Page 30: 1439 OptoOPCServer Users Guide

TYPICAL DCOM SCENARIOS

OptoOPCServer User’s Guide24

Scenario 1: Open Access (No Security)

OptoOPCServer is running on a network server with no user logged in to the 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 network’s 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.

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.

Network server with OptoOPCServer

No user logged in to server

User 1 is logged in as current user of client and server

Network server with OptoOPCServer

“Access Denied”

OPC Client

Page 31: 1439 OptoOPCServer Users Guide

CHAPTER 3: USING DCOM SECURITY

OptoOPCServer User’s Guide 2525

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.

This scenario uses Window’s 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, you’ll need to edit the DCOM configuration on both the OPC server and client computers.

Client Access ControlWhen 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 program’s 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.

Server and client workstations logged in as members of the same user group Network server with

OptoOPCServer

“Access Denied”

OPC Client

Page 32: 1439 OptoOPCServer Users Guide

CLIENT ACCESS CONTROL

OptoOPCServer User’s Guide26

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 there’s 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.

OPC Client

OptoOPCServer

Read/write browser database

Client UsernamePassword

DedicatedNetworkServer

OPC clients launch and/or access OptoOPCServer

OptoOPCServer writes data to client

Client Workstation

Typical user log-inAccess

AccessLaunch

Network

Page 33: 1439 OptoOPCServer Users Guide

CHAPTER 3: USING DCOM SECURITY

OptoOPCServer User’s Guide 2727

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 OptoOPCServer’s 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.

DCOM Configuration Options enabling secure communication between OptoOPCServer and an OPC client.

Page 34: 1439 OptoOPCServer Users Guide

DOMAINS AND WORKGROUPS

OptoOPCServer User’s Guide28

On the client:

The specific steps to make these changes are provided below.

Domains and WorkgroupsYou 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.

.

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.

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.

Page 35: 1439 OptoOPCServer Users Guide

CHAPTER 3: USING DCOM SECURITY

OptoOPCServer User’s Guide 2929

.

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.

Page 36: 1439 OptoOPCServer Users Guide

DOMAINS AND WORKGROUPS

OptoOPCServer User’s Guide30

Page 37: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide 3131

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.

DomainController

User1OptoOPCServer

User2/ Client

User3/ Client

Page 38: 1439 OptoOPCServer Users Guide

CONFIGURING THE OPC SERVER WORKSTATION

OptoOPCServer User’s Guide32

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.

Configuring the OPC Server WorkstationYou 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.

OPC server

Client

Client

Page 39: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 3333

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

4. In the New User dialog box, enter a name for the new user.

5. Type the password in the Password and Confirm Password fields, and then click Create.

6. If you want to add additional users, repeat steps 4-5 for each new user.

7. When you have added all the new users, click Close.

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

Page 40: 1439 OptoOPCServer Users Guide

CONFIGURING THE OPC SERVER WORKSTATION

OptoOPCServer User’s Guide34

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.

Page 41: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 3535

C. Configuring the Windows Firewall on the OPC Server Computer

1. Open the Control Panel.

2. Double-click Windows Firewall.

3. In the Windows Firewall dialog box, click the Exceptions tab.

4. Click the Add Port button.

5. In the Name field, type DCOM.

6. In the Port number field, type 135.

7. Make sure TCP is selected.

8. Click OK to close the Add a Port dialog box.

Page 42: 1439 OptoOPCServer Users Guide

CONFIGURING THE OPC SERVER WORKSTATION

OptoOPCServer User’s Guide36

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 Start→Run (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.

Page 43: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 3737

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.

Page 44: 1439 OptoOPCServer Users Guide

CONFIGURING THE OPC SERVER WORKSTATION

OptoOPCServer User’s Guide38

Use the following table as a checklist for the COM security settings for the OptoOPCServer workstation described in steps 9 through 25 below.

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.

Custom Opto22.OPCServer.2 Launch Permissions Default Launch Permissions

Administrators INTERACTIVE SYSTEM Everyone This user Administrators Everyone

Local Launch X X X X X X X

Remote Launch X X X X X X

Local Activation X X X X X X X

Remote Activation X X X X X X

Page 45: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 3939

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

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

Page 46: 1439 OptoOPCServer Users Guide

CONFIGURING THE OPC SERVER WORKSTATION

OptoOPCServer User’s Guide40

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.

Page 47: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 4141

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.

Page 48: 1439 OptoOPCServer Users Guide

CONFIGURING THE OPC SERVER WORKSTATION

OptoOPCServer User’s Guide42

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.

Page 49: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 4343

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.

26. To allow ANONYMOUS LOGON, click the COM Security tab.

27. Under Access Permissions, click Edit Limits.

Default COM Security Settings

Access Permissions Limits Access PermissionsDefaults

ANONYMOUS LOGON Everyone SELF SYSTEM This user Everyone

Local Access X X X X X X

Remote Access X X X X X X

Page 50: 1439 OptoOPCServer Users Guide

CONFIGURING THE OPC SERVER WORKSTATION

OptoOPCServer User’s Guide44

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.

Page 51: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 4545

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.

Page 52: 1439 OptoOPCServer Users Guide

CONFIGURING THE OPC SERVER WORKSTATION

OptoOPCServer User’s Guide46

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.

Page 53: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 4747

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.

Page 54: 1439 OptoOPCServer Users Guide

CONFIGURING A REMOTE CLIENT WORKSTATION

OptoOPCServer User’s Guide48

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 WorkstationThe 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 don’t need to configure the OPC server workstation again for the client.

E. Configuring the Windows Firewall on the Client Computer

1. Make sure that the OptoOPCServer software is installed on the client computer.

2. Open the Control Panel.

3. Double-click Windows Firewall.

4. In the Windows Firewall dialog box, click the Exceptions tab.

5. Click the Add Port button and do the following:a. In the Name field, type DCOM.b. In the Port number field, type 135.

Page 55: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 4949

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.

Page 56: 1439 OptoOPCServer Users Guide

CONFIGURING A REMOTE CLIENT WORKSTATION

OptoOPCServer User’s Guide50

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 Start→Run (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.

Page 57: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 5151

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.

5. Under Access Permissions on the COM Security tab, click Edit Limits.

Access Permissions Limits Access Permissions Defaults

ANONYMOUS LOGON

Everyone SELF SYSTEM

Local Access X X X X

Remote Access X X X X

Page 58: 1439 OptoOPCServer Users Guide

CONFIGURING A REMOTE CLIENT WORKSTATION

OptoOPCServer User’s Guide52

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.

Page 59: 1439 OptoOPCServer Users Guide

CHAPTER 4: SETTING UP DCOM SECURITY

OptoOPCServer User’s Guide 5353

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.

Page 60: 1439 OptoOPCServer Users Guide

CONFIGURING A REMOTE CLIENT WORKSTATION

OptoOPCServer User’s Guide54

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.

Page 61: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide 5555

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, that’s all you need. If the server is on a different PC, use the name of that PC as the node name, to indicate the server’s 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 DataThe 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.

Page 62: 1439 OptoOPCServer Users Guide

ITEM IDS FOR I/O POINTS AND MEMORY MAP DATA

OptoOPCServer User’s Guide56

Here’s what these parameters mean:

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 0–63 for the old memory map areas or 0–4095 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

Device:MMIO (Opto 22 memory-mapped device, including on-the-rack controllers, EB-series brains, and E1 and E2 brain boards)

Protocol: ip (network protocol)

Location:

“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

ItemName:

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.

PointNumber:The IO unit point number (0–63 or 0–4096) 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.

Page 63: 1439 OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

OptoOPCServer User’s Guide 5757

Analog Point

Digital Point (4-Channel Digital Modules)

To do this Use this ItemName Data Type

Action Scanned Elements ArrayAllowed?

Old

Mem

ory

Map

Are

a

Read or write current engineering units value EU Float R/W Yes 0–63 Yes

Read or write current counts value COUNTS Float R/W Yes 0–63 Yes

Read current minimum value MIN Float R Yes 0–63 Yes

Read current maximum value MAX Float R Yes 0–63 Yes

Read then clear minimum value MIN_READCLEAR Float R No 0–63 Yes

Read then clear maximum value MAX_READCLEAR Float R No 0–63 Yes

Exp

ande

d M

emor

y M

ap A

rea Read or write current engineering units value EU_4096 Float R/W Yes 0–4095 No

Read or write current counts value COUNTS_4096 Float R/W Yes 0–4095 No

Read current minimum value MIN_4096 Float R Yes 0–4095 No

Read current maximum value MAX_4096 Float R Yes 0–4095 No

Read then clear minimum value MIN_READCLEAR_4096 Float R No 0–4095 No

Read then clear maximum value MAX_READCLEAR_4096 Float R No 0–4095 No

* 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 user’s guide for the device.

To do this Use this ItemName Data Type

Action Scanned Elements ArrayAllowed?

Read or write current on/off state STATE Bool R/W Yes 0–63 No

Read on-latch state ONLATCH Bool R Yes 0–63 No

Read off-latch state OFFLATCH Bool R Yes 0–63 No

Read or write state of active counter flag* ACTIVECOUNTER Bool R/W Yes 0–63 No

Read current counter value* COUNTERDATA Long R Yes 0–63 Yes

Read then clear on-latch state ONLATCH_READCLEAR Bool R No 0–63 Yes

Read then clear off-latch state OFFLATCH_READCLEAR Bool R No 0–63 Yes

Read then clear current counter value COUNTERDATA_READCLEAR Long R No 0–63 Yes

* 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 user’s guide for the device.

Page 64: 1439 OptoOPCServer Users Guide

ITEM IDS FOR I/O POINTS AND MEMORY MAP DATA

OptoOPCServer User’s Guide58

High-Density Digital (HDD) Point

To do this Use this ItemName Data Type

Action Scanned Module Point ArrayAllowed?

Read or write current on/off state of point 'p' of HDD module 'm'

HDD_STATE(m)[p] Bool R/W Yes 0–15 0–31 No

Read on-latch state of point 'p' of HDD module 'm'

HDD_ONLATCH(m)[p] Bool R Yes 0–15 0–31 No

Read off-latch state of point 'p' of HDD module 'm'

HDD_OFFLATCH(m)[p] Bool R Yes 0–15 0–31 No

Clear on-latch state of point 'p' of HDD

module 'm' 1HDD_ONLATCH_CLEAR(m)[p] Bool W No 0–15 0–31 No

Clear off-latch state of point 'p' of HDD

module 'm' 1HDD_OFFLATCH_CLEAR(m)[p] Bool W No 0–15 0–31 No

Read current counter value of point 'p' of HDD module 'm'

HDD_COUNTER(m)[p] Long R Yes 0–15 0–31 No

Read then clear current counter value

of point 'p' of HDD module 'm' 2HDD_COUNTER_READCLEAR(m)[p]

Long R Yes 0–15 0–31 No

Read or write current on/off state for

all 32 points of HDD module 'm' 3HDD_BANK_STATE(m) Long R/W Yes 0–15 n/a No

Read current on-latch state for all 32

points of HDD module 'm' 3HDD_BANK_ONLATCH(m) Long R Yes 0–15 n/a No

Read current off-latch state for all 32

points of HDD module 'm' 3HDD_BANK_OFFLATCH(m) Long R Yes 0–15 n/a No

Clear current on-latch state for all 32

points of HDD module 'm' 1, 4HDD_BANK_ONLATCH_CLEAR(m)

Long W No 0–15 n/a No

Clear current off-latch state for all 32

points of HDD module 'm' 1, 4HDD_BANK_OFFLATCH_CLEAR(m)

Long W No 0–15 n/a No

1 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."2 This action is a "Read and Clear" (unlike the latches).3 The value sent is a 32-bit mask where high bits equal On and low bits equal Off.4 The value sent is a 32-bit mask where high bits equal "Clear respective latch" and low bits equal "Do nothing."

Page 65: 1439 OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

OptoOPCServer User’s Guide 5959

Point Configuration

Alarm

To do this Use this ItemName Data Type

Action Scanned Elements ArrayAllowed?

Old

Mem

ory

Map

Are

a

Read module configuration type MODULETYPE Long R No 0–63 No

Read or write point configuration type POINTTYPE Long R/W No 0–63 No

Read or write point feature FEATURE Long R/W No 0–63 No

Read or write offset value (analog calibration)

OFFSET Float R/W No 0–63 No

Read or write gain value (analog calibration)

GAIN Float R/W No 0–63 No

Read or write analog high scaling factor HISCALE Float R/W No 0–63 No

Read or write analog low scaling factor LOSCALE Float R/W No 0–63 No

Exp

ande

d M

emor

y M

ap A

rea

Read module configuration type MODULETYPE_4096 Long R No 0–4095 No

Read or write point configuration type POINTTYPE_4096 Long R/W No 0–4095 No

Read or write point feature FEATURE_4096 Long R/W No 0–4095 No

Read or write offset value (analog calibration)

OFFSET_4096 Float R/W No 0–4095 No

Read or write gain value (analog calibration)

GAIN_4096 Float R/W No 0–4095 No

Read or write analog high scaling factor HISCALE_4096 Float R/W No 0–4095 No

Read or write analog low scaling factor LOSCALE_4096 Float R/W No 0–4095 No

To do this Use this ItemName Data Type

Action Scanned Elements ArrayAllowed?

Set high alarm state ALARM_HI_STATE Bool R Yes 0–63 No

Enable high alarm ALARM_HI_ENABLE Bool R/W Yes 0–63 No

Set high alarm setpoint ALARM_HI_SETPOINT Float R/W Yes 0–63 No

Set high alarm deadband ALARM_HI_DEADBAND Float R/W Yes 0–63 No

Set low alarm state ALARM_LO_STATE Bool R Yes 0–63 No

Enable low alarm ALARM_LO_ENABLE Bool R/W Yes 0–63 No

Set low alarm setpoint ALARM_LO_SETPOINT Float R/W Yes 0–63 No

Set low alarm deadband ALARM_LO_DEADBAND Float R/W Yes 0–63 No

Page 66: 1439 OptoOPCServer Users Guide

ITEM IDS FOR I/O POINTS AND MEMORY MAP DATA

OptoOPCServer User’s Guide60

Scratch Pad (SNAP PAC controllers and Ultimate brains only)

PID

To do this Use this ItemName Data Type Action Scanned Elements Array Allowed?

Read or write Scratch Pad bit SP_BIT Bool R/W Yes 0–63 Yes

Read or write Scratch Pad integer SP_INTEGER Long R/W Yes 0–1023 Yes

Read or write Scratch Pad integer SP_INTEGER_EXT Long R/W Yes 1024–10239 Yes

Read or write Scratch Pad float SP_FLOAT Float R/W Yes 0–1023 Yes

Read or write Scratch Pad float SP_FLOAT_EXT Float R/W Yes 1024–10239 Yes

Read or write Scratch Pad string SP_STRING Str R/W Yes 0–63 Yes

To do this Use this ItemName Data Type

Action Scanned Elements ArrayAllowed?

Current value: Input PID_CV_IN F R Y 0–127 N

Current value: Setpoint PID_CV_SP F R Y 0–127 N

Current value: Output PID_CV_OUT F R/W Y 0–127 N

Current value: Feed Forward PID_CV_FF F R/W Y 0–127 N

Current value: Error PID_CV_ERROR F R Y 0–127 N

Current value: Gain contribution PID_CV_P F R Y 0–127 N

Current value: Integral contribution PID_CV_I F R Y 0–127 N

Current value: Derivative contribution PID_CV_D F R Y 0–127 N

Current value: Integral PID_CV_INTEGRAL F R Y 0–127 N

Last scanned value: Input PID_LSV_IN F R/W Y 0–127 N

Last scanned value: Setpoint PID_LSV_SP F R/W Y 0–127 N

Status flags PID_STATUS I R/W Y 0–127 N

Status flags on mask PID_STATUS_ON I W Y 0–127 N

Status flags off mask PID_STATUS_OFF I W Y 0–127 N

Tuning: Proportional value PID_TUNE_P F R/W Y 0–127 N

Tuning: Integral value PID_TUNE_I F R/W Y 0–127 N

Tuning: Derivative value PID_TUNE_D F R/W Y 0–127 N

Tuning: Feed Forward gain PID_TUNE_FF F R/W Y 0–127 N

Configuration: Max output change allowed] PID_CFG_MAX_OUT F R/W Y 0–127 N

Configuration: Min output change allowed PID_CFG_MIN_OUT F R/W Y 0–127 N

Configuration: Scan time in seconds PID_CFG_SCAN_TIME F R/W Y 0–127 N

Configuration: Output when input is low PID_CFG_LOW_RANGE F R/W Y 0–127 N

Page 67: 1439 OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

OptoOPCServer User’s Guide 6161

Item ID Examples: I/O Points and Memory Map DataSuppose 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 calculate the channel number from the module and point, use the following formula:nChannel=(nModule * nPointsPerModule) + nPoint

where:

nModule=module number: 0-63nPoint=point number: 0-63nPointsPerModule=points per module: 4 or 64 (for expanded memory map tags such as eu_4096)

Configuration: Output when input is high PID_CFG_HI_RANGE F R/W Y 0–127 N

Configuration: Algorithm choice PID_CFG_ALG I R/W Y 0–127 N

Configuration: Manual mode - 1=Yes 0=No PID_CFG_MAN_MODE I R/W Y 0–127 N

Configuration: Flags PID_CFG_FLAGS I R/W Y 0–127 N

Configuration: Flags on mask PID_CFG_FLAGS_ON I W Y 0–127 N

Configuration: Flags off mask PID_CFG_FLAGS_OFF I W Y 0–127 N

Configuration: Input mem map address PID_CFG_MM_IN I R/W Y 0–127 N

Configuration: Setpoint mem map address] PID_CFG_MM_SP I R/W Y 0–127 N

Configuration: Output mem map address PID_CFG_MM_OUT I R/W Y 0–127 N

Scaling: Input low range PID_SCALE_IN_LOW F R/W Y 0–127 N

Scaling: Input high range PID_SCALE_IN_HI F R/W Y 0–127 N

Scaling: Output lower clamp PID_SCALE_OUT_LOW F R/W Y 0–127 N

Scaling: Output upper clamp PID_SCALE_OUT_HI F R/W Y 0–127 N

Scan Counter PID_SCAN_COUNTER I R/W Y 0–127 N

To do this Use this ItemName Data Type

Action Scanned Elements ArrayAllowed?

To do this You would use this item expression

Read or change the state of digital point at mod-ule 1, point 2

[MMIO|ip|tcp:10.192.55.1:2001]state[6]

Read or change the engineering units of analog point at module 2, point 0

[MMIO|ip|tcp:10.192.55.1:2001]eu[8]

Read and clear the counter of digital input point at module 0, point 2

[MMIO|ip|tcp:10.192.55.1:2001]counterdata_readclear[2]

Read register element 23 of the Scratch Pad float table for the specified brain

[MMIO|ip|tcp:10.192.55.1:2001]sp_float[23]

Page 68: 1439 OptoOPCServer Users Guide

ITEM IDS FOR CONTROL STRATEGY VARIABLES

OptoOPCServer User’s Guide62

Item IDs for Control Strategy VariablesThe 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.

Here’s what these parameters mean:

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.

See the following sections:

• “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

Device:CONT (Opto 22 SNAP PAC or SNAP Ultimate I/O control engine) or OC (OptoControl con-trollers with Ethernet)

Protocol: ip (network protocol)

Location:

“tcp:” followed by the IP address, in dot notation, and port number for the SNAP PAC R-series or SNAP Ultimate brain’s 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

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

Property The value, state, or other property of the DataType.

VariableName The name of the strategy variable, chart, or I/O unit.

Page 69: 1439 OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

OptoOPCServer User’s Guide 6363

Integers, Floats, Strings, and Timers

Tables

To do this Use this DataType Available Properties Action Scanned

Integers

Read or write 32-bit integer variable I321, 2 VALUE R/W Yes

Floats

Read or write floating-point variable F VALUE R/W Yes

Strings

Read or write string variable3 S VALUE R/W Yes

Timers

Read or write timer variable T VALUE R/W Yes

1 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.2 If you want a 64-bit integer variable you must write your own custom client.3 A string variable cannot have embedded nulls.

To do this Use this DataType Available Properties Action Scanned

Read or write one or more elements in a 32-bit integer table variable I32T2 VALUE R/W Yes

Read or write one or more elements in a 64-bit integer table variable

I64T VALUE R/W Yes

Read or write one or more elements in a floating-point table variable

FT VALUE R/W Yes

Read or write one or more elements in a string table

variable1 ST VALUE R/W Yes

1 A string variable cannot have embedded nulls.2 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.

Page 70: 1439 OptoOPCServer Users Guide

ITEM IDS FOR CONTROL STRATEGY VARIABLES

OptoOPCServer User’s Guide64

Strategy Charts, I/O Units, and Controllers

Analog Points

To do this Use this DataType Available Properties Action Scanned

Start or stop a chart in a control strategy CHARTSTARTSTOP

W No

Suspend a running chart in a control strategy, or re-start a suspended chart

CHARTSUSPENDCONTINUE

W No

Change the state of a chart in a control strategy CHART STATE* R/W Yes

Enable or disable an I/O unit defined in a control strategy IOUNIT ENABLE R/W Yes

Read the following control engine information: CTRLR R No

• Available memory MEMORY

• Current time TIME

• Current date DATE

• Name of control strategy running STRATEGYNAME

• Total number of errors since the strategy started ERRORCOUNT

• Description of the last error that occurred LASTERROR

• Time stamp of the strategy file on the controller STRATEGYTIME

• Date stamp of the strategy file on the controller STRATEGYDATE

Synchronize the controller time to the time on the PC that’s running OptoOPCServer.

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

To do this Use this DataType Available Properties Action Scanned

Read or write analog values in engineering units to or from an I/O unit

APOINT EU R/W Yes

Retrieve the lowest value of a specified analog input since its last reading

APOINT MIN R Yes

Retrieve the lowest value of a specified analog input since its last reading, then reset it to the current value

APOINT MIN_GET_CLEAR R/W No

Retrieve the peak value of a specified analog input since its last reading

APOINT MAX R Yes

Retrieve the peak value of a specified analog input since its last reading, then reset it to the current value

APOINT MAX_GET_CLEAR R No

Page 71: 1439 OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

OptoOPCServer User’s Guide 6565

Digital Points (All I/O Units)

To do this Use this DataType Available Properties Action Scanned

Read a standard digital input counter counter value DPOINT COUNTER R Yes

Reactivate a standard digital input counter or quadrature counter

DPOINT COUNTER_ENABLE W No

Read and clear a standard digital input counter or quadrature counter value

DPOINT COUNTER_GET_CLEAR R No

Read digital input frequency value1 DPOINT FREQUENCY R Yes

Read the state of an off-latch DPOINT OFF_LATCH R Yes

Read and re-arm a high-speed off-latch associated with a standard digital input

DPOINT OFF_LATCH_GET_CLEAR R No

Read the off-time duration of a digital input that has had

an on-off-on transition1 DPOINT OFF_PULSE R Yes

Read and clear the off-time duration of a digital input that

has had an on-off-on transition1 DPOINT OFF_PULSE_GET_RESTART R No

Read digital input total off time1 DPOINT OFF_TIME R Yes

Read digital input total off time and restart1 DPOINT OFF_TIME_GET_RESTART R No

Read the state of an on-latch DPOINT ON_LATCH R Yes

Read and re-arm a high-speed on-latch associated with a standard digital input

DPOINT ON_LATCH_GET_CLEAR R No

Read the on-time duration of a digital input that has had

an off-on-off transition1 DPOINT ON_PULSE R Yes

Read and clear the on-time duration of a digital input that

has had an off-on-off transition1 DPOINT ON_PULSE_GET_RESTART R No

Read digital input total on time1 DPOINT ON_TIME R Yes

Read digital input total on time and restart1 DPOINT ON_TIME_GET_RESTART R No

Read the elapsed time during an on-off-on or an

off-on-off transition of a digital input1DPOINT PERIOD R Yes

Read and clear the elapsed time during an on-off-on or

an off-on-off transition of a digital input1DPOINT PERIOD_GET_RESTART R No

Read the completion status of a period measurement1 DPOINT PULSE_PERIOD_COMPLETE R Yes

Read a quadrature counter value1 DPOINT QUAD_COUNTER R Yes

Read the current state (ON or OFF) of a digital point DPOINT STATE R/W Yes

Read or write the on time of an output point as a

percentage1 DPOINT TPO_PERCENT R/W Yes

Read or write the time proportional output (TPO) period

of an output point1DPOINT TPO_PERIOD R/W Yes

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

Page 72: 1439 OptoOPCServer Users Guide

ITEM IDS FOR CONTROL STRATEGY VARIABLES

OptoOPCServer User’s Guide66

Ethernet PIDs

Mistic PIDs

Mistic Events/Reactions

To do this Use this DataType Available Properties Action Scanned

Read the input value (also known as the process vari-able) of the PID

PID INPUT R Yes

Read or write the output value of the PID PID OUTPUT R/W Yes

Read or write the setpoint value of the PID PID SETPOINT R/W Yes

Read or write the gain value from the PID PID GAIN R/W Yes

Read or write the integral value of the PID PID INTEGRAL R/W Yes

Read or write the derivative value of the PID PID DERIVATIVE R/W Yes

Change the mode of the PID to auto PID AUTO R/W Yes

Read or write the scan rate (update period) for a PID cal-culation

PID SCAN_RATE R/W Yes

To do this Use this DataType Available Properties Action Scanned

Read the input value (also known as the process vari-able) of the PID

MPID INPUT R Yes

Read or write the output value of the PID MPID OUTPUT R/W Yes

Read or write the setpoint value of the PID MPID SETPOINT R/W Yes

Read or write the gain value of the PID MPID GAIN R/W Yes

Read or write the integral value of the PID MPID INTEGRAL R/W Yes

Read or write the derivative value of the PID MPID DERIVATIVE R/W Yes

Set the loop setpoint equal to thecurrent loop input value

MPID SETPOINT_TRACK_INPUT R/W Yes

Set the loop output to proportionally trackthe input

MPID OUTPUT_TRACK_INPUT R/W Yes

Enable the PID to update its associated analog output channel

MPID OUTPUT_ENABLE R/W Yes

Change the mode of the PID to auto MPID AUTO R/W Yes

Change mode from reset to active MPID ACTIVE R/W Yes

To do this Use this DataType Available Properties Action Scanned

Activate a specific event/reaction ER SCAN_ENABLE R/W Yes

Determine if a specific event has occurred ER HAS_OCCURRED R Yes

Determine if the criteria for a specific event is currently true

ER IS_OCCURRING R Yes

Page 73: 1439 OptoOPCServer Users Guide

CHAPTER 5: CREATING COMMUNICATION MESSAGES

OptoOPCServer User’s Guide 6767

Item ID Examples: PAC Control Strategy VariablesSuppose 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:

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.

To do this You would use this item expression

Read or change the value of the float variable fSetpoint

[CONT|ip|tcp:10.192.55.1:22001]F;Value;fSetpoint

Read or change the 32-bit integers inelements 6 through 11 of the integertable variable ntRetryLimits.

[CONT|ip|tcp:10.192.55.1:22001]I32T;Value[6-11];ntRetryLimits

Read or change bit 2 in the 32-bit integer variable nSwitchCounts

[CONT|ip|tcp:10.192.55.1:22001]I32;Value.2;nSwitchCounts

Read or change the value of the 64-bit integer nnModulesMask

[CONT|ip|tcp:10.192.55.1:22001]I64;Value;nnModulesMask

Suspend the running chartProcess_Monitor

[CONT|ip|tcp:10.192.55.1:22001]CHART;Suspend;Process_Monitor

Read analog point engineering units of point named fTankLevel

[CONT|ip|tcp:10.192.55.1:22001]Apoint;EU;fTankLevel

Read/Write the gain of mistic PIDnamed MyMisticPID

[CONT|ip|tcp:10.192.55.1:22001]MPID;Gain;MyMisticPID

Read/Write the setpoint of EthernetPID named MyEthernetPID

[CONT|ip|tcp:10.192.55.1:22001]PID;Setpoint;MyEthernetPID

Page 74: 1439 OptoOPCServer Users Guide

ITEM ID EXAMPLES: PAC CONTROL STRATEGY VARIABLES

OptoOPCServer User’s Guide68

Page 75: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide 6969

6: Debugging and TroubleshootingChapter 6

Debugging and Troubleshooting

Debugging in the OptoOPCServer WindowYou 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 Programs→Opto 22→PAC Project→OptoOPCServer→OptoOPCServer.

The blank server window opens.

2. Launch the OPC client. For the sample client, you would choose Start→Programs→Opto 22→PAC Project→OptoOPCServer→OPC 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

Communication log for all connected clients

When items are shown, click Item ID or Type column heading to sort them.

Page 76: 1439 OptoOPCServer Users Guide

USING THE REGISTRY CHECKER

OptoOPCServer User’s Guide70

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 View→Show 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 View→Update Item Values.

– o change communication details shown in the window, choose View→Log Level.

Using the Registry CheckerOptoOPCServer 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 Programs→Opto 22→PAC Project→OptoOPCServer→Registry Checker.

Testing a Browser DatabaseIf 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.

Page 77: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide 7171

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:

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.

Data Quality Description Decimal Hex

OPC_QUALITY_BAD 0 0x00

OPC_QUALITY_COMM_FAILURE 24 0x18

OPC_QUALITY_DEVICE_FAILURE 12 0x0C

OPC_QUALITY_GOOD 192 0xC0

OPC_QUALITY_LAST_KNOWN 20 0x14

OPC_QUALITY_NOT_CONNECTED 8 0x08

OPC_QUALITY_OUT_OF_SERVICE 28 0x1C

Page 78: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide72

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

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

• The strategy could have been modified and some of the tags may have been deleted, and then the modified strategy downloaded to the controller. Trying to access those tags will result in OPC_QUALITY_DEVICE_FAILURE because the tags are undefined.

• The tag name is misspelled. All tag names are case sensitive, so if the tag name in the strategy is in lowercase, for example, and the OPC client is using the tag name with all caps, then it will not match.

• The strategy was modified and one or more of the tag names were changed.

• The strategy was cleared from the controller.

• You are trying to read a table element beyond the end of the table.

OPC_QUALITY_GOOD (192 decimal; C0 hex) If the tag is scanned successfully, the quality changes to OPC_QUALITY_GOOD.

OPC_QUALITY_LAST_KNOWN (20 decimal; 14 hex) If a tag has been successfully scanned and then communication to the device is lost, the quality changes to OPC_QUALITY_LAST_KNOWN.

OPC_QUALITY_NOT_CONNECTED (8 decimal; 08 hex) When tags are added to the OptoOPCServer, the quality is set to OPC_QUALITY_NOT_CONNECTED. Once the connection is established or fails, then the data quality is updated. This initial attempt to connect may take a while, during which time the quality stays at OPC_QUALITY_NOT_CONNECTED. Every item quality is set to this when the item is first added, and there is no other use of this quality code.

OPC_QUALITY_OUT_OF_SERVICE (28 decimal; 1C hex) This message occurs when a value is requested for an item that is not active or for an item whose group is not active.

Page 79: 1439 OptoOPCServer Users Guide

APPENDIX A: DATA QUALITY MESSAGES

OptoOPCServer User’s Guide 7373

How Data Quality is DeterminedThis 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.

Page 80: 1439 OptoOPCServer Users Guide

HOW DATA QUALITY IS DETERMINED

OptoOPCServer User’s Guide74

Page 81: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide 7575

IndexOptoOPCServer

Index

AAccess Permission dialog box, 44, 52accessing bits

integer variables, 63table variables, 63

Add a Port dialog box, 35, 49

Bbits

accessing bits of integer variables, 63accessing bits of table variables, 63

browser database, 7, 11removing, 20uploading, 13

browser items, 7, 11copying, 11

Cclient access, 25copying browser items, 11

Ddata quality, determining, 73data types, 56debugging, 2, 69

server, 7dialog boxes

Access Permission, 52Add a Port, 35, 49Launch Permission, 38Select a Strategy File and Controller, 10

Update Server, 13Windows Firewall, 35, 48Write Item, 19

domain controller, 31domains, 28

Ffirewall, 35, 48

Hhigh-density digital tags, 19

II/O points, 55, 61item ID, 17, 55, 61

LLaunch Permission dialog box, 38

Mmemory map, 55

data, 61messages, data quality, 71

Nnetwork security, 23

Page 82: 1439 OptoOPCServer Users Guide

OptoOPCServer User’s Guide76

OOPC syntax rules, 55OPC Test Client, 14open access, 24Opto 22 tag database (.otg), 55

Ppeer-to-peer network, 28pointers, 67

RRegistry Checker utility program, 70restricted access, 24

Ssample client, 14Select a Strategy File and Controller dialog box, 10server window, 70setting up, 7subscription data, 56

Ttag browser interface, 7tags, 7

high-density digital, 19test client, 14

UUpdate Server dialog box, 13user access, 24user group, 25user identity, 25users, types of, 27

WWindows firewall

dialog box, 35, 48workgroups, 28Write Item dialog box, 19