Wincc Data Transfer With Opc Da Nterface
Wincc Data Transfer With Opc Da Nterface
https://support.industry.siemens.com/cs/ww/en/view/109483465
Warranty and Liability
Note The application examples are not binding and do not claim to be complete with regard to
configuration, equipment or any contingencies. The application examples do not represent
customer-specific solutions. They are only intended to provide support for typical
applications. You are responsible for the correct operation of the described products.
These application examples do not relieve you of the responsibility of safely and
professionally using, installing, operating and servicing equipment. When using these
application examples, you recognize that we cannot be made liable for any
damage/claims beyond the liability clause described. We reserve the right to make
changes to these application examples at any time and without prior notice. If there are
any deviations between the recommendations provided in this application example and
other Siemens publications – e.g. Catalogs – the contents of the other documents shall
have priority.
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this application example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of fundamental contractual obligations (“wesentliche
Vertragspflichten”). The damages for a breach of a substantial contractual
obligation are, however, limited to the foreseeable damage, typical for the type of
contract, except in the event of intent or gross negligence or injury to life, body or
Siemens AG 2016 All rights reserved
health. The above provisions do not imply a change of the burden of proof to your
detriment.
Any form of duplication or distribution of these application examples or excerpts
hereof is prohibited without the expressed consent of Siemens AG.
Security Siemens provides products and solutions with industrial security functions that support the
informa- secure operation of plants, solutions, machines, equipment and networks.
tion To protect plants, systems, machines and networks against cyber threats, it is necessary
to implement (and continuously maintain) a holistic, state-of-the-art industrial security
concept. Products and solutions from Siemens are only one part of such a concept.
The customer is responsible for preventing unauthorized access to the customer’s plants,
systems, machines and networks. Systems, machines and components should be
connected to the company network or the Internet only if and to the extent necessary and
if appropriate protective action (e.g., use of firewalls and network segmentation) was
taken.
In addition, Siemens’ recommendations regarding appropriate protective action should be
followed. For more information about industrial security, visit
http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them even
more secure. Siemens strongly recommends to perform updates as they become
available and use only the latest product versions. Using versions that are out of date or
no longer supported can increase the risk of cyber threats.
To continually stay informed about product updates, subscribe to the Siemens Industrial
Security RSS Feed under http://www.siemens.com/industrialsecurity.
Table of Contents
Warranty and Liability ................................................................................................. 2
1 Task ..................................................................................................................... 4
1.1 Overview............................................................................................... 4
1.2 Requirements for the automation task ................................................. 5
2 Solution............................................................................................................... 6
2.1 Overview............................................................................................... 6
Sample project ..................................................................................... 6
2.2 Description of the core functionality ..................................................... 7
2.3 Sequence of the core functionality ....................................................... 7
2.4 Hardware and software components ................................................... 8
3 Application example: Provider module OPC Data Access............................ 9
3.1 Overview............................................................................................... 9
3.2 SIMATIC WinCC V7.3 ........................................................................ 10
3.2.1 Preparing the project environment in SIMATIC WinCC V7.3............. 10
3.2.2 Function description of the WinCC application .................................. 12
3.2.3 Operating the WinCC application ....................................................... 13
3.3 IDB configuration system (CS) ........................................................... 14
3.3.1 Creating and configuring an IDB project ............................................ 15
3.3.2 Creating links ...................................................................................... 17
Siemens AG 2016 All rights reserved
1 Task
1.1 Overview
Introduction
WinCC/IndustrialDataBridge V7.3 (IDB) is a WinCC option that, through an easy
and quick configuration, allows data transfer between different automation systems
via various standard interfaces, for example:
• OPC XML,
• WinCC OLE DB or
• Send/Receive.
To analyze and to save process values in Office formats,
WinCC/IndustrialDataBridge V7.3 also allows data transfer with other applications,
such as:
• CSV/TXT,
• Microsoft Excel or
• Microsoft Access.
To archive larger amounts of data, data bases (e.g. SQL Server, Oracle) can also
be integrated.
Siemens AG 2016 All rights reserved
The following figure shows a schematic overview over the various applications and
formats, which are supported by WinCC/IndustrialDataBridge V7.3.
Figure 1-1
The data interfaces shown in Figure 1-1 are integrated via software modules.
These modules are divided as follows:
Provider module
The provider module establishes the connection to the data provider that provides
the data.
Consumer module
The consumer module connects to the data consumer into which the data is
written.
Note You can connect various providers and consumers with each other. The
following must be observed in this regard:
• Accessing online tag values from the WinCC data manager (reading and
writing) via the provider module “OPC Data Access“ and saving them
WinCC-externally.
2 Solution
2.1 Overview
This documentation guides you through the configuration of
WinCC/IndustrialDataBridge V7.3 by using a practical example:
With the help of the supplied WinCC sample project, the environment required to
establish the connections between provider and consumer modules in
WinCC/IndustrialDataBridge V7.3 is made available.
Sample project
The included WinCC project “WinCC_IDB_Application_4“ allows reading online tag
values (raw materials, quantity) from the WinCC data manager of SIMATIC WinCC
V7.3.
This example provides WinCC/IndustrialDataBridge V7.3 with the environment for
the data transfer of online tag values, which can then be transmitted to MS Excel
via the “OPC Data Access“ module.
The following Figure 2-1 schematically shows the sample project in WinCC
runtime:
Siemens AG 2016 All rights reserved
Figure 2-1
Required knowledge
Figure 2-2 schematically shows the process sequence and the interfaces used in
WinCC/IndustrialDataBridge V7.3.
Figure 2-2
Siemens AG 2016 All rights reserved
Software components
Table 2-1
Component Qty Article number
SIMATIC WinCC V7.3 1 6AV63.1-....7-3...
WinCC/IndustrialDataBridge 1 6AV6371-1DX07-3...
V7.3
Windows 7 SP1 64-Bit 1
Microsoft Excel 2013 1
3.1 Overview
The application example shows how to execute the following steps in
WinCC/IndustrialDataBridge V7.3 with the supplied WinCC project
“WinCC_IDB_Application_4“:
• Creating a new IDB project
• Creating the corresponding links
• Configuring the corresponding provider/consumer connection configuration
• Setting the transfer mode.
Figure 3-1
Siemens AG 2016 All rights reserved
Required knowledge
No prior knowledge is needed to understand the function description of the WinCC
application.
This chapter describes the necessary steps for the supplied WinCC project
“WinCC_IDB_Application_4.MCP“ to adjust the project environment in SIMATIC
WinCC V7.3, in order to avoid error messages while activating WinCC runtime.
Table 3-1
Siemens AG 2016 All rights reserved
No. Approach
1. Start the SIMATIC WinCC Explorer.
2. Open the WinCC project “WinCC_IDB_Application_4.MCP“ by clicking on
“File>Open” and then selecting the WinCC project.
3. In the WinCC Explorer window:
• In WinCC Explorer, click on the icon “Computer”. (1)
• In the workspace, right-click on the computer name with the type “server
computer”.(2)
• Then click on “Properties.”(3)
No. Approach
4. In the “computer properties” window
• In the window “Computer properties>General”, click on “Accept local
computer name”. (1)
• Confirm your selection with “OK”. (2)
Siemens AG 2016 All rights reserved
Figure 3-2 shows the WinCC application right after WinCC runtime has been
activated.
Figure 3-2
2
Siemens AG 2016 All rights reserved
3
7
4
8
6 9
Table 3-2
No. Description
1. WinCC/IndustrialDataBridge Runtime
2. Existing IDB connection
3. Entry box of raw material name
4. Entry box of quantity
5. Update IDB trigger
6. Open MC Excel file (data target)
7. Display field of raw material to be transferred
8. Display field of quantity to be transferred
9. Confirmation of IDB trigger update
This section describes how to access online tag values in WinCC runtime in the
WinCC User Archive in write mode.
Table 3-3
No. Approach
1. Enter the desired name into the entry box “Raw Material”. (1)
2. Confirm your entry by clicking on “Enter”.
3. Enter the desired quantity in the entry box “Value”.(2)
4. Confirm your entry by clicking on “Enter”.
5. By clicking on the “Update” button (3), the IDB trigger stored in
WinCC/IndustrialDataBridge is activated or set to “One” to transfer the tags via
IDB (RT) into MS Excel or to update them.
Siemens AG 2016 All rights reserved
IDB project
link(s)
OPC
OPC DA > Excel MS Excel
Siemens AG 2016 All rights reserved
Data Access
Link settings
Generate RT configuration
The created project appears on the list in the navigation area. Next, you have to
create a link.
To create a link between provider and consumer, perform the following steps:
Note A link is created with “OPC Data Access” as provider and the “Excel” interface as
consumer.
Table 3-6
No. Approach
1. Right-click on the project name node “WinCC_OPCDA_Application“ in the tree
structure and select “Add new link”. (1)
Siemens AG 2016 All rights reserved
Note:
When assigning the name, it is useful for a better display to designate the link with
the name of the desired provider and its corresponding consumer. “Provider >
Consumer“
3. The created link appears in the project tree below the project name.
No. Approach
Next, you need to configure the provider interface (OPC Data Access).
Siemens AG 2016 All rights reserved
To set up the OPC Data Access interface, perform the following steps:
Table 3-7
No. Approach
1. In the project tree, double-click on the provider node “Provider(OPCDA)“ within
the created link.
Siemens AG 2016 All rights reserved
2. In the project area in the “OPC Data Access Provider Configuration” window,
click on the [...] button and select “OPCServer.WinCC“. Then click on the check
icon “√“.
After the selection of the OPC server, the computer name is automatically
displayed in the text box “Computer name”.
2. In the configuration area in the tab “Excel save options” in the area “Excel
configuration”, click on the [...] button and select the corresponding folder for the
Excel reports to be created.
No. Approach
In the browser window “Save as” in the text box “file name”, enter the name of
the “OPCDA” Excel file to be created (1). Then click on the “Save” button.(2)
Siemens AG 2016 All rights reserved
3. The text box “file name” in the “Excel configuration” area is filled automatically.
No. Approach
4. In the “Advance Options” tab
• In the “sheet names” area, select the option box “Set sheet name as” (1)
and enter the name “OPCDA” into the “Sheet 1” entry box.(2)
• In the “Sheets per workbook” area, select option box “1” for one
workbook. (3)
• In the area “Auto save option”, activate the option box “Save after a
certain time” and enter the desired save period, e.g. “1 minute”. (4)
• In the area “Suffix of filename”, select the option box “Date/Time”. (5)
4
Siemens AG 2016 All rights reserved
In the project tree, double-click on the node “Settings” to open the “Settings”
window in the workspace. The “Settings” window contains three tabs:
• “Transfer options”,
• “Connection mapping” and
• “Connections”.
Figure 3-4
Siemens AG 2016 All rights reserved
Table 3-9
No. Approach
1. In the “OPC Data Access transfer settings” window
• In the area “Group settings for the provider”, select the option box “Send
values using trigger”.
2. In the area “Trigger settings”, click on the [...] button to select the trigger.
Siemens AG 2016 All rights reserved
No. Approach
Note
With these entries, the IDB will transfer the desired tag values only when the
“trigger value” is set to “One”. After a successful transfer into the Excel sheet,
IDB resets the “trigger value” back to “Zero” for confirmation.
• Excel Consumer
• Connections
In this application example, for the preparation and creation of a MS Excel file, the
following column names from the “OPC Data Access Provider“ area are
considered:
• RawMaterial: contains the tag value.
• Value: contains the tag value.
Table 3-10
Tag name (OPC Data Access Provider) Column name (Excel consumer)
RawMaterial Material
Value Value
The image shows how the finished Excel file looks after the preparation:
Siemens AG 2016 All rights reserved
3 4
Siemens AG 2016 All rights reserved
No. Approach
3. In the “Excel consumer” area
In the text box “Column name”, enter the column name “Material” to be
assigned.(1)
Then, in the option box “data type”, select the corresponding data type
“OLE/Binary Automation string (VT_BSTR)“. (2)
consumer”.
5. Now, the connection name in the “Connection mapping settings” area has
changed to “RawMaterial->Material“.(1)
Click on the symbol “ “ to establish the connection between the two selected
column names of both areas (provider & consumer).(2)
No. Approach
7. In the “Connections” area
In this area, all created connections are displayed.
No. Approach
1. In the IDB menu bar, click on the “Save” button.(1)
2. Then click on “Generate runtime configuration”.(2)
3. Save the “WinCC OLEDB_Projekt.xml“ IDB configuration file in the
corresponding folder.
4. In the IDB menu bar, click on the “Runtime configuration” button.(3)
Result
When you start WinCC runtime again, the already generated IDB configuration file
“WinCC_OPCDA_Application.xml” will automatically be loaded into the
IndustrialDataBridge(RT).
MS Excel
The following figure is a result example of the data transfer into the MS access file:
Figure 3-5
Siemens AG 2016 All rights reserved
4 Error detection
In this chapter, frequently occurring errors in the respective application examples
are listed:
Table 4-1
No. Behavior Possible cause(s)
1. Error message during It is possible, that your computer has not
activation of SIMATIC been configured as server computer.
WinCC runtime.
2. The OPC tag browser does To display OPC DA servers, the service
not display any OPC DA opcenum.exe must be running on the server
server. However, OPC computer.
servers are installed on the Select “Start” > “Execute” to check, whether
computer. this service is running. Enter “services.msc”
and press enter. If “opecnum” has not been
started, switch to automatic mode and start
the service.
If the OPC servers cannot be displayed on
the remote computer, make sure that the step
Siemens AG 2016 All rights reserved
5 Related Literature
Table 5-1
Topic Title
\1\ Siemens Industry Online http://support.industry.siemens.com
Support
\2\ Download page of the entry https://support.industry.siemens.com/cs/ww/en/vi
ew/109483465
IndustrialDataBridge and
SIMATIC S7
\8\ Information about https://support.industry.siemens.com/cs/de/de/view/95
SIMATIC/IndustrialDataBridge 157030
V7.3
6 History
Table 6-1
Version Date Modifications
V1.0 04/2016 First version