background image

OpenPCS 7 interface

6

6.1

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 

from

Access 

via OPC

Data type

Type of access

OS server

DA

Tags in process mode

Reading / writing

OS server

HDA

Archive tags in the measured value archive 

(TagLogging)

Read

OS server

A&E

Alarms and messages

Read/

acknowledge 

OS server

"H" A&E

Alarms and messages from the message archive Read

Central archive 

server

"H" A&E

Alarms and messages from the message archive Read

Central archive 

server

HDA

Archive tags in the measured value archive 

(TagLogging)

Read

6.2

Data transmission

Type of data transfer of OPC DA, OPC HDA and OPC A&E 

This section explains the various types of data transfer. 

Event-driven data transfer

With event-driven data transfer, the OPC registers the required data for updating on the OPC 

server. The OPC server sends the tags to the OPC client when they change. 

Asynchronous data transfer

When using asynchronous data transfer, the called method is not completely processed on 

the OPC server before the OPC client receives data from the OPC server. The OPC server 

returns the results of the asynchronous operations using events. In this way, it is possible for 

the OPC server to supply data to the OPC client automatically if the data has changed.

OpenPCS 7

Function Manual, 05/2012, A5E02780178-02

45

Summary of Contents for SIMATIC OpenPCS 7

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

Page 2: ...nt documentation in particular its warning notices and safety instructions Qualified personnel are those who based on their training and experience are capable of identifying risks and avoiding potential hazards when working with these products systems Proper use of Siemens products Note the following WARNING Siemens products may only be used for the applications described in the catalog and in th...

Page 3: ...ing an OPC client 25 4 4 Loading the OpenPCS 7 station 26 4 5 Configuration support with the PCS 7 project wizard 27 5 System configurations 31 5 1 General configuration 31 5 2 OpenPCS 7 without OS 33 5 3 OpenPCS 7 combined with an OS 34 5 3 1 OpenPCS 7 combined with an OS client 34 5 3 2 OpenPCS 7 combined with an OS server or CAS 35 5 3 3 OpenPCS 7 combined with an OS single station 36 5 4 OpenP...

Page 4: ...butes of the PCS 7 OS message system 60 6 5 7 Acknowledgment concept 61 6 5 8 Quality codes for OPC A E 64 6 5 9 OPC A E with hierarchical access 64 6 5 9 1 Differences between OPC A E and OPC A E with hierarchical access 64 6 5 9 2 Example 1 Messages are not assigned to any area 66 6 5 9 3 Example 2 Messages are assigned to an area 69 6 5 9 4 Example 3 Messages of an area are assigned to an alarm...

Page 5: ...tation of the message archives 89 6 7 5 4 Querying the message archive 91 A Appendix 93 A 1 Commissioning 93 B Lists and folders 95 B 1 List of sources 95 B 2 List of abbreviations acronyms 95 Table of contents OpenPCS 7 Function Manual 05 2012 A5E02780178 02 5 ...

Page 6: ......

Page 7: ...ering to understand this manual Because OpenPCS 7 is based on the PCS 7 process control system you should also be familiar with the operation of PCS 7 Basic knowledge of the general use of the PC programming device and of the use of the Windows operating system is required If you want to develop an OPC client application you will also need to be able to work with Microsoft Visual Basic or Microsof...

Page 8: ...als for SIMATIC PCS 7 The complete system documentation The separate setup program for PCS 7 documentation and the PCS 7 help system for download After the installation of the setup program you will find the documentation at the following locations on the Engineering Station As online help CHM file for the SIMATIC Manager application As a PDF file in the Windows Start menu with the SIMATIC documen...

Page 9: ...nfiguration the OpenPCS 7 station can provide data from various OS servers and from the central archive server The OpenPCS 7 station hides the distribution of the data in terms of Time period OS1 OS2 CAS Process Historian 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 ...

Page 10: ...or Process Control OPC is a standardized vendor independent software interface that allows data to be exchanged between hardware and software One system can provide another system with process data via OPC OLE OLE means Object Linking and Embedding the technology for embedding objects in documents COM COM means Component Object Model and is necessary for the use of OPC COM is a central component o...

