0% found this document useful (0 votes)
24 views

OPC Server

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

OPC Server

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

SICAM 230 manual

OPC Server

v.7.20
©2015 Ing. Punzenberger COPA-DATA GmbH

All rights reserved.

Distribution and/or reproduction of this document or parts thereof in any form are permitted solely
with the written permission of the company SIEMENS. Technical data is only used for product
description and are not guaranteed qualities in the legal sense. Subject to change, technical or
otherwise.
SICAM 230

Contents

1. Welcome to SIEMENS help ........................................................................................................... 5

2. OPC server................................................................................................................................... 5

3. Compare OPC Server and OPC UA Server ...................................................................................... 6

4. Technical background .................................................................................................................. 8


4.1 General OPC Server Information ................................................................................................................. 9
4.2 Item Addressing: ....................................................................................................................................... 10
4.3 Group information .................................................................................................................................... 10
4.4 Supported OPC Specifications: .................................................................................................................. 11

5. Installing the OPC Server............................................................................................................ 11

6. Registering the OPC Server ........................................................................................................ 12

7. Licensing the OPC Server............................................................................................................ 13

8. Settings in SICAM 230 ................................................................................................................ 13

9. Browsing of the OPC Server ....................................................................................................... 14

10. Starting/stopping the OPC Server ............................................................................................... 14

11. Logging...................................................................................................................................... 15

12. Asynchronous read request ....................................................................................................... 15

13. REMOTE access with DCOM ....................................................................................................... 15


13.1 Windows Firewall ...................................................................................................................................... 16
13.2 General authorization ............................................................................................................................... 17
13.3 DCOM configuration ................................................................................................................................. 18
13.3.1 PC wide settings ......................................................................................................................... 18
13.3.2 Application specific settings ....................................................................................................... 21
13.4 Remote browsing the OPC Server ............................................................................................................. 22
13.4.1 Browsing with Registry entry ..................................................................................................... 23

3
SICAM 230

13.4.2 Browsing with OPC Enum ........................................................................................................... 23

4
SICAM 230 Welcome to SIEMENS help

1. Welcome to SIEMENS help

GENERAL HELP

If you cannot find any information you require in this help chapter or can think of anything that you
would like added, please send an email to [email protected]
(mailto:[email protected]).

PROJECT SUPPORT

You can receive support for any real project you may have from our Support Team, who you can contact
via email at [email protected] (mailto:[email protected]).

LICENSES AND MODULES

If you find that you need other modules or licenses, our staff will be happy to help you. Email
[email protected] (mailto:[email protected]).

2. OPC server
The OPC server makes the variables of the project available for standard OPC client tools.

The use of the OPC UA Server is recommended for several operations. It is part of the SIEMENS Process
Gateway

License information

5
SICAM 230 Compare OPC Server and OPC UA Server

Must be licensed in Editor and Runtime.

3. Compare OPC Server and OPC UA Server


The OPC UA server system has superseded the OPC server. Use of an OPC UA server is recommended for
most applications.

OPC SERVER

 OPC Task Force since 1995

 Uniform interface for automation systems

 Based on Microsoft's COM/DCOM technology

 OPC foundation since 1996

 several specifications for different applications

6
SICAM 230 Compare OPC Server and OPC UA Server

OPC UA SERVER

 First vision 2003

 Released in 2006, not yet all parts

COMPARISON OF OPC SERVER TO OPC UA SERVER

Parameters OPC Server OPC UA Server


Data model Limited for all applications

Implementation Manufacturer-dependent Manufacturer-independent

Interoperability no yes

Configuration laborious simple

Network use Not recommended (security); yes


Windows CE cannot be used

Network technology DCOM (error-prone, unstable) OPC UA TCP binary protocol

Performance low high

Platforms Windows only independent

Redundancy no yes

Resource requirements high lower

7
SICAM 230 Technical background

Service-orientated architecture no yes

Security outdated In accordance with current


standards

Connection security no provided

Windows CE no yes

4. Technical background
The concept of OPC ist conceived for the application in the cell and management level. Here the OPC
server offers data from the control level

OPC CLIENTS AND OPC SERVER

OPC SERVER

OPC defines objects, which are described by object interfaces. In the OPC server there are two kinds of
object interfaces, which can be addressed by an OPC client:

 The COM custom interface

 The OLE automation interface

