2 dynprop variables, 2 declaring variables, 1 declaring variables in graphics – Micromod Micro-PWC: 53PW6000 MicroPWC Configuration Guide User Manual

Page 154

Advertising
background image

Micro-PWC CONFIGURATION GUIDE

134 Grafx Editor

An explanation of the capabilities and the syntax of DynProps is beyond the scope of this manual. Refer to
the SL-GMS Reference Manual for details.

4.3.3.1.2 DynProp Variables

A DynProp will contain references to variables. For example, the fill color of an object in a submodel can be
changed using the following DynProp:

( * (fcolor bar_color))

In this example, bar_color is a variable. The DynProp is then saved by clicking on OK and exiting the Edit
Custom Dynamics
window, and the submodel must be saved (using the Save, Save As or Install items
from the File pull-down menu).

When an instance of this submodel is placed on a graphic, selected and the Configure Submodel menu
item clicked on, bar_color and an associated text entry box will appear in the list of variables in the result-
ing Submodel Configuration window. Enter a color index number between 0 and 255 in the entry box to
assign that number as the value of the variable.

In other cases, it may be desirable to have the value of a variable retrieved from the global database when
the graphic is displayed in the Operator Window. In such cases the Model Variables menu item must be
used.

4.3.3.2 Declaring Variables

4.3.3.2.1 Declaring Variables in Graphics

The Model Variables menu item, found on the Edit menu, provides a way to incorporate dynamic data from
the global database into graphic displays. Model Variables works in conjunction with the Custom Dynamics
menu item. For example, a text object can be configured to display the value of a setpoint (SP) atom in the
global database on a graphic display. (This could also be done using the FP_DYvalue submodel,
described in

Section 4.4, Micro-DCI Submodels

.)

To do so, first configure the DynProp for the text object as follows:

( * ( stext _psetpoint "%.1f"))

For the purposes of this example, the tagname used for the point in the global database is CON1.

Next, the value of the variable _psetpoint must be tied to the value of the desired tag.atom in the global
database (for the purposes of this example, we will use CON1.SP). To do so, click on the Model Variables
menu item. The Variables window (

Figure 4-17

) will be displayed.

Advertising