36
Setting up trends Chapter 23
Rockwell Automation Publication VIEWSE-UM006K-EN-E
621
2. For the non-isolated graphing template, create a button that runs the
following command as its press action:
Invoke Me.Trend1.LoadTemplate ("Non-Isolated")
To load the templates at run time, the operator can press either button.
Tip: In the Invoke commands in this example, Trend1 is the
default name of the trend object. Be sure to use the
correct name of the trend in the Invoke command.
About the Trend graphic library
The Trend graphic library contains a real-time trend, and objects for
controlling the trend. You can use the trend and objects as they are, or you
can modify them to suit your needs. To use the objects, drag and drop them
into a graphic display.
To open the Trend graphic library:
1. In FactoryTalk View Studio, in the Explorer window, open the
Graphics folder.
2. In the Libraries folder, right-click Trend, and then select Open.
How you can interact with a trend at run time depends on the options you set
up in the Runtime tab of the Trend Properties dialog box.
You might be able to do some or all of the following:
View and modify trend properties.
Modify legend properties.
Pan or zoom on the trend chart.
Use the trend chart’s shortcut menu.
For details about options in the Runtime tab, click Help.
Collecting data in the background at run time
Real-time trends collect data only while the trend is shown. This means that a
real-time trend will not contain any data, when the graphic display opens.
Working with trends
at run time
31
Chapter 23 Setting up trends
622
Rockwell Automation Publication VIEWSE-UM006K-EN-E
This can be a problem if the trend chart is not open for the entire time the
application is running, or if other graphic displays are opened before the
trend display.
If you want a trend to contain data when the graphic display opens, you can
use a data log model, or you can run startup macro, to load and update the
display in the background.
This loads data into the data buffer for the trend.
Tip:
You can run a startup macro when the HMI server runs.
For information about setting up startup components for
an HMI server in various types of networks, see Working
with network distributed applications on page 125,
Working with network station applications on page 149,
and Working with local station applications on page 167.
Example: Using a startup macro to load and update a trend in the
background
1. Create a startup macro that includes this command:
Display Trend1 /ZA
where Trend1 is the name of the graphic display containing the
real-time trend, and /ZA is the parameter for loading the trend data into
the data buffer.
Trend data will remain in the cache, and continue to update, until you
run the FlushCache command, or until you stop running the
application.
2. When you want the real-time trend to become visible, run the
following command:
Display Trend1
When the graphic display opens, the trend will contain data.
23
Setting up trends Chapter 23
Rockwell Automation Publication VIEWSE-UM006K-EN-E
623
Selecting pens at run time
To show details about a pen, select the pen by clicking it in the line legend.
When a pen is selected, the vertical scale changes to reflect the scale of
values for the pen.
Modifying trend properties at run time
Changes made to trend properties at run time are not saved.
The changes affect the trend that is running, but as soon as the graphic
display is changed or closed, the changes to the trend are lost.
To make permanent changes to a trend, open and modify it in FactoryTalk
View Studio.
To open the Trend Properties dialog box at run time:
Right-click the trend chart, and then select Chart properties.
Tip: At run time, the Trend Properties dialog box shows only
the tabs specified in the Runtime tab, when you set up
the trend. You can make changes only in the available
tabs. The Runtime tab itself, is not available at run time.
To change the trend chart title:
1. Double-click the trend chart title.
2. In the Graph title dialog box, type a name for the trend chart, and then
click OK.
21
Chapter 23 Setting up trends
624
Rockwell Automation Publication VIEWSE-UM006K-EN-E
To open the Y-Axis tab:
1. Double-click the y-axis legend.
2. In the Y-Axis tab, make the desired changes, and then click OK.
To open the X-Axis tab:
1. Double-click the x-axis legend.
2. In the X-Axis tab, make the desired changes, and then click OK.
To open the Pens tab:
1. Double-click the line legend.
2. In the Pens tab, make the desired changes, and then click OK.
Scrolling the trend chart at run time
To view different areas of charted data, an operator can use the set of
VCR-style buttons included with a trend. The following illustration describes
the function of each button.
To make the VCR-style buttons available at run time, in the Display tab of
the Trend Properties dialog box, select the check box, Display scrolling
mechanism.
You can also use the buttons in the Trend graphic library. For information
about the library, see About the Trend graphic library on page 621.
22
Setting up trends Chapter 23
Rockwell Automation Publication VIEWSE-UM006K-EN-E
625
Showing the value of pens at various positions
The value bar shows the value of each pen in the trend, at the position you
select on the trend chart.
The color of the value bar changes automatically, so it is visible for all
background colors. For example, if the trend background color is black, the
value bar color will be white. If the trend background color is white, the
value bar will be black.
A tilde (~) indicates an approximate value. An approximate value is shown
when there is no value for the pen at the exact time stamp of the value bar.
The approximate value is based on the nearest available reading.
To show the value bar:
Click the trend where you want the value bar to appear.
To hide the value bar:
Click the trend’s vertical axis.
You can also right-click the trend, and then select Show value bar. A
check mark indicates the value bar is visible. No check mark indicates
the value bar is hidden.
23
Chapter 23 Setting up trends
626
Rockwell Automation Publication VIEWSE-UM006K-EN-E
Displaying the difference in pen values for two
points
The delta value bar works with the value bar to show the difference in value
between two x-axis points for standard and XY Plot chart types.
To show the delta value bar:
1. Right-click the trend chart, select Active value bar, and then click
Value.
2. Click the trend where you want the value bar to appear.
3. From the shortcut menu, select Active value bar, and then select
Delta.
4. Click the trend where you want to see the difference between the value
at the value bar’s data point and the value at the delta value bar’s data
point.
To move the delta value bar:
1. Right-click the trend, select Active value bar, and then click Delta.
2. Click the trend chart at the position where you want to know the
difference between the value indicated by the value bar, and the value
indicated by the delta value bar.
To remove the delta value bar:
Right-click the trend, and then select Show value bar.
32
Setting up trends Chapter 23
Rockwell Automation Publication VIEWSE-UM006K-EN-E
627
This removes both the value bar and the delta value bar from the trend.
However, if you select Show value bar again, only the value bar will
reappear.
Zooming the trend chart
Use zoom to view a selected area of the trend chart in more detail.
To zoom, use one of these methods:
Right-click and drag the y-axis to zoom vertically.
Right-click and drag the x-axis to zoom horizontally.
Left-click and drag the chart to zoom into the selected area.
To restore the original trend chart view:
Right-click the trend chart, and then select Undo Zoom/Pan.
Panning the trend chart
Use pan to view areas of the trend chart that are outside the area of the chart
you are viewing. You must pause the trend before you can pan to an area.
To pause the trend:
Click the VCR-style pause button at the bottom of the trend. You can also
right-click the trend chart, and then select Scroll.
To pan vertically:
Click and then drag the y-axis legend.
To pan horizontally:
Click and then drag the x-axis legend.
To restore the original trend chart view:
Right-click the trend chart, and then select Undo Zoom/Pan.
Using the arrow keys
You can use the arrow keys on the keyboard to perform some of the same
functions as the mouse and VCR-style buttons.
59
Chapter 23 Setting up trends
628
Rockwell Automation Publication VIEWSE-UM006K-EN-E
To do this
Press and hold this key
And then press this arrow key
Move back half a time span.
(none)
Left
Move forward half a time span.
(none)
Right
Pan up 10%.
(none)
Up
Pan down 10%.
(none)
Down
Move back a full time span.
Shift
Left
Move forward a full time span.
Shift
Right
Switch to the next pen’s y
-axis.
Shift
Up or Down
Move the value bar to the next data
point.
Ctrl
Left or Right
Pan up or down 10%.
Ctrl
Up or Down
Pause.
Shift and Ctrl
Left or Right
Switch to the next pen’s y
-axis.
Shift and Ctrl
Up or Down
Printing the trend chart
To print the trend chart, right-click the trend, and then select Print Trend .
Using overlays at run time
Before you can use overlays at run time, a snapshot must be created and the
overlay must be set up in the Overlays tab. For more information about
snapshots and overlays, see Setting up snapshots and overlays on page 618.
To align an overlay to the left of the trend chart:
Right-click the trend chart, select Overlays > Align Left > the name of the
overlay to align to the left of the trend chart.
To relocate an overlay:
Right-click the trend chart, select Overlays > Relocate > the name of the
overlay to relocate.
To show or hide an overlay:
Right-click the trend chart, select Overlays > Show/Hide > the name of the
overlay you want to show or hide.
A check mark beside the overlay name indicates it is visible on the trend
chart. No check mark beside the overlay name indicates it is hidden.
15
Setting up trends Chapter 23
Rockwell Automation Publication VIEWSE-UM006K-EN-E
629
To open the Overlays tab:
Right-click the trend chart, select Overlays > Properties.
Fixing run-time errors
If data for the trend is not available at run time due to communication errors,
messages are sent to the Diagnostics List. For information about setting up
FactoryTalk Diagnostics, see the FactoryTalk Help.
For information about troubleshooting common trend problems, see Help.
To view information in the Diagnostics List:
In FactoryTalk View Studio, From the Tools menu, select Diagnostics
Viewer.
You can also select Start > All Programs > Rockwell Software >
FactoryTalk Tools > Diagnostics Viewer.
Documents you may be interested
Documents you may be interested