Sie sind auf Seite 1von 33

SimSci

352,, .
23&8QLILHG$UFKLWHFWXUH
6HUYHU

May 2014
All rights reserved. No part of this documentation shall be reproduced, stored in a retrieval system, or
transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without the
prior written permission of Invensys Systems, Inc. No copyright or patent liability is assumed with
respect to the use of the information contained herein. Although every precaution has been taken in the
preparation of this documentation, the publisher and the author assume no responsibility for errors or
omissions. Neither is any liability assumed for damages resulting from the use of the information
contained herein.

The information in this documentation is subject to change without notice and does not represent a
commitment on the part of Invensys Systems, Inc. The software described in this documentation is
furnished under a license or nondisclosure agreement. This software may be used or copied only in
accordance with the terms of these agreements.

2014 by Invensys Systems, Inc. All rights reserved.

Invensys Systems, Inc.


26561 Rancho Parkway South
Lake Forest, CA 92630 U.S.A.
(949) 727-3200
http://www.simsci.com/

For comments or suggestions about the product documentation, send an e-mail message to
ProductDocumentationComments@invensys.com.

All terms mentioned in this documentation that are known to be trademarks or service marks have been
appropriately capitalized. Invensys Systems, Inc. cannot attest to the accuracy of this
information. Use of a term in this documentation should not be regarded as affecting the validity of any
trademark or service mark. Invensys, Invensys logo, PRO/II, and SimSci are trademarks of Invensys
plc, its subsidiaries and affiliates.
OPC Unified Architecture Server

Table of Contents
1 OPC UA Server....................................................................................................................... 4

1.1 Overview ......................................................................................................................... 4

1.2 OPC UA Standard ........................................................................................................... 4

1.3 Why OPC UA Server? .................................................................................................... 4

1.4 General Assumptions about the OPC UA Server ........................................................... 5

1.5 Discovery of OPC UA Server ......................................................................................... 6

1.6 Procedure to Invoke a Simulation ................................................................................... 8

1.6.1 Prerequisites ............................................................................................................... 8

1.6.2 Process Steps .............................................................................................................. 9

1.7 Method Calls and Data Access ..................................................................................... 22

1.7.1 Method Calls ............................................................................................................ 22

1.7.1.1 Close Simulation ............................................................................................... 22

1.7.1.2 Save Simulation ................................................................................................ 23

1.7.1.3 Run Simulation ................................................................................................. 24

1.7.1.4 RunChecks ........................................................................................................ 24

1.7.2 DataAccess ............................................................................................................... 25

1.7.2.1 Unit Operations ................................................................................................. 25

1.7.2.2 Streams .............................................................................................................. 26

1.8 Enhancements in the OPC UA Server .......................................................................... 27

1.8.1 Certificate based Authentication .............................................................................. 27

1.9 Glossary ........................................................................................................................ 31

3
OPC Unified Architecture Server

1 OPC UA Server

1.1 Overview

The OPC UA Server is a communication data server for the different SimSci Simulation Software
packages. This server is capable of generating data and exposing methods available to access
Dynsim models, PRO/IITM models, and ROMeo models through the OPC UA communication
framework. Process simulation capabilities are encapsulated as OPC UA services and this is done
for simple models (such as material stream or unit operation) as well as for more comprehensive
models. With the OPC UA interface, the discovery of services and configuration models are
possible along with calculation of the simulation model.

1.2 OPC UA Standard

OPC UA does not replace the existing standards such as OPC, but rather complement them by
providing a common interoperability layer for exchanging information and orchestrating processes.
OPC UA embodies all the functionality of the existing OPC servers and expands on top of them.
Backward compatibility with previous standards will ensure quick adoption on the market.

The OPC Foundation has taken many steps to guarantee that the implementation of the standard is
relatively a straightforward and easy process.

To facilitate the adoption of the new standard and to reduce the barrier for entry, the OPC
Foundation has developed an OPC UA software development kit (SDK). The SDK is the entry
point to jump-start the existing applications and make them OPC UA enabled. The SDK consists of
a series of application programming interfaces and sample code implementations. To that end, the
UA specification is written to be platform-agnostic and, for that reason, the SDK comes in different
flavors to facilitate adoptions on different platforms. The .Net, ANSI C, and Java sample
implementations are provided to OPC Foundation members.