Page 11: ...amic link library Users can link the functionalities of a DLL into their own applications If you want to program an OPCclient with VB make sure that the relevant automation interface DLL is selected in the VB Editor in Project References Collection Collections are objects that support count and item properties A collection consists of a certain number of items An item can be collection specific an...

Page 12: ...tandard Data Access Automation Interface Standard Historical Data Access Specification Standard Historical Data Access Automation Interface Standard Alarms and Events Custom Interface Standard Alarm Events Automation Interface Standard 2 4 Components of OpenPCS 7 Overview OpenPCS 7 provides the following components OPC DA Data Access server OPC HDA Historical Data Access server OPC A E Alarms Even...

Page 13: ... 20 As an OPC HDA server the OpenPCS 7 station provides other applications with historical data from the OS archive system The OPC client for example a reporting tool can specifically request the data required by specifying the start and end of a period Various aggregate functions such as variance mean value or integral allow preprocessing by the OPC HDA server and contribute to a reduction in the...

Page 14: ...CC OLE DB Provider allows access to the process value and message archives Compressed process value archives are made available uncompressed OLE DB is used to read the PCS 7 OS or archive server database remotely OLE DB is an open standard for fast access to different databases The connection between the OLE DB level and the database is established by a database provider The WinCC OLE DB provider ...

Page 15: ...roxy object These objects communicate via RPC and a stub object with the OPC server object on a different computer Remote Procedure Call RPC is a technique used for communication between different processes The processes typically run on different computers RFDO 2EMHFW 3UR 5HPRWH 2EMHFW 3UR 20 5HPRWH 2EMHFW 5HPRWH 6HUYHU 20 53 53 URVV QHWZRUN ZLWK WUXH 53 QWHUSURFHVV RPPXQLFDWLRQ OLHQW SSOLFDWLRQ ...

Page 16: ......

Page 17: ...t 10 100 1000 Mbps with RJ 45 connector Opt drive DVD ROM 3 2 Installing the OpenPCS 7 station OpenPCS 7 stations in different configurations Configuration Requirements for installation Intended use of the software Program packages for the installation OpenPCS 7 station without OS client Installation requirements for the SIMATIC PCS 7 Workstation with OS client configuration This serves as softwar...

Page 18: ...e OpenPCS 7 OS Client software package you will only receive the license for OpenPCS 7 The required licenses for OS clients must be obtained additionally and must be available on the computer at runtime Requirement Message queuing must be installed Procedure An example procedure for the standalone variant is explained below 1 Insert the SIMATIC Process Control System PCS 7 DVD in the DVD drive 2 R...

Page 19: ...tem PCS 7 PC Configuration and Authorization 3 3 Licensing of the OpenPCS 7 station General Two licenses are available for OpenPCS 7 The licenses for the OpenPCS 7 station are license keys that must be transferred directly to the machine on which the OpenPCS 7 station runs using the Automation License Manager A license is required for each OpenPCS 7 station Installation and licensing 3 3 Licensing...

Page 20: ...or expanding an existing OS client single station or CAS with OpenPCS 7 station functionality 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 Note OPC client server connections On a PC wi...

Page 21: ...S 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 Installation and licensing 3 4 Licensing the OS internal OPC server OpenPCS 7 Function Manual 05 2012 A5E02780178 02 21 ...

Page 22: ......

Page 23: ...u have created the OS servers and generated the server packages Procedure 1 Select the project into which you want to insert the OpenPCS 7 station in the component view of the SIMATIC Manager 2 Select the menu command Insert Station SIMATIC PC Station A new SIMATIC PC station is inserted into the selected project 3 Select the SIMATIC PC station select the menu command Edit Object Properties and en...

Page 24: ... configuration of the PC station you configure a SPOSA application and a WinCC application client Likewise you can configure a WinCC application CAS application or CAS application standby You specify the path to the target system of the OpenPCS 7 computer in the object properties of the SPOSA application You configure the path to the target OS computer in the object properties of the OS client app...

Page 25: ...e OPC client is on a non secure network So that communication between the OPC client and OpenPCS 7 station works correctly you need to configure the firewall and configure the DCOM settings on the PC on which the OPC client is being executed You will find the relevant settings in the documentation of the OPC client and the firewall Note The DCOM and firewall settings for the Windows operating syst...

