×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 25677751, Entry date: 07/10/2009
(1)
Rate

Which settings are required in Windows 2000, Windows XP, Windows Vista and WinCC flexible for server-client communication via OPC XML?

  • Entry
  • Associated product(s)
Multi Panels and Mobile Panels as from the 270 series can also act optionally as OPC XML DA servers. Communication via DCOM with the OPC XML DA server of the Multi Panel or Mobile Panel is not possible, because the realtime operating system Windows CE has no DCOM interface. Therefore, an OPC XML gateway is always required for communication between a PC (OPC DA client) and a multi panel or mobile p

Introduction:
Multi Panels and Mobile Panels as from the 270 series can also act optionally as OPC XML DA servers. Communication via DCOM with the OPC XML DA server of the Multi Panel or Mobile Panel is not possible, because the realtime operating system Windows CE has no DCOM interface. Therefore, an OPC XML gateway is always required for communication between a PC (OPC DA client) and a multi panel or mobile panel (OPC XML DA server). The OPC XML gateway implements communication from XML to COM or DCOM.

Contents:

  1. What is OPC?
  2. Function description of the OPC XML gateway
  3. Performance of OPC XML DA
  4. Overview of necessary settings
    4.1 Settings of the OPC DA server and OPC DA client in DCOM
    4.2 Installation and settings on the OPC XML gateway and manager
    4.3 Firewall settings
    4.4 Configuration of the WinCC flexible OPC XML DA server
    4.5 Configuration of the WinCC flexible OPC DA client
  5. Download

1. What is OPC?
OPC (OLE for Process Control) originally designated a standardized and manufacturer-independent software interface. With the further development of the OPC standard, the designation OPC is currently used for an interface family that enables the compatibility of different automation systems. OPC Data Access (OPC DA) is based on the Windows technology COM (Component Object Model) and DCOM (Distributed Component Object Model).

DCOM is COM with the additional capability of accessing objects across computer boundaries. This technology makes it possible to connect various components of different manufacturers with each other via a standardized interface.

Communication via DCOM is usually limited to local networks, because Port 135 is used for this and must not be occupied. Most providers lock this port for security reasons. However, this can be implemented via a VPN tunnel. The data exchange via XML enables the communication with the platform-independent protocol SOAP (Simple Object Access Protocol) via the Internet or the intranet. Communication via XML is done via the standard Port 80 for HTTP.

An OPC XML DA configuration consists of at least one OPC XML DA server and one OPC DA client. The OPC XML DA server is a web service and can forward and receive data to/from an OPC client. The OPC DA client accesses the OPC XML server via the OPC XML gateway that handles the communication between OPC and XML.



Fig. 01

Figure 01 shows the basic configuration of an OPC DA client and an OPC XML DA server.
 

HMI device Data communication Operating system OPC server OPC client
PC, Panel PC DCOM Windows 2000
Windows XP
Windows XP embedded1)
Windows Vista
OPC DA server OPC DA client
MP270B, MP277, MP370, MP377,
Mobile Panel 277
XML Windows CE OPC XML server -
1)

Only on platforms released for it (e.g. Panel PC 477)

Table 01 - OPC configuration

2. Function description of the OPC XML gateway
The OPC XML gateway is required if the application - such as WinCC flexible - has no direct OPC XML DA interface. The OPC XML gateway is not required if you use an OPC XML DA client.

A web service is started on the multi panel or mobile panel when you start up the WinCC flexible Runtime, which is also designated as OPC XML DA server. The communication on XML basis takes place between the OPC XML DA client that is implemented in the OPC XML gateway and the OPC XML DA server - see Fig.02 ( 26 KB ) . The OPC XML DA client is a wrapper that makes the data available to the higher-level OPC DA server. If the OPC DA client is on the same computer (PC 1), then the data communication takes place via the COM interface.



Fig. 02 - OPC-XML-Gateway

If the access on the OPC DA server (OPC.Siemens.XML) takes place from a separate computer (PC 2) then settings must be made in the DCOM interface. You can avoid these DCOM settings if an OPC XML gateway is installed on every computer and appropriately configured - see Fig. 03.



Fig. 03

Remark:
The following example uses an MP 277 as WinCC flexible OPC XML DA server and one WinCC flexible OPC DA client. Since OPC DA and OPC XML are open interfaces, both the WinCC flexible OPC XML DA server and the WinCC flexible OPC DA client can communicate with other components. Requirement for implementing the OPC XML solution is the OPC XML gateway.

3. Performance of OPC XML DA
OPC XML connections are designed for the exchange of small volumes of data. The performance of OPC XML DA is significantly below that of OPC DA and thus only very few tags per picture should be requested. 

  • Configure the cycle time of the tags to be not less than 1 second.
  • Only about 30 tags per picture should be requested.
  • Tags of the "String" type only support valid ASCII values from 20 hex to 7F hex.