Each "flavor" of the SDK is designed to suite special needs in terms of platforms, memory and
processor requirements, but all of them are capable to seamlessly interoperate with each other. The
.Net version of the SDK is more suited for rich client/server implementation, while the ANSI C
version is more suited for thin implementation like embedded devices, where memory footprint and
CPU utilization are more important. The Java implementation is more suited for the Web
environment and thin clients but can also be used on other environments. Each software vendor
picks the implementation they prefer, depending on the unique requirements for performance,
cross-platform capability and Internet-friendliness.

1.3 Why OPC UA Server?

The OPC UA Server is designed to handle communications to and from Dynsim, PRO/II, and
ROMeo applications. The UA Driver software layer contains all the basic codes to display data and
make methods available to any OPC UA Certified Client. This software layer will transmit/receive
data and/or send commands to any one of the three supported simulator types namely Dynsim,
PRO/II and ROMeo applications. The UA data space in the server is shared by Dynsim, PRO/II,
and ROMeo applications to which it is connected. The UA Driver product and the appropriate
adapter software are delivered with any of the supported simulation types. The OPC UA Server is
compatible with any OPC UA client that supports standard UA Data Access or UA Method Calls.
By using the UA proxy technology developed by the OPC Foundation, this server can support a
standard OPC DataAccess client.
4
OPC Unified Architecture Server

All the adapters can communicate with the OPC UA Server driver layer through a common
interface and the adapters can connect to the OPC UA Server at any time. At present, it is assumed
that each adapter is a loadable DLL (Dynamic Linked Library) or exe (Executable file) that can be
loaded in the OPC UA Server drivers address space. Each adapter is capable of being developed
independently and new adapters can be developed to support other SimSci products in future.

Figure 1: Communication Work Flow of OPC UA DA Server

Once the process simulation domain is exposed as an OPC UA information model, and objects such
as material streams, unit operations and flow-sheets are instantiated, then the models can be
invoked also for off-line use, without any interaction with actual data.

OPC UA would then be used as a communication protocol between adapters and any client, be it a
standalone user interface or a web server. Although the OPC UA specification is created for
distributing applications, and designed for efficient communication when the client and the server
are on different machines, the architecture is simplified with the two coexisting on the same
machine.

1.4 General Assumptions about the OPC UA Server

The following general assumptions are being made about the OPC UA Server:
1) The initial design of the OPC UA Server uses the OPC UA QuickStart DataAccess server as a
starting point. This server makes the assumption that each block (model/stream instance) has a
unique name. Therefore if you have two different simulations that are to be operated
simultaneously by the server, then the simulations must be handled in different address spaces.
2) A block in the Data Access servers will be equated with a model or stream instance in Dynsim,
PRO/II, or ROMeo applications. The OPC Data Access server currently cant support and
handle groups under the block instances. The OPC UA Server code needs to be modified to
handle the concept of groups under the block instances.
3) The program assumes that underlying system will return tree branches all the way down to the
group level under a particular block (or model instance). The program then operates on this
branch.
4) All adapters will have a method(s) to efficiently return tree information (branch and leaf). All
adapters will set up the top branch of their tree (i.e. Dynsim, ROMeo, or PRO/II softwares) to
have a method called Open Simulation/Close the simulations.

5
OPC Unified Architecture Server

5) UOM data will be supplied by individual values in the tree but the user will not have access to
the UOM function to make global changes through the OPC server. The OPC UA clients (i.e.
Portal) will be responsible for displaying values with different UOMS. At present the UOM for
the opened simulation would be in internal units.
6) Initial version of the server will not do any kind of security checking.
7) Adapters will be loadable dlls that come for each product. The PRO/II and ROMEO adapters
will basically call adapter code for the portal application with a few new methods to get tree
data structure.

1.5 Discovery of OPC UA Server

The UA Server is discovered by generic clients through a discovery service. The UA solution
relies on a special end point called the Discovery Endpoint which is implemented by all UA
Servers as well as a special class of servers called Discovery Servers. This end point does not
require any security and is used only for providing clients with location and current security
configuration for one or more servers.

A Discovery Endpoint always supports two methods: FindServers and GetEndpoints.

The FindServers method returns the servers known to the Discovery Endpoint.

The GetEndpoints method returns the end points supported by the server and all the security
information required to connect to these end points.

The UA provides an equivalent server called the Local Discovery Server (LDS) which is installed
on every machine with a UA Server. The LDS provides a Discovery Endpoint at well-known
URLs. Clients have advance knowledge of these URLs and can use them to find the LDS on any
given host. The following is an excerpt of the Discovery URL that is part of standard client
configuration file (Opc.Ua.Client.Config.Xml).