Page 26: ... station via the terminal bus The protocol for the communication on the terminal bus is set to TCP IP The OpenPCS 7 station is configured in the PCS 7project 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 Procedure 1 Exp...

Page 27: ...ct with an OpenPCS 7 station We will only deal with the configuration steps on the ES that relate to the OpenPCS 7 station AS OS engineering and downloading of the project are not dealt with at this point Requirement You have an engineering station with at least a PCS 7 V8 0 installation Example 1 Open SIMATIC Manager 2 Start the PCS 7project wizard in the SIMATIC manager using the File New Projec...

Page 28: ...ton 5 Click the Preview button 6 Select the OpenPCS 7 option in the Which objects are you still using dialog 7 Click Continue 8 Enter a directory name in the Directory name box in the Where do you want to store the multiproject dialog PCS 7 Engineering 4 5 Configuration support with the PCS 7 project wizard OpenPCS 7 28 Function Manual 05 2012 A5E02780178 02 ...

Page 29: ... new PC station in your project 13 Enter the computer name in the object properties of the PC station 14 Open the hardware configuration and insert an OS application 15 Compile the OS 16 Open the context menu of the OpenPCS 7 station PCS 7 Engineering 4 5 Configuration support with the PCS 7 project wizard OpenPCS 7 Function Manual 05 2012 A5E02780178 02 29 ...

Page 30: ...tation 18 Following this you will need to complete the project with the AS and OS engineering and download the project PCS 7 Engineering 4 5 Configuration support with the PCS 7 project wizard OpenPCS 7 30 Function Manual 05 2012 A5E02780178 02 ...

Page 31: ... server SIMATIC BATCH and SIMATIC Route Control use blocks in the automation system These blocks have OS tags for operator control and monitoring at the OS level These OS tags are available via OPC DA SIMATIC BATCH and SIMATIC Route Control also use an OS server as a message server These messages are available via OPC A E The data of the central archive server CAS is made available to the OpenPCS ...

Page 32: ...System configurations 5 1 General configuration OpenPCS 7 32 Function Manual 05 2012 A5E02780178 02 ...

Page 33: ...te Control server Archive server S7 400 S7 400 S7 400 ET 200 ET 200 ET 200 OpenPCS 7 Station Construct redundant connections for OpenPCS 7 stations in PCS 7 No redundant OpenPCS 7 station is implemented in PCS 7 You can create redundancy of sorts by running several identical OpenPCS 7 stations This requires that your OPC client has the following functionality Determination of the OpenPCS 7 station...

Page 34: ... and OPC A E servers This configuration is intended for small plants Plant bus Terminal bus Fieldbus PCS 7 OS clients PCS 7 OS server BATCH server Route Control server Archive server OpenPCS 7 station PCS 7 OS client OPC client S7 400 S7 400 S7 400 ET 200 ET 200 ET 200 The OPC client can also run on a separate computer This configuration is intended for small to medium sized plants System configur...

Page 35: ...ET 200 ET 200 ET 200 5 3 2 OpenPCS 7 combined with an OS server or CAS OpenPCS 7 on a server PCS 7 supports the OpenPCS 7 station on the following servers OS server Central archive server CAS The preferred configuration for large PCS 7plants is a separate OpenPCS 7 station System configurations 5 3 OpenPCS 7 combined with an OS OpenPCS 7 Function Manual 05 2012 A5E02780178 02 35 ...

Page 36: ...on can also be operated on both servers Note If the OpenPCS 7 station is operated on both CAS machines the redundancy switchover of the OPC client must be implemented on the OPC client 5 3 3 OpenPCS 7 combined with an OS single station OpenPCS 7 on an OS single station PCS 7 supports an OpenPCS 7 station running on an OS single station This provides the data from one or more OS servers to OPC clie...

Page 37: ...CS 7 OS Client 2 OS multiple station system OS single station system Note An OS single station has no OS server package This means it cannot be assigned to an OpenPCS 7 station For this reason the data of an OS single station cannot be made available to an OPC client using OpenPCS 7 System configurations 5 3 OpenPCS 7 combined with an OS OpenPCS 7 Function Manual 05 2012 A5E02780178 02 37 ...