4. Overview of necessary settings
The following settings are to be made.

        4.1 Settings of the OPC DA server and OPC DA client in DCOM
        4.2 Installation and settings on the OPC XML gateway and manager
        4.3 Firewall settings
        4.4 Configuration of the WinCC flexible OPC XML DA server
        4.5 Configuration of the WinCC flexible OPC DA client

4.1. Settings of the OPC DA server and the OPC DA client in DCOM
You carry out the settings in DCOM only if the OPC XML gateway is used on another computer - see Fig. 02 ( 26 KB ) .

The "OPC.Siemens.XML" is used as OPC DA server. This OPC DA server must be configured on the PC on which the OPC XML gateway is installed. The start and access releases in DCOM have to be carried out on both PCs. More information on DCOM configuration is available in Entry ID: 31198863.

4.2 Installation and settings on the OPC XML gateway and manager
The OPC XML gateway must only be installed if an OPC DA client and not an OPC XML DA client is used.

Installation notes:
The OPC XML manager is only released for the operating systems that are also valid for the relevant WinCC flexible versions.

More information is available in Entry ID: 64847781.

Use only the version of the OPC XML gateway that is supplied with the relevant WinCC flexible version, with which you have configured the OPC XML server.
 

No. Procedure
1 Install the OPC XML manager

WinCC flexible 2004:

  • Copy the program "OPCXmlManager.exe" from the installation CD from the directory "\Disk2\Support\OPCXML" into a directory of your choice on the relevant PC.

As of WinCC flexible 2005:

  • The setup for installing the "OPC XML gateway" is on the WinCC flexible CD2 under "WinCCflexible\setup\OPCXMLWrapper\Disk1". Double-click on the "Setup.exe" file.
  • Under "Language", select the interface language of the Setup program.
  • Select "Installation" to start the installation.
  • Run the installation following the instructions on the monitor.
2 Opening the OPC XML manager

WinCC flexible 2004:

  • Open the "OPC XML Manager" in your chosen directory by double-clicking on "OPCXmlManager.exe".
  • In the OPC XML Manager click on the "Add..." button.

WinCC flexible 2005:

  • In the "Start" menu, select the program "SIMATIC > WinCC flexible > WinCC flexible Runtime > XmlMuxConfig".
  • In the OPC XML Manager click on the "Add..." button.

As of WinCC flexible 2007:

  • In the "Start" menu, select the program "SIMATIC > OPC-XML Gateway > OPC XML Manager".
  • In the OPC XML Manager click on the "Add..." button.



Fig. 04
3 Add the prefix and host name

WinCC flexible 2004:

  • Enter the host name or the IP address (such as 150.150.150.20).
  • Confirm the input with the "OK" button.
  • Close the OPC XML manager.
  • Open "OpcXml Settings" in the "Control Panel".
  • Enter the computer name or the IP address of the operator panel.
  • Close "OpcXml-Settings" with "OK".

As of WinCC flexible 2005:

  • Enter the prefix (for example, "Prefix") and host name or IP address (for example, 150.150.150.20).

    Explanation Parameters:

    [Prefix]
    The prefix specifies the OPC XML DA server where the tag is assigned.

    [Host Name]
    Device name or IP address of the OPC XML DA server.
     
  • Confirm the input with the "OK" button.
  • Close the OPC XML manager.



Fig. 05

4.3 Firewall settings
The ports given in Entry ID 24534065 must be enabled for OPC XML communication.

4.4 Configuration of the OPC XML DA server
In this example we explain how to configure a WinCC flexible project as OPC XML DA server.

Note:
Only operator panels listed in Table 01 can be used as OPC XML DA servers.
 

No. Procedure
1 Create a new project
  • Start WinCC flexible and then click on "Project > New" in the program menu.
  • Select, for example, "Multi Panels > 270 > MP 277 10" Touch".

    Note:
    Only Multi Panels can be used as OPC XML DA servers.

Fig. 06
2 Configure a connection
  • Click on "Project > Device_1... > Communication > Connections".
  • Insert a new connection via the program menu "Insert > New object - Connections".

    Note:
    In this example you use the communication driver "SIMATIC S7 300/400". You can configure any other connection that is available in WinCC flexible.

    Remark:
    If WinCC flexible is working as the OPC server, this connection is not configured explicitly in the "Connections" tab. The configuration takes place in the "Device settings" - see Point 4.
     
  • If necessary, change the slot of the SIMATIC S7 controller to "2" when using the communication driver "SIMATIC S7 300/400".



