Sunteți pe pagina 1din 20

BA 006S/04/en/07.00 Version 1.

Commuwin II FXS 113 Spawning Interface


Operating instructions

Endress + Hauser
The Power of Know How

Commuwin II Spawning Interface

Table of Contents

Table of Contents
1 2 3 4 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 Scope Start Modes System Configuration Realization General Contents of control file Dataflow during configuration and operation Path structure for control file and configuration file Retrieving information from the live list file (LLF) Retrieving information from C2.INI Special considerations for distributed system configurations Restrictions 3 4 5 6 6 6 9 9 10 13 14 14

Endress+Hauser

Table of Contents

Commuwin II Spawning Interface

Software History
Software version Manual edition Device and. Software changes software no.
2.07

Manual changes

07.00

____

The spawning interface operates with Commuwin II version 2.07 upwards

Endress+Hauser

Commuwin II Spawning Interface


1

Scope

Scope

Operating manual
This document is intended to provide the engineer with a detailed description of how to spawn Commuwin II from within another software application and to give hints on what is to be taken into consideration.

Function
In order to start Commuwin II from within another application, it has been extended such that it is able to process a number of initialisation parameters that configure its behaviour. All data necessary to start work with Commuwin II must be transferred via this interface. When Commuwin II is started without initialisation parameters, it behaves as normal.

Operating conditions
The following assumptions have been made regarding spawning:

Commuwin II is only to be invoked as described to operate devices within a ready configured installation, i.e. with a previously stored and stable bus configuration (live list). if the configuration changes, the live list must be re-generated. Commuwin II can be installed on a remote computer in, e.g. a client/server constellation.

As an additional feature, it is possible to place icons with predefined operation targets on the desktop.

Endress+Hauser

Start Modes
2

Commuwin II Spawning Interface

Start Modes

Commuwin II can be configured to start in three different modes: 1. 2. Fully automatic: Commuwin II offers either graphical or matrix operation with a preselected device or tag, automatically skipping all other dialogs before (live list etc.). Semi-automatic with full live list: Commuwin II offers a full live list with the device or tag preselected in the list box of the live list dialog by default. All associated tags are displayed. 3. Semi-automatic with reduced live list containing only the preselected device together with its associated tags. In all three modes:

Commuwin II is fully operable from the point of automatic entry as specified under items 1 to 3. The dialogs for service password (PASSWD_SPECIALIST=) and bus selection are skipped; thus a service password installed during setup is ignored. A write protection password (PASSWD_WRITEPROTECT=) is still active.

Figure 1 shows an example for Cases 2 and 3:

Case 2: all items appear (FEB 24, SIPART P52PA, FMR 230, 421101JD15935630, PROMASS) the SIPART PS2PA is preselected Case 3. the framed items appear (FMR 230 and its associated tags); PHY_20 is preselected for example.

Fig. 1 Live list showing Cases 2 and 3

BA006E01

Endress+Hauser

Commuwin II Spawning Interface


3

System Configurations

System Configurations

Figure 2 shows a possible system configuration where the Profibus boards are located in one computer. The two boards may also be replaced by a dual channel board. It should be noted that in general, the DDE server of Commuwin II uses Master Class II acyclic services, while the application that spawns Commuwin II uses Master Class I cyclic services

Profiboard/Proficard Master Class II Profibus interface Master Class I

segment coupler

PA

PA-link

PA

BA006E02

DP

Fig. 2

Cards located in one computer


The two interfaces to PROFIBUS network must not necessarily be located within one computer and e.g. the configuration in Fig. 3 is possible. In this case the invoking program will run on one computer and Commuwin II on the other. Further consequences for the second configuration (distributed configuration) are covered in Chapter 4.7.

computer network

BA006E03

DP-network

Fig. 3

Cards located in two different computers


Endress+Hauser 5

Realization
4 4.1

Commuwin II Spawning Interface

Realization
General

The invokation interface is constructed around a control file with INI file format. This control file contains two sections, one that allows the invoking program to enter parameters for Commuwin II and the other that allows Commuwin II to enter return parameters for the invoking program. The control file is specified within the command line. Commuwin II assumes, that this file is located in the root directory of a given Commuwin II installation (current working directory). Example for an invokation:

x:\programs\commuwin\c2.exe control file name.ini.


The file name control file name is not binding, it may be another file name according to the Commuwin 8.3" file name convention. The advantages of this approach are as follows:

It makes it possible for the invoking program to keep track of change in the control file. Under WIN NT a system resource may be allocated which notifies the invoking task automatically when Commuwin II has terminated and an error processing is requested. Commuwin II may use the control file to put return information there; the invoking program may read this for further handling.

4.2

Contents of control file

The file contents are as follows:

[ToCommuwin]
startmode= userrights= communication= lifelist= target= offset= display= auto|selective|full main|specialist type file name device tag apm|matrix

[FromCommuwin]
error= errortext= number text

Endress+Hauser

Commuwin II Spawning Interface


Explanation of terms
The terms in the left column of the above tables are fixed keywords: auto selective full main specialist type fully automatic mode selective live list full live list maintenance mode specialist mode

Realization

a number starting with 0 (zero) which represents the offset within the Commuwin II menu <connect>|<open connection> of a ready installed Commuwin II. This parameter has to be defined during commissioning phase. For details refer to Chapter 4.6

filename

filename specifies a file (life list file, LLF) within the directory selected by the parameter communication, e.g. for pacard it would be

x:\programs\commuwin\buscfg\pa-dpv1\; the file contains a previously


stored and actual live list of the bus under operation; the file has the standard extension cfg which is not specified in the parameter file name device the contents of the second square bracket within a G-line of a file specified under file name. For details refer to Chapter 4.5 tag a number

0 describing the offset from a G-line addressed by the parameter

device; thus 0 addresses the G-line itself, 1 addresses the first T-line. For details refer to Chapter 4.5 apm start display is APM (graphical interface) with the first available picture (only when startmode is auto) matrix number start display in matrix (only when startmode is auto) the error number Commuwin II returns on termination either on error or by user: 1 should be set by spawning application; if Commuwin II could not be started, the spawning application checks it; if Commuwin II has run, it always modifies this entry to 1 0 1 2 no error communication not applicable cannot invoke DDE server This means that 1. The server is not installed or 2. The server cannot be started or 3. Commuwin II cannot establish a logical link In all three cases the installation of Commuwin II should be checked 3 4 5 6 text file for live list not available device/profile not available APM not available syntax or semantic error in control file

is a detailed description about syntax or semantic errors in the control file in text form as detailed in the following table.

Endress+Hauser

Realization
Text format

Commuwin II Spawning Interface


Number Text
6 6 keyword startmode not found startmode error: <wrong text on the right side of the equal sign> keyword userrights not found userrights error: <wrong text on the right side of the equal sign> keyword communication not found communication error: <wrong number on the right side> communication error: CMainFrame::OnTimer: cannot load DDE server keyword lifelist not found lifelist error: not found <path specification> keyword target not found target error: target not in lifelist file keyword offset not found offset error: offset not in lifelist file keyword display not found display error: <wrong text on the right side of the equal sign>

Keyword
startmode

userrights

6 6

communication

6 1 2

lifelist

6 3

target

6 4

offset

6 4

display

6 5

Example of control file


[ToCommuwin] startmode=auto userrights=main communication=4 lifelist=test.cfg target=60 offset=12 display=apm [FromCommuwin] error=1 errortext=

Endress+Hauser

Commuwin II Spawning Interface


4.3 Dataflow during configuration and operation

Realization

During operation
[ToCommuwin] controlfile.ini [FromCommuwin]

Invoking program

spawning

Commuwin II

import

export

BA006E04

During configuration
thisbus.cfg

Fig. 4 Data flow

Figure 4 shows dataflow during the different phases of operation. During configuration Commuwin II is invoked by hand and from the live list dialog, the bus under operation is scanned. The completed live list is stored in a file, e.g.

thisbus.cfg. This file can be processed by the invoking

program and the information for spawning and visualization can be retrieved. Additionally, the offset of the communication variant within the Commuwin II menu <connect> | <open connection> is to be stored. During operation the invoking program supplies data for Commuwin II within the control file

controlfilename.ini

in section [ToCommuwin] and in turn Commuwin II supplies data for the

invoking program in the control file are retrieved previously from

controlfilename.ini in section [FromCommuwin]. These data thisbus.cfg during configuration.

4.4

Path structure for control file and configuration file


Psdev-bi01 Commuwin II Apm backup buscfg Hart Intensor Modem Pa-dvp1 Za672 Za673
Depending on the actual bus under operation, Commuwin II supplies within the file dialog box any path under the root

\Buscfg as a standard storage location for the thisbus.cfg, e.g. for PROFIBUS \Buscfg\Pa_dpv1.
The control file path

file

controlfilename.ini must be located in the \Commuwin II where C2.EXE itself is located. A path

may not be specified within the command line.