The following snapshot shows Discovery service end point reference from client perspective:

6
OPC Unified Architecture Server

Figure 2: Add Service Reference Window

The order in which the client uses these URLs can be configured, as different systems have
different policies.

To summarize, the UA Client discovers everything it needs to connect securely with the UA
Server using the following steps:

1. Connect to the LDS on the machine and call FindServers


2. Choose a Server and choose a Discovery Endpoint
3. Connect to the Server Discovery Endpoint and call GetEndpoints
The following snapshot depicts the discovery process in a sequence diagram:

7
OPC Unified Architecture Server

Figure 3: Discovery process in a sequence diagram

1.6 Procedure to Invoke a Simulation

1.6.1 Prerequisites

To invoke a simulation, the following prerequisites are to be met:

8
OPC Unified Architecture Server

Ensure that Opc.Ua.DiscoveryServer is running. This server will run as a


service post installation of the PRO/II software.

Figure 4: Task Manager View

Ensure that a generic OPC UA client is installed on your machine.

1.6.2 Process Steps

Note: In this case, OPC UA client named UaExpert is used to describe the functioning of
OPC UA Server.

To initiate the process of invoking a simulation, you need to start SimSci OPC UA Server
1.1 manually.

9
OPC Unified Architecture Server

1. Go to Start ProgramsSIMSCISimsci OPC UA Server 1.1

Figure 5: Shortcut to access Simsci OPC UA Simulation Server 1.1


or

2. Go to C:\Program Files\Common Files\SimSci\OpcUAv1.1\Bin folder

Figure 6: Path for Bin folder

10
OPC Unified Architecture Server

3. Double-click the Simsci.Opc.Ua.SimulationServer.exe to start the server.


Now open Windows Task Manager to check that both the Opc.Ua.DiscoveryServer and
Simsci.Opc.Ua.SimulationServer services are running.

Figure 7: Windows Task Manager View


4. Double-click the UaExpert icon on the desktop.

Figure 8: View of UaExpert icon on the Desktop

If the UaExpert client is launched for the first time, then the following certification page
is displayed, prompting you to either accept the certification permanently or reject it.

11
OPC Unified Architecture Server

Figure 9: Trusted Certification Page

5. Click Accept this certificate permanently and then click OK. The Unified Automation
UaExpert window appears as shown in figure below.

Figure 10: Unified Automation UaExpert Window

12
OPC Unified Architecture Server

6. To add the OPC UA Server to the UaExpert client, click Add Server button from the
top menu. Add Server dialog box is displayed.

Figure 11: Add Server Dialog Box

13
OPC Unified Architecture Server

7. Expand the Local node from the tree structure to view the servers available.

Figure 12: Add Server dialog box depicting Simsci OPC UA Simulation
Server

8. As the Discovery Server service is running, the Simsci OPC UA Simulation Server will
be observed in the tree structure as a node.

Note: You can also do a custom discovery of the server in case of attempting to connect
to a remote server machine. You can enter the machine name/IP address of the server
machine and add server in custom mode to connect to the remote server.

14
OPC Unified Architecture Server

9. Expand the Simsci OPC UA Simulation Server node.

Figure 13: Add Server dialog box depicting the security options available

The three available security settings options are displayed as nodes.

10. Select Sign & Encrypt or Sign from the list of options and click OK. The required
server service is added to the client.

Figure 14: Project Window with server added to the project node

15
OPC Unified Architecture Server

11. Now click the Connect Server button from the top menu to establish connection
between the server and the client.

Figure 15: Address Space with PRO/II software installed as a node to the root.

The client displays the nodes of the products (PRO/II software) installed.

16
OPC Unified Architecture Server

12. Expand the PRO/II software group to view the tree structure.

Figure 16: Extended Tree View of PRO/II Software

13. Click Open Simulation option to select it from the list.

17
OPC Unified Architecture Server

14. Right-click Open Simulation and click Call from the context menu.

Figure 17: Calling Open Simulation on PRO/II Software

The following dialog box is displayed.

Figure 18: Call Open Simulation dialog box

18
OPC Unified Architecture Server

15. Specify the Input Value as C:\SIMSCI\PROII93\User\a1.prz.

Figure 19: Open Simulation with input value specified

16. Click Call.

Figure 20: Message for successfully invoked simulation

The message that the simulation is invoked successfully is displayed.

17. Click Close.

19
OPC Unified Architecture Server

