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

Readout Tables

The two kinds of readout tables are: readout table and digital clock.

A readout table is a rectangular, divided box that shows a label or an expression on the left-hand side, and displays any quantity variable, parameter, or expression on the right, as shown next.


A readout-table causes data-seeking only if the workspace it is on is showing (not hidden). When the expression for the readout table has never been updated, G2 displays **** (asterisks). When the expression has a value, G2 displays that value. When the value of the expression is no longer valid (because it expires or attempts to update it fail), G2 continues to display the value but displays an asterisk beside it.

Readout tables do not support attribute displays, nor do they update through events. For example, you cannot write a whenever rule that concludes a new value for the readout table. The two ways to update a readout table are:

You cannot disable scanning.


Tip: Internally, G2 classifies readout tables as a form of Table. If you include a configuration statement for tables in the KB Configuration system table, G2 imposes that configuration on readout tables, too.

Digital Clocks

A digital clock is a special kind of readout table. It displays the value of the expression the current time in the time stamp format. Digital clocks have a subset of a readout-table's attributes.


A digital clock displays the word time when disabled. Note that the value of the current time may drift out of synchronization with the current real time if, for example, the scheduler is running in as fast as possible or simulated time mode. For more information about time expressions, see By Iterating Over a Set.

Specifying the Label to Display

The Label-to-display attribute specifies what appears in the left-hand side of the readout display. If you do not enter a value for this attribute, G2 displays the Expression-to-display on the left side of the readout-table.

Specifying the Display Format

The Display-format attribute specifies which way to display the expression value. Keeping the default value displays the value as it appears for integers, quantities, truth-values, symbols, and text.

For floats, values appear with precision up to three places to the right of the decimal, or more if you specify a ddd.dddd format with greater precision.

Reading the Current Value

The Readout-table-display-value attribute indicates the most recent value computed for the display. You cannot change this attribute; it is provided by G2.

G2 does not update a readout table automatically, but according to its Display-update-interval attribute specification.

Class-Specific Attributes of Readout Tables

Readout tables have the same attributes as other displays, as described in Common Attributes of Readout Tables, Dials, and Meters. The class-specific attributes of readout tables are:

Attribute Description
Label-to-display
Specifies the label shown on the left side of the readout-table.
Allowable values:
Any symbolic name
Default value:
none


Display-format
The format in which to display the value of the Expression-to-display.
Allowable values:
any ddd.dddd-format
interval
time stamp
default

Default value:
default


Readout-table-display-value
The most recent value computed for the display.
Allowable values:
The current value
Default value:
****


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

Copyright © 1997 Gensym Corporation, Inc.