Page 38: ...S server PCS 7 OS client PCS 7 OS client This example configuration has been released for identical PCS 7 versions in the PCS 7projects A and B Note 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 sam...

Page 39: ...7 Project B PCS 7 Project A PCS 7 OS server OPC channel as OPC client PCS 7 OS server PCS 7 OS client PCS 7 OS server OPC coupling OpenPCS 7 station PCS 7 OS client Scalance S 612 S7 400 ET 200 S7 400 ET 200 Application 1 There are two PCS 7projects Project A and Project B in a plant network For technical reasons Project A needs to visualize data of Project B The OPC channel of the PCS 7 OS can be...

Page 40: ...uestion is no longer available on the OS server and then forwards the data to the OpenPCS 7 station If while reading messages on an operator station you wish to use OPC Alarms Events to gain additional access to messages for this OS that are stored in an archive on a CAS then you will need to carry out the following configuration steps 1 Assign the CAS to the OS server as well in the configuration...

Page 41: ...ept Plant configuration with firewall The following figure shows the schematic structure of a PCS 7plant with an OpenPCS 7 station and firewall The PCS 7security cell is separated from the demilitarized zone DMZ by a Microsoft ISA server firewall The OpenPCS 7 station is placed in the DMZ The DMZ is also System configurations 5 7 OpenPCS 7 security concept OpenPCS 7 Function Manual 05 2012 A5E0278...

Page 42: ... information You can learn about the PCS 7 security concepts in the Security ConceptPCS 7 manual Documentation Process Control System PCS 7 PC Configuration and Authorization 5 8 Settings in the Windows Firewall for Open PCS 7 Windows Firewall settings When the OpenPCS 7 station is outside the network subnet of the PCS 7 system settings need to be made in the Windows Firewall on all OS servers whi...

Page 43: ...S server Make sure that bi directional access is ensured between the OpenPCS 7 station and OS server Check the availability of both ends with the ping command Adjust the firewall settings if necessary 5 9 Users and passwords in a workgroup Users and passwords Users and passwords of logged on users must be created identically on the OpenPCS 7 station and on the OPC client Otherwise correct access b...

Page 44: ...e created identically Login Password Login Password S7 400 S7 400 ET 200 ET 200 OpenPCS 7 Station Terminal bus Plant bus Fieldbus OPC client Microsoft workgroup PCS 7 OS clients PCS 7 OS server System configurations 5 9 Users and passwords in a workgroup OpenPCS 7 44 Function Manual 05 2012 A5E02780178 02 ...

Page 45: ... measured value archive TagLogging Read 6 2 Data transmission Type of data transfer of OPC DA OPC HDA and OPC A E This section explains the various types of data transfer Event driven data transfer With event driven data transfer the OPC registers the required data for updating on the OPC server The OPC server sends the tags to the OPC client when they change Asynchronous data transfer When using ...

Page 46: ... data access interface is a vendor independent worldwide standard for reading writing and monitoring process data Communication is based on the Microsoft COM protocol This standard has gained acceptance both with users and manufacturers The user programs for example range from office applications to sophisticated HMI Human Machine Interface or SCADA Supervisory Control and Data Acquisition systems...

Page 47: ...ss data using process variables An OPC DA server manages the process variables and the various options for access to these variables The following types of access are possible Reading the value of one or more process variables tags Modifying the value of one or more process variables tags by writing a new value Monitoring the value of one more process variables tags Reporting value changes 6 3 3 H...

Page 48: ...ns Overview of supported functions Time format of the OPC HDA server Quality codes The following chapters show the data structure and the attributes aggregate functions and functions supported by the OPC HDA server This is not a detailed description but rather an overview Detailed information is available in the OPC Historical Data Access Specification of the OPC Foundation 6 4 2 How the OPC HDA s...

Page 49: ...DA server is structured The following table describes the data structure Element Description Raw Data The raw data is the data transferred from the PCS 7 OS archive system for a specified period This data has a time stamp and a quality Attribute Return additional quality characteristics of the raw data Attributes include data type information on archiving Additional information is available in the...