18. Collapse the PRO/II software group and expand it again. The invoked simulation is
displayed under PRO/II software group as a new node.

Figure 21: Invoked Simulation Tree View

20
OPC Unified Architecture Server

19. Expand the invoked simulation to observe the groups and parameters under it.

Figure 22: View of methods and data accesses associated with the simulation

20. The branch will display all the methods and data accesses associated with the running
simulation.
21. The elaborated view of the tree structure is shown in the figure given below.

Figure 23: Expanded tree structure

21
OPC Unified Architecture Server

1.7 Method Calls and Data Access


1.7.1 Method Calls
1.7.1.1 Close Simulation

This method is called when you either close the Excel spreadsheet or when the
simulation is disconnected from the portal. The application is expected to cleanup and
close the simulation.
This method contains two arguments, namely, Input and Output arguments, as shown in
the tree structure below.

Figure 24: Close Simulation Method View

22
OPC Unified Architecture Server

User can type-in the string Save, to save and close the simulation with Close
Simulation method call. The string is not case sensitive.

Figure 25: Close and Save Simulation with Test Client

1.7.1.2 Save Simulation

Save simulation method is used to overwrite the simulation data base with updated values.
For e.g.: If you have subscribed to some variables in the OPC UA Client, you can access
those variables to modify based on the server exposed data access levels (Read variables
or Read/Write variables). If you modify some parameter values and wants to overwrite the
changes to the simulation database, you have to call the Save simulation method.
Note: Subscribing to parameters values and merely changing them in the view window of
the client does not overwrite the database. One has to call save simulation method in case
they intend to save the changes to the simulation. Save Simulation action is not reversible.
The initial values would be over written if there are any changes to the simulation.

23
OPC Unified Architecture Server

1.7.1.3 Run Simulation

The Run Simulation method is available for single database at any given point of time. It
cannot execute simultaneous Run Simulations because of product limitations. It will check
whether the server gets appropriate message from the product adapter.

The portal calls the RunChecks method before calling the Run Simulation method, so as to
allow the product performs the data consistency checks. Based on the result, it will either
call the Run Simulation method or display an error/warning message.

The Run Simulation method call will run the simulation if it is currently frozen.

1.7.1.4 RunChecks

The portal calls this method before RunCalc method, so that the application can run data
consistency checks and issue any warning/error message before running the simulation.

24
OPC Unified Architecture Server

1.7.2 DataAccess

1.7.2.1 Unit Operations

The Unit Operations, when expanded, appears as shown in the figure below.

Figure 266: Unit Operations Data Access View

Unit Operations consists of Models like Compressor, Controller, Flash, MVC, Mixer,
Portal Data, Simple HX, and Splitter.
Under Models, it consists of Groups like C2CO, C3CO, and PortalData.
Under Groups, it consists of Parameters like Basic, Calculations and Results, Compressor
Conditions, Feeds and Products, Heat and Mass Balance, PortalData, and Specifications.
Under Parameters, it consists of scalar, vector, and string quantities like Description,
Name, and Thermodynamic System.

25
OPC Unified Architecture Server

1.7.2.2 Streams

The Streams, when expanded, appears as shown in the figure below.

Figure 277: Stream Data Access View

Streams consist of Models like 1, 10, 11, and so on.


Under Models, it consists of Groups like PortalData, Name, Description, Phase, and
Thermodynamic System.
Under Groups, it consists of Parameters like Portal Data that includes scalar, vector and
string quantities.

26
OPC Unified Architecture Server

1.8 Enhancements in the OPC UA Server

1.8.1 Certificate based Authentication

Certificate based authentication is implemented for OPC UA Server 1.1. While connecting to
the Server, it is mandatory for any Client to have its Certificate placed in the Trust list of the
OPC UA Server 1.1. Once this is done, the User can connect to the Server using secured
TCP\IP protocol with a Desktop Client or using secured https protocol with a Silverlight or
an HTML5 Client with a browser or Mobile device.

The OPC UA Server provides secured access to the clients connecting through TCP/IP and
https protocols:

TCP/IP Protocol

When a sample OPC UA Client connects to OPC UA Server by using the TCP/IP
protocol for the first time, the user is prompted to accept the OPC UA Server certificate
to be included in the OPC UA Client Trustee list.

Figure 28 User prompted to accept the Server certificate to be included in the OPC UA
Client Trustee list

The user needs to copy the Client Certificate in the Server Trustee List to permit the Client
to access the OPC UA Server. Unified Automation UAExpert Client is used for
demonstration.

