Configuración OPC WinCC
Configuración OPC WinCC
OPC (OLE for Process Control) is an original standardized and manufacturer-independent software interface.
Because of the further development of the OPC standard, the designation OPC is now used for an interface family.
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 manufactures with each other via a standardized
interface.
An OPC configuration consists of at least one OPC server and one OPC client. The OPC server can forward data at
an OPC client and vice versa. Although OPC is not tied to a standard protocol, the TCP/IC protocol is preferred.
Fig. 01
Fig. 01 shows the basic configuration of an OPC client and an OPC server.
Note
In WinCC flexible, only PCs and Panel PCs can exchange data via DCOM. Communication between a Multi Panel
and one or several PCs is possible with OPC XML DA.
Link
Configuring an OPC XML DA connection
Entry ID: 25677751
Remark
The following example uses a WinCC flexible OPC server and a WinCC flexible OPC client. Since OPC via DCOM is
an open interface, both the WinCC flexible OPC server and the WinCC flexible OPC client can communicate with
other OPC components.
Contents
1.
Configuring the DCOM interface in Windows XP, settings of the OPC server in DCOM and
firewall settings
2.
Configuring the WinCC flexible OPC server
3.
Configuring the WinCC flexible OPC client
4.
Downloading the WinCC flexible sample projects
1. Configuring the DCOM interface in Windows XP, settings of the OPC server in DCOM and
firewall settings
Take the settings required from the PDF document below. This document is also available as a readme on the WinCC
flexible DVD. It is located in the folder entitled "<DVD drive>:\CD3\Support\OPC\".
Attachment 1: OPC_via_DCOM_e.pdf ( 908 KB )
Note:
You can also use the DCOM interface settings in Windows Vista and Windows 7.
2. Configuring the WinCC flexible OPC server
This example explains the configuration of a WinCC flexible project as OPC server.
N Procedure
o.
1
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 we use the communication driver "SIMATIC S7 300/400". You can configure any
other connection that is available in WinCC flexible.
Note
If WinCC flexible is working as the OPC server, this OPC 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".
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. 02
6
Connect tags
Link all four tags to the I/O fields.
Create a connection
Add a new connection in the same way as for the WinCC flexible OPC server project.
Choose "OPC" as communication driver.
Select the OPC server "OPC.SimaticHMI.HmiRTm" from WinCC flexible on the computer
where the OPC server is available.
Note
If no OPC server is displayed on the relevant computer, then the network communication is
disrupted and the access is denied in Windows.
Remedy
Network communication:
Verify all Ethernet components (hub, switch, router, patch cable etc.).
Check all network settings (IP addresses, subnet mask, ping etc.).
Checking access:
Open the Windows Explorer and click on "Network environment".
Then click on "Entire Network > Microsoft Windows Network".
Double-click on the computer where the OPC server or client is available.
Fig. 03
3
Define tags
Create four tags of the "Short" type with the connection "Connection_1".
Open the OPC browser by clicking on the corresponding "Symbol" field for each tag.
Connect each tag to the relevant item.
Note
If you can access the computer where the OPC server is available via Windows Explorer, then
check the DCOM settings.
Fig. 04
4