Cimplicity - OPC Server
Cimplicity - OPC Server
GFK-1675
April 1999
GFL-002
Warning notices are used in this publication to emphasize that hazardous voltages, currents, temperatures, or other conditions that could cause personal injury exist in the equipment or may be associated with its use. In situations where inattention could cause either personal injury or damage to equipment, a Warning notice is used.
Caution notices are used where equipment might be damaged if care is not taken. Note Notes merely call attention to information that is especially significant to understanding and operating the equipment. This document is based on information available at the time of publication. While efforts have been made to be accurate, the information contained herein does not purport to cover all details or variations in hardware or software, nor to provide for every possible contingency in connection with installation, operation, or maintenance. Features may be described herein which are not present in all hardware and software systems. GE Fanuc Automation assumes no obligation of notice to holders of this document with respect to changes subsequently made. GE Fanuc Automation makes no representation of warranty, expressed, implied, or statutory with respect to, and assumes no responsibility for the accuracy, completeness, sufficiency, or usefulness of the information contained herein. No warranties of merchantability or fitness for purpose shall apply.
CIMPLICITY is a registered trademark of GE Fanuc Automation North America, Inc. Windows NT and Windows 95 are registered trademarks of Microsoft Corporation
Copyright 1998 GE Fanuc Automation North America, Inc. All rights reserved
Preface
Related Publications
For more information, refer to these publications: CIMPLICITY HMI Users Manual (GFK-1180) CIMPLICITY HMI Integrators Toolkit Guide (GFK-1461)
Contents
Getting Started
Getting Started Getting Started Steps
1-1
1-1 1-1
2-1
2-1 2-3 2-3 2-4 2-5 2-7 2-8
3-1
3-1 3-1 3-2 3-3 3-5 3-6 3-7 3-8 3-8
4-1
4-1 4-2 4-2 4-3 4-5 4-7 4-8 4-10 4-11 4-13 4-13 4-16 4-17 4-18
GFK-1675
Contents
Getting Started
Getting Started
The CIMPLICITY HMI OPC Server provides a standards-based way to access run-time information from a CIMPLICITY HMI project. This section guides a user through the steps to become familiar with the OPC Server and to start using the server quickly.
NOTE: The CIMPLICITY HMI OPC Server must be licensed to run on a computer node running CIMPLICITY HMI. If the server is not licensed then OPC clients will not be able to connect to a CIMPLICITY HMI project. The following getting started steps assume that the CIMPLICITY HMI OPC Server has been successfully installed and that at least one CIMPLICITY HMI project is currently running.
GFK-1675
1-1
The Security Dialog is accessed from the Server Options menu of the server user interface. See the section The Server Options Menu for a detailed description of this dialog and how to view it.
Once your application connects to the OPC Server, you should see the following user interface appear on the machine where the OPC Server is installed (assuming a user is logged in with the appropriate permissions). In this case, the OPC Server is running in interactive mode. The server can also be configured to always run in non-interactive mode. The OPC Server will run regardless of who is currently logged in. See the section Interactive and noninteractive Modes for more information.
1-2
GFK-1675
If you are having difficulty connecting with the OPC Server, using any of the server objects, or receiving subscription updates, you can use the troubleshooting tools supported by the OPC Server. See the section Troubleshooting Tools for a complete discussion.
Project
Point Attribute
GFK-1675
Getting Started
1-3
The sample browse session illustrates that a project named CIMPDEMO has (among others) the points AAA, AC1, ACTIVEX_TOGGLE, ACTIVE_FIX, and ACTIVE_FIX_GCODE. Each of these points have attributes associated with them. The attributes for the points AAA and AC1 are shown. These attributes represent CIMPLICITY run-time database values that are visible to an OPC client. To specify an attribute, pick (i.e. click or double click) on an attribute in the browse session. If browsing is not supported or text entry is more applicable for the OPC client, use the following syntax to reference an attribute. This is known as an OPC item reference. [\\PROJECT\]POINT.ATTRIBUTE See the section OPC Item Naming Convention for a complete discussion of the syntax and a list of supported attributes.
1-4
GFK-1675
The CIMPLICITY HMI OPC Server provides support for the Data Access sub-set of the OPC specification. OPC leverages Microsofts COM/DCOM technology. The OPC specification defines the COM interfaces and object behaviors common to automation software applications. Since the OPC standard is COM compliant, DCOM can be leveraged for distributed deployments. For example, an OPC client application can run on a computer node different from that of an OPC server. Neither application (the client or the server) are aware of this distributed architecture.
GFK-1675
2-1
The following diagram illustrates the client / server architecture defined by the OPC specification.
Client Application A Client Application B
COM / DCOM
The diagram shows that multiple OPC compliant client applications can communicate with an OPC server simultaneously. Using DCOM, client and server software programs can be configured to run on the same computer node or be distributed across a network of computers. OPC servers provide a common view of automation information managed by the system for which the server was written. The CIMPLICITY HMI OPC Server allows an OPC client to read and write CIMPLICITY project run-time databases (which in turn can be references to device points or virtual points). Others examples include an OPC server for a PLC providing access to PLC registers or an OPC server for a lab analyzer providing remote monitoring (and control). OPC clients use this common view of automation information in a variety of ways. This includes providing human machine interfaces, historical data logging, and data mirroring services. Users can write their own custom programs in languages such as Visual Basic or Visual C++. Desktop programs can reference OPC server information. For example, users can write VBA scripts in Microsoft Excel.
2-2
GFK-1675
COM / DCOM
GFK-1675
2-3
2-4
GFK-1675
Specifications
Refer the OPC Foundation specification documents for more information on details presented in this section.
COM Program ID
Once installed, the CIMPLICITY HMI OPC Server is typically referenced by an OPC client by its ProgID (program ID). The ProgID for the CIMPLICITY HMI OPC Server is: CIMPLICITY.HMI.OPCServer The OPC Servers unique CLSID (class ID) is: {B01241E8-921B-11d2-B43F-204C4F4F5020}
GFK-1675
2-5
Note: Selection of the type of interface to use, custom or automation, depends on the goals of the client application developer. Adhoc client applications written in Microsoft Visual Basic (for example) typically use the automation interface. Automation interfaces are easy to use in the VB (and VBA) development environments. However, the automation interface is slower at execution time. Applications written in Microsoft Visual C++ (for example) use the custom interface. This is the most efficient interface, but it is more complex to use.
Blobs
The CIMPLICITY HMI OPC Server does not support the use of blobs. Refer to the Data Access specification for more information on blobs.
2-6
GFK-1675
When an OPC client references a point in a project, the OPC Server connects to the project using the username and the password specified for the project. The following diagram illustrates the security settings granted to two OPC client applications accessing three CIMPLICITY projects via the OPC server.
OPC Client A
OPC Client B
Client B accesses Project B and C points as CIMPLICITY HMI user names Engineer and Maintenance (respectively).
GFK-1675
2-7
Troubleshooting
CIMPLICITY HMI OPC Server provides several diagnostic tools for troubleshooting problems common to a heterogeneous software application environment. The tools are designed to help a user diagnose specific aspects of a conversation between an OPC client and a point in the CIMPLICITY run-time database. OPC Connection Trace Logging - OPC-related connection information is captured using the Trace Logging diagnostic tool. This tool is used to log information about an OPC conversation (between a client and a server) to a text file. See the section OPC Connection Trace Logging for more information. CIMPLICITY Project Connection Logging Information about the interaction between the OPC Server and a CIMPLICITY project is logged to CIMPLICITY Status Log (accessible from the CIMPLICITY Workbench). See the section CIMPLICITY Project Connection Logging for more information. Run-time Statistics The OPC Server maintains run-time performance statistics for OPC client server interactions. These statistics can be used to diagnose computer node performance problems and to tune an OPC clients use of the CIMPLICITY HMI OPC Server resources. See the section Run-time Statistics for more information.
2-8
GFK-1675
Note: The CIMPLICITY HMI OPC Server converts all Item IDs to upper case before passing on the reference to a CIMPLICITY project.
The name of a CIMPLICITY HMI project point. A server-defined string specifying the type of information associated with the point. A point has several attributes. See the
section "Item ID Attributes" for more information.
GFK-1675
3-1
Note: Point by Address Item IDs do not appear during an OPC client browse session. These Items IDs must be manually entered in an OPC client application. The Point by Address Item ID syntax is shown below where [ ] indicates an optional keyword. Valid keywords (required and optional) are described below. [\\PROJECT\]@DEVICE=xxx|ADDR=yyy|[TYPE=zzz]
Description A CIMPLICITY HMI project name under which the reference is made. If the project is not specified, then the default project is assumed. See the section "Setup Server Security" to learn how to
specify a server default project.
DEVICE (required) ADDR (required) TYPE (optional) SCAN (optional) OFFSET (optional) ACCESS (optional) ELEM (optional) ORIGIN (optional)
Any valid CIMPLICITY HMI device identifier. A valid device address for the specified device. Any valid CIMPLICITY HMI point type. If you do not use this keyword, the default is INT. Multiple of the device scan rate at which the data will be collected. If you do not use this keyword, the default is 1. Bit offset for the address of BOOL, BYTE or WORD points. If you do not use this keyword, the default is 0. Either READ or WRITE. If you do not use this keyword, the default is READ. The number of elements (for an array). If you do not use this keyword, the default is 1. The points origin - use one of the following: DEV for a device point. DIA for a diagnostic point. ALW for an Ethernet Global Data point.
3-2
GFK-1675
Item ID Attributes
By definition, a CIMPLICITY project point is a run-time value. There are also other values associated with the point (e.g. point state, point description, etc.). To distinguish between the run-time value and other values, the CIMPLICITY HMI OPC server defines a set of attribute names to provide unique references. A list of common attribute names referenced by an OPC client is presented below. See the CIMPLICITY HMI User's Manual" GFK-1180 and the "CIMPLICITY HMI Integrator's Toolkit Guide" GFK-1461 for attribute lists.
NOTE: The attributes listed below are not recognized by the CIMPLICITY run-time database. You will not find the attributes listed in the "Point Management API" section of the "CIMPLICITY HMI Integrators Toolkit Guide" GFK-1461. These attributes are only recognized by the CIMPLICITY HMI OPC Server and are internally maintained by the OPC Server.
VALUE
References the converted (EU) value of the point. If there is no conversion configured, the raw value is displayed. Canonical Data Type - Dependent on CIMPLICITY point type. See the section "Data Types"
for more information.
RAW_VALUE
References the raw value of a point. Canonical Data Type Dependent on CIMPLICITY point type. See the section "Data Types"
for more information.
STATE
References the current state of the point. The points current state depends on the point class and alarm conditions. Canonical Data Type Automation string (VT_BSTR).
For all point classes, the states that can be displayed are: NORMAL UNAVAILABLE The points value is within normal limits, and no alarms are outstanding.
If the point is a device point, communications with the device have failed, and the point can no longer be read. If the point is a virtual point, one or more of the source points that comprise this point is unavailable. For Analog point classes, the additional states that can be displayed are: ALARM HIGH ALARM LOW WARNING HIGH The points value is greater than the high alarm limit. The points value is less than the low alarm limit. The points value is greater than the warning high limit and less than the alarm high limit.
GFK-1675
3-3
The points value is less than the warning low limit and greater than the alarm low limit.
The point is an Analog or APPL device point with engineering units conversion and its value exceeds one of its conversion limits. For the Digital (Boolean) point class, the additional states that can be displayed are: ALARM WARNING The points value is in the alarm state. You will only see this message if Enable Alarms has been reset, Enable Warning is set, and the points value is in the alarm state.
TYPE
References the CIMPLICITY project data type of the point value. One of the following strings is displayed to a client: BOOLEAN, BITSTRING, OCTETSTRING, CHARACTERSTRING, UNSIGNED INTEGER 1, UNSIGNED INTEGER 2, UNSIGNED INTEGER 4, INTEGER 1, INTEGER 2, INTEGER 4, FLOATING POINT, STRUCTURE, ALARM LIMIT. Canonical Data Type - Automation string (VT_BSTR).
LENGTH
References the length of the point. This field is only meaningful for the following point types:BITSTRING and OCTETSTRING. Canonical Data Type Four byte signed int (VT_I4).
ELEMENTS
References the number of elements contained in the point. Canonical Data Type - Four byte signed int (VT_I4).
SIZE
References the size of the data. Canonical Data Type - Four byte signed int (VT_I4).
DISP_FORMAT
References the format used when displaying the points value in Alarm Viewer, Status Log messages, or CimView. Canonical Data Type - Automation string (VT_BSTR).
3-4
GFK-1675
Note: Statistic Item IDs follow the same naming convention as a project point. The statistics are assigned to a fictitious project called STATISTICS. Thus, a real project with the same name cannot be accessed by an OPC client.
\\STATISTICS\CLIENTS.VALUE
Displays the number of OPC clients currently connected to the CIMPLICITY HMI OPC Server.
\\STATISTICS\GROUPS.VALUE
Displays the number of OPC groups currently configured in the OPC Server.
\\STATISTICS\ITEMS.VALUE
Displays the number of OPC item references currently configured in the OPC Server. Note that an item may appear in more than one group (or be referenced by more than one OPC client). Each reference is counted in the statistic.
\\STATISTICS\READ/PERIOD.VALUE
Displays the number of synchronous and asynchronous read transactions performed by the OPC Server in the last sample period. A read transaction is composed of one or more items.
\\STATISTICS\WRITES/PERIOD.VALUE
Displays the number of synchronous and asynchronous write transactions performed by the OPC Server in the last sample period. A write transaction is composed of one or more items.
\\STATISTICS\SUBSCRIPTIONS/PERIOD.VALUE
Displays the number of client subscription updates (i.e. unsolicited updates to an OPC client) performed by the OPC Server in the last sample period. A single subscription update is composed of one or more items.
\\STATISTICS\PERIOD(MILLISECONDS).VALUE
The currently configured sample period for calculating reads/period, writes/period, and subscriptions/period statistics.
GFK-1675
3-5
Data Types
The CIMPLICITY HMI OPC Server represents CIMPLICITY point values in a canonical (or baseline) format. This format, or data type, is compatible with Microsoft COM/DCOM technology and is called a VARIANT data type. As discussed earlier in the section "Item ID Attributes", each Item ID attribute has a predefined canonical data type. The canonical data types for VALUE and RAW_VALUE attributes are dependent on the CIMPLICITY point type. The following table maps the CIMPLICITY point type to the canonical form. The table is grouped by CIMPLICITY point class. CIMPLICITY Point Class Analog CIMPLICITY Point Type DINT INT REAL SINT UDINT UINT USINT Boolean BOOL BYTE WORD DWORD Text STRING STRING_20 STRING_8 STRING_80 Four byte signed int (VT_I4) Two byte signed int (VT_I2) Eight byte real (VT_R8) Two byte signed int (VT_I2) Eight byte real (VT_R8) Four byte signed int (VT_I4) Two byte signed int (VT_I2) True = 1, False = 0 (VT_BOOL) Four byte signed int (VT_I4) Four byte signed int (VT_I4) Four byte signed int (VT_I4) Automation string (VT_BSTR) Automation string (VT_BSTR) Automation string (VT_BSTR) Automation string (VT_BSTR) OPC Server Canonical Form
3-6
GFK-1675
Array Support
The CIMPLICITY HMI OPC Server supports arrays of all CIMPLICITY point types (with the exception of the STRING type). The OPC Server does not support coercion of array items. OPC clients must request an array item in canonical form when adding items to an OPC group. Access to arrays is best done in canonical form as the overhead imposed by coercion could increase proportionally by the size of the array.
Timestamps
OPC Item Timestamps
Associated with each OPC item value is the time at which the value last changed or the value was refreshed. This is known as the OPC item timestamp. The CIMPLICITY HMI OPC Server synchronizes OPC item timestamps with point timestamps stored in the CIMPLICITY run-time database. When timestamps are not available from CIMPLICITY (as in the case where a CIMPLICITY project is stopped while OPC clients are connected), the OPC Server generates a timestamp based on the current computer node time.
GFK-1675
3-7
Quality
OPC Item Quality
Associated with each OPC item value is an indicator of the quality of that value. This is known as the OPC item quality. The quality of an item is based on point status information from a CIMPLICITY project and the state of communications between the OPC Server and the CIMPLICITY project. The CIMPLICITY HMI OPC Server supports a subset of quality flags specified in the OPC Foundation Data Access standard. The supported quality statuses and sub-statuses are listed below. OPC Status Good Bad OPC Sub-Status N/A Last Known Value Description The quality of the OPC item value is good. Communications with CIMPLICITY project have failed. The OPC item value is the last known value. Communication with CIMPLICITY project have failed. The OPC item value is invalid.
Comm Failure
Project
Point Attribute
3-8
GFK-1675
The annotations in the diagram indicate the components of a CIMPLICITY Project Point Item ID.
Note: Not all CIMPLICITY points will support all the attributes listed in the registry key. The OPC Server will filter out invalid attributes for a CIMPLICITY point during the OPC client browse session.
Tip: The Browse Attributes registry key can be customized to an installation. Following are a list of tips for modifying the Browse Attribute registry key. Specify all attributes in capital letters. Leave no spaces in the string. Separate each attribute string by a comma.
Important: Corruption of the Browse Attribute registry key or other keys may cause serious and irreparable damage to software installations. Registry key changes should be made by qualified personnel only.
GFK-1675
3-9
The OPC Server can be configured to run without a user interface. See the next section, Interactive and non-Interactive Modes for instructions on how setup the OPC Server to run with a user interface. The user interface provides several menu options. Each option is described below.
GFK-1675
4-1
Off
Select this option to disable OPC connection trace logging. The trace log file is closed.
Connect
Select this option to enable OPC connection trace logging and to set the level of tracing to capture server activation events and client connect / disconnect events.
Group
Select this option to enable OPC connection trace logging and to set the level of tracing to capture OPC group creation, deletion, and modification events.
Item
Select this option to enable OPC connection trace logging and to set the level of tracing to capture OPC item transaction events (read, write, subscription updates).
All
Select this option to enable OPC connection trace logging and to set the level of tracing to capture all Connect, Group, and Item transaction events.
Dump Points
Select this option to signal the CIMPLICITY HMI OPC Server to write the current contents of the data cache to a text file. Note that selecting this option will overwrite an existing file.
4-2
GFK-1675
Project Name Field User Name Field OK Cancel Add Remove Set Default Project
CIMPLICITY HMI project name. CIMPLICITY HMI project user name. Saves security setting changes made during this session. Cancel security setting changes made during this session. Add a new project security setting for the OPC server. Selecting this option displays a blank Project Properties dialog. Remove the current security setting. If an OPC client does not specify a project name as part of the Item ID syntax, apply this project as the default. Only one project can be designated as the default project. The default project is always displayed in bold face lettering.
GFK-1675
4-3
Details
Edit the current security setting. Selecting this option displays the Project Properties dialog box with the current security setting field information. Use this option to make changes to the security settings for a CIMPLICITY project. The Project Properties dialog box is used to enter or edit the security settings for a single CIMPLICITY project. A sample dialog is shown below. The dialog box indicates that an OPC client, when accessing point in the CIMPDEMO project, does to with all the rights and privileges granted to the ADMINISTRATOR user.
CIMPLICITY HMI project name. CIMPLICITY HMI project user name. Password used by OPC server in conjunction with project user name. Verification check. The Password and Confirm password must be the same otherwise the project settings cannot be saved. Save project settings and return to the Security Dialog if there are no errors. Return to the Security Dialog without saving the changes. Save any changes if there are no errors.
4-4
GFK-1675
2.
There are times when a user may want to run the OPC server interactively. During initial setup, server parameters can be adjusted to customize the OPC Server for the installation. While troubleshooting, a user will want access to the diagnostic tools on the menu.
GFK-1675
4-5
2.
Run the CIMPLICITY HMI OPC Server as you would any other program (e.g. using the StartRun command or running the program from a MS-DOS window). In this case you must ensure that the Auto Exit mode of the OPC server is disabled. Otherwise, the OPC Server will start and promptly terminate. See the section "Enable/Disable auto Exit" for more information on the Auto Exit mode.
Note: Ensure that at least one CIMPLICITY HMI project is running on the same computer node as the CIMPLICITY HMI OPC Server when activating the server. The OPC Server promptly terminates if there is not a project running.
4-6
GFK-1675
Troubleshooting Tools
The CIMPLICITY HMI OPC Server provides troubleshooting tools to help a user diagnose specific aspects of a conversation between an OPC client and a point in the CIMPLICITY run-time database. There are three tools provided with the OPC server. Use of the tool outputs are discussed in this section. A fourth tool, the CIMPLICITY HMI OPC Server data cache dump is intended for providing detailed diagnostic information for technical support personnel. It is not described here. OPC Connection Trace Logging - OPC-related connection information is captured using the Trace Logging diagnostic tool. This tool is used to log information about an OPC conversation (between a client and a server) to a text file. CIMPLICITY Project Connection Logging Information about the interaction between the OPC Server and a CIMPLICITY project is logged to CIMPLICITY Status Log (accessible from the CIMPLICITY Workbench). Run-time Statistics The OPC Server maintains OPC conversation run-time performance statistics. These statistics can be used to diagnose computer node performance problems and to tune OPC client reporting requirements. The following diagram illustrates the scope of diagnostic information generated by each tool. The output from each tool and how to use it is described in the following sections.
Project A
Project B
Project C
OPC Client A
OPC Client B
GFK-1675
4-7
All Log all events. The OPC server must be configured to run interactively in order to access trace logging menu options. See the section "Interactive and Non-interactive Modes" for setting the OPC server to run interactively.
Note: Messages written to the trace log assume that the user is familiar with the OPC Foundation Data Access specification.
The client create a second OPC group called Group2 with the similar advise sinks as Group1. The client added an OPC item to Group1 called \\CIMPDEMO\DEMO_COSINE.VALUE. This references the current value of the point DEMO_COSINE in the project CIMPDEMO. Immediately the OPC Server began reporting to the client data change notifications (via a callback into the client). The client proceeded to add two more points: \\CIMPDEMO\DEMO_COUNTER.VALUE and \\CIMPDEMO\DEMO_RANDOM.VALUE. Note that immediately after each new item was added, the number of items reported in the callback to the client increased. This is because the values are changing in
5. 6.
7.
4-8
GFK-1675
CIMPLICITY and being reported to the client at the requested OPC group update rate. 8. 9. The client then removed the OPC group Group2. Prior to doing this, it disconnects the advise sinks previously setup. The client then deletes the OPC group Group1. First it removes the item references from the group and then it disconnects the advise sinks.
OPC Client connected Added OPC Group Group1 Group Group1: client connected OPCSTMFORMATDATATIME V1.0 advise sink Group Group1: client connected OPCSTMFORMATWRITECOMPLETE V1.0 advise sink Added OPC Group Group2 Group Group2: client connected OPCSTMFORMATDATATIME V1.0 advise sink Group Group2: client connected OPCSTMFORMATWRITECOMPLETE V1.0 advise sink Group Group1: added item \\CIMPDEMO\DEMO_COSINE.VALUE (handle=18155968) Group Group1: Invoked V1.0 data change callback (with timestamps) for 1 item(s) Group Group1: Invoked V1.0 data change callback (with timestamps) for 1 item(s) Group Group1: added item \\CIMPDEMO\DEMO_COUNTER.VALUE (handle=18157088) Group Group1: Invoked V1.0 data change callback (with timestamps) for 2 item(s) Group Group1: Invoked V1.0 data change callback (with timestamps) for 2 item(s) Group Group1: added item \\CIMPDEMO\DEMO_RANDOM.VALUE (handle=18158672) Group Group1: Invoked V1.0 data change callback (with timestamps) for 3 item(s) Group Group1: Invoked V1.0 data change callback (with timestamps) for 3 item(s) Group Group2: client disconnected V1.0 OPCSTMFORMATDATATIME advise sink Group Group2: client disconnected V1.0 OPCSTMFORMATWRITECOMPLETE advise sink Removed OPC Group Group2 Group Group1: Invoked V1.0 data change callback (with timestamps) for 3 item(s) Group Group1: Invoked V1.0 data change callback (with timestamps) for 3 item(s) Group Group1: removed item \\CIMPDEMO\DEMO_COSINE.VALUE (handle=18155968) Group Group1: removed item \\CIMPDEMO\DEMO_COUNTER.VALUE (handle=18157088) Group Group1: removed item \\CIMPDEMO\DEMO_RANDOM.VALUE (handle=18158672) Group Group1: client disconnected V1.0 OPCSTMFORMATDATATIME advise sink Group Group1: client disconnected V1.0 OPCSTMFORMATWRITECOMPLETE advise sink Removed OPC Group Group1 OPC Client disconnected
GFK-1675
4-9
Troubleshoot subscription problems (i.e. callbacks into the client by the OPC Server when data changes are reported). In this case the client is able to perform synchronous and asynchronous read and write requests but cannot receive subscription updates. This may be due to a DCOM security authentication problem on the client machine. The client is unable to authenticate the OPC server. See how a client organizes OPC groups and OPC items within groups.
Indicate that a run-time database / server interaction has failed and that future interactions will most likely fail. To view the CIMPLICITY Status Log select the Status Log button in the Workbench for a CIMPLICITY project. Then select the option LogView System Log menu option from with the Status Log viewer. Messages logged by the CIMPLICITY HMI OPC Server are identified by the label OPCServer under the PROCESS field of the view screen. Whenever possible, the OPC Server logs error messages generated by the run-time database (referred to as PTMAP in error messages). When a PTMAP error message is available, the message is logged to the Status Log after the message generated by the OPC Server, creating a two-part message.
Note: The CIMPLICITY HMI OPC Server defines several item attributes that are only recognized by the OPC Server. See the section "Item ID Attributes" for a list of these attributes. These attributes are internally maintained by the OPC Server. Thus, some two-part warning and failure messages display an item ID (as requested by an OPC client) that differs from the point reference in the message generated by the run-time database. This is not an error.
4-10
GFK-1675
OPC client request to connect failed. CIMPLICITY OPC Server is not licensed. A warning message indicating that the running OPC server has not been licensed for use. No OPC client connections are permitted. The CIMPLICITY PTMAP IPC system is inactive. OPC client connections refused. A warning message indicating that the sub-system supporting the communications between the CIMPLICITY HMI run-time database and the OPC Server is no longer running. This can occur when a server is active (with OPC clients connected) and the last CIMPLICITY project on the same node as the OPC Server is stopped. OPC clients must disconnect before the OPC Server automatically terminates (or is deactivated via the user interface). Item \\project\point.attribute add failed. See next error. A warning message indicating that a request to add a new point to the OPC Servers internal cache has been rejected by the run-time database. Refer to the following message for more information on why the request was rejected. Item \\project\point.attribute write failed. See next error. A warning message indicating that a point write request by the OPC Server has been rejected by the run-time database. Refer to the following message for more information on why the request was rejected. Item \\project\point.attribute read failed. See next error. A warning message indicating that a point read request by the OPC Server has been rejected by the run-time database. Refer to the following message for more information on why the request was rejected. Item \\project\point.attribute add on change request failed. See next error. A warning message indicating that a registration for change notifications for a point (used by server for subscriptions and cache reads/writes) has been rejected by the run-time database. Refer to the following message for more information on why the request was rejected.
Run-time Statistics
Run-time statistics are maintained by the CIMPLICITY HMI OPC Server for diagnosing and correcting performance problems. Typically, performance problems are caused by how an OPC client application organizes and uses the resources supplied (i.e. group objects and item objects) by an OPC server. The OPC Server maintains statistics about OPC client server interactions. These statistics are viewable from an OPC client by reading pre-defined item IDs from the CIMPLICITY HMI OPC Server. See the section Server Statistics OPC Items for a list of the item IDs. Each of the statistics is described below. Client Connections The number of OPC clients currently connected to the CIMPLICITY HMI OPC Server. Client Groups The number of OPC groups (for all clients) currently configured in the OPC Server. Client Items The number of OPC item references (for all groups) currently configured in the OPC Server. The same item may appear in more than one group (or be referenced by more than one OPC client). Each reference is counted in this statistic.
GFK-1675
4-11
Read Transactions Per Period The number of synchronous and asynchronous read transactions performed by the OPC Server in the last sample period. A read transaction is composed of one or more items and may be a cache read or device read. Write Transactions Per Period The number of synchronous and asynchronous write transactions performed by the OPC Server in the last sample period. A write transaction is composed of one or more items. Subscription Transactions Per Period The number of client subscription updates (i.e. unsolicited updates to an OPC client) performed by the OPC Server in the last sample period. A single subscription update is composed of one or more items.
Note: The period over which read, write, and subscription transactions are calculated is configurable. See the section Statistics Sample Period for information on how to change the current sample period.
4-12
GFK-1675
Authentication
Authentication security ensures that the interaction between an OPC client and the CIMPLICITY HMI OPC Server is legitimate. Authentication security for DCOM is an extension of the standard Windows operating system security (which itself is layered upon secured RPC (remote procedure call)). Authentication poses the question Is the OPC client who it says it is? and Is the OPC server who it says it is?. The user configures the level of authentication required which specifies how often this question is posed. Each more secure level places extra processing overhead on communications between the OPC client and the OPC server. A client and server negotiate to the highest level of authentication when the configured authentication levels differ. For example, authentication can be required only at OPC client connection time to a server (level = connect). Once a client is connected (and is authorized to use the OPC Server), all interactions are performed without further authentication. As another example, authentication can be required at the packet level (level = Packet Privacy), with each packet being fully encrypted. The choice of the authentication level is dependent on the security policies of the user. In a multi-node computing environment the security system on the computer node running the OPC server must be able to verify that the security ID of the OPC client is valid. In a domain environment, domain accounts must be validated. In peer-to-peer environments, matching local user accounts must be configured. Authentication of an OPC client must be satisfied before authorization and activation permissions are checked. If a client cannot be authenticated, permission checking for the requested action is not performed.
Authorization
Once an OPC client transaction has been authenticated, DCOM security must determine if that OPC client is authorized to perform call-level interactions with the OPC server. (COM/DCOM technology allows OPC client applications to make programmatic calls across process and computer node boundaries.) This determination is made by looking at the ACL (access control list) for the OPC server COM object. This ACL (or list of users and/ or user
GFK-1675
4-13
groups) for the OPC server is configured using the DCOMCNFG utility supplied with the Windows operation system. See the section "Tools for Configuring DCOM Security" for more information on DCOMCNFG. If the OPC clients user identity is listed on the OPC servers access permissions ACL (as a user or group member), then the OPC client can access CIMPLICITY HMI OPC Server objects.
Activation
Activation security is unique to DCOM. The DCOM framework provides the ability for a OPC client to access the CIMPLICITY HMI OPC Server object. If the OPC server object is installed on another computer node, then the framework launches (or activates) the OPC server (if it already not running) on behalf of the client. Activation permission checking works the same as authorization permission checking. An authenticated clients user identity is checked against the OPC servers ACL for launch permissions. Activation permissions for the CIMPLICITY HMI OPC Server are setup using DCOMCNFG.
Note: Activation services are not supported by Windows 95/98 DCOM. Users must manually launch the CIMPLICITY OPC Server on these operating system platforms.
Launch Identity
Most often, the CIMPLICITY HMI OPC Server is configured to run as a background process (i.e. non-interactive mode) with the OPC Server starting and stopping as OPC clients connect and disconnect. The OPC server must be given a user identity under which to run (i.e. administrator account, the current interactive user, or a special account setup for the OPC server). The launch identity for the CIMPLICITY HMI OPC Server is specified using the DCOMCNFG utility.
4-1
GFK-1675
NOTE: DCOM security settings for COM objects that do programmatically initialize DCOM security cannot be changed with DCOMCNFG. Important DCOMCNFG Settings for the CIMPLICITY HMI OPC Server This section lists the DCOMCNFG settings that are relevant for configuring the DCOM security for the CIMPLICITY OPC Server. The OPC Server can be configured to use default security settings for the computer node or the settings can be customized. To access the customized settings, highlight the CIMPLICITY HMI OPC Server label (as shown above) and press the Properties button. CIMPLICITY HMI OPC Server Location Tab Always select the option Run application on this computer. CIMPLICITY HMI OPC Server Security Tab Select the Use default access permissions (for authorization security) and Use default launch permissions (for activation security) unless the default settings do not satisfy your system security requirements. If customized settings are required, specify the trusted users and / or groups (ACL) for authorization and activation security settings. CIMPLICITY HMI OPC Server Identify Tab While initially setting up the OPC server or troubleshooting client / server interaction problems, specify The interactive user. Otherwise, specify the option This user and supply a valid user account (local machine or domain as required) and the passwords configured for this user account. The OPC server will take on the identity (and privileges and permissions) of the user account when activated by an OPC client. It is important to realize that the chosen user account (either interactive or this user) must be authenticated on a remote OPC client node in order for some OPC interactions to occur (e.g. subscription notifications). DCOMCNFG Default Properties Select the option Enable Distributed COM on this computer. The Default Authentication Level should be set to satisfy the network security
GFK-1675
4-15
requirements of the installation. (Windows NT 4.0 SP4 allows the Authentication Level to be customized for the OPC Server. The SP3 DCOMCNFG utility provides this feature at the default level only.) The Default Impersonation Level should be set to Identify. DCOMCNFG Default Security If customized access permissions and launch permissions were not specified on the CIMPLICITY HMI OPC Server Security Tab, then the user and / or group settings (ACL) assigned under the Default Access Permissions and Default Launch Permissions are used by DCOM security for the OPC Server.
3.
4. 5. 6.
4-14
GFK-1675
7. 8.
On the Security tab, select the Use custom launch permissions option. Edit the ACL to include the group Everyone with the Type of Access: set to Allow Launch. Select the Identity tab. You have two choices here. If you want the OPC server launched with access to the user interface (for troubleshooting or initial setup), select The interactive user option. If you want the OPC server to run as a background process, select the This user option, specifying a valid local machine or domain account and password. Regardless of the method chosen, the account must be part of the USER group at a minimum.
Note: Remember to setup the OPC servers CIMPLICITY project security. See the section CIMPLICITY Project Security for more information.
2. 3.
Note: Whenever possible, try to use DCOMCNFG settings that are custom to the CIMPLICITY HMI OPC Server. This has two benefits; one, as the OPC server is setup for initial use, the behavior of other COM objects installed on the same computer node is not affected and two, future changes to other COM object DCOM security settings do not affect the behavior of a correctly operating CIMPLICITY HMI OPC server. Enable authentication security by setting the DCOMCNFG Default Authentication Level at a level of at least Connect. If you are running DCOMCNFG supplied with SP4, then ensure that the Authentication Level custom setting is set to at least the level Connect. Once authentication is enabled, DCOM security will attempt to verify the user identities of both the OPC server and the OPC client. Thus, user accounts must be setup correctly if the OPC Server is on one computer node and the client is on another computer node. See the guideline below on domain authentication setup. In a peer-to-peer network, the user account under which the OPC server is running must also exist on the OPC client machine, and vice versa.
GFK-1675
4-17
Enable CIMPLICITY HMI OPC Server activation security by specifying known users and / or groups in the DCOMCNFG Use custom launch permissions option for the OPC Server. As a general rule, the activation security should always be more restricted than the authorization security. This prevents the situation where an OPC client can activate the CIMPLICITY HMI OPC Server, but cannot use the OPC Server objects. To restrict access of OPC clients to a CIMPLICITY HMI OPC Server that is already running (authorization security), modify the access control list (ACL) of the OPC server by editing the Use custom access permissions option of DCOMCNFG. A domain authentication architecture provides the lowest cost solution (from a maintenance perspective) for DCOM security. If you are using a domain, then follow these general setup guidelines: 1. 2. 3. Create a new domain group. Users part of this group will be allowed to launch the CIMPLICITY HMI OPC Server and access its objects. Add the new group to the launch permissions and access permissions ACL for the CIMPLICITY HMI OPC Server. Do this using DCOMCNFG. Make all user accounts that run an OPC client application part of this new group.
3. 4.
4-18
GFK-1675
5.
Select the Location tab. Type in the node name where the CIMPLICITY HMI OPC server is installed. In the example below, the OPC Server is installed on the MANUFACTURING node.
6.
Select the General tab. An example of this sheet is shown below. It shows that the CIMPLICITY HMI OPC Server object is registered on this machine, but points to another node (MANUFACTURING) for activation / access of the object.
GFK-1675
4-19
7.
A client application on the remote node should now be able to reference the CIMPLICITY HMI OPC Server (given that DCOM security issues have been addressed). The ProgID of the OPC Server is CIMPLICITY.HMI.OPCServer and the CLSID is {B01241E8-921B-11d2-B43F-204C4F4F5020}.
4-20
GFK-1675