| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (6 out of 14)

Configuring Plots

The Plots attribute lets you define the single or multiple data plots that appear on the trend chart. A trend chart plots histories of values. Each plot specifies where the values are stored. The history values may be stored in the history of a variable or a parameter, or locally in the trend chart.

You create a plot for every data series you want to display. Every plot specifies a value-axis, a point-format, and a connector-format. Plots can be similar in appearance and color or, by using different point- and connector-formats, each can have a unique look. The next diagram indicates two plots on a trend chart:


Access plots from:

The attribute tables of plot defaults and plots are:


Plot subtables include three attributes that refer to other components, namely the value-axis, point-format, and connector-format components.

By accessing the table choice (clicking at the side of the value) of each of these plot subtable attributes, you can:

The following diagram shows the Value-axis-name-or-number attribute table choice.


Defining Where to Obtain History Values

The Use-local-history? attribute defines whether the plot is plotting local history values, stored within the trend chart, or external history values, stored within a variable or a parameter.

Setting this attribute to yes (the default) directs G2 to maintain a history of values locally. G2 evaluates local history values from the plot expression in the plot's Expression attribute, regardless of whether that expression refers to a variable or parameter that itself maintains a history of values.

Setting this attribute to no plots the history values of a variable or a parameter and implies that the plot expression must evaluate to a variable or a parameter, specifically, one that maintains history. If you set the use-local-history? attribute to no and the variable or parameter is not saving history values, the trend chart does not display anything for this plot.

For information about history keeping specifications, see Specifying Whether to Keep a History of Values.

Specifying the Value Axis for the Plot

The Value-axis-name-or-number attribute indicates the component reference name or number of the value axis for the current plot. The default number 1 indicates that the plot will use value axis #1, which is the default.

If you create other value axes and provide names for them, or provide a name to value axis #1, you can enter either the name or the number of the value axis.

You can access the value axis subtable that this plot references by choosing referenced subtable from the attribute's table choice, or change the current reference to a new one by choosing change reference, shown next.


Specifying the Point Format

The Point-format-name-or-number attribute specifies the component reference name or number of the point format for the current plot. The default number 1 indicates that the plot will use point-format #1, which is the default.

If you create other point formats and provide names for them, or provide a name to point-format #1, you can enter either the name or the number of the point format component reference.

You can access the point format subtable that this plot references by choosing referenced subtable, or change the current reference to a new one by choosing change reference.

Specifying the Connector Format

The Connector-format-name-or-number attribute specifies the component reference name or number of the connector format this plot will use. The default number 1 indicates that the plot will use connector-format #1, which is the default.

If you create other connector-formats and provide names for them, or provide a name to connector-format #1, you can enter either the name or the number of the connector format component reference.

You can access the connector format subtable that this plot references by choosing referenced subtable, or change the current reference to a new one by choosing change reference.

Defining the Update Interval

The Update-interval attribute determines the interval at which G2 evaluates the expression contained in the expression attribute. This interval takes effect following the first time G2 evaluates the expression after activation. Conversely, the Wait-interval attribute determines the interval G2 waits before evaluating the plot expression for the first time after activation.

The Update-interval attribute determines when the expression is evaluated regardless of the value of the Use-local-history? attribute. To recap what the section Defining Where to Obtain History Values describes, that attribute determines whether a plot is using historical values maintained in the trend chart, or the history values of a variable or a parameter. If Use-local-history? is set to no, indicating that a variable or parameter history is being plotted, the expression is still evaluated at the interval that this attribute specifies.

When Use-local-history? is set to yes, and to correspond with G2's subsecond interval capabilities, the Update-interval attribute can optionally include the minimum interval between data points statement, as:

The minimum interval between data points statement lets you specify the granularity between data points, that is, the amount of time between when G2 saves one data point and the next.

This statement is identical to one you could specify for the history keeping specification of variables and parameters, and is described in Specifying a Minimum Interval Between History Data Points.

Specifying the Activation Interval

The Wait-interval attribute determines the interval G2 waits before evaluating the expression in the plot's Expression attribute after activation.

Specifying the Update Priority Level

The Update-priority attribute sets the priority level within the scheduler task queue for the trend chart expression. Priority levels range from 1 - 10, with 1 being the highest priority. The default for this attribute is 2. The number you enter affects how soon G2 evaluates a given expression when its task reaches the top of the task queue.

