8/2/2019 OpenPCS 7 Station OPC-Clients En
1/46
Applications & ToolsAnswers for industry.
Cover
OPC Client Excel Applicationsfor Data Access to PCS 7 OSProcess Data via OpenPCS 7
SIMATIC PCS 7
Application Description August 2010
8/2/2019 OpenPCS 7 Station OPC-Clients En
2/46
2OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightSi
emensAG
2010Allrightsreserved
Industry Automation and Drives Technologies Service & Support Portal
This article is taken from the Service Portal of Siemens AG, Industry Automationand Drives Technologies. The following link takes you directly to the downloadpage of this document.
http://support.automation.siemens.com/WW/view/en/44444703
For questions about this document please use the following e-mail address:
http://support.automation.siemens.com/WW/view/en/44444703mailto:[email protected]:[email protected]://support.automation.siemens.com/WW/view/en/444447038/2/2019 OpenPCS 7 Station OPC-Clients En
3/46
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 3
CopyrightSi
emensAG
2010Allrightsreserved
s
SIMATIC PCS 7
OpenPCS 7 Station / OPC Clients
Automation Task 1
Automation Solution 2
Basics 3
Functional Mechanismsof this Application 4
Installation 5
Configuration 6
Operating the Application
7
Reference 8
History 9
8/2/2019 OpenPCS 7 Station OPC-Clients En
4/46
Warranty and Liability
4OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
Warranty and Liability
Note The application examples are not binding and do not claim to be completeregarding configuration, equipment and any contingencies. The applicationexamples do not represent customer-specific solutions. They are only intendedto provide support for typical applications. You are responsible for ensuring thatthe described products are used correctly. These application examples do notrelieve you of the responsibility to use sound practices in application, installation,operation and maintenance. When using these application examples, yourecognize that we cannot be made liable for any damage/claims beyond theliability clause described. We reserve the right to make changes to theseapplication examples at any time without prior notice. If there are any deviationsbetween the recommendations provided in this application example and otherSiemens publications e.g. catalogs the contents of the other documents havepriority.
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 ofthe examples, information, programs, engineering and performance data etc.,described in this Application Example shall be excluded. Such an exclusion shallnot apply in the case of mandatory liability, e.g. under the German Product LiabilityAct (Produkthaftungsgesetz), in case of intent, gross negligence, or injury of life,body or health, guarantee for the quality of a product, fraudulent concealment of adeficiency or breach of a condition which goes to the root of the contract(wesentliche Vertragspflichten). The damages for a breach of a substantialcontractual obligation are, however, limited to the foreseeable damage, typical forthe type of contract, except in the event of intent or gross negligence or injury tolife, body or health. The above provisions do not imply a change of the burden of
proof to your detriment.
It is not permissible to transfer or copy these application examples or excerpts ofthem without having prior authorization from Siemens Industry Sector in writing.
8/2/2019 OpenPCS 7 Station OPC-Clients En
5/46
Preface
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 5
CopyrightS
iemensAG2
010Allrightsreserved
Preface
Purpose of this document
Part of this document is a PCS 7 sample configuration and the OPC client Excelapplications which you can also access via the download site of this entry.This document describes all steps from commissioning; configuration andoperation of the sample project and of the OPC client Excel applications. Thisdocument is supplement to the SIMATIC PCS 7 OpenPCS 7 Process ControlSystem manual.
Main contents
The following points are emphasized:
Adjusting and using the PCS 7 sample configuration Installation and configuration of the OpenPCS 7 station
Operation of the OPC client Excel applications
8/2/2019 OpenPCS 7 Station OPC-Clients En
6/46
Table of Contents
6OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
Table of Contents
Warranty and Liability ................................................................................................. 4
Preface.......................................................................................................................... 51 Automation Task................................................................................................ 7
2 Automation Solution ......................................................................................... 8
2.1 Overview of the overall solution.................................................................. 82.2 Core functionality .......................................................................................... 92.3 Hardware and software components used ............................................... 9
3 Basics ............................................................................................................... 11
3.1 Checking the network connection ............................................................ 113.2 OpenPCS 7.................................................................................................. 123.3 VBA............................................................................................................... 13
4 Functional Mechanisms of this Application ................................................. 15
4.1 OpenPCS 7 / OPC client ........................................................................... 164.2 PCS 7 OS .................................................................................................... 174.3 Structure of the sample project................................................................. 184.3.1 AS Engineering ........................................................................................... 184.3.2 OS Engineering........................................................................................... 20
5 Installation........................................................................................................ 22
5.1 Hardware...................................................................................................... 225.2 Software ....................................................................................................... 235.2.1 OpenPCS 7.................................................................................................. 235.2.2 OPC clients.................................................................................................. 25
5.2.3
SIMATIC PCS 7.......................................................................................... 25
6 Configuration ................................................................................................... 26
6.1 OpenPCS 7 / OPC client ........................................................................... 266.2 SIMATIC PCS 7 (with sample project) .................................................... 276.3 SIMATIC PCS 7 (without sample project)............................................... 32
7 Operating the Application............................................................................... 33
7.1 OPC clients.................................................................................................. 337.1.1 OPC DA client ............................................................................................. 337.1.2 OPC HDA client .......................................................................................... 387.1.3 OPC A&E client Alarms........................................................................... 407.1.4 OPC A&E client Events ........................................................................... 43
8 Reference ......................................................................................................... 45
8.1 Bibliography................................................................................................. 458.2 Internet Link Specifications ....................................................................... 45
9 History............................................................................................................... 46
8/2/2019 OpenPCS 7 Station OPC-Clients En
7/46
1 Automation Task
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 7
CopyrightS
iemensAG2
010Allrightsreserved
1 Automation Task
Introduction
SIMATIC PCS 7 is an open system with standardized interfaces. These interfacesmake it possible to access SIMATIC PCS 7 process data from applications. Suchcustomer-specific applications can be created and expanded in the VBprogramming languages (Visual Basic), VBA (Visual Basic for Applications) orVisual C++.
There is often the need to call and evaluate additional process data on thebusiness management level. It is to be added to the existing architecture andinstalled software basis, such as e.g. MS Office.
Description
The figure below provides an overview of the automation task.
Figure 1-1
The automation task comprises access from a MS Office application to PCS 7 OS
data. PCS 7 OS data is either archived data or data at run time.
8/2/2019 OpenPCS 7 Station OPC-Clients En
8/46
2 Automation Solution
8OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
2 Automation SolutionIf the task is to record the PCS 7 OS data outside of PCS 7 and if necessary toevaluate it, then PCS 7 offers a manufacturer-independent interface by supporting
the OPC specifications.
2.1 Overview of the overall solution
Schematic layout
The following figure gives a schematic overview of the most important componentsof the solution:
Figure 2-1
Server System
Client System
OPC-Client
SIMATIC PCS 7 OS
OpenPCS 7 Station
S7-400
OPC DA (Data Access)
OPC HDA (Historical Data Access)
OPC A&E (Alarms & Events)
The server system contains a simulation of process values and messages.
Note The figure corresponds to the configuration in the sample project. Furtherconfigurations can be found in the SIMATIC process control system PCS 7OpenPCS 7 function manual in Service&Support.
Topics not covered by this application
This application does not contain a description regarding:
basic programming with PCS 7
implementation in an existing PCS 7 environment (described in the SIMATICprocess control system PCS 7 OpenPCS 7 function manual)
changing and expanding the OPC client Excel applications
8/2/2019 OpenPCS 7 Station OPC-Clients En
9/46
2 Automation Solution
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 9
CopyrightS
iemensAG2
010Allrightsreserved
Required knowledge
Basic knowledge and experience when dealing with PCS 7 is assumed. Youshould furthermore have basic knowledge of network technology and knowledge inthe VBA (Visual Basic for Applications) script language.
2.2 Core functionality
The core functionality of this application example is the provision of PCS 7 OSprocess data (server system) for data access to an OPC client.
Advantages of this solution
The solution introduced here offers you the following advantages:
use of standardized OPC interfaces for data access
simple integration in PCS 7 projects (not part of this description)
free arrangement of OPC client Excel applications in the office network the infrastructure, from the terminal bus to the plant bus remains
2.3 Hardware and software components used
The application was generated and tested with the following components:
Hardware components
Table 2-1
System Component Communication
OpenPCS 7 / OPC client SIMATIC PCS 7 ES/OS 547B Via terminal bus
OS server SIMATIC PCS 7 ES/OS 547B Via terminal bus
Note If the hardware (Table 2-1) differs, please observe the minimum installationrequirements of the software components listed in Table 2-2.
Software components
Table 2-2
System Component Note
PCS 7 V7.1 incl. OpenPCS 7 OpenPCS 7 is part of the SIMATIC PCS 7 V7.1 DVD.OpenPCS 7 /OPC client
Microsoft Office Excel 2003
PCS 7 V7.1 incl. CFC Part of SIMATIC PCS 7 ES/OS 547B.OS server
S7-PLCSIM License is not part of the SIMATIC PCS 7 ES/OS 547B.
8/2/2019 OpenPCS 7 Station OPC-Clients En
10/46
2 Automation Solution
10OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
Sample files and projects
The following list contains all relevant files that are used in this applicationexample.
Table 2-3
System Component Note
OpenPCS 7 /OPC client
OPC-DA-HB.xls
OPC-HDA-HB.xls
OPC-A&E-HB.xls
OPC client Excel example applications for OPC DA,OPC HDA and OPC A&E data access.
OS server Opce_mp.zip PCS 7 sample project
8/2/2019 OpenPCS 7 Station OPC-Clients En
11/46
3 Basics
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 11
CopyrightS
iemensAG2
010Allrightsreserved
3 Basics
3.1 Checking the network connection
Legend The description and screen shots below contain the system names used in thetest set up.
OpenPCS 7 / OPC client = ES21OS server = ES25
To check the network share execute the following steps. Please note that theAutomation Projects release file is only available after the completed installation
of the OpenPCS 7 station.Table 3-1
No. Instruction Comment
1. Open the Windows explorer on the OS server.
2. In the explorer, enter the target directory, e.g.\\Computer Name\Automation Projects\ or\\IP Address\Automation Projects\.
3. In the Automation Projects file you will find theSPOSA.dcf file generated during theinstallation on ES21and another DCF file whichwill be created during the configuration of theES25.
In case of access problems you will find solutions in Figure 3-1. Please note thatthe names of the stations are for the sample project and may differ from yourproject names.
8/2/2019 OpenPCS 7 Station OPC-Clients En
12/46
3 Basics
12OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
Figure 3-1
Access to\\ES21\Automation Projects\ share file
Yes
Net access
successfulNo
Write access
successful
Yes
No
Copy and open
\\ES21\Automation Projects\test file in the share file
The share path is working and can
be entered for the OpenPCS 7 station
in the SPOSA application.
Adjust the write and read rights on theES21 for the share file
Check the computer name and if necessary
replace the computer name by the IP address of
the ES 21.
Was the share file created on ES 21?
Check the general
network setup, e.g. workgroup, subnet,
general access to computer, etc.
3.2 OpenPCS 7
In-depth information for the realization of access to PCS 7 OS process values andprocess value archives can be found in chapter 7 of the SIMATIC process controlsystem PCS 7 OpenPCS 7 function manual.
8/2/2019 OpenPCS 7 Station OPC-Clients En
13/46
3 Basics
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 13
CopyrightS
iemensAG2
010Allrightsreserved
3.3 VBA
Visual Basic for Application, in short VBA, is a script language used in Microsoft
Office programs. With this script language, users can write their own macros(scripts) to automate processes. Data can, for example, be copied from Excel intoWord via the push of a button.
In addition, other applications can be accessed via a COM interface. Apart fromaccess within the Office package, e.g. from Excel to Word, external applicationssuch as the OpenPCS 7 station can also be accessed.
Access to the OpenPCS 7 station is realized in the OPC client Excel applications.Proceed as described in the instruction to look at the sample code (macro).
Table 3-2
No. Instruction Comment
1. Open an OPC client Excel application, e.g."OPC-DA-HB.xls".
2. In the menu, select Tools > Macro >Visual Basic Editor.
3. To display the source text click theThisWorkbook(OPC_DA) Microsoft Excelobject in the Visual Basic editor.
The source text is displayed in the right window.
Prerequisite
To use the OPC clients, the type libraries of the OpenPCS 7 station have to beselected. The type libraries needed are generated during the installation of theOpenPCS 7 station.
8/2/2019 OpenPCS 7 Station OPC-Clients En
14/46
3 Basics
14OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
To select the Type Library for each OPC client Excel application, proceed asdescribed in the instruction.
Table 3-3
No. Instruction Comment1. Open the Visual Basic Editor as described in
Table 3-2.
2. Select Tools > References in the menu.
3. In the References dialog you will see theavailable type libraries.
The Siemens OPC DAAutomation 2.0 library isselected for the OPC DA client.
The following type libraries are needed or selected for the operation of the OPCclient Excel applications:
Siemens OPC DAAutomation 2.0 for the OPC-DA client
Siemens OPC HDAutomation 1.0 for the OPC-HDA client
Siemens OPC AlarmEvent Automation 1.0 for the OPC-A&E client
8/2/2019 OpenPCS 7 Station OPC-Clients En
15/46
4 Functional Mechanisms of this Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 15
CopyrightS
iemensAG2
010Allrightsreserved
4 Functional Mechanisms of this Application
General overview
Figure 4-1
ES25
ES21
OPC-Client
SIMATIC PCS 7 ES/OS
OpenPCS 7 Station
OPC DA (Data Access)
OPC HDA (Historical Data Access)OPC A&E (Alarms & Events)
IP-Adress:172.20.1.25
IP-Adress:172.20.1.21
Interface overview
The communication path is displayed in Figure 4-2. OPC client and OPC server arerunning on one system. The OPC client applications access the OPC server of theOpenPCS 7 station. In turn, the OPC servers access the runtime data of the PCS 7OS via the PCS 7 internal communication interfaces. The communication betweenthe OPC server of the OpenPCS 7 station and the OPC client is realized via theCOM interface (COM = Component Object Model) implemented via MS Windows.
Figure 4-2
8/2/2019 OpenPCS 7 Station OPC-Clients En
16/46
4 Functional Mechanisms of this Application
16OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
4.1 OpenPCS 7 / OPC client
Figure 4-3
The OpenPCS 7 station accesses PCS 7 OS data (WinCC) and provides thereceived data to OPC clients as OPC server.
OPC client Excel application examples were generated according to the followingOPC specifications:
OPC DA (Data Access), read and write access to the process values atruntime
OPC HDA (Historical Data Access), read access to archived process values ofa period defined by the user
OPC A&E (Alarms & Events), read access to alarms and events at runtime
Note Further information on OPC DA, OPC HDA and OPC A&E can be found on themanufacturers site http://www.opcfoundation.org.
http://www.opcfoundation.org/http://www.opcfoundation.org/8/2/2019 OpenPCS 7 Station OPC-Clients En
17/46
4 Functional Mechanisms of this Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 17
CopyrightS
iemensAG2
010Allrightsreserved
4.2 PCS 7 OS
Figure 4-4
The SPOSA application configured in the engineering station contains the path tothe OpenPCS 7 station on the ES21 and provides this station all referenceinformation so it can access PCS 7 OS data. When loading the SPOSA application
this reference information is created in a DCF file on the ES21.For PCS 7 OS data we distinguish between
Runtime data and
Archived data.
When the PCS 7 OS is executed the OpenPCS 7 station can provide the currentprocess data and archived data to an OPC client. The OPC client Excelapplications can have read or write access.
In addition the process values are saved in the process value archive with the helpof the Tag Logging (WinCC archive system). These archived (historical) values canhave read access via the OPC client Excel application.
8/2/2019 OpenPCS 7 Station OPC-Clients En
18/46
4 Functional Mechanisms of this Application
18OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
4.3 Structure of the sample project
The OPCexp_mp sample project consists of:
AS Engineering, consisting of hardware configuration, CFC and simulation
OS Engineering, consisting of Tag Logging and WinCC Runtime.
4.3.1 AS Engineering
SIMATIC Manager
In multi project you will find the hardware components, the NetPro connectionconfiguration and CFC programming.
In Figure 4-5 you can see the project structure of the sample project.
Figure 4-5
As AS hardware, the CPU 417-4 is configured with the corresponding CP 443-1Ethernet.
8/2/2019 OpenPCS 7 Station OPC-Clients En
19/46
4 Functional Mechanisms of this Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 19
CopyrightS
iemensAG2
010Allrightsreserved
NetPro
In Figure 4-6 you can see the connection configuration in NetPro.
Figure 4-6
CFC chart
In Figure 4-7 you can see a sheet view of the CFC chart which is used to simulatesine and cosine (Sinus and Cosinus) values. To visualize the values theMEAS_MON blocks have been configured.
Additionally configured values such as, e.g. R_Count, Val1R1 etc. can be found inthe overview of the same CFC chart (DASimulation).
Figure 4-7
8/2/2019 OpenPCS 7 Station OPC-Clients En
20/46
4 Functional Mechanisms of this Application
20OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
4.3.2 OS Engineering
Tag logging
In Figure 4-8 you can see the tag logging of the sample project which can beopened from the WinCC Explorer. All added tags are saved in the process valuearchive. You can access this data with the help of the OPC HAD client Excelapplication.
Figure 4-8
8/2/2019 OpenPCS 7 Station OPC-Clients En
21/46
4 Functional Mechanisms of this Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 21
CopyrightS
iemensAG2
010Allrightsreserved
WinCC Runtime
In Figure 4-9 you can see the visualization of the sample project in processoperation (WinCC Runtime).
Figure 4-9
8/2/2019 OpenPCS 7 Station OPC-Clients En
22/46
5 Installation
22OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
5 Installation
5.1 Hardware
The figure below shows the hardware setup of the application.
Figure 5-1
ES25
ES21
OPC-Client
SIMATIC PCS 7 ES/OS
OpenPCS 7 Station
OPC DA (Data Access)
OPC HDA (Historical Data Access)
OPC A&E (Alarms & Events)
IP-Adresse:172.20.1.25
IP-Adresse:172.20.1.21
The hardware components of the ES21 and ES25 can be found in chapter 2.3Hardware and software components used.
We recommend to operate both stations in the same subnet and to use identicallogin names and passwords. The IP addresses and login data indicated inTable 5-1 were used in the sample configuration.
Table 5-1
ES Login name Password IP Address Subnet
21 Administrator 12345 172.20.1.21 255.255.0.0
25 Administrator 12345 172.20.1.25 255.255.0.0
Note The setup guidelines for PCS 7 must be followed. Information can be found inthe SIMATIC Process Control System PCS 7 Compendium Part A Configuration Guidelines manual. The manual is available as a download via thefollowing link:
http://support.automation.siemens.com/WW/view/en/35016996
http://support.automation.siemens.com/WW/view/en/23996473http://support.automation.siemens.com/WW/view/en/239964738/2/2019 OpenPCS 7 Station OPC-Clients En
23/46
5 Installation
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 23
CopyrightS
iemensAG2
010Allrightsreserved
5.2 Software
5.2.1 OpenPCS 7
You can find information regarding the installation of OpenPCS 7 in differentconfigurations in the SIMATIC process control system PCS 7 OpenPCS 7function manual.
Close all opened programs and follow the instruction below.
Table 5-2
No. Instruction Comment
1 Start the Setup.exe installation program from the
PCS 7 V7.1 Toolset DVD.
2 Select a setup language.
All installation steps are displayed in the selected setuplanguage.
3 Close all opened programs and proceed with the
installation.
4 Read the product notice and click the "Next" button.
8/2/2019 OpenPCS 7 Station OPC-Clients En
24/46
5 Installation
24OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
5 Read the license agreement.
By clicking the "Next" button you accept the licenseagreements.
6 Select the "Install" setup type and click the "Next"button.
The Update option is available if youhave a STEP 7 or PCS 7 installation.
7 Enter the user information and click the "Next" button.
8 Select the package installation and click the "Next"button.
9 Select the "OpenPCS 7" program package and click the"Next" button.
10. Check the selected components to be installed andthen click the "Next" button.
11 After clicking the Install button the following packagesare installed/configured:
- OPC Core Components V3.0
- OPC.NET API Redistributables
- Automation License Manager V4.0 SP2
- OpenPCS 7 V7.1
- PCS 7 Tools V7.1
- Firewall Configuration
12 The recommended settings are displayed in the lastinstallation window in SIMATIC Security Control.
You will accept the settings for you system by clicking
Apply.
8/2/2019 OpenPCS 7 Station OPC-Clients En
25/46
5 Installation
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 25
CopyrightS
iemensAG2
010Allrightsreserved
5.2.2 OPC clients
The OPC client Excel applications are not installed but unpacked.
Prerequisite for operating the OPC client Excel applications is the installation ofMicrosoft Office Excel 2003.
Note Information regarding the installation prerequisites and installation of MicrosoftOffice Excel 2003 can be found on the manufacturers site and on the installationCD.
5.2.3 SIMATIC PCS 7
The PCS 7 software is already preinstalled on a SIMATIC PCS7 ES/OS 547B. Forthe simulation of a controller you can reinstall the S7-PLCSIM from PCS 7installation CD.
ATTENTION The S7-PLCSIM license is not part of the PCS7 ES/OS 547B and has to bepurchased separately.
Please observe the notes and information regarding installation and operation inthe PC Configuration and Authorization (V7.1) manual. The manual is available
as a download via the following link:http://support.automation.siemens.com/WW/view/en/36191684
http://support.automation.siemens.com/WW/view/en/36191684http://support.automation.siemens.com/WW/view/en/361916848/2/2019 OpenPCS 7 Station OPC-Clients En
26/46
6 Configuration
26OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
6 Configuration
6.1 OpenPCS 7 / OPC client
Security settings in Microsoft Office Excel 2003
To execute the OPC client Excel applications an intermediate to low security levelhas to be set for the execution of macros.
To adjust the security level, proceed according to the instruction.
Table 6-1
No. Instruction Comment
1. Open an OPC client Excel application.
2. Open Tools > Macro > Security inthe menu.
3. Set the security level to the option medium inthe Security dialog field.
The medium security level means thefollowing for you: when opening an Excel filewith macros you will always be asked whethermacros may be executed.
ATTENTION Please note that when using the Low security level, macros will be executedwithout asking. Excel files from untrusted sources may contain damagingcodes for your PC. When opening an Excel file in the Low security level,damaging codes may be executed and your computer could be damaged.
8/2/2019 OpenPCS 7 Station OPC-Clients En
27/46
6 Configuration
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 27
CopyrightS
iemensAG2
010Allrightsreserved
6.2 SIMATIC PCS 7 (with sample project)
The OPCexp_MP sample project contains a minimal configuration to simulateprocess values.
Project adjustment
To adjust the project to your system, follow the instruction below.
Table 6-2
No. Instruction Comment
1. Retrieve the Opce_mp.zip sample project in theSIMATIC manager.
2. Adjust the name of the PC Station (OSServer) inthe Object Properties.
3. Enter the name of your computer and tickComputer name identical to PC station name.
8/2/2019 OpenPCS 7 Station OPC-Clients En
28/46
6 Configuration
28OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
4. Instructions for adjusting the OS computername.
- Make a right mouse click on the OS and selectthe Open Object menu.
A dialog for the server configuration is opened.
5. Continuation of the instruction for adjusting theOS computer name.
- Confirm the The configured server is notavailable... dialog with Yes.
6. Continuation of the instruction for adjusting theOS computer name.
-By clicking the Properties menu on thecomputer with the right mouse button a newwindow for adjusting the name will open up.
7. Continuation of the instruction for adjusting theOS computer name.
- By enabling Use Local Computer Name thelocal computer name is read and accepted.
8. Close the opened OS project.
8/2/2019 OpenPCS 7 Station OPC-Clients En
29/46
6 Configuration
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 29
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
9. Make a right mouse click on the OS and selectthe Generate server data menu.
10. Assign the OS server data of the OpenPCS 7station to the OPC server and select theAssign OS server menu by clicking theright mouse button.
11. Confirm the OS server assignment forOPCServer dialog with OK.
12. Open the object properties of the OPCServer byclicking the right mouse button on theOPCServer and select the Object Propertiesmenu.
8/2/2019 OpenPCS 7 Station OPC-Clients En
30/46
6 Configuration
30OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
13. Enter the path to the OpenPCS 7 station (ES21)in the Target system tab.
Read and write access to the target directory,e.g. \\ES21\Automation Projects\ isrecommended.
Proceed as described in chapter 3 Networkaccess between ES25 and ES21.
14. Select the OPC project in the window on the left,e.g. OPCexp_Prj and select PLC > Compileand Download Objects in the menu.
15. To compile all objects click the Select Allbutton and tick Compile only.
Start simulation (S7-PLCSIM)
To start the simulation, proceed according to the instruction.
Table 6-3
No. Instruction Comment
1. Select Options > Simulate Modules
in the menu.The dialog window of S7-PLCSIM is opened.
8/2/2019 OpenPCS 7 Station OPC-Clients En
31/46
6 Configuration
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 31
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
2. Select the Open project from a file option inthe Open Project dialog.
3. Select the plc1.plc file from the \OPCe_Prj\plc1.plc path
Activating OS (WinCC Runtime)
To activate the OS, proceed according to the instruction.
Table 6-4
No. Instruction Comment
1. Make a right mouse click on the OS and selectthe Open Object menu.
2. To activate the OS (WinCC Runtime), selectFile > Activate in the WinCCExplorermenu.
8/2/2019 OpenPCS 7 Station OPC-Clients En
32/46
6 Configuration
32OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
6.3 SIMATIC PCS 7 (without sample project)
In the SIMATIC process control system PCS 7 OpenPCS 7 function manualfurther configuration examples are described, such as e.g.:
installation of an OpenPCS 7 station with OS client
installation of an OpenPCS 7 station on a OS single station
installation of an OpenPCS 7 station on a CAS
8/2/2019 OpenPCS 7 Station OPC-Clients En
33/46
7 Operating the Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 33
CopyrightS
iemensAG2
010Allrightsreserved
7 Operating the Application
7.1 OPC clients
To be able to access OS process data with the OPC client Excel applications, thefollowing prerequisites have to be fulfilled on the OS server.
The OPCexp_Prj demo project has been selected
PCS 7 OS is activated (Runtime)
S7-PLCSIM is running or a controller (S7-400) is available.
7.1.1 OPC DA client
With the OPC DA client Excel application (Figure 7-1) OS variables can be read
and written at runtime.
Figure 7-1
OS variable
Status
Stations in subnetOPC interfaces
Establish connection
Disconnect connectionSelect variable and add to spreadsheet
Monitoring variables (online)
Simulate var iablen values (online)Remove all variables from the spreads heet
Server informati on
Update rate i n mill iseconds
Time and date of the server
Group name
8/2/2019 OpenPCS 7 Station OPC-Clients En
34/46
7 Operating the Application
34OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
Reading OS variables
The description below describes the procedure for reading OS variables with thehelp of the OPC DA client.
Table 7-1
No. Instruction Comment
1. Open the "OPC-DA-HB.xls" file.
2. Click the Delete Variables button. Delete Variables deletes the content of thespreadsheet.
3. Select the computer name of your OpenPCS 7station in the first drop-down list.
All computers which are in the same subnetare displayed.
4. Select "PCS7.OPCDAServer.1" in the seconddrop-down list.
5. Click the "Connect DA" button.
The active connection is displayed in thestatus bar by Connected.
6. Click the "Open OPC DA Browser" button.
The OPC DA browser dialog field is opened.
7. In the tree from the left select OPCEXP:: >SIMATIC S7 Protocol Suite >Industrial Ethernet > S7-Programm(1) >DASimulation/R_Count.
In the list from the right select theDASimulation/R_Count.U variable and addthis variable in the Excel spreadsheet byclicking on ADD.
8. Close the OPC DA browser. Each variable added by ADD is in the
spreadsheet.
9. Click the "Monitoring Variables" button.
In the Excel table you will see the value of the"R_Count.U" process variable. This variable ispolled cyclically.
10. To end the connection, click the DisconnectDA button.
8/2/2019 OpenPCS 7 Station OPC-Clients En
35/46
7 Operating the Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 35
CopyrightS
iemensAG2
010Allrightsreserved
Figure 7-2
Monitoring variables
OPC DA Excel application PCS 7 OS
Writing OS variables
The description below describes the procedure for writing OS variables with thehelp of the OPC DA client.
Table 7-2
No. Instruction Comment
1. Open the "OPC-DA-HB.xls" file.
2. Delete the content of the spreadsheet byclicking the Delete Variables button.
Delete Variables deletes the content of thespreadsheet.
3. Select the computer name of the OpenPCS 7station in the first drop-down list.
All available computers which are in the samesubnet are displayed.
4. Select "PCS7.OPCDAServer.1" in the seconddrop-down list.
5. Click the "Connect DA" button.
The active connection is displayed in thestatus bar by Connected.
8/2/2019 OpenPCS 7 Station OPC-Clients En
36/46
7 Operating the Application
36OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
6. Click the "Open OPC DA Browser" button.
7. Select OPCEXP:: > Internal tags>WriteReal in the tree on the left.
In the list from the right select the WriteReal
variable and add this variable in the Excelspreadsheet by clicking on ADD.
8. Close the OPC DA browser.
9. Enter the value 99 in the Write Valuecolumn and confirm this value by clicking theenter button.
10. Click the Monitoring Variables button andafterwards Write Variables.
The value 99 is displayed in the PCS 7 OSprocess screen.
11. To end the connection, click the DisconnectDA button.
You will see the simulated process value in the Excel table Figure 7-3. This valuewill be displayed in the PCS 7 OS process screen in the output field.
8/2/2019 OpenPCS 7 Station OPC-Clients En
37/46
7 Operating the Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 37
CopyrightS
iemensAG2
010Allrightsreserved
Figure 7-3
Write variables
OPC DA Excel application PCS 7 OS
8/2/2019 OpenPCS 7 Station OPC-Clients En
38/46
7 Operating the Application
38OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
7.1.2 OPC HDA client
With the OPC HDA client Excel application (Figure 7-4) you can read process
value variables from the process value archive.Figure 7-4
Status
Server information
Stations in subnet OPC interfaces Establishing connection Reading values
Time range
Read valuesSelecting archive variable Aggregate
Day ahead Day back
Aggregate activation
Time interval
The instruction below describes the procedure for reading process value variablesfrom the process value archive with the help of the OPC HDA client.
Table 7-3
No. Instruction Comment
1. Open the "OPC-HDA-HB.xls" file.
2. Select the computer name of the OpenPCS 7station in the first drop-down list.
All computers which are in the same subnetare displayed.
3. Select "PCS7.OPCHDAServer.1" in thesecond drop-down list.
4. Check the entered time range (e.g. 27-01-2010 00:00:00 to 27-01-2010 23:59:59).
Time ranges over several days are alsopossible.
8/2/2019 OpenPCS 7 Station OPC-Clients En
39/46
7 Operating the Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 39
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
5. Check whether the Read Aggregates optionfield is enabled.
If the Read Aggregates option field is notenabled, all values valid for the time rage(max. 65535) will be displayed in the
spreadsheet.
6. Enter the time range in the "Interval inMinutes" input field.
The preset time interval is 60 minutes.
7. Connect yourself with the PCS 7 OPCHDAserver via "Connect".
The active connection is displayed in thestatus bar by Connected.
8. In the list of aggregates select "03OPCHDA_AVERAGE".
9. In the bottom tree click OPCEXP:: >Archives > SystemArchive >
I:OPCEXP::SystemArchive\DASimulation/R_Count.U.
10. In the spreadsheet you will see the validvalues of the R_Count.U process valuevariable for the time range at an interval of 60minutes.
8/2/2019 OpenPCS 7 Station OPC-Clients En
40/46
7 Operating the Application
40OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
7.1.3 OPC A&E client Alarms
With the OPC A&E client Excel application (Figure 7-5) OS alarms are displayed at
runtime.Figure 7-5 Alarms
Status
Server informationRequest server information
OPC Alarm Server Preselecting filter
Alarms/warnings readSpreadsheet alarms
Delete preselection
Cycle
Activate filter from preselection
Active filters
Start of recordingRecording stop
Update data recordDelete alarm list
Go to first /last lineOverwrite list
Delete filter liste
Project structure
Displaying alarms
Once you have opened the "OPC-A&E-HB.xls" OPC client Excel applicationexecute the following steps to output the OS alarms.
Table 7-4
No. Instruction Comment
1. Select the Alarms tab.
2. Click the "GetServer" button.
3. Confirm the "Please Select an OpenPCS 7Server" message box with "OK".
After the confirmation, the available alarmservers will be displayed.
4. Click the "PCS7.OPCAEServer.1" entry in the"Available A&E Server" list.
In the OPC A&E Server Properties field theinformation to the selected server is output.
5. Select the "OPCEXP_PRJ_OS::" entry in theProjects list.
8/2/2019 OpenPCS 7 Station OPC-Clients En
41/46
7 Operating the Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 41
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
6. To start the recording, click the Subscribebutton.
7. You will see the alarms in the spreadsheet inchronological sequence from the beginning ofthe recording.
Using filters
Execute the following steps to filter the alarms according to user-specificrequirements.
Table 7-5 Filter settings
No. Instruction Comment
1. Click the "Reaktor" entry in the "Areas" list.
2. Click the "DASimulation/R_Count" entry in the"Sources" list.
3. By clicking the "SetFilterSources" button youwill accept all the displayed Prepared SourceFilter variables in the Active Source Filter.
4. In the spreadsheet you will see the filteredalarms/warnings of the entered Sources in
the Active Source Filter.
5. If you would like to change the filter settings,click the NoFilter button andDeleteSourceList. Adjust the filters accordingto your requirements and execute theinstruction steps 1 to 3 with changedSources.
8/2/2019 OpenPCS 7 Station OPC-Clients En
42/46
7 Operating the Application
42OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
In Figure 7-6 you can see the same alarm in the PCS 7 OS process screen and inthe OPC A&E Excel application.
Figure 7-6
Read
alarms/warnings
OPC DA Excel application PCS 7 OS
8/2/2019 OpenPCS 7 Station OPC-Clients En
43/46
7 Operating the Application
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 43
CopyrightS
iemensAG2
010Allrightsreserved
7.1.4 OPC A&E client Events
With the OPC A&E client Excel application (Figure 7-7 Events) operator
messages (events) are displayed at runtime.
Figure 7-7 Events
Status
Display event categories
Start of recording
Recording stop
Overview of event categories
Gelesenen EventsSpreadsheet events
OPC Alarm&Event Server
Delete event list
Go to first/
last line
Server information
Displaying events
Once you have opened the "OPC-A&E-HB.xls" OPC client Excel applicationexecute the following steps to output the OS events.
Table 7-6
No. Instruction Comment
1. Select the Events tab.
2. Click the "Subscribe" button.
3. Confirm the "Please Select an OpenPCS 7
Server" message box with "OK".
After the confirmation, the available alarm
servers will be displayed.4. Click the "PCS7.OPCAEServer.1" entry in the
"Available A&E Server" list.In the OPC A&E Server Properties field theinformation to the selected server is output.
5. In the spreadsheet you will see the events ofthe PCS 7 OS in process operation whichhave occurred since the"PCS7.OPCAEServer.1" was selected.
6. By clicking the QueryEventCategory button,you will receive an overview of the eventcategories.
8/2/2019 OpenPCS 7 Station OPC-Clients En
44/46
7 Operating the Application
44OpenPCS 7 Station / OPC Clients
Version 1.0, Entry ID: 44444703
CopyrightS
iemensAG2
010Allrightsreserved
No. Instruction Comment
7. The EventCategory of an upcoming eventcan be found in your spreadsheet by slidingthe bottom scroll bar towards the right.
In Figure 7-8 you can see the events recorded by the Excel table from the PCS 7OS process operation.
Figure 7-8
Change values
OPC DA Excel application PCS 7 OS
Read events
8/2/2019 OpenPCS 7 Station OPC-Clients En
45/46
8 Reference
OpenPCS 7 Station / OPC ClientsVersion 1.0, Entry ID: 44444703 45
CopyrightS
iemensAG2
010Allrightsreserved
8 Reference
8.1 Bibliography
This list is by no means complete and only presents a selection of suitableliterature.
Table 8-1
Subject Title
/1/ PLC Automatisieren mit SPS - Theorie und Praxis Hans Gnter Wellenreuther,Dieter Zastrow
Vieweg+Teubner
ISBN 3-83480-231-X
/2/ STEP7 Automating with STEP7 in STL and SCL
Hans Berger
Wiley-VCHISBN 3895782955
/3/ Industrialcommunication
Datenkommunikation in der Prozessindustrie. Darstellung undanwendungsorientierte Analyse
Udo Enste, Jochen Mller
Oldenbourg Industrieverlag
ISBN 978-3-8356-3116-8
/4/ OPC OPC: Grundlagen, Implementierung und Anwendung
Frank Iwanitz / Jrgen Lange
Hthig Verlag, Heidelberg
ISBN 3-7785-2903-X
8.2 Internet Link Specifications
This list is by no means complete and only presents a selection of suitableinformation.
Table 8-2
Subject Title
\1\ Reference to the entry http://support.automation.siemens.com/WW/view/en/44444703
\2\ Siemens I IA/DT CustomerSupport
http://support.automation.siemens.com
\3\ SIMATIC Process Control SystemPCS 7 Compendium Part A
Configuration Guidelines
http://support.automation.siemens.com/WW/view/en/35016996
\4\ SIMATIC Process Control SystemPCS 7 Compendium Part D Management and Maintenance
http://support.automation.siemens.com/WW/view/en/43410843
\5\ SIMATIC Process Control SystemPCS 7 OpenPCS 7
http://support.automation.siemens.com/WW/view/en/36183293
\6\ SIMATIC Process Control SystemPCS 7 Engineering System (V7.1)
http://support.automation.siemens.com/WW/view/en/36050990
\7\ SIMATIC Process Control SystemPCS 7 OPC A&E for PCS 7 (V7.1)
http://support.automation.siemens.com/WW/view/en/36052234
http://support.automation.siemens.com/WW/view/en/23996473http://support.automation.siemens.com/http://support.automation.siemens.com/WW/view/en/35016996http://support.automation.siemens.com/WW/view/en/43410843http://support.automation.siemens.com/WW/view/en/36183293http://support.automation.siemens.com/WW/view/en/36050990http://support.automation.siemens.com/WW/view/en/36052234http://support.automation.siemens.com/WW/view/en/36052234http://support.automation.siemens.com/WW/view/en/36050990http://support.automation.siemens.com/WW/view/en/36183293http://support.automation.siemens.com/WW/view/en/43410843http://support.automation.siemens.com/WW/view/en/35016996http://support.automation.siemens.com/http://support.automation.siemens.com/WW/view/en/239964738/2/2019 OpenPCS 7 Station OPC-Clients En
46/46
9 History
CopyrightS
iemensAG2
010Allrightsreserved
9 History
Table 9-1
Version Date Modification
V1.0 16.08.2010 First issue
Top Related