OBJECT INTERFACE OF THE OPC SERVER

8
SICAM 230 Technical background

The COM-Interface is used by function pointer orientated languages such as C++. Through the
automation interface it is possible to communicate with script languages such as Visual Basic.

OPC OBJECT HIERARCHY

An OPC server consists of three hierarchical gradated objects:

 The server

 Groups and

 Items

An OPC server shows the real objects as items (variables). These items are within the OPC server unique.
The client organizes the items in one or more OPC groups.

4.1 General OPC Server Information


The OPC server:

 is an "Out of Process" server.

 Runs in a single thread apartment (STA)

 Is registered as COM server MULTIPLEUSE


That means: The server runs only once as a process instance. Several OPC clients sign into the

9
SICAM 230 Technical background

same server.

 Currently only works locally

4.2 Item Addressing:


The OPC server has to be able to distinguish, from which projects the variables come, because serveral
projects can be started in the Runtime. So the server uses the following nomenclature for the process
variables: Projectname.Variablename

Example
Project1.ActualValue

Project1 = name of the project currently running in the Runtime

. (Point) = Separator

Current value = Existing name of variable

4.3 Group information


A group name can be freely defined. For example: Test group 1.

The update cycle in the group is not considered by the OPC Server as the OPC Server has an on-change
data connection to the Runtime. Therefore every modification of value will be transmitted to the OPC
Server without cyclically requesting the value.

Information
OPC clients must create an own group for each SICAM 230 project.

10
SICAM 230 Installing the OPC Server

4.4 Supported OPC Specifications:


OPC Data Access Servers Version 1.0

OPC Data Access Servers Version 2.0

SUPPORTED OPC INTERFACES:

Interfaces supported
IOPCServer Yes

IOPCBrowseServerAddressSpace Yes

IOPCServerPublicGroups No

IPersistFile Yes

IOPCCommon (from 2.0) Yes

IOPCSyncIO No

IOPCItemProperties (from 2.0) Yes

IConnectionPointContainer (from Yes


2.0)

5. Installing the OPC Server


As a default the control system OPC Server is installed and registered with the control system. If you did
not install the OPC Server in a user-defined installation, you have to install it later. With Control Panel –
Software the existing installation can be edited.

To use OPC Servers, you still have to install the OPC core components. You can find them on the
installation medium with the additional programs.

11
SICAM 230 Registering the OPC Server

6. Registering the OPC Server


The OPC Server has to be registered correctly. For security reasons, the setup does not register the OPC
server by default. After installation, the OPC server can therefore not be discovered by an OPC client.
You must first explicitly register the OPC server.

Proceed in the following way:

1. Install the OPC-DA core components from the OPC Foundation. The setup is in the DVD in the
"AdditionalSoftware" directory.

2. Open the SICAM 230 Startup Tool

3. Select Tools in the right menu bar

4. Select OPC Server in the list

5. Enter the desired parameters in the Command line parameters drop-down list
Possible inputs:
 zenopcsrv.exe /RegSrv: registers the OPC server; a message is given if this is not
successful
 zenopcsrv.exe /RegSrvD: registers the OPC server and also gives a message if this is
successful
 zenopcsrv.exe /UnregSrv: deregisters the OPC server; a message is given if this is
not successful
 zenopcsrv.exe /UnregSrvD: deregisters the OPC server and also gives a message if
this is successful

6. Click on the Start button

In the event of errors, check that you have sufficient authorizations.

12
SICAM 230 Licensing the OPC Server

7. Licensing the OPC Server


The OPC Server only runs, if it is correctly licenced. Otherwise you get the following error message:

Licencing is done with the standard licencing procedure. On ordering the OPC Server you have to state,
on which computer the OPC Server should be installed, and the Runtime serial number you use there.
From the licencing office you then get a new serial number and a new activation number for that
computer. With these the OPC Server is licensed. These numbers have to be entered in the
zenon6.ini with the tool licence order (Start – Programs – COPA-DATA – Licence order).

8. Settings in SICAM 230


VBA has to be activated, so that the control system OPC Server can get data from the Runtime. Please
check, if the following entries in the zenon6.ini are set correctly:

[VBA]

EVENT=1 Switches on or off the event mechanism for the VBA – COM interface )

Default =0

This setting must be set to EVENT=1.