Page 50: ...CS 7 OS TagLogging 6 4 5 Overview of supported aggregate functions Supported aggregate functions The following table lists the aggregate functions supported by the OPC HDA server Additional information is available in the OPC Historical Data Access Specification 1 20 of the OPC Foundation Aggregate function Description OPCHDA_COUNT Obtains the number of raw data for the specified period OPCHDA_STA...

Page 51: ...f the raw data was bad The period is entered in seconds OPCHDA_PERCENTGOOD Obtains the portion during which the quality of the raw data was good as a percentage OPCHDA_PERCENTBAD Obtains the portion during which the quality of the raw data was bad as a percentage OPCHDA_WORSTQUALITY Obtains the worst quality of the raw data for the specified period 6 4 6 Overview of supported functions Introductio...

Page 52: ...ime UTC as the timebase The time corresponds to the Greenwich time zone central European standard time minus one hour Time format YYYY MM DD hh mm ss msmsms Parameter YYYY year MM month DD day hh hour mm minute ss second ms millisecond Example of an entry 2011 08 10 09 27 30 000 Specifying the point in time relative to the local time Here the point in time is specified relative to the local time o...

Page 53: ...deviation in minutes H deviation in hours D deviation in days W deviation in weeks MO deviation in months Y deviation in years Example DAY 1D previous day DAY 1D 7H30 previous day at 7 30 a m MO 1D 5H last day of the previous month at 5 00 a m NOW 1H15M 1 hour and 15 minutes ago YEAR 3MO April of this year OpenPCS 7 interface 6 4 OPC Historical Data Access OPC HDA OpenPCS 7 Function Manual 05 2012...

Page 54: ... BAD 0x00200000 OPCHDA_NODATA No raw data was found for the specified period BAD 0x00400000 OPCHDA_DATALOST Raw data was not completely archived during the selected period BAD Additional information is available in the OPC Historical Data Access Specification 1 20 of the OPC Foundation 6 4 9 Write access supported by the OPC HDA server Introduction The OPC HDA specification of the OPC Foundation a...

Page 55: ...1 01 specifications of the OPC Foundation 6 5 2 Introduction to OPC A E Functionality of the OPC A E server The OPC A E server is a DCOM application The OPC A E client will receive information on status changes of PCS 7 OS messages using subscriptions Using the subscription the OPC A E client can set a filter This filter specifies which messages and attributes will be displayed The OPC A E server ...

Page 56: ... message A change can for example be a change to a control parameter in the faceplate of the controller or the suppression of messages in the message system Note When filtering for all alarms of a plant section make sure that you replace the source with a wildcard in the filter text because the source is only generated in runtime for a tracking event For example the filter text for all events from...

Page 57: ...ng the PCS 7 OS the configuration messages exist in the PCS 7 OS message system These messages are mapped to the OPC A E standard by the OpenPCS 7 station implementation The OS configuration defines which event in the process triggers a message Mapping the OS message system on OPC A E with hierarchical access In PCS 7 the following standard settings in the OS message system are used for mapping me...

Page 58: ... the name of the message class S C T Message Displays the message text of the corresponding message number S C T Condition Displays the message type The message types Alarm Warning and Tolerance are combined and called Level in PCS 7 C Sub Condition Corresponds to the Condition parameter In PCS 7 this is identical to Condition in single state conditions The following subconditions are mapped for t...

Page 59: ... category is identified by a CategoryID and a category description The CategoryID is made up of the internal PCS 7 OS ID of the message class and message type The category description is made up of the name of the message class and message type The names of the message classes and message types can be obtained explicitly using the alarm attributes CLASSNAME and TYPENAME 6 5 5 Mapping priorities of...

Page 60: ...nowledgment Text01 Displays the content in the source Text02 Displays the content of the area Text03 Displays the content in the event Text04 Displays the batch name Text05 Displays the content of the operation message Text06 Displays the content of the text block free 1 Text07 Displays the content of the text block free 2 Text08 Displays the content of the text block free 3 Text09 Displays the co...

Page 61: ...wledgment concept Mapping the acknowledgment concept In the PCS 7 OS the acknowledgment concept is how a message is displayed and processed from came in to went out On the OPC A E server this message status is displayed in the ChangeMask and NewState parameters Condition related event simple event and tracking event Messages with acknowledgment are sent from the system to the client as condition r...

Page 62: ..._STATE Message went out without acknowledgment OPC_CONDITION_ENABLED OPC_CHANGE_ACTIVE_STATE Acknowledged messages message still pending OPC_CONDITION_ACTIVE OPC_CONDITION_ACKED OPC_CONDITION_ENABLED OPC_CHANGE_ACK_STATE Acknowledged messages message no longer pending OPC_CONDITION_ACKED OPC_CONDITION_ENABLED OPC_CHANGE_ACK_STATE Locked message OPC_CHANGE_ENABLED_STAT E Unlocked message OPC_CONDIT...

Page 63: ...nger pending OPC_CONDITION_ACKED OPC_CONDITION_ENABLED OPC_CHANGE_ACK_STATE Note Historical alarms and events are not acknowledged The OPC A E historical events interface has read access only The following table shows the mapping of the ChangeMask and New State parameters to the properties of the OPCEvent class of the OPCSiemensAlarmEventAutomation type library ChangeMask NewState Properties of th...

Page 64: ...n to the source is interrupted 6 5 9 OPC A E with hierarchical access 6 5 9 1 Differences between OPC A E and OPC A E with hierarchical access Representation of messages with OPC A E The OPC A E server supports conditional events and simple events during access to the message system With conditional events the message numbers are shown for each source Since an PCS 7 OS server can hold many more me...

Page 65: ... can be a system area a diagnostics area or an alarm hiding group If the source text block in WinCC is dynamic or not configured the character string EventID xx is used for the source in OPC instead of this text Here xx represents the unique WinCC message number This syntax is used for the source in the Area Browser and for the message itself A tracking event occurs when an operation message is tr...

Page 66: ...onversion can be undone again without any loss of data 6 5 9 2 Example 1 Messages are not assigned to any area Introduction Process control messages messages for Batch servers and Route Control servers are not assigned to an area or group For these messages no designated area is assigned in the structure of the OPC A E access OpenPCS 7 interface 6 5 OPC Alarms and Events OPC A E OpenPCS 7 66 Funct...

Page 67: ... 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 interface 6 5 OPC Alarms and Events OPC A E OpenPCS 7 Function Manual 05 2012 A5E02780178 02 67 ...

Page 68: ...signment The following picture shows the hierarchy of messages in a browser that can be sent to the client as a conditional event OpenPCS 7 interface 6 5 OPC Alarms and Events OPC A E OpenPCS 7 68 Function Manual 05 2012 A5E02780178 02 ...

Page 69: ...ing Requirement The PCS 7project contains areas or diagnostic areas Structure for access to messages via the OPC A E interface The general mapping to the OPC A E interface appears as follows Example of a hierarchy with an area The following pictures show the hierarchy of messages in a browser that can be sent to the client as a conditional event Example with areas OpenPCS 7 interface 6 5 OPC Alarm...

Page 70: ...Example with diagnostic areas OpenPCS 7 interface 6 5 OPC Alarms and Events OPC A E OpenPCS 7 70 Function Manual 05 2012 A5E02780178 02 ...

Page 71: ...CS 7project alarm hiding groups are used to automatically hide messages An alarm hiding group can contain messages from several areas This section describes how OPC A E accesses these messages OpenPCS 7 interface 6 5 OPC Alarms and Events OPC A E OpenPCS 7 Function Manual 05 2012 A5E02780178 02 71 ...

Page 72: ... messages are no longer visible in the area The general mapping to the OPC A E interface appears as follows Example of a hierarchy with an alarm hiding group The following picture shows the hierarchy of messages in a browser that can be sent to the client as a conditional event OpenPCS 7 interface 6 5 OPC Alarms and Events OPC A E OpenPCS 7 72 Function Manual 05 2012 A5E02780178 02 ...

Page 73: ...e available for updating a PCS 7 project with configured access via OPC A E to PCS 7 V8 0 OpenPCS 7 station Conversion to OPC A E with hierarchical access Retain OPC A E without hierarchical access Requirement The PCS 7version of the project to be updated is PCS 7 V6 1 SP2 or higher Preparation Before performing the update delete any CCAeProvider ini file on the OS server or on the ES directly in ...

Page 74: ...e local computer For OS projects in PCS 7 V6 1 SP2 note the following change in OPC A E The server prefix of the local computer is now LOCALMACHINE instead of localhost 6 6 OPC Historical Alarms and Events OPC H A E 6 6 1 Overview Overview You will find information about the following topics in the section below Introduction to OPC H A E Reading archived messages Syntax for access to archived mess...

Page 75: ... for tracking the transitions of the message The ActiveTime is not correct for archived messages To make sure this is recognized the OPC A E client must check the EventType of a message for the additional flag OPC_HAE_HISTORICAL_EVENTFLAG Note You will find information on the additional flag in Identifying archived messages 6 6 3 Reading archived messages Reading archived messages using OPC A E Ar...

Page 76: ...ource names has no effect After configuring the source filter you can call up the selected period from the OPC A E client with a Refresh call 6 6 4 Syntax for access to archived messages Syntax for access to archived messages OPCHAEServer hMode read advise htStartTime szTime htEndTime szTime bBounds TRUE FALSE Parameter hMode read advise This parameter specifies how the archived messages and event...

Page 77: ...st 30 minutes OPCHAEServer hMode advise htStartTime NOW 30M The subscription must be active for this purpose Yes htStartTime Specifies the time at which the messages and events are read from the archive htStartTime NOW 30M Yes htEndTime Specifies the time up to which messages and events are read from the archive if hMode read ist is set NOW is used as the default setting htEndTime 2011 09 10T10 00...

Page 78: ...m which alarms are read By setting the start and end time you can specify whether the oldest message is output first or last If the start time is lower than the end time the oldest message is output last If you want to use the read mode execute the following functions on the subscription 1 SetFilter 2 Refresh A SetFilter during the Refresh is discarded If you activate the subscription during Refre...

Page 79: ...ctive subscription the archived messages are transferred only after the subscription is activated If you want to use the advise read mode with an inactive subscription follow the steps below 1 SetFilter 2 Set the subscription to active with SetState If you deactivate the subscription the transfer is interrupted If you set the subscription to inactive the transfer is stopped A SetFilter is discarde...

Page 80: ...first The limit values of this time range will also be returned OPCHAEServer hMode read htStartTime 2006 09 01T12 00 00 000Z htEndTime 2006 09 01T10 00 00 000Z bBounds TRUE Example 3 The archived messages and events of the last 30 minutes are output in advise mode using the following source filter After reading all archived messages the newly generated messages are transferred as with an active su...

Page 81: ...archive data stored in the MS SQL server database Depending on the configuration process data of the PCS 7 OS is stored in compressed form The differences to Microsoft OLE DB provider are shown in the following table WinCC OLE DB provider Microsoft OLE DB Provider Transparent access to the process data of the PCS 7 OS possible Not supported Read data via multiple database segments possible Not sup...

Page 82: ...nnectivity Pack 6 7 3 Establishing the connection to the database ConnectionString The connection between the application which reads data via the OLE DB and the archive database is established via the Connection object with ActiveX Data Objects ADO One of the important parameters here is the ConnectionString The ConnectionString contains all information necessary for access to the database using ...

Page 83: ...D as the ID and not the ID of the archive tag Symbolic computer name Archive_Var_Name Example of a VBA application In the following example a connection object is generated and then the connection to the WinCCdatabase process value or message archive is opened Dim sPro As String Dim sDsn As String Dim sSer As String Dim sCon As String sPro Provider WinCCOLEDBProvider 1 Provider SDsn Catalog CC_OS_...

Page 84: ...in applications ADO DB can for example be used with Visual Basic or VBA Note Special characters in tag names In terms of the tag names remember that programming languages such as Visual Basic VBScript or VBA only permit the following characters in tag names A Z a z 0 9 and _ If you use special characters such as or in tag names in WinCC the script will abort with an error message In this case use ...

Page 85: ... for process value archives Field name Data type Comment ValueID Integer 4 bytes Unique identification of the value TimeStamp Datetime Time stamp RealValue Real 8 bytes Tag value Quality Integer 4 bytes Quality code of the value e g good or bad Flags Integer 4 bytes Internal control parameter 6 7 5 2 Querying process value archives Principle You can access a process value archive with the followin...

Page 86: ...nguages such as Visual Basic VBScript or VBA only permit the following characters in tag names A Z a z 0 9 and _ If you use special characters such as or in tag names in WinCC the script will abort with an error message In this case use the Tag ID to address a tag in the script if it has special characters in the name TimeBegin Start time in the format YYYY MM DD hh mm ss msc If you use TimeStep t...

Page 87: ...returned for every interval This is done with linear interpolation There is no extrapolation 257 FIRST_INTERPOLATED First value 258 LAST_INTERPOLATED Last value 259 MIN_INTERPOLATED Minimum value 260 MAX_INTERPOLATED Maximum value 261 AVG_INTERPOLATED Average 262 SUM_INTERPOLATED Sum 263 COUNT_INTERPOLATED Number of values Example With TIMESTEP 60 257 an interpolated value is returned for each 60 ...

Page 88: ...e database enter this in the following format 0000 00 DD hh mm ss msc If you specify a period in months the content may be incorrect since a month can have between 28 and 31 days Example 2 Reads starting from the absolute time of TimeBegin to the end of the recording in other words to the last archived value TimeBegin 2003 02 02 12 00 00 000 TimeEnd 0000 00 0000 00 00 000 Example 3 Reads 10 second...

Page 89: ...inutes at intervals of 60 seconds with aggregate function type 5 average value without interpolation TAG R 1 2004 10 13 17 00 00 000 0000 00 00 00 05 00 000 TIMESTEP 60 5 Example 8 The following query uses the TimeStep parameter and returns all values of theValueIDs 1 and 2 starting at TimeBegin until 2 minutes later at intervals of 15 seconds with aggregate function type 261 average value without...

Page 90: ...inuous message counter 33 TimeDiff Integer 4 bytes Time difference to the came in status 34 Classname VarChar 255 Name of the message class 35 Type name VarChar 255 Name of the message type 36 Class Small integer 2 Byte ID of the message class 37 Type Small integer 2 Byte ID of the message type 38 to 47 Text1 to Text10 VarChar 255 Message text 1 to 10 48 AG_NR Small integer 2 Byte Number of the PL...

Page 91: ...edgment type 68 Params Integer 4 bytes Parameter 6 7 5 4 Querying the message archive Principle Use the following query to access a message archive The data can be selected using filter criteria The query is transferred to the database with the command object Information on the status of messages is available in the WinCC Information System in Working with WinCC ANSI C Function Descriptions Append...

Page 92: ...ailable in the connected message archives in Views Here all languages and their identifications such as ALGVIEWENU are displayed that are supported in the particular archive Condition Filter criterion e g DateTime 2003 06 01 AND DateTime 2003 07 01 DateTime 2003 06 01 17 30 00 MsgNo 5 MsgNo in 4 5 State 2 With DateTime the time can only be specified in absolute format Example 1 Reads all entries o...

Page 93: ...tation 6 Check the installation of the OPC client Information on the correct installation of the OPC client must be supplied by the vendor of the OPC client 7 Check the Windows firewall settings The firewall settings are made during installation Enter the following OpenPCS 7 components in the Exceptions tab of the firewall SIMATIC PCS7 OPC AE Server SIMATIC PCS7 OPC DA Server and SIMATIC PCS7 OPC ...

Page 94: ......

Page 95: ...OLE for Process Control 8 WinCC V6 2 OPC Channel 9 WinCC V6 2 Connectivity Pack 10 SIMATIC NET Industrial Communication with PG PC Volume 1 Basics B 2 List of abbreviations acronyms List of abbreviations acronyms Abbreviation acronym Description APC Advanced Process Control AS Automation System CAL Client Access License CAS Central Archive System COM Component Object Model CPU Central Processor Un...

Page 96: ...Collaboration OS Operating System PC Personal Computer PCS 7 Process Control System 7 RPC Remote Procedure Call SFC Sequential Function Chart SP Service pack SPOSA Single Point of System Access SQL Structured Query Language WinCC Windows Control Center APC Advanced Process Control Lists and folders B 2 List of abbreviations acronyms OpenPCS 7 96 Function Manual 05 2012 A5E02780178 02 ...

Reviews: