pc based automation - pudn.comread.pudn.com/.../dokumentation_e/3_manual_protool_e.doc · web...

23
Demo: ProTool/Pro as OPC-Client ProTool/Pro as OPC-Client Topic: Demo: ProTool/Pro as OPC-Client Author: Ralf Eden Issued: 09.01.02 File name: document.doc document.doc 09.01.02 Page: 1 / 23 Copyright (C) Siemens AG 2001 All Rights Reserved.

Upload: lythuan

Post on 28-Mar-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

ProTool/Pro as OPC-Client

Topic: Demo: ProTool/Pro as OPC-Client

Author: Ralf Eden

Issued: 09.01.02

File name: document.doc

document.doc 09.01.02 Page: 1 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 2: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

PC based Automation

Contents

1 ProTool/Pro as OPC-Client....................................................................................3

2 Setup, Software Requirements..............................................................................3

3 Starting and Operating ProTool/Pro Runtime........................................................33.1 Starting ProTool/Pro Runtime.............................................................................33.2 Process Operation with ProTool/Pro...................................................................5

4 Settings and Configuration of the ProTool project.................................................64.1 Settings for ProTool/Pro CS................................................................................64.2 Sample Configuration.......................................................................................10

4.2.1 Creating a variable in ProTool/Pro CS...............................................................104.2.2 Creating a symbolic variable..............................................................................124.2.3 Creating the Runtime HMI.................................................................................13

4.3 Start and Close.................................................................................................164.3.1 Starting ProTool/Pro Runtime............................................................................164.3.2 Exiting ProTool/Pro Runtime.............................................................................16

document.doc 09.01.02 Page: 2 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 3: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

1 ProTool/Pro as OPC-Client This document describes the procedures for starting, operating and configuring ProTool/Pro OPC Client. The objective of the exercise described in this document is creating a ProTool/Pro project as OPC client, and operating the mixing process visualised with ProTool/Pro.

2 Setup, Software RequirementsTable 1: Components

No Component

1 PC with Pentium II or higher, with 128MB, WinNT 4.0 SP6 or Win2000

2 Step7 V5.13 WinAC Basis V3.0 SP1

4 SIMATIC Computing V3.0 SP1 (contains WinAC-OPC-Server)5 ProTool/Pro RT V5.2 SP2

3 Starting and Operating ProTool/Pro RuntimeStarting ProTool/Pro Runtime as well as operating the mixed processor via the ProTool user interface is described in the sections below.

3.1 Starting ProTool/Pro Runtime

ProTool/Pro OPC-Client is started as follows: Start Simatic > ProTool Pro RT V5.2 + SP2 > ProTool Pro RT in the Start menu.

If no configuration file is specified in ProTool/Pro Runtime, the following window appears (Figure 1).

Figure 1: Error message SIMATIC ProTool /Pro RT

document.doc 09.01.02 Page: 3 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 4: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

The message window must be acknowledged with Ja [Yes]. The dialog Öffnen einer Projektierungsdatei [Opening a configuration file] opens. In this dialog, the corresponding ProTool/Pro configuration file PRO.fwd of the directory TDOP must be opened in the STEP7 project. The configuration file is available in the directory:

\PCbADemoOPC\Programme\Step7_ProTool\Source\DemoCD\TDOP

Figure 2: Öffnen einer Projektierungsdatei [Opening a configuration file] dialog

After opening the configuration file, ProTool/Pro OPC-Client is started and the following user interface appears (Figure 3). The connection to WinAC OPC Server is only established when WinAC has been started on the PC.

Now the process can be started via the Start Process button. All further buttons and elements are described in the following section.

document.doc 09.01.02 Page: 4 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 5: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

3.2 Process Operation with ProTool/Pro

Figure 3 shows the user interface of the visualisation with ProTool/Pro.

Figure 3: ProTool/Pro user interface

Description of ProTool/Pro RT buttons and elements: The process is started via the Start Process button.

The current values for Temperature and Niveau [Level] are automatically updated in the Niveau [Level] and Temperature output field. Data entry into the output field of Temperature and Niveau [Level] is not possible.

The current binary states for Mixer, Cooler, Heater, Inlet_Valve_1, Inlet_Valve_2 and Outlet_Valve are visualised by the change of colour of the respective elements.

Entering a setpoint value for Temperature_Max, Temperature_Out, Niveau_1 and Niveau_2 is possible via the ProTool/Pro-user interface.

document.doc 09.01.02 Page: 5 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 6: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

Table 3-2 shows the exact assignment of the ProTool variables to the process variables.

Table 3-2: Designation of ProTool variables

DB in Step7 ProTool Variable Process Variable Variable Type

DB1.DBW0 Act_Temp Temperature Word

DB1.DBW2 Act_Niveau Niveau [Level] Word

DB1.DBX4.0 Act_InValve1 Inlet_Valve_1 bool

DB1.DBX4.1 Act_InValve2 Inlet_Valve_2 bool

DB1.DBX4.2 Act_OutValve Outlet_Valve bool

DB1.DBX4.3 Act_Heater Heater bool

DB1.DBX4.4 Act_ Cooler Cooler bool

DB1.DBX4.5 Act_ Mixer Mixer bool

DB2.DBW2 Rat_Temp_Max Temperature_Max

Word

DB2.DBW4 Rat_Temp_Out Temperature_Out Word

DB2.DBW6 Rat_Niveau_1 Niveau_1 Word

DB2.DBW8 Rat_Niveau_2 Niveau_2 Word

DB3.DBX0.0 Start_Auto Start_Automatic Bool

4 Settings and Configuration of the ProTool project

4.1 Settings for ProTool/Pro CS

To make full use of the OPC functionality in a ProTool/Pro project, a project must be created with the subsequent settings:

First open the SIMATIC Manager via Start > Simatic > SIMATIC Manager. Open the Step7 project DemoCD via Datei/Öffnen [File/Open] in the Simatic Manager. The Step7 project is filed in the directory:

\PCbADemoOPC\Programme\Step7_ProTool\Source

document.doc 09.01.02 Page: 6 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 7: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

The ProTool/Pro object is created in the existing Step7 project. This is performed by clicking on the menu Neues Objekt einfügen > SIMATIC OP [Insert object > SIMATIC OP] (Figure ) with the right mouse button. A suitable object name can then be assigned in the SIMATIC Manager (Figure 5 ) (here: ProTool_Test).

Figure 4: Neues SIMATIC OP Objekt einfügen [Insert new SIMATIC OP object]

Figure 5: ProTool/Pro Objekt im SIMATIC Manager [ProTool/Pro object in the SIMATIC Manager]

Double-clicking ProTool_Test opens ProTool/Pro CS with the dialog Projekt Assistent – Zielgeräteauswahl [Project Assistant - Select destination device] (Figure 6). The destination device and the resolution for later output must be specified in the dialog Projekt Assistent – Zielgeräteauswahl [Project Assistant – Select destination

document.doc 09.01.02 Page: 7 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 8: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Clientdevice]. In Windowsbasierte Systeme [Windows based systems] you select the entry PC and a resolution of 1024 x 768.

Figure 6: Projekt-Assistent- Zielgeräteauswahl [Project-Assistant- Select destination device]

Clicking the Weiter > [Continue>] button opens the next dialog Projekt-Assistent Steuerungsauswahl [Project Assistant – Controller Selection] (Figure 7).

Figure 7: Dialog Projekt-Assistent – Steuerungsauswahl [Project Assistant – Controller Selection]

In the dialog controller selection you enter the controller name, here WinAC and select OPC V5.2 as a protocol for the communication via OPC.

document.doc 09.01.02 Page: 8 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 9: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

In order to select the OPC server to connect with ProTool, click the Parameter button. The dialog OPC Verbindung [OPC connection] in Figure 8 opens.

Figure 8: Dialog OPC-Verbindung [OPC connection]

Selecting the OPC server:

In the dialog OPC-Verbindung [OPC connection] you select OPCServer.WinAC as OPC Server Name and confirm your entry with OK.

The selection of the computer on which the server has been installed remains empty, as the DemoCD example may only use the local WinAC OPC server.

The variable values must be read from the Zwischenspeicher [Cache] of the OPC server and not from the Koppelpartner [Peer]. This parameter specifies whether the variable values of the OPC server are to be read directly from the peripheral device or from its cache. The setting Zwischenspeicher [Cache] is recommended, as this enables quicker updating times for the variable values. For WinAC on the same PC this parameter is without significance.

In the new project the OPC connection (WinAC) then appears under the item Steuerungen [Controllers]. Further controllers can be added on demand, by clicking Steuerungen [Controllers] with the right mouse-button and selecting Steuerungen hinzufügen [Add Controllers] (Figure 9).

document.doc 09.01.02 Page: 9 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 10: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

Figure 9: Project – ProTool_Test

Caution:

Only controllers of the same type can be used (here type OPC V5.2). ProTool/Pro cannot provide variables simultaneously via the OPC channel as well as a further channel e.g. via S7 300/400 Profibus.

4.2 Sample Configuration

A sample configuration procedure for an output field for displaying a process value with ProTool/Pro CS is described below.

4.2.1 Creating a variable in ProTool/Pro CS

First, a variable must be inserted. To do this you click on Variablen [Variables] with the right mouse button and select Variable einfügen [Insert variable] (Figure ).

document.doc 09.01.02 Page: 10 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 11: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

Figure 10: Variable einfügen [Insert variable]

In the opened Variable dialog you select a ProTool variable in the Name input field of the Allgemein [General] tab (here Act_Niveau). Under Item Name you enter the absolute address of the variable in the OPC Server address space, e.g. DB1.DBW2:WORD, or the item ID according to the Syntax of the respective OPC server, or the symbolic name of an item known to the server. WinAC must be selected in the Steuerung [Controller] input field and in the Typ [Type] input field the data type WORD must be selected for this variable. Confirm with OK. The new variable now appears under Variablen [Variables].

Figure 11: Dialog Variable

document.doc 09.01.02 Page: 11 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 12: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

From Version 5.2 Service Pack 2 on, ProTool/Pro also offers a browser for selecting the desired variable. It can be accessed via the Browse button in the Variable dialog. A prerequisite however is the use of symbolic variable names in the address space of the OPC server. If browsing the address space is not supported by the OPC server, then the following message (Figure ) appears when pressing the Browse button.

Figure 12: Message “This OPC Server does not support the browser interface!”

Caution:The selected data type and the number of elements must later in Runtime correspond to or be convertible with the display mode of the selected display element. Otherwise a corrupt display of the variable values results in the ProTool/Pro interface as ProTool does not perform a data type check.

4.2.2 Creating a symbolic variable

From WinAC V3.0 SP1 on, the browser interface is also supported by the WinAC-OPC server. The prerequisite however is, that prior to that a symbol file has been created with the TagFile server (see document „WinAC OPC Configuration“)

In this case operating the Browse button does not prompt the above error message but the select box of the OPC server OPCServer.WinAC (Figure 13). Double-clicking the corresponding entry includes it as a variable in ProTool/Pro. However, each variable must be selected and acknowledged individually.

document.doc 09.01.02 Page: 12 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 13: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

Figure 13: Select box of the OPC server

4.2.3 Creating the Runtime HMI

Creating the Runtime user interface:

For visualisation an image must now be created which displays the variable value output.

For this you select Bilder [Images] with the right mouse button and select Bild einfügen [Inserting Images] (Figure 14). The editing window opens.

document.doc 09.01.02 Page: 13 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 14: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

Figure 14: Bild einfügen [Inserting an image ]

An output value for the Niveau [Level] variable value is inserted in an image as follows. To do so click on the Ausgabefeld [Output field] button in the tool bar and place the field on the editing window, which opens the Ausgabefeld [Output field] dialog (Figure 15).

The field length must first be changed to 3, as only values from 0-100% are to be displayed. Character font and colour of the output field can also be adjusted.

Caution:The display type must fit the data type of the variable, i.e. be convertible to it. The length of the display box should fit the size of the variable.

Figure 15: Dialog Ausgabefeld [Output field]

document.doc 09.01.02 Page: 14 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 15: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-ClientThe variable Act_Niveau (Variable with WinAC controller access via OPC Server) in the Wert [Value] input field is specified directly. Operating the Übernehmen [Acknowledge] button accepts the settings and the dialog may be closed with OK.

Figure 16: Ausgabefeld [Output field] configuration

The Ausgabefeld [Output field] configuration has now been completed and ProTool/Pro Runtime can be started. This is described in the next section. All configuration steps are to be performed as described in the above sample project.

4.3 Start and Close

Starting ProTool/Pro Runtime from ProTool/Pro Cs is described in the sections below.

4.3.1 Starting ProTool/Pro Runtime

For simply exiting ProTool/Pro Runtime via the Schließen [Close] button, the setting Anzeige Vollbild [Display full screen] should be deactivated in ProTool/Pro CS via the menu Zielsystem > Einstellungen [Destination system > Settings].

document.doc 09.01.02 Page: 15 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.

Page 16: PC based Automation - pudn.comread.pudn.com/.../Dokumentation_e/3_Manual_ProTool_e.doc · Web viewProTool/Pro cannot provide variables simultaneously via the OPC channel as well as

Demo: ProTool/Pro as OPC-Client

Figure 17: Destination system settings

By clicking the button, ProTool/Pro RT can now be started from ProTool/Pro CS. WinLC should prior be started and be in the run mode. The WinAC OPC server is now automatically started (control via the Task Manager). Furthermore, the ProTool/Pro project is automatically generated and checked for errors. The variable value in the output field is now transferred from the OPC server of WinAC.

4.3.2 Exiting ProTool/Pro Runtime

ProTool/Pro Runtime can be exited via the Schließen [Close] button or via Alt+F4.

document.doc 09.01.02 Page: 16 / 16

Copyright (C) Siemens AG 2001 All Rights Reserved.