HistClient PDF
HistClient PDF
HistClient PDF
Revision E
Last Revision: 3/2/10
Copyright
© 2005-2006, 2010 Invensys Systems, Inc. All Rights Reserved.
All rights reserved. No part of this documentation shall be reproduced, stored in a
retrieval system, or transmitted by any means, electronic, mechanical, photocopying,
recording, or otherwise, without the prior written permission of Invensys Systems,
Inc. No copyright or patent liability is assumed with respect to the use of the infor-
mation contained herein. Although every precaution has been taken in the prepara-
tion of this documentation, the publisher and the author assume no responsibility for
errors or omissions. Neither is any liability assumed for damages resulting from the
use of the information contained herein.
The information in this documentation is subject to change without notice and does
not represent a commitment on the part of Invensys Systems, Inc. The software
described in this documentation is furnished under a license or nondisclosure agree-
ment. This software may be used or copied only in accordance with the terms of
these agreements.
Trademarks
All terms mentioned in this documentation that are known to be trademarks or
service marks have been appropriately capitalized. Invensys Systems, Inc. cannot
attest to the accuracy of this information. Use of a term in this documentation
should not be regarded as affecting the validity of any trademark or service mark.
Alarm Logger, ActiveFactory, ArchestrA, Avantis, DBDump, DBLoad, DT Analyst,
Factelligence, FactoryFocus, FactoryOffice, FactorySuite, FactorySuite A2, InBatch,
InControl, IndustrialRAD, IndustrialSQL Server, InTouch, MaintenanceSuite,
MuniSuite, QI Analyst, SCADAlarm, SCADASuite, SuiteLink, SuiteVoyager,
WindowMaker, WindowViewer, Wonderware, Wonderware Factelligence, and
Wonderware Logger are trademarks of Invensys plc, its subsidiaries and affiliates.
All other brands may be trademarks of their respective owners.
3
Contents
Welcome.......................................... 17
Documentation Conventions.............................................17
Technical Support .............................................................18
Servers Pane...................................................................40
Tags Pane .......................................................................43
Filter Pane ......................................................................44
Showing/Hiding the Tag Picker.....................................45
Viewing the ArchestrA Hierarchical Name ..................46
Tag Picker Views ............................................................46
Time Picker........................................................................47
Viewing Program and License Information.....................48
Editing an Annotation..................................................103
Deleting an Annotation................................................103
Saving the Annotations List as a .CSV File................104
Printing Annotations....................................................105
Trending Events ..............................................................106
Using Absolute or Relative Times ..................................107
Using Absolute Time ....................................................107
Using Relative Time.....................................................109
Switching Between Absolute and Relative Time:
Example....................................................................110
Using Time Offsets to Compare Data .........................112
Configuring Trend Application Options.........................117
Configuring Retrieval Options.....................................118
Configuring Color Options ...........................................119
Configuring Time Zone Options ..................................121
Configuring Miscellaneous Options ............................123
Configuring Other Options ..........................................124
Configuring Trend File Properties .................................126
Configuring General Properties ..................................126
Configuring Color Properties .......................................127
Configuring Axis Properties ........................................129
Configuring Limit Properties.......................................131
Configuring Annotation Properties .............................133
Configuring Target Region Properties ........................135
Working with Scatter Plots.............................................136
Viewing Data in a Scatter Plot ....................................137
Scaling Tags in a Scatter Plot......................................139
How Are Value Pairs Matched?...................................140
Panning and Zooming in a Scatter Plot ......................141
Defining a Target Region for a Scatter Plot................142
Configuring Scatter Plot Properties ............................145
Other Considerations for Working with Scatter
Plots ..........................................................................147
Outputting Trend Data ...................................................147
Printing Trend Data.....................................................147
Printing Trend Sets......................................................148
Saving Trend Data to a .CSV File ...............................151
Saving the Trend Chart to an Image File ...................152
E-mailing a Trend File .................................................152
Copying a Trend Chart to the Windows Clipboard ....153
HelpContextID..............................................................661
Index..............................................................................662
Left ................................................................................662
Name .............................................................................662
Object ............................................................................662
Parent............................................................................663
TabIndex .......................................................................663
TabStop .........................................................................663
Tag.................................................................................663
ToolTipText...................................................................664
Top.................................................................................664
Transparent ..................................................................664
Visible............................................................................665
WhatsThisHelpID.........................................................665
Width.............................................................................665
Common Methods............................................................666
Drag...............................................................................666
Move ..............................................................................666
SetFocus ........................................................................666
ShowWhatsThis............................................................666
ZOrder ...........................................................................667
Common Events...............................................................667
Click ..............................................................................667
DblClick ........................................................................667
DragDrop ......................................................................668
DragOver.......................................................................668
GotFocus .......................................................................668
KeyDown.......................................................................668
KeyPress .......................................................................668
KeyUp ...........................................................................668
LostFocus ......................................................................669
MouseDown...................................................................669
MouseMove ...................................................................669
MouseUp .......................................................................669
Validate.........................................................................669
Common Enumerations ..................................................670
aaRetrievalSource Enumeration .................................670
aaTagType Enumeration .............................................670
aaTimeRangeEnumeration Enumeration...................671
Common Data Types .......................................................673
DateTime ......................................................................673
Color ..............................................................................673
Glossary......................................... 841
Welcome
Documentation Conventions
This documentation uses the following conventions:
Technical Support
Wonderware Technical Support offers a variety of support
options to answer any questions on Wonderware products
and their implementation.
Before you contact Technical Support, refer to the relevant
section(s) in this documentation for a possible solution to the
problem. If you need to contact technical support for help,
have the following information ready:
• The type and version of the operating system you are
using.
• Details of how to recreate the problem.
Chapter 1
Introduction
Desktop Applications
The Wonderware Historian Client software includes the
following stand-alone applications:
• Wonderware Historian Client Trend. Enables trending
of historical and real time data over time. Powerful
features allow data to be compared with other data from
different periods. Alarms and limit excursions are readily
visible. It is also possible to add and view annotations in
your trends.
Client/Server Architecture
The Wonderware Historian client/server architecture allows
for flexible and easy-to-use client applications on the desktop,
while ensuring the integrity and security of the data on the
server. The computing power of both the client and the server
are exploited by optimizing processor intensive operations on
the server and minimizing data to be transmitted on the
network to improve system performance.
• Data manipulation
• Device communication
• System-wide security
• Collaborative engineering
<TagName>.<AttributeName>
For example, Reactor_002.ReactLevel
• Contained name is the name of an object with
considerations to its place within the overall object
hierarchy. By default, the contained name for an object is
the same as its tag name. However, if you use the same
object within other objects, you can change the contained
name at each instance in the object hierarchy to reflect
the unique context in which the object is used. For
example, you might decide that the contained name for
the object called "Reactor_002" should be "Reactor".
<ContainerNameN>.<ContainerName2>.<ContainerNa
me1>.<ContainedName>
For example, if an object whose contained name is
Reactor is contained within an object whose tag name is
R32, then the hierarchical name of the object is:
R32.Reactor.
In the Derivation view of the ArchestrA IDE, the
hierarchical name is shown within brackets to the right
of the object's tag name. For example:
Reactor_002 [R32.Reactor]
• Production reporting.
• Failure analysis.
Chapter 2
• Microsoft SQLXML
SQL Cursors
The stateless nature of SQL Server access over HTTP affects
the use of SQL cursors.
In a native SQL Server access environment, a connection is
made, a cursor is created, and used subsequently until the
connection is terminated. The establishment of the
connection, creation of the cursor, use of the cursor, and
disconnection can all be performed as separate requests.
If the SQL Server is accessed HTTP, the establishment of the
connection, the execution of any SQL statements that follow,
and the disconnection must all be part of a HTTP request.
Batch Statements
The stateless nature of SQL Server access over HTTP affects
the use of "batch" SQL statements. For HTTP access, the last
SQL statement submitted in a batch must be capable of
returning a result set.
For example, the following query does not return a result set
over HTTP. This is because the last statement executed does
not produce a result set.
SET QUOTED_IDENTIFIER OFF
Select ContactName FROM Customers
SET QUOTED_IDENTIFIER ON
To address this problem, make sure that the last statement
produces a result set. For the query example, the last
statement was removed to produce the expected results:
SET QUOTED_IDENTIFIER OFF
Select ContactName FROM Customers
To get the same effect as the original batch of statements, you
must modify the query so that the results are stored into a
temporary table before the SET QUOTED_IDENTIFIER ON
statement occurs and then return those results. For example:
CREATE TABLE #temp (Name NVARCHAR(255))
SET QUOTED_IDENTIFIER OFF
INSERT INTO #temp SELECT ContactName FROM Customers
SET QUOTED_IDENTIFIER ON
SELECT Name FROM #temp
If you have any batch queries in which the last SQL
statement in the batch does not return a result set, you must
restructure the query.
Column Aliases
For SQL Server access over HTTP, you must use include
column aliases in SQL statements when no columns exist.
For example, when used with native SQL Server access, the
following query yields the counts of all tags in the database.
SELECT COUNT(*) FROM Tag
However, the same statement does not produce results in
SQL over HTTP. You need to modify the query to use column
aliases. For example:
SELECT COUNT(*) as n FROM Tag
Another example is:
SELECT n=COUNT(*) FROM Tag
Error Reporting
If you are accessing SQL Server over HTTP, query-related
errors are not provided. This is a limitation of the SQLXML
technology. The only error condition that can be deduced is
when no data (not even the table headers) is returned for a
request. For this condition, a generic error is returned that
prompts you to check the SQL query.
If your query is not valid, no specific error message appears,
and no data is returned.
Status Bar
The status bar allows you to view the status of the connection
to the Wonderware Historian and any other status messages
that may be sent by the client.
The icon at the right side of the status bar indicates the
status of the servers that are being used by the Wonderware
Historian Client software. The following table describes the
status colors and their meanings:
Tag Picker
The Tag Picker shows which tag groups and tags exist in the
database. It shows all of the tags that are visible to the
currently logged on user based on his or her permissions.
Using the Tag Picker, you can quickly search the database
for tags of a certain type and/or for tags that match a
particular search pattern. You can then select the ones you
want to include for the client application or control.
Servers pane
Tags pane
Filter pane
• Tags Pane
• Filter Pane
Servers Pane
The Servers pane shows a list of Wonderware Historian
folders. The Servers pane allows you to navigate through the
folder structure (namespace) of one or more Wonderware
Historian servers and select a group (folder) of tags.
Category Description
Editing Groups
You can add groups as you would add a new folder in the
Windows Explorer. For example, you can create the
"BoilerTags" group under in the existing "Private Groups"
group. You can also delete, cut, copy, paste, and drag objects
from one folder to another.
Adding a Group
You can add a group.
To add a group
1 Right-click on the folder under which you want to create
a group and then click New Group.
A new folder appears in the Tag Picker.
2 Type a name for the folder and press ENTER.
Renaming a Group
You can rename a group that you have created in the Tag
Picker. However, you cannot rename a public folder.
To rename a group
1 Select the group in the pane.
2 Do one of the following:
• Right-click on the group and then click Rename.
• Press the F2 key.
3 Type a new name for the group and press ENTER.
2 Click OK.
Tags Pane
The Tags pane shows all the tags for the currently selected
group in the Servers pane.
Filter Pane
Use the Filter pane to reduce the tags listed in the Tags pane
according to criteria that you specify. You can filter the tags
according to name, description, and I/O address.
Wildcard
Character Filter Function
• [abcdef]
[^] Any single character not within the
specified range or set. For example:
• [^a - f]
• [^abcdef]
To apply a filter
1 In the Server box, specify or verify the server.
This box is not available if the Servers pane is visible.
2 In the Tag name box, type the string to match for the
tagname.
3 In the Description box, type the string to match for the
description.
4 In the I/O Address box, type the string to match for the I/O
address.
5 Select the Exact match check box to search for tags that
exactly match the entire string that you provided for the
tagname and/or description options.
For example, if you specify "level" as the tagname and do
not select Exact match, any tagname that contains the
string "level" appears. For example, "ReactLevel,"
"ProdLevel," and "$AccessLevel."
The Exact match option does not apply to the I/O address.
6 Click Apply to apply the filter criteria.
7 Click Clear to clear the Filter pane.
Time Picker
The time picker allows you to select a time range by
specifying a start time, end time, and/or duration.
An error appears next to the start or end time controls if you
specify an invalid time period. For example, an end time
before a start time.
Chapter 3
Main Toolbar
Tag Picker Scaling Toolbar Time Toolbar
For information on using the tag picker and the time picker,
see Chapter 2, Common Client Components. To show or hide
toolbars or components, use the corresponding commands on
the View menu.
Note You can also double-click the .aaTrend file in the Windows
Explorer to start up Trend.
Saving a Trend
To save a trend
1 Do one of the following:
• On the File menu, click Save.
• Click the Save Trend toolbar button.
If you are saving the trend for the first time, the standard
Windows Save As dialog box appears. Otherwise, the
trend is saved to disk using the existing file name.
2 In the Save As dialog box, type a name for the trend. All
trend files have the .aaTrend extension.
3 Click OK.
Closing a Trend
To close a trend
Do one of the following:
• On the File menu, click Close.
• Click the Close Trend toolbar button.
Undoing/Redoing Actions
The trend application supports 64 levels of undo/redo. You
can undo/redo all of the actions for scaling and moving, as
well as for adding and removing tags in the trend.
To undo an action
Do one of the following:
• On the Edit menu, click Undo.
• Click the Undo toolbar button.
To redo an action
Do one of the following:
• On the Edit menu, click Redo.
• Click the Redo toolbar button.
Configuring a Trend
When you configure a trend, you must select the tag(s) for
which you want to query the trend data. This data is queried
from the Wonderware Historian database(s) to which you are
currently logged on. After you select tags for the trend, you
can set the start date and end date for the trend.
To configure a trend
1 Use the Tag Picker to find tags in the Wonderware
Historian database(s) that you want to include in your
trend. For more information on the Tag Picker, see Tag
Picker on page 39.
2 Drag tags from the Tag Picker to the Tag List. You can
add as many tags as your system resources allow.
3 Select the time period for the query using the time picker.
For more information, see Time Picker on page 47.
You can select one or more summary tags from the Tag
Picker and drag them to the Tag List pane. When you drag a
summary tag to the Tag List, the Trend application plots the
value of the aggregate calculation on the Trend chart. The
aggregate calculation is performed when you configure the
summary tag on the Historian server. For example, if you
have configured a ReactTemp_Avg_Hourly summary tag to
store the hourly averages of the Reactor temperature, the
Trend application shows the hourly average value of the
Reactor temperature when you drag and drop the
ReactTemp_Avg_Hourly tag to the Trend chart. For more
information on the Tag List pane, see Viewing Tag Definition
Information on page 55.
You can configure trend options for a summary tag. For more
information, see Configuring Trend Options for a Tag on
page 59.
For more information on retrieving summary tags, see
Configuring Retrieval Options for a Tag on page 67 or
Configuring Retrieval Options on page 118.
Deleting a Tag
You can delete a tag. Deleting a tag removes it from the
chart.
The target region has the same color as the tag’s trend curve.
It is only shown when the tag is currently selected in the Tag
List. Also, target regions are not visible if you are using
stacked traces.
You can define and save target regions separately for each
tag. Target regions are saved in the trend file. If you delete a
tag from the trend, its target region is deleted as well. To use
the same target region for multiple tags or in different
trends, either copy and paste it or create a CSV file with the
target region data that you can load for each tag. For more
information, see the procedures below.
The following section explains how to set up a target region
for a tag. To specify whether and how values outside the
target region should be highlighted, and to set the target
region’s opacity, see Configuring Target Region Properties on
page 135.
Note Regardless of this setting, the target region for a tag is only
shown when that tag is currently selected in the Tag List.
3 Click OK.
Highlighting a Tag
You can select and highlight a tag in the chart. To remove the
highlighting, follow the same procedure so that no check
mark or highlighting appears.
To highlight a tag
1 Select the tag that you want in the Tag List.
2 Do one of the following:
• On the Chart menu, click Highlight Tag so that a check
mark appears.
• Click the Highlight Tag toolbar button so that it is
highlighted.
The tag is highlighted in the chart.
Stacking Traces
You can view individual trends, or "traces," for multiple tags
in the chart by stacking them in the display.
Note When retrieving live data, the time stamp rule for data
retrieval is forced to “End.” For more information on this setting,
see Time stamp Rule (wwTimestampRule) on page 772.
Scaling Tags
The scale is the minimum and maximum range of values for
the tag. Each tag has its own scale, which is usually quite
different from other tags in the chart. Scales for tags on the
chart are always displayed along the value axis.
Only discrete, analog, and summary tags can be scaled; event
and string tags cannot be scaled. For discrete tags, the
message associated with the 1 value is used as the maximum
scale value, and the message associated with the 0 value is
used as the minimum scale value.
You can also change the way in which scale values appear on
the value axis. The following sections describe the available
options.
To pan left
Do one of the following:
• On the Chart menu, click Pan Left.
• Click the Pan Left toolbar button.
To pan right
Do one of the following:
• On the Chart menu, click Pan Right.
• Click the Pan Right toolbar button.
If the time scale is set into the future, then white space
appears.
During a pan, the time picker changes to reflect the currently
displayed selection.
Difference between
Value at value axis cursors
Time Cursor 1
Value at
Value Cursor 1
Value at Difference between
Time Cursor 2 time axis cursors Value at
Value Cursor 2
You can show or hide the value and time cursors, as well as
the values at the cursors. You can also show or hide the value
cursor difference.
To configure the line and font colors for the cursors and
cursor value displays, see Configuring Axis Properties on
page 129.
Moving a Cursor
To move a cursor
1 Select the cursor with your mouse.
2 Drag the cursor to the spot on the chart.
As you move the cursor in the trend chart, the value for the
tag where the cursor and the tag curve meet appears.
Zooming
When you use zooming in the trend chart, the zoom value
depends on whether you are using time axis cursors.
If you are not using time axis cursors, zooming is based on
the total value for the time axis. The trend chart is zoomed in
or out based on the current percentage set for the zooming
scale. All zooms are positioned along the middle line of the
trend chart.
If you are using time axis cursors, zooming in sets the time
period to the period between the cursors. Zooming out works
as described above.
For information on setting the zooming percentage, see
Configuring Axis Properties on page 129.
To zoom in
Do one of the following:
• On the Chart menu, click Zoom In.
• Click the Zoom In toolbar button.
To zoom out
Do one of the following:
• On the Chart menu, click Zoom Out.
• Click the Zoom Out toolbar button.
Chart Grid
Viewing Statistics
You can view statistics for the data that is retrieved and
displayed for a trend. Display statistics include range,
average, minimum, maximum, sum, standard deviation, and
query properties. Examples of query properties are query
time range, start time, end time, and number of rows
returned.
Using Annotations
You can use Trend to make an annotation for a tag at any
point in time. An annotation is a user comment about a tag.
For example, you might want to save a comment about a very
high spike in a trend. You can create an annotation for the
value of the tag at the spike. All annotations are saved to the
database and can be retrieved again at a later time.
You can create a private annotation (that only you can see) or
a public annotation (which is viewable by all trend users).
Private annotations are only available to the users who
created them and have suitable access.
For each annotation, an annotation mark (solid circle) is
added to the trend. This annotation mark can be viewed on
the trend if the trend properties are set to allow it.
When you make an annotation, the following information is
stored in the Annotation table in the Runtime database of
the Wonderware Historian:
• Name of the tag for which the annotation is associated.
Adding an Annotation
Annotations are inserted in the chart at the location where
the mouse button is clicked and are associated with the
selected tag's value where the mouse button is clicked.
To add an annotation
1 Select the tag for which you want to add an annotation.
You can do this by selecting the tag in the Tag List pane.
2 Do one of the following:
• On the Chart menu, click Add Annotation.
• Right-click in the chart. In the shortcut menu that
appears, click Add Annotation.
The Add Annotation dialog box appears.
3 In the Tag List, click the name of the tag for which you
want to add the annotation.
4 In the Time list, click the time stamp of the tag value for
which you want to add the annotation.
5 In the Text window, type in your comment.
6 In the Visibility area, specify if you want the annotation to
be visible to others. Click Private to have annotations only
visible to you.Click Public to have annotations visible to
anyone who is able to log on to the database.
7 Click OK.
An annotation marker (dot) appears on the chart at the
point on the chart where the annotation was made.
If you hover with the mouse on the marker, the details for
the annotation appear on the chart.
Editing an Annotation
To edit an annotation
1 On the View menu, click Annotation List. The Annotations
dialog box appears.
2 Select the annotation in the list.
3 On the Annotations menu, click Edit. The Edit Annotation
dialog box appears.
Deleting an Annotation
Deleting an annotation removes the annotation from the
trend.
To delete an annotation
1 On the View menu, click Annotation List. The Annotations
dialog box appears.
2 Select the annotation in the list.
3 On the Annotations menu, click Delete. Confirm the
deletion.
4 Click OK.
Printing Annotations
To print the list of annotations
1 On the View menu, click Annotation List. The Annotations
dialog box appears.
2 To configure the printing options, on the File menu, click
Page Setup. The Page Setup dialog box appears.
Trending Events
A trend can be configured to show event data. An event is the
set of attributes describing the moment of satisfaction of a set
of criteria on historical tag values in the Wonderware
Historian. Attributes of an event include the date and time
that the event occurred and the criteria that were satisfied.
An event tag is a name for an event definition in the system.
Whereas these tag types are the definitions of types of
variables to be stored, an event tag is a named reference for
the description of how a specific change is detected and what
to do if it is detected.
You can select and trend event tags in the same way as any
other tag in the system. Events can also be displayed along
with analog and discrete tags.
• Relative time
• The Tag List shows the time offset for the chart data,
relative to 0. In this example, there is no offset
configured.
• The Tag Properties dialog box shows the time offset option.
For more information, see Configuring Trend Options for
a Tag on page 59.
• The times shown in the Time Bar are relative times. The
first offset time is the base time (for example,
0:00:00.000), and the second time is the time span of the
specified offset. The first offset time is always set to
0:00:00 when you transition into relative mode.
• The Tag List shows the actual start time for the tag data.
• The Tag Properties dialog box shows the start time option.
For more information, see Configuring Trend Options for
a Tag on page 59.
Step: 1 2 3 4
Item Description
ws White space.
± Minus sign indicating a negative time. Positive
time is assumed.
dws Days, with trailing white space.
d Days
hh Hours, ranging from 0 to 23.
HH Hours of 24 or greater.
mm Minutes, ranging from 0 to 59.
ss Seconds, ranging from 0 to 59.
fff Fractional seconds, from 1 to 7 decimal digits.
FF Fractional days.
2 Add the same tag again to the trend chart for the same
time period.
In this example, the ReactLevel tag was added again to
the chart.
8 Stack the traces so that you can see both sets of data
separately and then select the first tag that you added to
the chart.
In this example, the trend curve for the later set of data
(shown in green) appears on the chart, even though the
time axis reflects the time of the base batch of data
(shown in orange).
You can also use the offset to compare a trend curve against
another curve either forward or backward in time. To do this,
set the time offset of the “master” batch of data so that the
start time is the same as the start time for the batch of data
you want to compare.
3 To use the default pen styles for the tags in a trend, select
the Use default colors for new tags check box. Go to step
10.
4 To configure one or more pen styles, clear the Use default
colors for new tags check box.
5 Select a pen number from the list.
6 Click the Color box and select or configure a color for the
pen line.
7 In the Width list, select the width, in pixels, of the pen
line.
8 In the Style box, select the style of the pen, either a solid
line or one of a variety of dashes.
9 Repeat steps 5 through 8 for each pen style you want to
configure.
10 Click OK.
Entity Description
3 In the Time zone list, click the name of the time zone to
use for the Trend application.
The time zone for the Trend application in the grid shows
the new time zone picked.
For example, consider a SCADA application that
monitors a pipeline between Houston, Texas and Lake
Forest, California. The Trend application is installed on a
computer located in Houston, Texas. Therefore, the time
zone entry for the Client entity displays Central Standard
Time. The server is also located in Houston, Texas. The
time zone entry for the Server entity also displays
Central Standard Time. You want to send a trend file to
an engineer located at the start of the pipeline in Lake
Forest to aid in troubleshooting a problem. You can set
the time zone of the Trend application to reflect the time
of Lake Forest, California (Pacific Standard Time), so
that the trend that you send to the engineer displays data
in a time zone that is relevant to him/her.
4 Click OK.
6 Click OK.
7 In the Grid area, configure the color for the grid lines of
the chart. Options are the same as for Border.
8 In the Highlighting area, configure the color and pen width
to be used for tag highlighting.
• Highlight Click to select or configure a color for
color highlighting the tag curve.
• Pen width Specify how wide (in pixels) a
highlighted curve should be.
9 Click OK.
4 For each type of limit (HiHi, Hi, Lo, and LoLo), configure
the properties of the line.
• Limit line Select this check box to include a
line on the chart for the limit value.
For example, if an analog tag has a
Hi limit of 1800, a horizontal line is
drawn at the 1800 mark on the
vertical axis.
• Limit Select this check box to indicate the
excursion portion of the trace that is outside of
the limit.
• Color The color of the line.
• Width The width of the line.
• Style The style of the line.
5 Click OK.
3 In the Opacity box, enter the opacity with which you want
the target region to appear on the trend chart.
4 In the Excursion annunciation type list, specify whether
values that fall outside the target region should be
highlighted. Select Show with special color to highlight
parts of the trend graph that are outside the target region
in a special color. To select the color, click the color box
next to Target region excursion color. Select None if you do
not want any special highlighting.
5 Click OK.
t1 xt1 yt1
t2 — yt2
t3 xt3 —
t4 xt4 yt4
You can also create target regions with a “hole” in the middle.
For example, use the following points:
Note When you print a chart, only the data that is currently
displayed in the application appears in the printout. For example,
if part of the Tag List is not displayed in the application, then that
portion does not appear in the printout.
5 In the Duration list, select the time period for the trend
set. The duration is applied to all of the files in the set.
Data that is outside of the scope of the trend set duration
is ignored.
6 To save the trend set, on the File menu, click Save As. The
standard Windows Save As dialog box appears.
7 In the File name box, type a name for the file.
8 Click Save.
To delete a file
1 Select the file in the Trend files window.
2 On the File menu, click Delete.
The Report name box shows the name of the trend report
as it appears on the Wonderware Information Server.
This name is automatically created based on the name of
the file that you are publishing.
3 In the Server list, click the name of the Wonderware
Historian on which to store the report publishing
information.
The Report name box shows the name of the trend report
as it appears on the Wonderware Information Server.
This name is automatically created based on the name of
the file that you are publishing.
3 In the Server list, click the name of the Wonderware
Historian on which to store the report publishing
information.
4 In the Report site list, select the URL of the Wonderware
Information Server to which you want to publish the
trend.
The report site may or may not be physically located on
the Wonderware Historian computer.
5 In the Report type area, click On demand.
6 In the Report group list, click the name of the physical
folder on the report site where the static report is posted.
Annotating a Chart
To annotate a chart or the application window
1 Create a trend chart.
2 On the Tools menu, click Annotate Chart or Annotate
Application. The Annotate Layout dialog box appears.
To delete annotations
Do one of the following:
• To delete all annotations on a chart, on the Edit menu,
point to Clear and then click All.
• To delete annotations that you selected using the
lasso, on the Edit menu, point to Clear and then click
Selection.
Note You only need to configure the e-mail server one time. If
you have already done this, go to step 3.
Chapter 4
• Query Toolbar
• Tag Picker (may not appear depending on the query type)
• Columns Pane
• Results Pane
• Status Bar
Query Toolbar
Use the query toolbar to select the query type, server, and
database for the query.
The Servers list contains the list of connected servers. The
Database list is only available if the query type is Custom.
Columns Pane
Use the Columns pane to select details for the query.
Results Pane
Use the Results pane to view the results of the query that you
have created. The Results pane includes three tabs:
• SQL tab
• Data tab
The SQL tab shows the actual SQL statement that is sent to
the server.
The Data tab shows the data returned by the SQL statement.
The All queries tab shows all of the SQL statements that have
been created for the selected tag type for the current query.
To view all the SQL statements, click All queries on the
Options menu.
Status Bar
The right side of the status bar shows the status of the
Wonderware Historian. If the Data tab in the Results pane is
selected, then the number of rows of result data is also shown
in the status bar.
For more information on the status bar, see Status Bar on
page 38.
To save a query
1 Do one of the following:
• On the File menu, click Save.
• Click the Save File toolbar button.
The standard Windows Save As dialog box appears.
2 In the Save As dialog box, type a name for the query.
You can select to save the query as a SQL script file (the )
or as a text file.
3 Click OK.
Creating a Query
When you configure a query, you must select the tag or tags
for which you want to retrieve data, the type of query, and
the server(s) from which to retrieve the data. The data is
queried from the database to which you are currently logged
on. You can also configure additional parameters that are
specific to each query type.
There is no limit to the number of tags in a query; you can
include as many as your system allows.
To create a query
1 In the Query type list in the toolbar, click the name of the
type of query you want to use as a starting point. For
more information on the possible types, see Query Types
on page 169.
2 In the Server list, click the name of the server from which
you want to retrieve data.
3 Use the Tag Picker to find tags in the Wonderware
Historian database that you want to include in your
query. For more information on the Tag Picker, see Tag
Picker on page 39.
Note You do not have to execute the query. The Query application
automatically executes the query after you switch to the Data
tab, or if you make any changes while the Data tab is shown.
Query Types
The following types of queries are supported. For each query
type, a set of relevant tabs appear in the Columns pane so
that you can configure the details for the query. Some of the
tabs are the same for multiple query types.
• Query Type: Aggregate Values
Criteria Tab
Use the Criteria tab to specify the filtering criteria for the
data value(s) to be returned.
Calculations Tab
Use the Calculations tab to configure the aggregations to
perform on the values for the selected tag(s).
Columns tab
Use the Columns tab to configure the columns that are
returned for the results.
• Date and time: The time stamp for the returned value. For
delta retrieval, this is the time at which the value was
acquired by the Wonderware Historian. For cyclic
retrieval, this is the specific time requested or calculated
(using a SQL function).
• Include milliseconds: Used to include milliseconds in the
timestamp.
Columns Tab
Use the Columns tab to select the columns that you want to
include in the query results.
• Last: The last value within the retrieval cycle or the most
recent value prior to the cycle.
• LastDateTime: The time stamp associated with the Last
value, which can be earlier than the StartDateTime if
this is the initial value for the retrieval cycle.
• Minimum: The minimum value that occurred within the
retrieval cycle.
To view annotations
1 In the Query Type list in the toolbar, click Annotations.
2 If you want to only retrieve annotations for particular
tag(s), use the Tag Picker to select one or more tags. For
example, if you want to search for annotations for all
analog tags, select the All Analog Tags public group and
then select all analog tags in the Tags pane.
3 In the Columns pane, click on each tab and configure the
parameters for the query:
• See Criteria Tab on page 180.
• See Time Tab on page 208.
4 To view the results, click the Data tab in the Results pane.
Criteria Tab
Use the Criteria tab to specify the type of annotations to be
retrieved and which columns to show in the results. The
Tagname column always appears.
Columns Tab
Use the Columns tab to configure the columns to show in the
results.
Columns Tab
Use the Columns tab to configure the columns to show in the
results.To configure the columns
Columns Tab
Use the Columns tab to configure the columns to show in the
results. The Value (numeric value) and vValue (string value)
columns are always shown.
Note Some of the columns are not available when you select
Wide query format on the Format tab.
Criteria Tab
Use the Criteria tab to specify the filtering criteria for the
data value(s) to be returned.
Note If you use a string criterion, you can only retrieve data for
string tags in the query. No data is returned for tags of other types
that you may have selected.
Retrieval Tab
Use the Retrieval tab to configure data retrieval options.
Other Tab
Use the Other tab to configure other data retrieval options.
Columns Tab
Use the Columns tab to configure the columns to show in the
results.
• Date and time: The time stamp for the returned value.
For delta retrieval, this is the time at which the value
was acquired by the Wonderware Historian. For cyclic
retrieval, this is the specific time requested or calculated
(using a SQL function).
• Include milliseconds: Used to include milliseconds in the
timestamp.
• Raw value range: The minimum value of the raw acquired
value. Also, the maximum value of the raw acquired
value.
3 In the Tag type list, click the type of tag for which you
want to return the total number.
4 To view the results, click the Data tab in the Results pane.
Columns Tab
Use the Columns tab to select which columns to include in the
query results.
Criteria Tab
Use the Criteria tab to specify the filtering criteria for the
data value(s) to be returned.
5 To view the results, click the Data tab in the Results pane.
Columns Tab
Use the Columns tab to select which columns to include in the
query results.
Calculations Tab
Use the Calculations tab to specify which calculated values to
retrieve from the database.
5 To view the results, click the Data tab in the Results pane.
Search Tab
Use the Search tab to search for a tag in the database.
1 In the Tag type list, click the type of tag to search for,
either Analog, Discrete, Event, String, or Summary.
2 For summary tags, further restrict the search by
specifying a particular calculation type or frequency.
• Calculation type: The type of calculation. Sum,
Maximum, Minimum, or Average.
• Calculation frequency: The time duration, in seconds,
for which the calculation is performed.
3 Select the Show check boxes to show the calculation type
and/or frequency in the result set.
Time Tab
Use the Time tab to specify the time options for the query.
The grid shows the time zone and daylight savings time
settings for the following entities:
Entity Description
Format Tab
Use the Format tab to specify how the results of the query are
presented.
Retrieval Tab
Use the Retrieval tab to specify the “granularity” of the data
to be returned.
Source Tab
Use the Source tab to specify the data version and type of
table for the query.
Order Tab
Use the Order tab to specify how the results are ordered.
Chapter 5
Getting Started
If the Wonderware Historian Client Workbook is installed, an
additional menu is added on the Add-Ins tab of Microsoft
Excel. This Wonderware Historian Client menu contains all
of the commands you use to create a report using
Wonderware Historian data. Also, you can use the
Wonderware Historian Client toolbar to access some of the
commands.
You can either update the links or keep them the same. No
matter which option you select, the Wonderware Historian
Client Workbook add-in automatically updates only the
Wonderware Historian Client Workbook reference within the
file to use the current add-in location. You can update the
links or keep them the same. If you update the links, click
Continue in the dialog box that appears.
3 In the Manage list, select Excel Add-ins, and then click Go.
The Add-Ins dialog box appears.
When the specific inputs are provided and the array formula
is executed, the results appear in one or more cells. You can
click anywhere in the array results to see the associated
formula.
You can manually create or edit array formulas in the same
way that you create or edit other formulas, except you press
CTRL+SHIFT+ENTER to enter or update the array formula.
Note There are certain limitations when working with arrays. For
more information, see the following link:
http://support.microsoft.com/kb/166342/
To refresh
1 Select the function to refresh. If you want to refresh an
array formula, select any cell in the array.
2 Do one of the following:
• On the Add-Ins tab, on the Wonderware Historian
Client menu, click Refresh Function.
• On the Add-Ins tab, in the Custom Toolbars group, click
the Refresh Function toolbar button.
The function is executed and the results are returned.
Editing a Function
To edit a function
1 Select the function to edit. If you want to edit an array
formula, select any cell in the array.
2 Do one of the following:
• On the Add-Ins tab, on the Wonderware Historian
Client menu, click Edit Function.
• On the Add-Ins tab, in the Custom Toolbars group, click
the Edit Function toolbar button.
If applicable, the appropriate wizard opens, allowing you
to edit the query.
Refreshing a Sheet
You can refresh all of the formulas for a selected worksheet.
To refresh a worksheet
1 Select any cell in the sheet.
2 Do one of the following:
• On the Add-Ins tab, on the Wonderware Historian
Client menu, click Refresh Sheet.
• On the Add-Ins tab, in the Custom Toolbars group, click
the Refresh Sheet toolbar button.
The query is executed and the worksheet is updated with
the returned results.
Copying a Function
You can copy functions to different locations in the
worksheet. This is useful when creating additional functions
that are only slightly different than existing functions.
To copy a function
1 In the worksheet, select the range of cells that contains
the array formula. To select all of the array cells, insert
the mouse cursor in the array and then press CTRL+/ on
your keyboard, where / is the forward slash.
2 Press CTRL+C to copy the function.
3 Insert the mouse cursor in the new location for the
function.
4 Press CTRL+V to paste the function.
For information on manually editing a function, see
Manually Editing a Function on page 224.
Selecting Cells
Various option boxes require you to specify a worksheet cell
for either input or output. You can easily select the cell or
range of cells that you want to use, eliminating the need to
type the formula for the cell location.
5 In the Select cell range to insert tags list, click the name of
the workbook cell into which you want to insert the tags.
For more information, see Selecting Cells on page 227.
6 Click OK.
The summary tags are inserted into the selected cell.
6 In the Select cell for output list, specify the location of the
worksheet cell(s) that will contain the output. Click on
the button to select the cell(s) using your mouse. For more
information, see Selecting Cells on page 227.
7 Select the Enter the results as an array-formula check box
to insert the results as an array formula. An array
formula can perform one or more calculations and then
return either single result or multiple results. An array
formula allows for the resending of the query, since the
query parameters are included in the cells that contain
the query results. For more information, see Working
with Functions, Formulas, and Cells on page 219.
8 Select the Select cells to specify format options check box
to specify a range of cells that contain formatting
information. The formatting information in the cells will
be applied to the query results. For more information, see
Selecting Cells on page 227.
6 In the Select cell for output list, specify the location of the
worksheet cell(s) that will contain the output. Click on
the button to select the cell(s) using your mouse. For more
information, see Selecting Cells on page 227.
7 Select the Enter the results as an array-formula check box
to insert the results as an array formula. An array
formula can perform one or more calculations and then
return either single result or multiple results. An array
formula allows for the resending of the query, since the
query parameters are included in the cells that contain
the query results. For more information, see Working
with Functions, Formulas, and Cells on page 219.
8 In the Select cell for output list, specify the location of the
worksheet cell(s) that will contain the output. Click on
the button to select the cell(s) using your mouse. For
more information, see Selecting Cells on page 227.
9 Select the Enter the results as an array-formula check box
to insert the results as an array formula. An array
formula can perform one or more calculations and then
return either single result or multiple results. An array
formula allows for the resending of the query, since the
query parameters are included in the cells that contain
the query results. For more information, see Working
with Functions, Formulas, and Cells on page 219.
10 Select the Select cells to specify format options check box
to specify a range of cells that contain formatting
information. The formatting information in the cells will
be applied to the query results. For more information, see
Selecting Cells on page 227.
7 In the Select cell for output list, specify the location of the
worksheet cell(s) that will contain the output. Click on
the button to select the cell(s) using your mouse. For
more information, see Selecting Cells on page 227.
8 Select the Enter the results as an array-formula check box
to insert the results as an array formula. An array
formula can perform one or more calculations and then
return either single result or multiple results. An array
formula allows for the resending of the query, since the
query parameters are included in the cells that contain
the query results. For more information, see Working
with Functions, Formulas, and Cells on page 219.
9 Select the Select cells to specify format options check box
to specify a range of cells that contain formatting
information. The formatting information in the cells will
be applied to the query results. For more information, see
Selecting Cells on page 227.
Retrieval Tab
Use the Retrieval tab to configure the data retrieval mode
and additional retrieval options. For a detailed description of
retrieval modes and options, see Understanding Retrieval
Modes on page 683 andUnderstanding Retrieval Options on
page 749.
Other Tab
Use the Other tab to configure the other retrieval options.
7 In the Select cell for output list, specify the location of the
worksheet cell(s) that will contain the output. Click on
the button to select the cell(s) using your mouse. For more
information, see Selecting Cells on page 227.
8 Select the Enter the results as an array-formula check box
to insert the results as an array formula. An array
formula can perform one or more calculations and then
return either single result or multiple results. An array
formula allows for the resending of the query, since the
query parameters are included in the cells that contain
the query results. For more information, see Working
with Functions, Formulas, and Cells on page 219.
9 Select the Select cells to specify format options check box
to specify a range of cells that contain formatting
information. The formatting information in the cells will
be applied to the query results. For more information, see
Selecting Cells on page 227.
14 Click Finish.
Calculations Tab
Use the Calculations tab to specify which calculated values to
retrieve from the database.
Resolution Tab
Use the Resolution tab to specify the "granularity" of the data
to be returned.
7 In the Select cell for output list, specify the location of the
worksheet cell(s) that will contain the output. Click on
the button to select the cell(s) using your mouse. For
more information, see Selecting Cells on page 227.
8 Select the Enter the results as an array-formula check box
to insert the results as an array formula. An array
formula can perform one or more calculations and then
return either single result or multiple results. An array
formula allows for the resending of the query, since the
query parameters are included in the cells that contain
the query results. For more information, see Working
with Functions, Formulas, and Cells on page 219.
9 Select the Select cells to specify format options check box
to specify a range of cells that contain formatting
information. The formatting information in the cells will
be applied to the query results. For more information, see
Selecting Cells on page 227.
14 Click Finish.
7 In the Select cell for output list, specify the location of the
worksheet cell(s) that will contain the output. Click on
the button to select the cell(s) using your mouse. For
more information, see Selecting Cells on page 227.
8 Select the Enter the results as an array-formula check box
to insert the results as an array formula. An array
formula can perform one or more calculations and then
return either single result or multiple results. An array
formula allows for the resending of the query, since the
query parameters are included in the cells that contain
the query results. For more information, see Working
with Functions, Formulas, and Cells on page 219.
9 Select the Select cells to specify format options check box
to specify a range of cells that contain formatting
information. The formatting information in the cells will
be applied to the query results. For more information, see
Selecting Cells on page 227.
14 Click Finish.
Format Tab
Use the Format tab to specify the order in which tags and
data are returned and how the results of the query are
presented. The retrieval options you choose determine what
appears on the Criteria tab. For more information on this tab,
see Criteria Tab on page 268.
Criteria Tab
Use the Criteria tab to specify the filtering criteria for the
data value(s) to be returned.
The filtering criteria options are determined by what you
selected for the display format for the returned data, either
"narrow" or "wide." For more information, see Format Tab on
page 267.
For tag based criteria (wide tables), data values are returned
if they match certain criteria applied to the column for a
tagname. For example, if Tagname1 > 5000.
A NULL value indicates that a column entry has no assigned
value. A NULL value is not the same as a numeric value of 0
or an empty string.
Order Tab
Use the Order tab to specify how the results are ordered.
13 Click Finish.
Note The assignments are not absolute and may change in future
releases.
Batch Analysis
Use the Batch Analysis wizard to graph one analog tag over
two time periods.
7 In the Starting time list, enter the starting time for the
first time period. Click the arrow button to select a date
from a calendar.
8 In the Starting time for second time period list, enter the
starting time for the second time period. Click the arrow
button to select a date from a calendar.
9 In the Duration lists, specify the duration and the
duration unit. For example, 10 minutes. The duration is
used to calculate the end dates for the query.
10 Click Next. The Tag Analysis - Step 4 of 4 dialog box
appears.
12 Click Finish.
Note If you reduce the resolution by half, but do not adjust the
time range (duration), only half of the time is reflected in the
trend chart. If you want to make changes to the input parameters
that affect the total number of returned rows, you must modify
the chart to reference the new cell ranges. You must also refresh
the worksheet functions.
Scatter Analysis
Use the Scatter Analysis wizard to create a scatter plot of two
analog tags.
7 In the Starting time list, enter the starting time for the
query. Click the arrow button to select a date from a
calendar.
8 (optional) To show data for a second time period in the
same scatter plot, enter a second starting time in the
Starting time for second time period list. Click the arrow
button to select a date from a calendar.
Using a second time period allows you to view differences
in operation for two time periods.
9 In the Duration lists, specify the duration and the
duration unit. For example, 10 minutes. The duration is
used to calculate the end date for the query.
7 In the Starting time list, enter the starting time for the
query. Click the arrow button to select a date from a
calendar.
8 In the Duration lists, specify the duration and the
duration unit. For example, 10 minutes. The duration is
used to calculate the end date for the query.
9 Click Next. The Tag Analysis - Step 4 of 5 dialog box
appears.
7 In the Starting time list, enter the starting time for the
query. Click the arrow button to select a date from a
calendar.
8 In the Duration lists, specify the duration and the
duration unit. For example, 10 minutes. The duration is
used to calculate the end date for the query.
=wwAnalogWideHistory(A1,A3,"Row1",B2,B2,FALSE,
" ",TRUE,FALSE)
where the "B2, B2," portion of the function is the
associated column used to determine the analog value at
the time of the discrete tag transition.
There are "hidden" values that appear in a font that
matches the worksheet background. These values are
used for the chart.
7 In the Starting time list, enter the starting time for the
query. Click the arrow button to select a date from a
calendar.
8 In the Duration lists, specify the duration and the
duration unit. For example, 10 hours. The duration is
used to calculate the end date for the query.
9 Click Next. The Tag Analysis - Step 4 of 4 dialog box
appears.
11 Click Finish.
7 Click OK.
8 To edit the query, click in the cell that contains the red
triangle.
Note The Refresh Sheet command refreshes the data values, but
not the formatting.
Entity Description
3 In the Time zone list, click the name of the time zone to
use for the Workbook application.
The time zone for the Workbook application in the grid
displays the new time zone picked.
For example, consider a SCADA application that
monitors a pipeline between Houston, Texas and Lake
Forest, California. The Workbook application is installed
on a computer located in Houston, Texas. Therefore, the
time zone entry for the Client entity displays Central
Standard Time. The server is also located in Houston,
Texas. The time zone entry for the Server entity also
displays Central Standard Time. You want to send a
Workbook file to an engineer located at the start of the
pipeline in Lake Forest to aid in troubleshooting a
problem. You can set the time zone of the Workbook
application to reflect the time of Lake Forest, California
(Pacific Standard Time), so that the workbook that you
send to the engineer displays data in a time zone that is
relevant to him/her.
4 Click OK.
Bound times
For a "bound" time, the values that are currently assigned to
the AFStartBinding and AFEndBinding named ranges are
used for the start and end times. For more information, see
Using "Binding" Tags to a Query at Run Time on page 315.
The Bound times option only appears if the Bound Tags of Type
option is selected in a data retrieval wizard.
Relative time
You can define a query that uses a relative time in the past
for the starting date. For example, the last five minutes from
the current time.
Absolute time
Absolute time uses fixed start and end dates that you specify.
You can either specify a time range or single point in time. If
you specify single point in time, only single tag value at that
point in time is retrieved.
Publishing Reports
You can publish spreadsheet reports to the Wonderware
Information Server. When you publish a report, the report
information is stored in special tables in the Wonderware
Historian, and the file is copied to a folder on the
Wonderware Information Server. When you publish a report,
Wonderware Information Server users can view the report
you published with only the browser software.
Published reports are of two types:
• Static. For a static report, data is retrieved at the time
the report is published to the Wonderware Information
Server. After that, its content remains static and does not
change when users access it.
• Dynamic. For a dynamic report, new data is retrieved
from the database every time a user requests the report.
Function Arguments
The following arguments are used for the Wonderware
Historian Client Workbook functions:
ActionType
The unique identifier for a particular type of action. Event
tags and actions are linked via this key. The event subsystem
relies on the following values, which are added during
installation: 1 = No action; 2 = Generic SQL; 3 = Snapshot; 4
= E-mail; 5 = Deadband; 6 = Summary.
• TRUE - Includes the action type in the results.
AggCalc
Specifies what aggregate calculation is performed for the
specified tagname. Valid values are:
• MIN - Calculates the minimum value. Delta retrieval is
used.
AnalogFilter
Specifies the analog filters for wwHistory3 or
wwWideHistory3 functions. Valid values are:
Value Description
DataSource
The name of the server to use. You can also specify the
worksheet cell containing the server to use.
DateTime
The date/time stamp.
Description
TRUE = Include the tag description in the results. Only the
tags that meet the filtering criteria are included.
FALSE = Do not include the tag description in the results.
DescriptionFilter
Type a description filter (or reference a cell).
DetectDatetime
TRUE = Include the date and time stamp of the event
detection in the results.
FALSE = Do not include the date/time in the results.
DetectorType
The unique identifier for a particular type of detector. Event
tags and detectors are linked via this key. The event system
relies on the following values, which are added during
installation: 1 = System; 2 = External event; 3 = Generic
SQL; 4 = Analog specific value; 5 = Discrete specific value; 6
= Time-based (schedule).
TRUE = Include the detector type in the results.
FALSE = Do not include the detector type in the results.
DisplayAsWide
TRUE = Return the results in the "wide" table format. That
is, return a column of values for each tag specified in the
function.
FALSE = Return the results in the "narrow" table format.
That is, return one value for each tag per row in the result
set.
DisplayDatetime
TRUE = Include the date and time stamp in the results.
FALSE = Do not include the date/time in the results.
DisplayFlags
Determines which data columns to include in the results.
This parameter is an integer representing a bit pattern
where each bit represents a data column. If the bit is set to 1,
the column is included in the results.
When you use this parameter with the wwHistory2 function,
the bits are as follows (bit 0 is the rightmost bit):
Integer
Bit Display option equivalent
18 wwStateCalc 262144
17 wwInterpolationType 131072
16 Value timestamp 65536
15 Show milliseconds in timestamp 32768
14 Quality 16384
13 OPC quality 8192
12 Quality detail 4096
11 wwRetrievalMode 2048
10 wwTagKey 1024
9 wwCycleCount 512
8 wwResolution 256
7 wwTimeDeadband 128
6 wwValueDeadband 64
5 wwTimestampRule 32
4 wwQualityRule 16
3 wwVersion 8
2 wwTimeZone 4
1 wwEdgeDetection 2
0 PercentGood 1
Integer
Bit Display option equivalent
13 wwStateCalc 8192
12 wwInterpolationType 4096
11 Value timestamp 2048
10 Show milliseconds in timestamp 1024
9 wwRetrievalMode 512
8 wwCycleCount 256
7 wwResolution 128
6 wwTimeDeadband 64
5 wwValueDeadband 32
4 wwTimestampRule 16
3 wwQualityRule 8
2 wwVersion 4
1 wwTimeZone 2
0 wwEdgeDetection 1
Integer
Bit Display option equivalent
DisplayMilliseconds
TRUE = Include the milliseconds in results. By default,
Microsoft Excel does not return milliseconds.
FALSE = Do not include the milliseconds in the results.
DisplayOPCQuality
TRUE = Include the quality value in the results.
FALSE = Do not include the quality value in the results.
DisplayQuality
TRUE = Include the quality value in the results.
FALSE = Do not include the quality value in the results.
DisplayTagName
TRUE = Include the TagName in the results.
FALSE = Do not include the TagName in the results.
EdgeDetection
The moment at which the edge detection criteria is met. Valid
values are:
Value Description
-1 No edge detection.
0 None. Returns all rows that successfully meet the
criteria; no edge detection is implemented at the
specified resolution.
1 Leading. Returns only rows that are the first to
successfully meet the criteria (return true) after a
row did not successfully meet the criteria
(returned false).
2 Trailing. Returns only rows that are the first to
fail the criteria (return false) after a row
successfully met the criteria (returned true).
3 Both. All rows satisfying both the leading and
trailing conditions are returned.
EngUnit
TRUE = Include the engineering units in the results.
FALSE = Do not include the engineering units in the results.
EURange
TRUE = Include the engineering range in the results.
FALSE = Do not include the engineering range in the results.
EventTagRange
Specifies the cell range that contains the event tag names for
the query.
HistoryVersion
Specifies the history version for data retrieval. For more
information, see History Version (wwVersion) on page 767.
When used with the wwHistory2 or wwWideHistory2
functions, valid values are:
Value Description
Value Description
0 Not specified.
1 Retrieve the original values historized for a tag.
2 Retrieve the latest values available for a tag.
Interpolation
Specifies the interpolation type for data retrieval. When used
with the wwHistory2 or wwWideHistory2 functions, valid
values are:
Value Description
Logged
Determines whether events are logged to the EventHistory
table in the Wonderware Historian. 0 = Events are not
logged; 1 = Events are logged.
TRUE = Include the log setting in the results.
FALSE = Do not include the log setting in the results.
MaxLength
TRUE = Include the maximum length of the string tag in the
results.
FALSE = Do not include the maximum length in the results.
Messages
TRUE = Include the messages associated with the discrete
tag in the results.
FALSE = Do not include the messages in the results.
OptionRange
Reference to a range of cells that contains formatting options,
which are applied to the query results. The option range must
be nine contiguous cells with the following acceptable values:
OrderBy
Text string that specifies the result order. For example:
ORDER BY DateTime Desc.
QualityRule
Specifies the quality rule for data retrieval. Valid values are
options 0, 1, and 3 of the aaQualityRules Enumeration. For
more information, see aaQualityRules Enumeration on
page 489.
RawRange
TRUE = Include the raw range for the tag in the results.
FALSE = Do not include the raw range in the results.
ReplacePoorQuality
TRUE = Poor data quality is replaced with word "poor."
FALSE = Data quality not replaced. This is the default value.
Reset
Setting this value has no effect. Provided for
backward-compatibility only. Valid values are: TRUE,
FALSE.
RetrievalMode
Specifies the type of data retrieval. When used with the
wwHistory2 or wwWideHistory2 functions, valid values are
options 0 to 11 of the aaRetrievalMode enumeration. For
more information, see aaRetrievalMode Enumeration on
page 490.
When used with other functions, valid values are:
TRUE = Cyclic retrieval. All stored data for the specified
time interval is returned. This is the default retrieval mode.
FALSE = Delta retrieval. Only values that changed during
the specified time interval are returned.
RowLimit
Specifies the maximum number of rows for the data retrieval
to avoid excessively large result sets. For example, if you set
a row limit of 200, the historian only returns the first 200
rows of a query’s results. The row limit applies to each query.
In the Trend application, multiple queries may be used for
the tags in a trend depending on the tags’ configuration.
Therefore, the total number of rows retrieved may be higher
than the row limit you configured in the application options.
• There are five tags in the trend. Four of them use the
application options, but one of them is separately
configured for a row limit of 100.
In this case, the four tags that use the application options are
combined in a single query, but a separate query is created
for the tag with the custom row limit. Therefore, you may
receive up to 300 rows for all tags combined.
RowOrRes
Specifies whether the number of rows returned are based on
data resolution or a row count. A resolution is the sampling
interval between rows returned for the specified time period.
A row count is the number of rows to be returned . You can
either select a cell containing the RowOrRes value or type in
the value. Examples are:
Row50 = 50 evenly spaced rows returned.
Row44 = 44 evenly spaced rows returned.
Res1000 = n number of rows at a 1 second resolution.
ResFull = n number of rows at a full resolution. The lowest
storage rate of the selected tags is used. This is not an option
for tags stored by exception (delta storage).
ScanRate
The scan rate is the interval, in milliseconds, at which the
system will check to see if the event conditions specified by
the detector have occurred. This value must be greater than
or equal to 500 milliseconds, and less than or equal to 1 hour
(3600000 ms).
TRUE = Include the scan rate for the event tag in the results.
FALSE = Do not include the scan rate in the results.
SnapshotTagRange
The range of cells that contains the names of snapshot tags
for the query.
SnapshotTagType
Specifies the type of snapshot tag. Valid values are: Analog,
Discrete, String, and Summary (if applicable).
State
Specifies the state for which Time-in-State data is retrieved
for a tag. This parameter is only relevant for Time-in-State
retrieval mode. It specifies the unique tag state for which
Time-in-State information is calculated based on the
calculation type specified by the StateCalculation parameter.
StateCalculation
Specifies the calculation type for Time-in-State data
retrieval. Valid values are options 0 to 4 of the
aaStateCalculation Enumeration. For more information, see
aaStateCalculation Enumeration on page 491.
Status
The flag used by the event system at system startup and
during runtime to determine if the event tag has been
modified. 0 = Posted. Any changes have been detected and
effected by the system. 1 = New. An event tag has been
inserted, but is not yet executing. 2 = Modification. An event
tag has been updated, but the older one is already executing.
98 = Disabled. 99 = Disabling requested. The event tag does
not execute, even though the definition still exists in the
schema. Note that there may be a delay of up to 30 seconds
before a change in an event tag is seen by the running
system.
TRUE = Include the status for the event tag in the results.
FALSE = Do not include the status in the results.
SQLQuery
The cell address of a custom SQL query.
Storage
TRUE = Include the storage type (and rate, if cyclic) for the
tag in the results.
FALSE = Do not include the storage type or rate in the
results.
SummaryPeriod
The time period between summary calculations. Valid values
are any of the configured summary periods.
SummaryType
Type of aggregation to be performed. Valid values are: Min,
Max, Avg, and Sum.
TagCriteria
Enables criteria to be applied to each of the tags for the
query. For example, "AND Tag1 > 33"
TagFilter
The filter string for the tag search. You can also specify a cell
address that contains the filter string.
TagRange
Contiguous range of cells containing the tagname(s) for the
query. You can also specify a range of cells that contains the
tagnames.
Time1
Determines the dates for the query, in conjunction with the
Time2 argument.
(starting time) = Absolute time. You can either type the
starting time or reference a cell containing a valid start time.
The value of the Time2 argument is used to specify the end
time.
REL = Relative time. The value of the Time2 argument are
used to specify a reference from the base date.
This argument accepts date/times as real (double) numbers,
in addition to dates.
Time2
Determines the dates for the query, in conjunction with the
Time1 argument.
If the Time1 argument contains the starting time, specify the
end time of the query.
If the Time1 argument is set to REL (relative time), specify
the time relative to the base date. The required form is:
###T(##:##:##)
where
### = Number of time units from the date/time.
T = Time unit (d=days, h=hours, m=minutes, and s=seconds).
(##:##:##) = Time that the time units are relative to. This
time and the base date are used together to determine the
date/time. To specify the now as the date/time, leave the
parentheses empty.
Examples are:
+20m(5:00) Starting at 5:00 of the BaseDate, ending 20
minutes later.
-20m() Starting 20 minutes ago, ending now.
-20m(#Time) Uses the configured base time.
TimeDeadband
The minimum time, in milliseconds, between returned values
for a single tag. Applies only to delta retrieval.
TimestampRule
Specifies the timestamp rule for data retrieval. Valid values
are options 0, 1, and 3 of the aaTimeStampRules
Enumeration. For more information, see aaTimeStampRules
Enumeration on page 492.
UseStringHistory
TRUE = Include the string history table for query.
FALSE = Do not include the string history table for query.
ValueCriteria
Enables a criterion to be specified for the tagname value. The
criterion acts as a calculation filter.
For example, if you are performing aggregate calculations on
the tag "SysTimeSec" and want the aggregation based only
on values > 20, set this parameter to:
"value > 20 AND value IS NOT NULL"
"quality = 0"
"value > 20 AND quality = 0"
ValueDeadband
The percentage of full scale (range), in engineering units.
Any value changes that are less than this percentage are not
returned. Applies only to delta retrieval.
2 In the Server list, click the name of the server for which
you want to view details.
3 Review the information for the server.
4 Click OK.
Chapter 6
Getting Started
Use this section to get started with the Wonderware
Historian Client.
3 In the Manage list, select Word Add-ins, and then click Go.
The Templates and Add-Ins dialog box appears.
In the following graphic, the field codes are hidden. For more
information on showing or hiding the field codes, see
Showing/Hiding Field Codes on page 358.
Note Running a report document replaces all the field codes with
actual data.
The field codes are replaced with data and the resulting
report document appears. For example:
5 You can then copy the report template file into the
Microsoft Word template directory and use it to create
report documents or as a basis to create new report
template files.
You can also click the Query button to start the Query
client tool. You can use the Query client to build a query,
which is inserted into the Query box. For more
information, see Chapter 4, Wonderware Historian Client
Query.
5 Click OK.
The query is inserted into the report document or report
template.
Editing a Query
You can edit an existing query in a report template or report
document that has not yet been run. (After a report document
is run, all queries are converted to actual data.)
You can either edit a query manually by typing changes in
the query string or by using the Direct Query dialog box to
select different options.
Both methods require that the field codes for the report
document or template are visible. For more information, see
About Field Codes on page 356.
#time Wildcard
The #time wildcard is used to represent the current date
(today) in the query. The use of this wildcard allows you to
run the report document on any day and retrieve the data for
the same time period.
For example, the WHERE clause for a query for the last eight
hours of today's data, starting at 17:00 is as follows:
WHERE DateTime >= '#time(17:0:0)-8h'
AND DateTime <= '#time(17:0:0)'
The time specification for the query is indicated in the
parentheses.
The valid duration units for the time offset are:
• s = seconds
• mi = minutes
• h = hours
• d = days
• w = weeks
• mm = months
#date Wildcard
The #date wildcard is used to represent a specific date in the
query. This wildcard is similar to the #time wildcard. The
#time wildcard is a placeholder for the current date, and the
#date wildcard is a placeholder for a specific date.
For example:
WHERE DateTime >= '#date(17:0:0)-8h'
AND DateTime <= '#date(17:0:0)'
The WHERE clause indicates to use the last eight hours of
data, starting at 17:00, for the date that is specified by the
Report Date option in the Report Options dialog box. For more
information, see Configuring Report Options on page 375.
The time specification for the query is specified within
parenthesis.
The valid duration units for the time offset are:
• s = seconds
• mi = minutes
• h = hours
• d = days
• w = weeks
• mm = months
#ReportTime Wildcard
The #ReportTime wildcard is used to represent the report
time in the query. This wildcard can be used with the #time
and #date wildcards.
For example:
WHERE DateTime >= '#time(#ReportTime)-8h'
AND DateTime <= '#time(#ReportTime)'
This WHERE clause indicates to use the last eight hours of
data, for today's date, for the time that is specified by the
Report Time option in the Report Options dialog box.
Another example is:
WHERE DateTime >= '#date(#ReportTime)-8h'
AND DateTime <= '#date(#ReportTime)'
This WHERE clause indicates to use the last eight hours of
data for the date and time specified by the Report Date and
Report Time options, respectively, in the Report Options dialog
box. For more information, see Configuring Report Options
on page 375.
• mi = minutes
• h = hours
• d = days
• w = weeks
• mm = months
2 In the Date and time area, configure the base time and
date used for the report wildcards. Every time this report
document is run, the same date and time are used. For
more information on the wildcards, see About Date and
Time Wildcards on page 370.
• Report date: The date to be used as the base date for a
relative date/time in the query. Click the arrow
button to access a calendar.
• Report time: The time to be used as for a relative
date/time in the query.
3 Select the Suppress messages when report is running check
box to stop dialog box messages from being displayed
when the report is running.
4 Select the Use date/time wildcards check box to allow for
the use of wildcards in a query. You are prompted to
specify the wildcards during the query configuration.
5 In the Maximum rows per query list, specify the maximum
number of rows returned for the query.
6 Click OK.
Chapter 7
• aaHistClientQuery Control
• aaHistClientTagPicker Control
• aaHistClientSingleValueEntry Control
• aaHistClientActiveDataGrid Control
• aaServer Object
• aaServers Object
• aaHistClientWorkbookRunner Object
• aaHistClientReportRunner Object
• Int = 32 bits
• Long = 64 bits
• Short = 16 bits
• Int = 32 bits
• Long = 32 bits
• Short = 16 bits
Chapter 8
aaHistClientTrend Control
aaHistClientTrend Properties
The aaHistClientTrend properties include:
• AddMultipleTags
• AllowContextMenu
• AllowGridEditing
• AlwaysUseFullForXYScatterPlots
• AnalogPlottingAlgorithm
• ApplyRubberBandToAllTags
• AutoRefreshMode
• BackColor
• BackGradient
• BackGradientEndColor
• BackImage
• BorderColor
• BorderStyle
• BorderWidth
• ChartType
• CurrentTrendItem
• CurrentServerName
• CurrentTagColor
• CurrentTagCycleCount
• CurrentTagEffectiveRetrievalMode
• CurrentTagFormat
• CurrentTagHistoryVersion
• CurrentTagIndex
• CurrentTagInterpolationType
• CurrentTagName
• CurrentTagNumStyles
• CurrentTagOffsetMS
• CurrentTagPenStyle
• CurrentTagPenWidth
• CurrentTagPrecision
• CurrentTagQualityRule
• CurrentTagResolution
• CurrentTagRetrievalMode
• CurrentTagRetrievalStyle
• CurrentTagRowLimit
• CurrentTagStartDate
• CurrentTagState
• CurrentTagStateCalculation
• CurrentTagTargetRegionVisible
• CurrentTagTimeDeadband
• CurrentTagTimeStampRule
• CurrentTagTrendType
• CurrentTagUseAutoCycles
• CurrentTagUseResolution
• CurrentTagValAtX1
• CurrentTagValAtX2
• CurrentTagValueDeadband
• CurrentValOfX1
• CurrentValOfX2
• CurrentValOfY1
• CurrentValOfY2
• CurrentXAxisTagIndex
• CurrentXAxisTagName
• CurrentXAxisTagServerName
• CyclicRows
• DataPointLabelType
• DateMode
• DatePickerFormatString
• DefaultTagFormat
• DefaultTagPrecision
• Enabled
• EnableDeltaRetrieval
• EnableSummaryData
• EnableTimeOffsets
• EndDate
• FileName
• GridColor
• GridHorizontal
• GridVertical
• GridVisible
• HideCurrentTag
• HighlightCurrentTag
• HistorySource
• LiveModeRate
• LockDown
• LoginTimeout
• MaxDeltaSamples
• MaxMinutesForDeltaAnalog
• MaxMinutesForDeltaDiscrete
• MaxSamplesPerTag
• MovingAverageMode
• MovingAverageSamples
• NumDataPointLabels
• NumTimeAxisGridPerValue
• NumTimeAxisValues
• NumXValueAxisGridLinesPerLabel
• NumXValueAxisLabels
• NumYAxisGridPerValue
• NumYAxisValues
• PanPercentage
• PlaybackSpeed
• PlotColor
• PlotGradient
• PlotGradientEndColor
• PlotImage
• PrintShowActiveTag
• PrintShowMarkers
• PrintShowTitle
• PrintTitle
• PublicAnnotations
• QueryTimeout
• RealTimeMode
• RealTimeRate
• RetrievalOptionsCycleCount
• RetrievalOptionsHistoryVersion
• RetrievalOptionsInterpolationType
• RetrievalOptionsNumStyles
• RetrievalOptionsQualityRule
• RetrievalOptionsResolution
• RetrievalOptionsRetrievalMode
• RetrievalOptionsRetrievalStyle
• RetrievalOptionsRowLimit
• RetrievalOptionsState
• RetrievalOptionsStateCalculation
• RetrievalOptionsTimeDeadband
• RetrievalOptionsTimeStampRule
• RetrievalOptionsUseAutoCycles
• RetrievalOptionsUseResolution
• RetrievalOptionsValueDeadband
• RetrieveAnnotations
• RetrieveExtensionData
• RetrieveManualData
• RTRate
• Rubberband
• RubberbandAll
• RubberBandScaling
• Servers
• ShowLimits
• ShowValuesAtCursor
• ShowWaitCursor
• ShowXAxisCursors
• ShowYAxisCursor
• SingleTagMode
• StartDate
• SummaryDataMode
• SupressErrors
• TagGridOrientation
• TagListRows
• TagPicker
• TagPickerVisible
• TargetRegionExcursionType
• TargetRegionOpacity
• TimeAxisLabelColor
• TimeBarVisible
• TimeBarVisible2
• TimeSelector
• ToolBarVisible
• ToolbarVisible2
• ToolTipText
• TraceGradientEndingPercentage
• TraceGradientStartingPercentage
• TraceGradientType
• UpdateToCurrentTimeState
• UseIniFile
• ValueAxisLabel
• Visible
• XCursor1Color
• XCursor1Pos
• XCursor2Color
• XCursor2Pos
• YCursor1Color
• YCursor2Color
• ZoomOutPercentage
AddMultipleTags
The AddMultipleTags property is a read-write property that
enables or disables the automatic refresh of the trend chart
each time a tag is added.
Syntax
aaHistClientTrend.AddMultipleTags = discrete;
Result = aaHistClientTrend.AddMultipleTags;
Remarks
You can set this property to True and then add multiple tags
using a script without refreshing the graph. After adding the
final tag, set this property back to False. The graph is
automatically refreshed and shows all the tags that you
added.
The default value is False.
AllowContextMenu
The AllowContextMenu property is a read-write property
that enables or disables the Context menu for the control.
Syntax
aaHistClientTrend.AllowContextMenu = discrete;
Result = aaHistClientTrend.AllowContextMenu;
Remarks
If this property is set to True, then the context menu appears
when the runtime user right-clicks in the control.
The default value is True.
AllowGridEditing
The AllowGridEditing property is a read-write property that
enables or disables the editing of the tag list that appears
below the trend chart.
Syntax
aaHistClientTrend.AllowGridEditing = discrete;
Result = aaHistClientTrend.AllowGridEditing;
Remarks
If this property is set to True, then the tag list can be edited.
The default value is True.
AlwaysUseFullForXYScatterPlots
This read-write property determines whether Full or Delta
mode retrieval is forced for all tags in a scatter plot
regardless of the retrieval settings that are configured at the
application or tag level.
Syntax
aaHistClientTrend.AlwaysUseFullForXYScatterPlots =
discrete;
Result=
aaHistClientTrend.AlwaysUseFullForXYScatterPlots;
Remarks
If this property is set to True, then full or delta retrieval is
forced. Full retrieval is used when retrieving data from a
Wonderware Historian with a version of 9.0 or higher. Delta
retrieval is used for earlier server versions.
The default value is True. We recommend to keep this option
enabled unless the nature of your data makes full retrieval
impractical.
AnalogPlottingAlgorithm
The AnalogPlottingAlgorithm property is a read-write
property that determines the type of the trend curve for all
analog and discrete tags in the trend.
Syntax
aaHistClientTrend.AnalogPlottingAlgorithm = integer;
Result = aaHistClientTrend.AnalogPlottingAlgorithm;
Remarks
Provided for backward compatibility. Use the
CurrentTagTrendType property instead.
Valid values: 0 = Stair-step curve; 1 = Line curve
(interpolation).
Return Value
If all analog and discrete tags in the trend use the same curve
type, the type is returned; otherwise, a 0 is returned. A
return value of 0, therefore, can either mean that all tags use
stair-step curves, or that they use different types.
ApplyRubberBandToAllTags
The ApplyRubberBandToAllTags property is a read-write
property that indicates whether all tags are scaled by rubber
band scaling or just the current tag.
Syntax
aaHistClientTrend.ApplyRubberBandToAllTags = discrete;
Result = aaHistClientTrend.ApplyRubberBandToAllTags;
Remarks
Provided for backward compatibility. Use the RubberbandAll
property instead.
The default value is True.
AutoRefreshMode
The AutoRefreshMode property is a read-write property that
gets or sets when the Trend control is refreshed with data
from the server.
Syntax
aaHistClientTrend.AutoRefreshMode = integer;
Result = aaHistClientTrend.AutoRefreshMode;
Remarks
The following table describes the enumerations for this
property:
BackColor
The BackColor property is a read-write property that gets or
sets the background color of the chart.
Syntax
aaHistClientTrend.BackColor = integer;
Result = aaHistClientTrend.BackColor;
Remarks
For information on setting the color value, see Color on page
673.
The default value is 16777215.
BackGradient
The BackGradient property is a read-write property that gets
or sets the type of background gradient for the chart.
Syntax
aaHistClientTrend.BackGradient = integer;
Result = aaHistClientTrend.BackGradient;
Remarks
The gradient starts with the main background color and fade
to the gradient end color. Use the BackColor property to set
the main background color. Use the BackGradientEndColor
property to set the ending gradient color.
For more information on the values for the back gradient, see
the aaTrendGradientType Enumeration on page 493.
The default value is 0.
BackGradientEndColor
The BackGradientEndColor property is a read-write property
that gets or sets the background gradient end color of the
chart.
Syntax
aaHistClientTrend.BackGradientEndColor = integer;
Result = aaHistClientTrend.BackGradientEndColor;
Remarks
The gradient starts with the main background color and
fades to the gradient end color. Use the BackColor property to
set the main background color. Use the BackGradient
property to set the type of gradient fill.
For information on setting the color value, see Color on page
673.
The default value is 16777215.
BackImage
The BackImage property is a read-write property that gets or
sets the background image for the chart.
Syntax
aaHistClientTrend.BackImage = message;
Result = aaHistClientTrend.BackImage;
Remarks
The value of this property is the folder path and filename for
the image. Supported image types are .jpeg, .gif, .bmp, and
.png.
This property has no default value.
BorderColor
The BorderColor property is a read-write property that gets
or sets the color for the border of the graph.
Syntax
aaHistClientTrend.BorderColor = integer;
Result = aaHistClientTrend.BorderColor;
Remarks
For information on setting the color value, see Color on page
673.
The default value is 0.
BorderStyle
The BorderStyle property is a read-write property that gets
or sets the style of the border line around the trend chart.
Syntax
aaHistClientTrend.BorderStyle = aaDashStyle;
Result = aaHistClientTrend.BorderStyle;
Remarks
For more information on the values for the border style, see
the aaDashStyle Enumeration on page 488.
The default value is 4, which indicates a solid line.
BorderWidth
The BorderWidth property is a read-write property that gets
or sets the width, in pixels, of the border line around the
trend chart.
Syntax
aaHistClientTrend.BorderWidth = integer;
Result = aaHistClientTrend.BorderWidth;
Remarks
Valid values are 0 through 10. The default value is 1.
ChartType
The ChartType is a read-write property that determines the
chart type of the current Trend file.
Syntax
aaHistClientTrend.ChartType = aaChartType;
Result = aaHistClientTrend.ChartType;
Remarks
For information on possible values, see aaChartType
Enumeration on page 488.
The default value is 0 (regular trend).
CurrentTrendItem
The CurrentTrendItem property is a read-only property that
refers to the currently selected trend item in the Tag List.
Syntax
Result = aaHistClientTrend.CurrentTrendItem;
Remarks
If no items are added or selected in the Tag List, this
property contains a null value.
The CurrentTrendItem property supports the following
properties:
• Visible
• PenWidth
• Style
• ValueFormat
• DecimalPlaces
• BottomY
• TopY
• TrendType
• Name
Visible
The Visible property is a read-write property that gets or sets
the visibility of the current trend item.
This property has no default value.
Syntax
aaHistClientTrend.CurrentTrendItem.Visible = true;
Result = aaHistClientTrend.CurrentTrendItem.Visible;
PenWidth
The PenWidth property is a read-write property that gets or
sets the thickness of the trend curve for the currently
selected tag.
Syntax
aaHistClientTrend.CurrentTrendItem.PenWidth = integer;
Result = aaHistClientTrend.CurrentTrendItem.PenWidth;
Remarks
Valid values are 0 through 10. The default value is 0.
Style
The Style property is a read-write property that gets or sets
the style of the trend curve for the currently selected tag.
Syntax
aaHistClientTrend.CurrentTrendItem.Style = integer;
Result = aaHistClientTrend.CurrentTrendItem.Style;
Remarks
The valid values and curve styles are as follows:
Value Style
0 Solid
1 Dashed
2 Dotted
3 DashDot
4 DashDotDot
ValueFormat
The ValueFormat property is a read-write property that gets
or sets the value format of the currently selected tag. The
format can be decimal or scientific.
Syntax
aaHistClientTrend.CurrentTrendItem.ValueFormat =
integer;
Result =
aaHistClientTrend.CurrentTrendItem.ValueFormat;
Remarks
The value 0 specifies decimal format and 1 specifies scientific
format. If you use the decimal format, then set the number of
decimal places using the DecimalPlaces property.
The default value is 0.
DecimalPlaces
The DecimalPlaces property is a read-write property that
gets or sets the number of decimal places to display for the
data value of the currently selected tag. This property is
applicable only to the analog tags.
Syntax
aaHistClientTrend.CurrentTrendItem.DecimalPlaces =
integer;
Result =
aaHistClientTrend.CurrentTrendItem.DecimalPlaces;
Remarks
The default value is 0.
BottomY
The BottomY property is a read-write property that gets or
sets the lower value for the y-axis of the currently selected
tag.
Syntax
aaHistClientTrend.CurrentTrendItem.BottomY = double;
Result = aaHistClientTrend.CurrentTrendItem.BottomY;
TopY
The TopY property is a read-write property that gets or sets
the upper value for the y-axis of the currently selected tag.
Syntax
aaHistClientTrend.CurrentTrendItem.TopY = double;
Result = aaHistClientTrend.CurrentTrendItem.TopY;
TrendType
The TrendType property is a read-write property that gets or
sets the type of the trend curve of the currently selected tag.
Syntax
aaHistClientTrend.CurrentTrendItem.TrendType = integer;
Remarks
For information on possible values, see aaTrendType
Enumeration on page 494.
The default value is 3.
Name
The Name property is a read-only property that gets the
name of the currently selected tag.
Syntax
Result = aaHistClientTrend.CurrentTrendItem.Name;
Return Value
The result is a string value.
Remarks
This property is not visible at design time. This property has
no default value.
CurrentServerName
The CurrentServerName property is a read-only property
that gets the name of the server for the tag that is currently
selected.
Syntax
Result = aaHistClientTrend.CurrentServerName;
Remarks
This property is not visible at design time.
This property has no default value.
Return Value
The result is a string value.
CurrentTagColor
The CurrentTagColor property is a read-write property that
determines the line color of the currently selected tag’s curve
in the trend.
Syntax
aaHistClientTrend.CurrentTagColor = integer;
Result = aaHistClientTrend.CurrentTagColor;
Remarks
This property is not visible at design time.
For information on setting the color value, see Color on page
673.
The default value is 0.
CurrentTagCycleCount
This read-write property controls the current tag’s number of
cycles for cycle-based data retrieval. This setting overrides
the default setting specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagCycleCount = integer;
Result = aaHistClientTrend.CurrentTagCycleCount;
Remarks
This property is only taken into account if both the
CurrentTagUseAutoCycles property and the
CurrentTagUseResolution property are set to False. Also, it
may be overridden by a retrieval style setting. For more
information, see Working with Retrieval Styles on page 807.
This property is relevant for all retrieval modes except the
following: Delta, Full, and Slope.
Valid values: any positive integer or 0. If you specify 0, the
cycle count is calculated automatically, just as if the
CurrentTagUseAutoCycles property were set to True. The
default value is 0.
CurrentTagEffectiveRetrievalMode
This read-only property returns the retrieval mode that is
used for the currently selected tag. This helps you to
determine the tag’s actual retrieval mode when you are using
a retrieval style that specifies different retrieval modes
depending on tag type or duration.
Syntax
Result =
aaHistClientTrend.CurrentTagEffectiveRetrievalMode;
Remarks
The return value is an integer. For an explanation of each
return value, see aaRetrievalMode Enumeration on page 490.
CurrentTagFormat
The CurrentTagFormat property is a read-write property
that is used to control how the values for the selected tag
appear, either in decimal format or scientific format.
Syntax
aaHistClientTrend.CurrentTagFormat = integer;
Result = aaHistClientTrend.CurrentTagFormat;
Remarks
0 = Decimal; 1 = Scientific. If you use the decimal format, set
the number of decimal places using the CurrentTagPrecision
property.
The default value is 0.
CurrentTagHistoryVersion
This read-write property determines the current tag’s history
source for data retrieval. This setting overrides the default
setting specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagHistoryVersion =
aaRetrievalVersion;
Result = aaHistClientTrend.CurrentTagHistoryVersion;
Remarks
For information on possible values, see aaRetrievalVersion
Enumeration on page 490. This property is relevant for all
retrieval modes.
The default value is 0 (latest values).
CurrentTagIndex
This read-only property returns the index of the tag that is
currently selected.
Syntax
Result = aaHistClientTrend.CurrentTagIndex;
Return Value
The result is an integer value.
Remarks
The index reflects the order in which the tags were added to
the trend. 0 denotes the first tag that was added to the trend,
1 denotes the second, and so on. If no tag is currently
selected, -1 is returned.
CurrentTagInterpolationType
This read-write property determines the current tag’s
interpolation type for data retrieval. This setting overrides
the default setting specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagInterpolationType =
aaInterpolationType;
Result = aaHistClientTrend.CurrentTagInterpolationType;
Remarks
For information on possible values, see aaInterpolationType
Enumeration on page 489. This property is only relevant for
the following retrieval modes: Interpolated, Best Fit,
Average, and Integral.
The default value is 3 (use the default value of the server).
CurrentTagName
The CurrentTagName property is a read-only property that
gets the name of the tag that is currently selected.
Syntax
Result = aaHistClientTrend.CurrentTagName;
Return Value
The result is a message.
Remarks
This property is not visible at design time. This property has
no default value.
CurrentTagNumStyles
This read-only property returns the number of retrieval
styles that are available for the current tag.
Syntax
Result = aaHistClientTrend.CurrentTagNumStyles;
Remarks
The count only includes retrieval styles for which a name is
defined for the current locale. If no style names at all are
defined for the current locale, the count for the en locale is
returned.
To return the name of a style with a specific number, use the
CurrentTagGetStyle method.
CurrentTagOffsetMS
The CurrentTagOffsetMS property is a read-write property
that gets or sets the amount of time that the trend curve of
the currently selected tag will be shifted from the actual time.
Syntax
aaHistClientTrend.CurrentTagOffsetMS = integer;
Result = aaHistClientTrend.CurrentTagOffsetMS;
Remarks
The offset, expressed in milliseconds, can be positive or
negative. For more information, see Using Time Offsets to
Compare Data on page 112. Setting this property updates the
CurrentTagStartDate property accordingly.
Due to the limited range for integer values, the maximum
offset you can set using this property is about 29 days. For
larger offsets, use the CurrentTagStartDate property.
The default value is 0. This property is only relevant if the
DateMode property is set to absolute mode.
CurrentTagPenStyle
The CurrentTagPenStyle property is a read-write property
that gets or sets the style of the trend curve for the currently
selected tag. For example, a solid or dashed line.
Syntax
aaHistClientTrend.CurrentTagPenStyle = integer;
Result = aaHistClientTrend.CurrentTagPenStyle;
Remarks
Valid values are:
0 Solid
1 Dashed
2 Dotted
3 DashDot
4 DashDotDot
CurrentTagPenWidth
The CurrentTagPenWidth property is a read-write property
that gets or sets the thickness of the trend curve for the
currently selected tag.
Syntax
aaHistClientTrend.CurrentTagPenWidth = integer;
Result = aaHistClientTrend.CurrentTagPenWidth;
Remarks
Valid values are 0 through 10. The default value is 0.
CurrentTagPrecision
The CurrentTagPrecision property is a read-write property
that gets or sets the number of decimal places to show for the
data value of the currently selected tag. This applies only to
analog tags.
Syntax
aaHistClientTrend.CurrentTagPrecision = integer;
Result = aaHistClientTrend.CurrentTagPrecision;
Remarks
To set the tag to use the decimal format, use the
DefaultTagFormat property.
The default value is 0.
CurrentTagQualityRule
This read-write property determines the current tag’s quality
rule for data retrieval. This setting overrides the default
setting specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagQualityRule =
aaQualityRules;
Result = aaHistClientTrend.CurrentTagQualityRule;
Remarks
For information on possible values, see aaQualityRules
Enumeration on page 489. This property is relevant for all
retrieval modes except the following: Cyclic, Delta, and Full.
The default value is 3 (use the default value of the server).
CurrentTagResolution
This read-write property controls the current tag’s time
interval for calculating the number of cycles in cycle-based
data retrieval. This setting overrides the default setting
specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagResolution = integer;
Result = aaHistClientTrend.CurrentTagResolution;
Remarks
This property is only relevant if the
CurrentTagUseAutoCycles property is set to False, and the
CurrentTagUseResolution property is set to True. Also, it
may be overridden by a retrieval style setting. For more
information, see Working with Retrieval Styles on page 807.
The value of this property is a time interval in milliseconds.
The aaHistClientTrend control divides the query duration by
this interval and uses the result as the number of cycles for
the query.
This property is relevant for all retrieval modes except the
following: Delta, Full, and Slope.
Valid values: any positive integer or 0. If you specify 0, the
cycle count is calculated automatically, just as if the
CurrentTagUseAutoCycles property were set to True. The
default value is 0.
CurrentTagRetrievalMode
This read-write property determines the current tag’s data
retrieval mode. This setting overrides the default setting
specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagRetrievalMode =
aaRetrievalMode;
Result = aaHistClientTrend.CurrentTagRetrievalMode;
Remarks
This property may be overridden by a retrieval style setting.
For more information, see Working with Retrieval Styles on
page 807. For information on possible values, see
aaRetrievalMode Enumeration on page 490.
The default value is 0 (cyclic). Make sure that the specified
retrieval mode is supported by the Wonderware Historian on
which the tag is stored.
CurrentTagRetrievalStyle
This read-write property determines the current tag’s
retrieval style. This setting overrides the default setting
specified at the application level.
Syntax
aaHistClientTrend.CurrentTagRetrievalStyle = string;
Result = aaHistClientTrend.CurrentTagRetrievalStyle;
Remarks
You must provide the retrieval style name for the current
locale as it is defined in the retrieval style document. For
more information, see Location and Structure of Retrieval
Styles on page 808. To find out how many retrieval styles are
available for the current tag, use the CurrentTagNumStyles
property. To determine the name of a retrieval style if you
know its position in the list of available styles, use the
CurrentTagGetStyle method.
Valid values: Custom style (or the translated equivalent for
the current locale), Style selected at option level
(ditto) and any retrieval style name that is defined for the
current locale in the retrieval style document. Values are
case-sensitive. If no style names at all are available for the
current locale, use the name for the en locale. The default
style is the Style selected at option level (or the
translated equivalent).
CurrentTagRowLimit
This read-write property determines the current tag’s row
limit for data retrieval. This setting overrides the default
setting specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagRowLimit = integer;
Result = aaHistClientTrend.CurrentTagRowLimit;
Remarks
The row limit applies to each query. For more information,
see RowLimit on page 341. This property is relevant for all
retrieval modes.
Valid values: any positive number or 0 (no row limit). The
default value is 0.
CurrentTagStartDate
The CurrentTagStartDate property is a read-write property
that gets or sets the trend start date for the currently
selected tag.
Syntax
aaHistClientTrend.CurrentTagStartDate = DateTime;
Result = aaHistClientTrend.CurrentTagStartDate;
Return Value
The result is a DateTime value.
Remarks
This property has no default. Setting this property updates
the CurrentTagOffsetMS property accordingly.
This property is only applicable if the DateMode property is
set to relative. It reflects local time.
For information on setting the date/time value, see DateTime
on page 673.
CurrentTagState
This read-write property determines the state for which
Time-in-State data is retrieved for the current tag. This
setting overrides the default setting specified at the
application level if the CurrentTagRetrievalStyle property is
set to an option other than Style selected at option
level.
Syntax
aaHistClientTrend.CurrentTagState = message;
Result = aaHistClientTrend.CurrentTagState;
Remarks
This property is only relevant for Time-in-State retrieval
mode. It specifies the unique tag state for which
Time-in-State information is calculated based on the
calculation type specified by the CurrentTagStateCalculation
property.
This property has no default value.
CurrentTagStateCalculation
This read-write property determines the current tag’s
calculation type for Time-in-State data retrieval. This setting
overrides the default setting specified at the application level
if the CurrentTagRetrievalStyle property is set to an option
other than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagStateCalculation =
aaStateCalculation;
Result = aaHistClientTrend.CurrentTagStateCalculation;
Remarks
For information on possible values, see aaStateCalculation
Enumeration on page 491. This property is only relevant for
Time-in-State retrieval mode. Also, it may be overridden by a
retrieval style setting. For more information, see Working
with Retrieval Styles on page 807.
The default value is 5 (use application setting).
CurrentTagTargetRegionVisible
This read-write property determines whether a currently
selected tag’s target region is shown on the chart.
Syntax
aaHistClientTrend.CurrentTagTargetRegionVisible =
discrete;
Result =
aaHistClientTrend.CurrentTagTargetRegionVisible;
Remarks
If no target region is defined for a tag, this property has no
effect. Regardless of the value of this property, the target
region for a tag is only shown when that tag is currently
selected in the tag list.
The default value is True.
CurrentTagTimeDeadband
This read-write property determines the current tag’s time
deadband in milliseconds for Delta data retrieval. This
setting overrides the default setting specified at the
application level if the CurrentTagRetrievalStyle property is
set to an option other than Style selected at option
level.
Syntax
aaHistClientTrend.CurrentTagTimeDeadband = integer;
Result = aaHistClientTrend.CurrentTagTimeDeadband;
Remarks
Valid values: any positive number or 0 (no deadband). This
property is only relevant for Delta retrieval mode. For more
information on how this setting works, see Time Deadband
(wwTimeDeadband) on page 760.
The default value is 0 (no deadband).
CurrentTagTimeStampRule
This read-write property determines the current tag’s
timestamp rule for data retrieval. This setting overrides the
default setting specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagTimeStampRule =
aaTimeStampRules;
Result = aaHistClientTrend.CurrentTagTimeStampRule;
Remarks
For information on possible values, see aaTimeStampRules
Enumeration on page 492. This property is only relevant for
the following retrieval modes: Cyclic, Interpolated,
Time-Weighted Average, Integral, Counter, and
Time-in-State.
The default value is 3 (use the default value of the server).
CurrentTagTrendType
This read-write property determines the type of the current
tag’s trend curve.
Syntax
aaHistClientTrend.CurrentTagTrendType = aaTrendType;
Result = aaHistClientTrend.CurrentTagTrendType;
Remarks
For information on possible values, see aaTrendType
Enumeration on page 494.
The default value is 3 (Auto).
CurrentTagUseAutoCycles
This read-write property controls the current tag’s
auto-calculation setting for cycle-based data retrieval. This
setting overrides the default setting specified at the
application level if the CurrentTagRetrievalStyle property is
set to an option other than Style selected at option
level.
Syntax
aaHistClientTrend.CurrentTagUseAutoCycles = discrete;
Result = aaHistClientTrend.CurrentTagUseAutoCycles;
Remarks
If this property is set to True, the aaHistClientTrend control
automatically calculates the number of cycles for a query
based on the width of the chart. For more information, see
Cycle Count (X Values over Equal Time Intervals)
(wwCycleCount) on page 751.
If it is set to False, you must specify the number of cycles
manually. Use the CurrentTagUseResolution property to
specify whether you want to provide a number of cycles or a
time interval. Then use the CurrentTagCycleCount property
to specify the number of cycles, or the CurrentTagResolution
property to specify the time interval.
This property is relevant for all retrieval modes except the
following: Delta, Full, and Slope.
The default value is False.
CurrentTagUseResolution
This read-write property controls the current tag’s behavior
for determining the number of cycles in cycle-based data
retrieval. This setting overrides the default setting specified
at the application level if the CurrentTagRetrievalStyle
property is set to an option other than Style selected at
option level.
Syntax
aaHistClientTrend.CurrentTagUseResolution = discrete;
Result = aaHistClientTrend.CurrentTagUseResolution;
Remarks
This property is only relevant if the
CurrentTagUseAutoCycles property is set to False.
If this property is set to False, the aaHistClientTrend control
uses a fixed number of cycles when retrieving data using
cycle-based retrieval modes. To specify the number of cycles,
use the CurrentTagCycleCount property.
If it is set to True, the aaHistClientTrend control calculates
the number of cycles based on the query duration and a time
interval. To specify this interval, use the
CurrentTagResolution property.
This property is relevant for all retrieval modes except the
following: Delta, Full, and Slope.
The default value is False.
CurrentTagValAtX1
The CurrentTagValAtX1 property is a read-only property
that gets the value of the current tag at the point at which
the curve intersects with the first time axis cursor.
Syntax
Result = aaHistClientTrend.CurrentTagValAtX1;
Return Value
The result is a real value.
Remarks
For more information on cursors, see Using Axis Cursors on
page 89.
This property has no default value.
CurrentTagValAtX2
The CurrentTagValAtX2 property is a read-only property
that gets the value of the current tag at the point at which
the curve intersects with the second time axis cursor.
Syntax
Result = aaHistClientTrend.CurrentTagValAtX2;
Return Value
The result is a real value.
Remarks
For more information on cursors, see Using Axis Cursors on
page 89.
This property has no default value.
CurrentTagValueDeadband
This read-write property determines the current tag’s value
deadband for Delta data retrieval. This setting overrides the
default setting specified at the application level if the
CurrentTagRetrievalStyle property is set to an option other
than Style selected at option level.
Syntax
aaHistClientTrend.CurrentTagValueDeadband = real;
Result = aaHistClientTrend.CurrentTagValueDeadband;
Remarks
The deadband is a percentage of the full scale in Engineering
Units. Valid values are 0 (no deadband) to 100. This property
is only relevant for Delta retrieval mode. For more
information on how this setting works, see Value Deadband
(wwValueDeadband) on page 763.
The default value is 0 (no deadband).
CurrentValOfX1
This read-write property gets or sets the position of the first
x-axis cursor of the currently selected tag in a scatter plot.
Syntax
aaHistClientTrend.CurrentValOfX1 = real;
Result = aaHistClientTrend.CurrentValOfX1;
Remarks
This property contains the value at which the cursor
intersects with the current x-axis scale. Therefore, the same
cursor position may be reflected by different values
depending on which tag is selected.
To control the position of the first time axis cursor in a
regular trend, use the XCursor1Pos property.
CurrentValOfX2
This read-write property gets or sets the position of the
second x-axis cursor of the currently selected tag in a scatter
plot.
Syntax
aaHistClientTrend.CurrentValOfX2 = real;
Result = aaHistClientTrend.CurrentValOfX2;
Remarks
This property contains the value at which the cursor
intersects with the current x-axis scale. Therefore, the same
cursor position may be reflected by different values
depending on which tag is selected.
To control the position of the second time axis cursor in a
regular trend, use the XCursor2Pos property.
CurrentValOfY1
This read-write property controls the position of the first
y-axis cursor of the currently selected tag.
Syntax
aaHistClientTrend.CurrentValOfY1 = real;
Result = aaHistClientTrend.CurrentValOfY1;
Remarks
This property contains the value at which the cursor
intersects with the current y-axis scale. Therefore, the same
cursor position may be reflected by different values
depending on which tag is selected.
CurrentValOfY2
This read-write property controls the position of the second
y-axis cursor of the currently selected tag.
Syntax
aaHistClientTrend.CurrentValOfY2 = real;
Result = aaHistClientTrend.CurrentValOfY2;
Remarks
This property contains the value at which the cursor
intersects with the current y-axis scale. Therefore, the same
cursor position may be reflected by different values
depending on which tag is selected.
CurrentXAxisTagIndex
This read-only property returns the index of the x-axis tag
that is associated with the currently selected tag.
Syntax
Result = aaHistClientTrend.CurrentXAxisTagIndex;
Return Value
The result is an integer value.
Remarks
The index reflects the order in which the tags were added to
the trend. 0 denotes the first tag that was added to the trend,
1 denotes the second, and so on. If no tag is currently
selected, or if the currently selected tag isn’t associated with
an x-axis tag, -1 is returned.
CurrentXAxisTagName
This read-only property returns the name of the x-axis tag
that is associated with the currently selected tag.
Syntax
Result = aaHistClientTrend.CurrentXAxisTagName;
Return Value
The result is a message value.
Remarks
If no x-axis tag is set for the currently selected tag, this
property contains an empty string.
CurrentXAxisTagServerName
This read-only property returns the name of the server for
the x-axis tag that is associated with the currently selected
tag.
Syntax
Result = aaHistClientTrend.CurrentXAxisTagServerName;
Return Value
The result is a message value.
Remarks
If no x-axis tag is set for the currently selected tag, this
property contains an empty string.
CyclicRows
This property is deprecated and included for backward
compatibility only.
Syntax
aaHistClientTrend.CyclicRows = integer;
Result = aaHistClientTrend.CyclicRows;
Remarks
To specify the number of cycles for cyclic retrieval, use the
CurrentTagCycleCount or RetrievalOptionsCycleCount
properties instead.
DataPointLabelType
This property determines whether data point labels are
shown in a scatter plot.
Syntax
aaHistClientTrend.DataPointLabelType =
aaDataPointLabelingType;
Result = aaHistClientTrend.DataPointLabelType;
Remarks
For information on possible values, see
aaDataPointLabelingType Enumeration on page 488.
The default value is 0 (no labels).
DateMode
The DateMode property is a read-write property that gets or
sets the date mode for the trend.
Syntax
aaHistClientTrend.DateMode = aaDateModeEnumeration;
Result = aaHistClientTrend.DateMode;
Remarks
The default value is 0 (absolute mode).
For more information on the aaDateModeEnumeration
enumeration, see aaDateModeEnumeration Enumeration on
page 488.
The DateMode property determines the functionality of the
Time Bar and how time shifting is anchored as you switch
between different time periods.
• In absolute mode, the Time Bar has a start time and an
end time. In this mode, each tag has its own time offset.
The actual time period used for queries is the sum of the
tag's "offset" and the start and end time for the Time Bar.
The tag offset is set using the CurrentTagOffsetMS
property.
• In relative mode, the Time Bar has a starting time offset
and an ending time offset. In this mode each tag has its
own starting time. The actual time period used for
queries is the sum of the the tag's start time to the offsets
of the Time Bar. If you set the DateMode property to use
relative time, specify the start time for the current tag
using the CurrentTagStartDate property.
DatePickerFormatString
The DatePickerFormatString property is a read-write
property that gets or sets the format string for the time range
picker.
Syntax
aaHistClientTrend.DatePickerFormatString = message;
Result = aaHistClientTrend.DatePickerFormatString;
Remarks
This value is determined from the regional settings for the
operating system.
DefaultTagFormat
The DefaultTagFormat property is a read-write property that
gets or sets the format of the trend item for presentation to
the client.
Syntax
aaHistClientTrend.DefaultTagFormat = integer;
Result = aaHistClientTrend.DefaultTagFormat;
Remarks
Valid values are: 0 = Decimal, 1 = Scientific. The default
value is 0. If you use the decimal format, use the
DefaultTagPrecision property to specify the number of
decimal points. Format changes are not applied to trend
items already in the chart at the time the format change is
made.
The default value is 0.
DefaultTagPrecision
The DefaultTagPrecision property is read-write property that
gets or sets the number of decimal places of the trend item for
presentation to the client.
Syntax
aaHistClientTrend.DefaultTagPrecision = integer;
Result = aaHistClientTrend.DefaultTagPrecision;
Remarks
Precision changes are not applied to trend items already in
the chart at the time the precision change is made.
The default value is 0.
EnableDeltaRetrieval
The EnableDeltaRetrieval property is a read-write property
that enables or disables delta retrieval for the trend control.
Syntax
aaHistClientTrend.EnableDeltaRetrieval = discrete;
Result = aaHistClientTrend.EnableDeltaRetrieval;
Remarks
The aaHistClientTrend control only takes this property into
account when retrieving data from the Wonderware
Historians with a version earlier than 9.0. For more
information, see Retrieval Styles, Application Settings, and
Tag Settings on page 817.
Delta retrieval is used for analog and discrete queries that
have a time range that are within the settings of the
MaxMinutesForDeltaAnalog and
MaxMinutesForDeltaDiscrete properties.
Delta retrieval is always used for the "live" retrieval mode. If
you set this property to False, this has no effect on live mode.
The default value is False.
EnableSummaryData
This property is included for backward compatibility only. Its
value is ignored.
Syntax
aaHistClientTrend.EnableSummaryData = discrete;
Result = aaHistClientTrend.EnableSummaryData;
Remarks
To retrieve summarized data, use a retrieval style instead.
For more information, see Working with Retrieval Styles on
page 807.
EnableTimeOffsets
Note This property is included for backward compatibility only.
Setting this property has no effect.
EndDate
The EndDate property is a read-only property that gets the
timestamp at the right edge of the trend.
Syntax
aaHistClientTrend.EndDate = DateTime;
Result = aaHistClientTrend.EndDate;
Remarks
For information on setting the date/time value, see DateTime
on page 673.
This property has no default value.
FileName
The FileName property is a read-only property that gets the
name of the current trend file.
Syntax
Result = aaHistClientTrend.FileName;
Return Value
The result is a message.
Remarks
The default value is an empty message value ( "" ).
GridColor
The GridColor property is a read-write property that gets or
sets the color of the trend grid.
Syntax
aaHistClientTrend.GridColor = integer;
Result = aaHistClientTrend.GridColor;
Remarks
For information on setting the color value, see Color on page
673.
The default value is 13882323.
GridHorizontal
The GridHorizontal property is a read-write property that
shows or hides the horizontal grid.
Syntax
aaHistClientTrend.GridHorizontal = discrete;
Result = aaHistClientTrend.GridHorizontal;
Remarks
The default value is True.
GridVertical
The GridVertical property is a read-write property that
shows or hides the vertical grid.
Syntax
aaHistClientTrend.GridVertical = discrete;
Result = aaHistClientTrend.GridVertical;
Remarks
The default value is True.
GridVisible
The GridVisible property is a read-write property that shows
or hides the tag list underneath the chart area.
Syntax
aaHistClientTrend.GridVisible = discrete;
Result = aaHistClientTrend.GridVisible;
Remarks
The default value is True.
HideCurrentTag
The HideCurrentTag property is a read-write property that
shows or hides the currently selected trend item (tag).
Syntax
aaHistClientTrend.HideCurrentTag = discrete;
Result = aaHistClientTrend.HideCurrentTag;
Remarks
The default value is False. If there are no tags on the chart,
this property returns True.
HighlightCurrentTag
The HighlightCurrentTag property is a read-write property
that controls whether to highlight whichever tag is currently
selected.
Syntax
aaHistClientTrend.HighlightCurrentTag = discrete;
Result = aaHistClientTrend.HighlightCurrentTag;
Remarks
This property is a trend-level setting, not a tag-level setting.
If you enable it while a particular tag is selected, that tag is
highlighted. Once you select a different tag, that other tag is
highlighted, and so on. The default value is False.
HistorySource
The HistorySource property is a read-write property that gets
or sets the selection of the source of historical data.
Syntax
aaHistClientTrend.HistorySource = aaRetrievalSource;
Result = aaHistClientTrend.HistorySource;
Remarks
For more information on the aaRetrievalSource enumeration,
see aaRetrievalSource Enumeration on page 670.
Remarks
The default value is 2.
LiveModeRate
The LiveModeRate property is a read-write property that
gets or sets the refresh interval in milliseconds for live and
replay mode.
Syntax
aaHistClientTrend.LiveModeRate = integer;
Result = aaHistClientTrend.LiveModeRate;
Remarks
The lower limit for the LiveModeRate property is set to 250
milliseconds. The default value is 1,000.
Apart from the different unit of measure, this property serves
the same purpose as the RealTimeRate property.
LockDown
This read-write property enables or disables a “lock down”
mode in the control.
Syntax
aaHistClientTrend.LockDown = discrete;
Result = aaHistClientTrend.LockDown;
Remarks
In "lock down" mode, the following features are not available
to the run-time user:
• Opening a file, saving a file, saving a file as a different
name, and creating a new file
• Deleting a tag
• Adding an annotation
• Configuring servers
LoginTimeout
The LoginTime property is a read-write property that gets or
sets the amount of time, in seconds, that the control waits for
a connection to the server to be established before
determining that the attempt failed.
Syntax
aaHistClientTrend.LoginTimeout = integer;
Result = aaHistClientTrend.LoginTimeout;
Remarks
This setting only applies to servers that you add or update
dynamically using the AddServer method. All other servers
continue to use the timeout that you set in the server
configuration dialog box.
Remarks
The default value is 120.
MaxDeltaSamples
The MaxDeltaSamples property is a read-write property that
gets or sets the maximum number of data values to retrieve
for delta retrieval mode.
Syntax
aaHistClientTrend.MaxDeltaSamples = integer;
Result = aaHistClientTrend.MaxDeltaSamples;
Remarks
The aaHistClientTrend control only takes this property into
account when retrieving data from Wonderware Historians
with a version earlier than 9.0.
Valid values are 0 to 100,000. The default value is 10,000.
MaxMinutesForDeltaAnalog
The MaxMinutesForDeltaAnalog property is a read-write
property that gets or sets the maximum minutes filter for
analog tags for delta retrieval mode.
Syntax
aaHistClientTrend.MaxMinutesForDeltaAnalog = integer;
Result = aaHistClientTrend.MaxMinutesForDeltaAnalog;
Remarks
The aaHistClientTrend control only takes this property into
account when retrieving data from Wonderware Historians
with a version earlier than 9.0.
Delta retrieval is used for analog queries that have a time
range that are within the setting of the
MaxMinutesForDeltaAnalog property. If the query time
range is longer, cyclic retrieval is used.
Remarks
The default value is 15.
MaxMinutesForDeltaDiscrete
The MaxMinutesForDeltaDiscrete property is a read-write
property that gets or sets the maximum minutes filter for
discrete tags for delta retrieval mode.
Syntax
aaHistClientTrend.MaxMinutesForDeltaDiscrete = integer;
Result = aaHistClientTrend.MaxMinutesForDeltaDiscrete;
Remarks
The aaHistClientTrend control only takes this property into
account when retrieving data from a Wonderware Historian
with a version earlier than 9.0.
Delta retrieval is used for discrete queries that have a time
range that are within the setting of the
MaxMinutesForDeltaDiscrete property. If the query time
range is longer, cyclic retrieval is used.
The default value is 15.
MaxSamplesPerTag
The MaxSamplesPerTag property is a read-write property
that gets or sets the maximum number of samples per tag.
Syntax
aaHistClientTrend.MaxSamplesPerTag = integer;
Result = aaHistClientTrend.MaxSamplesPerTag;
Remarks
The aaHistClientTrend control only takes this property into
account when retrieving data from a Wonderware Historian
with a version earlier than 9.0.
The default value is 10,000.
MovingAverageMode
This property is included for backward compatibility only. Its
value is ignored.
Syntax
aaHistClientTrend.MovingAverageMode = discrete;
Result = aaHistClientTrend.MovingAverageMode;
Remarks
To calculate moving averages, use a retrieval style instead.
For more information, see Working with Retrieval Styles on
page 807.
MovingAverageSamples
This property is included for backward compatibility only. Its
value is ignored.
Syntax
aaHistClientTrend.MovingAverageSamples = integer;
Result = aaHistClientTrend.MovingAverageSamples;
Remarks
To calculate moving averages, use a retrieval style instead.
For more information, see Working with Retrieval Styles on
page 807.
NumDataPointLabels
This read-write property determines the number of data
point labels in a scatter plot.
Syntax
aaHistClientTrend.NumDataPointLabels = integer;
Result = aaHistClientTrend.NumDataPointLabels;
Remarks
The valid range is from 2 to 15. The default value is 6. This
property is only used if data points are actually shown on the
scatter plot. For more information, see DataPointLabelType
on page 414.
NumTimeAxisGridPerValue
The NumTimeAxisGridPerValue property is a read-write
property that gets or sets the number of grid lines that
appear between each tag value plotted on the graph.
Syntax
aaHistClientTrend.NumTimeAxisGridPerValue = integer;
Result = aaHistClientTrend.NumTimeAxisGridPerValue;
Remarks
The valid range is from 1 to 20. The default value is 3.
NumTimeAxisValues
The NumTimeAxisValues property is a read-write property
that gets or sets the number of values that are shown along
the time axis.
Syntax
aaHistClientTrend.NumTimeAxisValues = integer;
Result = aaHistClientTrend.NumTimeAxisValues;
Remarks
The values are shown at evenly-spaced points along the axis.
The number of values remain the same even if you zoom in
and out. The valid range is from 2 to 15. The default value is
6.
NumXValueAxisGridLinesPerLabel
This read-write property determines the number of grid lines
that appear between each scale value label on the X axis of a
scatter plot.
Syntax
aaHistClientTrend.NumXValueAxisGridLinesPerLabel =
integer;
Result =
aaHistClientTrend.NumXValueAxisGridLinesPerLabel;
Remarks
The valid range is from 1 to 20. The default value is 3.
NumXValueAxisLabels
This read-write property determines the number of scale
value labels that appear on the X axis of a scatter plot.
Syntax
aaHistClientTrend.NumXValueAxisLabels = integer;
Result = aaHistClientTrend.NumXValueAxisLabels;
Remarks
The valid range is from 2 to 15. The default value is 6.
NumYAxisGridPerValue
This read-write property determines the number of grid lines
that appear between each scale value label on the Y axis of a
chart.
Syntax
aaHistClientTrend.NumYAxisGridPerValue = integer;
Result = aaHistClientTrend.NumYAxisGridPerValue;
Remarks
The valid range is from 1 to 20. The default value is 2.
NumYAxisValues
This read-write property determines the number of scale
value labels that appear on the Y axis of a chart.
Syntax
aaHistClientTrend.NumYAxisValues = integer;
Result = aaHistClientTrend.NumYAxisValues;
Remarks
The values are shown at evenly-spaced points along the axis.
The number of values remains the same even if you zoom in
and out. The valid range is from 2 to 15. The default value is
6.
PanPercentage
The PanPercentage property is a read-write property that
gets or sets the percentage (1 to 100) by which the time axis
(x-axis) pans.
Syntax
aaHistClientTrend.PanPercentage = integer;
Result = aaHistClientTrend.PanPercentage;
Remarks
The default value is 75.
PlaybackSpeed
This read-write property determines the playback speed in
“replay” mode.
Syntax
aaHistClientTrend.PlaybackSpeed = real;
Result = aaHistClientTrend.PlaybackSpeed;
Remarks
For information on replay mode, see Showing Historical Data
in “Replay” Mode on page 74.
Valid values are 0.5 to 128. The default value is 1 (normal
speed).
PlotColor
The PlotColor property is a read-write property that gets or
sets the color for the plot area of the graph.
Syntax
aaHistClientTrend.PlotColor = integer;
Result = aaHistClientTrend.PlotColor;
Remarks
For information on setting the color value, see Color on page
673.
The default value is 16777215.
PlotGradient
The PlotGradient property is a read-write property that gets
or sets the type of plot gradient for the chart.
Syntax
aaHistClientTrend.PlotGradient = aaTrendGradientType;
Result = aaHistClientTrend.PlotGradient;
Remarks
The gradient starts with the main plot color and fades to the
gradient end color. Use the PlotColor property to set the
main background color. Use the PlotGradientEndColor
property to set the ending gradient color.
For more information on the aaTrendGradientType
enumeration, see aaTrendGradientType Enumeration on
page 493.
The default value is 0.
PlotGradientEndColor
The PlotGradientEndColor property is a read-write property
that gets or sets the gradient end color for the plot area of the
chart.
Syntax
aaHistClientTrend.PlotGradientEndColor = integer;
Result = aaHistClientTrend.PlotGradientEndColor;
Remarks
The gradient starts with the main plot color and fades to the
gradient end color. Use the PlotColor property to set the
main plot color. Use the PlotGradient property to set the type
of gradient fill.
For information on setting the color value, see Color on page
673.
The default value is 16777215.
PlotImage
The PlotImage property is a read-write property that gets or
sets the plot image for the chart.
Syntax
aaHistClientTrend.PlotImage = message;
Result = aaHistClientTrend.PlotImage;
Remarks
The value of this property is the folder path and filename for
the image. Supported image types are .jpeg, .gif, .bmp, and
.png.
This property has no default value.
PrintShowActiveTag
The PrintShowActiveTag property is a read-write property
that shows or hides the name of the active tag in the chart
area of printed trends.
Syntax
aaHistClientTrend.PrintShowActiveTag = discrete;
Result = aaHistClientTrend.PrintShowActiveTag;
Remarks
True = Show the tag; False = Hide the tag.
The default value is True.
PrintShowMarkers
The PrintShowMarkers property is a read-write property
that shows or hides the markers in printed trends.
Syntax
aaHistClientTrend.PrintShowMarkers = discrete;
Result = aaHistClientTrend.PrintShowMarkers;
Remarks
True = Show the markers; False = Hide the markers.
The default value is True.
PrintShowTitle
The PrintShowTitle property is a read-write property that
shows or hides the print title in printed trends.
Syntax
aaHistClientTrend.PrintShowTitle = discrete;
Result = aaHistClientTrend.PrintShowTitle;
Remarks
True = Show the title; False = Hide the title.
The default value is True.
PrintTitle
The PrintTitle property is a read-write property that gets or
sets the print title for the trend.
Syntax
aaHistClientTrend.PrintTitle = message;
Result = aaHistClientTrend.PrintTitle;
Remarks
This property has no default value.
PublicAnnotations
The PublicAnnotations property is a read-write property that
shows or hides all public annotations in the trend chart.
Syntax
aaHistClientTrend.PublicAnnotations = discrete;
Result = aaHistClientTrend.PublicAnnotations;
Remarks
The default value is True.
QueryTimeout
The QueryTimeout property is a read-write property that
gets or sets the amount of time, in seconds, that the control
waits for a query to be executed against the server before
determining that the query failed.
Syntax
aaHistClientTrend.QueryTimeout = integer;
Result = aaHistClientTrend.QueryTimeout;
Remarks
This setting only applies to servers that you add or update
dynamically using the AddServer method. All other servers
continue to use the timeout that you set in the server
configuration dialog box.
The default value is 20.
RealTimeMode
The RealTimeMode property is a read-write property that
enables or disables live or replay mode.
Syntax
aaHistClientTrend.RealTimeMode = discrete;
Result = aaHistClientTrend.RealTimeMode;
Remarks
Use the LiveModeRate or RealTimeRate properties to set the
rate at which the trend is refreshed in live or replay mode.
The default value is False.
RealTimeRate
The RealTimeRate property is a read-write property that gets
or sets the refresh interval in seconds for live and replay
mode.
Syntax
aaHistClientTrend.RealTimeRate = integer;
Result = aaHistClientTrend.RealTimeRate;
Remarks
The default value is 1.
Apart from the different unit of measure, this property serves
the same purpose as the LiveModeRate property.
RetrievalOptionsCycleCount
This read-write property controls the aaHistClientTrend
control’s default number of cycles for cycle-based data
retrieval. This setting applies to all tags in a trend whose
retrieval style is set to Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsCycleCount = integer;
Result = aaHistClientTrend.RetrievalOptionsCycleCount;
Remarks
This property is only taken into account if both the
RetrievalOptionsUseAutoCycles property and the
RetrievalOptionsUseResolution property are set to False.
Also, it may be overridden by a retrieval style setting. For
more information, see Working with Retrieval Styles on
page 807.
This property is relevant for all retrieval modes except the
following: Delta, Full, and Slope.
Valid values: any positive integer or 0. If you specify 0, the
cycle count is calculated automatically, just as if the
RetrievalOptionsUseAutoCycles property were set to True.
The default value is 100.
RetrievalOptionsHistoryVersion
This read-write property determines the aaHistClientTrend
control’s default history source for data retrieval. This
setting applies to all tags in a trend whose retrieval style is
set to Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsHistoryVersion =
aaRetrievalVersion;
Result =
aaHistClientTrend.RetrievalOptionsHistoryVersion;
Remarks
For information on possible values, see aaRetrievalVersion
Enumeration on page 490. This property is relevant for all
retrieval modes.
The default value is 0 (use the latest value).
RetrievalOptionsInterpolationType
This read-write property determines the aaHistClientTrend
control’s default interpolation type for data retrieval. This
setting applies to all tags in a trend whose retrieval style is
set to Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsInterpolationType =
aaInterpolationType;
Result =
aaHistClientTrend.RetrievalOptionsInterpolationType;
Remarks
For information on possible values, see aaInterpolationType
Enumeration on page 489. This property is only relevant for
the following retrieval modes: Interpolated, Best Fit,
Average, and Integral.
The default value is 3 (use the default value of the server).
RetrievalOptionsNumStyles
This read-only property returns the number of retrieval
styles that are available in the control.
Syntax
Result = aaHistClientTrend.RetrievalOptionsNumStyles;
Remarks
The count only includes retrieval styles for which a name is
defined for the current locale. If no style names at all are
defined for the current locale, the count for the en locale is
returned.
To return the name of a style with a specific number, use the
RetrievalOptionsGetStyle method.
RetrievalOptionsQualityRule
This read-write property determines the aaHistClientTrend
control’s default quality rule for data retrieval. This setting
applies to all tags in a trend whose retrieval style is set to
Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsQualityRule =
aaQualityRules;
Result = aaHistClientTrend.RetrievalOptionsQualityRule;
Remarks
For information on possible values, see aaQualityRules
Enumeration on page 489. This property is relevant for all
retrieval modes except the following: Cyclic, Delta, and Full.
The default value is 3 (use the default value of the server).
RetrievalOptionsResolution
This read-write property controls the aaHistClientTrend
control’s default time interval for calculating the number of
cycles in cycle-based data retrieval. This setting applies to all
tags in a trend whose retrieval style is set to Style
selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsResolution = integer;
Result = aaHistClientTrend.RetrievalOptionsResolution;
Remarks
This property is only relevant if the
RetrievalOptionsUseAutoCycles property is set to False, and
the RetrievalOptionsUseResolution property is set to True.
Also, it may be overridden by a retrieval style setting. For
more information, see Working with Retrieval Styles on
page 807.
The value of this property is a time interval in milliseconds.
The aaHistClientTrend control divides the query duration by
this interval and uses the result as the number of cycles for
the query.
This property is relevant for all retrieval modes except the
following: Delta, Full, and Slope.
Valid values: any positive integer or 0. If you specify 0, the
cycle count is calculated automatically, just as if the
RetrievalOptionsUseAutoCycles property were set to True.
The default value is 1000.
RetrievalOptionsRetrievalMode
This read-write property determines the aaHistClientTrend
control’s default data retrieval mode. This setting applies to
all tags in a trend whose retrieval style is set to Style
selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsRetrievalMode =
aaRetrievalMode;
Result =
aaHistClientTrend.RetrievalOptionsRetrievalMode;
Remarks
This property may be overridden by a retrieval style setting.
For more information, see Working with Retrieval Styles on
page 807. For information on possible values, see
aaRetrievalMode Enumeration on page 490.
The default value is 0 (cyclic). Make sure that the specified
retrieval mode is supported by the Wonderware Historian
that the tags are stored on.
RetrievalOptionsRetrievalStyle
This read-write property determines the aaHistClientTrend
control’s default retrieval style. This setting applies to all
tags in a trend whose retrieval style is set to Style
selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsRetrievalStyle =
string;
Result =
aaHistClientTrend.RetrievalOptionsRetrievalStyle;
Remarks
You must provide the retrieval style name for the current
locale as it is defined in the retrieval style document. For
more information, see Location and Structure of Retrieval
Styles on page 808. To find out how many retrieval styles are
available in the control, use the RetrievalOptionsNumStyles
property. To determine the name of a retrieval style if you
know its position in the list of available styles, use the
RetrievalOptionsGetStyle method.
Valid values: Custom style (or the translated equivalent for
the current locale) and any retrieval style name that is
defined for the current locale in the retrieval style document.
Values are case-sensitive. If no style names at all are
available for the current locale, use the name for the en
locale. The default style is BestFit-5 (or the translated
equivalent).
RetrievalOptionsRowLimit
This read-write property determines the aaHistClientTrend
control’s default row limit for data retrieval. This setting
applies to all tags in a trend whose retrieval style is set to
Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsRowLimit = integer;
Result = aaHistClientTrend.RetrievalOptionsRowLimit;
Remarks
The row limit applies to each query. For more information,
see RowLimit on page 341. This property is relevant for all
retrieval modes.
Valid values: any positive number or 0 (no row limit). The
default value is 0.
RetrievalOptionsState
This read-write property determines the aaHistClientTrend
control’s default state for which Time-in-State data is
retrieved for a tag. This setting applies to all tags in a trend
whose retrieval style is set to Style selected at option
level.
Syntax
aaHistClientTrend.RetrievalOptionsState = message;
Result = aaHistClientTrend.RetrievalOptionsState;
Remarks
This property is only relevant for Time-in-State retrieval
mode. It specifies the unique tag state for which
Time-in-State information is calculated based on the
calculation type specified by the
RetrievalOptionsStateCalculation property.
This property has no default value.
RetrievalOptionsStateCalculation
This read-write property determines the aaHistClientTrend
control’s default calculation type for Time-in-State data
retrieval. This setting applies to all tags in a trend whose
retrieval style is set to Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsStateCalculation =
aaStateCalculation;
Result =
aaHistClientTrend.RetrievalOptionsStateCalculation;
Remarks
For information on possible values, see aaStateCalculation
Enumeration on page 491. This property is only relevant for
Time-in-State retrieval mode. Also, it may be overridden by a
retrieval style setting. For more information, see Working
with Retrieval Styles on page 807.
The default value is 4 (percent).
RetrievalOptionsTimeDeadband
This read-write property determines the aaHistClientTrend
control’s default time deadband in milliseconds for Delta
data retrieval. This setting applies to all tags in a trend
whose retrieval style is set to Style selected at option
level.
Syntax
aaHistClientTrend.RetrievalOptionsTimeDeadband =
integer;
Result =
aaHistClientTrend.RetrievalOptionsTimeDeadband;
Remarks
Valid values: any positive number or 0 (no deadband). This
property is only relevant for Delta retrieval mode. For more
information on how this setting works, see Time Deadband
(wwTimeDeadband) on page 760.
The default value is 0 (no deadband).
RetrievalOptionsTimeStampRule
This read-write property determines the aaHistClientTrend
control’s default timestamp rule for data retrieval. This
setting applies to all tags in a trend whose retrieval style is
set to Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsTimeStampRule =
aaTimeStampRules;
Result =
aaHistClientTrend.RetrievalOptionsTimeStampRule;
Remarks
For information on possible values, see aaTimeStampRules
Enumeration on page 492. This property is only relevant for
the following retrieval modes: Cyclic, Interpolated,
Time-Weighted Average, Integral, Counter, and
Time-in-State.
The default value is 3 (use the default value of the server).
RetrievalOptionsUseAutoCycles
This read-write property controls the aaHistClientTrend
control’s default auto-calculation setting for cycle-based data
retrieval. This setting applies to all tags in a trend whose
retrieval style is set to Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsUseAutoCycles =
discrete;
Result =
aaHistClientTrend.RetrievalOptionsUseAutoCycles;
Remarks
If this property is set to True, the aaHistClientTrend control
automatically calculates the number of cycles for a query
based on the width of the chart. For more information, see
Cycle Count (X Values over Equal Time Intervals)
(wwCycleCount) on page 751.
If it is set to False, you must specify the number of cycles
manually. Use the RetrievalOptionsUseResolution property
to specify whether you want to provide a number of cycles or
a time interval. Then use the RetrievalOptionsCycleCount
property to specify the number of cycles, or the
RetrievalOptionsResolution property to specify the time
interval.
This property is relevant for all retrieval modes except the
following: Delta, Full, and Slope.
The default value is True.
RetrievalOptionsUseResolution
This read-write property controls the aaHistClientTrend
control’s default behavior for determining the number of
cycles in cycle-based data retrieval. This setting applies to all
tags in a trend whose retrieval style is set to Style
selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsUseResolution =
discrete;
Result =
aaHistClientTrend.RetrievalOptionsUseResolution;
Remarks
This property is only relevant if the
RetrievalOptionsUseAutoCycles property is set to False.
If this property is set to False, the aaHistClientTrend control
uses a fixed number of cycles when retrieving data using
cycle-based retrieval modes. To specify the number of cycles,
use the RetrievalOptionsCycleCount property.
If it is set to True, the aaHistClientTrend control calculates
the number of cycles based on the query duration and a time
interval. To specify this interval, use the
RetrievalOptionsResolution property.
This property is relevant for all retrieval modes except the
following: Delta, Full, and Slope.
The default value is False.
RetrievalOptionsValueDeadband
This read-write property determines the aaHistClientTrend
control’s default value deadband for Delta data retrieval.
This setting applies to all tags in a trend whose retrieval
style is set to Style selected at option level.
Syntax
aaHistClientTrend.RetrievalOptionsValueDeadband = real;
Result =
aaHistClientTrend.RetrievalOptionsValueDeadband;
Remarks
The deadband is a percentage of the full scale in Engineering
Units. Valid values are 0 (no deadband) to 100. This property
is only relevant for Delta retrieval mode. For more
information on how this setting works, see Value Deadband
(wwValueDeadband) on page 763.
The default value is 0 (no deadband).
RetrieveAnnotations
The RetrieveAnnotations property is a read-write property
that enables or disables the retrieval of annotations.
Syntax
aaHistClientTrend.RetrieveAnnotations = discrete;
Result = aaHistClientTrend.RetrieveAnnotations;
Remarks
The default value is True.
RetrieveExtensionData
The RetrieveExtensionData property is a read-write property
that enables or disables the retrieval of data from the
extension tables.
Syntax
aaHistClientTrend.RetrieveExtensionData = discrete;
Result = aaHistClientTrend.RetrieveExtensionData;
Remarks
The extension data tables are logical tables that are
populated from the Wonderware Historian data files. These
tables support the historian time domain extensions for
handling data.
The default value is True.
RetrieveManualData
The RetrieveManualData property is a read-write property
that enables or disables the retrieval of data from the manual
data tables.
Syntax
aaHistClientTrend.RetrieveManualData = discrete;
Result = aaHistClientTrend.RetrieveManualData;
Remarks
The manual data tables are normal SQL Server tables that
are used to store data.
The default value is True.
RTRate
The RTRate property is a read-write property that gets or
sets the live mode refresh interval, in seconds.
Syntax
aaHistClientTrend.RTRate = object;
Result = aaHistClientTrend.RTRate;
Remarks
Do not use. Only provided for backward compatibility. Use
the RealTimeRate property instead.
Remarks
The default value is 1.
Rubberband
The RubberBand property is a read-write property that
enables or disables rubber band scaling.
Syntax
aaHistClientTrend.RubberBand = discrete;
Result = aaHistClientTrend.RubberBand;
Remarks
Provided for backward compatibility. Use the
RubberBandScaling property instead.
Remarks
The default value is False.
RubberbandAll
The RubberbandAll property is a read-write property that
indicates whether all tags are scaled by rubber band scaling
or just the selected tags.
Syntax
aaHistClientTrend.RubberbandAll = discrete;
Result = aaHistClientTrend.RubberbandAll;
Remarks
The default value is True.
RubberBandScaling
The RubberBandScaling property is a read-write property
that enables or disables rubber band scaling.
Syntax
aaHistClientTrend.RubberBandScaling = discrete;
Result = aaHistClientTrend.RubberBandScaling;
Remarks
The default value is False.
Servers
The Servers property is a read-only property that gets the
server list.
Syntax
Result = aaHistClientTrend.Servers;
Remarks
This property has no default value.
Return Value
The result is an aaServers object. For more information on
the aaServers object, see aaServers Object on page 579.
ShowLimits
The ShowLimits property is a read-write property that shows
or hides the limits for a tag.
Syntax
aaHistClientTrend.ShowLimits = discrete;
Result = aaHistClientTrend.ShowLimits;
Remarks
The default value is True.
ShowValuesAtCursor
The ShowValuesAtCursor property is a read-write property
that shows/hides data values at the trend cursors along the
value axis.
Syntax
aaHistClientTrend.ShowValuesAtCursor = discrete;
Result = aaHistClientTrend.ShowValuesAtCursor;
Remarks
The default value is False.
If the ShowValuesAtCursor property is set to True, the
ValueAxisLabel property is set to 2, and values at cursors are
shown in the chart. If the ShowValuesAtCursor property is
set to False, the ValueAxisLabel property is set to 0, and
multiple scales are shown in the chart.
ShowWaitCursor
The ShowWaitCursor property is a read-write property that
controls the usage of the wait cursor (hourglass).
Syntax
aaHistClientTrend.ShowWaitCursor = discrete;
Result = aaHistClientTrend.ShowWaitCursor;
Remarks
The default value is False.
If the ShowWaitCursor property is set to true, the wait cursor
(hourglass) is shown when you move the pointer over the
toolbar, time bar, or the Servers pane or the Filters pane in
the Tag Picker.
The ShowWaitCursor property setting does not override the
wait cursor of the Trend. For example, if the
ShowWaitCursor property is set to false, the Trend still
shows a wait cursor during a refresh. This property only
provides an option to force the wait cursor at other times.
ShowXAxisCursors
The ShowXAxisCursors property is a read-write property
that shows or hides the time axis (x-axis) cursors.
Syntax
aaHistClientTrend.ShowXAxisCursors = discrete;
Result = aaHistClientTrend.ShowXAxisCursors;
Remarks
The default value is False.
ShowYAxisCursor
The ShowYAxisCursor property is a read-write property that
shows or hides the value axis (y-axis) cursors.
Syntax
aaHistClientTrend.ShowYAxisCursor = discrete;
Result = aaHistClientTrend.ShowYAxisCursor;
Remarks
The default value is False.
SingleTagMode
The SingleTagMode property is a read-write property that
controls whether to show only the currently selected tag or
all tags.
Syntax
aaHistClientTrend.SingleTagMode = discrete;
Result = aaHistClientTrend.SingleTagMode;
Remarks
The default value is False.
StartDate
The StartDate property is a read-only property that gets the
timestamp at the left edge of the trend.
Syntax
Result = aaHistClientTrend.StartDate;
ReturnValue
The result is a DateTime data type. For information on the
date/time value, see DateTime on page 673.
This property has no default value.
SummaryDataMode
This property is included for backward compatibility only. Its
value is ignored.
Syntax
aaHistClientTrend.SummaryDataMode = discrete;
Result = aaHistClientTrend.SummaryDataMode;
Remarks
To retrieve summarized data, use a retrieval style instead.
For more information, see Working with Retrieval Styles on
page 807.
SupressErrors
The SupressErrors property is a read-write property that
suppresses or allows errors.
Syntax
aaHistClientTrend.SupressErrors = discrete;
Result = aaHistClientTrend.SupressErrors;
Remarks
The default value is False.
TagGridOrientation
The TagGridOrientation property is a read-write property
that orients the tag list vertically or horizontally.
Syntax
aaHistClientTrend.TagGridOrientation = integer;
Result = aaHistClientTrend.TagGridOrientation;
Remarks
0 = Horizontal; 1 = Vertical.
The default value is 0.
TagListRows
The TagListRows property is a read-write property that sets
the height of the Tag List pane in the Trend control.
Syntax
aaHistClientTrend.TagListRows = integer;
Result = aaHistClientTrend.TagListRows;
Remarks
If the value of TagListRows is 0, the Tag List pane is not
visible.
The default value is 5.
TagPicker
The TagPicker property is a read-only property that gets the
TagPicker object used in the Trend control.
Syntax
Result = aaHistClientTrend.TagPicker;
Return Value
The return value is an aaHistClientTagPicker control. For
more information on this control, see Chapter 10,
aaHistClientTagPicker Control.
TagPickerVisible
The TagPickerVisible property is a read-write property that
shows or hides the Tag Picker in the Trend control.
Syntax
aaHistClientTrend.TagPickerVisible = discrete;
Result = aaHistClientTrend.TagPickerVisible;
Remarks
The default value is True.
TargetRegionExcursionType
The TargetRegionExcursionType property is a read-write
property that determines whether the values that fall outside
the target region of a tag are highlighted.
Syntax
aaHistClientTrend.TargetRegionExcursionType =
aaTargetRegionExcursionType;
Result = aaHistClientTrend.TargetRegionExcursionType;
Remarks
For information on possible values, see
aaTargetRegionExcursionType Enumeration on page 492.
The default value is 1 (highlight values in a special color).
TargetRegionOpacity
The TargetRegionOpacity is a read-write property that
determines the opacity of a tag’s target region.
Syntax
aaHistClientTrend.TargetRegionOpacity = integer;
Result = aaHistClientTrend.TargetRegionOpacity;
Remarks
A value of 0 means transparent, 100 means fully opaque. The
default value is 20.
TimeAxisLabelColor
The TimeAxisLabelColor property is a read-write property
that changes the color of the text labels that show the time in
the chart area of the Trend control.
Syntax
aaHistClientTrend.TimeAxisLabelColor = integer;
Result = aaHistClientTrend.TimeAxisLabelColor;
Remarks
When the value of the TimeAxisLabelColor property changes,
the color of the time-axis text labels also change. For more
information on setting the color value, see Color on page 673.
The default value is 0.
TimeBarVisible
The TimeBarVisible property is a read-write property that
shows or hides the time and main toolbars in the Trend
control.
Syntax
aaHistClientTrend.TimeBarVisible = discrete;
Result = aaHistClientTrend.TimeBarVisible;
Remarks
The default value is True.
TimeBarVisible2
The TimeBarVisible2 property is a read-write property that
shows or hides the time toolbar in the Trend control.
Syntax
aaHistClientTrend.TimeBarVisible2 = discrete;
Result = aaHistClientTrend.TimeBarVisible2;
Remarks
This property is provided for backward compatibility.
Alternatively, you can use the TimeBarVisible property,
which shows or hides the main toolbar as well as the time
toolbar.
The default value is True.
TimeSelector
The TimeSelector property is a read-only property that gets
the Time Range Picker object used in the Trend control.
Syntax
Result = aaHistClientTrend.TimeSelector;
Return Value
The return value is an aaHistClientTimeRangePicker
control. For more information on this control, see Chapter 11,
aaHistClientTimeRangePicker Control
ToolBarVisible
The ToolBarVisible property is a read-write property that
shows or hides the main toolbar in the Trend control.
Syntax
aaHistClientTrend.ToolBarVisible = discrete;
Result = aaHistClientTrend.ToolBarVisible;
Remarks
The default value is True.
ToolbarVisible2
The ToolBarVisible2 property is a read-write property that
shows or hides the main toolbar in the Trend control.
Syntax
aaHistClientTrend.ToolBarVisible2 = discrete;
Result = aaHistClientTrend.ToolBarVisible2;
Remarks
This property is provided for backward compatibility only.
Use the ToolBarVisible property instead.
The default value is True.
ToolTipText
The ToolTipText property is a read-write property that gets
or sets the pop-up text that appears when the mouse cursor is
hovered over the control at runtime.
Syntax
aaHistClientTrend.ToolTipText = message;
Result = aaHistClientTrend.ToolTipText;
Remarks
The default is an empty message value ( "" ).
TraceGradientEndingPercentage
This read-write property determines the ending opacity of a
scatter plot trace if a gradient is used.
Syntax
aaHistClientTrend.TraceGradientEndingPercentage =
integer;
Result =
aaHistClientTrend.TraceGradientEndingPercentage;
Remarks
The ending opacity applies to the latest data point in the
scatter plot. A value of 0 means transparent, 100 means fully
opaque. The default value is 100. This property is only used if
the TraceGradientType property is set to use a gradient.
TraceGradientStartingPercentage
This read-write property determines the starting opacity of a
scatter plot trace if a gradient is used.
Syntax
aaHistClientTrend.TraceGradientStartingPercentage =
integer;
Result =
aaHistClientTrend.TraceGradientStartingPercentage;
Remarks
The starting opacity applies to the earliest data point in the
scatter plot. A value of 0 means transparent, 100 means fully
opaque. The default value is 20. This property is only used if
the TraceGradientType property is set to use a gradient.
TraceGradientType
This read-write property determines whether a gradient is
applied to the trace(s) in a scatter plot.
Syntax
aaHistClientTrend.TraceGradientType =
aaTraceGradientType;
Result = aaHistClientTrend.TraceGradientType;
Remarks
For information on possible values, see
aaTraceGradientType Enumeration on page 493.
The default value is 1 (opacity gradient).
UpdateToCurrentTimeState
This read-write property determines whether the Update to
Current Time option is enabled.
Syntax
aaHistClientTrend.UpdateToCurrentTimeState =
aaUpdateToCurrentTimeState;
Result = aaHistClientTrend.UpdateToCurrentTimeState;
Remarks
For information on how this option works in different
scenarios, see Time Picker on page 47, Refreshing the Trend
Chart on page 58, and Showing Live Data on page 73.
For information on possible values, see
aaUpdateToCurrentTimeState Enumeration on page 494.
The default value is 1 (option is enabled).
UseIniFile
Do not use. Obsolete.
Syntax
aaHistClientTrend.UseIniFile = integer;
Result = aaHistClientTrend.UseIniFile;
Remarks
The default value is 0.
ValueAxisLabel
The ValueAxisLabel property is a read-write property that
gets or sets the value axis labeling.
Syntax
aaHistClientTrend.ValueAxisLabel =
aaValueAxisLabelEnumeration;
Result = aaHistClientTrend.ValueAxisLabel;
Remarks
The default value is 0 (MultipleScales).
For more information on value axis labeling, see Scaling Tags
on page 75. For more information on the
aaValueAxisLabelEnumeration enumeration, see
aaValueAxisLabelEnumeration Enumeration on page 495.
If the ShowValuesAtCursor property is set to True, the
ValueAxisLabel property is set to 2, and values at cursors are
shown in the chart. If the ShowValuesAtCursor property is
set to False, the ValueAxisLabel property is set to 0, and
multiple scales are shown in the chart.
XCursor1Color
The XCursor1Color property is a read-write property that
gets or sets the color for first time axis cursor.
Syntax
aaHistClientTrend.XCursor1Color = integer;
Result = aaHistClientTrend.XCursor1Color;
Remarks
For information on setting the color value, see Color on page
673.
Remarks
The default value is 255.
XCursor1Pos
The XCursor1Pos property is a read-write property that
controls the position of the first time axis cursor.
Syntax
aaHistClientTrend.XCursor1Pos = DateTime;
Result = aaHistClientTrend.XCursor1Pos;
Remarks
The value is given as a date/time value. For information on
the date/time value format, see DateTime on page 673.
To control the position of the first X axis cursor in a scatter
plot, use the CurrentValOfX1 property instead.
This property has no default value.
XCursor2Color
The XCursor2Color property is a read-write property that
gets or sets the color for second time axis cursor.
Syntax
aaHistClientTrend.XCursor2Color = integer;
Result = aaHistClientTrend.XCursor2Color;
Remarks
For information on setting the color value, see Color on page
673.
The default value is 16711680.
XCursor2Pos
The XCursor2Pos property is a read-write property that
controls the position of the second time axis cursor.
Syntax
aaHistClientTrend.XCursor2Pos = DateTime;
Result = aaHistClientTrend.XCursor2Pos;
Remarks
The value is given as a date/time value. For information on
the date/time value format, see DateTime on page 673.
To control the position of the second X axis cursor in a scatter
plot, use the CurrentValOfX2 property instead.
This property has no default value.
YCursor1Color
The YCursor1Color property is a read-write property that
gets or sets the color for first value axis cursor.
Syntax
aaHistClientTrend.YCursor1Color = integer;
Result = aaHistClientTrend.YCursor1Color;
Remarks
For information on setting the color value, see Color on page
673.
The default value is 32768.
YCursor2Color
The YCursor2Color property is a read-write property that
gets or sets the color for second value axis cursor.
Syntax
aaHistClientTrend.YCursor2Color = integer;
Result = aaHistClientTrend.YCursor2Color;
Remarks
For information on setting the color value, see Color on page
673.
The default value is 32768.
ZoomOutPercentage
The ZoomOutPercentage property is a read-write property
that gets or sets the percentage (1 to 100) to zoom by when
zooming out on the trend chart.
Syntax
aaHistClientTrend.ZoomOutPercentage = integer;
Result = aaHistClientTrend.ZoomOutPercentage;
Remarks
The default value is 25.
aaHistClientTrend Methods
The following are the methods used by the
aaHistClientTrend:
• AboutBox
• AddAnyTag
• AddServer
• AddServerEx
• AddTag
• ClearTags
• CurrentTagGetStyle
• DeleteCurrentTag
• FileNew
• FileOpen
• FileOpenEx
• FileSave
• FileSaveEx
• GetMenuItemEnabled
• GetTagColor
• GetTagFormat
• GetTagOffsetMS
• GetTagPenStyle
• GetTagPenWidth
• GetTagPrecision
• GetTagValAtX1
• GetTagValAtX2
• GetTagVisible
• GetToolbarButtonEnabled
• GraphStack
• LoadCRVString
• LoadTargetRegionFromFile
• ManualConnect
• MoveNextTag
• MovePrevTag
• PanLeft
• PanRight
• PrintGraph
• PrintGraphDlg
• PropertiesDlg
• RefreshData
• RemoveServer
• RemoveServerEx
• RemoveTag
• RetrievalOptionsGetStyle
• SaveData
• SaveImage
• SaveSettings
• ScaleAllTags
• ScaleAllTagsDlg
• ScaleAutoAllTags
• ScaleAutoTag
• ScaleDownAllTags
• ScaleDownTag
• ScaleMoveAllTagsDown
• ScaleMoveAllTagsUp
• ScaleMoveTagDown
• ScaleMoveTagUp
• ScaleTag
• ScaleTagDlg
• ScaleUpAllTags
• ScaleUpTag
• SetCurrentTag
• SetCurrentTagXAxisTag
• SetCurrentTagXAxisTagIndex
• SetDates
• SetDuration
• SetMenuItemEnabled
• SetTagColor
• SetTagFormat
• SetTagColorDlg
• SetTagOffsetMS
• SetTagPenStyle
• SetTagPenWidth
• SetTagPrecision
• SetTagVisible
• SetTimeSpan
• SetToolbarButtonEnabled
• ShowStatistics
• ZoomIn
• ZoomOut
AboutBox
The AboutBox method shows the About dialog box for the
control.
Syntax
[Result=] aaHistClientTrend.AboutBox();
AddAnyTag
The AddAnyTag method verifies and adds a tag to the trend.
Syntax
[Result=] aaHistClientTrend.AddAnyTag(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
Returns True if the tag was added; otherwise returns False.
Remarks
The tag can be on any server. This method first checks if the
tag exists before adding it. The AddTag method also adds a
tag, but it does not perform the checking and is thus more
efficient.
If you specify a server name that is part of the current server
list, but is currently disconnected, an attempt is made to
connect to the server. If the authentication credentials are
correct, the server is logged on, and the tag added.
If you specify a server name that is not part of the current
server list, the runtime user is prompted to add the server
name to the server list. A False is returned. If you want to
suppress the notification, use the SupressErrors property.
For more information, see SupressErrors on page 442.
AddServer
The AddServer method adds a server to the list.
Syntax
[Result=] aaHistClientTrend.AddServer(message
serverName, message loginName, message password,
[discrete bPersistPassword]);
Parameters
serverName
The name of the server.
loginName
A valid user name to log on to the server. If no login name is
provided, Windows integrated security is used.
password
A valid password for the server.
bPersistPassword
Optional parameter. If set to True, the password is
remembered for the subsequent connection. The password
is only remembered for single application; the persisted
password is not available to all applications. The default
value is True.
Return Value
Returns True if the server can be added; otherwise returns
False.
AddServerEx
The AddServerEx method adds a server to the list.
Syntax
[Result=] aaHistClientTrend.AddServerEx(message
serverName, message loginName, message password,
[discrete bPersistPassword]);
Parameters
serverName
The name of the server.
loginName
A valid user name to log on to the server. If no login name is
provided, Windows integrated security is used.
password
A valid password for the server.
bPersistPassword
If set to True, the password is remembered for the
subsequent connection. The password is only remembered
for single application; the persisted password is not
available to all applications.
Return Value
Returns True if the server can be added; otherwise returns
False.
Remarks
All parameters are required. Errors, if any, are reported.
AddTag
The AddTag method adds the specified tag to the trend.
Syntax
[Result=] aaHistClientTrend.AddTag(message serverName,
message newTag, integer tType);
Parameters
serverName
The name of the server for which to add the tag.
newtag
The name of the tag to add.
tType
The type of tag. This parameter is provided for backward
compatibility and does not have any effect on the outcome of
the operation. However, you must still specify one of the
following valid values: 1, 2, 3, or 5.
Return Value
Returns True if the tag can be added; otherwise returns
False.
ClearTags
The ClearTags method removes all tags from the trend.
Syntax
[Result=] aaHistClientTrend.ClearTags();
CurrentTagGetStyle
This method returns the name of a retrieval style based on
its index in the list of available retrieval styles for the
currently selected tag.
Syntax
Result = aaHistClientTrend.CurrentTagGetStyle(integer
styleNumber);
Parameters
styleNumber
The index of the style whose name you want to retrieve.
Counting starts at 0.
Return Value
Returns the style’s name as defined for the current locale. If
no style names are defined for the current locale, the name in
the en locale is returned.
Remarks
To find out how many retrieval styles are available for the
current tag, use the CurrentTagNumStyles property.
DeleteCurrentTag
The DeleteCurrentTag method deletes the currently selected
tag.
Syntax
[Result=] aaHistClientTrend.DeleteCurrentTag();
Return Value
Returns True if the tag can be deleted; otherwise returns
False.
FileNew
The FileNew method creates a new file and then resets the
trend to the default properties.
Syntax
[Result=] aaHistClientTrend.FileNew();
Return Value
Returns True if the file is successfully created; otherwise
returns False.
FileOpen
The FileOpen method opens the specified trend file.
Syntax
[Result=] aaHistClientTrend.FileOpen([message
fileName]);
Parameters
fileName
Optional paramter. The full path to the trend file to open.
Return Value
Returns True if the file can be successfully opened; otherwise,
returns False.
Remarks
Any errors are reported.
FileOpenEx
The FileOpenEx method opens the specified trend file.
Syntax
[Result=] aaHistClientTrend.FileOpenEx([message
fileName]);
Parameters
fileName
The full path to the trend file to open.
Return Value
Returns True if the file can be successfully opened;
otherwise, returns False.
Remarks
All parameters are required. Errors, if any, are reported.
FileSave
The FileSave method saves the trend to the specified file.
Syntax
[Result=] aaHistClientTrend.FileSave([message
fileName]);
Parameters
fileName
Optional parameter. The name of the trend file to save.
Return Value
Returns True if the file can be successfully saved; otherwise,
returns False.
Remarks
Any Errors are reported.
Any errors are reported.
FileSaveEx
The FileSaveEx method saves the trend to the specified file.
Syntax
[Result=] aaHistClientTrend.FileSaveEx([message
fileName]);
Parameters
fileName
The name of the trend file to save.
Return Value
Returns True if the file can be successfully saved; otherwise,
returns False.
Remarks
All parameters are required. Errors, if any, are reported.
GetMenuItemEnabled
Use the GetMenuItemEnabled method to check if a specific
command in the context menu is enabled.
Syntax
[Result=] aaHistClientTrend.GetMenuItemEnabled(integer
itemNumber);
Parameters
itemNumber
The index number of the command. Numbering starts at 0.
Return Value
Returns True if the menu item is enabled; otherwise, returns
False.
Remarks
If you specify -1 as the itemNumber parameter, the method
checks the status of all items in the menu.
GetTagColor
The GetTagColor method gets the line color of the tag curve
in the trend.
Syntax
[Result=] aaHistClientTrend.GetTagColor(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
Returns an integer that specifies the color. For information
on the color value, see Color on page 673.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
GetTagFormat
The GetTagFormat method gets how the values for the tag
appear, either in decimal format or scientific format.
Syntax
[Result=] aaHistClientTrend.GetTagFormat(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
Returns an integer. 0 = Decimal; 1 = Scientific.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
GetTagOffsetMS
The GetTagOffsetMS method gets the amount of time that
the trend curve is shifted from the actual time.
Syntax
[Result=] aaHistClientTrend.GetTagOffsetMS(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
The result is an integer value for the tag offset in
milliseconds. For more information, see Using Time Offsets
to Compare Data on page 112.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
GetTagPenStyle
The GetTagPenStyle method gets the style of the trend curve
for the currently selected tag. For example, a solid or dashed
line.
Syntax
[Result=] aaHistClientTrend.GetTagPenStyle(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
Returns the pen style as an integer value. Valid values are:
0 Solid
1 Dashed
2 Dotted
3 DashDot
4 DashDotDot
5 Alternate
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
GetTagPenWidth
The GetTagPenWidth method gets the thickness of the trend
curve for the selected tag.
Syntax
[Result=] aaHistClientTrend.GetTagPenWidth(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
The width, in pixels, of the pen as an integer.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
GetTagPrecision
The GetTagPrecision method gets the number of decimal
places to show for the data value of the currently selected
tag. This applies only to analog tags.
Syntax
[Result=] aaHistClientTrend.GetTagPrecision(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
The decimal places (precision) for the tag as an integer.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
GetTagValAtX1
The GetTagValAtX1 method gets the value of the specified
tag at the point at which the curve intersects with the first
time axis cursor.
Syntax
[Result=] aaHistClientTrend.GetTagValAtX1(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
The tag value as a real.
Remarks
For more information on cursors, see Using Axis Cursors on
page 89. If the specified tag is shown in the chart multiple
times, the method uses the first instance that was added.
In a scatter plot, this method behaves as if the X axis were a
time axis and the X axis cursors were time cursors. For
example, if the plot shows data from 3:00 PM to 4:00 PM, and
the cursor is exactly at the middle of the X axis, this method
returns the value of the tag at 3:30 PM.
GetTagValAtX2
The GetTagValAtX2 method gets the value of the specified
tag at the point at which the curve intersects with the second
time axis cursor.
Syntax
[Result=] aaHistClientTrend.GetTagValAtX2(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
The tag value as a real.
Remarks
For more information on cursors, see Using Axis Cursors on
page 89. If the specified tag is shown in the chart multiple
times, the method uses the first instance that was added.
In a scatter plot, this method behaves as if the X axis were a
time axis and the X axis cursors were time cursors. For
example, if the plot shows data from 3:00 PM to 4:00 PM, and
the cursor is exactly at the middle of the X axis, this method
returns the value of the tag at 3:30 PM.
GetTagVisible
The GetTagVisible method gets whether the selected tag is
visible in the trend chart.
Syntax
[Result=] aaHistClientTrend.GetTagVisible(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
The visibility as a discrete. False = Not visible; True =
Visible.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
GetToolbarButtonEnabled
Use the GetToolbarButtonEnabled method to check if a
specific button in the toolbar is enabled.
Syntax
[Result=] GetToolbarButtonEnabled(integer
buttonNumber);
Parameters
buttonNumber
The index number of the toolbar button. Numbering starts
at 0.
Return Value
Returns True if the button is enabled; otherwise, returns
False.
GraphStack
This method toggles the chart between “stacked” mode (one
tag curve on top of the other) and non-stacked mode.
Syntax
[Result=] aaHistClientTrend.GraphStack();
Return Value
Returns True if the operation was successful.
LoadCRVString
The LoadCRVString method is an obsolete method. Do not
use.
Syntax
[Result=] aaHistClientTrend.LoadCRVString(message crv);
LoadTargetRegionFromFile
This method sets a target region for the currently selected
tag based on values read from a CSV file. It replaces any
existing target region that may already be defined for the tag.
Syntax
[Result=]
aaHistClientTrend.LoadTargetRegionFromFile(message
source);
Parameters
source
The location of the file containing the target region items.
This can be a local file name or a URL.
Return Value
Returns True if the tag’s target region was set successfully;
otherwise, returns False, and the tag’s existing target region
is left unchanged.
Remarks
For information on file format requirements, see Defining a
Target Region for a Tag on page 62 for regular trends, and
Defining a Target Region for a Scatter Plot on page 142 for
scatter plots.
ManualConnect
The ManualConnect method displays the Server List
Connection dialog box.
Syntax
[Result=] aaHistClientTrend.ManualConnect();
MoveNextTag
The MoveNextTag method sets the current tag to the next
tag in the tag list.
Syntax
[Result=] aaHistClientTrend.MoveNextTag();
Return Value
Returns True if the operation was successful; otherwise,
False is returned. If you call this method while the last tag in
the list is selected, the current tag is set to the first tag in the
list.
MovePrevTag
The MovePrevTag method sets the current tag to the
previous tag in the tag list.
Syntax
[Result=] aaHistClientTrend.MovePrevTag();
Return Value
Returns True if the operation was successful; otherwise,
returns False. If you call this method while the first tag in
the list is selected, the first tag remains the current tag.
PanLeft
The PanLeft method pans the trend to the left by the amount
specified by pan percentage.
Syntax
[Result=] aaHistClientTrend.PanLeft();
Return Value
Returns True if the time range for the panning can be set;
otherwise, returns False.
Remarks
The pan percentage is set using the PanPercentage property.
PanRight
The PanRight method pans the trend to the right by the
amount specified by pan percentage.
Syntax
[Result=] aaHistClientTrend.PanRight();
Return Value
Returns True if the time range for the panning can be set;
otherwise, returns False.
Remarks
The pan percentage is set using the PanPercentage property.
PrintGraph
The PrintGraph method prints the trend chart to the default
printer.
Syntax
[Result=] aaHistClientTrend.PrintGraph();
PrintGraphDlg
The PrintGraphDlg method displays the Print dialog box,
allowing the runtime user to choose the printer to which to
print the trend chart.
Syntax
[Result=] aaHistClientTrend.PrintGraphDlg();
PropertiesDlg
The PropertiesDlg method opens the Trend Properties dialog
box.
Syntax
[Result=] aaHistClientTrend.PropertiesDlg();
RefreshData
The RefreshData method refreshes the trend chart by
retrieving new data for all tags.
Syntax
[Result=] aaHistClientTrend.RefreshData();
Return Value
Returns True if the trend was successfully updated;
otherwise, returns False.
Remarks
Data is requested from the databases as necessary. This
method ensures that all tags within the trend that can be
synchronized are synchronized.
RemoveServer
The RemoveServer method removes the specified server from
the servers list. If no server is specified, this method removes
the entire server list.
Syntax
[Result=] aaHistClientTrend.RemoveServer([message
serverName]);
Parameters
serverName
Optional parameter. The name of the server to remove.
Return Value
Returns True if the server was successfully removed;
otherwise, returns False.
RemoveServerEx
The RemoveServerEx method removes the specified server
from the servers list. If no server is specified, this method
removes the entire server list.
Syntax
[Result=] aaHistClientTrend.RemoveServerEx([message
serverName]);
Parameters
serverName
The name of the server to remove.
Return Value
Returns True if the server was successfully removed;
otherwise, returns False.
Remarks
All parameters are required. Errors, if any, are reported.
RemoveTag
The RemoveTag method removes the specified tag from the
trend.
Syntax
[Result=] aaHistClientTrend.RemoveTag(message
serverName, message tagName);
Parameters
serverName
The name of the server that the tag is stored on.
tagName
The name of the tag to remove.
Return Value
Returns True if the tag was successfully removed; otherwise,
returns False. If a tag is shown in the chart multiple times,
the method removes the first instance that was added.
RetrievalOptionsGetStyle
This method returns the name of a retrieval style based on its
index in the list of retrieval styles that are available in the
control.
Syntax
Result =
aaHistClientTrend.RetrievalOptionsGetStyle(integer
styleNumber);
Parameters
styleNumber
The index of the style whose name you want to retrieve.
Counting starts at 0.
Return Value
Returns the style’s name as defined for the current locale. If
no style names are defined for the current locale, the name in
the en locale is returned.
Remarks
To find out how many retrieval styles are available in the
control, use the RetrievalOptionsNumStyles property.
SaveData
The SaveData method optionally prompts the runtime user
and saves the trend data (in the "wide" format) or image to a
file or to the clipboard.
Syntax
[Result=] aaHistClientTrend.SaveData(integer format,
message fileName);
Parameters
format
The type of output:
0 Saves trend data in tab-delimited
format using the file name specified in
the fileName parameter.
1 Copies the trend image to the clipboard.
2 Copies the trend image to the clipboard.
(Legacy option)
3 Saves the trend image in JPEG format
using the file name specified in the
fileName parameter.
100 Opens the Save dialog box to save the
trend data in CSV or tab-delimited
format.
fileName
The name of the file.
Return Value
Returns True if the operation was successful; otherwise,
returns False.
SaveImage
The SaveImage method saves the trend image to a JPEG file.
Syntax
[Result=] aaHistClientTrend.SaveImage(message
fileName);
Parameters
fileName
The name of the file. If you leave this value empty and the
current trend has no file name, an error message appears
when the method is executed. If you leave this value empty
and the current trend has a file name, the file is saved
using the trend’s file name with a .JPG extension.
Return Value
Returns True if the file was successfully saved; otherwise,
returns False.
SaveSettings
The SaveSettings method saves the current file.
Syntax
[Result=] aaHistClientTrend.SaveSettings();
Return Value
Returns True if the file was successfully saved; otherwise,
returns False.
Remarks
If no file name currently exists, the user is prompted to
specify a file name.
ScaleAllTags
The ScaleAllTags method sets the y-axis scale for all tags in
the chart.
Syntax
[Result=] aaHistClientTrend.ScaleAllTags(real min, real
max);
Parameters
min
The minimum value for the value (y-axis) scale.
max
The maximum value for the value (y-axis) scale.
Return Value
Returns True if the tags were successfully scaled; otherwise,
returns False.
ScaleAllTagsDlg
The ScaleAllTagsDlg method opens a dialog box that allows
the user to enter new minimum and maximum scale values
for all tags in the chart.
Syntax
[Result=] aaHistClientTrend.ScaleAllTagsDlg();
Return Value
Returns True if the tags were scaled as a result of this
operation; otherwise, returns False (for example, if the user
clicked Cancel in the dialog box).
ScaleAutoAllTags
The ScaleAutoAllTags method sets a suitable y-axis scale for
all tags in the chart according to the currently displayed
minimum and maximum values.
Syntax
[Result=] aaHistClientTrend.ScaleAutoAllTags();
Return Value
Returns True if the scale was successfully set; otherwise,
returns False.
ScaleAutoTag
The ScaleAutoTag method sets a suitable y-axis scale for the
currently selected tag according to the currently displayed
minimum and maximum values.
Syntax
[Result=] aaHistClientTrend.ScaleAutoTag();
Return Value
Returns True if the scale was successfully set; otherwise,
returns False.
ScaleDownAllTags
This method increases the value range of all tags in the chart
by one third.
Syntax
[Result=] aaHistClientTrend.ScaleDownAllTags();
Return Value
Returns True if the scaling was successful; otherwise,
returns False.
ScaleDownTag
This method increases the value range of the currently
selected tag by one third.
Syntax
[Result=] aaHistClientTrend.ScaleDownTag();
Return Value
Returns True if the scaling was successful; otherwise,
returns False.
ScaleMoveAllTagsDown
The ScaleMoveAllTagsDown method moves the value scale
down for all tags in the chart.
Syntax
[Result=] aaHistClientTrend.ScaleMoveAllTagsDown();
Return Value
Returns True if the scaling was successful; otherwise,
returns False.
ScaleMoveAllTagsUp
The ScaleMoveAllTagsUp method moves the value scale up
for all tags in the chart.
Syntax
[Result=] aaHistClientTrend.ScaleMoveAllTagsUp();
Return Value
Returns True if the scaling was successful; otherwise, returns
False.
ScaleMoveTagDown
The ScaleMoveTagDown method moves the value scale down
for the currently selected tag.
Syntax
[Result=] aaHistClientTrend.ScaleMoveTagDown();
Return Value
Returns True if the scaling was successful; otherwise, returns
False.
ScaleMoveTagUp
The ScaleMoveTagUp method moves the value scale up for
the currently selected tag.
Syntax
[Result=] aaHistClientTrend.ScaleMoveTagUp();
Return Value
Returns True if the scaling was successful; otherwise, returns
False.
ScaleTag
The ScaleTag method sets the y-axis scale for the currently
selected tag.
Syntax
[Result=] aaHistClientTrend.ScaleTag(real min, real
max);
Parameters
min
The minimum value for the value (y-axis) scale.
max
The maximum value for the value (y-axis) scale.
Return Value
Returns True if the tag was successfully scaled; otherwise,
returns False.
ScaleTagDlg
The ScaleTagDlg method opens a dialog box that allows the
user to enter new minimum and maximum scale values for
the currently selected tag.
Syntax
[Result=] aaHistClientTrend.ScaleTagDlg();
Return Value
Returns True if the tag was scaled as a result of this
operation; otherwise, returns False (for example, if the user
clicked Cancel in the dialog box).
ScaleUpAllTags
This method decreases the value range of all tags in the chart
by one fourth.
Syntax
[Result=] aaHistClientTrend.ScaleUpAllTags();
Return Value
Returns True if the scaling was successful; otherwise,
returns False.
ScaleUpTag
This method decreases the value range of the currently
selected tag by one fourth.
Syntax
[Result=] aaHistClientTrend.ScaleUpTag();
Return Value
Returns True if the scaling was successful; otherwise,
returns False.
SetCurrentTag
The SetCurrentTag method sets the specified tag to be the
current tag.
Syntax
[Result=] aaHistClientTrend.SetCurrentTag(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
Return Value
The return value is a discrete. Returns True if successful;
otherwise returns False.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
SetCurrentTagXAxisTag
This method configures the currently selected tag in a scatter
plot to use another tag from the tag list as its X axis tag. The
X axis tag is identified by its server and name.
Syntax
[Result=]
aaHistClientTrend.SetCurrentTagXAxisTag(message
serverName, message tagName);
Parameters
serverName
The name of the server that the tagName tag is stored on.
tagName
The name of the tag that you want to use as the X axis tag
for the current tag. The tag must already be contained in
the tag list.
Return Value
The return value is a discrete. Returns True if successful;
otherwise returns False. Possible causes of failures include:
• No tag is currently selected.
SetCurrentTagXAxisTagIndex
This method configures the currently selected tag in a scatter
plot to use another tag from the tag list as its X axis tag. The
X axis tag is identified by its index.
Syntax
[Result=]
aaHistClientTrend.SetCurrentTagXAxisTagIndex(integer
index);
Parameters
index
The index of the tag that you want to use as the X axis tag
for the current tag.
Return Value
The return value is a discrete. Returns True if successful;
otherwise returns False. Possible causes of failures include:
• No tag is currently selected.
SetDates
The SetDates method sets the start and end time for the
trend.
Syntax
[Result=] aaHistClientTrend.SetDates(DateTime
startTime, DateTime endTime);
Parameters
startTime
The start time for the trend.
endTime
The end time for the trend.
Remarks
For information on setting the date/time value, see DateTime
on page 673.
In relative time mode, you must still specify an absolute
date/time value. For example, if the start time of your tags is
11/13/2006 8:00 AM and you want the trend to start at an
offset of one hour to that start time, specify 11/13/2006 9:00
AM for the startTime parameter.
Return Value
Returns True if the dates were set. Returns False in case of
an error.
SetDuration
The SetDuration method sets the time period for the trend
based on a duration that is relative to the current time.
Syntax
[Result=] aaHistClientTrend.SetDuration(DateTime
duration);
Parameters
duration
The time duration from the current time.
Remarks
For information on setting the date/time value, see DateTime
on page 673.
Calling this method sets the end time to the current time and
the start time to the current time minus the specified
duration.
Example
In the following example, the duration is set for the past five
minutes, relative to the current time.
#aaHistClientTrend1.SetDuration("00:05:00");
SetMenuItemEnabled
Use the SetMenuItemEnabled method to control if a specific
command in the shortcut menu is enabled.
Syntax
[Result=] aaHistClientTrend.SetMenuItemEnabled(integer
itemNumber, integer bEnabled);
Parameters
itemNumber
The index number of the command. Numbering starts at 0.
bEnabled
Specify a non-zero number to enable or zero to disable.
Return Value
Returns True if the menu item is enabled; otherwise, returns
False.
Remarks
If you specify -1 as the itemNumber parameter, the method
sets the status of all items in the menu.
Item numbers are as follows:
0 File
2 Single Tag Mode
3 Highlight Tag
5 Next Tag
6 Previous Tag
7 Add Annotation
8 Delete Tag
10 Color
12 View
13 Show
15 Scale Tag
16 Scale All Tags
18 Rubber Band Scaling
19 Apply Rubber Band To All Tags
21 Pan & Zoom
23 Copy
24 Save Data
25 Print
26 Properties
28 Chart Type
29 Tools
30 Live Mode
31 Stacked Traces
32 Refresh
33 Update To Current Time
SetTagColor
The SetTagColor method sets the line color of the tag curve in
the trend.
Syntax
[Result=] aaHistClientTrend.SetTagColor(message
serverName, message tagName, integer color);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
color
The color value for the curve.
Return Value
Returns True if successful; otherwise returns False.
Remarks
For information on setting the color value, see Color on page
673.
If the tag is shown multiple times in the chart, this property
applies to the first instance of the tag that was added.
SetTagFormat
The SetTagFormat method sets how the values for the tag
appear, either in decimal format or scientific format.
Syntax
[Result=] aaHistClientTrend.SetTagFormat(message
serverName, message tagName, long format);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
format
The format for the tag value. 0 = Decimal; 1 = Scientific.
Return Value
Returns True if successful; otherwise returns False.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
SetTagColorDlg
This method opens a dialog box where the user can specify a
color for the currently selected tag.
Syntax
[Result=] aaHistClientTrend.SetTagColorDlg();
Return Value
Returns a discrete value. Returns True if the dialog was
shown; otherwise, returns False (for example, if there are no
tags in the trend).
SetTagOffsetMS
The SetTagOffsetMS method sets the amount of time that
the trend curve of the currently selected tag will be shifted
from the actual time.
Syntax
[Result=] aaHistClientTrend.SetTagOffsetMS(message
serverName, message tagName, integer milliseconds);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
milliseconds
The offset, for the shift in milliseconds. The offset can be
positive or negative. For more information, see Using Time
Offsets to Compare Data on page 112.
Return Value
Returns a discrete value. Returns True if the set was
successful; otherwise, returns False.
Due to the limited range for integer values, the maximum
offset you can set using this property is about 29 days. For
larger offsets, use the CurrentTagStartDate property.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
SetTagPenStyle
The SetTagPenStyle method sets the style of the trend curve
for the currently selected tag. For example, a solid or dashed
line.
Syntax
[Result=] aaHistClientTrend.SetTagPenStyle(message
serverName, message tagName, integer penStyle);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
penStyle
The appearance of the pen. Valid values are:
0 Solid
1 Dashed
2 Dotted
3 DashDot
4 DashDotDot
5 Alternate
Return Value
Returns True if successful; otherwise returns False.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
SetTagPenWidth
The SetTagPenWidth method sets the thickness of the trend
curve.
Syntax
[Result=] aaHistClientTrend.SetTagPenWidth(message
serverName, message tagName, integer width);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
width
The width, in pixels, of the pen.
Return Value
Returns True if successful; otherwise returns False.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
SetTagPrecision
The SetTagPrecision method sets the number of decimal
places to show for the data value of the currently selected
tag. This applies only to analog tags.
Syntax
[Result=] aaHistClientTrend.SetTagPrecision(message
serverName, message tagName, integer precision);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
precision
The decimal places (precision) for the tag. Valid values are
0 to 15.
Return Value
Returns True if successful; otherwise returns False.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
SetTagVisible
The SetTagVisible method sets whether a tag is visible in the
trend chart.
Syntax
[Result=] aaHistClientTrend.SetTagVisible(message
serverName, message tagName, discrete bVisible);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
bVisible
False = Not visible; True = Visible.
Return Value
Returns True if successful; otherwise returns False.
Remarks
If the specified tag is shown in the chart multiple times, the
method uses the first instance that was added.
SetTimeSpan
The SetTimeSpan method sets the start and end time for the
trend.
Syntax
[Result=] aaHistClientTrend.SetTimeSpan(DateTime
startTime, DateTime endTime, integer duration);
Parameters
startTime
The start time for the trend. Only considered if the duration
is set to Custom. For other durations, the start time is
calculated automatically based on the end time and
duration.
endTime
The end time for the trend. Only considered if the duration
is set to Custom, or if the UpdateToCurrentTimeState
property is set to False and the duration is set to an option
from 17 to 32 (OneMinute to ThreeMonths). Otherwise, the
end time is always assumed to be the current time.
duration
The time duration. If the duration is set to Custom, the
specified start and end times are used. For other duration
options, the time indicated by the duration is used, and the
start and/or end times are updated as necessary. For more
information on valid values for the duration, see
aaTimeRangeEnumeration Enumeration on page 671.
Remarks
For information on setting the date/time value, see DateTime
on page 673.
SetToolbarButtonEnabled
Use the SetToolbarButtonEnabled method to control if a
specific button in the toolbar is enabled.
Syntax
[Result=]
aaHistClientTrend.SetToolbarButtonEnabled(integer
buttonNumber, integer bEnabled);
Parameters
buttonNumber
The index number of the toolbar button. Numbering starts
at 0.
bEnabled
Specify a non-zero number to enable the button. Set to zero
to disable.
Return Value
Returns True if the button can be enabled; otherwise, returns
False.
Button numbers are as follows:
0 Open a trend
1 Save the trend
2 Print the trend
3 Copy
5 Configure the servers
6 Configure the trend properties
7 Configure the trend options
9 Select XY Scatter Plot or Trend chart type
10 Enable or disable single tag mode
11 Stack the tag traces
12 Move to the previous tag
13 Move to the next tag
14 Highlight tag
16 Show or hide the time axis cursor
17 Show or hide the value axis cursor
19 Move the current tag up
20 Move the current tag down
21 Scale all tags to their original scale
22 Auto scale all tags
23 Scale all tags up
24 Scale all tags down
26 Enable rubber band scaling
27 Apply rubber band to all tags
28 View license status
ShowStatistics
The ShowStatistics method shows the Statistics dialog box.
Syntax
[Result=] aaHistClientTrend.ShowStatistics();
Remarks
For more information about the Statistics dialog box, see
Viewing Statistics on page 97.
UnsetCurrentTagXAxisTag
This method removes any associated X axis tag from the
currently selected tag in a scatter plot.
Syntax
aaHistClientTrend.UnsetCurrentTagXAxisTag();
Remarks
If the current tag is not associated with any X axis tag, this
method does nothing.
ZoomIn
The ZoomIn method zooms in on the trend chart.
Syntax
[Result=] aaHistClientTrend.ZoomIn();
Return Value
Returns True if the time range for the operation can be set;
otherwise, returns False.
Remarks
The amount of the zoom is controlled by the
ZoomOutPercentage property.
ZoomOut
The ZoomOut method zooms out on the trend chart.
Syntax
[Result=] aaHistClientTrend.ZoomOut();
Return Value
Returns True if the time range for the operation can be set;
otherwise, returns False.
Remarks
The amount of the zoom is controlled by the
ZoomOutPercentage property.
aaHistClientTrend Events
The following are the methods used by the
aaHistClientTrend:
• CurrentTagChanged
• DatesChanged
• StateChanged
• TagDisplayChanged
• TaglistChanged
CurrentTagChanged
The CurrentTagChanged event is triggered when a different
tag is selected in the Tag List.
Syntax
aaHistClientTrend.CurrentTagChanged(message serverName,
message tagName, integer TagType);
Parameters
serverName
The name of the server.
tagName
The name of the tag.
tagType
The type of tag.
Remarks
For more information on the tag type, see aaTagType
Enumeration on page 670.
To retrieve the value of an event parameter in the InTouch
HMI software, refer to #ThisEvent.<Event
Name><Parameter Name> inside the script for the respective
event. For example, to read the value of the tagName
parameter, use a statement like the following:
MyMsgTag = #ThisEvent.CurrentTagChangedtagName;
DatesChanged
The DatesChanged event is triggered when the date for the
trend changes. It is also triggered once when the live or
replay modes are started, but not on the automatic updates
that follow.
Syntax
aaHistClientTrend.DatesChanged();
StateChanged
The StateChanged event is triggered when a change has been
made to the configuration for a tag in the Tag List.
Syntax
aaHistClientTrend.StateChanged();
TagDisplayChanged
The TagDisplayChanged event is triggered when the display
options for a tag in the Tag List are changed. This includes
the following actions:
• Showing or hiding the tag
Remarks
To retrieve the value of an event parameter in the InTouch
HMI software, refer to #ThisEvent.<Event
Name><Parameter Name> inside the script for the respective
event. For example, to read the value of the tagName
parameter, use a statement like the following:
MyMsgTag = #ThisEvent.TagDisplayChangedtagName;
TaglistChanged
The TaglistChanged event is triggered when a tag is added or
removed from the Tag List.
Syntax
aaHistClientTrend.TaglistChanged();
aaHistClientTrend Enumerations
The aaHistClientTrend enumerations include:
• aaChartType Enumeration
• aaDashStyle Enumeration
• aaDataPointLabelingType Enumeration
• aaDateModeEnumeration Enumeration
• aaInterpolationType Enumeration
• aaQualityRules Enumeration
• aaRetrievalMode Enumeration
• aaRetrievalVersion Enumeration
• aaStateCalculation Enumeration
• aaTargetRegionExcursionType Enumeration
• aaTimeStampRules Enumeration
• aaTraceGradientType Enumeration
• aaTrendGradientType Enumeration
• aaTrendType Enumeration
• aaTrendValueFormat Enumeration
• aaValueAxisLabelEnumeration Enumeration
aaChartType Enumeration
An enumeration used to specify the chart type.
aaDashStyle Enumeration
An enumeration used to specify the line style.
aaDataPointLabelingType Enumeration
An enumeration used to specify the type of labels that are
shown next to data points on a chart.
0 None No labels.
1 TimeLabelsOnCurrentTag Time labels on the currently selected tag,
evenly spaced in time.
aaDateModeEnumeration Enumeration
An enumeration used to specify the time mode for the trend
chart.
aaInterpolationType Enumeration
Specifies the interpolation type for data retrieval.
aaQualityRules Enumeration
Specifies the quality rule for data retrieval.
aaRetrievalMode Enumeration
Specifies the data retrieval mode.
aaRetrievalVersion Enumeration
Specifies the history version to retrieve data from.
aaStateCalculation Enumeration
Specifies the aggregation type to use in Time-in-State data
retrieval.
aaTargetRegionExcursionType Enumeration
An enumeration used to specify whether values that fall
outside a tag’s target region should be highlighted.
aaTimeStampRules Enumeration
Specifies the timestamp rule for data retrieval.
aaTraceGradientType Enumeration
An enumeration used to specify the gradient type applied to
the trace in a scatter plot.
0 None No gradient.
1 OpacityGradient Opacity gradient from the start to the end of
the trace.
aaTrendGradientType Enumeration
Specifies the gradient type for the plot area and the
background for a trend.
0 None No gradient.
1 LeftRight Gradient from left to right.
2 TopBottom Gradient from top to bottom.
3 Center Gradient from center outwards.
4 DiagonalLeft Gradient from top left to bottom right.
5 DiagonalRight Gradient from top right to bottom left.
6 HorizontalCenter Gradient from center to left and right edges.
7 VerticalCenter Gradient from the center to top and bottom edges.
aaTrendType Enumeration
Specifies the type of line for the trend curve.
0 Point No line.
1 Line A straight line is drawn directly from point to point
on the trend.
2 StepLine The line is drawn horizontally to the next point and
then vertically up (if ascending) or down (if
descending).
3 Auto Automatically determine the curve type.
For more information on each option, see Configuring Display
Options on page 59.
aaTrendValueFormat Enumeration
Specifies the value display format of the trend value.
aaUpdateToCurrentTimeState Enumeration
Specifies the state of the Update to Current Time option.
aaValueAxisLabelEnumeration Enumeration
Specifies the value display format of the trend value. For
more information on the types of scales, see Scaling Tags on
page 75.
• ArchestrA.HistClient.UI.aaTrendItemEditor
• Dundas.Charting.WinControl.Chart
Chapter 9
aaHistClientQuery Control
aaHistClientQuery Properties
The properties for the aaHistClientQuery control are:
• ActiveServer
• AllowQueryTypeChange
• CurrentServer
• EnableAllQueriesTab
• FavoriteQueriesFolder
• FontBold
• FontCharset
• FontItalic
• FontName
• FontSize
• LockDown
• QueryFont
• QueryString
• Recordset
• Servers
• ToolbarConnectVisible
• ToolbarEditVisible
• ToolbarRequeryVisible
• ToolbarVisible
• UsePersistedServers
ActiveServer
The ActiveServer property is a read-write property that sets
or gets the name of the server to which the
aaHistClientQuery is connected.
Syntax
aaHistClientQuery.ActiveServer = message;
Result = aaHistClientQuery.ActiveServer;
Return Value
The name of the server as a message. If there are no active
servers, this property returns a NULL.
Remarks
This property has no default value.
AllowQueryTypeChange
The AllowQueryTypeChange property is a read-write
property that gets or sets whether the run-time user is
allowed to change the query type.
Syntax
aaHistClientQuery.AllowQueryTypeChange = discrete;
Result = aaHistClientQuery.AllowQueryTypeChange;
Remarks
The default value is True.
CurrentServer
The CurrentServer property is a read-only property that
returns the aaServer object of the server to which the
aaHistClientQuery is connected.
Syntax
Result = aaHistClientQuery.CurrentServer;
Remarks
If there are no active servers, this property returns a NULL.
For more information on the aaServer object, see aaServer
Object on page 571.
This property has no default value.
EnableAllQueriesTab
The EnableAllQueriesTab property is a read-write property
that shows or hides the All Queries tab in the Results pane.
Syntax
aaHistClientQuery.EnableAllQueriesTab = discrete;
Result = aaHistClientQuery.EnableAllQueriesTab;
Remarks
The default value is False.
FavoriteQueriesFolder
The FavoriteQueriesFolder property is a read-write property
that gets or sets the location of the favorite queries folder.
Syntax
aaHistClientQuery.FavoriteQueriesFolder = message;
Result = aaHistClientQuery.FavoriteQueriesFolder;
Remarks
When the FavoriteQueriesFolder property is set, the query
file list in the corresponding folder is transferred to the
Favorite Queries list box.
This property has no default value.
FontBold
The FontBold property is a read-write property that gets or
sets the boldface characteristic for the font used for
displaying the query text in the SQL and All Queries tab in the
Results pane.
Syntax
aaHistClientQuery.FontBold = discrete;
Result = aaHistClientQuery.FontBold;
Remarks
True = Use bold; False = Do not use bold.
The default value is False.
FontCharset
The FontCharset property is a read-write property that gets
or sets the character set used for the query and result text.
Syntax
aaHistClientQuery.FontCharset = integer;
Result = aaHistClientQuery.FontCharset;
Remarks
This property is an integer value that specifies the character
set used by the font. The following are some common settings
for the value:
Value Description
Value Description
FontItalic
The FontItalic property is a read-write property that gets or
sets whether the query text appears in an italicized font.
Syntax
aaHistClientQuery.FontItalic = discrete;
Result = aaHistClientQuery.FontItalic;
Remarks
True = Use italics; False = Do not use italics.
The default value is False.
FontName
The FontName property is a read-write property that gets or
sets the name of the font family used for the query text.
Syntax
aaHistClientQuery.FontName = message;
Result = aaHistClientQuery.FontName;
Remarks
The default value is Tahoma.
FontSize
The FontSize property is a read-write property that gets or
sets the size, in points, of the font used for displaying the
query text.
Syntax
aaHistClientQuery.FontSize = integer;
Result = aaHistClientQuery.FontSize;
Remarks
The default value is 8.
LockDown
The LockDown property is a read-write property that enables
or disables a “lock down” mode in the control.
Syntax
aaHistClientQuery.LockDown = discrete;
Result = aaHistClientQuery.LockDown;
Remarks
In the "lock down" mode, the following features are not
available to the run-time user:
• Tag Picker
• Main toolbar
QueryFont
The QueryFont property is a read-write property that gets or
sets the font used for displaying the query text.
Syntax
aaHistClientQuery.QueryFont = Font;
Result = aaHistClientQuery.QueryFont;
Remarks
This property is not accessible in the InTouch HMI software.
For more information on setting the font, see Font on page
674.
The default font is Tahoma, 8 point (for English versions).
QueryString
The QueryString property is a read-write property that gets
or sets the query string.
Syntax
aaHistClientQuery.QueryString = message;
Result = aaHistClientQuery.QueryString;
Remarks
If you set the QueryString property, then the query type is
automatically set to Custom.
This property has no default.
Recordset
The Recordset property is a read-only property that gets the
data set for the query.
Syntax
DataSet = aaHistClientQuery.Recordset;
Return Value
Returns a DataSet object. For more information on data sets,
see DataSet on page 674.
Remarks
This property is not accessible in the InTouch HMI software.
This property has no default.
Servers
The Servers property is a read-write property that gets or
sets the list of servers.
Syntax
aaHistClientQuery.Servers = aaServers;
Result = aaHistClientQuery.Servers;
Remarks
This property uses the aaServers object. For more
information on the aaServers object, see aaServers Object on
page 579.
This property has no default.
ToolbarConnectVisible
The ToolbarConnectVisible property is a read-write property
that shows or hides the server connection toolbar button.
Syntax
aaHistClientQuery.ToolbarConnectVisible = discrete;
Result = aaHistClientQuery.ToolbarConnectVisible;
Remarks
The default is True.
ToolbarEditVisible
The ToolbarEditVisible property is a read-write property
that shows or hides the cut, copy, and paste toolbar buttons.
Syntax
aaHistClientQuery.ToolbarEditVisible = discrete;
Result = aaHistClientQuery.ToolbarEditVisible;
Remarks
The default is True.
ToolbarRequeryVisible
The ToolbarRequeryVisible property is a read-write property
that shows or hides the re-query (refresh) toolbar button.
Syntax
aaHistClientQuery.ToolbarRequeryVisible = discrete;
Result = aaHistClientQuery.ToolbarRequeryVisible;
Remarks
The default is True.
ToolbarVisible
This read-write property shows or hides the entire toolbar.
Syntax
aaHistClientQuery.ToolbarVisible = discrete;
Result = aaHistClientQuery.ToolbarVisible;
Remarks
The default is True, that is, the toolbar is visible.
UsePersistedServers
This read-write property controls whether changes to the
control’s server connections are only valid for the current
runtime session, or whether they are saved to the global
server list shared by the Wonderware Historian Client
applications.
Syntax
aaHistClientQuery.UsePersistedServers = discrete;
Result = aaHistClientQuery.UsePersistedServers;
Remarks
If you set this property to True, changes to the configured
server connections are saved in the global server list. If you
set it to False, changes do not affect the global server list.
For example, if you add a server while this property is set to
True, the server is added to the global list. If you set the
property to False and remove the same server, it disappears
from the server list for the current runtime session, but it is
not deleted from the global list.
The default is False. To initialize the control with the server
connections stored in the global list, set the value to True.
You can set it back to False afterwards to avoid inadvertent
changes by the run-time user.
For more information on managing servers, see Server
Connection Configuration on page 27.
aaHistClientQuery Methods
The aaHistClientQuery methods are:
• AddServer
• AddServerEx
• AddTag
• ClearTags
• CopyQuery
• CutQuery
• FileOpen
• ManualConnect
• OpenQuery
• PasteQuery
• RemoveTag
• Refresh
• SaveQuery
• SaveResults
• SetDates
• SetDuration
• SetQueryType
• SetQueryType2
• SetTimeSpan
• ShowAbout
AddServer
The AddServer method adds a server to the list.
Syntax
[Result=] aaHistClientQuery.AddServer(message
serverName, message loginName, message password,
[discrete bPersistPassword]);
Parameters
serverName
The name of the server.
loginName
A valid user name to log on to the server. If no login name is
provided, Windows integrated security is used.
password
A valid password for the server.
bPersistPassword
Optional parameter. If set to True, the password is
remembered for the next time a connection is attempted.
The password is only remembered for single application; the
persisted password is not available to all applications. The
default value is True.
Return Value
Returns True if the server can be added; otherwise returns
False.
AddServerEx
The AddServerEx method adds a server to the list.
Syntax
[Result=] aaHistClientTrend.AddServerEx(message
serverName, message loginName, message password,
[discrete bPersistPassword]);
Parameters
serverName
The name of the server.
loginName
A valid user name to log on to the server. If no login name is
provided, Windows integrated security is used.
password
A valid password for the server.
bPersistPassword
If set to True, the password is remembered for the
subsequent connection attempts. The password is only
remembered for single application; the persisted password
is not available to all applications.
Return Value
Returns True if the server can be added; otherwise returns
False.
Remarks
All parameters are required. Errors, if any, are reported.
AddTag
The AddTag method adds a tag to the tag collection.
Syntax
[Result=] aaHistClientQuery.AddTag(message serverName,
message tagName, integer tagType);
Parameters
serverName
The name of the server.
tagName
The name of the tag to add.
tagType
The type of the tag. This parameter is provided for
backward compatibility and does not have any effect on the
outcome of the operation. However, you must still specify
one of the following valid values: 1, 2, 3, or 5.
Return Value
Returns True if the tag can be added; otherwise, returns
False.
ClearTags
The ClearTags method removes all of the tags from the
query.
Syntax
[Result=] aaHistClientQuery.ClearTags();
Example
In the following example, all tags from the query are deleted,
and the ReactLevel tag is added to the query.
#aaHistClientQuery1.ClearTags;
#aaHistClientQuery1.AddTag("MyInSQL", "ReactLevel", 1);
CopyQuery
The CopyQuery method copies the current selection in the
query text box to the clipboard.
Syntax
[Result=] aaHistClientQuery.CopyQuery();
CutQuery
The CutQuery method deletes the current selection in the
query text box and then copies it to the clipboard.
Syntax
[Result=] aaHistClientQuery.CutQuery();
FileOpen
The FileOpen method opens a specified text file containing a
SQL query.
Syntax
[Result=] aaHistClientQuery.FileOpen(message fileName);
Parameters
fileName
The full path to the file.
Remarks
When this method is called, it automatically sets the query
type to Custom. If the SQL tab is active at the time the method
is called, the method loads the SQL query from the file into
the SQL tab, but does not send it to the server. If the Data tab
is active, the method loads the query into the SQL tab, sends
it to the currently selected server, and shows the results on
the Data tab.
Return Value
Returns True if the file can be opened successfully; otherwise
returns False (for example, if no file name is specified or the
specified file does not exist).
ManualConnect
The ManualConnect method opens the Server connection
dialog box.
Syntax
[Result=] aaHistClientQuery.ManualConnect();
OpenQuery
The OpenQuery method opens the Open dialog box, so that
the runtime user can select an existing query file (.sql) to
open.
Syntax
[Result=] aaHistClientQuery.OpenQuery();
PasteQuery
The PasteQuery method pastes the current contents of the
clipboard to the query text box.
Syntax
[Result=] aaHistClientQuery.PasteQuery();
Refresh
The Refresh method re-executes the query.
Syntax
[Result=] aaHistClientQuery.Refresh();
Remarks
The focus must be on the Results tab for this method to take
effect.
RemoveTag
The RemoveTag method removes the specified tag from the
query.
Syntax
[Result=] aaHistClientQuery.RemoveTag(message
serverName, message tagName);
Parameters
serverName
The name of the server.
tagName
The name of the tag to remove.
Return Value
Returns True if the tag was found and can be removed;
otherwise, returns False.
SaveQuery
The SaveQuery method opens the Save As dialog box, so that
the runtime user can save the current query to a text file.
Syntax
[Result=] aaHistClientQuery.SaveQuery();
SaveResults
The SaveResults method opens the Save As dialog box, so that
the runtime user can save the current Data tab contents to a
.txt or .csv file.
Syntax
[Result=] aaHistClientQuery.SaveResults();
SetDates
The SetDates method sets the start and end time for the
query.
Syntax
[Result=] aaHistClientQuery.SetDates(DateTime
startTime, DateTime endTime);
Parameters
startTime
The start time for the query.
endTime
The end time for the query.
Remarks
For more information on setting the date/time, see DateTime
on page 673.
Return Value
Returns True if the dates were set. Returns False in case of
an error.
SetDuration
The SetDuration method sets the query period as a duration
relative to the current time.
Syntax
[Result=] aaHistClientQuery.SetDuration(real duration);
[Result=] aaHistClientQuery.SetDuration(DateTime
duration);
Parameters
duration
The duration from the current time.
Remarks
When using the ActiveX version of the control (for example,
in the InTouch HMI software), the duration parameter can be
either a number of days or a date/time string.
When using the .NET version of the control, the duration
parameter must be a valid DateTime value.
In both cases, when you specify a date/time value, the
duration is the difference between the specified date/time and
the base date of December 30th, 1899, 12:00:00 AM.
For more information on the format for date/time values, see
DateTime on page 673.
Example
In the following example, the time period is set to the past
five minutes, relative to the current time.
#aaHistClientQuery1.SetDuration("00:05:00");
SetQueryType
The SetQueryType method selects the specified query type
and tag type in the Tag Picker.
Syntax
[Result=]
aaHistClientQuery.SetQueryType(aaQueryTypeEnumeratio
n queryType, aaTagType tagType);
Parameters
queryType
The type of the query. For information on the valid
enumerations, see aaQueryTypeEnumeration on page 516.
tagType
The type of the tag. For information on the valid
enumerations, see aaTagType Enumeration on page 670.
Return Value
Returns True if it can be shown; otherwise, returns False.
Remarks
This method is not accessible in the InTouch HMI software.
Use the SetQueryType2 method instead.
SetQueryType2
The SetQueryType2 method selects the specified query type
and tag type in the Tag Picker.
Syntax
[Result=] aaHistClientQuery.SetQueryType2(integer
queryType, integer tagType);
Parameters
queryType
The type of the query. For information on the valid values,
see aaQueryTypeEnumeration on page 516.
tagType
The type of the tag. For information on the valid values, see
aaTagType Enumeration on page 670.
Return Value
Returns True if it can be shown; otherwise, returns False.
Remarks
Use this method in the InTouch HMI software instead of the
SetQueryType method.
SetTimeSpan
The SetTimeSpan method sets the start and end time for the
query.
Syntax
[Result=] aaHistClientQuery.SetTimeSpan(DateTime start,
DateTime end, aaTimeRangeEnumeration duration);
Parameters
startTime
The start time for the query.
endTime
The end time for the query.
duration
The time duration, either Custom or an enumerated set.
Return Value
Returns True if the time span can be set; otherwise, returns
False.
Remarks
The times can be specified as a duration (Last5Minutes,
Last24Hours, etc.) or as a pair of start and end values, in
which case the duration must be specified as Custom.
For more information on setting the date/time, see DateTime
on page 673. For more information on setting the duration,
see aaTimeRangeEnumeration Enumeration on page 671.
ShowAbout
The ShowAbout method opens the About dialog box.
Syntax
[Result=] aaHistClientQuery.ShowAbout();
aaHistClientQuery Events
The aaHistClientQuery events are:
• ModeChanged
• QueryChanged
• ServerChanged
ModeChanged
The ModeChanged event is triggered when the run-time user
changes tabs on the Results pane in the control.
Syntax
aaHistClientQuery.ModeChanged(integer mode);
Parameters
mode
The type of tab for which changes are detected. 0 = The
focus has changed to the Query or All Queries tab; 1 = The
focus has changed to the Results tab.
Remarks
To retrieve the value of an event parameter in the InTouch
HMI software, refer to #ThisEvent.<Event
Name><Parameter Name> inside the script for the respective
event. For example, to read the value of the mode parameter,
use a statement like the following:
MyIntTag = #ThisEvent.ModeChangedmode;
QueryChanged
The QueryChanged event is triggered when the query is
changed.
Syntax
aaHistClientQuery.QueryChanged();
Remarks
When the query changes as a result of a user action with the
control (not as a result of entering text), or as a result of
changing the query type, the control triggers a query
changed event, unless the query is of Custom type. For a
Custom query, the change event is triggered each time the
user changes the text. The change event is also triggered
when the user sets the QueryString property.
ServerChanged
The ServerChanged event is triggered when the server is
changed.
Syntax
aaHistClientQuery.ServerChanged();
Remarks
This event is triggered when a logon has successfully
completed.
aaQueryTypeEnumeration
Used for specifying the various types of queries for the
aaHistClientQuery control.
Chapter 10
aaHistClientTagPicker Control
aaHistClientTagPicker Properties
The aaHistClientTagPicker properties are:
• CurrentServer
• DescriptionFilter
• ExactMatchFilter
• FilterVisible
• HideCaption
• IOAddressFilter
• SelectedPath
• SelectedTagCount
• Servers
• SingleSelectMode
• SplitterOrientation
• TabSelectedIndex
• TagNameFilter
• TagSelectedIndex
• TreeVisible
• TreeWidth
• UseHierarchicalName
• Visible
CurrentServer
The CurrentServer property is a read-write property that
gets or sets the selected server in the Servers pane.
Syntax
aaHistClientTagPicker.CurrentServer = aaServer;
Result = aaHistClientTagPicker.CurrentServer;
Remarks
The current server determines the tags that appear in the
Tags pane. This property uses the aaServer object. For more
information, see aaServer Object on page 571.
This property has no default value.
DescriptionFilter
The DescriptionFilter property is a read-write property that
gets or sets the description filter criteria.
Syntax
aaHistClientTagPicker.DescriptionFilter = message;
Result = aaHistClientTagPicker.DescriptionFilter;
Remarks
The description filter criteria is applied when the ApplyFilter
method is called or when the Apply button is clicked by the
run-time user.
The default is an empty message value ( "" ).
ExactMatchFilter
The ExactMatchFilter property is a read-write property that
gets or sets whether or not the filter criteria must be an exact
match.
Syntax
aaHistClientTagPicker.ExactMatchFilter = discrete;
Result = aaHistClientTagPicker.ExactMatchFilter;
Remarks
The default value is False.
FilterVisible
The FilterVisible property is a read-write property that
shows or hides the Filter pane.
Syntax
aaHistClientTagPicker.FilterVisible = discrete;
Result = aaHistClientTagPicker.FilterVisible;
Remarks
The default value is False.
HideCaption
The HideCaption property is a read-write property that hides
or shows the caption at the top of the Tag Picker.
Syntax
aaHistClientTagPicker.HideCaption = discrete;
Result = aaHistClientTagPicker.HideCaption;
Remarks
The default value is False, that is, the caption is shown.
IOAddressFilter
The IOAddressFilter property is a read-write property that
gets or sets the I/O address filter criteria.
Syntax
aaHistClientTagPicker.IOAddressFilter = message;
Result = aaHistClientTagPicker.IOAddressFilter;
Remarks
The default is an empty message value ( "" ).
SelectedPath
Use this read-write property to return the path of the
currently selected folder or to show only a specific part of the
folder structure on a Wonderware Historian.
Syntax
aaHistClientTagPicker.SelectedPath = message;
Result = aaHistClientTagPicker.SelectedPath;
Remarks
This property serves two purposes:
• When you read this property, the path of the currently
selected folder in the Servers pane is returned. For
example, if the “All Analog Tags” folder in the “Public
Groups” folder on the Server1 host is selected, this
property returns Server1.Public Groups.All Analog
Tags.
SelectedTagCount
This read-only property gets the total count of tags that are
selected in the Tag Picker.
Syntax
Result = aaHistClientTagPicker.SelectedTagCount;
Remarks
This property has no default value.
Servers
This read-write property gets or sets the list of servers.
Syntax
aaHistClientTagPicker.Servers = aaServers;
Result = aaHistClientTagPicker.Servers;
Remarks
This property uses the aaServers object. For more
information, see aaServer Object on page 571.
This property has no default value.
Example: Login
The following InTouch HMI software example adds the
server MyInSQL1 to the Tag Picker and logs on to the server:
%NewServer =
#aaHistClientTagPicker1.Servers.Add("MYINSQL1");
%NewServer.LoginID = "wwAdmin";
%NewServer.Password = "wwadmin";
#aaHistClientTagPicker1.LogOn( %NewServer );
SingleSelectMode
The SingleSelectMode property is a read-write property that
enables or disables only single tag at a time to be selected
from the list of tags.
Syntax
aaHistClientTagPicker.SingleSelectMode = discrete;
Result = aaHistClientTagPicker.SingleSelectMode;
Remarks
The default value is False.
SplitterOrientation
The SplitterOrientation property is a read-write property
that controls whether the splitter bar that divides the Tags
pane from the Servers pane is vertical or horizontal.
Syntax
aaHistClientTagPicker.SplitterOrientation =
aaHistClientTagPickerSplitterOrientation;
Result = aaHistClientTagPicker.SplitterOrientation;
Remarks
This aaHistClientTagPickerSplitterOrientation enumeration
is used for the orientation types. For more information, see
aaHistClientTagPickerSplitterOrientation Enumeration on
page 531.
The default value is 0 (horizontal).
TabSelectedIndex
The TabSelectedIndex is a read-only property that returns
the index of the currently selected tab in the Tag Picker. The
index starts from zero.
Syntax
aaHistClientTagPicker.TabSelectedIndex = integer;
Result = aaHistClientTagPicker.TabSelectedIndex;
TagNameFilter
The TagNameFilter property is a read-write property that
gets or sets the tagname filter criteria.
Syntax
aaHistClientTagPicker.TagNameFilter = message;
Result = aaHistClientTagPicker.TagNameFilter;
Remarks
The default is an empy message value ( "" ).
TagSelectedIndex
The TagSelectedIndex is a read-only property that returns
the index of the currently selected tag in the Tag Picker. The
index starts from zero.
Syntax
aaHistClientTagPicker.TagSelectedIndex = integer;
Result = aaHistClientTagPicker.TagSelectedIndex;
Remarks
If multiple tags are selected, this property returns the index
of the first selected tag.
TreeVisible
The TreeVisible property is a read-write property that shows
or hides the Servers pane.
Syntax
aaHistClientTagPicker.TreeVisible = discrete;
Result = aaHistClientTagPicker.TreeVisible;
Remarks
The default value is True.
TreeWidth
The TreeWidth property is a read-write property that gets or
sets the width of the Servers pane when the splitter
orientation is vertical or the height of the Servers pane when
the splitter orientation is horizontal.
Syntax
aaHistClientTagPicker.TreeWidth = integer;
Result = aaHistClientTagPicker.TreeWidth;
Remarks
The default value is 80.
UseHierarchicalName
The UserHierarchicalName property is a read-write property
that sets the option to use the hierarchical name in the Tag
Picker.
Syntax
aaHistClientTagPicker.UseHierarchicalName = discrete;
Result = aaHistClientTagPicker.UseHierarchicalName;
Visible
The Visible property is a read-write property that shows or
hides the Tag Picker.
Syntax
aaHistClientTagPicker.Visible = discrete;
Result = aaHistClientTagPicker.Visible;
Remarks
The default value is True.
aaHistClientTagPicker Methods
The aaHistClientTagPicker methods are:
• ApplyFilter
• LogOn
• RefreshTags
• SelectedTag
• SetFocusOnSelectedTag
ApplyFilter
The ApplyFilter method applies the filter as set up by the
properties for the name, description, and I/O address filters.
Syntax
[Result=] aaHistClientTagPicker.ApplyFilter();
LogOn
The LogOn method displays a dialog box for connecting to the
specified server.
Syntax
[Result=] aaHistClientTagPicker.Logon(aaServer server);
Parameters
server
The server to which to connect.
Remarks
This methods uses the aaServer object. For more
information, aaServer Object on page 571.
RefreshTags
The RefreshTags method applies the current filter conditions
to all tags from a server.
Syntax
[Result=] aaHistClientTagPicker.RefreshTags();
Remarks
Use the RefreshTags() method to update the set of filtered
tags with any new tags that have been added to the server
since the filter was applied. For example, you can add a tag
to the server using a script, and then use this method to
refresh the Tag Picker so that the new tag is shown.
SelectedTag
The SelectedTag method gets the selected tag as identified by
the index.
Syntax
[aaTag=] aaHistClientTagPicker.SelectedTag(integer
index);
Parameters
index
The numerical identifier for the tag. The identifier is
zero-based.
Return Value
Returns the tag or, if it is out of bounds, returns NULL. (It
does not return a NULL string.)
Remarks
This method works in conjunction with the
SelectedTagCount property.
Example
The following InTouch HMI software example gets all of the
selected tags using a loop:
DIM i AS INTEGER;
DIM count AS INTEGER;
Count = #aaHistClientTagPicker3.SelectedTagCount;
FOR i = 0 TO count - 1
%ReturnTag =
#aaHistClientTagPicker3.SelectedTag( i );
NEXT;
Therefore, you must first check to see that Count is not 0 and
then you can index appropriately to get the tag.
SetFocusOnSelectedTag
The SetFocusOnSelectedTag method sets the focus on the
selected tag based on the selected path and the index of the
selected tab and tag.
Syntax
aaHistClientTagPicker.SetFocusOnSelectedTag(string
treePath, int tabIndex, int tagIndex);
Parameters
treePath
The full path of the tree node from where the tag is to be
selected.
tabIndex
The index of the selected tab starting from zero.
tagIndex
The index of the selected tag starting from zero.
Example
The following example sets the focus on the sixth tag from
the third tab in the “All Discrete Tags” group available under
server MES01.
#aaHistClientQuery1.SetFocusOnSelectedTag
("MES01.Public Groups.All Discrete Tags", 2, 5);
Remarks
This method is specifically used for the aaReports feature in
the Input parameter page of the Wonderware Information
Server portal.
aaHistClientTagPicker Events
The aaHistClientTagPicker events are:
• OnFilterChanged
• OnGroupChanged
• OnTagsPicked
• OnTagsSelected
• OnServerChanged
• OnSelectedTabChanged
• OnTagNameChanged
OnFilterChanged
The OnFilterChanged event is triggered when the filter is
changed.
Syntax
aaHistClientTagPicker.OnFilterChanged();
OnGroupChanged
The OnGroupChanged event is triggered when the tag group
is changed in the navigation tree in the Servers pane.
Syntax
aaHistClientTagPicker.OnGroupChanged();
OnTagsPicked
The OnTagsPicked event is triggered when the user
double-clicks or picks one or more tags.
Syntax
aaHistClientTagPicker.OnTagsPicked();
Remarks
A selected tag is a tag that is highlighted (clicked one time)
with the mouse by a runtime user. A picked tag is a tag that
is double-clicked or selected with the mouse to be dragged. A
"picked" tag is always selected, but a selected tag is not
always picked.
The application controls whether to also "pick" a tag when it
is selected. For example, in the Query client application,
selecting a tag causes a change in the query. This is an
instance of when the selection of a tag also results in its being
picked. In the Trend client application, selecting a tag does
not pick and place it on to the trend. However,
double-clicking on a tag (picking it) does.
OnTagsSelected
The OnTagsSelected event is triggered when the user selects
one or more tags.
Syntax
aaHistClientTagPicker.OnTagsSelected();
Remarks
For the differences between a "picked" tag and a "selected"
tag, see the OnTagsPicked event.
OnServerChanged
The OnServerChanged event is triggered when the server is
changed.
Syntax
aaHistClientTagPicker.OnServerChanged();
OnSelectedTabChanged
The OnSelectedTabChanged event is triggered when the user
changes tabs in the Tags pane.
Syntax
aaHistClientTagPicker.OnSelectedTabChanged();
OnTagNameChanged
The OnTagNameChanged event is triggered when you set
the option to use the hierarchical name or tag name in the
Tag Picker.
Syntax
aaHistClientTagPicker.OnTagNameChanged();
aaHistClientTagPickerSplitterOrientation
Enumeration
Specifies the orientation of the Servers pane with respect to
the Tags pane in the Tag Picker.
Chapter 11
aaHistClientTimeRangePicker
Control
Using aaHistClientTimeRangePicker at
Runtime
The aaHistClientTimeRangePicker control functions the
same as the Time Picker in the time toolbar that appears in
the Trend and Query applications.
For more information on using the Time Picker, see Time
Picker on page 47.
Using aaHistClientTimeRangePicker in an
Application
Use the aaHistClientTimeRangePicker control's properties,
methods, and events to customize how the time selector
behaves during runtime. For example, you can enable the
selection of a list of time durations during runtime.
All properties, methods, and events can be controlled through
scripting. In addition, some of these properties and methods
are exposed through the aaHistClientTimeRangePicker
property panel available during application development.
Adding aaHistClientTimeRangePicker to an
InTouch Window
To add the aaHistClientTimeRangePicker control
1 In WindowMaker, click the Wizards button. The Wizard
Selection dialog box appears.
aaHistClientTimeRangePicker Properties
The properties for the aaHistClientTimeRangePicker are:
• TimeDuration
• EndDate
• Format
• StartDate
• TimeDuration
• UpdateToCurrentTimeState
DurationMS
The DurationMS is a read-write property that controls the
duration of the time range in milliseconds.
Syntax
aaHistClientTimeRangePicker.DurationMS = integer;
Result = aaHistClientTimeRangePicker.DurationMS;
Remarks
When you change this property, the start time is updated
based on the new duration and the current end time.
EndDate
The EndDate property is a read-only property that returns
the end date and time of the time range.
Syntax
Result = aaHistClientTimeRangePicker.EndDate;
Return Value
A message value in a valid date/time format is returned.
Format
The Format property is a read-write property that gets or
sets the date and time formats for the control.
Syntax
aaHistClientTimeRangePicker.Format = message;
Result = aaHistClientTimeRangePicker.Format;
Remarks
To display the string literals that contain date and time
separators or format strings, you must use escape characters
in the substring. For example, to display the date and time as
06/01/2001 12:00 PM, this property must be set to:
"dd'/'MM'/'yyyy hh':'mm tt"
The following table lists all the valid format strings and their
descriptions.
StartDate
The StartDate property is a read-only property that returns
the start date and time of the time range.
Syntax
Result = aaHistClientTimeRangePicker.StartDate;
Return Value
A message value in a valid date/time format is returned.
TimeDuration
The TimeDuration property is a read-write property that
controls the duration of the time range as one of the several
predefined durations.
Syntax
aaHistClientTimeRangePicker.Duration =
aaTimeRangeEnumeration;
Result = aaHistClientTimeRangePicker.Duration;
Remarks
When you change this property, the start time is updated
based on the new duration and the current end time.
For more information on valid values, see
aaTimeRangeEnumeration Enumeration on page 671.
The default value is 18.
UpdateToCurrentTimeState
The UpdateToCurrentTimeState property is a read-write
property that sets the option to update the Time Range
Picker to the current time.
Syntax
aaHistClientTimeRangePicker.UpdateToCurrentTimeState =
integer;
Result =
aaHistClientTimeRangePicker.UpdateToCurrentTimeState;
Remarks
The valid values are 0 and 1. The default value is 0.
aaHistClientTimeRangePicker Methods
The methods for the aaHistClientTimeRangePicker are:
• GetStartAndEndTimes
• RefreshTimes
• SetStartAndEndTimes
GetStartAndEndTimes
The GetStartAndEndTimes method retrieves the start and
end times for the query.
Syntax
[aaTimeRangeEnumeration=]
aaHistClientTimeRangePicker.GetStartAndEndTimes(Date
Time startTime, DateTime endTime);
Parameters
startTime
The start time for the query.
endTime
The end time for the query.
Remarks
The date and time formats are set using the Format
property.
The container may not allow method parameters to return
values. This method is not accessible in the InTouch HMI
software. Use the StartDate, EndDate, and TimeDuration
properties instead.
Return Value
The time range enumeration (such as Custom,
Last5Minutes, and so on) is returned. For more information,
see aaTimeRangeEnumeration Enumeration on page 671.
RefreshTimes
The RefreshTimes method updates the end time to the
current time and recalculates the start time based on the new
end time and the duration.
Syntax
[Result=]
aaHistClientTimeRangePicker.RefreshTimes(discrete
bFireEvent);
Parameters
bFireEvent
When set to True, a change in dates causes the OnChange
event to be triggered.
SetStartAndEndTimes
The SetStartAndEndTimes method sets the time period
based on a start time, end time and/or duration.
Syntax
[Result=]
aaHistClientTimeRangePicker.SetStartAndEndTimes(DateT
ime startTime, DateTime endTime, integer duration);
Parameters
startTime
The start time for the query. Only considered if the duration
is set to Custom. For other durations, the start time is
calculated automatically based on the end time and
duration.
endTime
The end time for the query. Only considered if the duration
is set to Custom or an option from 17 to 32 (OneMinute to
ThreeMonths). Otherwise, the end time is set based on the
duration.
duration
The time range duration. If the duration is set to Custom,
the specified start and end times are used. For other
duration options, the time indicated by the duration is used,
and the start and/or end times are updated as necessary.
For more information on valid values for the duration, see
aaTimeRangeEnumeration Enumeration on page 671.
Remarks
The date and time formats are set using the Format property.
aaHistClientTimeRangePicker Events
The events for the aaHistClientTimeRangePicker are:
• OnChange
OnChange
The OnChange event is triggered when the start date and/or
end dates are changed.
Syntax
aaHistClientTimeRangePicker.OnChange();
Chapter 12
aaHistClientActiveDataGrid
Control
Data Grid
Data appears in a tabular format, where each row represents
a record and each column represents an attribute (field). The
data is read-only.
The data grid displays results based on the SQL statement(s)
executed and can be used to query different tables and
attributes. For example, if the SQL query executes a join on
three tables and includes two attributes from each table, the
aaHistClientActiveDataGrid shows the records resulting
from the join and only the six attributes specified. The
number of columns varies dynamically, depending on how
many records are returned.
You can resize the columns in the data grid.
Button Description
Using aaHistClientActiveDataGrid in an
Application
Use aaHistClientActiveDataGrid's properties, methods, and
events to create scripts that set up a database connection and
customize how the data grid functions during runtime.
aaHistClientActiveDataGrid Properties
The aaHistClientActiveDataGrid properties are:
• AllowUserConfiguration
• AutoRefresh
• BOF
• BusinessObjectServer
• ColumnCount
• Connected
• DatabaseName
• DefaultColumnWidth
• Domain
• Enabled
• EnableShortcutMenu
• EOF
• Handle
• Password
• RefreshFrequency
• Row
• RowCount
• ServerName
• ShowErrorDlgs
• ShowNavigatorBar
• SQLString
• UserName
• VirtualDirectoryName
AllowUserConfiguration
The AllowUserConfiguration property is a read-write
property that determines whether the user can access the
aaHistClientActiveDataGrid Properties dialog box at runtime
by using the control’s shortcut menu.
Syntax
aaHistClientActiveDataGrid.AllowUserConfiguration =
discrete;
Result =
aaHistClientActiveDataGrid.AllowUserConfiguration;
Remarks
True = Show the Properties and SQL menu commands on the
shortcut menu; False = Hide the Properties and SQL menu
commands on the shortcut menu.
If this property is disabled, you can use the
ShowPropertiesDialog method to let the user access the
Properties dialog box.
The default value is True.
AutoRefresh
The AutoRefresh property is a read-write property that
enables or disables automatic refresh of the data in the
aaHistClientActiveDataGrid.
Syntax
aaHistClientActiveDataGrid.AutoRefresh = discrete;
Result = aaHistClientActiveDataGrid.AutoRefresh;
Remarks
True = Automatic refresh on; False = Automatic refresh off.
The default value is False.
Automatic refresh works by periodically calling the Execute
method. The time interval is based on the RefreshFrequency
property. The default time interval is 60 seconds.
The AutoRefresh property is set to False if the last manual
call to the Execute method failed. If the AutoRefresh property
is set to True, and for some reason later fails, it is
automatically set to False, and the
aaHistClientActiveDataGrid is reset (cleared).
BOF
The BOF property is a read-only property that returns
whether the user has attempted to navigate prior to the first
row in the data grid.
Syntax
Result = aaHistClientActiveDataGrid.BOF;
Return Value
The result is a discrete. True is returned if an attempt was
made to move prior to the first row in the data grid through a
call to the MovePrevious method; otherwise False is
returned.
BusinessObjectServer
This read-write property specifies the path to the HTTP
server when using HTTP to access the historian.
Syntax
aaHistClientActiveDataGrid.BusinessObjectServer =
message;
Result =
aaHistClientActiveDataGrid.BusinessObjectServer;
Remarks
If this property is set to a non-empty string value, the control
uses HTTP access to the historian. If it is set to an empty
string, the control uses regular SQL Server access.
You can obtain a secured connection by specifying
https://<Servername>. For example:
#ActiveDataGrid.BusinessObjectServer
="HTTPS://www.server.com";
ColumnCount
The ColumnCount property is a read-only property that gets
the number of columns in the current result set of the data
grid.
Syntax
Result = aaHistClientActiveDataGrid.ColumnCount;
Return Value
Returns the number of columns as an integer. If the data grid
is not connected, 0 is returned.
Remarks
The default value is 0.
Connected
Use this read-write property to initiate or terminate a
connection to the Wonderware Historian and to check
whether a connection is currently active.
Syntax
aaHistClientActiveDataGrid.Connected = discrete;
Result = aaHistClientActiveDataGrid.Connected;
Remarks
If set to True, and the ServerName, DatabaseName,
UserName, and Password properties are set, the control tries
to connect to the Wonderware Historian and execute the SQL
statement specified by the SQLString property. If an error
occurs, the Connected property is set to False.
If set to False while a connection is active, the control is
disconnected from the server and reset.
The default value is False.
DatabaseName
The DatabaseName property is a read-write property that
specifies the name of the database to connect to. The
database must exist on the database server specified by the
ServerName property.
Syntax
aaHistClientActiveDataGrid.DatabaseName = message;
Result = aaHistClientActiveDataGrid.DatabaseName;
Remarks
When working with a Wonderware Historian database, the
value for the DatabaseName property must be Runtime.
However, aaHistClientActiveDataGrid can connect to any
database in the Microsoft SQL Server, such as the master
database.
The default value is Runtime.
DefaultColumnWidth
The DefaultColumnWidth property is a read-write property
that gets or sets the default column width, in pixels, of the
columns shown in the data grid.
Syntax
aaHistClientActiveDataGrid.DefaultColumnWidth =
integer;
Result = aaHistClientActiveDataGrid.DefaultColumnWidth;
Remarks
The default value is 100.
Domain
The Domain property is a read-write property that gets or
sets the domain string for the connection to the server.
Syntax
aaHistClientActiveDataGrid.Domain = message;
Result = aaHistClientActiveDataGrid.Domain;
Remarks
This property is used in cases where the Windows integrated
security requires the domain name to be specified.
The default is an empty message value ( "" ).
Enabled
The Enabled property is a read-write property that enables
or disables the user interface functionality of the control.
Syntax
aaHistClientActiveDataGrid.Enabled = discrete;
Result = aaHistClientActiveDataGrid.Enabled;
Remarks
True = User interface functionality enabled; False = User
interface functionality disabled.
The default value is True.
EnableShortcutMenu
The EnableShortcutMenu property is a read-write property
that enables or disables the right-click shortcut menu of the
control.
Syntax
aaHistClientActiveDataGrid.EnableShortcutMenu =
discrete;
Result = aaHistClientActiveDataGrid.EnableShortcutMenu;
Remarks
True = Shortcut menu enabled; False = Shortcut menu
disabled.
The default value is True.
EOF
The EOF property is a read-only property that returns
whether the aaHistClientActiveDataGrid user has
attempted to navigate beyond the last row in the data grid.
Syntax
Result= aaHistClientActiveDataGrid.EOF;
Return Value
The result is a discrete. True is returned if an attempt was
made to move past the last row in the data grid with a call to
the MoveNext method; otherwise False is returned.
Handle
The Handle property is a read-only property that returns the
Window handle for the control.
Syntax
Result = aaHistClientActiveDataGrid.Handle;
Return Value
The return value is an integer. Returns the 32-bit Window
handle of the main container window.
Remarks
The Window handle is useful when using Windows API
functions to manipulate a control.
This property has no default value.
Password
The Password property is a write-only property that specifies
the password for the provided username on the specified
Wonderware Historian.
Syntax
aaHistClientActiveDataGrid.Password = message;
Remarks
See the Wonderware Historian documentation for the default
passwords associated with the default usernames.
RefreshFrequency
The RefreshFrequency property is a read-write property that
specifies how often an automatic refresh of the
aaHistClientActiveDataGrid occurs.
Syntax
aaHistClientActiveDataGrid.RefreshFrequency = integer;
Result = aaHistClientActiveDataGrid.RefreshFrequency;
Remarks
This property specifies the frequency, in milliseconds, that
the SQL statement is re-executed when the AutoRefresh
property is set to True. The frequency value must be greater
than 0.
The default value is 60,000 milliseconds (1 minute).
Row
The Row property is a read-only property that returns the
relative row number of the selected row in the data grid.
Syntax
Result = aaHistClientActiveDataGrid.Row;
Return Value
The return value is an integer that specifies the number of
the selected row. Row numbers start at 1.
Remarks
The default value is -1.
RowCount
The RowCount property is a read-only property that returns
the total number of rows in the record set that is returned.
Syntax
Result= aaHistClientActiveDataGrid.RowCount;
Return Value
The return value is an integer that specifies the number of
rows in the record set.
Remarks
The default value is 0.
ServerName
The ServerName property is a read-write property that
specifies the name of the Wonderware Historian to which you
want to connect.
Syntax
aaHistClientActiveDataGrid.ServerName = message;
Result = aaHistClientActiveDataGrid.ServerName;
Remarks
The ServerName property must be set to establish a
connection to a Wonderware Historian.
This property has no default value.
ShowErrorDlgs
The ShowErrorDlgs property is a read-write property that
determines whether error messages appear during runtime
in an error dialog box.
Syntax
aaHistClientActiveDataGrid.ShowErrorDlgs = discrete;
Result = aaHistClientActiveDataGrid.ShowErrorDlgs;
Remarks
True = Error messages displayed; False = Error messages
suppressed. If the error message display is disabled, you do
not see any errors, even if they are critical. Use this option
with extreme caution.
The default value is True.
ShowNavigatorBar
The ShowNavigatorBar property is a read-write property
that shows or hides the Navigator toolbar that is located
above the data grid.
Syntax
aaHistClientActiveDataGrid.ShowNavigatorBar = discrete;
Result = aaHistClientActiveDataGrid.ShowNavigatorBar;
Remarks
True = Shows the Navigator toolbar; False = Hides the
Navigator toolbar.
The default value is True.
SQLString
The SQLString property is a read-write property that
specifies the SQL statement to be executed by the Execute
method.
Syntax
aaHistClientActiveDataGrid.SQLString = message;
Result = aaHistClientActiveDataGrid.SQLString;
Remarks
The aaHistClientActiveDataGrid uses the InSQL OLE DB
provider to access the Wonderware Historian historical data.
If you are querying data from the analog or discrete history
tables, the SQL statement must follow the syntax rules for
OLE DB provider queries. Otherwise, you can use any valid
Transact-SQL that returns rows.
Remarks
The default is an empty message value ( "" ).
UserName
The UserName property is a read-write property that
specifies the username used to logon to the Wonderware
Historian specified in the ServerName property.
Syntax
aaHistClientActiveDataGrid.UserName = message;
Result = aaHistClientActiveDataGrid.UserName;
Remarks
See the Wonderware Historian documentation for
information on the default Wonderware Historian users.
Remarks
The default UserName is wwUser.
VirtualDirectoryName
The VirtualDirectoryName property is a read-write property
that gets or sets the virtual directory name.
Syntax
aaHistClientActiveDataGrid.VirtualDirectoryName =
message;
Result =
aaHistClientActiveDataGrid.VirtualDirectoryName;
Remarks
The default is an empty message value ( "" ).
aaHistClientActiveDataGrid Methods
The aaHistClientActiveDataGrid methods are:
• ClearGrid
• ColumnName
• ColumnValue
• ColumnValueByName
• Execute
• MoveFirst
• MoveLast
• MoveNext
• MovePrevious
• RowColumnValue
• RowColumnValueByName
• ShowPropertiesDialog
• SQLAppend
ClearGrid
The ClearGrid method clears the contents of the data grid
and sets the Connected property to False.
Syntax
[Result=] aaHistClientActiveDataGrid.ClearGrid();
ColumnName
The ColumnName method returns the column name that
corresponds to the specified column index.
Syntax
Result = aaHistClientActiveDataGrid.ColumnName(integer
columnIndex);
Parameters
columnIndex
Number of the column name for which the string
representation is returned. Column names start at 1.
Return Value
The name of the column as a message value.
ColumnValue
The ColumnValue method returns the string representation
of the data for the specified column of the currently selected
row.
Syntax
Result = aaHistClientActiveDataGrid.ColumnValue(integer
Column);
Parameters
Column
Number of the column for which the string representation is
returned. Column numbers start at 1.
Return Value
A message representation of the data.
ColumnValueByName
The ColumnValueByName method gets the string
representation of the data for the specified column name, for
the currently selected row.
Syntax
Result =
aaHistClientActiveDataGrid.ColumnValueByName(message
columnName);
Parameters
columnName
The name of the column.
Return Value
The data in the column as a message value.
Execute
The Execute method executes the SQL query defined in the
SQLString property.
Syntax
[Result=] aaHistClientActiveDataGrid.Execute();
Return Value
True = Execution is successful; False = Execution
unsuccessful.
Remarks
If the Execute method fails, the data grid is cleared and an
error is raised.
The most typical conditions that cause Execute to fail are:
1 The specified server is not running or connection to it is
not available.
2 The server assigned to the ServerName property is
invalid or not found.
3 The username assigned to the UserName property is
invalid or not found.
4 The password assigned to the Password property is
invalid or not associated with the specified UserName on
the specified ServerName.
5 There is a syntax error in the SQLString property.
6 The DatabaseName property was not assigned or the
wrong database was specified.
7 The BusinessObjectServer property is set to an HTTP
server that does not exist, or the HTTP server specified is
not running
MoveFirst
The MoveFirst method selects the first row in the data grid.
Syntax
aaHistClientActiveDataGrid.MoveFirst();
MoveLast
The MoveLast method selects the last row in the data grid.
Syntax
aaHistClientActiveDataGrid.MoveLast();
MoveNext
The MoveNext method selects the next row in the data grid.
Syntax
aaHistClientActiveDataGrid.MoveNext();
Remarks
If an attempt is made to move past the last row the EOF
property is set to True.
MovePrevious
The MovePrevious method selects the previous row in the
data grid.
Syntax
aaHistClientActiveDataGrid.MovePrevious();
Remarks
If an attempt is made to move past the last row the BOF
property is set to True.
RowColumnValue
The RowColumnValue method returns the string
representation of the data in the specified row and column in
the data grid.
Syntax
[Result=]
aaHistClientActiveDataGrid.RowColumnValue(integer
row, integer column);
Parameters
row
Number of the row for which the string representation is
returned. Row numbers start at 1.
column
Number of the column for which the string representation is
returned. Column numbers start at 1.
Return Value
A message representation of the data.
Remarks
This property does not move the selected row, nor does it
require the selected row to be changed.
RowColumnValueByName
The RowColumnValueByName method gets the value at the
indicated row and column (specified by name).
Syntax
[Result=]
aaHistClientActiveDataGrid.RowColumnValueByName(inte
ger row, message columnName);
Parameters
row
Number of the row for which the string representation is
returned. Row numbers start at 1.
columnName
Name of the column for which the string representation is
returned.
Return Value
A message representation of the data.
Remarks
This property does not move the selected row, nor does it
require the selected row to be changed.
ShowPropertiesDialog
The ShowPropertiesDialog method shows the Properties
dialog box for the aaHistClientActiveDataGrid during
runtime.
Syntax
[Result=]
aaHistClientActiveDataGrid.ShowPropertiesDialog(
integer Page);
Parameters
Page
Specifies which tab should be active when the Properties
dialog box is opened. 0 = InSQL Connection tab is active; 1 =
SQL tab is active.
SQLAppend
The SQLAppend method appends a section of a long SQL
statement to the end of the existing SQL string in the
SQLString property.
Syntax
[Result=] aaHistClientActiveDataGrid.SQLAppend(message
SQL);
Parameters
SQL
Section of SQL to be added to the SQL statement(s) that are
to be executed.
Remarks
This method facilitates the scripting of long SQL Statements
within the InTouch HMI software. Currently, the InTouch
HMI software has a 131 character limitation for strings. To
circumvent this limitation, use this method to add SQL
statements in sections.
Example
The following example demonstrates how to use the
SQLAppend method to setup the necessary SQL to retrieve
the last 30 minutes of history data for the tag 'SysTimeSec.'
#aaHistClientActiveDataGrid.ServerName = "toddm1";
#aaHistClientActiveDataGrid.UserName = "wwUser";
#aaHistClientActiveDataGrid.Password = "wwUser";
#aaHistClientActiveDataGrid.SQLString = "";
#aaHistClientActiveDataGrid.SQLAppend("DECLARE
@StartDate Datetime");
#aaHistClientActiveDataGrid.SQLAppend("DECLARE @EndDate
Datetime");
#aaHistClientActiveDataGrid.SQLAppend("SELECT
@StartDate = DateAdd(mi, -30, GetDate())");
#aaHistClientActiveDataGrid.SQLAppend("SELECT @EndDate
= GetDate()");
#aaHistClientActiveDataGrid.SQLAppend("SELECT TagName,
DateTime, Value");
#aaHistClientActiveDataGrid.SQLAppend("FROM
v_AnalogHistory");
#aaHistClientActiveDataGrid.SQLAppend("WHERE TagName IN
('SysTimeMin')");
#aaHistClientActiveDataGrid.SQLAppend("AND DateTime >=
@StartDate");
#aaHistClientActiveDataGrid.SQLAppend("AND DateTime <=
@EndDate");
#aaHistClientActiveDataGrid.SQLAppend("AND
wwRetrievalMode = 'Delta' ");
#aaHistClientActiveDataGrid.Execute();
aaHistClientActiveDataGrid Events
The aaHistClientActiveDataGrid control has the following
events:
• OnClick
• OnDblClick
• OnError
OnClick
The OnClick event is triggered every time the user clicks on a
data row in the control.
Syntax
aaHistClientActiveDataGrid.OnClick;
OnDblClick
The OnDblClick event is triggered every time the user
double-clicks on a data row in the control.
Syntax
aaHistClientActiveDataGrid.OnDblClick;
OnError
The OnError event executes each time an error message is to
be displayed.
Syntax
aaHistClientActiveDataGrid.OnError(integer ErrorNo, ref
message ErrStr, ref discrete ShowErrorDlg);
Parameters
ErrorNo
A unique number that corresponds to the error message,
which is specified by the ErrStr parameter.
ErrStr
Message to be displayed in the error dialog box.
ShowErrorDlg
Determines whether the error dialog box appears. True =
Error dialog box displayed; False = Err dialog box not
displayed. The ShowErrorDlg parameter defaults to the
value of the ShowErrorDlg property.
Remarks
The OnError event provides a means to intercept an error
message and either disable it from showing or change the
error message text shown.
#ThisEvent.OnErrorshowErrorDlg =
TRShowErrorDlg; {Show the Error dialog}
IF UserPreferredDialog == 1 THEN {Check whether
user wants his/her own dialog}
IF TRErrorNo == 0 THEN {If the error number from
the event is 0}
#ThisEvent.OnErrorerrorString = "General
Error"; {Assigning a value to ErrStr
parameter of the event.}
ELSE IF TRErrorNo == 1 THEN
#ThisEvent.OnErrorerrorString = "Not able to
connect to the specified server.";
ELSE IF TRErrorNo == 2 THEN
#ThisEvent.OnErrorerrorString = "Set the
server name first.";
ENDIF;
ENDIF;
ENDIF;
ENDIF;
ENDIF;
#aaHistClientActiveDataGrid.SQLAppend("DECLARE
@StartDate Datetime");
#aaHistClientActiveDataGrid.SQLAppend("DECLARE @EndDate
Datetime");
#aaHistClientActiveDataGrid.SQLAppend("SELECT
@StartDate = DateAdd(mi, -30, GetDate())");
#aaHistClientActiveDataGrid.SQLAppend("SELECT @EndDate
= GetDate()");
#aaHistClientActiveDataGrid.SQLAppend("SELECT TagName,
DateTime, Value");
#aaHistClientActiveDataGrid.SQLAppend("FROM
v_AnalogHistory");
#aaHistClientActiveDataGrid.SQLAppend("WHERE TagName IN
('SysTimeSec')");
#aaHistClientActiveDataGrid.SQLAppend("AND DateTime >=
@StartDate");
#aaHistClientActiveDataGrid.SQLAppend("AND DateTime <=
@EndDate");
#aaHistClientActiveDataGrid.SQLAppend("AND
wwRetrievalMode = 'Cyclic'");
#aaHistClientActiveDataGrid.SQLAppend("AND wwCycleCount
= 100");
#aaHistClientActiveDataGrid.Connected = 1;
#aaHistClientActiveDataGrid.MoveFirst();
FOR Row = 1 TO #aaHistClientActiveDataGrid.RowCount
TagName =
#aaHistClientActiveDataGrid.ColumnValue(0);
DateTime =
#aaHistClientActiveDataGrid.ColumnValue(1);
TagValueText =
#aaHistClientActiveDataGrid.ColumnValue(2);
TagValue = StringToReal( TagValueText );
EndOfFile = #aaHistClientActiveDataGrid.EOF;
IF EndOfFile THEN
EXIT FOR;
ELSE
#aaHistClientActiveDataGrid.MoveNext();
ENDIF;
NEXT;
#aaHistClientActiveDataGrid.SQLString = "";
#aaHistClientActiveDataGrid.SQLAppend("DECLARE
@StartDate Datetime");
#aaHistClientActiveDataGrid.SQLAppend("DECLARE @EndDate
Datetime");
#aaHistClientActiveDataGrid.SQLAppend("SELECT
@StartDate = DateAdd(mi, -30, GetDate())");
#aaHistClientActiveDataGrid.SQLAppend("SELECT @EndDate
= GetDate()");
#aaHistClientActiveDataGrid.SQLAppend("SELECT TagName,
DateTime, Value");
#aaHistClientActiveDataGrid.SQLAppend("FROM
v_AnalogHistory");
#aaHistClientActiveDataGrid.SQLAppend("WHERE TagName IN
('SysTimeSec')");
#aaHistClientActiveDataGrid.SQLAppend("AND DateTime >=
@StartDate");
#aaHistClientActiveDataGrid.SQLAppend("AND DateTime <=
@EndDate");
#aaHistClientActiveDataGrid.SQLAppend("AND
wwRetrievalMode = 'Cyclic'");
#aaHistClientActiveDataGrid.SQLAppend("AND wwCycleCount
= 100");
#aaHistClientActiveDataGrid.Connected = 1;
FOR Row = 1 TO #aaHistClientActiveDataGrid.RowCount - 1
TagName =
#aaHistClientActiveDataGrid.RowColumnValue(Row
, 0);
DateTime =
#aaHistClientActiveDataGrid.RowColumnValue(Row
, 1);
TagValueText =
#aaHistClientActiveDataGrid.RowColumnValue(Row
, 2);
TagValue = StringToReal ( TagValueText );
NEXT;
Error
Number Error Message
Chapter 13
Server Objects
aaServer Object
The aaServer object encapsulates a SQL connection to a
server. It provides properties for configuring the connection
and methods for logging on and off the connection. It also
includes read-only properties for obtaining information about
the server and methods for working with the connection.
This object is referenced with parameters from other
Wonderware Historian Client objects and controls.
aaServer Properties
The aaServer properties are:
• BaseURLAddress
• Build
• Domain
• LoggedOn
• LoginID
• LoginTimeout
• MachineName
• Name
• Password
• PatchLevel
• QueryTimeout
• RetainPassword
• RevisionNumber
• SchemaVersion
• ServerName
• ServerType
• State
• TrustedConnection
• UseHttp
• VirtualDirectoryName
BaseURLAddress
The BaseURLAddress property is a read-write property that
gets or sets the base URL address for the HTTP connection to
the server.
Syntax
aaServer.BaseURLAddress = message;
Result = aaServer.BaseURLAddress;
Remarks
The default BaseURLAddress is http://localhost/.
Build
The Build property is a read-only property that returns the
build number of the Wonderware Historian as a message.
Syntax
Result = aaServer.Build;
Return Value
Returns the build number as a message.
Remarks
An exception is thrown if no one is currently logged on to the
server. Use the LoggedOn property to find out if the server is
logged on.
This property has no default value.
Domain
The Domain property is a read-write property that gets or
sets the domain string for the connection to the server.
Syntax
aaServer.Domain = message;
Result = aaServer.Domain;
Remarks
This property is useful in cases where the Windows
integrated security requires the domain name to be specified.
The default is an empty message value ( "" ).
LoginID
The LoginID property is a read-write property that gets and
sets the login ID for the SQL Server.
Syntax
aaServer.LoginID = message;
Result = aaServer.LoginID;
Remarks
This login ID is used if Windows integrated security is not
used. After a log on has occurred, changing the value of this
property has no effect until a log off and subsequent log on
occurs.
The default LoginID is wwUser.
LoggedOn
The LoggedOn property is a read-only property that returns
True if the server has been logged on.
Syntax
Result = aaServer.LoggedOn;
Return Value
Returns True if the server has been logged on; otherwise,
returns False.
Remarks
The default value is False.
LoginTimeout
The LoginTimeout property is a read-write property that
determines how long to wait, in seconds, for the connection to
the server to be established before generating an error.
Syntax
aaServer.LoginTimeout = integer;
Result = aaServer.LoginTimeout;
Remarks
The default value is 5. A value of 0 means no timeout. If you
do not use a timeout, the application waits indefinitely when
trying to connect to a server, which may cause it to hang if
the server is unavailable.
MachineName
The MachineName property is a read-only property that
returns the actual computer name of the server.
Syntax
Result = aaServer.MachineName;
Return Value
Returns the computer name as a message.
Remarks
An exception is thrown if no one is currently logged on to the
server. Use the LoggedOn property to find out if the server is
logged on.
This property has no default value.
Name
The Name property is a read-only property that returns the
name of the server.
Syntax
Result = aaServer.Name;
Return Value
Returns the name of the server as a message.
Remarks
This property has no default value.
Password
The Password property is a read-write property that gets and
sets the password for the connection to the server.
Syntax
aaServer.Password = message;
Result = aaServer.Password;
Remarks
This property is used if Windows integrated security is not
used. After a logon has occurred, changing the value of this
property has no effect until a logoff and subsequent logon
occurs.
The default Password is wwUser.
PatchLevel
The PatchLevel property is a read-only property that returns
the patch level of the Wonderware Historian.
Syntax
Result = aaServer.PatchLevel;
Return Value
Returns the patch level as a message value.
Remarks
An exception is thrown if no one is currently logged on to the
server. Use the LoggedOn property to find out if the server is
logged on.
This property has no default value.
QueryTimeout
The QueryTimeout property is a read-write property that
specifies the number of seconds to wait for a query to finish
executing before the operation is aborted with a timeout
error.
Syntax
aaServer.QueryTimeout = integer;
Result = aaServer.QueryTimeout;
Remarks
Changing the value of this property after log on has no effect
until log off and subsequent log on.
The default value is 120. A value of 0 means no timeout. If
you do not use a timeout, the application waits indefinitely
when trying to query a server, which may cause it to hang if
the server is unavailable.
RetainPassword
The RetainPassword property is a read-write property that
indicates whether the password is stored in persistent
storage.
Syntax
aaServer.RetainPassword = discrete;
Result = aaServer.RetainPassword;
Remarks
The default value is True.
RevisionNumber
The RevisionNumber property is a read-only property that
gets the revision number of the Wonderware Historian.
Syntax
Result = aaServer.RevisionNumber;
Return Value
Returns the revision number as a message.
Remarks
An exception is thrown if no one is currently logged on to the
server. Use the LoggedOn property to find out if the server is
logged on.
This property has no default value.
SchemaVersion
The SchemaVersion property is a read-only property that
gets the Wonderware Historian Client schema version for the
server.
Syntax
Result = aaServer.SchemaVersion;
Return Value
Returns the schema version as a message.
Remarks
An exception is thrown if no one is currently logged on to the
server. Use the LoggedOn property to find out if the server is
logged on.
This property has no default value.
ServerName
The ServerName property is a read-only property that gets
the name of the server.
Syntax
Result = aaServer.ServerName;
Return Value
Returns the name of the server as a message.
Remarks
You can use the Name property to return the server name.
This property has no default value.
ServerType
The ServerType property is a read-only property that gets
the server type.
Syntax
Result = aaServer.ServerType;
Return Value
Returns the server type as an enumeration. For more
information, see aaServerType Enumeration on page 588.
Remarks
This property always returns a value of 1.
State
The State property is a read-only property that gets the state
of the server.
Syntax
Result = aaServer.State;
Return Value
Returns the server state as an enumeration. For more
information, see aaServerState Enumeration on page 587.
The default value is 2.
TrustedConnection
The TrustedConnection property is a read-write property
that gets or sets the indication of whether Windows
integrated security is used when logging on to the
Wonderware Historian.
Syntax
aaServer.TrustedConnection = discrete;
Result = aaServer.TrustedConnection;
Remarks
True = Windows integrated security is used; False = A SQL
Server login ID and password is used.
Changing the value of this property after logon has no effect
until logoff and subsequent logon.
The default value is False.
UseHttp
The UseHttp property is a read-write property that controls
whether to use HTTP to access the SQL Server.
Syntax
aaServer.UseHttp = discrete;
Result = aaServer.UseHttp;
Remarks
If set to True, HTTP is used. This property also creates the
connection object, if necessary.
The default value is False.
VirtualDirectoryName
The VirtualDirectoryName property is a read-write property
that gets or sets the virtual directory name.
Syntax
aaServer.VirtualDirectoryName = message;
Result = aaServer.VirtualDirectoryName;
Remarks
The default directory name is ActiveFactory.
aaServer Methods
The aaServer methods are:
• LogOff
• LogOn
LogOff
The LogOff method terminates the connection to the server.
Syntax
[Result=] aaServer.LogOff();
Remarks
Repeated calls to this method are harmless and do not result
in further state change events. For more information on state
change events, see OnServerStateChange on page 584.
LogOn
The LogOn method creates a connection (logs on) to the
server.
Syntax
[Result=] aaServer.LogOn(out message statusMessage);
Parameters
statusMessage
Information about the result of the log on attempt.
Return Value
Returns True if the log on was successful; otherwise, returns
False.
Remarks
The server must be configured before calling the LogOn
method. Changes made to the server configuration after a
logon do not take effect until after a logoff and subsequent
logon.
This method produces state change events. For more
information, see OnServerStateChange on page 584.
aaServers Object
The aaServer object is a collection of aaServer instances. This
object provides methods and properties for maintaining a
sorted list of servers. Use the properties to get information
regarding the number of servers in the collection. Use the
methods to perform basic functions for the collection, such as
adding or removing servers. Events for this object indicate
when servers are added to the list, removed from the list,
updated within the list, or when a server's state changes.
This object is referenced with parameters from other
Wonderware Historian Client objects and controls.
aaServers Properties
The aaServers properties are:
• ApplicationName
• Count
• Items
ApplicationName
The ApplicationName property gets or sets the application
name to be used in profile logs when making a request to the
Wonderware Historian.
Syntax
aaServers.ApplicationName = message;
[Result=] aaServers.ApplicationName;
Remarks
The name must be set prior to a server in the list initiating a
log on.
Count
The Count property is a read-only property that gets the
number of servers in the server list.
Syntax
Result = aaServers.Count;
Return Value
Returns the number as an integer.
Remarks
The default value is 0.
Items
The Items property is a read-only property that returns the
list of servers in an array.
Syntax
Result = aaServers.Items;
Return Value
Returns the aaServer object. The same aaServer object
instances that are in the server list are in the array. For more
information on the aaServer object, see aaServer Object on
page 571.
Remarks
This property is not supported in the InTouch HMI software.
This property has no default value.
aaServers Methods
The aaServers methods are:
• Add
• GetServer
• Remove
• Update
Add
The Add method adds a server to the server list.
Syntax
[Result=] aaServers.Add(message name);
Parameters
name
The name of the server to add.
Return Value
If a server with the given name is already in the list, the
aaServer object for that server is returned. Otherwise, a new
server with the given name is added to the list and the
aaServer object for the new server is returned. For more
information on the aaServer object, see aaServer Object on
page 571.
GetServer
The GetServer method gets the aaServer object for a server
from the server list.
Syntax
[Result=] aaServers.GetServer(message name);
name
The name of the server to get.
Return Value
If the server exists, the aaServer object is returned;
otherwise, a NULL is returned. For more information on the
aaServer object, see aaServer Object on page 571.
Remove
The Remove method removes the specified server from the
list.
Syntax
[Result=] aaServers.Remove(aaServer server);
Parameters
server
The name of the server to remove.
Return Value
If this method returns True, the instance was removed from
the list. This method returns False if the exact instance is not
in the list, and the list remains unchanged.
Remarks
The aaServer instance passed as an argument to the
OnServerRemoved event is the same instance that was in the
server list.
Update
The Update method updates the specified server in the server
list.
Syntax
[Result=] aaServers.Update(aaServer server);
Parameters
server
The name of the server to update.
Return Value
Returns True if the given aaServer instance is currently in
the server list; otherwise, False is returned.
Remarks
The Update method serves two purposes:
• It causes the list of servers (which is the list that appears
in the Server Configuration dialog box) to be persisted, if
persistence is in effect. For example, the Wonderware
Historian Client Trend and the Wonderware Historian
Client Query applications run with persistence in effect;
when you start these applications, you see
previously-configured servers in the list. Controls,
however, do not necessarily run with persistence in effect.
When changes are made to properties in an instance of
the aaServer object, they are not persisted until the
Update method is called.
• It causes an OnServerUpdated event to fire. This allows
other parts of the application to respond to changes in
any of the servers in the servers list. When changes are
made to properties in an instance of aaServer, no event is
fired to report the change until the Update method is
called.
The aaServer instance must be the exact same instance, not
an instance with the same name. If the instance is not in the
list, then the list is not updated.
The aaServer instance passed as an argument to the
OnServerUpdated event is the exact same instance that is in
the list.
aaServers Events
The aaServers events are:
• OnServerAdded
• OnServerUpdated
• OnServerRemoved
• OnServerStateChange
OnServerAdded
The OnServerAdded event is triggered when a new server is
added to the server list.
Syntax
aaServers.OnServerAdded(object source,
aaServerListChangeArgs args);
Parameters
source
This parameter is not used.
args
The server state change arguments. For more information
on the aaServerListChangeArgs object, see
aaServerListChangeArgs Object on page 585.
Remarks
This event is not accessible from the InTouch HMI software.
OnServerUpdated
The OnServerUpdated event is triggered when a server that
is currently in the server list is updated.
Syntax
aaServers.OnServerUpdated(object source,
aaServerListChangeArgs args);
Parameters
source
The object. For more information on specifying an object,
see Object on page 674.
args
The server state change arguments. For more information
on the aaServerListChangeArgs object, see
aaServerListChangeArgs Object on page 585.
Remarks
This event is not accessible from the InTouch HMI software.
OnServerRemoved
The OnServerRemoved event is triggered when a server is
removed from the server list.
Syntax
aaServers.OnServerRemoved(object source,
aaServerListChangeArgs args);
Parameters
source
The object. For more information on specifying an object,
see Object on page 674.
args
The server state change arguments. For more information
on the aaServerListChangeArgs object, see
aaServerListChangeArgs Object on page 585.
Remarks
This event is not accessible from the InTouch HMI software.
OnServerStateChange
The OnServerStateChange event is triggered when the state
of a server is changed.
Syntax
aaServers.OnServerStateChange(object source,
aaServerStateChangeArgs args);
Parameters
source
The object. For more information on specifying an object,
see Object on page 674.
args
The server state change arguments. For more information
on the aaServerStateChangeArgs object, see
aaServerStateChangeArgs Object on page 586.
Remarks
This event is not accessible from the InTouch HMI software.
aaServerListChangeArgs Object
The aaServerListChangeArgs object is used to return name
of the aaServer instance that changed.
Properties
The aaServerListChangeArgs object property is:
• Server
Server
The Server property is a read-only property that gets the
aaServer instance that was either added, updated, or
removed during the operation that produced the event.
Syntax
Result = aaServerListChangeArgs.Server;
Return Value
The aaServer instance. For more information on the
aaServer object, see aaServer Object on page 571.
Remarks
This property has no default value.
aaServerStateChangeArgs Object
The aaServerListChangeArgs object is used to return state
changes for the server.
Properties
The aaServerStateChangeArgs object properties are:
• Server
• State
• When
• Message
Server
The Server property is a read-only property that gets the
server that changed state.
Syntax
Result = aaServerStateChangeArgs.Server;
Return Value
The aaServer instance. For more information on the aaServer
object, see aaServer Object on page 571.
Remarks
This property has no default value.
State
The State property is a read-only property that gets the state
to which the server changed.
Syntax
Result = aaServerStateChangeArgs.State;
Return Value
The aaServerState enumeration. For more information on
the aaServerState enumeration, see aaServerState
Enumeration on page 587.
Remarks
This property has no default value.
When
The When property is a read-only property that gets the date
and time of the state change.
Syntax
Result = aaServerStateChangeArgs.When;
Return Value
The date/time stamp. For more information on the DateTime
data type, see DateTime on page 673.
Remarks
This property has no default value.
Message
The Message property is a read-only property that gets any
message available for the state change, such as a detailed
error message.
Syntax
Result = aaServerStateChangeArgs.Message;
Return Value
Returns the message as a message value.
Remarks
This property has no default value.
aaServerState Enumeration
Specifies the allowed states of a server.
aaServerType Enumeration
Specifies the types of a server.
Chapter 14
aaHistClientSingleValueEntry
Control
2 In the Tagname list, type the name of the tag for which
you want to insert a value. To browse for a tag, click the
ellipsis button. The Tag Picker appears, in which you can
browse for a tag. For more information on using the Tag
Picker, see Tag Picker on page 39.
3 In the Date and time box, enter the timestamp used for
the inserted value. To use the current time, select the
check box to the right of the Date and time box.
4 In the Value box, enter the data value to insert for the tag.
5 Click the arrow button.
The status of the insertion appears in the status bar.
• ContextMenuEnabled
• CurrentServerName
• DateTime
• DateTimeFieldDisable
• DateTimeFieldVisible
• DateTimeString
• DisableTagEntry
• DisplayErrorMessages
• FieldLabelPosition
• FieldLayoutHorizontal
• HideDateTimeModeTabs
• HideFieldLabels
• HideStatusBar
• InsertButtonDisable
• InsertButtonVisible
• InTouchDateTime
• LastErrorDetails
• LastErrorMessage
• LastOperationResult
• LastOperationSuccessful
• Pwd
• Quality
• QualityDetail
• QualityDetailFieldDisable
• QualityDetailFieldVisible
• QualityFieldDisable
• QualityFieldVisible
• RememberEnteredTags
• Servers
• StringValue
• TagName
• TagNameFieldDisable
• TagNameFieldVisible
• TagPickerButtonDisable
• TagPickerButtonVisible
• Tags
• TagType
• TagValid
• Transparent
• User
• UseTimezone
• Value
• ValueEx
• ValueFieldDisable
AnalogValue
The AnalogValue property is a read-write property that gets
or sets the analog value to be inserted.
Syntax
aaHistClientSingleValueEntry.AnalogValue = real;
Result = aaHistClientSingleValueEntry.AnalogValue;
Remarks
The default value is 0.
CurrentServerName
The CurrentServerName property is a read-write property
that gets or sets the name of the Wonderware Historian.
Syntax
aaHistClientSingleValueEntry.CurrentServerName =
message;
Result =
aaHistClientSingleValueEntry.CurrentServerName;
Remarks
If the server has already been added, the User property is
automatically set to the current username.
This property has no default value.
DateTime
The DateTime property is a read-write property that gets or
sets the timestamp to be used for the value insert.
Syntax
aaHistClientSingleValueEntry.DateTime = DateTime;
Result = aaHistClientSingleValueEntry.DateTime;
Remarks
To use the current time, set this property to 0.
Setting this property also updates the DateTimeString and
InTouchDateTime properties, and vice-versa.
For more information on the DateTime data type, see
DateTime on page 673.
Remarks
The default value is 12:00:00 AM.
DateTimeFieldDisable
The DateTimeFieldDisable property is a read-write property
that gets or sets whether the Date and time box is available in
the control at runtime.
Syntax
aaHistClientSingleValueEntry.DateTimeFieldDisable =
discrete;
Result =
aaHistClientSingleValueEntry.DateTimeFieldDisable;
Remarks
The default value is False.
DateTimeFieldVisible
The DateTimeFieldVisible property is a read-write property
that gets or sets whether the Date and time box is visible in
the control at runtime.
Syntax
aaHistClientSingleValueEntry.DateTimeFieldVisible =
discrete;
Result =
aaHistClientSingleValueEntry.DateTimeFieldVisible;
Remarks
The default value is True.
DateTimeString
The DateTimeString property is a read-write property that
gets and sets the timestamp as a string value to be used for
the insert.
Syntax
aaHistClientSingleValueEntry.DateTimeString = message;
Result = aaHistClientSingleValueEntry.DateTimeString;
Remarks
The DateTimeString property reflects the value of the
DateTime property, but it is expressed as a string that uses
local regional settings. The DateTime property is expressed
in the Date format.
If the DateTime property is set to 0, the current date and
time are returned. If this property is set to an empty string (
" " ), the current date and time are used for the insert.
Setting this property also updates the DateTime and
InTouchDateTime properties, and vice-versa.
Remarks
The default is an empty message value (which indicates to
use the current time).
DisableTagEntry
The DisableTagEntry property is a read-write property that
gets or sets whether the Tag Name box can be edited at
runtime.
Syntax
aaHistClientSingleValueEntry.DisableTagEntry =
discrete;
Result = aaHistClientSingleValueEntry.DisableTagEntry;
Remarks
If set to True, the runtime user cannot use the Tag Name box
to type in a tagname. The user needs to use the Tag Picker to
select a tag or select a tag from a list of recently used tags.
(provided that either functionality is enabled).
The default value is False.
DisplayErrorMessages
The DisplayErrorMessage property is a read-write property
that enables or disables the display of error message dialog
boxes.
Syntax
aaHistClientSingleValueEntry.DisplayErrorMessages =
discrete;
Result =
aaHistClientSingleValueEntry.DisplayErrorMessages;
Remarks
If set to True, all error message dialog boxes appear. If set to
False, no error messages appear, except for server logon
failure messages.
The default value is True.
FieldLabelPosition
The FieldLabelPosition property is a read-write property that
gets or sets whether the field labels appear when the control
is in the vertical layout mode.
Syntax
aaHistClientSingleValueEntry.FieldLabelPosition =
aaFieldLabelPositionEnumeration;
Result =
aaHistClientSingleValueEntry.FieldLabelPosition;
Remarks
For more information on the
aaFieldLabelPositionEnumeration enumeration, see
aaFieldLabelPositionEnumeration Enumeration on page
617.
If the FieldLayoutHorizontal property is set to True, the
FieldLabelPosition property has no effect.
The default value is 0.
FieldLayoutHorizontal
The FieldLayoutHorizontal property is a read-write property
that gets or sets whether or not the text boxes (fields) for the
control appear next to each other from left to right
(horizontally) instead of stacked on top of each other
(vertically).
Syntax
aaHistClientSingleValueEntry.FieldLayoutHorizontal =
discrete;
Result =
aaHistClientSingleValueEntry.FieldLayoutHorizontal;
Remarks
The default value is True.
HideDateTimeModeTabs
This read-write property controls whether the check box next
to the Date and time box is visible at runtime. If visible, the
check box allows the user to toggle between using automatic
timestamps and manually specifying a timestamp.
Syntax
aaHistClientSingleValueEntry.HideDateTimeModeTabs =
discrete;
Result =
aaHistClientSingleValueEntry.HideDateTimeModeTabs;
Remarks
If set to False, the check box is visible.
The default value is False.
If the DateTimeFieldVisible property is set to False, the
HideDateTimeModeTags property is overridden.
HideFieldLabels
The HideFieldLabels property is a read-write property that
gets or sets whether the labels for the text boxes (fields) are
visible to the runtime user.
Syntax
aaHistClientSingleValueEntry.HideFieldLabels =
discrete;
Result = aaHistClientSingleValueEntry.HideFieldLabels;
Remarks
If set to True, the field labels are hidden.
The default value is False.
HideStatusBar
The HideStatusBar property is a read-write property that
gets or sets whether the status bar is visible to the runtime
user.
Syntax
aaHistClientSingleValueEntry.HideStatusBar = discrete;
Result = aaHistClientSingleValueEntry.HideStatusBar;
Remarks
If set to True, the status bar is hidden.
The default value is False.
The status bar appears at the bottom of the control.
InsertButtonDisable
The InsertButtonDisable property is a read-write property
that gets or sets whether the Insert button is available in the
control at runtime.
Syntax
aaHistClientSingleValueEntry.InsertButtonDisable =
discrete;
Result =
aaHistClientSingleValueEntry.InsertButtonDisable;
Remarks
If set to True, the button is not available.
The default value is False.
InsertButtonVisible
The InsertButtonVisible property is a read-write property
that gets or sets whether the Insert button is visible in the
control at runtime.
Syntax
aaHistClientSingleValueEntry.InsertButtonVisible =
discrete;
Result =
aaHistClientSingleValueEntry.InsertButtonVisible;
Remarks
The default value is True.
InTouchDateTime
The InTouchDateTime property is a read-write property that
gets or sets the timestamp for the data insert using the
InTouch HMI software Date format.
Syntax
aaHistClientSingleValueEntry.InTouchDateTime = real;
Result = aaHistClientSingleValueEntry.InTouchDateTime;
Remarks
The InTouchDateTime property reflects the value of the
DateTime property, but it is expressed in the InTouch HMI
software $DateTime format. The DateTime property is
expressed in the Date format. For more information on the
$DateTime format, see the InTouch HMI software
documentation.
If this property is set -1, the current date and time are used
for the insert.
If the DateTime property is set to 0, the current date and
time are returned for the InTouchDateTime property.
Setting this property also updates the DateTime and
DateTimeString properties, and vice-versa.
The DateTime property supports dates starting from
12/30/1899. The InTouch HMI software supports dates
starting from 1/1/1970. Therefore, if the DateTime property
is set to a date prior to 1/1/1970, the InTouchDateTime
property are set to -1. To support dates prior to 1/1/1970, use
the DateTimeString property.
The default value is -1.
Example
The following example sets the timestamp for the insert to
the current time (reflected by the $DateTime system tag in
the InTouch HMI software).
aaHistClientSingleValueEntry1.InTouchDateTime =
$DateTime;
LastErrorDetails
The LastErrorDetails property is a read-only property that
gets the error code for the error message from SQL Server.
Syntax
Result = aaHistClientSingleValueEntry.LastErrorDetails;
Remarks
If a SQL error occurred during the last insert, the error is
returned to this property. This property contains the long
version of the error.
No details are available if the LastOperationResult property
contains a value between 0 and -6.
To clear the contents of this property, use the Reset method.
This property has no default value.
LastErrorMessage
The LastErrorMessage property is a read-only property that
gets the status of the last data insert.
Syntax
Result = aaHistClientSingleValueEntry.LastErrorMessage;
Remarks
The status returned is the short version. Use the
LastErrorDetails property to return the details.
To clear the contents of this property, use the Reset method.
This property has no default value.
LastOperationResult
The LastOperationResult property is a read-only property
that gets the error code for the last insert.
Syntax
Result =
aaHistClientSingleValueEntry.LastOperationResult;
Return Values
Returns one of the following values:
0 = The value was successfully inserted.
-1 = The insert failed.
-2 = The specified server is not in the collection of servers. Be
sure that you call the AddServer method first.
-3 = No server name provided. The CurrentServerName
property is blank or the serverName parameter was not
provided for the InsertValue method.
-4 = No tagname provided.
LastOperationSuccessful
The LastOperationSuccessful property is a read-only
property that gets the status of the last data value insert.
Syntax
Result =
aaHistClientSingleValueEntry.LastOperationSuccessful
;
Remarks
If set to True, the last insert was successful.
To reset this property, use the Reset method.
The default value is False.
Pwd
Use this write-only property to specify the password that
should be used to log on the current user to the current
server.
Syntax
aaHistClientSingleValueEntry.Pwd = message;
Remarks
This property has no default value.
Quality
The Quality property is a read-write property that gets or
sets the data quality to be used for the inserted value.
Syntax
aaHistClientSingleValueEntry.Quality = integer;
Result = aaHistClientSingleValueEntry.Quality;
Remarks
This property is only considered if you set it to a value of 1
(Bad). In this case, a NULL value is stored on the historian
with a QualityDetail value of 24. In all other cases, the
quality of the inserted value is determined by the
QualityDetail property.
Valid values are:
-1 = None.
0 = Good
1 = Bad
16 = Doubtful
The default value is -1.
QualityDetail
The QualityDetail property is a read-write property that gets
or sets the data quality detail to be used for the inserted
value.
Syntax
aaHistClientSingleValueEntry.DataQuality = integer;
Result = aaHistClientSingleValueEntry.DataQuality;
Remarks
The value must be present in the QualityMap table of the
Wonderware Historian. If the value does not exist, any
attempt to set the quality detail for the inserted value is
ignored, and this property is reset to the default.
The default value is -1. In this case, the value is inserted with
a QualityDetail value of 192 (Good quality).
Before you can set this property, you must have a valid server
connection.
QualityDetailFieldDisable
The QualityDetailFieldDisable property is a read-write
property that gets or sets whether the Quality Detail box is
available in the control at runtime.
Syntax
aaHistClientSingleValueEntry.QualityDetailFieldDisable
= discrete;
Result =
aaHistClientSingleValueEntry.QualityDetailFieldDisab
le;
Remarks
The default value is False.
QualityDetailFieldVisible
The QualityDetailFieldVisible property is a read-write
property that gets or sets whether the Quality Detail box is
visible in the control at runtime.
Syntax
aaHistClientSingleValueEntry.QualityDetailFieldVisible
= discrete;
Result =
aaHistClientSingleValueEntry.QualityDetailFieldVisib
le;
Remarks
The default value is False.
QualityFieldDisable
The QualityFieldDisable property is a read-write property
that gets or sets whether the Quality box is available in the
control at runtime.
Syntax
aaHistClientSingleValueEntry.QualityFieldDisable =
discrete;
Result =
aaHistClientSingleValueEntry.QualityFieldDisable;
Remarks
The default value is False.
QualityFieldVisible
The QualityFieldVisible property is a read-write property
that gets or sets whether the Quality box is visible in the
control at runtime.
Syntax
aaHistClientSingleValueEntry.QualityFieldVisible =
discrete;
Result =
aaHistClientSingleValueEntry.QualityFieldVisible;
Remarks
The default value is False.
Any value the user specifies in the Quality box is ignored. The
quality of the inserted value is determined by the value
specified in the Quality Detail box.
RememberEnteredTags
The RememberEnteredTags property is a read-write property
that gets or sets whether the control keeps track of previously
entered tags and makes them available in the Tag Name box
at runtime.
Syntax
aaHistClientSingleValueEntry.RememberEnteredTags =
discrete;
Result =
aaHistClientSingleValueEntry.RememberEnteredTags;
Remarks
The default value is True.
Servers
The Servers property is a read-write property that sets or
gets the list of servers used by the control.
Syntax
aaHistClientSingleValueEntry.Servers = aaServers;
Result = aaHistClientSingleValueEntry.Servers;
Remarks
This property references the aaServers object. For more
information, see aaServer Object on page 571.
This property has no default value.
StringValue
The StringValue property is a read-write property that sets
or gets the value to be inserted for a tag.
Syntax
aaHistClientSingleValueEntry.StringValue = message;
Result = aaHistClientSingleValueEntry.StringValue;
Remarks
This property is provided for use within the InTouch HMI
software, as the InTouch HMI software does not handle
variant data types. The Value property is a variant datatype.
Setting this property automatically updates the Value and
AnalogValue properties.
This property has no default value.
TagName
The TagName property is a read-write property that gets or
sets the name of the current tag assigned to the control.
Syntax
aaHistClientSingleValueEntry.TagName = message;
Result = aaHistClientSingleValueEntry.TagName;
Remarks
Use this property to change an existing tag or to add a new
tag.
This property has no default value.
TagNameFieldDisable
The TagNameFieldDisable property is a read-write property
that gets or sets whether the Tag Name box is available in the
control at runtime.
Syntax
aaHistClientSingleValueEntry.TagNameFieldDisable =
discrete;
Result =
aaHistClientSingleValueEntry.TagNameFieldDisable;
Remarks
The default value is False.
TagNameFieldVisible
The TagNameFieldVisible property is a read-write property
that gets or sets whether the Tag Name box is visible in the
control at runtime.
Syntax
aaHistClientSingleValueEntry.TagNameFieldVisible =
discrete;
Result =
aaHistClientSingleValueEntry.TagNameFieldVisible;
Remarks
If you set this property to False, the Tag Picker button is also
hidden at runtime.
The default value is True.
TagPickerButtonDisable
The TagPickerButtonDisable property is a read-write
property that gets or sets whether the Tag Picker button to
the right of the Tag Name box is available in the control at
runtime.
Syntax
aaHistClientSingleValueEntry.TagPickerButtonDisable =
discrete;
Result =
aaHistClientSingleValueEntry.TagPickerButtonDisable;
Remarks
The default value is False.
TagPickerButtonVisible
The TagPickerButtonVisible property is a read-write
property that gets or sets whether the Tag Picker button to
the right of the Tag Name box is visible in the control at
runtime.
Syntax
aaHistClientSingleValueEntry.TagPickerButtonVisible =
discrete;
Result =
aaHistClientSingleValueEntry.TagPickerButtonVisible;
Remarks
The default value is True.
Tags
The Tags property is an array of aaTag objects that
corresponds to the tags listed in the control’s Tagname list.
Syntax
aaHistClientSingleValueEntry.Tags(n) = aaTag;
Result = aaHistClientSingleValueEntry.Tags(n);
Remarks
For more information on the aaTag object, see Chapter 15,
aaTag Object.
This property is not accessible in the InTouch HMI software.
This property has no default value.
TagType
The TagType property is a read-only property that returns
the tag type for the current tag.
Syntax
Result = aaHistClientSingleValueEntry.TagType;
Remarks
Valid values are:
-1 The tag type can’t be determined. This can occur if
the tag is invalid or if there was a failure to connect
to the server.
1 Analog
2 Discrete
3 String
4 Complex (not supported)
5 Event
TagValid
The TagValid property is a read-only property that gets
whether the current tag is valid.
Syntax
Result = aaHistClientSingleValueEntry.TagValid;
Remarks
This value is set to False if the tag is invalid. The tag is
invalid if there was a failure to connect to the server.
The default value is False.
User
The User property is a read-write property that gets or sets
the current user for a Wonderware Historian.
Syntax
aaHistClientSingleValueEntry.User = message;
Result = aaHistClientSingleValueEntry.User;
Remarks
UseTimezone
The UseTimezone property is a read-write property that is
used for the timestamp of the inserted data value.
Syntax
aaHistClientSingleValueEntry.UseTimezone =
aaUseTimeZoneEnumeration;
Result = aaHistClientSingleValueEntry.UseTimezone;
Remarks
For more information on the aaUseTimeZoneEnumeration
enumeration, see aaUseTimeZoneEnumeration Enumeration
on page 617.
The default value is 0.
Value
This read-write property gets or sets the data value to be
inserted for a tag.
Syntax
aaHistClientSingleValueEntry.Value = object;
Result = aaHistClientSingleValueEntry.Value;
Remarks
This property has no default value. It is not available in the
.NET version of the control.
ValueEx
This read-write property gets or sets the data value to be
inserted for a tag.
Syntax
aaHistClientSingleValueEntry.ValueEx = object;
Result = aaHistClientSingleValueEntry.ValueEx;
Remarks
This property has no default value. It is not writeable from
the InTouch HMI software.
ValueFieldDisable
The ValueFieldDisable property is a read-write property that
gets or sets whether the Value box is available in the control
at runtime.
Syntax
aaHistClientSingleValueEntry.ValueFieldDisable =
discrete;
Result =
aaHistClientSingleValueEntry.ValueFieldDisable;
Remarks
The default value is False.
• AddServerEx
• AddTag
• Connect
• CreateManualTag
• Disconnect
• Insert
• InsertValue
• Refresh
• Reset
AddServer
The AddServer method adds a server to the list.
Syntax
[Result=]
aaHistClientSingleValueEntry.AddServer(message
serverName, message loginName, message password,
[discrete bPersistPassword]);
Parameters
serverName
The name of the server to connect.
loginName
A valid user name for the server.
password
A valid password for the server.
bPersistPassword
Optional parameter. If set to True, the password is
remembered for the subsequent connection attempts. The
password is only remembered for single application; the
persisted password is not available to all applications. The
default value is True.
Return Value
Returns True if the server can be added to the list; otherwise
returns False.
Remarks
AddServerEx
The AddServer method adds a server to the list.
Syntax
[Result=]
aaHistClientSingleValueEntry.AddServerEx(message
serverName, message loginName, message password,
[discrete bPersistPassword]);
Parameters
serverName
The name of the server to which to connect.
loginName
A valid user name for the server.
password
A valid password for the server.
bPersistPassword
If set to True, the password is remembered for the
subsequent connection attempt. The password is only
remembered for single application; the persisted password
is not available to all applications.
Return Value
Returns True if the server can be added to the list; otherwise
returns False.
Remarks
AddTag
The AddTag method adds a tag for the control.
Syntax
[Result=] aaHistClientSingleValueEntry.AddTag(message
tagName);
Parameters
tagName
The name of the tag to add.
Return Value
Returns True if the tag can be added; otherwise returns
False.
Remarks
Calling this method and assigning a value to the TagName
property have the same effect.
Connect
The Connect method establishes a connection to the current
server.
Syntax
[Result=] aaHistClientSingleValueEntry.Connect();
Return Value
Returns True if the connection can be made; otherwise
returns False.
Remarks
This method is not required, since adding tags automatically
causes a connection to the server. If the server is already
logged on to, then this method prompts a reconnect.
CreateManualTag
The CreateManualTag method creates a tag with a manual
data acquisition type. The tag is created in the historian
database.
Syntax
[Result=]
aaHistClientSingleValueEntry.CreateManualTag(message
tagName, integer tagType);
Parameters
tagName
The name of the tag to create.
tagType
The type of tag. 1 = Analog; 2 = Discrete; 3 = String
Return Value
For a description of return values, see the
LastOperationResult property.
Remarks
If the manual tag can be added, it is set to the current tag.
Disconnect
The Disconnect method disconnects the control from the
current server.
Syntax
[Result=] aaHistClientSingleValueEntry.Disconnect();
Return Value
Returns True if the disconnect was successful; otherwise
returns False.
Insert
The Insert method inserts a value for a manual tag.
Syntax
[Result=] aaHistClientSingleValueEntry.Insert();
Return Value
Returns True if the value was inserted; otherwise returns
False.
Remarks
This method has the same effect as a runtime user clicking
the Insert button on the control interface.
If this method returns False, use the LastOperationResult,
LastErrorMessage, and LastErrorDetails properties to
determine the cause of the failure.
InsertValue
The InsertValue method inserts a value for a manual tag.
Syntax
[Result=]
aaHistClientSingleValueEntry.InsertValue(message
tagName, object tagValue, [object dTime], [integer
quality], [integer qualityDetail]);
Parameters
tagName
The tag for which the value is inserted.
tagValue
The value to insert.
dTime
The timestamp for the data value. If this parameter is not
specified, the current date and time is used. You can use a
message value for this parameter in an acceptable
date/time format.
quality
The quality value to use.
qualityDetail
The quality detail to use.
Return Value
For a description of return values, see the
LastOperationResult property.
Remarks
This method attempts to insert the specified value for the
specified tag on the current server, regardless of the user
interface settings. Likewise, the current settings for the user
interface have no effect on the calling of this method.
If this method returns False, use the LastErrorMessage and
LastErrorDetails properties to determine the cause of the
failure.
Refresh
The Refresh method forces a repaint of the control.
Syntax
[Result=] aaHistClientSingleValueEntry.Refresh();
Reset
The Reset method clears the error information and values for
the control.
Syntax
[Result=] aaHistClientSingleValueEntry.Reset();
Remarks
Calling this method clears all of the text boxes in the user
interface for the control. Also, any errors or success
indicators from a previous operation are cleared.
• InsertComplete
• InsertFail
• TagNameChanged
• ValueChanged
Change
The Change event is triggered when the significant
properties for the control are changed.
Syntax
aaHistClientSingleValueEntry.Change();
Remarks
This event is triggered if any of the following properties
change:
• Tags
• Servers
• CurrentServerName
• User
• Pwd
• TagName
• Quality
• QualityDetail
• LastOperationResult, LastOperationSuccessful,
LastErrorMessage, LastErrorDetails
InsertComplete
The InsertComplete event is triggered when a data value
insert operation succeeds.
Syntax
aaHistClientSingleValueEntry.InsertComplete();
Remarks
This event is not triggered by the InsertValue method.
InsertFail
The InsertFail event is triggered when a data value insert
operation fails.
Syntax
aaHistClientSingleValueEntry.InsertFail();
Remarks
This event is not triggered by the InsertValue method.
TagNameChanged
The TagNameChanged event is triggered when the TagName
property changes.
Syntax
aaHistClientSingleValueEntry.TagNameChanged();
Remarks
This event is triggered in addition to the Change event.
ValueChanged
The ValueChanged event is triggered when the Value,
StringValue, or AnalogValue property changes.
Syntax
aaHistClientSingleValueEntry.ValueChanged();
Remarks
This event is triggered in addition to the Change event.
aaFieldLabelPositionEnumeration Enumeration
Specifies where the label appears for text boxes in the
control.
aaUseTimeZoneEnumeration Enumeration
Specifies the time zone..
Chapter 15
aaTag Object
aaTag Properties
The aaTag properties are:
• DateCreated
• Description
• IOAddress
• MaxRaw
• MinRaw
• MinEU
• MaxEU
• Message0
• Message1
• Mode
• Name
• RawType
• Server
• Type
• TypeAsTagType
• Units
DateCreated
This read-only property returns the date that the tag was
created.
Syntax
Result = aaTag.DateCreated;
Return Value
The return value is of type DateTime.
Remarks
The default value is the current time.
Description
This read-only property returns the description of the tag.
Syntax
Result = aaTag.Description;
Return Value
The return value is a message value.
Remarks
The default value is NULL.
IOAddress
This read-only property returns the I/O address of the tag.
Syntax
Result = aaTag.IOAddress;
Return Value
The return value is a message.
Remarks
The default value is NULL.
MaxRaw
This read-only property returns the maximum value of the
raw acquired value.
Syntax
Result = aaTag.MaxRaw;
Return Value
The return value is a real.
Remarks
The default value is 0.
MinRaw
This read-only property returns the minimum value of the
raw acquired value.
Syntax
Result = aaTag.MinRaw;
Return Value
The return value is a real.
Remarks
The default value is 0.
MinEU
This read-only property returns the minimum value of the
tag, measured in engineering units.
Syntax
Result = aaTag.MinEU;
Return Value
The return value is a real.
Remarks
The default value is 0.
MaxEU
This read-only property returns the maximum value of the
tag, measured in engineering units.
Syntax
Result = aaTag.MaxEU;
Return Value
The return value is a real.
Remarks
The default value is 0.
Message0
This read-only property returns the message associated with
the FALSE state of the discrete tag. A discrete tag set to 0 is
in the FALSE state.
Syntax
Result = aaTag.Message0;
Return Value
The return value is a message.
Remarks
The default value is NULL.
Message1
This read-only property returns the message associated with
the TRUE state of the discrete tag. A discrete tag set to 1 is in
the TRUE state.
Syntax
Result = aaTag.Message1;
Return Value
The return value is a message.
Remarks
The default value is NULL.
Mode
This read-only property returns the storage mode of this tag
as a localized string.
Syntax
Result = aaTag.Mode;
Return Value
The return value is a message.
Remarks
The default value is 0.
Name
This read-only property returns the name of the tag.
Syntax
Result = aaTag.Name;
Return Value
The return value is a message.
Remarks
The default value is the name that was specified when the
tag was created.
RawType
This read-only property returns the numeric type for the raw
value. 1 = Euro Float (4 bytes); 2 = MS Float (4 bytes); 3 =
Integer (2 or 4 bytes); 4 = MS Double (reserved for future use)
(8 bytes).
Syntax
Result = aaTag.RawType;
Return Value
The return value is an integer.
Remarks
The default value is 0.
Server
This read-only property returns the server associated with
the tag.
Syntax
Result = aaTag.Server;
Return Value
The return value is an aaServer object. For more
information, see aaServer Object on page 571. The server
cannot be changed after construction.
Remarks
The default value is the name that was specified when the
tag was created.
Type
This read-only property returns the type of the tag, converted
to a localized string.
Syntax
Result = aaTag.Type;
Return Value
The return value is a message.
Remarks
The default value is UnknownTag.
TypeAsTagType
This read-only property returns the type of the tag.
Syntax
Result = aaTag.TypeAsTagType;
Return Value
The return value is of type aaTagType. For more information
on the aaTagType enumeration, see aaTagType Enumeration
on page 670.
The default value is 0.
Units
This read-only property returns the unit of measure. For
example mph, grams, and pounds.
Syntax
Result = aaTag.Units;
Return Value
The return value is a message.
Remarks
The default value is NULL.
Chapter 16
aaHistClientWorkbookRunner and
aaHistClientReportRunner
Objects
aaHistClientWorkbookRunner Object
The aaHistClientWorkbookRunner object is a control that is
used to run reports created with the Wonderware Historian
Client Workbook. There is no user interface for this control.
You can use the aaHistClientWorkbookRunner control's
properties and methods in runtime scripts in your
application to run existing Workbook files (.xls) and output
the results (.htm).
• ErrNumber
• OutputFile
• SourceFile
• ExcelVisible
ErrDescription
The ErrDescription property is a read-only property that
returns an error message if the Run method fails.
Syntax
Result = aaHistClientWorkbookRunner.ErrDescription;
Return Value
The return value is a message. The error message describes
the reason for the failure.
Remarks
The default is an empty message value ( "" ).
ErrNumber
The ErrNumber property is a read-only property that returns
an error code number if the Run method fails.
Syntax
Result = aaHistClientWorkbookRunner.ErrNumber;
Return Value
The return value is an integer.
Remarks
The default value is 0.
OutputFile
The OutputFile property is a read-write property that is used
to specify the file to be created as a result of running the
report.
Syntax
aaHistClientWorkbookRunner.OutputFile = message;
Result = aaHistClientWorkbookRunner.OutputFile;
Remarks
You must specify the entire path and include the .htm
extension.
The default is an empty message value ( "" ).
SourceFile
The SourceFile property is a read-write property that
specifies the name of the Excel file (.xls) to use to generate
the report.
Syntax
aaHistClientWorkbookRunner.SourceFile = message;
Result = aaHistClientWorkbookRunner.SourceFile;
Remarks
You must specify the entire path and include the .xls
extension.
The default is an empty message value ( "" ).
ExcelVisible
The ExcelVisible property is a read-write property that
specifies whether or not the Excel application user interface
is visible when the report is run.
Syntax
aaHistClientWorkbookRunner.ExcelVisible = discrete;
Result = aaHistClientWorkbookRunner.ExcelVisible;
Remarks
If set to True, Excel is visible. If set to False, Excel is not
visible. The default value is False.
Setting this property to True is useful when you are testing
the report generation.
The default value is False.
aaHistClientWorkbookRunner Methods
The aaHistClientWorkbookRunner control methods include:
• Run
• RunReport
• RunReport2
Run
The Run method processes the Workbook report.
Syntax
[Result=] aaHistClientWorkbookRunner.Run();
Return Value
Returns True if the report generation was successful;
otherwise returns False.
Remarks
When this method is called, the following occurs:
1 Excel starts. Excel is visible only if the ExcelVisible
property was set to True.
2 The Workbook file (.xls) specified by the SourceFile
property opens.
3 The report runs.
4 Excel closes.
If you want to use binding options for the report, use the
RunReport method.
RunReport
The RunReport method processes the Workbook report. This
method uses the date/time binding feature of Workbook.
Syntax
[Result=] aaHistClientWorkbookRunner.RunReport(
message inputFile,
message outputFile,
message outputPrefix,
integer outputFormat,
message tagString,
integer NSFolderKey,
message nameSpace,
integer dateMode,
message startDate,
message endDate,
integer duration);
Parameters
inputFile
The name of the source file for the report generation,
including the full path. Valid file types are .htm, .xls, and
.xlt.
outputFile
The name of the output file that is generated, including the
full path. If this parameter is set to an empty string ( " "),
then a file name is generated automatically according to the
following formula:
OutputFile = OutputPrefix + InputFile + year +
month + day + _ + hour + minute + second
outputPrefix
The value that is prepended to the output file name. If you
specify an empty string ( " " ), no prefix is prepended. The
outputPrefix parameter is only used if the outputFile
parameter is an empty string.
outputFormat
The file type for the output file. Valid values are:
0 = Native. That is, if the source file is an .htm file, the
output file is an .htm file. If the source file is an .xls or .xlt
file, the output file is an .xls file.
1 = .htm
2 = .xls
3 = .xlt
tagString
A comma separated list of strings to be used for the
AFTagBinding named range. Valid formats are:
"<tagname1>,<tagname2>"
"'<tagname1>','<tagname2>'"
For example:
"ReactLevel,ReactTemp"
"'ReactLevel','ReactTemp'"
NSFolderKey
Reserved for future use. This parameter cannot be blank.
Specify a value (for example, 0) for this parameter, even
though it has no effect.
nameSpace
Reserved for future use. This parameter cannot be blank.
Specify an empty string ( "" ) for this parameter, even
though it has no effect.
dateMode
Determines the values used for the AFStartBinding and
AFEndBinding named ranges. Valid values are:
0 = Use specific start and end times.
1 = Use a duration relative to the current time.
2 = Use a duration relative to the specified start time.
3 = Use a duration relative to the specified end time.
Use the startDate, endDate, and Duration parameters to
specify the dates.
startDate
A date string that can be converted to a date by the Visual
Basic CDate() function. A good format to use is one that
reflects the standard short date and short time format on
the local system.
If the dateMode parameter is set to 1 or 3, this parameter is
ignored.
If the dateMode parameter is set to 0, this value indicates
the specific date/time to be used for the AFStartBinding
range.
If the dateMode parameter is set to 2, then "rel" is used for
the AFStartBinding range and '+Duration(StartDate)' is
used for the AFEndBinding range.
endDate
A date string that can be converted to a date by the Visual
Basic CDate() function. A good format to use is one that
reflects the standard short date and short time format on
the local system.
If the dateMode parameter is set to 1 or 2, this parameter is
ignored.
If the dateMode parameter is set to 0, this value indicates
the specific date/time to be used for the AFEndBinding
range.
If the dateMode parameter is set to 3, then "rel" is used for
the AFStartBinding range and '+Duration(EndDate)' is
used for the AFEndBinding range.
Duration
The time span, in seconds, used for date/time calculations.
This value cannot be a negative number.
If the dateMode parameter is set to 0, this value is ignored.
If the dateMode parameter is set to 1, "rel" is used for the
AFStartBinding range and '-Duration()' is used for the
AFEndBinding range.
If the dateMode parameter is set to 2, "rel" is used for the
AFStartBinding range and '+Duration(StartDate)' is
used for the AFEndBinding range.
If the dateMode parameter is set to 3, "rel" is used for the
AFStartBinding range and '-Duration(EndDate)' is used
for the AFEndBinding range.
Return Value
Returns the output file name if the report generation was
successful; otherwise, an empty string is returned.
Remarks
When this method is called, the following occurs:
1 Excel starts. Excel is visible only if the ExcelVisible
property was set to True.
2 The Workbook file (.xls) specified by the SourceFile
property opens.
3 The binding information in the workbook file is updated.
4 The report runs and the output is saved as an .htm file as
specified in the OutputFile property.
5 Excel closes.
To run a report without using the binding options, use the
Run method. To run a report that only uses additional
binding options for custom filters, use the RunReport2
method.
RunReport2
The RunReport2 method processes the Workbook report. This
method uses the date/time binding feature of Workbook, plus
custom binding filters.
Syntax
[Result=] aaHistClientWorkbookRunner.RunReport2(
message inputFile,
message outputFile,
message outputPrefix,
integer outputFormat,
message tagString,
integer NSFolderKey,
message nameSpace,
integer dateMode,
message startDate,
message endDate,
integer duration
message customFilters);
Parameters
inputFile
The name of the source file for the report generation,
including the full path. Valid file types are .htm, .xls, and
.xlt.
outputFile
The name of the output file generated, including the full
path. If this parameter is set to an empty string ( " " ), then
a file name is generated automatically according to the
following formula:
OutputFile = OutputPrefix + InputFile + year +
month+ day + _ + hour + minute + second
outputPrefix
The value prepended to the output file name. If you specify
an empty string ( " " ), no prefix is prepended.
The outputPrefix parameter is only used if the outputFile
parameter is an empty string.
outputFormat
The file type for the output file. Valid values are:
0 = Native. That is, if the source file is an .htm file, the
output file is an .htm file. If the source file is an .xls or .xlt
file, the output file is an .xls file.
1 = .htm
2 = .xls
3 = .xlt
tagString
A comma separated list of strings to be used for the
AFTagBinding named range. Valid formats are:
"<tagname1>,<tagname2>"
"'<tagname1>','<tagname2>'"
For example:
"ReactLevel,ReactTemp"
"'ReactLevel','ReactTemp'"
NSFolderKey
Reserved for future use. This parameter cannot be blank.
Specify a value (for example, 0) for this parameter, even
though it has no effect.
nameSpace
Reserved for future use. This parameter cannot be blank.
Specify an empty string ( "" ) for this parameter, even
though it has no effect.
dateMode
Determines the values used for the AFStartBinding and
AFEndBinding named ranges. Valid values are:
0 = Use specific start and end times.
1 = Use a duration relative to the current time.
2 = Use a duration relative to the specified start time.
3 = Use a duration relative to the specified end time.
Use the startDate, endDate, and Duration parameters to
specify the dates.
startDate
A date string that can be converted to a date by the Visual
Basic CDate() function. A good format to use is one that
reflects the standard short date and short time format on
the local system.
If the dateMode parameter is set to 1 or 3, this parameter is
ignored.
If the dateMode parameter is set to 0, this value indicates
the specific date/time to be used for the AFStartBinding
range.
If the dateMode parameter is set to 2, then "rel" is used for
the AFStartBinding range and '+Duration(StartDate)' is
used for the AFEndBinding range.
endDate
A date string that can be converted to a date by the Visual
Basic CDate() function. A good format to use is one that
reflects the standard short date and short time format on
the local system.
If the dateMode parameter is set to 1 or 2, this parameter is
ignored.
If the dateMode parameter is set to 0, this value indicates
the specific date/time to be used for the AFEndBinding
range.
If the dateMode parameter is set to 3, then "rel" is used for
the AFStartBinding range and '+Duration(EndDate)' is
used for the AFEndBinding range.
Duration
The time span, in seconds, used for date/time calculations.
This value cannot be a negative number.
If the dateMode parameter is set to 0, this value is ignored.
If the dateMode parameter is set to 1, "rel" is used for the
AFStartBinding range and '-Duration()' is used for the
AFEndBinding range.
If the dateMode parameter is set to 2, "rel" is used for the
AFStartBinding range and '+Duration(StartDate)' is
used for the AFEndBinding range.
If the dateMode parameter is set to 3, "rel" is used for the
AFStartBinding range and '-Duration(EndDate)' is used
for the AFEndBinding range.
customFilters
A string of name-value pairs used to pass information from
the Wonderware Information Server to the workbook file
before the report is run.
The format for the string is as follows:
<name>=<value>
To pass more than one name-value pair, join them with
ampersands. For example:
<name>=<value>&<name>=<value>
The parameter name that you use must correspond to an
existing named range in the workbook that starts with
"AFBinding."
The value you specify in the name-value pair is used for the
corresponding named range in the workbook. You can
specify multiple values if you separate them with commas.
For example, you workbook contains the
AFBindingReportValue and AFBindingReportText named
ranges. You want to pass a value of 5 for the report value
and Line1 and Line2 for the ReportText. The customFilters
parameter is:
ReportValue=5&ReportText=Line2,Line2
Return Value
Returns the output file name if the report generation was
successful; otherwise, an empty string is returned.
Remarks
When this method is called, the following occurs:
1 Excel starts. Excel is visible only if the ExcelVisible
property was set to True.
2 The Workbook file (.xls) specified by the SourceFile
property opens.
3 The binding information in the workbook file is updated.
4 The report runs and the output is saved as an .htm file as
specified in the OutputFile property.
5 Excel closes.
To run a report without using the binding options, use the
Run method. To run a report that only uses the date/time
binding options, use the RunReport method.
aaHistClientReportRunner Object
The aaHistClientReportRunner object is a control that is
used to run reports created with the Wonderware Historian
Client Report. There is no user interface for this control.
You can use the aaHistClientReportRunner object's
properties and methods in runtime scripts in your application
to run existing Report files and output the results (.htm).
• ErrNumber
• OutputFile
• SourceFile
• WordVisible
ErrDescription
The ErrDescription property is a read-only property that
returns an error message if the Run method fails.
Syntax
Result = aaHistClientReportRunner.ErrDescription;
Return Value
The return value is a message. The error message describes
the reason for the failure.
Remarks
The default is an empty message value ( "" ).
ErrNumber
The ErrNumber property is a read-only property that returns
an error code number if the Run method fails.
Syntax
Result = aaHistClientReportRunner.ErrNumber;
Return Value
The return value is an integer.
Remarks
The default value is 0.
OutputFile
The OutputFile property is a read-write property that is used
to specify the file to be created as a result of running the
report.
Syntax
aaHistClientReportRunner.OutputFile = message;
Result = aaHistClientReportRunner.OutputFile;
Remarks
You must specify the entire path and include the .htm
extension.
The default is an empty message value ( "" ).
SourceFile
The SourceFile property is a read-write property that
specifies the name of the Word template file (.htm) to use to
generate the report.
Syntax
aaHistClientReportRunner.SourceFile = message;
Result = aaHistClientReportRunner.SourceFile;
Remarks
You must specify the entire path and include the .htm
extension.
The default is an empty message value ( "" ).
WordVisible
The WordVisible property is a read-write property that
specifies whether or not the Word application user interface
is visible when the report is run.
Syntax
aaHistClientReportRunner.WordVisible = discrete;
Result = aaHistClientReportRunner.WordVisible;
Remarks
If set to True, Word is visible. If set to False, Word is not
visible. The default value is False.
Setting this property to True is useful when you are testing
the report generation.
The default value is False.
Run
The Run method processes the Word report.
Syntax
[Result=] aaHistClientReportRunner.Run();
Return Value
Returns True if the report generation was successful;
otherwise returns False.
Remarks
When this method is called, the following occurs:
1 Word starts. Word is visible only if the WordVisible
property was set to True.
2 The report file (.htm) specified by the SourceFile property
opens.
3 The report runs and is saved as the .htm file specified by
the OutputFile property.
4 Word closes.
Chapter 17
• Auto_Close
• Auto_Open
• GetLastError
• RunReport
AddServer
The AddServer method adds a server to the list of servers for
the current workbook.
Syntax
ActiveFactoryWorkbook.AddServer(message serverName,
message loginName, message password)
Parameters
serverName
The name of the server to which to connect.
loginName
A valid user name for the server.
password
A valid password for the server.
Remarks
Use the keyword “CALL” before the method name to invoke
the method.
Auto_Close
The Auto_Close method removes the Wonderware Historian
Client toolbar and resets the main menu for Excel.
Syntax
ActiveFactoryWorkbook.Auto_Close()
Auto_Open
The Auto_Open method adds the Wonderware Historian
Client toolbar and adds the Wonderware Historian Client
menu to the main menu for Excel.
Syntax
ActiveFactoryWorkbook.Auto_Open()
GetLastError
The GetLastError method returns a message for any error
that occurs when the report is run using the RunReport
method.
Syntax
[Result=] ActiveFactoryWorkbook.GetLastError()
Return Value
Returns a message value containing the error for the
RunReport method. If an empty string is returned, then an
error has occurred. If the output file name is returned, a
warning may have occurred.
Remarks
Possible errors are:
• Only available when a server is present, click OK to add a
server.
• The input file specified does not exist.
• The output format specified is invalid.
• The DateMode argument must be 0, 1, 2, or 3.
• The specified start date is invalid.
• The specified end date is invalid.
• The specified duration is invalid.
• TagString is not empty and AFTagBinding does not exist.
• Invalid TagString format.
• Warning: The AFTagBinding range in the report contains
no tags and no tags have been passed in.
• The <filename> range must be defined.
RunReport
The RunReport method processes the Workbook report. This
method uses the date/time binding feature of Workbook, plus
custom binding filters.
Syntax
[Result=] ActiveFactoryWorkbook.RunReport(
message inputFile,
message outputFile,
message outputPrefix,
integer outputFormat,
message tagString,
integer NSFolderKey,
message nameSpace,
integer dateMode,
message startDate,
message endDate,
integer duration
message customFilters);
Parameters
inputFile
The name of the source file for the report generation,
including the full path. Valid file types are .htm, .xls, and
.xlt.
outputFile
The name of the output file generated, including the full
path. If this parameter is set to an empty string ( "" ), then a
file name is generated automatically according to the
following formula:
OutputFile = OutputPrefix + InputFile + _ +
year + month + day + hour + minute + second
outputPrefix
The value prepended to the output file name. If you specify
an empty string ( "" ), no prefix is prepended.
The outputPrefix parameter is only used if the outputFile
parameter is an empty string.
outputFormat
The file type for the output file. Valid values are:
0 = Native. That is, if the source file is an .htm file, the
output file is an .htm file. If the source file is an .xls or .xlt
file, the output file is an .xls file.
1 = .htm
2 = .xls
3 = .xlt
tagString
A comma separated list of strings to be used for the
AFTagBinding named range. If the AFTagBinding range
does not exist, and this parameter is set to any value other
than an empty string ( "" ), an error is raised. Valid formats
are:
"<tagname1>,<tagname2>"
"'<tagname1>','<tagname2>'"
For example:
"ReactLevel,ReactTemp"
"'ReactLevel','ReactTemp'"
NSFolderKey
Reserved for future use. This parameter cannot be blank.
Specify a value (for example, 0) for this parameter, even
though it has no effect.
nameSpace
Reserved for future use. This parameter cannot be blank.
Specify an empty string ( "" ) for this parameter, even
though it has no effect.
dateMode
Determines the values used for the AFStartBinding and
AFEndBinding named ranges. An error is raised if the
binding ranges do not exist or if this parameter is blank.
Valid values are:
0 = Use specific start and end times.
1 = Use a duration relative to the current time.
2 = Use a duration relative to the specified start time.
3 = Use a duration relative to the specified end time.
Use the startDate, endDate, and Duration parameters to
specify the dates.
startDate
A date string that can be converted to a date by the Visual
Basic CDate() function. A good format to use is one that
reflects the standard short date and short time format on
the local system.
If the dateMode parameter is set to 1 or 3, this parameter is
ignored.
If the dateMode parameter is set to 0, this value indicates
the specific date/time to be used for the AFStartBinding
range.
If the dateMode parameter is set to 2, then "rel" is used for
the AFStartBinding range and '+Duration(StartDate)' is
used for the AFEndBinding range.
endDate
A date string that can be converted to a date by the Visual
Basic CDate() function. A good format to use is one that
reflects the standard short date and short time format on
the local system.
If the dateMode parameter is set to 1 or 2, this parameter is
ignored.
If the dateMode parameter is set to 0, this value indicates
the specific date/time to be used for the AFEndBinding
range.
If the dateMode parameter is set to 3, then "rel" is used for
the AFStartBinding range and '+Duration(EndDate)' is
used for the AFEndBinding range.
Duration
The time span, in seconds, used for date/time calculations.
This value cannot be a negative number.
If the dateMode parameter is set to 0, this value is ignored.
If the dateMode parameter is set to 1, "rel" is used for the
AFStartBinding range and '-Duration()' is used for the
AFEndBinding range.
If the dateMode parameter is set to 2, "rel" is used for the
AFStartBinding range and '+Duration(StartDate)' is
used for the AFEndBinding range.
If the dateMode parameter is set to 3, "rel" is used for the
AFStartBinding range and '-Duration(EndDate)' is used
for the AFEndBinding range.
customFilters
A string of name-value pairs used to pass information from
the Wonderware Information Server to the workbook file
before the report is run.
The format for the string is as follows:
<name>=<value>
To pass more than one name-value pair, join them with
ampersands. For example:
<name>=<value>&<name>=<value>
The parameter name that you use must correspond to an
existing named range in the workbook that starts with
"AFBinding."
The value you specify in the name-value pair is used for the
corresponding named range in the workbook. You can
specify multiple values if you separate them with commas.
For example, your workbook contains the
AFBindingReportValue and AFBindingReportText named
ranges. You want to pass a value of 5 for the report value
and Line1 and Line2 for the ReportText. The customFilters
parameter is:
ReportValue=5&ReportText=Line2,Line2
Return Value
Returns the output file name if the report generation was
successful; otherwise, an empty string is returned.
Method Used to
Method Used to
13 Change the display name for the button and adjust the
size, appropriately.
• ReportTime
ReportDate
The ReportDate property is a read-write property that gets
or sets the date that the report was run.
Syntax
ActiveFactoryReport.ReportDate = message;
Result = ActiveFactoryReport.ReportDate;
Remarks
The value of this property is used for any #Date wildcards
used within the report. For more information on the #Date
wildcard, see #date Wildcard on page 372.
The default value is the current date of when Microsoft Word
was launched.
ReportTime
The ReportTime property is a read-write property that gets
or sets the time that the report was run.
Syntax
ActiveFactoryReport.ReportTime = message;
Result = ActiveFactoryReport.ReportTime;
Remarks
The value of this property is used for any #ReportTime
wildcards used within the report. For more information on
the #ReportTime wildcard, see #ReportTime Wildcard on
page 372.
The default value is the current date of when Microsoft Word
was launched.
• AutoExit
• RunReport
AutoExec
The AutoExec method initializes values.
Syntax
ActiveFactoryReport.AutoExec()
AutoExit
The AutoExit method removes the Wonderware Historian
Client toolbar and resets the main menu for Word.
Syntax
ActiveFactoryReport.AutoExit()
RunReport
The RunReport method processes the Word report.
Syntax
ActiveFactoryReport.RunReport()
Return Value
Returns False if the report generation was successful;
otherwise returns True.
Remarks
Any message dialog boxes are suppressed.
Chapter 18
aaHistClientGlobalFunctions
Object
aaHistClientGlobalFunctions Methods
The aaHistClientGlobalFunctions methods are:
• GetDictionaryPath
• GetInstallPath
• GetAFVersion
• GetWorkstationName
• MDACOk
GetDictionaryPath
The GetDictionaryPath method returns the path to the
dictionary file.
Syntax
[Result=]
aaHistClientGlobalFunctions.GetDictionaryPath();
Return Value
Returns an empty string.
Remarks
This method is provided for backward compatibility only.
GetInstallPath
The GetInstallPath method returns the path where the
Wonderware Historian Client software is installed.
Syntax
[Result=] aaHistClientGlobalFunctions.GetInstallPath();
Return Value
Returns a fully-qualified path to the installation folder as a
string.
GetAFVersion
The GetAFVersion method returns the version of the
Historian Client software. For example, this method returns
10.0.0.0 as the version of the Historian Client software.
Syntax
[Result=] aaHistClientGlobalFunctions.GetAFVersion();
Return Value
Returns a string value containing the version of the
Historian Client software.
GetWorkstationName
The GetWorkstationName method returns the name of the
computer on which the Historian Client software is running.
For example, this method returns the computer name as
HYDDLFLN5877.
Syntax
[Result=]
aaHistClientGlobalFunctions.GetWorkstationName();
Return Value
Returns a string value containing the name of the computer
on which the Historian Client software is running.
MDACOk
The MDACOk method returns whether the Microsoft Data
Access Components (MDAC) are installed.
Syntax
[Result=] aaHistClientGlobalFunctions.MDACOk();
Return Value
Returns True if the components are installed; otherwise,
returns False.
Remarks
Since MDAC is a prerequisite for the Wonderware Historian
Client software, this method always returns True.
Chapter 19
Common Properties
All of the following properties are ambient properties.
• BackColor • BackStyle
• BorderStyle • CausesValidation
• Container • ContextMenuEnabled
• DataBindings • DragIcon
• DragMode • Enabled
• Font • ForeColor
• Height • HelpContextID
• Index • Left
• Name • Object
• Parent • TabIndex
• TabStop • Tag
• ToolTipText • Top
• Transparent • Visible
• WhatsThisHelpID • Width
BackColor
The BackColor property is a read-write property that
specifies the background color for the control.
Syntax
<objectname>.BackColor = integer;
Result = <objectname>.BackColor;
Remarks
The default value of 1 indicates to use the window color.
BackStyle
The BackStyle property is a read-write property that
specifies whether the background for a label or shape is
opaque or transparent.
Syntax
<objectname>.BackStyle = integer;
Result = <objectname>.BackStyle;
Remarks
0 = Transparent; 1 = Opaque.
Setting this property to 0 has the same effect as setting the
Transparent property to True.
BorderStyle
The BorderStyle property is a read-write property that
specifies whether the control has a border line around it or
not.
Syntax
<objectname>.BorderStyle = integer;
Result = <objectname>.BorderStyle;
Remarks
0 = No border; 1 = Single line border.
CausesValidation
The CausesValidation property is a read-write property that
specifies whether validation occurs on the control.
Syntax
<objectname>.CausesValidation = discrete;
Result = <objectname>.CausesValidation;
Remarks
This property is not available in the InTouch HMI software.
Container
The Container property is a read-only property that returns
the container of the control.
Syntax
<objectname>.Container = object;
Result = <objectname>.Container;
Remarks
This property is not available in the InTouch HMI software.
ContextMenuEnabled
The ContextMenuEnabled property is a read-write property
that specifies whether the shortcut menu appears when a
user right-clicks on the control.
Syntax
<objectname>.ContextMenuEnabled = discrete;
Result = <objectname>.ContextMenuEnabled;
Remarks
If this property is set to False, the Windows context menu
still appears when a user right-clicks on an editable field.
The Windows context menu contains editing commands such
as Cut, Copy, Paste, and so on.
DataBindings
The DataBindings property is a read-only property that gets
the bindable properties that are available to the application
developer.
Syntax
<objectname>.DataBindings = DataBindings;
Result = <objectname>.DataBindings;
DragIcon
The DragIcon property is a read-write property that gets or
sets the icon to be displayed for the mouse pointer during a
drag-and-drop operation.
Syntax
<objectname>.DragIcon = Picture;
Result = <objectname>.DragIcon;
Remarks
This property is not available in the InTouch HMI software.
DragMode
The DragMode property is a read-write property that controls
whether automatic or manual dragging is used.
Syntax
<objectname>.DragMode = integer;
Result = <objectname>.DragMode;
Remarks
This property is not available in the InTouch HMI software.
Enabled
The Enabled property is a read-write property that
determines whether the control can be acted upon by the
runtime user.
Syntax
<objectname>.Enabled = discrete;
Result = <objectname>.Enabled;
Font
The Font property is a read-write property that gets or sets
the font object.
Syntax
<objectname>.Font = Font;
Result = <objectname>.Font;
Remarks
This property controls the font appearance for all text in the
user interface.
ForeColor
The Fore property is a read-write property that gets or sets
the color to be used for the foreground color in the control.
Syntax
<objectname>.ForeColor = Long;
Result = <objectname>.ForeColor;
Remarks
The default value is 1 (the window color).
Height
The Height property is a read-write property that gets or sets
the height of the control.
Syntax
<objectname>.Height = Single;
Result = <objectname>.Height;
Remarks
This property is not available in the InTouch HMI software.
HelpContextID
The HelpContextID property is a read-write property that
gets or sets the Help context ID for the object.
Syntax
<objectname>.HelpContextID = Long;
Result = <objectname>.HelpContextID;
Remarks
This property is not available in the InTouch HMI software.
Index
The Index property is a read-only property that returns the
number identifier for a control in an array.
Syntax
<objectname>.Index = integer;
Result = <objectname>.Index;
Remarks
The starting value for the identifier is typically 1. This
property is not available in the InTouch HMI software.
Left
The Left property is a read-write property that gets or sets
the distance between the left edge of the container
application and the internal left edge of the control.
Syntax
<objectname>.Left = Single;
Result = <objectname>.Left;
Remarks
This property is not available in the InTouch HMI software.
Name
The Name property is a read-only property that gets the
name used to identify an object.
Syntax
<objectname>.Name = message;
Result = <objectname>.Name;
Remarks
This property is not available in the InTouch HMI software.
Object
The Object property is a read-only property that gets the
object in a control.
Syntax
<objectname>.Object = Object;
Result = <objectname>.Object;
Remarks
This property is not available in the InTouch HMI software.
Parent
The Parent property is a read-only property that gets the
object on which this object is located.
Syntax
<objectname>.Parent = Object;
Result = <objectname>.Parent;
Remarks
This property is not available in the InTouch HMI software.
TabIndex
The TabIndex property is a read-write property that gets or
sets the tab order of the object within its parent form.
Syntax
<objectname>.TabIndex = integer;
Result = <objectname>.TabIndex;
Remarks
This property is only available during design time. This
property is not available in the InTouch HMI software.
TabStop
The TabStop property is a read-write property that gets or
sets whether the TAB key can be used to give focus to an
object.
Syntax
<objectname>.TabStop = discrete;
Result = <objectname>.TabStop;
Remarks
This property is not available in the InTouch HMI software.
Tag
The Tag property is a read-write property that can be used to
store extra data needed for the application.
Syntax
<objectname>.Tag = message;
Result = <objectname>.Tag;
Remarks
This property is not available in the InTouch HMI software.
ToolTipText
The ToolTipText property is a read-write property that gets
or sets the text that appears when the mouse pointer hovers
over the control at runtime.
Syntax
<objectname>.ToolTipText = message;
Result = <objectname>.ToolTipText;
Remarks
This property is only available in the InTouch HMI software
for the aaHistClientTrend control.
Top
The Top property is a read-write property that gets or sets
the distance between the top edge of the object container and
the internal top edge of an object.
Syntax
<objectname>.Top = Single;
Result = <objectname>.Top;
Transparent
The Transparent property is a read-write property that gets
or sets the background of the object to be transparent.
Syntax
<objectname>.Transparent = discrete;
Result = <objectname>.Transparent;
Remarks
If set to True, the underlying form appears through the
background of the object. The field (text box) label is not
transparent. However, you can hide the field label to achieve
total transparency.
The default value is False.
Visible
The Visible property is a read-write property that determines
whether an object is visible or hidden.
Syntax
<objectname>.Visible = discrete;
Result = <objectname>.Visible;
Remarks
This property is not available in the InTouch HMI software.
To hide the control, change the object coordinates so that the
object appears out of the bounds of the window.
WhatsThisHelpID
The WhatsThisHelpID property is a read-write property that
gets or sets the associated context-sensitive Help ID number
for an object.
Syntax
<objectname>.WhatsThisHelpID = Long;
Result = <objectname>.WhatsThisHelpID;
Remarks
This property is not available in the InTouch HMI software.
Width
The Width property is a read-write property that gets or sets
the width of an object.
Syntax
<objectname>.Width = Single;
Result = <objectname>.Width;
Remarks
This property is not available in the InTouch HMI software.
Common Methods
All of the following methods are ambient methods.
• Drag
• Move
• SetFocus
• SetToolbarButtonEnabled
• ShowWhatsThis
• ZOrder
Drag
The Drag method begins, ends, or cancels the drag operation
for any object except for Menu, Line, Time, and Shape.
Syntax
[Result=] <objectname>.Drag();
Return Value
Returns True if successful; otherwise returns False.
Move
The Move method moves an object.
Syntax
[Result=] <objectname>.Move(single Left, [Top],
[Width], [Height]);
SetFocus
The SetFocus method sets the focus to the specified object.
Syntax
[Result=] <objectname>.SetFocus();
ShowWhatsThis
The ShowWhatsThis method displays a particular topic in a
Help file.
Syntax
[Result=] <objectname>.ShowWhatsThis();
Remarks
The What' This? popup control provided by Windows Help is
used.
ZOrder
The ZOrder method locates a specified object at the back or
from of the z-order within its graphical level.
Syntax
[Result=] <objectname>.ZOrder([Position]);
Common Events
All of the following events are ambient events.
• Click
• DblClick
• DragDrop
• DragOver
• GotFocus
• KeyDown
• KeyPress
• KeyUp
• LostFocus
• MouseDown
• MouseMove
• MouseUp
• Validate
Click
The Click event is triggered when the run-time user clicks on
the object at runtime with the mouse.
Syntax
<objectname>.Click();
DblClick
The DblClick event is triggered when the user double-clicks
on the object at runtime with the mouse.
Syntax
<objectname>.DblClick();
DragDrop
The DragDrop event is triggered when a drag-and-drop
operation is completed.
Syntax
<objectname>.DragDrop(Control source, single X, single
Y);
DragOver
The DragOver event is triggered when a drag-and-drop
operation is in progress.
Syntax
<objectname>.DragOver(Control source, single X, single
Y, integer state);
GotFocus
The GotFocus event is triggered when an object receives
focus.
Syntax
<objectname>.GotFocus();
KeyDown
The KeyDown event is triggered when a user presses a key
on the keyboard while the object has focus.
Syntax
<objectname>.KeyDown(integer KeyCode, integer Shift);
Parameters
KeyPress
The KeyPress event is triggered when the runtime user
presses and releases an ANSI key.
Syntax
<objectname>.KeyPress(integer KeyAscii);
KeyUp
The KeyUp event is triggered when a user releases a key on
the keyboard while the object has focus.
Syntax
<objectname>.KeyUp(integer KeyCode, integer Shift);
LostFocus
The LostFocus event is triggered when an object loses focus.
Syntax
<objectname>.LostFocus();
MouseDown
The MouseDown event is triggered when the user presses the
mouse key down while an object has focus.
Syntax
<objectname>.MouseDown(integer button, integer shift,
single X, single Y);
MouseMove
The MouseMove event is triggered when the user moves the
mouse.
Syntax
<objectname>.MouseMove(integer button, integer shift,
single X, single Y);
MouseUp
The MouseUp event is triggered when the user presses the
mouse key up while an object has focus.
Syntax
<objectname>.MouseUp(integer button, integer shift,
single X, single Y);
Validate
The Validate event is triggered when a control loses focus to
a control that causes validation.
Syntax
<objectname>.Validate(discrete Cancel);
Common Enumerations
Common enumerations are:
• aaRetrievalSource Enumeration
• aaTagType Enumeration
aaRetrievalSource Enumeration
Specifies the source of process data to retrieve.
aaTagType Enumeration
Specifies the set of tag types allowed for tags.
aaTimeRangeEnumeration Enumeration
Specifies which time range is selected.
• DataSet
• Font
• Object
DateTime
For the InTouch HMI software, use a message value in a
valid date/time format.
For C# and .NET applications, a DateTime parameter or
result can reference a DateTime structure. For more
information, see the documentation on the DateTime
structure in the .NET Framework Class Library.
Color
To specify a color for a control, you must specify the color as
an integer value. The color is an ABGR color, where:
A = Transparency
B = Blue
G = Green
R = Red
A BGR color value is made up of 24 bits, with the upper 8 bits
always being 0. For example, 0xFF0000 is 0B00 in the BGR
convention, which equates to Blue.
An ABGR color value is made up of 32 bits, with upper 8 bits
being 0 by default, but can be set to any opacity:
• 00 (in HEX) in the upper 8 bits means no transparency or
full opacity.
DataSet
For C# and .NET applications, a DataSet parameter or result
can reference a DataSet object. For more information, see the
documentation on the ADO.NET DataSet object in the .NET
Framework Developer's Guide.
Font
For C# and .NET applications, a Font parameter or result
can reference a Font class. For more information, see the
documentation on the Font class in the .NET Framework
Class Library.
Object
For C# and .NET applications, an object parameter or result
can reference an Object class. For more information, see the
documentation on the Object class in the .NET Framework
Class Library.
Appendix A
11 In the SQL Server box, type the name of the SQL Server to
use. You may be prompted to provide login information to
connect to the SQL Server.
12 In the Database list, select the Runtime database.
16 Click OK.
The new virtual directory is listed in the console window.
Appendix B
• Delta Retrieval
• Interpolated Retrieval
• Average Retrieval
• Minimum Retrieval
• Maximum Retrieval
• Integral Retrieval
• Slope Retrieval
• Counter Retrieval
• ValueState Retrieval
Cyclic Retrieval
Cyclic retrieval is the retrieval of stored data for the given
time period based on a specified cyclic retrieval resolution,
regardless of whether or not the value of the tag(s) has
changed. It works with all types of tags. Cyclic retrieval
produces a virtual rowset, which may or may not correspond
to the actual data rows stored on the Wonderware Historian.
In cyclic retrieval, one row is returned for each “cycle
boundary.” You specify the number of cycles either directly or
by means of a time resolution, that is, the spacing of cycle
boundaries in time. If you specify a number of cycles, the
Wonderware Historian returns that number of rows, evenly
spaced in time over the requested period. The cyclic
resolution is calculated by dividing the requested time period
by the number of cycle boundaries. If you specify a resolution,
the number of cycles is calculated by dividing the time period
by the resolution.
If no data value is actually stored at a cycle boundary, the
last value before the boundary is returned.
The default retrieval mode is cyclic for retrieval from analog
tables, including analog and state summary tables.
Cyclic retrieval is fast and therefore consumes little server
resources. However, it may not correctly reflect the stored
data because important process values (gaps, spikes, and so
on.) might fall between cycle boundaries. For an alternative,
see “Best Fit” Retrieval on page 703.
Query 1
The following query returns data values for the analog tag
'ReactLevel'. If you do not specify a wwCycleCount or
wwResolution, the query will return 100 rows (the default).
SELECT DateTime, Sec = DATEPART(ss, DateTime), TagName,
Value
FROM History
WHERE TagName = 'ReactLevel'
AND DateTime >= '2001-03-13 1:15:00pm'
AND DateTime <= '2001-03-13 2:15:00pm'
AND wwRetrievalMode = 'Cyclic'
Delta Retrieval
Delta retrieval, or retrieval based on exception, is the
retrieval of only the changed values for a tag(s) for the given
time interval. That is, duplicate values are not returned. It
works with all types of tags.
Delta retrieval always produces a rowset comprised of only
rows that are actually stored on the historian; that is, a delta
query returns all of the physical rows in history for the
specified tags, over the specified period, minus any duplicate
values. If there is no actual data point at the start time, the
last data point before the start time is returned.
Delta retrieval is the default mode for discrete and string
tables and from the History table.
• P5, P8, P9, P10, and P11, because they represent changed
values during the time period
Query 1
As an example of how delta mode works, consider the
following query:
SELECT TagName, DateTime, Value, QualityDetail
FROM History
WHERE TagName = 'A001'
AND DateTime >= '2009-09-12 00:20'
AND DateTime <= '2009-09-12 00:40'
AND wwRetrievalMode = 'Delta'
The sample data points and the results are mapped on the
following chart. Only the data falling between the time start
and end marks at 2009-09-12 00:20 and 2009-09-12 00:40
(shown on the chart as dark vertical lines) are returned by
the query.
Because there is no value that matches the start time, an
initial value at 2009-09-12 00:20 is returned in the results
based on the value of the preceding data point at 2009-09-12
00:16. Because there is no change in the value at 2009-09-12
00:27 from the value at 2009-09-12 00:24, the data point
appears on the chart but does not appear in the results.
Similarly, the second 0.0 value at 2009-09-12 00:29 is also
excluded from the results.
You can further control the number of rows returned by using
the wwTimeDeadband, wwValueDeadband, and
wwCycleCount extensions. The use of a cycle count returns
the first number of rows within the time range of the query.
For more information, see Retrieval Styles, Application
Settings, and Tag Settings on page 817.
Query 1
SELECT DateTime, TagName, Value
FROM History
WHERE TagName IN ('SysTimeSec','SysTimeMin')
AND DateTime >= '2001-12-09 11:35'
AND DateTime <= '2001-12-09 11:36'
AND wwRetrievalMode = 'Delta'
The results are:
DateTime TagName Value
2001-12-09 11:35:00.000 SysTimeSec 0
2001-12-09 11:35:00.000 SysTimeMin 35
2001-12-09 11:35:01.000 SysTimeSec 1
2001-12-09 11:35:02.000 SysTimeSec 2
2001-12-09 11:35:03.000 SysTimeSec 3
2001-12-09 11:35:04.000 SysTimeSec 4
.
.
.
2001-12-09 11:35:58.000 SysTimeSec 58
2001-12-09 11:35:59.000 SysTimeSec 59
2001-12-09 11:36:00.000 SysTimeSec 0
2001-12-09 11:36:00.000 SysTimeMin 36
Query 2
SELECT * FROM OpenQuery(INSQL,'SELECT DateTime, Value,
Quality, QualityDetail
FROM AnalogHistory
WHERE TagName = "SysTimeSec"
AND wwRetrievalMode = "Delta"
AND Value = 10
AND DateTime >="2001-07-27 03:00:00.000"
AND DateTime <="2001-07-27 03:05:00.000"
')
The results are:
Query 3
For a delta query, if both a wwCycleCount and a Value
comparison are specified, the query will return the first
number of rows (if available) that meet the value indicated.
SELECT * FROM OpenQuery(INSQL,'SELECT DateTime, Value,
Quality, QualityDetail
FROM AnalogHistory
WHERE TagName = "SysTimeSec"
AND wwRetrievalMode = "Delta"
AND Value = 20
AND wwCycleCount = 10
AND DateTime >="2001-07-27 03:00:00.000"
AND DateTime <="2001-07-27 03:20:00.000"
')
The results are:
Full Retrieval
In full retrieval mode, all stored data points are returned,
regardless of whether a value or quality has changed since
the last value. This mode allows the same value and quality
pair (or NULL value) to be returned consecutively with their
actual timestamps. It works with all types of tags.
By using full retrieval in conjunction with storage without
filtering (that is, no delta or cyclic storage mode is applied at
the historian), you can retrieve all values that originated
from the plant floor data source or from another application.
Full retrieval best represents the process measurements
recorded by the Wonderware Historian. However, it creates a
higher load for the server, the network and the client system
because a very large number of records may be returned for
longer time periods.
For full retrieval for replicated summary tags on a tier-2
historian, if a point with doubtful quality is returned as the
result of a value selection from an input summary point with
a contained gap, the same point can be returned again with
good quality if the same value is selected again from the next
input summary point that has good quality.
Query 1
SELECT DateTime, TagName, Value
FROM History
WHERE TagName IN ('SysTimeSec','SysTimeMin')
AND DateTime >= '2001-12-09 11:35'
AND DateTime <= '2001-12-09 11:36'
AND wwRetrievalMode = 'Full'
Interpolated Retrieval
Interpolated retrieval works like cyclic retrieval, except that
interpolated values are returned if there is no actual data
point stored at the cycle boundary.
This retrieval mode is useful if you want to retrieve cyclic
data for slow-changing tags. For a trend, interpolated
retrieval results in a smoother curve instead of a
"stair-stepped" curve. This mode is also useful if you have a
slow-changing tag and a fast-changing tag and want to
retrieve data for both. Finally, some advanced applications
require more evenly spaced values than would be returned if
interpolation was not applied.
By default, interpolated retrieval uses the interpolation
setting specified for the tag in the Wonderware Historian.
This means that if a tag is set to use stair-step interpolation,
interpolated retrieval gives the same results as cyclic
retrieval.
Interpolation is only applied to analog tags. If you retrieve
data for other types of tags, stair-step interpolation is used,
and the results are the same as for cyclic retrieval.
Interpolated retrieval is a bit slower than cyclic retrieval. It
shares the limitations of cyclic retrieval in that it may not
accurately represent the stored process data.
Query 1
Two analog tags and a discrete tag are retrieved from the
History table, using linear interpolation. The start and end
times are offset to show interpolation of the SysTimeMin tag.
The data points at all cycle boundaries are interpolated for
the two analog tags, while the values returned for the
discrete tag are stair-stepped.
SELECT DateTime, TagName, Value, wwInterpolationType
FROM History
WHERE TagName IN ('SysTimeMin', 'ReactTemp',
'SysPulse')
AND DateTime >= '2005-04-11 12:02:30'
AND DateTime <= '2005-04-11 12:06:30'
AND wwRetrievalMode = 'Interpolated'
AND wwInterpolationType = 'Linear'
AND wwResolution = 60000
Query 2
If you omit the interpolation type in the query, the historian
determines which interpolation type to use for an analog tag
based on the value of the InterpolationType column in the
AnalogTag table, in conjunction with the
InterpolationTypeInteger and InterpolationTypeReal system
parameters.
In the following query both analog tags are set to use the
system default through the AnalogTag table, while the
InterpolationTypeInteger and InterpolationTypeReal system
parameters are set to 0 and 1, respectively. Because
SysTimeMin is defined as a 2-byte integer and ReactTemp is
defined as a real we see that only rows for ReactTemp are
interpolated.
SELECT DateTime, TagName, Value, wwInterpolationType
FROM History
WHERE TagName IN ('SysTimeMin', 'ReactTemp',
'SysPulse')
AND DateTime >= '2005-04-11 12:02:30'
AND DateTime <= '2005-04-11 12:06:30'
AND wwRetrievalMode = 'Interpolated'
AND wwResolution = 60000
Query 3
SELECT TagName, DateTime, Value, QualityDetail,
wwInterpolationType
FROM History
WHERE TagName = 'A001'
AND DateTime >= '2009-09-12 00:20'
AND DateTime <= '2009-09-12 00:40'
AND wwRetrievalMode = 'Interpolated'
AND wwResolution = '10000'
• P11 as both the minimum value and the last value in the
cycle
• As no exception occurs in the second cycle, none is
returned.
Because the tag does not have a point exactly at the query
end time, where an incomplete third cycle starts, the end
value PC2 is interpolated between P11 and P12, assuming that
linear interpolation is used.
Query 1
An analog tag is retrieved over a five-minute period using the
best-fit retrieval mode. The wwResolution parameter is set to
60000, thus specifying five 1-minute cycles. Within each
cycle, the retrieval sub-system returns the first, minimum,
maximum, and last data points. There are no exception
(NULL) points in the time period. Notice how the points at
the query start time and end time are interpolated, while all
other points are actual delta points.
SELECT DateTime, TagName, CONVERT(DECIMAL(10, 1),
Value) AS Value, wwInterpolationType AS IT FROM
History
WHERE TagName = 'ReactTemp'
AND DateTime >= '2005-04-11 12:15:00'
AND DateTime <= '2005-04-11 12:20:00'
AND wwRetrievalMode = 'BestFit'
AND wwResolution = 60000
The results are:
Average Retrieval
For the time-weighted average (in short: “average”) retrieval
mode, a time-weighted average algorithm is used to calculate
the value to be returned for each retrieval cycle.
For a statistical average, the actual data values are used to
calculate the average. The average is the sum of the data
values divided by the number of data values. For the
following data values, the statistical average is computed as:
(P1 + P2 + P3 + P4) / 4) = Average
Query 1
The time-weighted average is computed for each of five
1-minute long cycles.
Note that the wwTimeStampRule parameter is set to "Start"
in the query. This means that the value stamped at
11:18:00.000 represents the average for the interval 11:18 to
11:19, the value stamped at 11:19:00.000 represents the
average for the interval 11:19 to 11:20, and so on. If no
timestamp rule is specified in the query, then the default
setting in the TimeStampRule system parameter is used.
In the first cycle there are no points, so a NULL is returned.
In the second cycle value points are found covering 77.72
percent of the time as returned in PercentGood. This means
that the returned average is calculated based on 77.72
percent of the cycle time. Because the same OPCQuality is
not found for all the points in the cycle, OPCQuality is set to
Doubtful. In the remaining three cycles, only good points
occur, all with an OPCQuality of 192.
Because no quality rule is specified in the query using the
wwQualityRule parameter, the query uses the default as
specified by the QualityRule system parameter. If a quality
rule of Extended is specified, any point stored with doubtful
OPCQuality will be used to calculate the average, and the
point time will therefore be included in the calculation of
PercentGood.
Query 2
This query demonstrates the use of the average retrieval
mode in a wide query. Time-weighted average values are
returned for the analog tags ReactTemp and ReactLevel,
while regular cyclic points are returned for the discrete tag,
WaterValve.
SELECT * FROM OpenQuery(INSQL,
'SELECT DateTime, ReactTemp, ReactLevel, WaterValve
FROM WideHistory
WHERE DateTime >= "2004-06-07 08:00"
AND DateTime < "2004-06-07 08:05"
AND wwRetrievalMode = "Average"
AND wwCycleCount = 5
')
The results are:
Minimum Retrieval
The minimum value retrieval mode returns the minimum
value from the actual data values within a retrieval cycle. If
there are no actual data points stored on the historian for a
given cycle, nothing is returned. NULL is returned if the
cycle contains one or more NULL values.
As in cyclic retrieval, the number of cycles is based on the
specified resolution or cycle count. However, minimum
retrieval is not a true cyclic mode. Apart from the initial
value, all points returned are delta points.
Minimum retrieval only works with analog tags. For all other
tags, normal delta results are returned.
All returned values are in chronological order. If multiple
points are to be returned for a particular timestamp, they are
returned in the order in which the tags were specified in the
query. If the minimum value occurs several times in a cycle,
the minimum value with the earliest timestamp is returned.
Using the minimum retrieval mode with a cycle count of 1
returns the same results as the SQL Server MIN aggregate;
however, the data is returned much faster.
This example has a start time of TC0 and an end time of TC2.
The resolution has been set in such a way that the historian
returns data for two complete cycles starting at TC0 and TC1,
a “phantom” cycle starting at TCP, and an incomplete cycle
starting at TC2. The phantom cycle has the same duration as
the first cycle in the query period, extending back in time
from the query start time.
For the queried tag, a total of 18 points are found throughout
the cycles, represented by the markers P1 through P18. Of
these points, 17 represent normal analog values. The point
P13 represents a NULL due to an I/O Server disconnect,
which causes a gap in the data between P13 and P14.
The minimum value for the “phantom” cycle starting at TCP
is returned as the initial value at TC0. Point P18 is not
considered at all because it is outside of the query time
frame. All other points are considered, but only the points
indicated by green markers on the graph are returned (P10,
P13, and P17).
or
wwRetrievalMode = 'Minimum'
Query 1
In this example, an analog tag is retrieved over a five minute
period, using the minimum retrieval mode. Because the
wwResolution parameter is set to 60000, each cycle is exactly
one minute long. The minimum data value is returned from
each of these cycles.
SELECT DateTime, TagName, CONVERT(DECIMAL(10, 2),
Value) AS Value FROM History
WHERE TagName = 'ReactTemp'
AND DateTime >= '2005-04-11 11:21:00'
AND DateTime <= '2005-04-11 11:26:00'
AND wwRetrievalMode = 'Minimum'
AND wwResolution = 60000
The initial value at the query start time is the minimum
value found in the phantom cycle before the start time of the
query.
The results are:
Query 2
In this example, the minimum retrieval mode is used in a
manner equivalent to using the SQL Server MIN aggregate.
Note that the cycle producing the result is the five-minute
phantom cycle just before the query start time.
SELECT TOP 1 DateTime, TagName, CONVERT(DECIMAL(10, 2),
Value) AS Value FROM History
WHERE TagName = 'ReactTemp'
AND DateTime >= '2005-04-11 11:31:00'
AND DateTime <= '2005-04-11 11:31:00'
AND wwRetrievalMode = 'Minimum'
AND wwResolution = 300000
The results are:
Query 3
This example shows how the minimum retrieval mode marks
the QualityDetail column to indicate that a minimum value
is returned based on an incomplete cycle. In this case, an
incomplete cycle is a cycle that either contained periods with
no values stored or a cycle that was cut short because the
query end time was located inside the cycle. All values
returned for the QualityDetail column are documented in the
QualityMap table in the Runtime database.
SELECT DateTime, TagName, Value, QualityDetail FROM
History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2005-04-11 11:18:50'
AND DateTime <= '2005-04-11 11:20:50'
AND wwRetrievalMode = 'Minimum'
AND wwResolution = 60000
The sample data points and the results are mapped on the
following chart. Only the data falling between the time start
and end marks at 00:20 and 00:40 (shown on the chart as
dark vertical lines) are returned by the query. The resolution
is set at 10,000 milliseconds.
Because there is no value that matches the start time, an
initial value at 00:20 is returned based on the minimum
value of the preceding cycle, which is the data point at 00:09.
In the two subsequent cycles, the minimum values are at
00:22 and 00:38. The quality for these two values is set to
4288 (4096 + 192). The remaining data points are excluded
because they are not minimums. In addition, the first NULL
at 00:28 is included, but the second NULL (at 00:29) is not.
Maximum Retrieval
The maximum value retrieval mode returns the maximum
value from the actual data values within a retrieval cycle. If
there are no actual data points stored on the historian for a
given cycle, nothing is returned. NULL is returned if the
cycle contains one or more NULL values.
As in cyclic retrieval, the number of cycles is based on the
specified resolution or cycle count. However, maximum
retrieval is not a true cyclic mode. Apart from the initial
value, all points returned are delta points.
Maximum retrieval only works with analog tags. For all
other tags, normal delta results are returned.
All returned values are in chronological order. If multiple
points are to be returned for a particular timestamp, they are
returned in the order in which the tags were specified in the
query. If the maximum value occurs several times in a cycle,
the maximum value with the earliest timestamp is returned.
Using the maximum retrieval mode with a cycle count of 1
returns the same results as the SQL Server MAX aggregate;
however, the data is returned much faster.
This example has a start time of TC0 and an end time of TC2.
The resolution has been set in such a way that the historian
returns data for two complete cycles starting at TC0 and TC1,
a “phantom” cycle starting at TCP, and an incomplete cycle
starting at TC2. The phantom cycle has the same duration as
the first cycle in the query period, extending back in time
from the query start time.
For the queried tag, a total of 18 points are found throughout
the cycles, represented by the markers P1 through P18. Of
these points, 17 represent normal analog values. The point
P13 represents a NULL due to an I/O Server disconnect,
which causes a gap in the data between P13 and P14.
The maximum value for the “phantom” cycle starting at TCP
is returned as the initial value at TC0. Point P18 is not
considered at all because it is outside of the query time
frame. All other points are considered, but only the points
indicated by green markers on the graph are returned (P12,
P13, and P15).
In total, four points are returned:
• P6 as the maximum value of the “phantom” cycle and the
initial point
or
wwRetrievalMode = 'Maximum'
Query 1
In this example, an analog tag is retrieved over a five-minute
period, using the maximum retrieval mode. Because the
wwResolution parameter is set to 60000, each cycle is exactly
one minute long. The maximum data value is returned from
each of these cycles.
SELECT DateTime, TagName, CONVERT(DECIMAL(10, 2),
Value) AS Value FROM History
WHERE TagName = 'ReactTemp'
AND DateTime >= '2005-04-11 11:21:00'
AND DateTime <= '2005-04-11 11:26:00'
AND wwRetrievalMode = 'Maximum'
AND wwResolution = 60000
The initial value at the query start time is the maximum
value found in the phantom cycle before the start time of the
query.
Query 2
In this example, the maximum retrieval mode is used in a
manner equivalent to using the SQL Server MIN aggregate.
Note that the cycle producing the result is the five-minute
phantom cycle just before the query start time.
SELECT TOP 1 DateTime, TagName, CONVERT(DECIMAL(10, 2),
Value) AS Value FROM History
WHERE TagName = 'ReactTemp'
AND DateTime >= '2005-04-11 11:31:00'
AND DateTime <= '2005-04-11 11:31:00'
AND wwRetrievalMode = 'Maximum'
AND wwResolution = 300000
The results are:
Query 3
This example shows how the maximum retrieval mode marks
the QualityDetail column to indicate that a maximum value
is returned based on an incomplete cycle. In this case, an
incomplete cycle is a cycle that either contained periods with
no values stored or a cycle that was cut short because the
query end time was located inside the cycle. All values
returned for the QualityDetail column are documented in the
QualityMap table in the Runtime database.
SELECT DateTime, TagName, Value, QualityDetail FROM
History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2005-04-11 11:19:10'
AND DateTime <= '2005-04-11 11:21:10'
AND wwRetrievalMode = 'Maximum'
AND wwResolution = 60000
The sample data points and the results are mapped on the
following chart. Only the data falling between the time start
and end marks at 00:20 and 00:40 (shown on the chart as
dark vertical lines) are returned by the query. The resolution
is set at 10,000 milliseconds.
Integral Retrieval
Integral retrieval calculates the values at retrieval cycle
boundaries by integrating the graph described by the points
stored for the tag. Therefore, it works much like average
retrieval, but it additionally applies a scaling factor. This
retrieval mode is useful for calculating volume for a
particular tag. For example, if one of your tags represents
product flow in gallons per second, integral retrieval allows
you to retrieve the total product flow in gallons during a
certain time period.
Integral retrieval is a true cyclic mode. It returns one row for
each tag in the query for each cycle. The number of cycles is
based on the specified resolution or cycle count.
Integral retrieval only works with analog tags. For all other
tags, normal cyclic results are returned.
Query 1
In this example, the integral is computed for each of five
1-minute long cycles. The wwQualityRule parameter is used
to ensure that only points with good quality are used in the
computation, which means that points with doubtful quality
are discarded. The rules used to determine the returned
OPCQuality are the same as described for a time weighted
average query.
SELECT DateTime, TagName, CONVERT(DECIMAL(10, 2),
Value) AS Flow, OPCQuality, PercentGood FROM History
WHERE TagName = 'FlowRate'
AND DateTime >= '2004-06-07 08:00'
AND DateTime < '2004-06-07 08:05'
AND wwRetrievalMode = 'Integral'
AND wwCycleCount = 5
AND wwQualityRule = 'Good'
Slope Retrieval
Slope retrieval returns the slope of a line drawn through a
given point and the point immediately before it, thus
expressing the rate at which values change.
This retrieval mode is useful for detecting if a tag is changing
at too great a rate. For example, you might have a
temperature that should steadily rise and fall by a small
amount, and a sharp increase or decrease could point to a
potential problem.
The slope retrieval mode can be considered a delta mode.
Apart from the initial value and a value at the query end
time, all returned points are calculated delta points returned
with the timestamp of an actual delta point.
Slope retrieval only works with analog tags. For all other
tags, normal delta results are returned.
All returned values are in chronological order. If multiple
points are to be returned for a particular timestamp, they are
returned in the order in which the tags were specified in the
query.
Query 1
The following query calculates and returns the rate of change
of the ReactTemp tag in °C/second. The initial value in the
Quality column at the query start time shows no value is
located exactly at that time, so the slope returned is the same
as the one returned at the next delta point. (For more
information on initial values, see the section Determining
Cycle Boundaries in the Wonderware Historian Server
Concepts Guide.
At 08:01:17.947 the tag has two delta points, so a slope is
calculated and returned for the first point, while a NULL is
returned at the second one with a special QualityDetail of 17,
indicating that no slope can be calculated as it is either plus
or minus infinite.
SELECT DateTime, TagName, CONVERT(DECIMAL(10, 4),
Value) AS Slope, Quality, QualityDetail FROM History
WHERE TagName = 'ReactTemp'
AND DateTime >= '2005-04-17 08:00'
AND DateTime <= '2005-04-17 08:05'
AND wwRetrievalMode = 'Slope'
The results are:
Counter Retrieval
Counter retrieval allows you to accurately retrieve the delta
change of a tag’s value over a period of time even for tags that
are reset upon reaching a “rollover value.” The rollover value
is defined in the Wonderware Historian for each tag.
This retrieval mode is useful for determining how much of an
item was produced during a particular time period. For
example, you might have an integer counter that keeps track
of how many cartons were produced. The counter has an
indicator like this:
The next value after the highest value that can be physically
shown by the counter is called the rollover value. In this
example, the rollover value is 10,000. When the counter
reaches the 9,999th value, the counter rolls back to 0.
Therefore, a counter value of 9,900 at one time and a value of
100 at a later time means that you have produced 200 units
during that period, even though the counter value has
dropped by 9,800 (9,900 minus 100). Counter retrieval allows
you to handle this situation and receive the correct value. For
each cycle, the counter retrieval mode shows the increase in
that counter during the cycle, including rollovers.
This example has a start time of TC0 and an end time of TC3.
The resolution has been set in such a way that the historian
returns data for three complete cycles starting at TC0, TC1,
and TC2, and an incomplete cycle starting at TC3.
For the queried tag, a total of twelve points are found
throughout the cycles represented by the markers P1 through
P12. Of these points, eleven represent normal analog values.
The point P9 represents a NULL due to an I/O Server
disconnect, which causes a gap in the data between P9 and
P10. Point P12 is not considered because it is outside of the
query time frame.
All points are considered in the counter calculation, but only
the yellow ones are actually used to determine which values
to return to the client. The returned points are PC0, PC1, PC2
and PC3, shown in green at the top to indicate that there is no
simple relationship between them and any of the actual
points.
All cycle values are calculated as the delta change between
the cycle time in question and the previous cycle time, taking
into account the number of rollovers between the two points
in time. The counter algorithm assumes that a rollover
occurred if the current value is lower than the previous value.
The initial value at the query start time (PC1) is calculated
the same way, only based on a phantom cycle before the
query start time.
For example, the formula to calculate PC1 is as follows:
PC1 = n * VR + P6 - P1
where:
n = the number of rollovers that have occurred during the
cycle
VR = the rollover value for the tag
If either n or VR are equal to zero, PC1 is simply the difference
between the values P1 and P6.
In the case of cycle C2, there is no value at the cycle time, so
the NULL value represented by point P9 is returned. In the
case of cycle C3, a NULL is again returned, because there is
no counter value at the previous cycle boundary to use in the
calculation. There must be a full cycle of values in order for
the counter to be calculated.
ValueState Retrieval
ValueState retrieval returns information on how long a tag
has been in a particular value state during each retrieval
cycle. That is, a time-in-state calculation is applied to the tag
value.
This retrieval mode is useful for determining how long a
machine has been running or stopped, how much time a
process spent in a particular state, how long a valve has been
open or closed, and so on. For example, you might have a
steam valve that releases steam into a reactor, and you want
to know the average amount of time the valve was in the
open position during the last hour. ValueState retrieval can
return the shortest, longest, average, or total time a tag
spent in a state, or the time spent in a state as a percentage
of the total cycle length.
When you use ValueState retrieval for a tag in a trend chart,
you must specify single value state for which to retrieve
information. ValueState retrieval then returns one value for
each cycle—for example, the total amount of time that the
valve was in the “open” state during each 1-hour cycle. This
information is suitable for trend display.
If you do not specify a state, ValueState retrieval returns one
row of information for each value that the tag was in during
each cycle. For example, this would return not only the time
a valve was in the “open” state, but also the time it was in the
“closed” state. This information is not suitable for meaningful
display in a regular trend. You can, however, retrieve this
type of information in a query and view it as a table.
Value
ValueState Retrieval
C0 C1 C2 C3
PC0 PC1 PC2 PC3
ON
OFF Gap
1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29
Time
TC0 TC1 TC2 TC3
This example has a start time of TC0 and an end time of TC3.
The resolution has been set in such a way that the historian
returns data for three complete cycles starting at TC0, TC1,
and TC2, and an incomplete cycle starting at TC3. Time is
measured seconds.
A gap in the data occurs in the third cycle due to an I/O
Server disconnect.
The state calculation is based on each cycle, and the values
returned at the query start time are not regular initial
values, but are the resulting values that occur after applying
the algorithm to the last cycle preceding the query range. The
returned points are PC0, PC1, PC2 and PC3, shown in green at
the top to indicate that there is no simple relationship
between the calculated values and any of the actual points.
• For TC3, one row is returned for the “on” state, and one
row is returned for the “off” state. The state was “on” for
single contained time of two seconds between the cycle
boundaries. The state was “off” three times during the
cycle for three seconds completely within the cycle
boundary. An additional row is returned for the NULL
state occurring as a result of the I/O Server disconnect.
The state was NULL for a total of three seconds. The I/O
Server disconnect that “disrupted” the off state is treated
as its own state, thereby changing what would have been
single “off” state instance of five seconds into two
instances of the “off” state for one second each.
Be sure that you use the "<=" operator for ending date/time.
Query 2
The following query finds the maximum time-in-state for the
SteamValve discrete tag in the same time period as in Query
1. Note how both the minimum and maximum values for the
"1" state are very similar, while they are very different for the
"0" state. This is due to the "cut-off" effect.
SELECT DateTime, TagName, vValue, StateTime,
wwStateCalc FROM History
WHERE TagName IN ('SteamValve')
AND DateTime >= '2005-04-17 10:00:00'
AND DateTime <= '2005-04-17 10:05:00'
AND wwCycleCount = 1
AND wwRetrievalMode = 'ValueState'
AND wwStateCalc = 'Max'
DateTime TagName vValue StateTime wwStateCalc
2005-04-17 10:00:00.000 SteamValve 0 107514.0 MAXIMUM
2005-04-17 10:00:00.000 SteamValve 1 43750.0 MAXIMUM
2005-04-17 10:05:00.000 SteamValve 0 107514.0 MAXIMUM
2005-04-17 10:05:00.000 SteamValve 1 43750.0 MAXIMUM
Query 3
The following query returns the total of time in state for a
discrete tag. In this example, the TimeStampRule system
parameter is set to "End" (the default setting), so the
returned values are timestamped at the end of the cycle. The
returned rows represent the time-in-state behavior during
the period starting at 2005-04-13 00:00:00.000 and ending at
2005-04-14 00:00:00.000.
SELECT DateTime, vValue, StateTime, wwStateCalc FROM
History
WHERE DateTime > '2005-04-13 00:00:00.000'
AND DateTime <= '2005-04-14 00:00:00.000'
AND TagName IN ('PumpStatus')
AND wwRetrievalMode = 'ValueState'
AND wwStateCalc = 'Total'
AND wwCycleCount = 1
The results are:
Query 4
The following query returns the percentage of time in state
for a discrete tag for multiple retrieval cycles. The
TimeStampRule system parameter is set to "End" (the
default setting), so the returned values are timestamped at
the end of the cycle. Note that the first row returned
represents the results for the period starting at 2003-07-03
22:00:00.000 and ending at 2003-07-04 00:00:00.000.
The "Percent" time-in-state retrieval mode is the only mode
in which the StateTime column does not return time data.
Instead, it returns percentage data (in the range of 0 to 100
percent) representing the percentage of time in state.
SELECT DateTime, vValue, StateTime, wwStateCalc FROM
History
WHERE DateTime >= '2003-07-04 00:00:00.000'
AND DateTime <= '2003-07-05 00:00:00.000'
AND TagName IN ('PumpStatus')
AND Value = 1
AND wwRetrievalMode = 'ValueState'
AND wwStateCalc = 'Percent'
AND wwCycleCount = 13
The results are:
RoundTrip Retrieval
RoundTrip retrieval is very similar to ValueState retrieval in
that it performs calculations on state occurrences in the
within a cycle period you specify. However, ValueState
retrieval uses the time spent in a certain state for the
calculation, and RoundTrip retrieval uses the time between
consecutive leading edges of the same state for its
calculations.
You can use the RoundTrip retrieval mode for increasing the
efficiency of a process. For example, if a process produces one
item per cycle, then you would want to minimize the time
lapse between two consecutive cycles.
Value
RoundTrip Retrieval
C0 C1 C2 C3
PC0 Round-trip PC1 PC2 PC3
ON
OFF Gap
Round-trip
1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29
Time
TC0 TC1 TC2 TC3
This example has a start time of TC0 and an end time of TC3.
The resolution has been set in such a way that the historian
returns data for three complete cycles starting at TC0, TC1,
and TC2, and an incomplete cycle starting at TC3. Time is
measured seconds.
A gap in the data occurs in the third cycle due to an I/O
Server disconnect.
• For TC3, one row is returned for the “on” state, and one
row is returned for the “off” state. The state was “on” for
single contained time of three seconds between the cycle
boundaries. One row is returned for the “off” state for a
total contained time of seven seconds. (The first
round-trip for the “off” state includes the I/O Server
disconnect for a length of four seconds. The second
round-trip has a length of three seconds.) An additional
row is returned for the NULL state occurring as a result
of the I/O Server disconnect, and the returned value is
NULL because there is no round-trip during the cycle for
it. The I/O Server disconnect that “disrupted” the off state
is treated as its own state, thereby changing what would
have been single “off” state instance of five seconds into
two instances of the “off” state for one second each.
(wwInterpolationType)
Equal Time Intervals)
(wwTimestampRule)
(wwValueDeadband)
(wwTimeDeadband)
Interpolation Type
State Calculation
Time stamp Rule
(wwQualityRule)
Value Deadband
Time Deadband
(wwStateCalc)
Quality Rule
Cyclic Retrieval y y y y*
Delta Retrieval y y y
Full Retrieval y
Interpolated Retrieval y y y y y y
“Best Fit” Retrieval y y y y y
Average Retrieval y y y y y y
Minimum Retrieval y y y y
Maximum Retrieval y y y y
Integral Retrieval y y y y y y
Slope Retrieval y y
Counter Retrieval y y y y y
ValueState Retrieval y y y y y y
RoundTrip Retrieval y y y y y y
• Interpolated Retrieval
• Average Retrieval
• Minimum Retrieval
• Maximum Retrieval
• Integral Retrieval
• Counter Retrieval
• ValueState Retrieval
• RoundTrip Retrieval
Note The rowset is guaranteed to contain one row for each tag in
the normalized query at every resolution interval, regardless of
whether a physical row exists in history at that particular instance
in time. The value contained in the row is the last known physical
value in history, at that instant, for the relevant tag.
• Interpolated Retrieval
• Average Retrieval
• Minimum Retrieval
• Maximum Retrieval
• Integral Retrieval
• Counter Retrieval
• ValueState Retrieval
• RoundTrip Retrieval
• Interpolated
• BestFit
• Min
• Max
• Average
• Integral
• Counter
• ValueState
• RoundTrip
Query 1
This query specifies to only return data that changed during
a 5 second time deadband.
SELECT DateTime, TagName, Value
FROM History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2001-12-09 11:35'
AND DateTime <= '2001-12-09 11:37'
AND wwRetrievalMode = 'Delta'
AND wwTimeDeadband = 5000
The results are:
DateTime TagName Value
2001-12-09 11:35:00.000 SysTimeSec 0
2001-12-09 11:35:06.000 SysTimeSec 6
2001-12-09 11:35:12.000 SysTimeSec 12
2001-12-09 11:35:18.000 SysTimeSec 18
2001-12-09 11:35:24.000 SysTimeSec 24
2001-12-09 11:35:30.000 SysTimeSec 30
2001-12-09 11:35:36.000 SysTimeSec 36
2001-12-09 11:35:42.000 SysTimeSec 42
2001-12-09 11:35:48.000 SysTimeSec 48
2001-12-09 11:35:54.000 SysTimeSec 54
2001-12-09 11:36:00.000 SysTimeSec 0
2001-12-09 11:36:06.000 SysTimeSec 6
2001-12-09 11:36:12.000 SysTimeSec 12
2001-12-09 11:36:18.000 SysTimeSec 18
2001-12-09 11:36:24.000 SysTimeSec 24
2001-12-09 11:36:30.000 SysTimeSec 30
2001-12-09 11:36:36.000 SysTimeSec 36
2001-12-09 11:36:42.000 SysTimeSec 42
2001-12-09 11:36:48.000 SysTimeSec 48
2001-12-09 11:36:54.000 SysTimeSec 54
2001-12-09 11:37:00.000 SysTimeSec 0
Query 2
This query specifies to only return data that changed during
a 4900 millisecond time deadband.
SELECT DateTime, TagName, Value
FROM History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2001-12-09 11:35'
AND DateTime <= '2001-12-09 11:37'
AND wwRetrievalMode = 'Delta'
AND wwTimeDeadband = 4900
Query 3
This query specifies to only return data that changed during
a 2000 millisecond time deadband.
SELECT DateTime, TagName, Value
FROM History
WHERE TagName IN ('SysTimeSec','SysTimeMin')
AND DateTime >= '2001-12-09 11:35'
AND DateTime <= '2001-12-09 11:36'
AND wwRetrievalMode = 'Delta'
AND wwTimeDeadband = 2000
Query 1
This query specifies to return only data that changed by more
than 10 percent of the tag's full engineering unit range.
Using a value deadband of 10 percent equates to an absolute
change of 5.9 for 'SysTimeSec.'
SELECT DateTime, Value
FROM History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2001-12-09 11:35'
AND DateTime <= '2001-12-09 11:37'
AND wwRetrievalMode = 'Delta'
AND wwValueDeadband = 10
Query 2
This query specifies to only return data that changed by more
than 5 percent of the tag's full engineering unit range. Using
a value deadband of 5 percent equates to an absolute change
of 2.95 for 'SysTimeSec.'
SELECT DateTime, Value
FROM History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2001-12-09 11:35'
AND DateTime <= '2001-12-09 11:37'
AND wwRetrievalMode = 'Delta'
AND wwValueDeadband = 5
The results are:
DateTime Value
2001-12-09 11:35:00.000 0
2001-12-09 11:35:03.000 3
2001-12-09 11:35:06.000 6
2001-12-09 11:35:09.000 9
2001-12-09 11:35:12.000 12
2001-12-09 11:35:15.000 15
2001-12-09 11:35:18.000 18
2001-12-09 11:35:21.000 21
2001-12-09 11:35:24.000 24
2001-12-09 11:35:27.000 27
2001-12-09 11:35:30.000 30
2001-12-09 11:35:33.000 33
2001-12-09 11:35:36.000 36
2001-12-09 11:35:39.000 39
2001-12-09 11:35:42.000 42
2001-12-09 11:35:45.000 45
2001-12-09 11:35:48.000 48
2001-12-09 11:35:51.000 51
2001-12-09 11:35:54.000 54
2001-12-09 11:35:57.000 57
2001-12-09 11:36:00.000 0
2001-12-09 11:36:03.000 3
2001-12-09 11:36:06.000 6
2001-12-09 11:36:09.000 9
2001-12-09 11:36:12.000 12
2001-12-09 11:36:15.000 15
2001-12-09 11:36:18.000 18
2001-12-09 11:36:21.000 21
2001-12-09 11:36:24.000 24
2001-12-09 11:36:27.000 27
2001-12-09 11:36:30.000 30
2001-12-09 11:36:33.000 33
2001-12-09 11:36:36.000 36
2001-12-09 11:36:39.000 39
2001-12-09 11:36:42.000 42
2001-12-09 11:36:45.000 45
2001-12-09 11:36:48.000 48
2001-12-09 11:36:51.000 51
2001-12-09 11:36:54.000 54
2001-12-09 11:36:57.000 57
2001-12-09 11:37:00.000 0
For example:
SELECT DateTime, Value, Quality, QualityDetail,
OPCQuality, wwVersion FROM History
WHERE TagName IN ('PV')
AND DateTime >= '2005-04-17 11:35:00'
AND DateTime <= '2005-04-17 11:36:00'
AND wwRetrievalMode = 'Delta'
AND wwVersion = 'Latest'
The results are:
• Average Retrieval
• Integral Retrieval
• End: The value for a given cycle is stamped with the cycle
end time. For example, in the following illustration of a
cyclic query, the following values are returned at the
cycle boundaries:
• At TC0: P1, because it is the last value in the
“phantom” cycle ending at TC0. Because the End
timestamp rule is used, the value is timestamped at
TC0.
• At TC1: P7, because it falls on the cycle boundary. In
cyclic mode, if there is a value right on the cycle
boundary, it is considered to belong to the cycle before
the boundary. In this case, this is the cycle starting at
TC0 and ending at TC1, and because the End
timestamp rule is used, the value is timestamped at
TC1.
• Average Retrieval
• Integral Retrieval
• Counter Retrieval
• ValueState Retrieval
• RoundTrip Retrieval
When you combine the same OPC quality then that OPC
quality will be returned. However, when there is no good
point in a cycle for cyclic modes such as Integral, Average,
Counter, or AnalogSummary, the returned NULL value will
have an OPC quality of 0 and a Quality Detail of 65536,
regardless of combined qualities.
SELECT TagName, StartDateTime, EndDateTime, OPCQuality,
PercentGood, wwRetrievalMode, first
FROM AnalogSummaryHistory
WHERE TagName = 'F0R5'
AND StartDateTime >= '2009-09-12 00:20'
AND EndDateTime <= '2009-09-12 00:40'
AND wwResolution = 10000
AND wwRetrievalMode = 'Cyclic'
If you run this query against the following sample data:
Outliers
N
s 2 weighted = ? wi (x -µ *)
i
2
i=1
• ToDiscrete(2)
• ToDiscrete(2, >=)
• ToDiscrete(, >=)
• ToDiscrete(>=)
The cutoff value holds the value that signifies the boundary
between values that are to be interpreted as OFF and values
that are to be interpreted as ON.
The operator parameter controls the value range relative to
the cutoff value to convert to the ON value and vice versa.
NULLs encountered in the analog value stream are copied
unchanged to the discrete value stream. The quality of each
discrete point is copied from the analog point that causes its
production. However, the quality detail for values modified
with this filter will have the QualityDetail flag 0x2000 (value
changed by filter) set. For example, consider the following
ValueState query:
SELECT DateTime, vValue, StateTime, wwFilter
FROM History
WHERE TagName IN ('SysTimeSec')
AND DateTime >= '2008-01-15 15:00:00'
AND DateTime <= '2008-01-15 17:00:00'
AND wwRetrievalMode = 'ValueState'
AND wwStateCalc = 'MinContained'
AND wwResolution = 7200000
AND wwFilter = 'ToDiscrete(29, >)'
Cyclic The last value within the summary period is used. The actual
timestamp of the last value occurrance within the summary
period is used.
Delta The last value within the summary period is used. The actual
timestamp of the last value occurrance within the summary
period is used.
Full The last value within the summary period is used. The actual
timestamp of the last value occurrance within the summary
period is used.
Interpolated The retrieval mode determines the appropriate value to return.
See the following table for how AUTO applies to the value
selection. This is the default value.
Best Fit The first, last, min, and max points from analog summaries are
all considered as analog input points. Best fit analysis is done
with these points. If the analog summary percentage good is not
100%, the cycle is considered to have a NULL.
Average The averages of analog summaries are calculated using the
values from the Average column of the AnalogSummaryHistory
table. Interpolation type is ignored for analog summary values,
and STAIRSTEP interpolation is always used. PercentGood is
calculated by considering the TimeGood of each analog
summary.
If cycle boundaries do not exactly match the summary periods of
the stored analog summaries, the averages and time good are
calculated by prorating the average and time good values for the
portion of the time the summary period overlaps with the cycle.
Quality will be set to 64 (uncertain) if cycle boundaries do not
match summary periods.
If the QualityDetail of any analog summary considered for a
cycle is uncertain (64), the resulting quality is set to 64.
Minimum The first minimum value within the summary period is used.
The actual timestamp of the first minimum value occurrance
within the summary period is used.
Maximum The first maximum value within the summary period is used.
The actual timestamp of the first maximum value occurrance
within the summary period is used.
Integral The integrals of analog summaries are calculated using the
Integral column of the AnalogSummaryHistory table.
Interpolation type is ignored for analog summary values, and
STAIRSTEP interpolation is always used. PercentGood is
calculated by considering the TimeGood of each analog
summary.
If cycle boundaries do not exactly match the summary periods of
the stored analog summaries, the integrals and time good are
calculated by prorating the integral and time good values for the
portion of the time the summary period overlaps with the cycle.
Quality is set to 64 (uncertain) if cycle boundaries do not match
summary periods.
If the QualityDetail of any analog summary considered for a
cycle is uncertain (64), the resulting quality will be set to 64.
Slope The last value within the summary period is used. The actual
timestamp of the last value occurrance within the summary
period is used.
ValueState Cannot be used with analog summary data. No values are
returned.
Counter Cannot be used with analog summary data. No values are
returned.
RoundTrip Cannot be used with analog summary data. No values are
returned.
For an analog summary tag, if any of the data within a
summary period has an OPCQuality other than Good, the
OPCQuality returned will be Uncertain. This is true even for
summary values that are not calculated, such as first, last,
minimum, maximum, and so on. For example, if the
OPCQuality for a last value is actually Good, but there was a
I/O Server disconnect during the summary calculation
period, the OPCQuality for the last value is returned as
Uncertain. A QualityDetail of 202 is used to distinguish
between the original point and the latest point.
Option Results
D F
B
V
A
L
U
E
A C E G
TIME
Slopes A-B, C-D and E-F are rising edges, while slopes B-C,
D-E and F-G are falling edges. The slopes are affected by the
WHERE clause, which is a combination of the
wwEdgeDetection option and the comparison operator used
against the value.
The following table describes the rows that would be
returned for the various edge detection settings:
The query will return only the two values that were greater
than or equal to 50 for the time period specified:
DateTime Value
2001-12-02 10:00:50.000 50
2001-12-02 10:01:50.000 50
Tag Description
1
MyPulse
1
SysPulse
0
00:03:20
00:03:40
00:04:00
00:01:00
00:01:20
00:01:40
00:02:00
00:02:20
00:02:40
00:03:00
The following queries select values of "SysPulse" and
"MyPulse" that have a value of 1 (On) from the History and
WideHistory tables between 12:59 and 1:04 a.m. on December
8, 2001. No edge detection is specified.
Query 1
Query for History.
SELECT DateTime, TagName, Value
FROM History
WHERE TagName IN ('SysPulse','MyPulse')
AND DateTime > '2001-12-08 00:59:00'
AND DateTime <= '2001-12-08 01:04:00'
AND wwRetrievalMode = 'Delta'
AND Value = 1
AND wwEdgeDetection = 'None'
The results are:
DateTime TagName Value
2001-12-08 00:01:00.000 SysPulse 1
2001-12-08 00:01:00.000 MyPulse 1
2001-12-08 00:02:20.000 MyPulse 1
2001-12-08 00:03:00.000 SysPulse 1
2001-12-08 00:03:40.000 MyPulse 1
Query 2
Query for WideHistory.
SELECT * FROM OpenQuery(INSQL, 'SELECT DateTime,
SysPulse, MyPulse FROM WideHistory
WHERE DateTime > "2001-12-08 00:59:00"
AND DateTime < "2001-12-08 01:05:00"
AND SysPulse = 1
AND MyPulse = 1
AND wwRetrievalMode = "Delta"
AND wwEdgeDetection = "None"
')
Query 1
For a query on the History table, if the WHERE clause
criteria specify to return only discrete values equal to 1 (On),
then applying a leading edge detection does not change the
result set.
SELECT DateTime, TagName, Value
FROM History
WHERE TagName IN ('SysPulse','MyPulse')
AND DateTime > '2001-12-08 00:59:00'
AND DateTime <= '2001-12-08 01:04:00'
AND Value = 1
AND wwEdgeDetection = 'Leading'
The results are:
DateTime TagName Value
2001-12-08 00:01:00.000 SysPulse 1
2001-12-08 00:01:00.000 MyPulse 1
2001-12-08 00:02:20.000 MyPulse 1
2001-12-08 00:03:00.000 SysPulse 1
2001-12-08 00:03:40.000 MyPulse 1
Query 2
For a query on the WideHistory table, applying a leading
edge detection requires that the condition only evaluate to
true if both values are equal to 1 (On).
SELECT DateTime, SysPulse, MyPulse FROM
OpenQuery(INSQL, 'SELECT DateTime, SysPulse, MyPulse
FROM WideHistory
WHERE DateTime > "2001-12-08 00:59:00"
AND DateTime <= "2001-12-08 01:04:00"
AND SysPulse = 1
AND MyPulse = 1
AND wwEdgeDetection = "Leading"
')
Query 1
For a query on the History table, if the WHERE clause
criteria specifies to return only discrete values equal to 1
(On), then applying a trailing edge detection is the same as
reversing the WHERE clause (as if Value = 0 was applied).
SELECT DateTime, TagName, Value
FROM History
WHERE TagName IN ('SysPulse','MyPulse')
AND DateTime > '2001-12-08 00:59:00'
AND DateTime <= '2001-12-08 01:04:00'
AND Value = 1
AND wwEdgeDetection = 'Trailing'
The results are:
DateTime TagName Value
2001-12-08 00:01:40.000 MyPulse 1
2001-12-08 00:02:00.000 SysPulse 1
2001-12-08 00:03:00.000 MyPulse 1
2001-12-08 00:04:00.000 SysPulse 1
Query 2
For a query on the WideHistory table, applying a trailing
edge detection returns the boundaries where the condition
ceases to be true (one of the values is equal to 0).
SELECT DateTime, SysPulse, MyPulse FROM
OpenQuery(INSQL, 'SELECT DateTime, SysPulse, MyPulse
FROM WideHistory
WHERE DateTime > "2001-12-08 00:59:00"
AND DateTime <= "2001-12-08 01:04:00"
AND SysPulse = 1
AND MyPulse = 1
AND wwEdgeDetection = "Trailing"
')
The results are:
DateTime SysPulse MyPulse
2001-12-08 00:01:40.000 1 1
2001-12-08 00:04:00.000 1 1
Query 1
SELECT DateTime, TagName, Value
FROM History
WHERE TagName IN ('SysPulse','MyPulse')
AND DateTime > '2001-12-08 00:59:00'
AND DateTime <= '2001-12-08 01:04:00'
AND Value = 1
AND wwEdgeDetection = 'Both'
Query 2
SELECT DateTime, SysPulse, MyPulse FROM
OpenQuery(INSQL, 'SELECT DateTime, SysPulse, MyPulse
FROM WideHistory
WHERE DateTime > "2001-12-08 00:59:00"
AND DateTime <= "2001-12-08 01:04:00"
AND SysPulse = 1
AND MyPulse = 1
AND wwEdgeDetection = "Both"
')
The results are:
DateTime SysPulse MyPulse
2001-12-08 00:01:00.000 1 1
2001-12-08 00:01:40.000 1 1
2001-12-08 00:03:40.000 1 1
2001-12-08 00:04:00.000 1 1
Appendix C
That is:
• The file contains exactly one style collection, represented
by the styleCollection XML element. For more
information, see styleCollection XML Element on
page 811.
In this case, the file only defines one style named My style.
When querying two days of data for a discrete tag using this
style, delta retrieval is used (the first retrieval element in
the first duration element). For an analog tag, cyclic
retrieval with one cycle for every five pixels of the trend
width is used instead (the second retrieval element in the
first duration element). For queries that are shorter than
one day, delta retrieval is used regardless of the tag type (the
only retrieval element in the second duration element).
• 4 hours
• 0 seconds
• 0 seconds
Note You should always define a retrieval type with a tag type of
“All” and a history source of “History.” This serves as a “catch-all”
for tags that aren’t covered by any other retrieval style.
BestFit-5 Best Fit retrieval with one cycle per five pixels.
BestFit-10 Best Fit retrieval with one cycle per ten pixels.
BestFit-15 Best Fit retrieval with one cycle per 15 pixels.
Cyclic (ActiveFactory 9.1) Cyclic retrieval with one cycle per two pixels.
Integral (ad hoc) Integral retrieval for queries longer than 15
minutes. Resolution depends on query duration.
Best-fit retrieval with one cycle per ten pixels for
queries shorter than 15 minutes.
Averages (From Summaries or Tries to retrieve analog averages from summary
Ad Hoc) tables. If no summary data is available, uses
Average retrieval for analog tags and ValueState
retrieval for discrete tags. Resolution depends on
query duration.
Averages (ad hoc) Average retrieval for analog tags and ValueState
retrieval for discrete tags. Resolution depends on
query duration.
Appendix D
Methods
Events
Methods
SetDates2 --
SetDuration2 --
SetQueryType SetQueryType Cannot be used in the InTouch
HMI software. Use the
SetQueryType2 method
instead.
-- SetTimeSpan Cannot be used in the InTouch
HMI software. Use the
SetDates and SetDuration
methods instead.
ShowLicenseManager -- Not applicable in version 9.x.
Events
No changes.
-- Format
ForeColor -- Ambient.
Servers -- Not needed.
-- StartDate
-- TimeDuration
TimeSelector -- Use the time range picker to set a
duration or a custom set of times.
Methods
-- GetStartAndEndTimes
Refresh -- Use RefreshTimes.
RefreshTimes
SetDates -- Use SetStartAndEndTimes.
SetDuration -- Use SetStartAndEndTimes.
-- SetStartAndEndTimes
Events
No changes.
Properties
Wonderware
ActiveFactory 8.5 Historian Client
Software 10.0 Software Comments
Methods
Events
Click -- Ambient.
DblClick -- Ambient.
KeyDown -- Ambient.
KeyPress -- Ambient.
KeyUp -- Ambient.
MouseDown -- Ambient.
MouseMove -- Ambient.
MouseUp -- Ambient.
-- OnFilterChanged
-- OnGroupChanged
-- OnSelectedTabChanged
-- OnServerChanged
-- OnTagsPicked
-- OnTagsSelected
NodeClick Not designed. There is no
need for this behavior.
SingleValueEntry and
aaHistClientSingleValueEntry Comparison
This section provides a comparison for the properties,
methods, and events between the ActiveFactory 8.5
SingleValueEntry object and the Wonderware Historian
Client 10.0 aaHistClientSingleValueEntry object. The tables
only list differences between the two versions. Unless
otherwise noted, properties, methods, and events work the
same way as before.
Properties
BackColor -- Ambient.
BackStyle -- Ambient.
BorderStyle -- Ambient.
Enabled -- Ambient.
Font --
ForeColor -- Ambient.
Methods
InsertValue --
Events
Click -- Ambient.
DblClick -- Ambient.
KeyDown -- Ambient.
KeyPress -- Ambient.
KeyUp -- Ambient.
MouseDown -- Ambient.
MouseMove -- Ambient.
ActiveDataGrid and
aaHistClientActiveDataGrid Comparison
This section provides a comparison for the properties,
methods, and events between the ActiveFactory 8.5
ActiveDataGrid control and the Wonderware Historian
Client 10.0 aaHistClientActiveDataGrid Control.
Properties
Methods
No changes.
Events
No changes.
-- BaseURLAddress
-- Build
-- Domain
-- LoginID
-- LoginTimeout
-- MachineName
-- Name
-- Password
-- PatchLevel
-- QueryTimeout
-- RetainPassword
-- SchemaVersion
-- State
-- TrustedConnection
-- UseHttp
-- VirtualDirectoryName
Methods
-- LogOff
-- LogOn
Events
ServerSatusChanged --
Properties
Methods
-- ApplicationName
-- GetServer
GetStatus --
LogOn -- Applied on a per-server basis.
LogOff -- Applied on a per-server basis.
UnderlyingServerName --
-- Update
UpdateSchemaVersion --
Events
LicenseFailure
-- OnServerAdded
-- OnServerUpdated
-- OnServerRemoved
-- OnServerStateChanged
ServerSatusChanged --
-- DateCreated
-- Description
-- IOAddress
-- MaxRaw
-- MinRaw
-- MinEU
-- MaxEU
-- Message0
-- Message1
-- Mode
-- Name
-- RawType
-- Server
ServerName -- The Server property can be used
to get the name.
TagName -- Use the Name property instead.
TagType -- Us the TypeAsTagType property
instead.
-- Type
-- TypeAsTagType
-- Units
Methods
Tags Object
The ActiveFactory 8.5 Tags object does not have an
equivalent in Wonderware Historian Client 10.0. In most
cases, an array of tags can be used instead. The functionality
provided by this object is provided in Wonderware Historian
Client 10.0 software through the SelectedTagCount and
SelectedTags properties of the aaHistClientTagPicker
control.
Glossary
analog summary Produces summary statistics for analog tags for a recorded
replication interval.
back end Back end is a term that refers to the server in a client/server
architecture. Data retrieval, processing, and storage occur at
the back end, or server. See also server.
binding tags A binding tag consists of a set of tags that you can bind to the
report at run time.
contained name The contained name is the name given to an object with
considerations to its place within the overall object hierarchy.
By default, the contained name is same as that of the tag
CRV CRV is the abbrevation for a curve. The .CRV file contains
the data of the trend curve.
cyclic retrieval Cyclic-based retrieval is the retrieval of stored data for the
given time period based on a specified cyclic retrieval
resolution, regardless of whether or not the value of the
tag(s) has changed. See also delta retrieval, resolution.
cyclic storage Cyclic storage is the storing of analog data based on a time
interval. Cyclic storage writes a record to history at the
specified interval, only if a data change occurred during this
time interval. See also delta storage.
data type A data type specifies what type of information a table column
can hold and how it is stored. There are two sources of data
types: system-supplied data types and user-defined data
types.
discrete A discrete value is a variable which only has two states: '1'
(True, On) or '0' (False, Off). See also message pair.
engineering unit An engineering unit is the unit of measure for a tag. For
example, RPMs, milliseconds, degrees.
event tag An event tag is a name for an event definition in the system.
For example, if you wanted to detect how many times in
history the temperature of tank reached 100 degrees, you
might define an event tag and name it "TankAt100." See also
detector, action, event.
history block A history block is a group of data storage files that are
written in a separate directory identified by a date stamp and
a letter suffix. The Wonderware Historian stores acquired
data to disk in blocks. History blocks are created when the
historian starts, at a designated time interval, or when
manually requested.
initial value Initial values are special values that can be returned from
queries that lie exactly on the query start time, even if there
is not a data point that specifically matches the specified
start time.
join A join is a class of SQL query that queries data from one or
more columns from two or more tables.
leading edge The leading edge is the query return of only rows that are the
first to successfully meet the criteria (return true) after a row
did not successfully meet the criteria (returned false). See
also, edge detection, trailing edge.
live Live is a term that describes data that reflects the most
current value of a tag.
live mode Live mode is the mode in which the data is retrieved
continuously in real time for a fixed duration that is relative
to the current time.
login identification The login identification, or login ID, is a unique name that a
database user uses to log on to the server.
OPC quality The quality of a process value or an event. The quality can be
rated as Good, Bad, Doubtful, or Initial Value.
partial cycle Any cycle that is shortened so the cycle’s duration ends
exactly at the query end time.
phantom cycle A phantom cycle is the name given to the cycle that leads up
to the query start time. It is used to calculate which initial
value to return at the query start time for all retrieval
modes.
process network A process network is the network to which plant floor control
devices are physically attached. Devices on a process network
include PLCs, DCSs, and HMI systems. See also information
system network.
rate of change Rate of change is the rate that a tag value changes during a
defined period of time, usually expressed as a percentage.
raw value A raw value is the value of a data item when it was acquired.
Calculations and conversions may be performed on raw data
before it is used by the Wonderware Historian.
run time Run time is the time during which data is fetched by the
control unit and actual processing is performed in the
arithmetic-logic unit. Also, the time during which a program
is executing.
server name The server name is the name of the server under which the
Wonderware Historian is running. The server name must be
a valid SQL identifier.
storage location The storage location is the directory in which historical data
files are stored.
storage path The storage path is the path to the directory in which
historical data files are stored.
storage rate The storage rate is the time interval at which values for tags
are periodically stored.
summary tag A summary tag contains the calculated data values, on a tier-
2 historian, of information from a source tag on a tier-1
historian. Summary tag types are analog summary tags and
state summary tags.
time interval In the event system, the time interval is the rate at which
configured event detectors check to see if an event has
occurred in history. The time interval is also known as the
scan rate.
trailing edge The trailing edge is the query return only rows that are the
first to fail the criteria (return false) after a row successfully
met criteria (returned true). See also, leading edge, edge
detection.
user name A user name identifies a database user for security purposes.
A user name is assigned a login ID to allow a particular user
access to the database.
Index
function editing 41
defined 844 renaming 42
functions 219
arguments 333 H
converting to values 220 Handle 556
copying 226 Height 661
editing 220 HelpContextID 661
error messages 346 HideCaption 522
manually editing 224 HideCurrentTag 419
manually inserting 221 HideDateTimeModeTabs 597
refreshing 220 HideFieldLabels 598
HideStatusBar 598
G hiding/showing in a trend, tags 72
general options, configuring 313 hiding/showing tags, trend 72
general properties, configuring 126 hierarchical name 46, 56
GetDictionaryPath 654 HighlightCurrentTag 419
GetInstallPath 654 highlighting, tags 71
GetLastError 641 historical data 57
GetMenuItemEnabled 458 historical data, displaying in "replay"
GetServer 581 mode 74
GetStartAndEndTimes 539 history data over a LAN,
GetTagColor 458 aaHistClientActiveDataGrid control 567
GetTagFormat 459 history data retrieval functions,
migration 346
GetTagOffsetMS 459
history values
GetTagPenStyle 460
querying 186
GetTagPenWidth 460
retrieving 245
GetTagPrecision 461
history version 767
GetTagValAtX1 461
HistorySource 420
GetTagValAtX2 462
HTTP 27
GetTagVisible 462
HTTP access 31, 32, 36
getting started
HTTP access, using 31
controls 379
Human-Machine Interface (HMI)
Wonderware Historian Client
Query 161 defined 845
Wonderware Historian Client Trend 50 Hypertext Transfer Protocol (HTTP)
GetToolbarButtonEnabled 463 defined 845
GotFocus 668
GraphStack 463 I
grid, showing/hiding 92 I/O
GridColor 418 defined 845
GridHorizontal 418 I/O Server, querying 193
GridVertical 419 in applications, SQL statements 35
GridVisible 419 Index 662
groups 40 initialization
adding 41 defined 845
adding a tag 41 Insert 613
creating 41 InsertButtonDisable 598
deleting 41 InsertButtonVisible 598
quality 94, 174, 184, 187, 195, 203, 244, 266 RealTimeRate 430
defined 847 record
retrieval rule 776 defined 847
quality calculation, scatter plots 141 Recordset 505
quality rule 776 referencing in a query, formatting
QualityDetail 602 options 306
QualityDetailFieldDisable 603 Refresh 511, 614
QualityDetailFieldVisible 603 refresh,
QualityFieldDisable 603 aaHistClientActiveDataGrid 552, 556
QualityFieldVisible 604 RefreshData 466
query RefreshFrequency 556
creating 167, 181 RefreshFrequency property 556
defined 847 refreshing
editing 368 data grid 548
favorites 185 functions 220
file sheet 221
opening 166 trend chart 58
saving 166 refreshing the graph, trend 58
time options for 319 RefreshTags 527
types 169 RefreshTimes 540
common tabs for 208 registry
query files 166 defined 847
QueryChanged 515 relational databases
QueryFont 504 defined 848
querying relative time 107, 109, 110
aggregate values 170 relative time, time offsets 109
alarm limits 175 relative, time 109
annotations 179 reliability 35
event snapshot 183 RememberEnteredTags 604
history values 186 remote
live values 194 defined 848
queryingnumber of , tags 195 Remove 581
QueryString 504 RemoveServer 466
QueryTimeout 429, 575 RemoveTag 467, 511
removing, server connections 31
R renaming, groups 42
Random Access Memory (RAM) replication latency
defined 847 defined 848
rate of change Report 20
defined 847 report documents
raw value 187, 195, 205, 237, 621 opening 359
defined 847 running 359
RawType 623 saving 360, 361
real saving as a report template 361
defined 847 saving as an HTML file 363
real-time Report object
defined 847 methods 652
RealTimeMode 429 properties 651