Documente Academic
Documente Profesional
Documente Cultură
Endress + Hauser
The Power of Know How
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
Software History
Software version Manual edition Device and. Software changes software no.
2.07
Manual changes
07.00
____
Endress+Hauser
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
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.
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.
BA006E01
Endress+Hauser
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
segment coupler
PA
PA-link
PA
BA006E02
DP
Fig. 2
computer network
BA006E03
DP-network
Fig. 3
Realization
4 4.1
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:
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
[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
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
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
Keyword
startmode
userrights
6 6
communication
6 1 2
lifelist
6 3
target
6 4
offset
6 4
display
6 5
Endress+Hauser
Realization
During operation
[ToCommuwin] controlfile.ini [FromCommuwin]
Invoking program
spawning
Commuwin II
import
export
BA006E04
During configuration
thisbus.cfg
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.
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
4.4
\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
Endress+Hauser
Realization
4.5
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>
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
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]
S]
[8689-1]
[8689-2]
Example: ZA 672
A second example of a possible ZA672 configuration is shown below.
672Z]
[2]
[Endress+Hauser]
[6330]
[]
[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.
XYZ ABC
[Endress+Hauser] [Endress+Hauser]
[6710] [6520]
[] []
Endress+Hauser
11
Realization
Starting with tag id
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
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
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
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
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.
14
Endress+Hauser
Realization
Endress+Hauser
15
Realization
For your notes!
16
Endress+Hauser
Austria
Hong Kong
Spain
Endress+Hauser Italia S.p.A. Cernusco s/N Milano Tel. (02) 92 10 64 21, Fax (02) 92 10 71 53
Japan
Sakura Endress Co., Ltd. Tokyo Tel. (04 22) 54 06 11, Fax (04 22) 55 02 75
Malaysia
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 Inc. Greenwood, Indiana Tel. (3 17) 5 35-71 38, Fax (3 17) 5 35-14 89
All other countries
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 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 Ltd. Manchester Tel. (01 61) 2 86 50 00, Fax (01 61) 9 98 18 41
Endress + Hauser
The Power of Know How
BA 006S/04/en/07.00 CCS/CV5