Micromod Micro-PWC: 53PW6000 MicroPWC Configuration Guide User Manual

Page 158

Advertising
background image

Micro-PWC CONFIGURATION GUIDE

138 Grafx Editor

as part of the string substitution feature described below.

When an instance of a submodel is configured on a graphic, the user supplies values for the submodel's
variables, as described in

Section 4.3.2, Configuring Submodels

above. A string substitution feature is

available which allows the user to configure multiple variables which share a characteristic, such as the
same tagname, or the same atom type.

This makes it easy to configure a submodel that will display several different atoms from the same tag-
name, such as the PV, SP and OUT atoms. If the atom names are known, the string substitution feature
can be used to declare variables for the submodel in such a way that only the tagname must be supplied
when an instance of the submodel is configured.

To use this feature, the part of the variable name that will assume the same value in all cases must be
enclosed between '$' characters. In Example 1 below, the following variable names could be configured for
a submodel, using the Declare Variables window:

Example 1:

$tag$PV
$tag$SP
$tag$OUT

Save the submodel, then place an instance of it on a graphic and select the instance. Click on the Config-
ure Submodel
item from the right mouse button pop-up menu. When the Submodel Configuration window
is displayed, only the string tag will appear as a variable that needs to be configured, rather than a sepa-
rate entry for each atom. The user would enter the tagname followed by a period (.), e.g., "CON1.". In the
submodel, this will result in the replacement of the string "tag" with the string "CON1." in each of the three
variables, as follows:

$tag$PV = CON1.PV
$tag$SP = CON1.SP
$tag$OUT = CON1.OUT

Note that all three variables were configured in the submodel by supplying one value, namely the value of
the string for tag.

The user must supply the period (.) after the tagname, otherwise erroneous values such as CON1PV
would result. While the period (.) alone cannot be included in the variable name (i.e., $tag.$PV is not a
legal variable name), it can, however, be used when preceded by a backslash character (e.g., "\."). Alter-
natively, the sequence "#d" can be used in the variable name to represent a period. Both of these methods
are shown in Example 2.

Example 2:

$tag$\.PV or $tag$#dPV
$tag$\.SP or $tag$#dSP
$tag$\.OUT or $tag$#dOUT

If these variable names are used, only the tagname (e.g., "CON1") has to be supplied by the user when
configuring the submodel.

A submodel could be designed to show the value of the same atom from 10 different tagnames. Since the
atom name is the same in all 10 cases, string substitution could be used in naming the variables, as fol-
lows:

$tag1$#d$atom$
$tag2$#d$atom$
$tag3$#d$atom$
.
.

Advertising