27
OPC Unified Architecture Server

Perform the following steps to copy the Client Certificate in the Server Trustee List:

1. Select the Manage Certificates option from the Settings menu.

Figure 29 Select Manage Certificates option

2. Click Open certificate Location button.

Figure 280 Browse to Certificate location

3. Copy UaExperts certificate and place it in the OPC UA Server Trustee list. The
location of the Server list could be found in the
Simsci.Opc.Ua.SimulationServer.Config.xml file on the Server machine (C:\Program
Files\Common Files\SimSci\OpcUAv1.1\Bin).
28
OPC Unified Architecture Server

http protocol

The user needs to copy the Silverlight Client Certificate in the OPC UA Server
Trustee list to permit the Silverlight Client to access the OPC UA Server http
protocol.

https protocol

The user needs to copy the Silverlight Client and HTML5 Client Certificates in
the OPC UA Server Trustee list to permit both the clients to access the OPC UA
Server using https protocol.

All the method calls can be accessed through the http/https protocol. The data for the Unit
Operations and Streams from the simulation can be viewed or modified by using the http
and https protocols.

Figure 291 Simsci OPC UA Server 1.1

29
OPC Unified Architecture Server

The OPC UA Server can be accessed through the sample HTML5 Client by using a tablet
or a smart phone through the https protocol. The following figure shows the sample
HTML5 Client getting connected to the OPC UA Server through the https protocol by
using an Apple iPad.

Figure 302 Simulation file accessed through sample HTML5 Client through https
protocol by using an Apple iPad

30
OPC Unified Architecture Server

1.9 Glossary

OTS - Operator Training Simulator

XML - Extended Markup Language

OPC UA - OPC Unified Architecture

Portal - Excel Interface to SimSciTM Products

ROT - Running Object Table

OPC DA - OPC Data Access

Below is a table that gives a brief description about the configuration parameters and its default
settings used in the Simsci.Opc.Ua.SimulationServer.Config.xml

Sno Parameter Description Default Units


value
1 Operation Timeout The default timeout in 600000 millisec
milliseconds for
operations (used by
clients)
2 MaxStringLength The maximum length 1048576 -
for a string value in
any message
3 MaxBufferSize This value controls 65535 -
how big a block of
memory the transport
layer allocates
4 Channel Lifetime The lifetime of a 300000 millisec
Security Token in
milliseconds
5 SecurityTokenLifetime This specifies how 3600000 millisec
long a security token
can be used without
renewal
6 MaxSessionCount The maximum number 100 No.
of simultaneous
sessions
7 MinSessionTimeout The minimum session 10000 millisec
lifetime permitted by
the server
8 MaxSessionTimeout The maximum session 3600000 millisec
lifetime permitted by
the server
9 MaxBrowseContinuationPoints The maximum number 10 No.
of browse
continuation points
per session
10 MaxQueryContinuationPoints The maximum number 10 No.

31
OPC Unified Architecture Server

of query continuation
points per session
11 MaxHistoryContinuationPoints The maximum number 100 No.
of history continuation
points per session
12 MaxRequestAge The maximum age of 600000 millisec
an incoming request
13 MinPublishingInterval The minimum allowed 100 millisec
publishing interval
14 MaxPublishingInterval The maximum 3600000 millisec
allowed publishing
interval
15 MaxSubscriptionLifetime This controls the 3600000 millisec
maximum keep alive
count. Smaller
publishing intervals
will allow large keep
alive provided the
maximum subscription
lifetime is not
exceeded
16 MaxMessageQueueSize The maximum number 10 No.
of sent messages kept
in the queue for each
subscription
17 MaxNotificationQueueSize The maximum number 100 No.
of notifications kept in
the queue for each
monitored item
18 MaxNotificationsPerPublish The maximum number 1000 No.
of notifications in a
single publish
response
19 MinMetadataSamplingInterval The minimum 1000 millisec
sampling rate for
rarely changing
metadata information
(such as the server
status)

32
Invensys Systems, Inc.
26561 Rancho Parkway South
Lake Forest, CA 92630
United States of America
http://iom.invensys.com

Global Customer Support


Inside U.S.: 1-866-746-6477
Outside U.S.: 1-508-549-2424 or contact your
local Invensys Representative.
Email: Invensys.iom.support@Schneider-electric.com
Website: http://support.ips.invensys.com

Das könnte Ihnen auch gefallen