Sunteți pe pagina 1din 39

OPC-HMI Communication

Version 1.0

Customer :
HH order number :
Machine type :
Machine number :

CoDeSys OPC-Server

CODESYS OPC-SERVER SETUP

Author/document owner: Reinhard Stadel 2007-02-21


Harro Höfliger GmbH Date

Checked: Volker Scheub 2007-02-21


Harro Höfliger GmbH Date

Cleared
Customer

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 1 / 39


OPC-HMI Communication
Version 1.0

Version history
Version Date Description Author

1.0 2007-02-21 First edition Volker Scheub


Change the configuration of the Buffer-
1.1 2009-01-22 Oesterle
size

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 2 / 39


OPC-HMI Communication
Version 1.0

1. Preface

Both, the delivered CoDeSys Gateway (OPC-) Server and the OPC-Client must be installed on
the same PC / Laptop.

2. Setup

After successful installation of the CoDeSys OPC-Server Software Package move to the
OPC-Configurator as shown in Figure 1 and start it.

Figure 1

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 3 / 39


OPC-HMI Communication
Version 1.0

Select File from the taskbar and mark “Single PLC” as your choice as shown in Figure 2

Figure 2

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 4 / 39


OPC-HMI Communication
Version 1.0

Accept the change by clicking “Yes” as shown in Figure 3

Figure 3

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 5 / 39


OPC-HMI Communication
Version 1.0

Create a new config file by clicking on New in the same drop-down menu as shown in Figure 4

Figure 4

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 6 / 39


OPC-HMI Communication
Version 1.0

Click “Yes” in the follwing dialogue-box as shown in Figure 5

Figure 5

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 7 / 39


OPC-HMI Communication
Version 1.0

No need to make any changes on the next screen (Figure 6)

Figure 6

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 8 / 39


OPC-HMI Communication
Version 1.0

By clicking on PLC, the following screen will be presented – please configure your OPC-Server
as shown in Figure 7 :

Figure 7

Please note the checkbox “No Login-Service”

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 9 / 39


OPC-HMI Communication
Version 1.0

Next step : Click on “Connection” and hit the Edit-Button to get to the follwoing screen
(Figure 8) :

Figure 8

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 10 / 39


OPC-HMI Communication
Version 1.0

Set up a New connection, name it and mark the TCP/IP-interface as active –


see Figure 9 below – then hit OK

Figure 9

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 11 / 39


OPC-HMI Communication
Version 1.0

Fill in the correct IP-address of the PLC (overwrite localhost) and hit “Enter” on your key-
board ! (Do NOT just click on OK, otherwise the changes will have no effect !) – see Figure 10 :

Figure 10

No need to make any other changes ! Now – click OK and you´re all done !

Your OPC-Server is now ready for use and you can exit the setup program.
Next step is to set up your own OPC-Client and establish a connection with the OPC-Server !

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 12 / 39


OPC-HMI Communication
Version 1.0

3. OPC-Client Configuration
(We use the ELAU-DiagnosticOPCClient.exe in this example !)
Remember : OPC-Server and OPC-Client are running on the same machine !

Start your OPC-Client and connect it to the running OPC-Server.


Complete the text-fields as shown below : (Fugure 11)
(Please use the appropriate machine name !)

Figure 11

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 13 / 39


OPC-HMI Communication
Version 1.0

The next screen shows an active connection and lets you define some “Private groups”
As illustrated in Figure 12

Figure 12

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 14 / 39


OPC-HMI Communication
Version 1.0

Right-click on “Private Groups” and name your group :

In Figure 13 we used the name “TEST” as the group name. Hit OK

Figure 13

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 15 / 39


OPC-HMI Communication
Version 1.0

The newly created group appears in the “Private Groups”-box a shown in Figure 14

Figure 14

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 16 / 39


OPC-HMI Communication
Version 1.0

Right-Click the “TEST”-Group and select “Add all items” from the pulldown menu.
(Figure 14)

Figure 14

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 17 / 39


OPC-HMI Communication
Version 1.0

All the variables (and therefore values) available on the PLC will be shown underneath the
“TEST”-Group (Figure 15)

Figure 15

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 18 / 39


OPC-HMI Communication
Version 1.0

Select a variable of your choice, right-click and read it´s value as shown below :

Figure 16

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 19 / 39


OPC-HMI Communication
Version 1.0

4. OPC-Server DCOM-Configuration

(OPC-Server and OPC-Client NOT running on the same machine)

Please SHARE the OPC-Server-Installation-Folder on the OPC-Server-PC !

For the complete tutorial use the following link :

http://www.opcactivex.com/Support/DCOM_Config/DCOM_XP/dcom_xp.html

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 20 / 39


OPC-HMI Communication
Version 1.0

DCOM Configuration Tutorial for Windows XP & 2003 Editions


This section is intended to provide general guidance on configuring DCOM settings for Windows XP and
2003 Operating Systems, which do differ slightly from Windows NT and 2000 Operating Systems.

This article will simply outline the steps to configure DCOM. If you would like to know and understand the
reasons WHY some of these settings are so, then please read:

· NT/2000 User Security Permissions/Considerations


· Special considerations in multiple domain settings.

We will configure DCOM in 3 steps:

1. Configuring the general/default settings


2. Configuring the settings for OPCENUM
3. Configuring the settings for your OPC Server

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 21 / 39


OPC-HMI Communication
Version 1.0

Starting DCOM Configuration

The DCOM Configuration utility does not have an associated icon in either the Windows Control Panel,
nor the Windows START button.. so you have to start it manually:

1. Click on the Windows START button


2. Click on the RUN option
3. Type "DCOMCNFG" (without the quotes) and press ENTER. (case does not matter)

This will load the Windows "Component Services", which is shown below:

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 22 / 39


OPC-HMI Communication
Version 1.0

Step 1 - Configuring Default DCOM Security Options for Windows XP &


2003 Operating Systems
The following screen is opened by:

1. Right-clicking on the "My Computer" node in the "Component Services" screen.


2. Choosing "Properties" from the menu.

This particular screen is not 100% identical to that of Windows NT, 2000 as there are more options in
some areas, and fewer options in others...

Once in this Properties screen, do click on the "Default Properties" tab first.

The options available in this screen


should be configured as:

The Enable Distributed COM on


this computer MUST be checked.

The Default Authentication Level


should be set to Connect.

The Default Impersonation Level


should be set to Identity

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 23 / 39


OPC-HMI Communication
Version 1.0

The next step is to click on the "Default COM Security" tab, which is shown below:

There are only 2 buttons in this screen, whereas there are 3 in Windows NT and 2000 Operating Sys-
tems.

Click on the "Edit Default" button within the "Access Permissions" area and make sure that the following
accounts exist with the "Allow Access" permissions:

· Everyone
· Interactive
· System
· Network

Once that is complete, do the same


with the "Edit Default" button in the
"Launch Permissions" section and
give the right "Allow Launch" to the
same accounts as mentioned in the
bullet-points above.

Now click the OK button to save and


close the window.

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 24 / 39


OPC-HMI Communication
Version 1.0

Step 2 - Configuring DCOM Security Options for OPCENUM for Windows


XP & 2003 Operating Systems
The next step is to locate OPCEnum in the list of COM components. Simply click on, or expand the
"DCOM Config" section to show the objects available to configure:

Locate OPCEnum, and then open it's properties by simply right-clicking on it, and choosing "Properties"
from the menu.

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 25 / 39


OPC-HMI Communication
Version 1.0

General Tab

The General Tab has only one


option, and that is the "Authentica-
tion level".

For each of use, you can select


"None" as your option.

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 26 / 39


OPC-HMI Communication
Version 1.0

Location Tab

OPCEnum is a program that


scans your registry for a list of
OPC Servers on your computer.

OPCEnum needs to run on the


computer where it resides..
therefore the option of choice
here is to check "Run applica-
tion on this computer ".

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 27 / 39


OPC-HMI Communication
Version 1.0

Security Tab

There are 3 options in the Security tab that need to be set.

Launch Permissions:
Select the option "Use Default".

Access Permissions:
Select the option "Use Default".

Configuration Permissions:
Select the option "Customize",
and then click the "Edit" button.

A window will open allowing to


specify the accounts that do/don't
have configuration permissions,
simply add the same "Network,
Interactive, System and Everyone"
groups as we have previously, and
make sure that they have "Full
Control" rights.

Identity Tab

Use either the Interactive or System account.

Click OK to save and close the OPCENUM options window.

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 28 / 39


OPC-HMI Communication
Version 1.0

Last Step - Configuring DCOM Security Options for the OPC Server, for
Windows XP & 2003 Operating Systems
This step should only be followed if your computer has an OPC Server on it that you wish to allow OPC
Clients to connect to.

At the "Component Services" window, click on or expand the "DCOM Config" node and locate your OPC
Server from the list.

When you have found your OPC Server in this list, simply right-click on it and open it's properties. Then
follow the same steps as those listed for configuring OPCENUM

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 29 / 39


OPC-HMI Communication
Version 1.0

After completing the above configuration steps you should be able to access all variables on the
Target-PLC with your OPC-Client.

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 30 / 39


OPC-HMI Communication
Version 1.0

4. Example of a working OPC-Server DCOM-Configuration

Start the dcomcnfg-Program and navigate to the following screen :

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 31 / 39


OPC-HMI Communication
Version 1.0

Configured users (COM-Security)

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 32 / 39


OPC-HMI Communication
Version 1.0

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 33 / 39


OPC-HMI Communication
Version 1.0

OPCEnum

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 34 / 39


OPC-HMI Communication
Version 1.0

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 35 / 39


OPC-HMI Communication
Version 1.0

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 36 / 39


OPC-HMI Communication
Version 1.0

OPC-Server CoDeSys v2.0

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 37 / 39


OPC-HMI Communication
Version 1.0

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 38 / 39


OPC-HMI Communication
Version 1.0

OPC_HMI_INTERFACE_Setup_Instructions_V1_0 (4).doc Page 39 / 39

S-ar putea să vă placă și