The Trend folder enables you to configure
history groups that store trend curves. You can use the Trend
worksheet to declare which tags must have their values stored on
disk, and to create history files for trend graphs. The project
stores the samples in a binary history file (*.hst), and shows both
history and on-line samples in a screen trend graph.
The Trend worksheet is executed by the Background Task
module (see
Execution Tasks). It handles the saving of trend data to the
history, but it does not display that data to the operator; the
Trend Control screen object, available on the Graphics tab of
the ribbon, must be created and configured in a screen in order to
display trend data.
To create a new Trend worksheet, do one of the
following:
- On the Insert tab of the ribbon, in the Task
Worksheets group, click Trend;
- Right-click the Trends folder in the Project Explorer, and
then click Insert on the shortcut
menu; or
- Click New on the
Application menu, click the File
tab, and then select Trend
Worksheet.
To edit an existing Trend worksheet, double-click it
in the Project Explorer.
Figure 1. Trend
worksheet
The Trend worksheet is divided into two areas:
- Header area (top section), which contains
information for the whole group
- Body area (bottom section), where you define each
tag in the group. This section contains several columns (only two
are shown in the preceding figure).
Use the Header parameters on this worksheet as
follows:
- Description field:
Type a description of the worksheet for documentation
purposes.
- Type combo box:
Click the arrow button to select a trend history format from the
list. The available options are:
CAUTION:
You can specify String tags in many
fields of the Trend worksheet, to change those values during
runtime, but doing so may affect how those values are saved in the
trend history:
- When the history format is Proprietary, the value of the String tag is
converted to a numerical value (if possible) and then saved to the
history file. If numeric conversion is not possible, then a value
of 0 is saved.
- When the history format is Database, the actual value of the String tag is
saved in the database.
- Database
Configuration: Opens the Database
Configuration dialog, where you can enter the requisite
settings to link the project to an external SQL Relational Database
for the purpose of saving the trend history.
- Save On Trigger
checkbox and field: Click (enable) and type a tag name to save
trend samples when someone changes the specified tag. (Tag change
can be an event from the Scheduler.)
- Save On Tag Change
checkbox: Click (enable) to always save the trend sample when a
value change occurs in any of the tags from that group.
- Advanced: Click to
display the Trend Advanced Settings dialog. For information about
completing the fields in this window, see Batch History
Configuration.
Use the Body parameters on this worksheet as
follows:
- Tag Name field:
Type the tag name to be saved in the history file.
- Dead Band field:
Type a value to filter acceptable changes when Save on Tag Change is used. For example, Dead
Band has value = 5. If the tag value is 50 and changes to 52, the
system will not register this variation in the database, because it
is less than 5. If the change is equal to or greater than 5, the
new value will be saved to the history file.
- Field field: Name
of the field in the database where the tag will be stored. If this
field is left blank, the name of the tag will be used as the tag
name. Array tags and classes will have the characters "[", "]" and
"." replaced by "_". Examples:
Tag Name |
Default Field |
MyArray[1]
|
MyArray_1
|
MyClass.Member1
|
MyClass_Member1
|
MyClass[3].Member2
|
MyClass_3_Member2
|
Note: The
Trend task can accept only up to 240 tags in a single worksheet. If
you manually configure more than 240 tags in the same worksheet,
then the Trend task will generate an error when you run the
finished project.