Attention

If the event mechanism in the Runtime is deactivated, the OPC Server can access the
variables for writing, but the reading access does not work!
The OPC Server then gets no change events from the Runtime. For the connection quality
all OPC Clients will display “disturbed”.

No further settings in SICAM 230 are necessary.

The OPC Server reads out the running Runtime and offers all variables of all running projects for the
connection.

13
SICAM 230 Browsing of the OPC Server

Information
As soon as the Runtime is started, you can read out all variables from all projects that are
available in the Runtime. This is independent from the fact, if the included projects are
standalone, client or server projects.

9. Browsing of the OPC Server


OPC Clients use two different methods to find and to browse the variable information of the OPC Server.
Finding the OPC Servers installed on the PC can be done in two ways.

 Reading out the Registry

 Browsing with the additional program OPCEnum.exe


The additional program OPCEnum is not distributed. So it can happen that an OPC Client cannot find the
control system OPC Server, because it uses this browsing method. Read the documentation of the OPC
Client to find out whether the browsing method can be changed to reading out the registry. (For the
Matrikon OPC Explorer you find that under Options.) If this is not the case, you must install the program
OPCEnum.

Hint: If you install the freely available Matrikon OPC Simulator Server, OPCEnum is also installed.

Information
When browsing the control system OPC Server offers all variables that exist in the
running control system Runtime. So you have to make sure, that the control system
Runtime is running, before you start browsing the variables.

10. Starting/stopping the OPC Server


The OPC Server is automatically started by the first client that connects to it and it is stopped by the last

14
SICAM 230 Logging

client that disconnects.

11. Logging
For monitoring and evaluating the activities of the <CD_PRODUCTNAM> OPC Server the Diagnose
Viewer is used.

12. Asynchronous read request


The OPC interface IAsyncIO and the OPC interface IAsyncIO2 support multiple asynchronous read
requests.

13. REMOTE access with DCOM


With DCOM technology, it is possible for an OPC client to have read/write access to the SICAM 230 OPC
Server over the network.

15
SICAM 230 REMOTE access with DCOM

Attention
The OPC server is optimized for local use; use in a network is expressly not
recommended!
Background: OPC network communication works using DCOM technology from
Microsoft, which has proven itself to be prone to errors and unstable. Particular
disconnections, such as unplugging a network cable and very long time-out periods are
problematic in industrial applications.

Recommended solution:
 Using an OPC_UA Servers
or

 SICAM 230 Runtime is installed and works as a client for the desired program on the computer on
which the OPC client is running. SICAM 230 OPC Server is started for this client. In this way, SICAM
230 OPC Server can be connected to the OPC client.

Attention
Make sure, that always the user of the OPC Client application logs in at the server. In
certain cases, this does not have to be the user registered on the client PC.
This is then the case if the application is started with another user. This happens e.g., if
the Runtime (with an OPC Client driver, that connects to the remote OPC Server) is
started with the Remote Transport. Then the OPC Client runs in the context of the
SYSTEM user and in the context of the logged in user.
In any case, you must enter the correct user on the OPC Server PC in Access
authorizations (on page 20)!!

13.1 Windows Firewall


The Windows firewall blocks all incoming connections. So also the connection attempts of the OPC
Client to the OPC Server are blocked. So you have to completely deactivate the firewall or to configure it
correctly.

As the correct configuration could not be found, when this tutorial was written, we recommend at the

16
SICAM 230 REMOTE access with DCOM

moment to deactivate the Windows firewall completely.

13.2 General authorization


The user – in whose context the OPC Client runs – must have administrator rights on the server PC, so
that the OPC Client can log in at the OPC Server PC and gets the according rights there to start and
configure the OPC Server.

Start the Control panel on the OPC Server and open the entry “User accounts”. With 'Add…' add a new
user, with which the OPC Client logs in, and configure this user as an administrator. See example 'user' in
the screenshot.

Information
The best is to use the same Windows user on the OPC Server and on the OPC Client and
to add this user to the administrator group.
Attention! It is not sufficient to have local users with the same name on both computers.
It has to be the same domain user!

17
SICAM 230 REMOTE access with DCOM

13.3 DCOM configuration


You only have to do this on the OPC Server PC. No settings are necessary on the Client PC.

13.3.1 PC wide settings


Start the program DCOMCNFG from the Windows\\System32 directory.

Open the console root and switch to the Component services - Computer - Workspace.

Select the Properties in the context menu of the workspace.

Usually you do not have to make changes in the property pages “General”, “Options”, “Standard
protocols” and “MSDTC”.

Open the property page “Standard settings”. Here you have to make sure, that DCOM is activated for
this computer. Do not care about the other settings.

The following settings have been tested:

 Activate COM internet service - not active

 Standard authentication level - connect

 Standard identity change level - identify

18
SICAM 230 REMOTE access with DCOM

 Additional security for allocation logging - not active

On the property page “COM standard security” you will find the settings for the access authorization.

Attention

The limit settings for the access authorizations and the start and activation
authorizations must be set, otherwise remote access is prevented by the operating
system!

19
SICAM 230 REMOTE access with DCOM

The limits to access authorizations and the start and activation authorizations must be edited.

Setting the access authorization

Click on “Edit limits…”. In the dialog you can define the access authorizations. First add the needed users
(in our example the Praktikant) and allow the remote access! You also have to allow the remote access
for the user “ANONYMOUS-ANMELDUNG” necessarily.

Attention
Never remove the user “ANONYMOUS-ANMELDUNG” or prohibit the local access.
With this you would prevent any COM data traffic on your PC!

Information
Never remove the user “ANONYMOUS-ANMELDUNG” or prohibit the local access.
With this you would prevent any COM data traffic on your PC! You now have to configure
the user “ANONYMOUS-ANMELDUNG” correctly. For all other settings the user with
which the OPC Client logs in is sufficient.

20
SICAM 230 REMOTE access with DCOM

Setting the start authorization

Similar to the access authorization you have to add the OPC Client user/s and allow all authorizations.

13.3.2 Application specific settings


The security specific settings should be configured directly in the application and not in the standard
settings of the workstation.

Start the program DCOMCNFG from the Windows\\System32 directory.

Open the console root and switch to the Component services – Computer – Workspace – DCOM –
Configuration. It may occur, that not correctly registered programs are listed. Confirm the message
boxes with “Yes”. So the programs are added to the registry.

Search the OPC Server from the list and click on the OPC Server with the right mouse button. Select the
properties in the context menu.

Information
The OPC Server is independent of the SICAM 230 version. So the name of the OPC Server
can differ from the version number of your control system installation. Usually you will
see the name OPC Server for Version 5.21. Don’t get confused, it has no influence on the
functionality. Important is the unique application ID (AppID). It has to be correct. The
AppID of the OPC server is: {CA2AF1F9-C031-42B7-8BF3-6C6041B23EAC}
Check if the path leads to the correct OPC Server. You will find the path of the the
registered OPC Server under Local path.

You have to do the following settings in this dialog:

On the property page General: Authentification level: connect

On the property page Execution place: Execute application on this computer

21
SICAM 230 REMOTE access with DCOM

On the property page Security:

Start and activation Select adjust. With a click on “Edit…” you open the
authorization authorization dialog. Add the necessary users and activate all
authorizations.

Access authorization Select adjust. With a click on “Edit…” you open the
authorization dialog. Add the necessary users and activate all
access authorizations.

Configuration Select adjust. With a click on “Edit…” you open the


authorization authorization dialog. Add the necessary users and activate the
configuration authorizations for full access and reading.

On the property page End points: Click on “Add...” and add connection oriented TCP/IP with the
standard points.

On the property page Identity: Select “Interactive user”

13.4 Remote browsing the OPC Server


As already described in Browsing the OPC Server there are two methods, how an OPC Client can find and
browse an OPC Server. Also for remote browsing the OPC Client can use both methods.

22
SICAM 230 REMOTE access with DCOM

13.4.1 Browsing with Registry entry


The OPC Client has to support browsing per Registry and has to be configured accordingly. Additionally
the access to the Registry of the remote server has to be possible.

13.4.2 Browsing with OPC Enum


The program OPCEnum.exe has to be installed on the OPC Server PC (it is not shipped). The OPC Enum
program has to be correctly configured in the DCOM configuration like the OPC server. Grant access
authorization for the remote OPC client. Configure the settings similar to the settings for the OPC
Server). Otherwise the OPC Client cannot establish a DCOM connection to the OPC Enum program and
thus browsing does not work.

23

You might also like