| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (3 out of 5)

Working with Displays

To create a readout-table, dial, or meter item:

where display-item is the display of your choice.

Among others, G2 provides these displays:


Readout-table - Shows a variable, parameter, or expression, and its value. G2 also provides a digital-clock, which is a special kind of readout table that displays the time according to the scheduler.

Dial - Represents an arithmetic value graphically. The dial needle moves clockwise as the value increases and counterclockwise as it decreases.

Meter - Represents an arithmetic value graphically. Meters have a bar that rises and falls vertically as the value increases and decreases.


Note: Unlike most items, G2 does not display the name of a display adjacent to it on the workspace.

Specifying Tracing and Breakpoints

The Tracing-and-breakpoints attribute lets you override the display item's default settings for these facilities.

For more information about using the tracing and breakpoints facilities in G2, see Chapter 42, Debugging and Tracing.

Specifying the Display Expression

The Expression-to-display attribute specifies the variable or parameter, or expression you want the display to show. Some examples are:

Specifying the Update Interval

The Default-update-interval attribute indicates how long G2 waits before updating the display. For example, if you specify 3 seconds, G2 updates the display every three seconds.

Specifying the Display Update after G2 Start-up

The Display-wait-interval attribute specifies the amount of time, after KB start-up, that G2 waits before updating the display.

We recommend that you give readout-tables different Display-wait-intervals to stagger updating and even out the CPU load after start-up.

Defining the Update Priority

The Display-update-priority attribute defines the display update priority. G2 schedules the execution of tasks according to priority, executing those with the highest priority (1) first.

Specifying Simulated Value Display

The Show-simulated-values? attribute determines whether to display the simulated value of the variable referenced in the Expression-to-display attribute.

The G2 Simulator, which can supply simulated values, is a superseded capability. For more information, see Appendix F, Superseded Practices.

Common Attributes of Readout Tables, Dials, and Meters

Readout tables, dials, and meter displays each have the following attributes:

Attribute Description
Tracing-and-breakpoints
Use this attribute to override the default tracing and breakpoints for the readout.
Allowable values:
For a complete description of possible tracing and breakpoints values, see Chapter 6, System Tables.
Default value:
default


Expression-to-display
Specifies the variable, parameter, or expression whose value you want to display.
Allowable values:
any valid G2 expression
Default value:
No default value


Display-update-interval
Specifies the frequency with which you want G2 to update the display.
Allowable values:
any positive time-interval
Default value:
5 seconds


Display-wait-interval
Specifies a time interval that G2 waits, when you start (or restart) your KB, before updating the display.
Allowable values:
any positive time-interval
Default value:
2 seconds


Display-update-priority
Specifies an integer between 1 and 10 that indicates the priority at which G2 updates the display.
Allowable values:
1 - 10
Default value:
2


Show-simulated-values?
Specifies whether a variable referred to in the Expression-to-display attribute gets its value from the simulator or inference engine.
Allowable values:
yes
no

Default value:
no
Notes:
The G2 Simulator, which can supply simulated values, is a superseded capability. For more information, see Appendix F, Superseded Practices.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (3 out of 5)

Copyright © 1997 Gensym Corporation, Inc.