Endress+Hauser

Realization
4.5

Commuwin II Spawning Interface

Retrieving information from the live list file (LLF)

The contents of the LLF may help to configure the invoking program and to invoke Commuwin II with the appropriate target. The parameters concerned in the control file are target and offset, for details refer to Chapter 4.2. During configuration of the system, Commuwin II can be invoked to store a current live list, for example into

\buscfg\pa_dpv1\thisbus.cfg. The invoking program can read this file and retrieve

the necessary information by knowing the syntax and semantics of the file contents. The following syntax description is presented in Backus-Naur form. The line concatenating character _ is used as in VisualBasic. The semantics vary depending on bus type.

<device line>

G [ <device name> ]\t_ [ <bus address> ]\t_ [ <device topic> ]\t_ [ <manufacturer> ]\t_ [ (0-1){<software id>} ]\t_ [ (0-1){<pa gateway name>} ]

<tag line>

T [ <tag name> ]\t_ [ <tag topic> ]\t_ [ <block type> ]

<device name> <bus address>

the name of a device, e.g. CERABAR S the DDE-server supplies this address during bus scan; when scanning a PROFIBUS PA configuration, the address of the PA-gateway is coded inside

<device topic> <manufacturer> <software id> <pa gateway name> <tag name> <tag topic>

via this DDE-topic the DDE-server communicates with the device the name of a manufacturer, e.g. ENDRESS+HAUSER the software id (version) of a devices firmware the name of the PA-gateway, e.g. PAlink (e.g. SIEMENS) the tag name as stored within the device the DDE-server communicates with the device via this DDE-topic. Since these data are not unambiguous over all the various communication protocols, they are related to the associated device line and the address found there, and must be qualified with this information

<block type>

read from device in accordance with the PNO norm (R2.0B001P003C000"), translated via file DPV1_DEV.INI to readable form, e.g. DIOP20". The block type is shown in live list as a prefix to the tag name stored within the device

The information is stored within the LLF line by line, each line containing all data concerning its line type. Two line types are specified: a device line and a tag line.

A device line starts with character G in the first column. A tag line starts with character T in the first column.

A LLF always starts with a device line followed by tag lines. A tag line always belongs to the nearest device line above it. Every piece of data is enclosed in brackets because it could contain blanks.

10

Endress+Hauser

Commuwin II Spawning Interface


Example: Profibus-PA

Realization

The following is an example of a possible Profibus PA configuration. The table represents the list box within the live list dialog.

008-DELTABAR S PB: PHYS.BLOCK FA: MESS_1 033-PaLink / 113-DELTABAR S DIP20: HELLO PB: ANOTHER
The corresponding LLF looks like this. G T T G T T [DELTABAR [MESS_1] [DELTABAR [HELLO] [ANOTHER]

S]
[8-2]

[8] [8-1]

[8-0] [PB]

[Endress+Hauser]

[1.9]

[]

[PHYS.BLOCK]

[FA] [8689] [8689-0] [PB] [Endress+Hauser] [1.9] [PaLink] [DIP20]

S]

[8689-1]

[8689-2]

Example: ZA 672
A second example of a possible ZA672 configuration is shown below.

002-FMC 672Z TAG: TAG: 004-FMU 867 TAG: TAG:


The corresponding LLF looks like this. G T T G T T [FMC

GUTER TAG HELLO ANOTHER

672Z]

[2]

[FMC 672Z] [TAG]

[Endress+Hauser]

[6330]

[]

[GUTER] [TAG] [FMU

[FMC 672Z]

[FMC 672Z] [TAG] 867] [4] [FMU 867] [Endress+Hauser] [HELLO] [FMU 867] [TAG] [ANOTHER] [FMU 867] [TAG]

[6120]

[]

Example: HART
For HART it could look like this.

006-FEC12 UNIV: 008-FEB22 UNIV:


The corresponding LLF looks like this. G T G T [FEC12] [XYZ] [FEB22] [ABC] [6] [HART] [8] [HART] [FEC12] [UNIV] [FEB22] [UNIV]

XYZ ABC

[Endress+Hauser] [Endress+Hauser]

[6710] [6520]

[] []

Endress+Hauser

11

Realization
Starting with tag id

Commuwin II Spawning Interface

The unambiguous information within a process plant is the so called tag id. During the commissioning phase define all the tags within the engineering component. Later, when online, use Commuwin II to configure all the devices with these tags. The procedure for this is as follows: 1 2 Start Commuwin II and produce a live list and store it on disk Enter all tag ids into all devices and rescan the bus and store the result on the same file

All this can be done from live list dialog. There is no need to enter table or graphic operation. So far consistency has been achieved between the engineering component and Commuwin II with regard to the tag ids. During operation, proceed as follows (Do not try to interprete the contents of square brackets, just take them as they are): 1.
Full device operation:

Take the tag of the physical block and start to scan the LLF. Each time you encounter a G-line, store the contents of the second square bracket within an internal variable and reset an internal counter to zero. Proceeding, with each T-line, increment the internal counter and compare the contents of the first square bracket: has the expected tag id been transferred. If so, simply take the previously stored information from the G-line and take it for the target information within the control file. The offset information must be set to zero. 2.
Profile operation:

Proceed as described for full device operation. The only difference is, that the value of the internal counter is taken for the offset information within the control file. The following information can be retrieved from the file to in turn address a specific visualization in the spawned Commuwin II: 1. 2. 3. 4. 5. 6. 7. 8. 9. Target=8, Offset=0 Target=8, Offset=1 Target=8, Offset=2 Target=8689, Offset=0 Target=8689, Offset=1 Target=8689, Offset=2 Target=2, Offset=0 Target=2, Offset=1 Target=2, Offset=2 for full operation with DELTABAR S for profile operation with DELTABAR S (physical block) for profile operation with DELTABAR S (function block analog in) for full op. with DELTABAR S via PA-link for profile op. with DELTABAR S via PA-link (digital in) for profile op. with DELTABAR S via PA-link (physical block) for full operation with FMC 672Z for full operation with FMC 672Z because there is no profile for full operation with FMC 672Z because there is no profile for full operation with FEC12 for universal operation with FEC12

10. Target=6, Offset=0 11. Target=6, Offset=1

The following rules apply to specify a device operation in Commuwin II:

for target always take the unique address of a device from the G-line (contents of second square bracket) for offset take 0 if you want full operation or a number greater than 0 if you want profile operation (Profibus) or universal operation (HART): offset simply specifies the n T-line.

JD

Note!
There is no plausibility check whether a specified offset points to a valid T-line within the correct context of a G-line or not! This question has to be answered during commissioning phase.
Note!

12

Endress+Hauser

Commuwin II Spawning Interface


Starting with bus address

Realization

There is another possibility of getting information from the LLF. The target and offset information may be obtained starting with the address information of the engineering component. The algorithm to calculate the contents of the second square brackets in the LLF from the address information and vice versa, calculating address information from the contents of the second square brackets in the LLF, is given in the following section. 1. Encipher an [ID] from device address and, if present, the PA-link address a) b) c) 2. Take the device address and add 128 when the device is operated under PA-link. When there is a PA-link, take its address and multiply it by 256. Otherwise assume zero (0). Add both to get [ID].

