Introduction 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.
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\".
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.
No.
Procedure
1
Create a new project
Start WinCC flexible and then click on "Project > New" in the program menu.
Select "PC > WinCC flexible Runtime".
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 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".
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".
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.
5
Creating I/O and text fields
Add six text fields with the following designations:
- OPC DA 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 the figure.
Fig. 02
6
Connect tags
Link all four tags to the I/O fields.
7
Start WinCC flexible RT
Transfer at least the OB1 to the controller and set the controller in the "Run" mode.
Note You can also use PLCSIM to test it as an alternative to the S7 controller.
Make sure that the PG/PC interface is set to "MPI" if it has been configured.
Start the WinCC flexible Runtime.
3. Configuring WinCC flexible OPC clients The Runtime of the WinCC flexible OPC server must be started in order to configure the connection of the OPC 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.
Select "PC > WinCC flexible Runtime".
2
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.
Log on with the relevant user name and password.
Note
If no logon dialog appears, deactivate the guest account in the user Windows user administration.
Do the same on all the relevant computers.
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
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. 25.
Link all the relevant tags to the I/O fields.
5
WinCC flexible Runtime
Start the WinCC flexible Runtime.
4. Download the WinCC flexible sample projects The download in Attachment 2 contains the project described above in which WinCC flexible acts as OPC server.
Instructions: With WinCC flexible, the triggering of bit or analog messages can cause e-mails to be sent to the operators. You can use any SMTP server (e-mail output server) for sending e-mails, which doesn't need any authentication. As from WinCC flexible 2005, also SMTP servers that require authentication via a valid e-mail address are supported. SMTP servers that require authentication with user name and password can be used as from WinCC flexible 2008 SP1.
1. Information on SMTP servers
In addition to the many SMTP servers in the Internet, you can also integrate your own SMTP server in the local network. In this example we use the "PostCast Server" that is available for downloading at the Internet address http://www.postcastserver.com/download/.
Fig. 01
Alternatively you can also install the SMTP server on a separate computer and use it with a Multi Panel via Ethernet, for example. Communication between the panel or a second PC and the SMTP server is exclusively via Ethernet.
Fig. 02
Note:
Communication between S7 controller and panel must not necessarily be via Ethernet as shown in Fig. 02.
There must be a connection to the SMTP server before you can send e-mails.
Designation
Protocol
Server
SMTP
Simple Mail Transfer Protocol
E-mail output server
IMAP
Internet Mail Access Protocol
E-mail input server
POP3
Post Office Protocol Version 3
Table 01
2. Requirements
From STEP 7 V5.3 onwards
As from WinCC flexible 2005 SP1 (Advanced Edition for PC Runtime)
SMTP server
3. Configuration
How to send e-mails via a local SMTP server is demonstrated in a STEP 7 project available for downloading.
3.1 Configuration of the SMTP server
In the following we will primarily explain the combined version (Fig. 01). There are however also notes on the separated version (Fig. 02) between SMTP server and the WinCC flexible Runtime via Ethernet.
The table below shows the settings for the SMTP server "PostCast Server".
Note:
You can also use any other SMTP server that doesn't need any authentication. SMTP servers with authentication depend on the version of WinCC flexible used.
2
Unpack and install software
Unpack the downloaded file "postcastserver.zip" on the computer on which the SMTP server is to be installed.
Then install the SMTP server (PostCast server) by double-clicking on "Setup.exe".
3
Set up the SMTP server
Click on "Settings" in the toolbar to open the SMTP settings.
As host name you enter the IP address 127.0.0.1 (local host) and the server port 25 (SMTP).
Note:
In the case of separated systems you must specify the name or IP address of the computer on which the SMTP server is installed.
If you are using a DNS server, you must also specify the relevant IP address and port 53.
Fig. 03
Note:
Make sure that the port is not already assigned or blocked by a firewall.
Since the port numbers are defined by the IANA (Internet Assigned Numbers Authority), you should use only the two ports for the two services.
Port
Service
Description
25
SMTP
Sending of e-mails
53
DNS
Resolving of domain names in IP addresses
Table 02
4
Define conditions for sending e-mails Under "Mail sending frequency" you can define when e-mails are to be sent. If you select the "Manually" option, all e-mails are sent only when you press the "Start" button. If you select "Immediately", the e-mails are sent at once after a pause after each process, which you can specify.
Fig. 04
Note: For simulation you should always select "Manually", because e-mails are not sent automatically and you can do without connection to an e-mail input server.
5
Define connections Limit the number of outgoing connections to a maximum of 20.
Fig. 05
6
Define other settings The following settings in the "Administration" tab should be set by default. But you should nevertheless check the following points and act where applicable:
Under "E-mail message is undeliverable after:" you specify the days, hours or attempts to be made before an e-mail is declared as undeliverable and deleted.
Check "Force message delivery..." to permit message delivery to multiple hosts.
Optionally you can create another log file and define the maximum size of that file after which a new log file is to be created.
Fig. 06
7
Advanced settings The settings in the "Advanced" should also be set by default. In any case you should always verify and if necessary, make the following settings:
Check the "Show system tray icon" option to have the icon of the PostCast server displayed in the taskbar.
Check "Detect changed IP addresses and configure the program" so that any changes to IP addresses are recognized automatically and the SMTP server configured accordingly.
As an option you can also check "Automatically check for updates".
Fig. 07
3.2 Configuration of WinCC flexible
The following table explains the major settings in WinCC flexible for sending e-mails.
The sending of e-mails is demonstrated taking the example of a fan, which is available for downloading at the end of this entry. The fan is simulated by the STEP 7 program and must be transferred to an S7 controller or S7-PLCSIM for the simulation.
If you use the sample project and you know the configuration for sending e-mails in WinCC flexible, then you can go directly to the next table.
No.
Procedure
1
Create a WinCC flexible project Create a new WinCC flexible project and select the PC Runtime.
Note:
For the separated version you can also select an operator panel - except Basic Panels - that has an Ethernet interface.
2
Configure the connection It is of no importance whatsoever which connection you choose for sending e-mails. You must simply ensure that there is a physical connection between the SMTP server and the operator panel.
Remark:
For the separated version you only have to set up a physical connection with a patch cable - you don't have to configure this connection. Communication between operator panel and SMTP server is performed exclusively via Ethernet.
Fig. 08
Open the "Connections" tab by double-clicking on "Connections" in the project tree under "Project > Communication".
Create the connection(s) you need for communication to the PLC. The PROFIBUS connection is used in this example.
Note:
You do not need to create a connection for communication between WinCC flexible Runtime and SMTP server.
3
Configure the SMTP server The name of the SMTP server must be made known for WinCC flexible Runtime to be able to communicate with an SMTP server.
For this you open the "Device Settings" tab.
Here you enter "localhost" for "Name SMTP server".
Note:
If the SMTP server is running on a different computer, then you specify the computer name or the IP address of the SMTP server. For panels with Windows CE, only the computer name or the FQDN (Fully Qualified Domain Name) is permissible.
The "Name of SMTP sender" input field serves as an answer e-mail address. Here you can enter the designation of the HMI operator panel or plant designation or its location.
Fig. 09
No SMTP authentication is needed for the "PostCast server". If you are using a different SMTP server that requires authentication via a valid e-mail address (as from WinCC flexible 2005), then you must enter this in the "SMTP Authentication" input field.
Note:
SMTP authentication with user name and password is supported only as from WinCC flexible 2008 SP1.
4
Create analog and bit alarms In order to have e-mails sent when an alarm is triggered, you must create analog and/or bit alarms.
Open the "Analog Alarms" tab by double-clicking on "Analog Alarms" under "Alarm Management" in the project tree.
For example, add the analog alarms "rotation high" and "maximum speed of <tag User.SRPM_0> achieved".
Select "Warning" as the alarm class and "User.S_RPM_0" as trigger tag and "On rising edge" as trigger mode.
As limit value for the "rotation high" analog alarm you select the value "1199", for example, and the limit "1349" for the second analog alarm.
Fig. 10
Optionally you can also create bit alarms in addition. For this you proceed as follows.
Open the "Discrete Alarms" tab.
For demonstration purposes you can create the bit alarm "overspeed trip unit at <tag DB User.M_RPM>".
Also select "Warning" as the alarm class. In the sample project we use the trigger tag "SOLL_IST" (setpoint_actual) with trigger bit number "10".
Fig. 11
5
Specify the e-mail address in the alarm class Open the "Alarm Classes" tab and enter the relevant e-mail address. In this example we use the fictitious e-mail address "admin@firma.de".
Fig. 12
Note:
With this configuration, an e-mail is sent for every incoming alarm of the alarm class. If you want to have an e-mail sent only for specific alarms, then you have two options:
Create a new alarm class and assign the relevant alarms to that alarm class (see Figs. 10 to 12).
Add the "SendEMail" system function in the Properties dialog under the "Activate" event of the alarm concerned in each case.
Remark: You can specify any valid e-mail address as recipient e-mail address (see Fig. 12) and it doesn't necessarily have to be an e-mail address of the same provider as the SMTP server.
3.3 Verification of the configuration
The S7 program that includes a simulation of a fan for WinCC flexible helps to illustrate the sending of e-mails to the SMTP server.
No.
Procedure
1
Transfer the STEP 7 project
If you using the sample project, transfer the configuration and the STEP 7 project into the controller or into the S7-PLCSIM simulation program.
Switch the S7 controller to RUN mode.
Fig. 13
2
Start PostCast Server You must first start "PostCast Server" for it to be able to receive e-mails from WinCC flexible.
Start the PostCast Server in Windows via "Start > Programs > PostCast Server" and clicking on "PostCast Server", or by clicking on the desktop icon.
Fig. 14
3
Start WinCC flexible Runtime
Start the WinCC flexible Runtime via the menu entry "Project > Generator > Start Runtime".
Note:
When using the second version, you transfer your configuration to the operator panel concerned. For the first transfer you should also transfer the password list as well.
Enter a Set rotation speed of at least 1350 rpm-1.
Enter at least 5 seconds for Run-up/-down time.
Click the "Start" button.
Wait until the set rotation speed is reached.
Fig. 15
4
E-mails in the SMTP server Once the motor has been started and the maximum speed reached, e-mails are sent to the SMTP server according to the alarms configured.
Fig. 16
If the SMTP server has a connection to the Internet or to the relevant e-mail input servers (POP3 or IMAP), you can send e-mails via the "Start" button. The requirement for this is that you use a real recipient e-mail address.
More information is available in the following entries.
4. Download Attachment 1 contains the sample project described including the STEP 7 program with the motor simulation for WinCC flexible. The SMTP server is not include and cannot be procured from SIEMENS AG.
Runnability and test environment: The following table lists the components that have been used to create this entry and verify the functions described.
A further requirement is that a properly functioning STEP 7 Micro/WIN project is available and loaded into S7-200 CPU.
Configuring the OPC server with S7-200 PC Access
Start S7-200 PC Access via Start > SIMATIC > S7-200 PC Access V1.0.0.56 > S7-200 PC Access.
Create a new project.
Fig. 01
Mark controller, e.g. "MicroWIN (CP5611(PPI))", and open the dialog Status > PG/PC Interface....
As access point of the application you must set "Micro/WIN" with the existing communications connection to the S7-200, e.g. "-->CP5611(PPI)".
Note: If the access point is not "Micro/WIN", first close the dialog and set the access point via Control Panel > Set PG/PC Interface.
Close the dialog via OK.
Fig. 02
Via File > Import Symbols you import the symbol of the selected STEP 7 Micro/WIN project.
Then save the configuration you have created.
In S7-200 PC Access you can now access the symbol of the STEP 7 Micro/WIN project.
Fig. 03
If you mark the project folder "Project1", for example, you can check the address of the PLC via Edit > Properties.
Fig. 04
Checking the connection with Test OPC Client of S7-200 PC Access
Mark the symbols in the right-hand project pane of S7-200 PC Access.
Using drag and drop add the marked variables as items to Test Client (bottom project pane).
Fig. 05
Enable Test Client via Status > Start Test Client.
If "Good" is displayed for Quality, the variable has been read successfully out of the S7-200 controller.
Fig. 06
WinCC flexible Runtime as OPC client
Start WinCC flexible 2004 Advanced.
Create a WinCC flexible project for a PC via PC > WinCC flexible RT.
In the project tree double-click on Communication > Connections to create a new connection.
As communications driver for the connection select OPC.
Select "S7200.OPCServer" for OPC server.
Note:
If the S7-200 OPC server has not been started on the local PC, you must specify the computer name or the IP address of the remote PC on which the S7-200 OPC server is located. When accessing the OPC server via network, please refer to the DCOM settings in the WinCC flexible Online Help under "Communication > OPC > Commissioning the OPC > DCOM".
Fig. 07
Add a variable under Communication > Variables.
Via Symbol you select the relevant item of the S7-200 OPC server.
Fig. 08
You can display this variable via an input/output field in the Start picture.
Save the configuration.
Start WinCC flexible Runtime via the icon in the toolbar.
Fig. 09
Fig. 10
How do you transfer data from a server to a Windows-based panel via the FTP protocol?
Instructions:
Using the "File Transfer Protocol" you can move files between a WinCE panel (e.g. MP370) used as an FTP client and a PC used as an FTP server. This entry explains how to configure the FTP server on the PC and how to connect the WinCE panel to this server using the Pocket Internet Explorer. A requirement for this is that you have a correctly functioning Ethernet connection between the two devices created using a cross-over cable or a hub.
The Microsoft Pocket Internet Explorer, which can be optionally transferred to a Windows CE panel using ProSave, only supports downloads from the server. Uploads are not supported.
Installation and configuration of the FTP server in Win2000 Server The table below describes all the steps that are required in order to set up an FTP server in "Microsoft Windows 2000 Server".
No.
Procedure
1
Adding Windows components
Go to the "Control Panel" and open the "Add or Remove Programs" menu.
Select "Add/Remove Windows Components".
Enable "Internet Information Services" and click "Details".
Fig. 01
2
Installing an FTP server
Select "FTP Server (File Transfer Protocol)", "Internet Services Manager" and click "OK". Click "Next" to start the installation of the selected components.
Fig. 02
3
Starting the Internet Services Manager
Place your "Windows 2000" CD in the CD drive because it is required for installation.
Click "Finish" to close the installation wizard.
Start the Internet Services Manager via "Control Panel > Administrative Tools > Internet Services Manager".
Fig. 03
4
Inserting a new FTP site
Insert a new FTP site.
Fig. 04
5
Creating an FTP site
The installation wizard for the new FTP site is started.
Click "Next".
Enter a description for your site and click "Next".
Fig. 05
6
Specifying the connection settings
Select your computer's IP address, e.g. (192.168.0.1). Enter 21 under TCP port.
Fig. 06
7
Specifying the home directory for the FTP site
Enter a home directory for the FTP data.
Fig. 07
8
Access permission to the FTP site
Specify the access authorizations for the FTP data.
Fig. 08
9
Opening the properties for the "PanelSite"
Click "Finish" to close the installation wizard. A new FTP site is created with the specified settings.
Open the properties for the FTP site which you have created.
Fig. 09
10
Granting access Go to the "Directory Security" tab and enter the panel's IP address (e.g. 192.168.0.10) under "Grant access".
Fig. 10
11
Starting an FTP site
Close the "Standard FTP site" by right-clicking and "Close".
Start the FTP site which you created by right-clicking and "Start".
Fig. 11
Configuring an Ethernet connection between the PC and the MP370 operator panel
Entry ID 13336639 contains instructions on how to establish a network connection between a PC and a WinCE panel.
The configuration described here involved using the IP address 192.168.0.1 for the PC and the IP address 192.168.0.10 for the panel with the subnet mask 255.255.255.0.
Transferring the Pocket Internet Explorer to the MP370 with ProSave (from V6.0) So that the Pocket Internet Explorer is available on the operator panel, this option must be transferred to the operator panel with ProSave.
No.
Procedure
1
Transferring the Pocket Internet Explorer
Start ProSave via "Start > Simatic > ProSave > ProSave".
Open the "General" tab and select the device type (e.g. "MP370 Touch") and the connection type "Ethernet"; then enter the panel's IP address.
Change over to the "Options" tab and check the connection by clicking the "Device status" button.
Transfer the Pocket Internet Explorer onto the device by moving the Pocket Internet Explorer option to the pane on the right using the arrow buttons.
Fig. 12
Connecting the panel to the FTP server In order to establish the connection to the FTP server, you require a folder or file in the FTP directory which is created in the FTP server - see Fig. 07.
No.
Procedure
1
Starting the Pocket Internet Explorer
Start the Pocket Internet Explorer on the operator panel.
Enter the following syntax in the address line and click "ENTER" to confirm: ftp://192.168.0.1/ (ftp:// "IP address of the FTP server"/)
The Pocket Internet Explorer connects to the FTP server.
Note:
In order to connect to the FTP server, a folder or file must be created in the home directory for the FTP server.
Open any file ("Test.txt" in the example) by clicking the link in the Pocket Internet Explorer.
Note:
The content of the text file, see Fig. 14, is shown in the Pocket Internet Explorer. Files which cannot be shown in the Pocket Internet Explorer are downloaded directly from the FTP server.
Fig. 13
2
"Opening the Save Asdialog window
Click the "File" menu and select "Save As...".
Fig. 14
3
Saving a file
Select the relevant directory (e.g. "Storage Card2") and assign the file, which is being saved, a file name and extension (e.g. "Test.txt").
Click "OK" to save the file.
Fig. 15
Keywords: Data transmission, Network connection
Which settings are required in Windows 2000, Windows XP, Windows Vista and WinCC flexible for server-client communication via OPC XML?
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.
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 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: 22055368.
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.
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
Configuration Notes: The Ethernet ports are assigned by the IANA (Internet Assigned Numbers Authority). When using a firewall you must enable all the ports specified in the table. All the services listed are handled via the TCP/IP protocol, except archiving via UDP.
The following ports are used in WinCC flexible Runtime:
Service
Port
Web server
Access to internal HTML pages (HTTP)
80
Access to internal HTML pages (HTTPS)
443 (SSL)
Sm@rtServer
Connection with the Sm@rtServer
(access to the Sm@rtServer for downloading the Java applets with the Internet Explorer)
5800
Connection with the Sm@rtServer (access to the Sm@rtServer with Internet Explorer for remote monitoring and operation)
1) Dynamic port:
The Microsoft Windows operating system automatically assigns the relevant service a free port that can be between Port 1024 and 65534. You must enable this area when using a firewall.
2) Archiving:
Requirement for archiving via an Ethernet network is that the server is enabled.
3) PROFINET
Communication via PROFINET must be activated in the "Control Panel", in the "PROFINET" Settings dialog.
Note: If you change the ports of the Sm@rtServer, you must change the links accordingly in the HTML pages used. More information on changing HTML pages is available in the Help system of WinCC flexible under "Example: Configuring an integrated web server".
How can you access a Microsoft Windows 2003 server with a panel / PC?
Security settings In order to be able to access a Microsoft Windows 2003 server with a panel or PC you must disable the following security settings on the Microsoft Windows 2003 server.
Under "Start > Programs > Administrative Tools > Security Policy for Domain Controller > Security Settings > Local Policies > Security Options" you locate the security settings.
Applicability The settings described are to be made only
If you are using a Microsoft Windows 2003 server with Active Directory.
If the Windows CE 3.0 operating system is installed on the operator panel.
Operator panels with the Windows CE 5.0 operating system are not affected
(e.g. operator panels MP 277 / Mobile Panel 277 and higher). You can check which operating system is being used on the operator panel in the Control Panel under "System > General".
Disabling security settings:
Microsoft network (server): Digitally sign communications (always).
Microsoft network (server): Digitally sign communications (if client agrees).
After you have made the settings you must reboot the computer. This makes the changes made effective.
Note: The changes made lower the security level of the network communications. Please check beforehand with your network administrator whether you are permitted to make these changes.
How to incorporate a panel in a local network is described in Entry ID: 13336639 .
Keywords:
Panel, Network, Server settings
How do you integrate an HMI operator panel into a local network?
Incorporate an operator panel into a local network in order to back up a tag archive to a PC via the local network.
Share a folder or a drive on a PC.
Save a tag archive to a PC via a local network.
Note
This entry uses a simple example to explain how to integrate an operator panel into a network. Other network constellations are also possible, but these generally require further knowledge of networks.
Contents
1 Setting Up a Network Connection
1.1 Assigning a Fixed IP Address in Microsoft Windows XP
1.2 Network Configuration on the Operator Panel
1.3 Additional Settings on the PC
1.4 Testing the Network Connections
2 Enabling Sharing
3 Saving the Tag Archive
Contents The following points are covered in the document.
1 Introduction
2 What are OPC and OPC XML?
3 OPC XML versions with a Multi Panel or Mobile Panel
3.1 Version A - OPC DA client with OPC XML gateway via COM
3.2 Version B - OPC DA client with OPC XML gateway via DCOM
3.3 Version C - OPC XML DA client without OPC XML gateway
4 Requirements
4.1 Hardware and software requirements
4.2 OPC XML-compatible panels
5 Configuration of the different versions
5.1 Configuration of the OPC XML DA server (Multi Panel / Mobile Panel)
5.2 Configuration of the OPC XML gateway
5.3 Configuration of an OPC DA client with ProTool/Pro
5.4 Configuration of an OPC DA client with WinCC flexible
5.5 Configuration of an OPC DA client with the Microsoft Excel macro
5.6 Configuration of an OPC DA client with WinCC
5.7 Configuration of an OPC XML DA client with WinCC
5.8 Download
Configuration Notes: The OPC server on the multipanel is an OPC XML server.
You cannot communicate directly with the OPC XML server on the multipanel via DCOM .
Therefore, an OPC gateway (OPC XML wrapper) is always required for communication between a PC (OPC client) and a multipanel (OPC XML server). The OPC gateway facilitates the implementation of XML to DCOM.
The OPC XML wrapper has to be installed on the PC which serves as an "OPC client" later on.
This results in two ways of using the multipanel as an "OPC XML server".
Version A:
Communication between a multipanel (OPC XML server) and a PC (OPC client PC and its DCOM interface) via the OPC XML wrapper.
Fig. 01
Version B:
Communication between a multipanel (OPC XML server) and another PC via a gateway PC.
A connection is parameterized internally between the "OPC XML wrapper" and the DCOM interface via the "gateway PC". A further connection is then established between this DCOM interface and the next PC's DCOM interface. This PC acts as an "OPC client PC".
Fig. 02
Note:
OPC XML has been newly defined in the OPC standard. Benefit: You can also transmit data over the Internet via OPC XML. The restriction is that it only supports a maximum of 8 connections. You can get around this restriction by using the gateway.
This entry describes how to configure a PC (OPC client) with WinCC, ProTool/Pro and WinCC flexible in conjunction with a multipanel (OPC server) in the versions shown above.
Requirements:
WinCC flexible 2004
WinCC flexible option /OPC server for multipanels
MP270B or MP370
Ethernet connection between multipanel and PC (see Entry ID 13336639)
OPC XML wrapper for installing the gateways
(The OPC XML wrapper is located on WinCC flexible installation CD 2)
The following table provides an overview of the paragraphs of this document in which each configuration is described.
Table 1: Configuration variants with the multipanel as an OPC XML server and a PC as an OPC client.
Para. 1) Configuration of a multipanel as an OPC XML server
No.
Procedure
1
The configuration of the multipanel as an "OPC XML server" is identical for both configuration versions A) and B).
Note
The OPC server for the multipanel is an OPC XML server.
The OPC communication with a multipanel as an OPC server can only be implemented via Industrial Ethernet.
Multipanels can only be used as OPC XML servers, not as an OPC client.
WinCC flexible Runtime must be started on the multipanel with the OPC XML server so that the OPC server is activated.
2
Procedure for configuring the OPC XML server
Open the WinCC flexible project in which the multipanel is configured.
Configure the interface to the controller in "Communication > Connections".
Create an "INT" data type tag ("Tag_1"), for example, in "Communication > Tag".
Double-click "Device settings" in the project window.
Activate the "Act as OPC server" option in the working area.
Fig. 03
Para. 2) Settings in the PC's Control Panel (OPC client PC)
No.
Procedure
1
The gateway is informed of the IP address of the multipanel via the setting for the OPC client PC's Control Panel.
The settings are required in the two configuration versions A) and B). Depending on the number of gateways used, this configuration should be carried on a number of PCs.
Select the entry "Settings > Control Panel" in the Windows Start menu.
Double-click "OpcXml Settings" on the "Control Panel". The "OpcXml Settings" dialog is opened.
Enter the name or IP address of the Operator Panel which is being used as an OPC XML server.
Close the dialog via the OK button.
Fig. 04
Para. 3) Configuration of WinCC as an OPC client (local)
No.
Procedure
1
Open the WinCC project and right-click "Tag Management" to add the "OPC.chn" driver.
Fig. 05
2
Then right-click the OPC channel to add a new connection.
The OPC server name "1_OPC.Siemens.XML" must be specified in the general properties for the connection.
Note: Don't select the property XML DA server!
Fig. 06
3
Once the connection has been configured, you can create tags in the "Tag" tab.
Set the data type first of all. Then click "Select" to specify the item name for the tag. Heed the following syntax:
Win CC Flexible RT<@>Tag.
Fig. 07
Para. 4) Configuration of ProTool/Pro Runtime as an OPC client (local)
No.
Procedure
1
Open a ProTool/Pro PC project.
Select "Controllers" and double-click the existing controller in order to open the properties dialog.
Select "OPC V6.0" as the protocol and then open the "Parameters...".
Fig. 08
2
Select "1_OPC.Siemens.XML" as an OPC server.
Click "OK" to close the dialogs.
Fig. 09
3
Once the OPC connection has been configured, you can create tags.
If the OPC server is activated on the multipanel (Runtime on the panel is started), you can access the OPC server tags in the Tag dialog via "Browse". Otherwise, you can also use the following syntax for the OPC items:
Win CC Flexible RT<@>Tag.
Fig. 10
Para. 5) Configuration of WinCC flexible 2004 Runtime as an OPC client (local)
No.
Procedure
1
Open a WinCC flexible PC project.
Go to "Communication > Connections" and add an OPC connection
(Communication drivers: OPC).
Select "1_OPC.Siemens.XML" in the list of Local Servers.
Fig. 11
2
Once the OPC connection has been configured, you can create tags.
If the OPC server is activated on the multipanel (Runtime on the panel is started), you can access the OPC server tags in the Tag dialog via "Symbol". Otherwise, you can also use the following syntax for the OPC items:
Win CC Flexible RT<@>Tag.
Fig. 12
Para. 6) Configuration of WinCC as an OPC client (remote); DCOM
No.
Procedure
1
Open the WinCC project and right-click "Tag Management" to add the "OPC.chn" driver.
Fig. 13
2
Then right-click the OPC channel to add a new connection.
The OPC server name "1_OPC.Siemens.XML" and the IP address of the PC with an installed OPC gateway must be specified in the general properties ("Start the server on this computer:").
Fig. 14
3
Once the connection has been configured, you can create tags in the "Tag" tab.
Set the data type first of all. Then click "Select" to specify the item name for the tag. Heed the following syntax:
Win CC Flexible RT<@>Tag.
Fig. 15
Para. 7) Configuration of ProTool/Pro Runtime as an OPC client (remote); DCOM
No.
Procedure
1
Open a ProTool/Pro PC project.
Select "Controllers" and double-click the existing controller in order to open the properties dialog.
Select "OPC V6.0" as the protocol and then open the "Parameters..." by clicking the button.
Fig. 16
2
Select "1_OPC.Siemens.XML" as the OPC server and specify the IP address of the PC with an installed OPC gateway ("Start the server on this computer:").
Click "OK" to close the dialogs.
Fig. 17
3
Once the OPC connection has been configured, you can create tags.
If the OPC server is activated on the multipanel (Runtime on the panel is started), you can access the OPC server tags in the Tag dialog via "Browse". Otherwise, you can also use the following syntax for the OPC items:
Win CC Flexible RT<@>Tag.
Fig. 18
Para. 8) Configuration of WinCC flexible 2004 Runtime as an OPC client (remote); DCOM
No.
Procedure
1
Open a WinCC flexible PC project.
Go to "Communication > Connections" and add an OPC connection
(Communication drivers: OPC).
Select "1_OPC.Siemens.XML" in the list of Local Servers and specify the IP address of the PC with an installed OPC gateway ("Name of the remote computer").
Fig. 19
2
If the OPC server is activated on the multipanel (Runtime on the panel is started), you can access the OPC server tags in the Tag dialog via "Symbol". Otherwise, you can also use the following syntax for the OPC items:
Win CC Flexible RT<@>Tag.