Specifying Data Seeking Capabilities

The May-request-data-seeking? attribute specifies whether the trend chart can data seek for an unknown value. When the Use-local-history? attribute is yes, and the plot expression includes a variable or a parameter such as:

where X is a variable, if the value of X has expired and this attribute is set to yes, the trend chart causes G2 to data seek for a value for X.

Using Simulated History Values

The Use-simulator? attribute should always be set to no, because the G2 Simulator is a superseded capability. For more information, see Appendix F, Superseded Practices.

Specifying Event Updates

The May-request-event-updates? attribute determines whether the trend chart receives event updates. Forward chaining is one example of an event update. For instance, if a trend chart expression relies on a value that changes, setting this attribute to yes indicates that when the value changes, the expression receives the new value.

If this attribute is set to no, changing values may not forward chain to the trend chart.

Defining the Debugging Level

The Tracing-and-breakpoints attribute lets you set tracing and breakpoint levels. Setting this attribute overrides the Tracing-message-level and Breakpoint-level attributes in the Debugging Parameters system table.


Note: The Tracing-and-breakpoints-enabled? attribute of the Debugging Parameters system table must be set to yes for tracing and breakpoints to occur.

Entering an Expression

The Expression attribute specifies what value this plot represents. This attribute is not on the plot defaults subtable.

This attribute works on conjunction with the Use-local-history? attribute, described in the section Defining Where to Obtain History Values, as follows:

If Use-local-history? is yes then... If Use-local-history? is no then...
The expression must evaluate to a quantity data type.
The expression must evaluate to a variable or a parameter of the quantity, float, or integer data type. Further, for the trend chart to plot data, the variable or parameter must be keeping history.


Note: The value of the plot expression cannot exceed ± 1.7978e304, and will be truncated to this limit.

Summarizing Plot Attributes

The plot component attributes are:

Attribute Description
Names
The optional name of the plot. We recommend that you name each trend chart plot. This attribute is not on the plot defaults subtable.
Allowable values:
Any symbol
Default value:
none


Use-local-history?
Indicates whether to use a history of values maintained within a trend chart from the data points it plots (yes) or to plot the history values of a variable or a parameter (no).
Allowable values:
{yes | no}
Default value:
yes


Value-axis-name-or-number
The component reference name or number of the value axis for this plot.
Allowable values:
See Configuring Value Axes.
Default value:
1


Point-format-name-or-number
The component reference name or number of the plot's point format.
Allowable values:
See Configuring Point Formats.
Default value:
1


Connector-format-name-or-number
The component reference name or number of the plot's connector format.
Allowable values:
See Configuring Connector Formats.
Default value:
1


Update-interval
The interval at which G2 evaluates the expression in the expression attribute.
Allowable values:
{time-interval [minimum interval between data points] }
Default value:
5 seconds


Wait-interval
The interval G2 waits before evaluating the expression in the expression attribute after the trend chart is activated.
Allowable values:
{time-interval}
Default value:
2 seconds


Update-priority
The task priority level at which G2 evaluates the plot expression.
Allowable values:
{1 - 8}
Default value:
2
May-request-data-seeking?
Determines whether the trend chart can data seek for an unknown value.
Allowable values:
{yes | no}
Default value:
yes


May-request-event-updates?
Determines whether the trend chart receives event updates.
Allowable values:
{yes | no}
Default value:
yes


Use-simulator?
Determines whether the plot uses simulated history values of a variable.
Allowable values:
{yes | no}
Default value:
no
Notes:
The G2 Simulator is a superseded capability. For more information, see Appendix F, Superseded Practices.


Tracing-and-breakpoints
The level of tracing and breakpoints.
Allowable values:
{default | warning message level (0, 1, 2, or 3) |
tracing message level (0, 1, 2, or 3) |
breakpoint level (0, 1, 2, or 3)}

Default value:
default


Include-in-legend?
Specifies whether information about this plot is included in the trend chart legend.
Allowable values:
{yes | no}
Default value:
yes


Expression
The expression whose value this plot represents.
Allowable values:
{value-expression}
Default value:
No default value

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (6 out of 14)

Copyright © 1997 Gensym Corporation, Inc.