Fig. 07
3 Create tags
  • Create three "Variable_x" tags of the "Int" type and connect them with the connection "Connection_1".
  • Use the memory areas "MW 10", "MW 12", and "MW 14" for the three external tags.
  • Create an additional internal tag of the "Int" type called "Variable_4".



Fig. 08
4 Configure WinCC flexible as the OPC server
  • Switch to the "Device Settings" tab.
  • Enable the option "Act as OPC server".

    Note:
    If WinCC flexible acts as OPC server, all the internal and external tags that have been created in WinCC flexible are available to the OPC server.



Fig. 09
5 Creating I/O and text fields
  • Add six text fields with the following designations:
    - "OPC XML Server"
    - "Variable_1"
    - "Variable_2"
    - "Variable_3"
    - "Variable_4"
    - "internal tag"
  • Add another four I/O fields and arrange all the text and I/O fields as shown in Fig.10.



Fig. 10
6 Start WinCC flexible RT
  • Transfer the hardware configuration and at least OB1 to the controller. Then switch the S7 controller to RUN mode.
  • Make sure that the PG/PC interface is set to "MPI" if it has been configured.
  • Transfer the WinCC flexible project to the Multi Panel and start Runtime.



Fig. 11

4.5 Configuration of the WinCC flexible OPC DA client
Runtime of the WinCC flexible OPC server must be started in order to configure connection of the OPC DA client tags to the WinCC flexible OPC server.
 

No. Procedure
1 Create a new project
  • Start WinCC flexible and then click on "Project > New" in the program menu (see Fig. 06 ( 8 KB ) ).
  • Select "PC > WinCC flexible Runtime".
2 Create a connection

WinCC flexible 2004:

  • Add a new connection in the same way as for the WinCC flexible OPC server project.
  • Select "OPC" as communication driver and then the OPC server that is specified in the "OPCxml - Manager" under the category "ProgID" (such as "1_OPC.Siemens.XML").

As of WinCC flexible 2005:

  • Add a new connection in the same way as for the WinCC flexible OPC server project.
  • Select "OPC" as a communication driver and then the WinCC flexible OPC server "OPC.Siemens.XML".
  • Specify the name of the computer on which the WinCC flexible OPC server or the OPC XML gateway is available.



Fig. 12
3 Define tags
  • Create four tags of the "Short" type with the connection "Connection_1".

    Note:
    The data type set for the OPC XML DA server must be identical to that of the OPC DA client. When you browse - see Fig.013 - the data type of the OPC server is automatically transferred.
     
  • Open the OPC browser by clicking on the corresponding "Symbol" field for each tag.
  • Connect each tag to the relevant item.

    Note (as of WinCC flexible 2005):
    You do not need the symbolic connection if you enter the following syntax as address:

    Example:
    [Prefix]
    :Win CC Flexible RT <@>[tag name] 

    Explanation Parameter:

    [Prefix]
    The prefix specifies the OPC XML DA server where the tag is assigned.

    [Tag name]
    Device name or IP address of the OPC XML DA server



Fig. 13

Note:
Note the following for OPC XML DA connections:

  • Configure the cycle time of the tags to be not less than 1 second. OPC XML connections are designed for the exchange of small volumes of data and thus only a few tags should be requested - approx. 30 per picture.
  • With the tag name and with tags of the "String" type, only valid ASCII values from 0x20(hex) to 0x7F(hex) are supported.
4 Create I/O and text fields
  • Add five text fields with the following designations:
    - "OPC DA Client"
    - "Variable_1"
    - "Variable_2"
    - "Variable_3"
    - "Variable_4"
  • Add another four I/O fields and arrange all the text and I/O fields as shown in Fig.14.
  • Link all the relevant tags to the I/O fields.



Fig. 14
5 WinCC flexible Runtime
  • Start WinCC flexible Runtime.



Fig. 15

5. Download the WinCC flexible sample projects:
The download in Attachment 1 contains the project described above in which WinCC flexible acts as OPC server.

Attachment 1: WinCC_flexible_OPC_XML_Server.zip ( 1664 KB )

Attachment 2 contains the WinCC flexible project that has been configured as OPC client.

Attachment 2: WinCC_flexible_OPC_XML_Client.zip ( 1659 KB )

Runnability and test environment:
The following table lists the components that have been used to create this entry and verify the functions described.
 

Components Product and version designation
PC operating system Microsoft Windows XP SP2
Standard tools OPC XML Manager V1.0
Engineering tool STEP 7 V5.4 SP1
HMI software WinCC flexible 2005 SP1 HF7
HMI system MP 277 10"

Keywords:
OPC Foundation, Object Linking and Embedding for Process Control


Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit