Trend Client
Trend Client
Client
Revision A
Last Revision: 1/12/09
Copyright
© 2009 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 information contained herein. Although every precaution has been
taken in the preparation 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
agreement. 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............................................ 9
Documentation Conventions ..............................................9
Technical Support ...............................................................9
[Link] ...............................................................53
[Link] ...........................................................53
[Link] ....................................................................54
[Link] ..................................................................54
[Link] ...................................................................54
PenSelectorHeight......................................................55
PenUQRelativeOpacity ..............................................55
PenUQRelativeThickness ..........................................55
[Link] ........................................56
[Link] .................................................56
[Link] ......................................57
[Link] ..............................................57
[Link].....................................................58
[Link] ............................................58
[Link] .....................................................58
[Link] ................................................59
[Link] ...................................................59
[Link] .................................59
[Link] ......................................59
[Link] ....................................60
[Link] ...........................................60
PlotImage ....................................................................60
ShowContextMenu .....................................................60
SuppressErrors...........................................................61
[Link].............................................61
[Link]................................................61
[Link] .............................................62
[Link] ...........................................62
[Link].............................................62
[Link]................................................63
[Link] .............................................63
[Link] ...........................................63
[Link] ..................................................64
[Link].....................................64
[Link] ................................................64
[Link] ..............................................65
TimeSelector ...............................................................65
[Link] .........................................66
[Link] ...............................................66
[Link] .............................................66
[Link] ......................................67
ToolTipText.................................................................69
TrendVersion ..............................................................69
[Link] ......................................................... 69
[Link] ................................... 69
[Link] ............................................... 70
Visible ......................................................................... 70
Trend Client History Sources ........................................70
[Link] ................................... 71
[Link] ............................................... 71
[Link] ............................................ 71
[Link] ................................. 72
[Link] ....................................... 72
[Link] .................................................... 72
[Link]............................................ 72
[Link]................................................ 73
[Link] ................................................ 73
[Link] ................................................. 73
Trend Client Methods .......................................................74
AddHistorianSource ................................................... 75
AddPen........................................................................ 76
ClearPens.................................................................... 76
DeleteCurrentPen ...................................................... 77
GetHistorianSource.................................................... 77
GetPenValAtX1 .......................................................... 78
GetStartAndEndTimes .............................................. 78
MoveNextPen ............................................................. 79
MovePrevPen.............................................................. 79
RefreshData................................................................ 80
RefreshTimes.............................................................. 80
RemoveHistorianSource............................................. 81
RemovePen ................................................................. 81
ScaleAllPens ............................................................... 82
ScaleAutoAllPens ....................................................... 82
ScaleAutoPen.............................................................. 83
ScaleDownAllPens...................................................... 83
ScaleDownPen ............................................................ 83
ScaleMoveAllPensDown............................................. 84
ScaleMoveAllPensUp ................................................. 84
ScaleMovePenDown ................................................... 84
ScaleMovePenUp........................................................ 85
ScalePen...................................................................... 85
ScaleUpAllPens .......................................................... 86
ScaleUpPen................................................................. 86
SetCurrentPen............................................................ 87
SetDuration ................................................................ 87
SetStartAndEndTimes ...............................................88
[Link] .......................89
[Link] .......................................89
[Link] ........................90
UpdateHistorianSource..............................................91
Trend Client History Sources ........................................91
[Link]...............................................92
[Link] ..........................................92
[Link]....................................................93
[Link] .........................................93
[Link] .............................................94
[Link] ..............................................94
Trend Client Events ..........................................................95
CurrentPenChanged ..................................................95
DatesChanged.............................................................95
MouseClick..................................................................95
PenDisplayChanged ...................................................95
PenlistChanged ..........................................................96
ShutDown ...................................................................96
SizeChanged ...............................................................96
StartUp .......................................................................96
StateChanged .............................................................96
Colors in Trend Client.......................................................97
.NET Colors .......................................................................98
Scripting Differences between Trend Client and
ActiveFactory Trend Control .......................................100
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
Note The InTouch trends are still included as part of the InTouch
HMI.
Chapter 2
Adding a Pen
When you first add a Trend Client to the canvas, no pens are
defined. To show a trend, you must add at least one pen and
configure it so that the system can identify what trend
information to chart. Each pen must have an associated
expression or reference.
To add a pen
1 In the ArchestrA Symbol Editor, double-click the Trend
Client. The Edit Animations dialog box appears with the
pen configuration information in the right pane.
2 Click the Add Row icon on the right side of the Edit
Animations dialog box. A new pen appears in the
configuration panel.
3 In the row for the pen, configure the information for the
new pen.
Show Select the Show box to show the pen in
the trend.
Pen Name Enter the name of the pen. (If you leave
this blank, the pen’s expression is used
as the chart label.)
Expression or Enter an expression or reference. Click
Reference the ellipsis button to show the Galaxy
Browser.
Note For some input boxes on the configuration screens, you can
specify if the configuration is a static value or a reference by
setting the input mode. An input mode icon appears to the left of
these boxes. Use static mode input to specify a literal static value
such as “Temperature” or 3.141. Use reference mode to specify a
reference to an attribute or symbol property such as Tank_001.PV.
You can enclose static string values with double-quotes (such as
“Description:” or “+Tank_001.Desc”) with or without references
in Reference mode. When you are in reference mode, you can also
click the ellipsis button to the right of the box to show a selection
tool such as the Galaxy Browser or the Tag Picker.
Note Ask your administrator what type of user account you must
use to access the server.
3 Click the Add Row icon on the right side of the Edit
Animations dialog box. A new server row appears in the
configuration panel.
4 In Server Name, enter the name of the server to which you
want to connect. You can select from a list of the servers
by clicking the arrow to the right of the box.
Note You can test the connection to the server with the
information you’ve entered by clicking Test Connection. If
necessary, you can edit the information before adding the server
to the list.
Servers pane
Tags pane
Filter pane
• Tags pane
• Filter pane
Category Description
Adding a Group
You can add groups just 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.
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 Perform one of the following:
• Right-click on the group and then click RENAME.
• Press F2.
3 Type a new name for the group and press ENTER.
2 Click OK.
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, enter the string to match for the
tagname.
3 In the Description box, enter the string to match for the
description.
4 In the I/O Address box, enter 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.
6 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.”
7 The Exact match option does not apply to the I/O address.
8 Click Apply to apply the filter criteria.
9 Click Clear to clear the Filter pane.
To select multiple tags in the list, hold Ctrl and/or Shift while
clicking.
To view only tags of a certain type, click the appropriate tab
at the bottom of the pane.
To sort the table by a particular column, click the column
heading.
3 Select Single tag mode to set the trend to single tag mode.
When you initially create a tag list for a trend, all the
tags are included in the display. Setting the trend to
single tag mode allows you to exclude all tags but one
from appearing in the trend chart, without removing
them from the tag list.
Clear Single tag mode to view multiple tags again in the
chart.
4 Click Background Color to configure the main color of the
background of the plot area. If you are using a gradient
fill, this is the starting color for the gradient.
5 Click End color to select the ending color for the gradient.
The gradient starts with the main color and fades to the
gradient end color.
6 Click Type to specify the starting point for the flow of the
gradient. Valid values are LeftRight, TopBottom, Center,
DiagonalLeft, DiagonalRight, HorizontalCenter, and
VerticalCenter. For example, if you select green as main
color, white as the gradient end color, and center as the
gradient type, the center of the chart is green and fades
to white towards the surrounding edges.
7 Click Border Color to configure the color of the border for
the entire chart area.
8 Select Allow highlight pen to highlight the pen. Configure
the color and width to be used for pen highlighting.
Highlight color Click to select or configure a color
for highlighting the pen curve.
Width Specify how wide (in pixels) a
highlighted curve should be.
12 Click OK.
3 Select the Show pen selector check box to show the legend
or list of pens at the bottom the trend.
4 Click Trend background color to configure the main color
of the background of the entire chart area.
5 Select Show run-time context menu to show the context
menu when you right-click the trend at run time.
6 Set Decimal Places to the number of decimal places to use
in the trend.
7 Set Labels to All to display the chart label, X and Y axis
scales, and cursor information. or None to suppress the
labels in the plot area
11 Set Trend Duration. You can set the trend duration for a
maximum period of 2 years. All time durations are
calculated backward from an end date of the current time
(except for the options “Yesterday” and “Previous Hour”).
You can pick a duration from the list or type a specific
duration in the list box. The time notation is [DD]
HH:MM:SS:fff, where DD=days, HH=hours,
MM=minutes, SS=seconds, and fff=[Link] edit a
value in the duration list box, use the arrow keys on your
keyboard to position the mouse cursor to the left of the
number you want to change, then type the new number.
You can only change the duration and not the start and
end time.
12 Click OK.
4 Enter a script for this event in the window. You can use
the editor buttons to gather information and parameters.
Chapter 3
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• HistorySources
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• PenSelectorHeight
• PenUQRelativeOpacity
• PenUQRelativeThickness
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• PlotImage
• ShowContextMenu
• SuppressErrors
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• TimeSelector
• [Link]
• [Link]
• [Link]
• [Link]
• ToolTipText
• TrendVersion
• [Link]
• [Link]
• [Link]
• Visible
[Link]
The [Link] property is a read-write Boolean
property that suspends or allows the chart refresh while
multiple pens are added to the chart.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is FALSE (allows the chart refresh while
multiple pens are added to the chart).
You can set this property to TRUE, then add multiple
properties 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 pens you
have added.
[Link]
The [Link] property is a read-write
property that gets or sets the background color of the chart.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is white.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write Boolean property
that stops (TRUE) or starts (FALSE) the trend display from
updating.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is FALSE, which continues (or resumes) the
trend display updates. Setting the property to TRUE stops
the trend display updates.
[Link]
The [Link] property is a read-write
integer property that freezes the chart from live updates for
the specified duration in milliseconds.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 600000 (10 minutes).
[Link]
The [Link] property is a read-write Boolean
property that shows or hides the pen list in the chart.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is TRUE.
[Link]
The [Link] property is a read-write integer property
that sets the visibility of labels (chart label, X and Y axes
scales, and cursor information) in the chart. Supported
options are All and None (where 0 = All and 1 = None).
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0 (All).
[Link]
The [Link] property is a read-write integer
property that gets or sets the number of decimal places to
show by default for the data value.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0.
[Link]
The [Link] property is a
read-write integer property that refreshes the entire chart at
every specified number of intervals. (The interval is specified
with the [Link] property.) If the value is '0'
the chart only adds new data to the chart; however, it does
not refresh the data already present on the chart.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 100 intervals.
[Link]
The [Link] property is a read-write integer
property that gets or sets the data retrieval mode for
retrieving the data from Wonderware Historian at the chart
level. Supported options are cyclic and full (where 0 = cyclic
and 2 = full).
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0 (cyclic).
[Link]
The [Link] property is a read-write integer
property that gets or sets the chart refresh interval in
milliseconds.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 1000.
HistorySources
The HistorySources property is a read-only object property
that gets a list of history sources. For more information about
the HistorySources properties, see Trend Client History
Sources on page 70.
Syntax
Result = HistorySources;
Remarks
No default.
[Link]
The [Link] property is a read-write property that gets or
sets the color of the currently selected pen.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is color.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-only integer property that
gets the number of the pens in the pen list.
Syntax
Result = [Link];
Remarks
The default is 0.
[Link]
The [Link] property is a read-write string property
that gets or sets the description of the currently selected pen.
Syntax
[Link] = string;
Result = [Link];
Remarks
If the pen expression was configured by browsing to the
attribute in the Attribute Browser, the default value is
obtained from the corresponding description property of the
associated ArchestrA attribute. Otherwise, the default value
is blank if the pen expression is manually configured.
[Link]
The [Link] property is a read-write string property
that gets or sets the expression of the currently selected pen.
The expression can be a Galaxy attribute, InTouch tag
reference, or an expression.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is blank.
[Link]
The [Link] property is a read-write integer property
that gets or sets the format of the current pen (where 0 is
decimal and 1 is scientific).
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0 (decimal).
[Link]
The [Link] property is a read-only string
property that gets the history source of the currently selected
pen. For more information about the HistorySources
properties, see Trend Client History Sources on page 70.
Syntax
Result = [Link];
Remarks
The default is blank.
[Link]
The [Link] property is a read-write string
property that gets or sets the historical tag name for the
currently selected pen.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is blank.
[Link]
The [Link] property is a read-only integer property that
gets the index of the currently selected pen, or -1 if no pen is
selected. The array is zero-based.
Syntax
Result = [Link];
Remarks
The default is -1.
[Link]
The [Link] property is a read-write string property that
gets or sets the name of the currently selected pen.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is blank.
[Link]
The [Link] property is a read-write integer property
that gets or sets the decimal precision of the currently
selected pen.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is the trend chart's pen precision property.
[Link]
The [Link] property is a read-write enumerated
property that gets or sets the mode for retrieving the data
from Wonderware Historian of the currently selected pen.
Supported options are:
0 = Cyclic
2 = Full
12 = ApplicationSetting
Syntax
[Link] = enum;
Result = [Link];
Remarks
The default is the trend chart's retrieval mode property (12).
[Link]
The [Link] property is a read-write integer property that
gets or sets the line style of the currently selected pen.
Valid values are:
0 = Solid
1 = Dash
2 = DashDot
3 = DashDotDot
4 = Dot
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0.
[Link]
The [Link] property is a read-write double property
that gets or sets the high value of the value range to be used
for the currently selected pen.
Syntax
[Link] = double;
Result = [Link];
Remarks
If the pen expression was configured by browsing to the
attribute in the Attribute Browser, the default value is set to
the corresponding TrendHi property of the associated
ArchestrA attribute. Otherwise, the default value is 100 if
the pen expression is manually configured.
[Link]
The [Link] property is a read-write double property
that gets or sets the low value of the value range to be used
for the currently selected pen.
Syntax
[Link] = double;
Result = [Link];
Remarks
If the pen expression was configured by browsing to the
attribute in the Attribute Browser, the default value is set to
the corresponding TrendLo property of the associated
ArchestrA attribute. Otherwise, the default value is 0 if the
pen expression is manually configured.
[Link]
The [Link] property is a read-write integer property
that gets or sets the plot type of the currently selected pen.
0 = Point
1 = Line
2 = StepLine
3 = Auto
When [Link] is set to Auto and there is no Historian
default available, the Trend Client uses a plot type of Line for
real tags and StepLine for integer tags.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 3.
[Link]
The [Link] property is a read-write string property that
gets or sets the units of the currently selected pen.
Syntax
[Link] = string;
Result = [Link];
Remarks
If the pen expression was configured by browsing to the
attribute in the Attribute Browser, the default value is set to
the corresponding EngUnits property of the associated
ArchestrA attribute. Otherwise, the default value is blank if
the pen expression is manually configured.
[Link]
The [Link] property is a read-write Boolean property
that gets or sets the visible property for the currently
selected pen.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is TRUE (the pen is visible on the chart). When
this property is set to FALSE, the pen is hidden from the
chart display.
[Link]
The [Link] property is a read-write integer property that
gets or sets the line width (from 1 to 10) of the currently
selected pen.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 1, when a pen is added to the pen list. If there
is no pen in the pen list, the default is 0.
PenSelectorHeight
The PenSelectorHeight property is a read-write integer
property that gets or sets the height of the pen selector in
pixels.
Syntax
PenSelectorHeight = int;
Result = PenSelectorHeight;
Remarks
The default is 97.
PenUQRelativeOpacity
The PenUQRelativeOpacity property is a read-write integer
property that gets or sets the line’s relative opacity when the
data quality is uncertain.
The two properties, relative opacity and relative thickness,
create a visual distinction for values with uncertain quality.
When the pen type is point, no visual change is shown on the
trend.
Syntax
PenUQRelativeOpacity = int;
Result = PenUQRelativeOpacity;
Remarks
The default is 25%.
For example, if the pen has an opacity of 80% and the data
quality is “uncertain,“ then the Trend Client calculates the
opacity of the pen as 80% x 25% = 20% opaque.
PenUQRelativeThickness
The PenUQRelativeThickness property is a read-write
integer property that gets or sets the line's relative thickness
when data quality is uncertain.
The two properties, relative opacity, and relative thickness,
create a visual distinction for values with uncertain quality.
When the pen type is point, no visual change is shown on the
trend.
Syntax
PenUQRelativeThickness = int;
Result = PenUQRelativeThickness;
Remarks
The default is 200%.
For example, if a line is 1 pixel wide and 200% thick, then the
Trend Client calculates the thickness of the line with a data
quality of “uncertain“ as 1 pixel x 200% = 2 pixels wide.
[Link]
The [Link] property is a read-write
property that gets or sets the color of the plot area of the
graph.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is white.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write property
that gets or sets the color of the plot area's border.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is black.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write
property that gets or sets the gradient end color of the plot
area of the graph.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is white.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write integer
property that gets or sets the gradient type of the plot area of
the graph.
0 = None (no gradient)
1 = LeftRight
2 = TopBottom
3 = Center
4 = DiagonalLeft
5 = DiagonalRight
6 = HorizontalCenter
7 = VerticalCenter
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0.
[Link]
The [Link] property is a read-write property
that gets or sets the color of grid.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is grey.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write
Boolean property that shows or hides the horizontal grid.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is TRUE.
[Link]
The [Link] property is a read-write integer
property that gets or sets the grid line style.
0 = Solid
1 = Dash
2 = DashDot
3 = DashDotDot
4 = Dot
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0.
[Link]
The [Link] property is a read-write Boolean
property that shows or hides the vertical grid.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is TRUE.
[Link]
The [Link] property is a read-write integer
property that gets or sets the width of the grid. Allowed
values are 1 to 10.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 1.
[Link]
The [Link] property is a read-write
Boolean property that highlights the currently selected pen.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is TRUE.
[Link]
The [Link] property is a read-write
property that gets or sets the pen’s highlight color.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is yellow.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write
integer property that gets or sets the width of the pen’s
highlight color. Allowed values are 1 to 5.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 2.
[Link]
The [Link] property is a read-write
Boolean property that sets whether to show only the
currently selected pen or all pens.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is FALSE.
PlotImage
The PlotImage property is a read-write string property that
gets or sets the plot background image for the chart.
Syntax
PlotImage = string;
Result = 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.
The default is blank.
ShowContextMenu
The ShowContextMenu property is a Boolean property that
shows the context menu in run time.
Syntax
ShowContextMenu = bool;
Result = ShowContextMenu;
Remarks
The default is TRUE.
SuppressErrors
The SuppressErrors property is a read-write Boolean
property that suppresses or allows error messages.
Syntax
SuppressErrors = bool;
Result = SuppressErrors;
Remarks
The default is TRUE.
[Link]
The [Link] property is a read-write
property that gets or sets the color of the left time axis
cursor.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is red.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write property
that gets or sets the time position of the left time axis cursor.
Syntax
[Link] = datetime;
Result = [Link];
Remarks
No default.
[Link]
The [Link] property is a read-write integer
property that gets or sets the style of the left time axis
cursor. Valid values are:
0 = Solid
1 = Dash
2 = DashDot
3 = DashDotDot
4 = Dot
Syntax
TimeAxis.Cursor1Style = int;
Result = TimeAxis.Cursor1Style;
Remarks
The default is 0.
[Link]
The [Link] property is a read-write
integer property that gets or sets the width of the left time
axis cursor. Allowed values are 1 to 10.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 1.
[Link]
The [Link] property is a read-write
property that gets or sets the color of the right time axis
cursor.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is blue.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write property
that gets or sets the time position of the right time axis
cursor.
Syntax
[Link] = datetime;
Result = [Link];
Remarks
No default.
[Link]
The [Link] property is a read-write integer
property that gets or sets the style of the right time axis
cursor. Valid values are:
0 = Solid
1 = Dash
2 = DashDot
3 = DashDotDot
4 = Dot
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0.
[Link]
The [Link] property is a read-write
integer property that gets or sets the width of the right time
axis cursor. Allowed values are 1 to 10.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 1.
[Link]
The [Link] property is a read-write property
that gets or sets the color of the time axis labels.
Syntax
[Link] = color;
Result = [Link];
Remarks
The default is black.
Color is a .NET Framework data type. You can use various
color methods to set the color, such as a predefined color
name, FromARGB(), FromKnownColor(), and FromName().
For a list of the .NET color names and the corresponding
hexadecimal codes, see .NET Colors on page 98. For more
information on the color methods, see the Microsoft
documentation for .NET Framework development.
[Link]
The [Link] property is a read-write
integer property that gets or sets the number of grid lines
that appear between each value shown on time axis. The
valid range is 1 to 20.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 3.
[Link]
The [Link] property is a read-write integer
property that gets or sets the number of time labels that are
shown along the time axis. The valid range is 2 to 15.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 6.
[Link]
The [Link] property is a read-write Boolean
property that shows or hides the time axis cursors.
Syntax
[Link] = bool;
Result = [Link];
Remarks
The default is FALSE.
TimeSelector
The TimeSelector property is a read-only property that gets
the Time Range Picker object used in the Trend Client. You
can use it in scripting to shorten the code using its properties
and methods.
For the individual properties and methods, see the following
properties, or the methods starting at
[Link] on page 89.
Example 1
dim TRP as object;
TRP = [Link];
Timeselect = TRP;
StartDate = [Link];
EndDate = [Link];
duration = [Link];
Example 2
dim TRP as object;
TRP = [Link];
[Link](StartDate, EndDate, Duration);
Remarks
The return value is a TimeRangePicker.
[Link]
The [Link] property is a read-write
integer property that gets the time duration measured in
milliseconds.
The start time of the Trend Client ([Link])
is calculated as the end time ([Link]) minus
the new time duration ([Link]).
When you set the value of the [Link]
property, the [Link] property is set to
0.
Syntax
result = [Link];
[Link] = Value;
Remarks
The default value is 300000.
[Link]
The [Link] property is a read-only string
property that gets the end date and time of the Trend Client.
The default value is the time the Trend Client is placed on
the canvas. If the Update to Current Time option is enabled,
the [Link] property is updated with the
current time.
Note To set the end date and time of the Trend Client, use the
[Link] method.
Syntax
result = [Link];
[Link]
The [Link] property is a read-only string
property that gets the start date and time of the Trend
Client.
The default value is the time the Trend Client is placed on
the canvas minus the duration.
Note To set the start date and time of the Trend Client, use the
[Link] method.
Syntax
result = [Link];
[Link]
The [Link] property is a read-write
enumerated property that gets or sets the enumerated
duration of the time axis of the chart.
Syntax
[Link] = enum;
Result = [Link];
Value Description
0 Custom
1 The last minute.
2 The last five minutes.
3 The last ten minutes.
4 The last 15 minutes.
5 The last 30 minutes.
6 The last hour.
7 The last two hours.
8 The last four hours.
9 The last eight hours.
10 The last 12 hours.
11 The last 24 hours.
12 The last two days.
13 The last week.
14 The last two weeks.
15 The last month.
16 The last three months.
17 One minute.
18 Five minutes.
19 Ten minutes.
Value Description
20 15 minutes.
21 30 minutes.
22 One hour.
23 Two hours.
24 Four hours.
25 Eight hours.
26 12 hours.
27 24 hours.
28 Two days.
29 One week.
30 Two weeks.
31 One month.
32 Three months.
33 Yesterday: [Link] of the previous day to
[Link] of the current day.
34 Current day: [Link] of the current day to the
current time.
35 Previous hour: The start of the previous hour to
the start of the current hour.
36 Current hour: The start of the current hour to
the current time.
Syntax
result = [Link];
[Link] = Value;
Example
[Link] = 5;
// The trend is now set to show the last 30 minutes.
Remarks
The default is 18 (5 minutes).
ToolTipText
The ToolTipText property is a read-write string property that
gets or sets the pop-up text that appears when the mouse is
hovered over the chart at run time.
Syntax
ToolTipText = string;
Result = ToolTipText;
Remarks
The default is blank.
TrendVersion
The TrendVersion property is a read-only string property
that gets the version of the trend.
Syntax
Result = TrendVersion;
Remarks
The return value is 1.0.0 for the first release.
[Link]
The [Link] property is a read-write integer
property that gets or sets which labels are shown on the
value axis.
0 = MultipleScales
1 = SingleScale
2 = ValuesAtCursor
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 0.
[Link]
The [Link] property is a read-write
integer property that gets or sets the number of grid lines
that appear between each value shown along the Y-axis. The
valid range is 1 to 20.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 2.
[Link]
The [Link] property is a read-write integer
property that gets or sets the number of value labels that are
shown along the Y-axis. The valid range is 2 to 15.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is 6.
Visible
The Visible property is a read-write Boolean property that
shows or hides the Trend Client at run time.
Syntax
Visible = bool;
Result = Visible;
Remarks
The default is TRUE.
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
[Link]
The [Link] property is a read-write
string property that gets or sets the authentication mode for
the connection to the server. Available options are SQL
Server, Windows Account, and Windows Integrated.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is Windows Integrated.
[Link]
The [Link] property is a read-write string
property that gets or sets the domain name for the
connection to the Wonderware Historian.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is an empty message value ( "" ).
This property is not applicable if you are using an InTouch
LGH file as the data source.
[Link]
The [Link] property is a read-write string
property that gets and sets the password for the connection
to the server.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is wwUser.
[Link]
The [Link] property is a read-write
Boolean property that indicates whether the password is
stored in persistent storage.
Syntax
[Link] = int;
Result = [Link];
Remarks
The default is TRUE (the password is stored in persistent
storage).
This property is not applicable if you are using an InTouch
LGH file as the data source.
[Link]
The [Link] property is a read-write
string property that gets or sets the name of the history
source.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is an empty message value ( "" ).
[Link]
The [Link] property is a read-write string
property that gets or sets the type of the history source.
Possible values are “InSQL” (Wonderware Historian Server)
and “LGH” (InTouch History Files).
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is “InSQL.”
[Link]
The [Link] property is a read-write string
property that gets or sets the UNC path of the InTouch Log
History/LGH file.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is an empty message value ( "" ).
[Link]
The [Link] property is a read-write string
property that gets and sets the user ID for the Wonderware
Historian.
Syntax
[Link] = string;
Result = [Link];
Remarks
The default is wwUser.
This property is not applicable if you are using an InTouch
LGH file as the data source.
[Link]
The [Link] property is a read-only integer
property that shows the number of history sources
configured.
Syntax
Result = [Link];
Remarks
The default is 0.
[Link]
The [Link] property is a read-only array
property that shows the array of history source names.
Syntax
Result = [Link];
Remarks
No default.
• ClearPens
• DeleteCurrentPen
• GetHistorianSource
• GetPenValAtX1
• GetStartAndEndTimes
• MoveNextPen
• MovePrevPen
• RefreshData
• RefreshTimes
• RemoveHistorianSource
• RemovePen
• ScaleAllPens
• ScaleAutoAllPens
• ScaleAutoPen
• ScaleDownAllPens
• ScaleDownPen
• ScaleMoveAllPensDown
• ScaleMoveAllPensUp
• ScaleMovePenDown
• ScaleMovePenUp
• ScalePen
• ScaleUpAllPens
• ScaleUpPen
• SetCurrentPen
• SetDuration
• SetStartAndEndTimes
• [Link]
• [Link]
• [Link]
• UpdateHistorianSource
AddHistorianSource
AddHistorianSource method adds a new history source.
Example
Dim b as object;
b = [Link]("idc_insql12", "InSQL");
Syntax
[Result =] [Link](string
HistorySourceName, string Type);
Parameters
HistorySourceName
The name of the history source.
Type
The type of history source "InSQL" or "InTouch".
Return Value
If there is already a server with the given name in the list,
the object for that server is returned. Otherwise, a new
server with the given name is added to the list and the object
for the new server is returned.
AddPen
The AddPen method adds a named pen to the trend.
Examples
dim b as boolean;
b = [Link]("MyPen01","UserDefined_001.Value",
"InSQL01","UserDefined_001.Value", 1);
b = [Link]("MyPen02","InTouch:$Second",
"InSQL01","$Second", 1);
b = [Link]("MyPen03",
"MyContainer.InletPump1+MyContainer.InletPump2",””,”
”,1);
Syntax
[Result=] AddPen(string PenName, string TagName, string
HistorySource, string HistoryTagName, int
HistoryTagType);
Parameters
PenName
The name of the pen to add.
TagName
The name of the tag associated with the pen being added.
HistorySource
The history source for the pen being added.
HistoryTagName
The name of the history tag for the pen being added.
HistoryTagType
The type of history tag for the pen being added: 1 for
Wonderware Historian or 3 for LGH.
Return Value
Returns TRUE if the pen was successfully added; otherwise,
returns FALSE.
ClearPens
The ClearPens method removes all pens from the trend.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the pens were successfully deleted from the
trend; otherwise, returns FALSE.
DeleteCurrentPen
The DeleteCurrentPen method removes the currently
selected pen from the trend.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the pen was successfully removed;
otherwise, returns FALSE.
GetHistorianSource
GetHistorianSource method gets the named history source
object for a server from the server list.
Example
Dim b as object;
b = [Link]("idc_insql15");
Syntax
[Result =] [Link](string
HistorySourceName);
Parameters
HistorySourceName
The name of the history source.
Return Value
If the server exists, the object is returned; otherwise, a NULL
is returned.
GetPenValAtX1
The GetPenValAtX1 method gets the value of the expression
associated with the specified pen at the point at which its
curve intersects with the first time axis cursor.
Example
double val = Trend1.GetPenValAtX1("MyPen01");
Syntax
[Result=] Trend1.GetPenValAtX1(string PenName);
Parameters
PenName
The pen you want to check the value of.
Return Value
Returns a double if the point is analog or discrete; returns
the fixed position of the point if the point is message or other
type. If the specified pen is shown in the chart multiple
times, then the method uses the first instance that was
added.
GetStartAndEndTimes
The GetStartAndEndTimes method gets the start and end
times for the query.
Example
Dim SDate as [Link];
Dim EDate as [Link];
Dim b as System.Int32
b = [Link](SDate, EDate);
StartTime = [Link]();
EndTime = [Link]();
Ret = b;
Syntax
[Result =] [Link](DateTime
StartTime, DateTime EndTime);
Parameters
StartTime
The start time for the query.
EndTime
The end time for the query.
Return Value
Returns the time range enumeration.
MoveNextPen
The MoveNextPen method sets the current pen focus to the
next pen in the list of trended attributes or tags. If the
current pen is the last pen, calling the MoveNextPen method
sets the first pen as the current pen.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the current pen focus was successfully set
to the next pen (or wrapped around to the first pen in the
list); otherwise, returns FALSE.
MovePrevPen
The MovePrevPen method sets the current pen focus to the
previous pen in the list of trended attributes or tags. If the
current pen is the first pen, calling the MovePrevPen method
has no effect.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the current pen focus was successfully set
to the previous pen; otherwise, returns FALSE.
RefreshData
The RefreshData method refreshes the trend chart by
retrieving new data for all pens.
Example
bool b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the trend was successfully updated;
otherwise, FALSE is returned.
RefreshTimes
The RefreshTimes method sets the time period for the query
by updating the end time to current time and recalculates the
start time based on the new end time and duration.
Example
dtag = 1;
[Link](dtag);
Syntax
[Link](bool TriggerEvent);
Parameters
TriggerEvent
If you set the Boolean parameter to TRUE, the OnChange
event is triggered if the time is updated.
RemoveHistorianSource
RemoveHistorianSource method removes the specified
history source from the list.
Example
Dim b as Boolean;
b = [Link]("IDC_INSQL15");
Syntax
[Result] = [Link](string
HistorySourceName);
Parameters
HistorySourceName
The name of the history source.
Return Value
This method returns true if 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.
RemovePen
The RemovePen method removes the specified pen from the
trend chart.
Note If the same pen is available multiple times, then only the
first occurrence is removed.
Example
dim b as boolean;
b = [Link]("MyPen01");
Syntax
[Result=] [Link](string PenName);
Parameters
PenName
The pen name to be removed.
Return Value
Returns TRUE if the pen was successfully removed from the
trend chart; otherwise, returns FALSE.
ScaleAllPens
The ScaleAllPens method sets the Y-axis (value axis) scale
for all pens.
Example
dim b as boolean;
b = [Link](-100, 100);
Syntax
[Result=] [Link](double Min, double Max);
Parameters
Min
Enter the minimum value for the Y-axis.
Max
Enter the maximum value for the Y-axis.
Return Value
Returns TRUE if the Y-axis scale is set successfully;
otherwise, returns FALSE.
ScaleAutoAllPens
The ScaleAutoAllPens method sets a suitable Y-axis scale for
all tags in accordance with the current minimum and
maximum values.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the Y-axis is successfully scaled; otherwise,
returns FALSE.
ScaleAutoPen
The ScaleAutoPen method sets a suitable Y-axis scale for the
currently selected pen in accordance with the current
minimum and maximum values.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the Y-axis is successfully scaled; otherwise,
returns FALSE.
ScaleDownAllPens
The ScaleDownAllPens method increases the value range of
all pens by one third.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the value range is successfully increased by
one third; otherwise, returns FALSE.
ScaleDownPen
The ScaleDownPen method increases the value range of the
currently selected pen by one third.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the scaling is successful; otherwise, returns
FALSE.
ScaleMoveAllPensDown
The ScaleMoveAllPensDown method moves the value scale
down for all pens.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the scaling is successful; otherwise, returns
FALSE.
ScaleMoveAllPensUp
The ScaleMovesAllPensUp method moves the value scale up
for all pens.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the scaling is successful; otherwise, returns
FALSE.
ScaleMovePenDown
The ScaleMovePenDown method moves the value scale down
for the currently selected pen.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the scaling is successful; otherwise, returns
FALSE.
ScaleMovePenUp
The ScaleMovePenUp method moves the value scale up for
the currently selected pen.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the scaling is successful; otherwise, returns
FALSE.
ScalePen
The ScalePen method sets the Y-axis scale for the currently
selected pen.
Example
dim b as boolean;
b = [Link](-100, 100);
Syntax
[Result=] [Link](double Min, double Max);
Parameters
Min
Enter the minimum value for the Y-axis.
Max
Enter the maximum value for the Y-axis.
Return Value
Returns TRUE if the Y-axis scale is set successfully;
otherwise, returns FALSE.
ScaleUpAllPens
The ScaleUpAllPens method decreases the value range of all
pens by one fourth.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the value range is successfully reduced by
one fourth; otherwise, returns FALSE.
ScaleUpPen
The ScaleUpPen method decreases the value range of the
currently selected pen by one fourth.
Example
dim b as boolean;
b = [Link]();
Syntax
[Result=] [Link]();
Parameters
None.
Return Value
Returns TRUE if the value range is successfully reduced by
one fourth; otherwise, returns FALSE.
SetCurrentPen
The SetCurrentPen method sets the specified pen as the
currently selected pen. If the pen is available multiple times,
then the first occurrence is selected.
Example
dim b as boolean;
b = [Link]("MyPen01");
Syntax
[Result=] [Link](string PenName);
Parameters
PenName
The name of the pen being set.
Return Value
Returns TRUE if the pen was set successfully; otherwise,
returns FALSE.
SetDuration
The SetDuration method sets the duration of the trend.
Calling this method first sets the end time to the current
time and then the start time to current time minus the
specified duration. Default duration is 5 minutes. Maximum
duration is 2 years.
Example
dim b as boolean;
b = [Link]("[Link]");
Syntax
[Result=] [Link](string DateTimeDuration);
Parameters
DateTimeDuration
The time of the duration in HH:MM:SS format.
Return Value
Returns TRUE if the duration is set successfully; otherwise,
returns FALSE.
SetStartAndEndTimes
The SetStartAndEndTimes method sets the start and end
times for the query.
Example
Dim b as Boolean;
b = [Link]("08/31/2008
[Link]","09/01/2009 [Link]",0);
Syntax
[Result =] [Link](DateTime
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
[Link] on page 67.
[Link]
The [Link] method gets the
start and end times for the query.
Syntax
[Link](DateTime StartTime,
DateTime EndTime);
Parameters
StartTime
String attribute, custom property, or element property to
retrieve the start time.
EndTime
String attribute, custom property, or element property to
retrieve the end time.
Example
dim SDate as string;
dim EDate as string;
[Link](SDate, EDate);
StartDate = SDate;
EndDate = EDate;
[Link]
The [Link] method sets the time period
for the query by updating the end time to current time and
recalculates the start time based on the new end time and
duration.
If you set the Boolean parameter to TRUE, the OnChange
event is triggered if the time is updated.
Only use this method, if the Update to Current Time option is
cleared or the UpdateToCurrentTime property is FALSE.
Syntax
[Link](TriggerEvent);
Example
dtag = 1;
[Link](dtag);
[Link]
The [Link] method sets the
start and end times for the query.
You must specify one of the following parameter
combinations:
• Start time and end time. Set the Duration parameter to
0.
• Start time and duration. Set the EndTime parameter to
““.
UpdateHistorianSource
UpdateHistorianSource method updates the specified history
source in the list.
Example
Dim a as object;
Dim b as Boolean;
a = [Link] ("IDC_INSQL15");
[Link] = "Windows Integrated";
b = [Link]("IDC_INSQL15");
Syntax
[Result =] [Link](string
HistorySourceName);
Parameters
HistorySourceName
The name of the history source.
Return Value
Returns true if the given instance is currently in the server
list; otherwise, it returns false.
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
[Link]
[Link] method logs on to the current history
source.
Example
Dim histSources = [Link];
Dim histSource = [Link]("idc_insql12");
Dim statusMsg as string;
Dim ret = [Link](statusMsg);
Syntax
[Result =] HistorySource. Connect(string
statusMessage);
Parameters
statusMessage
Information of the result of the log on attempt.
Return Value
Returns TRUE if the log on was successful; otherwise,
returns FALSE. The server must be configured before calling
the Connect method. Changes made to the server
configuration after a connect do not take effect until after a
disconnect and subsequent connect.
[Link]
[Link] method logs off the connection to
the current history source.
Example
Dim histSources = [Link];
Dim histSource = [Link]("idc_insql12");
[Link]();
Syntax
[Result =] [Link]();
Parameters
None.
Return Value
None.
Remarks
Repeated calls to this method are harmless and do not result
in further state change events.
[Link]
[Link] method adds a new history source.
Example
Dim histSources = [Link];
Dim ret = [Link]("idc_insql12", "InSQL");
Syntax
[Result =] [Link](string HistorySourceName,
string Type);
Parameters
HistorySourceName
The name of the history source.
Type
The type of history source “InSQL“ or “InTouch“.
Return Value
If there is already a server with the given name in the list,
the object for that server is returned. Otherwise, a new
server with the given name is added to the list and the object
for the new server is returned.
[Link]
[Link] method gets the named history
source object for a server from the server list.
Example
Dim histSources = [Link];
Dim histSource = [Link]("IDC_INSQL15");
Syntax
[Result =] [Link](string
HistorySourceName);
Parameters
HistorySourceName
The name of the history source.
Return Value
If the server exists, the object is returned; otherwise, a NULL
is returned.
[Link]
[Link] method removes the specified
history source from the list.
Example
Dim histSources = [Link];
Dim ret = [Link]("IDC_INSQL15");
Syntax
[Result =] [Link](string
HistorySourceName);
Parameters
HistorySourceName
The name of the history source.
Return Value
This method returns TRUE if 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.
[Link]
[Link] method updates the specified history
source in the list.
Example
Dim histSources = [Link];
Dim ret = [Link]("IDC_INSQL15");
Syntax
[Result =] [Link](string
HistorySourceName);
Parameters
HistorySourceName
The name of the history source.
Return Value
Returns TRUE if the given instance is currently in the server
list; otherwise, it returns FALSE.
• MouseClick
• PenDisplayChanged
• PenlistChanged
• ShutDown
• SizeChanged
• StartUp
• StateChanged
CurrentPenChanged
The CurrentPenChanged event is triggered when a different
pen is selected.
Syntax
[Link]();
DatesChanged
The DatesChanged event is triggered when a date/time for
the trend chart changes because there is a scripted change to
the chart’s duration.
Syntax
[Link]();
MouseClick
The MouseClick event is triggered when there is a mouse
click in the trend region.
Syntax
[Link]();
PenDisplayChanged
The PenDisplayChanged event is triggered when the display
options for a pen in the pen list are changed.
Syntax
[Link]();
PenlistChanged
The PenlistChanged event is triggered when a pen is added
to or removed from the pen list.
Syntax
[Link]();
ShutDown
The ShutDown event is triggered when the client is closed.
Syntax
[Link]();
SizeChanged
The SizeChanged event is triggered when a resize event is
received.
Syntax
[Link]();
StartUp
The StartUp event is triggered when the client is started.
Syntax
[Link]();
StateChanged
The StateChanged event is triggered when a change has
been made to the configuration for a pen in the pen list.
Syntax
[Link]();
.NET Colors
The following table is an overview of the color .NET color
names with hexadecimal code.
Color with Hex Code Color with Hex Code Color with Hex Code
Color with Hex Code Color with Hex Code Color with Hex Code
Appendix A
The Trend Client supports both cycle and full data retrieval
modes when retrieving data from Wonderware Historian to
suit different reporting needs and applications. This
appendix explains how these two retrieval modes work.
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 IndustrialSQL Server.
In cyclic retrieval, one row is returned for each cycle
boundary. If no data row is actually stored at a cycle
boundary, the last value before the boundary is returned.
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.
Index
Symbols [Link] 55
.NET colors 98 [Link] 55
[Link] 48
A [Link] 48
ActiveFactory Trend control 11, 100 [Link] 67
AddHistorianSource 75 [Link] 67
adding a group 30 [Link] 48
adding a pen 17 clearing configuration data 17
adding a tag to a group 30 ClearPens 76
AddPen 76 colors in Trend Client 97
animations, 16, 19 colors, .NET 98
applying a filter 32 configuring data sources 22, 24
attributes configuring historical sources 24
referencing a SuperTag 19 configuring pen details and options 20
configuring pens for historical sources and
B tags 22
browser 28 configuring trend appearance 34
configuring Trend Client 15
C connecting a pen to an InTouch tag 18
copyright 2
[Link] 46
[Link] 46 creating a group 30
creating a new InTouch LGH connection
[Link] 46
26
[Link] 47
creating a Wonderware Historian connec-
[Link] 47
tion 25
[Link] 47
creating an InTouch LGH connection 26
[Link] 48
creating server connections 25, 26
CurrentPenChanged 95 [Link] 72
custom properties, 18 [Link] 72
cyclic retrieval 105 [Link] 72
[Link] 72
D [Link] 73
data sources for the Trend Client 12 HistorySources 49
DatesChanged 95 [Link] 93
DeleteCurrentPen 77 [Link] 73
deleting a group or tag 30 [Link] 93
differences between Trend Client and Ac- [Link] 73
tiveFactory Trend control 11 [Link] 92
Documentation 9 [Link] 92
documentation conventions 9 [Link] 94
domain 71 [Link] 94
[Link] 94
E
editing a group 30 I
editing a server connection 27 InTouch 18
enabling and disabling Trend Client 16 InTouchViewApp 19
F M
filter pane 32 managed InTouch application object 19
full retrieval 106 modifying a trend event 40
MouseClick 95
G MoveNextPen 79
GetHistorianSource 77 MovePrevPen 79
GetPenValAtX1 78
GetStartAndEndTimes 78 O
groups 29 objects 29
adding a tag 30
creating 30 P
deleting 30 password 71
editing 30 Pen. RetrievalMode 52
renaming 31 [Link] 49
[Link] 49
H [Link] 50
handling trend events 40 [Link] 50
hiding the Servers pane 29 [Link] 50
hiding/showing tags 34 [Link] 51
[Link] 71 [Link] 51
[Link] 92 [Link] 51
[Link] 92 [Link] 51
[Link] 71 [Link] 52
[Link] 71, 72 [Link] 52
[Link] 71 [Link] 52
[Link] 50
[Link] 53 S
[Link] 53 ScaleAllPens 82
[Link] 53 ScaleAutoAllPens 82
[Link] 54 ScaleAutoPen 83
[Link] 54 ScaleDownAllPens 83
[Link] 54 ScaleDownPen 83
PenDisplayChanged 95 ScaleMoveAllPensDown 84
PenlistChanged 96 ScaleMoveAllPensUp 84
PenSelectorHeight 55 ScaleMovePenDown 84
PenUQRelativeOpacity 55 ScaleMovePenUp 85
PenUQRelativeThickness 55 ScalePen 85
placing the Trend Client into an ArchestrA ScaleUpAllPens 86
symbol 15 ScaleUpPen 86
[Link] 56 scripting differences between Trend Client
[Link] 56 and ActiveFactory Trend Control 100
[Link] 57 server connections
[Link] 57 creating 25, 26
[Link] 58 editing 27
[Link] 58 removing 27
[Link] 58 server details, viewing 31
[Link] 59 server, connecting to 24
[Link] 59 servers pane
[Link] 59 showing/hiding 29
[Link] 59 using 29
[Link] 60 SetCurrentPen 87
[Link] 60 SetDuration 87
PlotImage 60 SetStartAndEndTimes 88
private groups 29 setting chart options 37
properties, methods, and events 43 setting data bindings 39
public groups 29 setting trend options 37, 39, 40
ShowContextMenu 60
R showing the Servers pane 29
RefreshData 80 showing/hiding the servers pane 29
RefreshTimes 80 ShutDown 96
RemoveHistorianSource 81 SizeChanged 96
RemovePen 81 StartUp 96
removing a server connection 27 StateChanged 96
removing the Trend Client from an SuppressErrors 61
ArchestrA symbol 16 system objects 29
removing, server connections 27
renaming a group 31 T
RetainPassword 72 tag picker 28
retrieval modes tags
cyclic 105 adding to a group 30
full 106 attribute reference to a SuperTag 19
connecting to element animations 18