Decipher an [ID] from LLF to get device address and, if present, the PA-link address a) b) Divide (mod, %) the contents of the [ID] by 256. If the result is greater than or equal to 128, remove the bit 128" and take the rest as the device address. When in the former step the result was greater than or equal to 128, divide (div, /) the contents of the [ID] by 256 and take the result as the PA-link address. Otherwise there is no PA-link.

4.6

Retrieving information from C2.INI

The information given here can be used to support an engineering environment within the invoking program by offering configuration data to the user for setting up the interface information. The file C2.INI is located in the installation path where C2.EXE is located. The parameter concerned in control file is communication. For details refer to Chapter 4.2. The following syntax description is presented in Backus-Naur form. The line concatenating character _ is used as in VisualBasic. The semantics vary depending on bus type. An engineering environment may scan C2.INI for all server entries and present the user the strings <section line> <server line> <server id> <installation path> <program> <menu text> [DDESERVER] DDESRV<server id>"="<installation path>_<program><menu text> {1...9} //a string defining the installation path of_the server //a string defining the program name //a string defining the text for the menu

under <menu text>. The parameter configuration in the control file is calculated as: <server id> -1.

Endress+Hauser

13

Realization
4.7

Commuwin II Spawning Interface

Special considerations for distributed system configurations

If Commuwin II is run on one computer and the invoking program is run on another, there must be a solution for viewing the Commuwin II application on the computer where the invoking program is running. The only way possible is to use third-party software, which is to be installed on both computers in such a way that there is control over the computer where Commuwin II is running from the computer where the invoking program is running. We recommend the following sources:

Freeware software from AT&T called VNC (virtual network computing) Complete information is available from http://www.uk.research.att.com/vnc/. An alternative, also freeware, but requiring formal licensing, is Netmeeting from Microsoft. Complete information is available from http://www.microsoft.com/windows/netmeeting/. A further alternative, the licence and pricing conditions of which are to be checked, is pcAnywhere from Symantec. Get full information at http://www.symantec.com/pcanywhere/index.html.

4.8

Restrictions
Commuwin II can be started only once, because parts of it do not support multiuser situations (re-entrancy). This restriction has to be considered within the spawning program. Commuwin II, as today, keeps a used DDE-server running when it is started normally. Commuwin II itself does not terminate it (another client may retrieve data from the server). When Commuwin II is spawned from within another application, it will terminate a running DDE-server, because otherwise topics of the same name are not addressable on another DDE-server running in parallel to the first one. Although the spawned Commuwin II will be fully operable, it is not allowed to establish an alternative communication path via another DDE-server, because the automatic termination will not work with this server.

The following restrictions apply to the use of the spawning interface:

14

Endress+Hauser

Commuwin II Spawning Interface


For your notes!

Realization

Endress+Hauser

15

Realization
For your notes!

Commuwin II Spawning Interface

16

Endress+Hauser

Austria

Hong Kong

Spain

Endress+Hauser Ges.m.b.H. Wien Tel. (01) 8 80 56-0, Fax (01) 8 80 56-35


Belgium / Luxembourg

Endress+Hauser (H.K.) Ltd. Hong Kong Tel. 25 28 31 20, Fax 28 65 41 71


Italy

Endress+Hauser S.A. Barcelona Tel. (93) 4 80 33 66, Fax (93) 4 73 38 39


Sweden

Endress+Hauser S.A./N.V. Brussels Tel. (02) 2 48 06 00, Fax (02) 2 48 05 53


Canada

Endress+Hauser Italia S.p.A. Cernusco s/N Milano Tel. (02) 92 10 64 21, Fax (02) 92 10 71 53
Japan

Endress+Hauser AB Sollentuna Tel. (08) 6 26 16 00, Fax (08) 6 26 94 77


Switzerland

Endress+Hauser Ltd. Burlington, Ontario Tel. (9 05) 6 81 92 92, Fax (9 05) 6 81 94 44


Denmark

Sakura Endress Co., Ltd. Tokyo Tel. (04 22) 54 06 11, Fax (04 22) 55 02 75
Malaysia

Endress+Hauser AG Reinach/BL 1 Tel. (0 61) 7 15 62 22, Fax (0 61) 7 11 16 50


Thailand

Endress+Hauser A/S Sborg Tel. (31) 67 31 22, Fax (31) 67 30 45


Finland

Endress+Hauser (M) Sdn. Bhd. Petaling Jaya, Selangor Darul Ehsan Tel. (03) 7 33 48 48, Fax (03) 7 33 88 00
Netherland

Endress+Hauser Ltd. Bangkok Tel. (2) 9 96 78 11-20, Fax (2) 9 96 78 10


USA

Endress+Hauser Oy Espoo Tel. (90) 8 59 61 55, Fax (90) 8 59 60 55


France

Endress+Hauser Inc. Greenwood, Indiana Tel. (3 17) 5 35-71 38, Fax (3 17) 5 35-14 89
All other countries

Endress+Hauser B.V. Naarden Tel. (0 35) 6 95 86 11, Fax (0 35) 6 95 88 25


Norway

Endress+Hauser Huningue Tel. 89 69 67 68, Fax 89 69 48 02


Germany

Endress+Hauser GmbH+Co. Instruments International Weil am Rhein Tel. (0 76 21) 9 75-02, Fax (0 76 21) 97 53 45

Endress+Hauser A/S Tranby Tel. (0 32) 85 10 85, Fax (0 32) 85 11 12


Singapore

Endress+Hauser Messtechnik GmbH+Co. Weil am Rhein Tel. (0 76 21) 9 75-01, Fax (0 76 21) 9 75-5 55
Great Britain

Endress+Hauser (S.E.A.) Pte., Ltd. Singapore Tel. 4 68 82 22, Fax 4 66 68 48 http://www.endress.com


South Africa

Endress+Hauser Ltd. Manchester Tel. (01 61) 2 86 50 00, Fax (01 61) 9 98 18 41

Endress+Hauser Pty. Ltd. Sandton Tel. (0 11) 4 44 13 86, Fax (0 11) 4 44 19 77


12.97/MTM

Endress + Hauser
The Power of Know How
BA 006S/04/en/07.00 CCS/CV5

S-ar putea să vă placă și