Siemens SIMATIC PCS 7 Function Manual
Siemens SIMATIC PCS 7 Function Manual

Siemens SIMATIC PCS 7 Function Manual

Process control system
Hide thumbs Also See for SIMATIC PCS 7:
Table of Contents

Advertisement

SIMATIC
PCS 7 process control system
OpenPCS 7
Function Manual
05/2012
A5E02780178-02
Preface
Basics
Installation and licensing
PCS 7 Engineering
System configurations
OpenPCS 7 interface
Appendix
Lists and folders
1
2
3
4
5
6
A
B

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC PCS 7

  • Page 1 Preface Basics Installation and licensing SIMATIC PCS 7 Engineering PCS 7 process control system OpenPCS 7 System configurations OpenPCS 7 interface Function Manual Appendix Lists and folders 05/2012 A5E02780178-02...
  • Page 2: A5E02780178

    Note the following: WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems.
  • Page 3: Table Of Contents

    Table of contents Preface.................................7 Basics................................9 General............................9 Microsoft basics...........................10 OPC Foundation..........................11 Components of OpenPCS 7......................12 OLE DB interface.........................14 COM / DCOM components of OpenPCS 7.................14 Installation and licensing..........................17 Hardware requirements.......................17 Installing the OpenPCS 7 station....................17 Licensing of the OpenPCS 7 station....................19 Licensing the OS-internal OPC server..................20 PCS 7 Engineering.............................23 Configuring an OpenPCS 7 station.....................23...
  • Page 4 Table of contents OpenPCS 7 interface..........................45 Access options..........................45 Data transmission........................45 OPC Data Access (OPC DA)......................46 6.3.1 Overview............................46 6.3.2 Introduction to the OPC Data Access interface................46 6.3.3 How the OPC DA server works....................47 OPC Historical Data Access (OPC HDA)..................48 6.4.1 Overview............................48 6.4.2 How the OPC HDA server works....................48 6.4.3...
  • Page 5 Table of contents 6.7.5.2 Querying process value archives....................85 6.7.5.3 Representation of the message archives..................89 6.7.5.4 Querying the message archive....................91 Appendix..............................93 Commissioning..........................93 Lists and folders............................95 List of sources..........................95 List of abbreviations/acronyms....................95 OpenPCS 7 Function Manual, 05/2012, A5E02780178-02...
  • Page 7: Preface

    PCS 7 Readme carefully; it contains important information PCS 7 manuals. Please read this and amendments on PCS 7. PCS 7 Readme on the Process Control System; SIMATIC PCS 7 DVD contains ● The important information regarding PCS 7 and takes precedence over the PCS 7 documentation supplied.
  • Page 8 PCS 7 documentation. You can find the following for the latest PCS 7 versions: ● In the section "Hardware manuals for SIMATIC PCS 7 ..." – The manuals for components approved for a PCS 7 version ●...
  • Page 9: Basics

    ● Location (OS1, OS2, …, CAS / Process Historian) and ● Redundancy (OS1 master, OS1 standby …) OpenPCS 7 replaces @PCS 7previously available in the context of SIMATIC PCS 7 and is, at the same time, the equivalent of the Connectivity Station and the Connectivity Pack of the WinCC SCADA system.
  • Page 10: Microsoft Basics

    Layout The OpenPCS 7 station can be operated in various configurations: ● OpenPCS 7 station without OS client, based on a SIMATIC PCS 7 Industrial Workstation in the client version. This is the recommended preferred configuration. ● OpenPCS 7 station on an OS client.
  • Page 11: Opc Foundation

    Basics 2.3 OPC Foundation COMobjects can be understood as extensions of the operating system. They are not dependent on programming languages and are available in principle to all applications. The data and code of the object are not directly accessible to the user of the COMobject. DCOM DCOM is the acronym for "Distributed Component Object Model".
  • Page 12: Components Of Openpcs 7

    The OPC Foundation has more than 300 members worldwide. These include the most important manufacturers of control systems, process instrumentation and process control systems worldwide. SIEMENS is a member of the OPC Foundation. The declared goal of the OPC Foundation is vertical integration of information from the field level through to the enterprise level.
  • Page 13 Basics 2.4 Components of OpenPCS 7 OPC client Office network PCS 7 OS client OpenPCS 7 Station OPC DA server OPC HDA server OPC A&E server OPC “H” A&E server Terminal bus PCS 7 OS server Plant bus OPC DA (Data Access server) For read and write access to process values according to the OPC specification OPC DA V1.00, V2.05a, V3.00.
  • Page 14: Ole Db Interface

    OPC "H" A&E (Historical Alarms & Events server) For read access to archived alarms and messages. Thanks to an expansion of the OPC standard interface by Siemens, the OpenPCS 7 station is also able to transfer historical alarms and messages from the archive to the subscribers at production and enterprise management levels.
  • Page 15 Basics 2.6 COM / DCOM components of OpenPCS 7 ● OPC client runs on a separate computer If the OPC client and the OPC server process run on separate computers, the OPC client accesses a local and a remote proxy object. These objects communicate via RPC and a stub object, with the OPC server object on a different computer.
  • Page 17: Installation And Licensing

    Installation and licensing Hardware requirements Recommended configuration for PC stations Use PC components according to the recommendations for SIMATIC PCS 7 PC stations. PCS 7readme file . For additional information, refer to the Minimum hardware configuration of the PC stations...
  • Page 18 Installation and licensing 3.2 Installing the OpenPCS 7 station Configuration Requirements for installation Intended use of the software Program packages for the installation OpenPCS 7 station on Installation requirements for the This serves to expand an ● "OpenPCS 7" package the OS single station OS single station existing OS single station with...
  • Page 19: Licensing Of The Openpcs 7 Station

    Installation and licensing 3.3 Licensing of the OpenPCS 7 station 11.Check the components selected for installation and click "Next". 12.Click the "Install" button. The following picture shows the selection for the program package: Additional information Process Control ● You can find additional information about different modules in the manual System PCS 7;...
  • Page 20: Licensing The Os-Internal Opc Server

    This is a single license for one installation. OpenPCS 7 station License for one OpenPCS 7 software installation for a separate OpenPCS 7 station based on the hardware of the SIMATIC PCS 7 workstation (client version). This is a single license for one installation.
  • Page 21 Installation and licensing 3.4 Licensing the OS-internal OPC server These internal OPC servers can be used with OpenPCS 7-licenses. This is only possible if the "OpenPCS 7 station / OS" or "OpenPCS 7 station" license is available on the OS station. Note If the internal OPC servers of an OS station are used, this represents additional load in terms of the OS station's performance.
  • Page 23: Pcs 7 Engineering

    PCS 7 Engineering Configuring an OpenPCS 7 station Introduction The OpenPCS 7 station is configured as a SIMATIC PC station in the SIMATIC Manager. It includes the "SPOSA application" object. SPOSA is the acronym for Single Point Of System Access. The OPC client application can also be executed on the OpenPCS 7 station. During configuration, the following steps need to be taken: ●...
  • Page 24: Openpcs 7 And Os Application On A Shared Pc Station

    PCS 7 Engineering 4.2 OpenPCS 7 and OS application on a shared PC station 9. Open the object properties of the "Open_PCS7_Station(1)" object and enter the download path to the OpenPCS 7 station in the "CPU" tab. 10.Right-click on the "Open_PCS7_Station(1)" object to open the shortcut menu and select "Assign OS Server...".
  • Page 25: Configuring An Opc Client

    Note If you want to use the SIEMENS OPC Automation Interfaces, the OPC client must be executed either on the OpenPCS 7 station or you will have to take steps manually to ensure that the required files exist and are registered on the OPC client. Refer to the section "...
  • Page 26: Loading The Openpcs 7 Station

    ● The user logged in on the ES can access the shared Windows folder "\\<OpenPCS 7 Station>\Automation Projects". The folder is located on the OpenPCS 7 station in the path "C:\Program Files\SIEMENS". ● The PCS 7multiproject is open on the ES.
  • Page 27: Configuration Support With The Pcs 7 Project Wizard

    PCS 7 Engineering 4.5 Configuration support with the PCS 7 project wizard 3. Right-click on the object below the SPOSA application. 4. Select " CPU > Download". Configuration support with the PCS 7 project wizard The PCS 7 project wizard The PCS 7project wizard supports you when creating a PCS 7project including an OpenPCS 7 station.
  • Page 28 PCS 7 Engineering 4.5 Configuration support with the PCS 7 project wizard 3. Click the "Next" button in the "Introduction" dialog. 4. Select the required CPU in the "Which CPU are you using in your project?" dialog and then click the "Next" button. 5.
  • Page 29 PCS 7 Engineering 4.5 Configuration support with the PCS 7 project wizard 9. Click the "Browse" button and set the path for the storage location. 10.Click the "Finish" button. 11.Click "OK" in the "Message Number Assignment" dialog. 12.Insert a new PC station in your project. 13.Enter the computer name in the object properties of the PC station.
  • Page 30 PCS 7 Engineering 4.5 Configuration support with the PCS 7 project wizard 17.Assign the OS server to the OpenPCS 7 station. 18.Following this, you will need to complete the project with the AS and OS engineering and download the project. OpenPCS 7 Function Manual, 05/2012, A5E02780178-02...
  • Page 31: System Configurations

    System configurations General configuration General OpenPCS 7configuration In process mode, the OpenPCS 7 station communicates with the automation systems via the operator station (OS server). With the OpenPCS 7 station, you can access the data of redundant PCS 7 OS server pairs. If the PCS 7 OS master server fails, the redundant OS server is automatically connected for the next read job.
  • Page 32 System configurations 5.1 General configuration OpenPCS 7 Function Manual, 05/2012, A5E02780178-02...
  • Page 33: Openpcs 7 Without Os

    System configurations 5.2 OpenPCS 7 without OS OpenPCS 7 without OS OpenPCS 7 station without installed OS client In this configuration, the OpenPCS 7 station is installed without an OS client. The OPC clients run on a separate PC. All OPC clients access the OpenPCS 7 station. The OpenPCS 7 station contains the OPC DA, OPC HDA and OPC A&E servers.
  • Page 34: Openpcs 7 Combined With An Os

    System configurations 5.3 OpenPCS 7 combined with an OS OpenPCS 7 combined with an OS 5.3.1 OpenPCS 7 combined with an OS client OpenPCS 7 combined with an OS client In this configuration, an OS client is also installed on the OpenPCS 7 station. The OPC client also runs on the OpenPCS 7 station.
  • Page 35: Openpcs 7 Combined With An Os Server Or Cas

    System configurations 5.3 OpenPCS 7 combined with an OS OPC client PCS 7 OS clients OpenPCS 7 station PCS 7 OS client Terminal bus Archive server PCS 7 OS server Route Control server BATCH server Plant bus S7-400 S7-400 S7-400 Fieldbus ET 200 ET 200...
  • Page 36: Openpcs 7 Combined With An Os Single Station

    System configurations 5.3 OpenPCS 7 combined with an OS Example configuration for the central archive server: PCS 7 OS Client 2 PCS 7 OS Client 1 OPC client Terminal bus PCS 7 OS Server 2 Archive server PCS 7 OS Server 1 OpenPCS 7 station Plant bus S7-400...
  • Page 37 System configurations 5.3 OpenPCS 7 combined with an OS OS multiple-station system OS single-station system OPC client PCS 7 OS Client 1 PCS 7 OS Client 2 OS single station with parallel OpenPCS 7 station Terminal bus PCS 7 OS Server 1 PCS 7 OS Server 2 Plant bus S7-400...
  • Page 38: Openpcs 7 Station For Multiple Pcs 7 Projects

    Hybrid configurations with regard to PCS 7versions are disabled. Configuration A SIMATIC PCS 7 station with a SPOSA application is configured in every PCS 7 project. The SPOSA application is assigned to the OS server of the relevant PCS 7project. The same path to the target system is configured and downloaded in both SPOSA applications.
  • Page 39: Da Linking Of Two Pcs 7 Projects Using Openpcs 7

    System configurations 5.5 DA linking of two PCS 7 projects using OpenPCS 7 DA linking of two PCS 7 projects using OpenPCS 7 Plant configuration of the OPC DA link The PCS 7 OS servers can also be used as OPC clients. The "OPC" channel is the OPC client application of the PCS 7 OS.
  • Page 40: Access To A Cas Via Openpcs 7

    System configurations 5.6 Access to a CAS via OpenPCS 7 Application 3: This configuration can also be used if Project B is a third-party product that provides an OPC server and not a PCS 7 project. The requirement is that both projects support the same OPC standard.
  • Page 41: Openpcs 7 Security Concept

    System configurations 5.7 OpenPCS 7 security concept In the following picture OpenPCS 7 is shown with the central archive server: OPC client OpenPCS 7 Station Terminal bus PCS 7 OS server Archive server Plant bus S7-400 Fieldbus ET 200 OpenPCS 7 security concept Plant configuration with firewall The following figure shows the schematic structure of a PCS 7plant with an OpenPCS 7 station and firewall.
  • Page 42: Settings In The Windows Firewall For Open Pcs 7

    System configurations 5.8 Settings in the Windows Firewall for Open PCS 7 separated from the office network by a firewall. The OPC client that accesses the OpenPCS 7 station is located in the office network. PCS 7 security cell DMZ perimeter Office network network PCS 7 OS client...
  • Page 43: Users And Passwords In A Workgroup

    System configurations 5.9 Users and passwords in a workgroup Setting location The following table shows where the settings must be made for the respective operating system: Operating system Setting location Windows XP "Exceptions" tab Windows Server 2003 Windows 7 Inbound rules in the "Windows Firewall with Advanced Security"...
  • Page 44 System configurations 5.9 Users and passwords in a workgroup "User2" and the password "abc" is logged in on the OPC client, the user on the OpenPCS 7 station must also be created identically. Microsoft workgroup OpenPCS 7 Station OPC client Login / Password Login / Password PCS 7 OS clients...
  • Page 45: Openpcs 7 Interface

    OpenPCS 7 interface Access options Access options The following table lists the options for access to the PCS 7 OS server and the central archive server via OPC: Access to data Access Data type Type of access from via OPC OS server Tags in process mode Reading / writing...
  • Page 46: Opc Data Access (Opc Da)

    You will find the asynchronous and synchronous write and read methods that are available in the sections "SIEMENS OPC DA Automation Interface 2.0", "SIEMENS OPC HDA Automation Interface 1.0" and " SIEMENS OPC Alarms and Events Automation Interface 1.0". OPC Data Access (OPC DA) 6.3.1...
  • Page 47: How The Opc Da Server Works

    OpenPCS 7 interface 6.3 OPC Data Access (OPC DA) ● Connection via PROFIBUS ● Connection using input modules or output modules OPC DA client Data access clients can, for example, be Excel tables in conjunction with Visual Basic for Applications (VBA). They may also be extensive applications created with Visual Basic or Visual C++.
  • Page 48: Opc Historical Data Access (Opc Hda)

    OpenPCS 7 interface 6.4 OPC Historical Data Access (OPC HDA) How it works The OPC DA server supports OPC data access with the following specifications: ● 1.0a ● 2.0. ● 3.0. The OPC DA server is a DCOM application. Using this software interface, the OPC DA server provides the OPC DA client with the necessary information about PCS 7 OS tags.
  • Page 49: Data Structure Of The Opc Hda Server

    OpenPCS 7 interface 6.4 OPC Historical Data Access (OPC HDA) The OPC HDA server supports the OPC Historical Data Access 1.20 specification. This was confirmed by the compliance test. All OPC HDA clients complying with the OPC Historical Data Access 1.20 specification can access the OPC HDA server. The use of individually programmed OPC HDA clients is the best way to meet the requirements.
  • Page 50: Overview Of Supported Attributes

    OpenPCS 7 interface 6.4 OPC Historical Data Access (OPC HDA) Additional information ● Additional information on the data structure of the OPC HDA is available in the specification OPC Historical Data Access Specification V1.2 of the OPC Foundation. 6.4.4 Overview of supported attributes Supported attributes The following table lists the attributes supported by the OPC HDA server.
  • Page 51: Overview Of Supported Functions

    OpenPCS 7 interface 6.4 OPC Historical Data Access (OPC HDA) Aggregate function Description OPCHDA_MINIMUM Obtains the lowest value of the raw data for the specified period. OPCHDA_MAXIMUMACTUALTIME Obtains the highest value and the time stamp of the raw data for the specified period. OPCHDA_MAXIMUM Obtains the highest value of the raw data for the specified period.
  • Page 52: Time Format Of The Opc Hda Server

    OpenPCS 7 interface 6.4 OPC Historical Data Access (OPC HDA) 6.4.7 Time format of the OPC HDA server Period of the historical data The period is specified by the start and end time on the OPC HDA server. The specified period defines the period examined for the historical data.
  • Page 53 OpenPCS 7 interface 6.4 OPC Historical Data Access (OPC HDA) Keyword NOW = current local time of the server SECOND = current second MINUTE = current minute HOUR = current hour DAY = current day WEEK = current week MONTH = current month (0-11) YEAR = current year Offset +/-S = deviation in seconds...
  • Page 54: Quality Codes Of The Opc Hda Server

    OpenPCS 7 interface 6.4 OPC Historical Data Access (OPC HDA) 6.4.8 Quality codes of the OPC HDA server Quality codes The quality code is required to check the status and quality of the raw data. The following table shows the quality codes of OPC HDA. Code Description Quality...
  • Page 55: Opc Alarms And Events (Opc A&E)

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) OPC Alarms and Events (OPC A&E) 6.5.1 Overview Overview You will find information on the following topics in the sections below: ● Mapping the PCS 7 OS message system on OPC A&E ●...
  • Page 56 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) Supported events The OPC A&E server supports the following events: ● Condition-related event ● Simple event ● Tracking event Condition-related events With a condition-related event server, the event is associated with a condition. A condition may be the limit violation of a tag.
  • Page 57: Mapping The Pcs 7 Os Message System On Opc A&E

    ● Pending messages Messages received over the path specified by OPC A&E (for example, "Refresh") can be acknowledged. ● Historical messages Messages received over the "historical messages" path (extension of the Siemens OPC A&E server) cannot be acknowledged. Additional information WinCC ●...
  • Page 58 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) OS message system Event type Area In PCS 7, an "area" is an area, a diagnostics area or an alarm hiding group. If there S, C, T is no area, no diagnostic area or no alarm hiding group configured for the message, only the OPC area corresponding to the server prefix will be available.
  • Page 59: Mapping The Message Classes And Message Types Of Pcs 7 Os On Opc A&E

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) NOTICE The message classes and message types must be configured identically on the connected OS servers if you operate the OPC A&E server as follows: ● On an OS client ●...
  • Page 60: Attributes Of The Pcs 7 Os Message System

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) severity "1" and priority "16" to OPC severity "1000". All other priority values are obtained by linear interpolation between "0" and "1000". 6.5.6 Attributes of the PCS 7 OS message system Attributes of the PCS 7 OS message system The following table lists the OPC attributes and their meaning in the PCS 7 OS message system.
  • Page 61: Acknowledgment Concept

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) OPC attribute Meaning in the PCS 7 OS message system InfoText Displays the information text for the message. LoopInAlarm States if LoopInAlarm has been configured. ClassID Displays the message class ID. Type ID Displays the message type ID.
  • Page 62 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) ChangeMask The "ChangeMask" parameter keeps track of where the message status was changed. Parameter values of ChangeMask: ● OPC_CHANGE_ACTIVE_STATE ● OPC_CHANGE_ENABLE_STATE ● OPC_CHANGE_ACK_STATE NewState The "NewState" parameter indicates the message status after a change. Parameter values of NewState: ●...
  • Page 63 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) PCS 7 OS NewState ChangeState Came in, went out OPC_CONDITION_ENABLED OPC_CHANGE_ACK_STATE message without acknowledgment Message acknowledged by OPC_CONDITION_ACTIVE OPC_CHANGE_ACK_STATE system OPC_CONDITION_ACKED (message OPC_CONDITION_ENABLED still pending) Message acknowledged by OPC_CONDITION_ACKED OPC_CHANGE_ACK_STATE system OPC_CONDITION_ENABLED (message...
  • Page 64: Quality Codes For Opc A&E

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) 6.5.8 Quality codes for OPC A&E Quality codes The quality code is required to check the status and quality of a message. The following table shows the quality codes of OPC A&E. Code Quality Status...
  • Page 65 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) overview of the messages. The following figure shows an example of the display in an OPC browser: Representation of the messages with OPC A&E and hierarchical access As of PCS 7 V7.0 SP1, you can use an OPC A&E server with hierarchical access in PCS 7. The OPC A&E server with hierarchical access supports the following event types: ●...
  • Page 66: Example 1: Messages Are Not Assigned To Any Area

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) Recommendation Use an OPC A&E server with hierarchical access when creating new projects. If you upgrade an existing project, the OPC A&E server can be used as before or the OPC A&E server can be converted to hierarchical access.
  • Page 67 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) Requirement ● Process control messages are created on the OS servers. ● Messages for Batch servers and Route Control servers are created on the dedicated message servers. ● No diagnostics area is present. Structure for access to messages via the OPC A&E interface The general mapping to the OPC A&E interface appears as follows: OpenPCS 7...
  • Page 68 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) Example of a hierarchy without assignment The following picture shows the hierarchy of messages in a browser that can be sent to the client as a "conditional event". OpenPCS 7 Function Manual, 05/2012, A5E02780178-02...
  • Page 69: Example 2: Messages Are Assigned To An Area

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) 6.5.9.3 Example 2: Messages are assigned to an area Introduction A PCS 7project is generally divided into several system areas and diagnostic areas. This means that messages are assigned to the areas. The areas are shown as a hierarchy level in OPC A&E for hierarchical mapping.
  • Page 70 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) Example with diagnostic areas: OpenPCS 7 Function Manual, 05/2012, A5E02780178-02...
  • Page 71: Example 3: Messages Of An Area Are Assigned To An Alarm Hiding Group

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) 6.5.9.4 Example 3: Messages of an area are assigned to an alarm hiding group Introduction In the PCS 7project, alarm hiding groups are used to automatically hide messages. An alarm hiding group can contain messages from several areas.
  • Page 72 OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) Requirement ● Alarm hiding groups are configured in the OS project. Access to the messages via the OPC A&E interface The messages of an area are only shown in the alarm hiding group. The messages are no longer visible in the area.
  • Page 73: Upgrading With Opc A&E

    OpenPCS 7 interface 6.5 OPC Alarms and Events (OPC A&E) 6.5.10 Upgrading with OPC A&E 6.5.10.1 Updating PCS 7 projects with OPC A&E As of PCS 7 V7.0 SP1, OPC A&E has been expanded to include hierarchical access to the message system.
  • Page 74: Opc Historical Alarms And Events (Opc "H" A&E)

    OpenPCS 7 interface 6.6 OPC Historical Alarms and Events (OPC "H" A&E) Retain OPC A&E without hierarchical access If you want to work with the OPC A&E server without hierarchical access, follow these steps: 1. Insert the following lines into the "CCAeProvider.ini" file in the "OPC/AlarmEvent" subdirectory of the OS project folder on the ES: [OpcMapping] OpcSource =...
  • Page 75: Introduction To Opc "H" A&E

    After outputting the archived messages, all additional newly generated messages are automatically sent to the OPC A&E client. Note Reading archived messages using OPC "H" A&E is a Siemens expansion of the OPC A&E standard. Rule After reading archived messages, you must not use the returned "ActiveTime" of a message either for acknowledging the message or for tracking the transitions of the message.
  • Page 76: Syntax For Access To Archived Messages

    OpenPCS 7 interface 6.6 OPC Historical Alarms and Events (OPC "H" A&E) Source filter and request for archived messages To be able to request the archived messages, the OPC A&E client must support the "SetFilter" functionality for a subscription. If you add the additional keyword "OPCHAEServer" in the array of the "Source Filter"...
  • Page 77 OpenPCS 7 interface 6.6 OPC Historical Alarms and Events (OPC "H" A&E) Example The following table lists the parameters and their meaning and shows suitable examples. Parameter Meaning Example Requireme hMode = Outputs archived messages and Setting a filter to read archived read events of a defined period in the past messages over the last 30...
  • Page 78: Read Modes For Archived Messages

    OpenPCS 7 interface 6.6 OPC Historical Alarms and Events (OPC "H" A&E) Note The following notation is supported for the "htStartTime" and "htEndTime" parameters: ● Relative notations, for example NOW ● Symbolic values, for example NOW, YEAR, MONTH ● Absolute UTC date/time specified according to XML notation: "2011-09-10T10:00:00.000C".
  • Page 79: Identifying Archived Messages

    OpenPCS 7 interface 6.6 OPC Historical Alarms and Events (OPC "H" A&E) The following distinction is made based on the refresh ID: ● Event packages with the refresh ID contain only historical events. These events can also still be pending. ●...
  • Page 80: Ole Db

    OpenPCS 7 interface 6.7 OLE DB Name EventType EventType (archived message) OPC_SIMPLE_EVENT 0x01 0x81 OPC_CONDITION_EVENT 0x04 0x84 OPC_TRACKING_EVENT 0x02 0x82 OPC_HAE_HISTORICAL_EVENTFLAG 0x80 Example 1 The archived messages and events of the last 30 minutes are output in "read" mode using the following source filter.
  • Page 81: Basics Of Ole Db

    OpenPCS 7 interface 6.7 OLE DB ● Representation of the message archives ● Querying the message archive 6.7.2 Basics of OLE DB Introduction You can access process value and message archives using the OLE DB interface made available by the PCS 7 OS and the corresponding database provider. OLE DB OLE DB is an open standard for fast access to different databases.
  • Page 82: Establishing The Connection To The Database

    OpenPCS 7 interface 6.7 OLE DB The administrator of the databases can take suitable measures to protect the databases from unauthorized access via Microsoft OLE DB. Note With Microsoft OLE DB, only access to WinCC user archives has been tested and released, but not access to message and process value archives.
  • Page 83: Access To The Ole Db Provider

    OpenPCS 7 interface 6.7 OLE DB Parameter Description Provider Name of the OLE DB provider: e.g. WinCCOLEDBProvider Catalog The "CC_ExternalBrowsing" database can also be used. Note For transparent access, enter the name of the PCS 7 OS project for "Catalog", for example: "Catalog=WinCC_Project_Name".
  • Page 84 OpenPCS 7 interface 6.7 OLE DB Access with the WinCC OLE DB provider With WinCC OLE DB, you can access all PCS 7 OS archive data. Depending on the configuration, process data of the PCS 7 OS is stored in compressed form. The WinCC OLE DB provider allows transparent access to this data.
  • Page 85: Querying Archive Data

    OpenPCS 7 interface 6.7 OLE DB 3. Establish the connection to the database, for example, by using MS Excel or your own application. Specify the required selection criteria and read the archive data. 4. For example, you can display the results of the query in MS Excel or export it as a CSV file. 6.7.5 Querying archive data 6.7.5.1...
  • Page 86 OpenPCS 7 interface 6.7 OLE DB Table 6-1 Parameter Parameter Description ValueID ValueID from the database table. Can be named more than once, for example: "TAG:R,(ValueID_1;ValueID_2;ValueID_x),<TimeBegin>,<TimeEnd>" ValueName ValueName in the format 'ArchiveName\Value_Name'. The <ValueName> parameter must be enclosed in single quotes. Multiple naming is possible, for example: "TAG:R,('ValueName_1';'ValueName_2';'ValueName_x'), <TimeBegin>,<TimeEnd>"...
  • Page 87 OpenPCS 7 interface 6.7 OLE DB Parameter Description SQL_Clause Filter criterion in SQL syntax: [WHERE search_condition] [ORDER BY {order_expression [ASC|DESC] } ] The criterion "ORDER BY" can only be used with a specified sort order "{order_expression [ASC|DESC] }" . TimeStep Values in the specified time interval are grouped together beginning at the start time <TimeBegin>.
  • Page 88 OpenPCS 7 interface 6.7 OLE DB Selecting an absolute time period Read from start time <TimeBegin> to end time <TimeEnd>. Example 1: Reads the values of ValueID 1 from start time 9:03 a.m. to end time 9:10 a.m. "TAG:R,1,'2004-07-09 09:03:00.000','2004-07-09 09:10:00.000'" Selecting a relative time period Reading from the start of the recording: <TimeBegin>...
  • Page 89: Representation Of The Message Archives

    OpenPCS 7 interface 6.7 OLE DB Example 5: Reads the values of the last hour for several ValueIDs (1;3;5;6) , starting at the time of the last archived value. "TAG:R,(1;3;5;6),'0000-00-00 01:00:00.000', '0000-00-0000:00:00.000'" Multiple return values for one query by filtering the tag value Example 6: The following query also uses the <SQL_Clause>...
  • Page 90 OpenPCS 7 interface 6.7 OLE DB the WinCC Information System in "Working with WinCC > ANSI-C Function Descriptions > Appendix > Structure Definitions > MSG_RTDATA_STRUCT Structure Definition". Position Field name Type Comment MsgNo Integer 4 bytes Message number State Small integer 2 Message status Byte DateTime...
  • Page 91: Querying The Message Archive

    OpenPCS 7 interface 6.7 OLE DB Position Field name Type Comment AP_name VarChar(255) Loop in Alarm function name AP_PAR VarChar(255) Loop in Alarm screen InfoText VarChar(255) Info text TxtCame VarChar(255) Text came in TxtWent VarChar(255) Text went out TxtCameNWent VarChar(255) Text came in and went out TxtAck VarChar(255)
  • Page 92 OpenPCS 7 interface 6.7 OLE DB Parameter Description ViewName Name of the database table. The table must be specified in the required language. The "ViewName" for the five European languages is, for example: ALGVIEWDEU: German message archive data ALGVIEWENU: English message archive data ALGVIEWESP: Spanish message archive data ALGVIEWFRA: French message archive data ALGVIEWITA: Italian message archive data...
  • Page 93: Appendix

    Appendix Commissioning List of checkable points when commissioning the OpenPCS 7 station The following list contains the points that can be checked when you are setting up a connection from the OPC client to the OpenPCS 7 station. 1. Check that all necessary OpenPCS 7 licenses are available and valid. 2.
  • Page 95: Lists And Folders

    Lists and folders List of sources Sources [1] OPC Foundation, Data Access Custom Interface Specification 3.0 [2] OPC Foundation, Data Access Automation Interface Standard 2.02 [3] OPC Foundation, Alarms and Events Custom Interface Standard 1.10 [4] OPC Foundation, Alarm & Events Automation Interface Standard 1.01 [5] OPC Foundation, Historical Data Access Specification 1.20 [6] OPC Foundation, Historical Data Access Automation Interface Standard 1.0 [7] WinCC V6.2 SP2, OPC - OLE for Process Control...
  • Page 96 Lists and folders B.2 List of abbreviations/acronyms Abbreviation/ Description acronym Object Linking and Embedding OLE DB Object Linking and Embedding for Data Base previously: OLE for Process Control, now: Openess, Productivity and Collaboration Operating System Personal Computer PCS 7 Process Control System 7 Remote Procedure Call Sequential Function Chart Service pack...

This manual is also suitable for:

Simatic openpcs 7

Table of Contents