Configuration Guide User Manual

Micro-PWC CONFIGURATION GUIDE
206 Grafx Editor
4.4.9 Expressions as Submodel Variables
As shown in preceding portions of this chapter, values are assigned to a submodel's variables when a
graphic is configured. The values assigned are of two types: static and dynamic. In the Micro-DCI Sub-
models used here as examples, variables which can be assigned a tagname (e.g., TagAtom, TagName,
TAG) are dynamic variables. All other variables which can be assigned for the Micro-DCI Submodel, such
as font, face_color, etc., are static variables.
The value assigned to a static variable must be a numeric or string constant. For example, the pushbutton
submodel FP_DYputpb (see Section 4.4.3.5) has a static variable named button_label. This variable must
be assigned a string constant, such as Press Here.
The value assigned to a dynamic variable can be a numeric or string constant, but can also be the name of
a controller tag.atom. For example, the submodel FP_DYvalue has a dynamic variable named TagAtom. If
the name of a controller tag.atom such as CON1.SP is assigned to this variable, then the value of
CON1.SP will appear on the graphic when it is displayed in an Operator Window.
Additionally, an expression can be configured as the value of a dynamic variable. The expression can
include:
•constants
controller tag.atom names
arithmetic operators
logical operators
For example, the following expression could be assigned to the TagAtom dynamic variable of the
FP_DYvalue submodel. The expression would cause the value of CON1.SP to be converted from degrees
Centigrade to Fahrenheit before it is displayed on a graphic:
9/5 * CON1.SP + 32
The following rules govern the use of expressions assigned to submodel dynamic variables.
1. An expression can include controller tag.atoms, constants, arithmetic and logical operators,
and parentheses.
2. The arithmetic operators are:
Note In the case of non-Micro-DCI Submodels, dynamic variables are
those which have been declared so that they can be assigned
tagnames. See the sub-section Section 4.3.3, Creating Custom
Dynamics for information on creating custom dynamics and
declaring variables.
+ addition
- subtraction
* multiplication
/ division
^ exponentiation