L27 - FactoryTalk Historian Site Edition: Basic Lab on Data

advertisement
L27 - FactoryTalk Historian Site
Edition: Basic Lab on Data Collection
and Reporting
For Classroom Use Only!
Important User Information
This documentation, whether, illustrative, printed, “online” or electronic (hereinafter “Documentation”) is
intended for use only as a learning aid when using Rockwell Automation approved demonstration
hardware, software and firmware. The Documentation should only be used as a learning tool by qualified
professionals.
The variety of uses for the hardware, software and firmware (hereinafter “Products”) described in this
Documentation, mandates that those responsible for the application and use of those Products must satisfy
themselves that all necessary steps have been taken to ensure that each application and actual use meets
all performance and safety requirements, including any applicable laws, regulations, codes and standards
in addition to any applicable technical documents.
In no event will Rockwell Automation, Inc., or any of its affiliate or subsidiary companies (hereinafter
“Rockwell Automation”) be responsible or liable for any indirect or consequential damages resulting from
the use or application of the Products described in this Documentation. Rockwell Automation does not
assume responsibility or liability for damages of any kind based on the alleged use of, or reliance on, this
Documentation.
No patent liability is assumed by Rockwell Automation with respect to use of information, circuits,
equipment, or software described in the Documentation.
Except as specifically agreed in writing as part of a maintenance or support contract, equipment users are
responsible for:
• properly using, calibrating, operating, monitoring and maintaining all Products consistent with all
Rockwell Automation or third-party provided instructions, warnings, recommendations and
documentation;
• ensuring that only properly trained personnel use, operate and maintain the Products at all times;
• staying informed of all Product updates and alerts and implementing all updates and fixes; and
• all other factors affecting the Products that are outside of the direct control of Rockwell
Automation.
Reproduction of the contents of the Documentation, in whole or in part, without written permission of
Rockwell Automation is prohibited.
Throughout this manual we use the following notes to make you aware of safety considerations:
Identifies information about practices or circumstances
that can cause an explosion in a hazardous environment,
which may lead to personal injury or death, property damage, or economic loss.
Identifies information that is critical for successful application and understanding of the product.
Identifies information about practices or circumstances that can lead to personal injury or death, property
damage, or economic loss. Attentions help you:
• identify a hazard
• avoid a hazard
• recognize the consequence
Labels may be located on or inside the drive to alert people that dangerous voltage may be present.
Labels may be located on or inside the drive to alert people that surfaces may be dangerous temperatures.
FactoryTalk Historian SE Basic Lab
Contents
Before you begin .........................................................................................................................................
5
About this lab ................................................................................................................................................
5
Tools & prerequisites ....................................................................................................................................
5
Document Conventions .................................................................................................................................
6
Section 1: Introduction to Historian (~10 minutes) .................................................................................
7
3 of 95
About This Section ........................................................................................................................................
7
Historian applications ....................................................................................................................................
8
Historian Architectures / Distributed Historian ..............................................................................................
9
Capturing Time-series data vs. Relational data ..........................................................................................
10
Filtering and Compression ..........................................................................................................................
10
Section 2: Configuration and Setup (~35 min) .......................................................................................
13
About This Section ......................................................................................................................................
13
Configure time-series data collection ..........................................................................................................
13
Check the tags in Logix 5000 ......................................................................................................................
14
Open FactoryTalk Admin Console and check Data Sources ......................................................................
16
Create a new Historian Server ....................................................................................................................
18
Assign Licenses ..........................................................................................................................................
20
Discovering Historian Points .......................................................................................................................
22
Start Data Collection ...................................................................................................................................
25
Modify the Points with the SMT’s Point Builder ..........................................................................................
26
Section 3: Trending with FactoryTalk View (~15 min) ...........................................................................
41
About This Section ......................................................................................................................................
41
Open View Studio .......................................................................................................................................
42
Add a Trend to an Existing Display .............................................................................................................
44
Section 4: FactoryTalk Historian DataLink (~20 min) ............................................................................ 52
About This Section ......................................................................................................................................
52
FactoryTalk Historian DataLink ...................................................................................................................
52
Specifying time in FactoryTalk Historian .....................................................................................................
53
Open Excel ..................................................................................................................................................
56
Create a summary report ............................................................................................................................
56
Create a Report with Flexible Parameters ..................................................................................................
64
Section 5: FactoryTalk VantagePoint (~30 min) ..................................................................................... 66
About this Section .......................................................................................................................................
66
Using Trend .................................................................................................................................................
72
Creating a Basic Excel Report ....................................................................................................................
78
Section 6: FactoryTalk Historian Backup (~10 min) .............................................................................. 85
About This Section ......................................................................................................................................
85
Scheduling an Automatic Backup ...............................................................................................................
85
Testing the Scheduled Backup ...................................................................................................................
86
Section 7: Optional Advanced Applications (~15 min) ......................................................................... 88
About This Section ......................................................................................................................................
88
Create a Performance Equation .................................................................................................................
88
Create a Totalizer ........................................................................................................................................
93
5 of 95
Before you begin
At the conclusion of the presentation, read Section 1 – Introduction to Historian.
About this lab
Welcome to the FactoryTalk Historian Hands-On Lab! This session provides you with an opportunity to
explore FactoryTalk Historian Site Edition v3.00. The following sections explain what you’ll be doing in
this lab session, and what you will need to do to complete the hands-on exercises.
FactoryTalk Historian Site Edition is a solution for optimizing your manufacturing process through the
analysis of historical data. Historian provides the capability to collect, store, analyze, and visualize data
using a powerful capturing engine and a powerful set of reporting tools (such as time-series trends, bar
chart, pie chart, and tabular) and easily generate reports using Microsoft Excel.
Tools & prerequisites
Software programs required:
•
•
•
•
•
•
•
•
•
•
•
•
•
Microsoft Windows Server 2008 R2
Microsoft Internet Explorer v8.0
Microsoft Office 2010
Microsoft SQL Server 2008 R2
FactoryTalk Services Platform v2.60 (CPR 9 SR 6)
RSLinx Enterprise v5.50
RSLinx Classic v2.55
FactoryTalk Historian Site Edition v3.01
FactoryTalk Historian DataLink v4.20
FactoryTalk VantagePoint v4.50
FactoryTalk View Site Edition v7.0
SoftLogix5800 v20
RSLogix5000 v20
Hardware devices required
•
None
Files required
•
None
Document Conventions
Throughout this workbook, we have used the following conventions to help guide you through the lab
materials.
This style or symbol:
Indicates:
Words shown in bold (e.g.,
RSLogix 5000 or OK)
Any item or button that you must click on, or a menu name from
which you must choose an option or command. This will be an
actual name of an item that you see on your screen or in an
example.
6 of 95
Words shown enclosed in single
quotes (e.g., 'Controller1')
An item that you must type in the specified field. This is information
that you must supply based on your application (e.g., a
variable).
Note: When you type the text in the field, remember that you do
not need to type the quotes; simply type the words that are
contained within them (e.g., Controller1).
The text that appears inside of a gray box is supplemental “Learning Point”.
The text is intended to emphasize certain key concepts about using the
product.
Note: If the mouse button is not specified in the text, you should click on the left mouse button.
7 of 95
Section 1: Introduction to Historian (~10 minutes)
Historians are a widely used tool for gathering large amounts of historical data, primarily based on
timeseries data. This data is stored in large archives, and retrieved for reporting, analysis and for general
realtime and historical trending.
There are several Historian technologies using either proprietary databases, or standard relational
databases. The advantages of a relational database are the ease of data retrieval based on standard, but
the database itself is not optimized to handle these large amounts of mostly unstructured data.
We will in this section get introduced to Historians in general and the new FactoryTalk Historian
specifically. We will look at the advantages of the new Historian compared to previous and older
technologies.
About This Section
In this section, we will introduce you to the new FactoryTalk Historian. In this section you will:

What is a Historian and what is it used for

Where does a Historian fit within the Enterprise IT solution

What is time-series data

What is the difference between time series data and relational data

What are some of the advanced features of a Historian
Historian applications
Historians are utilized across many industries and applications including, Consumer Products, Food and
Beverage, Automotive, Life Sciences, Packaging, and Material Routing.
The main application is to capture process data at high speeds and at low intervals to be able to display
trends and graphs of the data, and to be able to perform advanced analysis of the data, and to report
based on the data.
Those time-series data can then be used as a basis for various calculations, estimations, statistical
processes, quality controls, etc., throughout the processes and applications in the enterprise.
The typical Historians are Plant historians capturing data from all the equipment in a plant, and that data
is then used in mostly other specialized applications such as MES, ERP, Reporting, Visualization, Quality
and Assurance applications etc.
8 of 95
Historian Architectures / Distributed Historian
Because data becomes more and more important, it is essential that systems will allow for data capture at
all levels of the Plant floor and at optimal capture rates, and it is also essential that this data becomes
available at all levels of the enterprise. This is the basic concept of Rockwell’s Distributed Historian
Strategy.
The Distributed Strategy extends the traditional Site/Plant Historian, with a Machine Level device
Historian to allow for fast and reliable data capture at the controller level, and with an Enterprise Level
Historian to aggregate all Enterprise data to a central repository making the data available at all levels of
the Enterprise.
9 of 95
Capturing Time-series data vs. Relational data
Time-series data is largely unstructured, and is therefore not the optimal candidate for being stored in a
relational database such as Microsoft SQL Server or Oracle. First of all the data will require a lot of space,
given that typical technologies make every data point a record in the database, and secondly retrieving
that data given the system needs to select a lot of records for a simple trend, will take more time than
traditional relational lookups.
So in order store more data in the same space and in order to allow for very fast data capture and
retrieval, the more advanced Historians today are utilizing time-series optimized data stores, that allow for
a very fast capture rate and storage, a space optimized storage, and a very fast data retrieval rate.
Filtering and Compression
On top of the optimized storage the new FactoryTalk Historian also has an advanced filtering and
compression algorithm that further optimizes the storage capability
Exception Test
Data compression is an optional two-step process to report changes by exception and store only what is
necessary to reproduce as close to the actual raw data trend.
10 of 95
The first step is the Exception test. This test filters all values out that only differ slightly from the previous
value.
When a value passes this test, that value and the previous value are reported.
Compression Test
The second step is the compression test. This test filters values out that only differ slightly from the slope
between the previous and the next value.
11 of 95
When a value passes this test, the first value for the slope section and the last value are reported. This
system is also used to retrieve non archived values by interpolation between the archived start and
ending point of the slope section.
12 of 95
Section 2: Configuration and Setup (~35 min)
In order to make it quicker and easier to configure a new Historian (or to reconfigure an existing
Historian), Rockwell Software has enhanced FactoryTalk Historian with two significant features not found
in the OSISoft PI Historian:
1. Auto Discovery: auto discovery allows the system to automatically discover controllers and other
data sources without the need for the user to identify the controller name and/or address. The system
will start in the data tree within the FactoryTalk Application from where the user identifies the starting
point of the search, and discover all data sources from that point and all tags in those sources.
2. Auto Configure: auto configure allows the system to automatically configure known tags and points
based on templates that define what points to search for. This means that the system will very quickly
find only the relevant points to configure, and allow the user to configure these in one step.
About This Section
In this section you will explore the following topics:

Configuring a new Historian Server

Auto Discovery of tags

Using the System Management Tools

Using the Tag Configurator in MS Excel
Follow the steps below to complete Section 2.
Configure time-series data collection
FactoryTalk Historian is optimized to collect and analyze time-series data. Time-series data is
continuously sampled over time, and each sampled value can be saved in the database. In order to
optimize the system and minimize storage requirements, there are ways to run exception testing and
compression testing on the data, so only relevant changes to the data are stored. This way the system
can store much more data than if it was stored in a typical relational database (where typically every
sampled point is stored).
In Historian, you (i.e., the discovery engine) merely select which register or tag in the control system you
want Historian to monitor, and Historian does the rest. The result is a series of data values collected over
time. The example you will use in this activity is a couple of controller tags contained in an Instant Soap
project representing temperatures in mixing tanks.
First, some terminology:
• A control system tag or memory tag refers to a name assigned to a register in the control system or
HMI.
13 of 95
•
•
A data point is a FactoryTalk Historian SE term which refers to a location in the control system from
which FactoryTalk Historian SE collects data. A data point can be a control system tag or a memory
tag.
A reporting tag is a Historian term for the time-series data stored in the FactoryTalk Historian Classic
database that was sampled from a single data point (or control system tag).
Configuring time-series data collection involves creating Historian collection tags (historian points) and
identifying where in the control system Historian should collect the data, how often the data should be
sampled, etc.
Check the tags in Logix 5000
Start by opening Logix 5000 to familiarize yourself with the tags in the controller that we’ll be collecting
with the Historian.
1. From the Windows Start menu, select All Programs > Rockwell Software > RSLogix 5000
Enterprise Series > RSLogix 5000.
2. On the Quick Start page, select the “fthdemo” project:
3. In the Controller Organizer, double-click Controller Tags.
4. Scroll down and expand the T100_Demo_Temp User Defined Tag (UDT) and the
T200_Demo_Temp UDT. Observe the 6 sub-elements of both tags:
14 of 95
5. Minimize RSLogix 5000.
6. From the Windows Start menu, select All Programs > Rockwell Automation > SoftLogix5800 >
SoftLogix Chassis Monitor. Verify that your SoftLogix controller is ready for data acquisition (i.e.,
the “Run” and “OK” LEDs are green). If the SoftLogix controller is faulted, you made need use the
Chassis Monitor to clear the fault and use RSLogix5000 to download the ‘FTHDemo” program to the
controller and place it back in run mode.
7. Close the Chassis Monitor and RSLogix 5000 when you are done.
Section Summary: In this section, you:
1. Familiarized yourself with the tags that will be logged by the Historian in subsequent sections.
2. Verified that your SoftLogix controller is available for data acquisition by the FactoryTalk Historian.
Open FactoryTalk Admin Console and check Data Sources
We are now ready to configure our Historian to collect data from our SoftLogix controller. We can do this
using either the FactoryTalk Administration Console or FactoryTalk View Studio. We will use the
FactoryTalk Administration Console:
15 of 95
1. From the Windows Start menu, select All Programs > Rockwell Software > FactoryTalk
Administration Console
2. When prompted select the Network directory.
Learning Point: FactoryTalk Historian is only supported in a Network FactoryTalk Directory.
3. Notice that there are 2 FactoryTalk applications in the Network FactoryTalk Directory (FTD):
•
InstaCorp
•
Samples Water
4. Expand the InstaCorp application and the Mixing area as shown below:
5. Expand the RSLinx Enterprise Data Server and double-click Communications Setup.
6. Verify that the ‘CLX1’ shortcut is highlighted on the left and the ‘1789-L60/A, FTHDemo’ in slot 2 of
the backplane is highlighted on the right:
Learning Point: In the interest of saving time, the ‘InstaCorp’ application and the ‘CLX1’
shortcut to the SoftLogix Controller were pre-configured for you.
7. In the lower right hand corner, click the Verify button to verify the connection to the SoftLogix
controller. You should receive a “Path to Primary device is assigned” message:
16 of 95
8. Click Close to close the Shortcut Verifier dialog and Click OK to close the Communications Setup
window (but do not close the Admin. console).
9. Minimize the Admin. Console and return to the desktop. Double-click the Live Data Test.xml icon:
Learning Point: Double-clicking an XML file normally launches Internet Explorer. In the
interest of saving time, your computer was pre-configured to launch the Rockwell Software
Live Data Client. Be patient while the data collection is initialized.
10. These are the 3 Process Variables (temperatures) we will be using throughout the remainder of this
lab exercise. Observe the Current Value column and note that only the first point (T100) is currently
changing:
11. Also observe the range of the T100 tag’s Current Value, it should be 60 to 150 (i.e., 149.9).
Learning Point: The span of all three tags is 90 units (degrees). This span will be
entered into the properties of each tag in the Historian later in the lab.
12. Close the Live Data Client.
Create a new Historian Server
With the connection to the controller verified, are now ready to create a connection to the Historian
Server.
1. Expand the Connections folder, and then select the Historical Data folder:
17 of 95
Learning Point: Note the absence of any connection from the application tree to a Historian
server.
2. Right-click on “Historical Data” and select the “New Historian Server Connection” wizard:
3. Accept the default ‘Name’, ‘Description’ and ‘Server or Collective Name’. Verify the connection to the
appropriate computer by pressing the Test Server Connection button:
18 of 95
Be patient…this may take a few seconds…
4. When the Server connection is verified, click Finish:
Assign Licenses
1. Verify that the Historian server (‘Production Historian’) and Factory Talk Live Data interface #1
(‘FTLD1’) now appear under the Connections > Historical Data folder in the System tree.
19 of 95
2. Open up the properties dialog for the Production Historian Server by right-clicking on the server and
selecting Properties:
3. Select the Licensing tab and notice that none of the available FHLD.50K licenses on the Activation
Server have been assigned. Assign one (1) license by changing the “Assigned” 0 to a 1 (as shown
below), and click Apply:
20 of 95
4. Select the Point Sources tab and notice 0 Points In Use and the Limit of 60,000 (50,000 Live Data +
10,000 3rd Party):
5. Click OK to close the Historian Server Connection Properties dialog.
Discovering Historian Points
1. Return to the Mixing folder as shown below:
21 of 95
2. Right-click the Mixing folder and select Discover Historian Points as shown below:
3. Configure the Auto Discovery parameters as shown below:
•
•
•
•
De-select all the data sources except Linx Enterprise
Select the Mixing sub-area within the InstaSoap area of the InstaCorp Application as the
starting point for the search
Select Enable data type filter
Click Next to discover the controller(s) and configure the tags
22 of 95
Learning Point: We de-selected the other 3 sources to speed up the search process. Also,
since we did not modify the scan rate or edit the Discovery Rules, we are using the default
scan rate (1 second) and the default Discovery Rules configuration.
4. The wizard will now proceed through the selected data source(s) in the area scope defined, and find
all tags that match the default Discovery rule set. Wait while the Auto Discovery finds all the Logix
tags matching the default discovery rules.
5. In the Confirm New Data Points dialog, click Confirm Points to configure the 1423 data points:
23 of 95
6. The system will configure the points to be collected in the Historian
Learning Point: Using the default discovery rules and the default scan rate (1 second), the
Auto Discovery wizard discovered 1423 tags in our SoftLogix Controller and assigned them to
scan class 1 (1 second). Note: There are far more than 1423 tags present in the SoftLogix
Controller. To discover additional tags, you would need to modify the default Discovery
Rules, or perform manual tag addition using Add Individual Historian Points.
Start Data Collection
1. Click the Start button to start the FactoryTalk Live Data (FTLD) Interface as shown below:
24 of 95
2. Click OK to close the ‘New Historian Point Discovery Complete’ dialog:
Learning Point: Your Historian is now collecting the 1423 data points every 1 second from
the SoftLogix controller. By default, all these points are Advised (as opposed to Polled)
meaning historical records are only created in the archive if the value is changing (minimizing
the disk space used by the archive).
Modify the Points with the SMT’s Point Builder
1. Open up the properties dialog for the Production Historian Server by right-clicking on the server and
selecting Properties:
25 of 95
2. Return to the General tab and click the Launch System Management Tools button:
26 of 95
Learning Point: The System Management Tools (PI SMT) provide a consolidated control
panel in which you can manage FactoryTalk Historian systems. PI SMT consists of a
container application - known as the host - and a library of plug-ins designed for specific
management tasks.
3. Briefly examine the SMT interface, making sure the VM-DATA Servers box is checked and paying
special attention to the System Management Plug-ins pane in the lower left hand corner:
4. To briefly familiarize yourself with all the available plug-ins, click on each of the 8 parent categories
in the System Management Plug-ins pane and observe the icons that appear in the main window.
Learning Point: For more detailed information on all the available plug-ins, select Help >
Contents.
27 of 95
5. Select and expand the Data category and select the Stale and Bad Points SMT plug-in. Click the
Search for Tags icon:
If any Bad or Stale tags are found, stop and ask for assistance.
6. Select and expand the Points category and then double-click Point Builder icon to launch the Point
Builder plug-in:
7. Within the Point Builder utility, click the Search Toolbar Icon as shown below:
28 of 95
8. In the Tag Search dialog, change the Tag Mask field to “ *.PV ” (as shown below) and click Search:
9. The search should return 6 tags, but we are currently only interested in 3 of them. Using Ctrl-Click,
select the 3 Temperature related tags as shown below:
1. InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV
2. InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T200_Demo_Temp.PV
3. InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T300_Demo_Temp.PV
29 of 95
10. Click OK to return to the Point Builder. Highlight the first tag and click the Rename button:
11. We want to work with shorter point (tag) names for the remainder of the lab, so rename the point to
CLX1.T100_Demo_Temp.PV as shown below:
30 of 95
12. Repeat the step above for tag CLX1.T200_Demo_Temp.PV and CLX1.T300_Demo_Temp.PV. All
3 tags should now be renamed as shown below:
13. Highlight the first point and select the Archive tab as shown below:
Learning Point: For more information about the fields on the Archive tab, select the toolbar
Help button then Archive tab.
14. Perform the following tasks on each of the 3 “Demo_Temp.PV” points:
• change the Typical Value field from the default of 50 to 100
• change the Zero field from the default of 0 to 60
• change the Span field from the default of 100 to 90
• Make a mental note of the default Exception Deviation (0.25) and Compression Deviation (0.5)
values
• click the toolbar Disk icon (Save)
31 of 95
Learning Point: The Typical Value, Zero and Span on these points were changed because
they all have a range of 60 to 150 in the SoftLogix Controller. These changes are not
instantaneous, but are implemented by the Interface within a few seconds of making the edit.
When using the Point Builder plug-in, you must select, configure and save each point
individually. When each point is saved, you will receive a corresponding entry confirming
your changes in the Session Record pane at the very bottom of the display:
15. Now return to the Archive Tab for CLX1.T200_Demo_Temp.PV.
• disable Exception Deviation by
changing .225 to 0 and the Max.
Time Minutes value from 10 to to 0
• disable Compression by select Off as
shown below:
16. Click the toolbar Disk icon (Save).
Learning Point: CLX1.T200_Demo_Temp.PV is now uniquely configured for no Exception
and no Compression filtering.
17. Now select to the Classic Tab for CLX1.T200_Demo_Temp.PV. Make the point Polled (as opposed
to Advised) by changing Location 3 from 1 to 0 as shown below:
32 of 95
Learning Point: See the table below for the locations definitions. The edit above makes
CLX1.T200_Demo_Temp.PV from Unsolicited/Advised to Polled.
18. Click the toolbar Disk icon (Save).
Learning Point: Historian tags can be Advised (default) or Polled. Advised tags are not sent
to the Historian snapshot if they are not changing. Polled tags are periodically sent to the
Historian snapshot even if the value does not change.
With Exception and Compression disabled and the point changed to Polled, the Temperature
for Tank T200 will be placed in the archive every second even if the value does not
change.
33 of 95
19. Return to the FactoryTalk Administration Console Historian Server Properties and click Manage in
MS Excel to launch the Tag Configurator:
20. Observe the 11 tabs and associated ribbons located across the top of the Excel 2010 interface:
Learning Point: The PI ribbon at the far right is FactoryTalk Historian DataLink.
DataLink will be covered later in the lab.
21. The Add-Ins ribbon is for use with the PI-SMT menu the System Management Tools (also known as
Tag Configurator). Select the Add-Ins ribbon and observe the PI-SMT menu:
34 of 95
Learning Point: The PI-SMT menu permits Excel to perform various tasks with points in the
Historian’s database. For more information, select Help from the bottom of the menu. In
order for the Add-Ins ribbon to display in Excel, you must first install the System Management
Tools from the FactoryTalk Historian CD and then configure Excel’s Add-Ins in order to view
them under the Add-Ins tab. In this lab, these steps have been completed for you in the
interest of saving time.
22. On the PI-SMT menu, select Import Tags. Click OK to accept the default tag import specifications:
Learning Point: In some cases, you would change the defaults in this dialog to filter/limit the
number of tags you import into Excel.
35 of 95
23. At the end of the Import a dialog will be visible with a summary of the import. Note the number of
tags successfully imported:
Learning Point: The number of tags imported into Excel (1573) exceeds the number of tags
reported earlier during Auto Discovery (1423) by 150. These additional 150 tags consist of 10
system “demo” tags and 140 system “health” tags that existed in the database even prior to
the Auto Discovery. Note: These 150 system tags do not count against activation.
24. Click the OK button to clear the dialog box and review the tags in Excel. The worksheet should be
populated with 1573 points (rows) from the Historian:
25. Note the following column headings in the worksheet:
• Column B: Tag
• Column D: changedate
• Column F: compdev
(compression deviation)
• Column G: compdevpercent
(compression deviation percent)
36 of 95
•
•
Column S: excdev
Column T: excdevpercent
(expression deviation)
(expression deviation percent)
Learning Point: Refer back to Section 1 of this lab manual for more information on
Compression and Exception deviation.
Create a descending sort on the data using Column D (changedate) using the steps below:
select Column D
• select the Data ribbon, then the Sort icon:
•
•
select Expand the selection (the default) and then click Sort
in the Sort dialog, select changedate, Values and Newest to Oldest as shown below:
• click OK
26. The 3 “CLX1.Tx00_Demo_Temp.PV” tags should appear at the very top of the sort (if they don’t, you
need to close this workbook and repeat steps 11 – 23).
37 of 95
Learning Point: These are the 3 tags you modified individually moments ago using the
SMT’s
Point Builder plug-in. Those same changes can also be performed in Excel using Tag
Configurator (i.e., the PI-SMT menu on the Add-Ins ribbon) and then exported back to the FT
Historian database. The advantage of using the Tag Configurator (as opposed to the SMT
Point Builder) is that you can make changes to a large number of tags (or all tags)
simultaneously and then export them back to the FT Historian database.
27. Scroll horizontally to column AN (span) and you should see that all 3 tags have the modified Span
value of 90.
28. We are not going to make (export) any additional tag changes at this time, so you can Exit Excel
(you do not need to save the ‘Book1’ file).
29. Return to the FactoryTalk Administration console and close any open dialog boxes.
30. Expand the Production Historian item and then open up the properties dialog for the FactoryTalk Live
Data Interface #1 (FTLD1) by right-clicking on the FTLD1 Interface and selecting Properties:
31. Note that the Service Status is ‘Started’ and the Startup Type is ‘Automatic’ as shown below:
38 of 95
32. Select the Scan Classes tab to observe the 10 default scan classes of the FactoryTalk Live Data
Interface (and the ability to add/modify scan classes):
39 of 95
33. Click OK to close the Data Collection Interface Properties dialog.
Learning Point: You have now verified the settings for your FactoryTalk Live Data (FTLD)
Interface #1. It is possible to have multiple FTLD interfaces (e.g., FTLD2, FTLD3, etc.)
associated with only one FT Historian server, but using multiple interfaces on multiple host
computers is beyond the scope of this basic lab.
Section Summary: In this section, you:
1. familiarized yourself with the tags that will be logged by the Historian in subsequent sections
2. verified the configuration of RSLinx Enterprise
3. created a new Historian Server, performed an Auto Discovery of tags and started data collection
4. used Point Builder to modify 3 Auto Discovery tags
5. used Excel and the Tag Configurator Add-Into view all the Historian tags and verify the changes
made in Point Builder
6. verified the FactoryTalk Live Data interface settings
40 of 95
Section 3: Trending with FactoryTalk View (~15 min)
Unless the data captured by the Historian is viewed and used, it is of very little value. One of the main
advantages of the FactoryTalk Historian is FactoryTalk View SE integration that will allow trends in View
SE screens to be displayed based on data in the Historian instead of (or in addition to) the View data log.
By adding the Historian View trending capability, Rockwell Automation has significantly improved the
retrieval speed of trend data based on the significantly improved time series data store that the new
Historian is based on. Not only is the data store more efficient storing and compressing the data, but it is
also significantly faster in retrieving that data for visualizing it in trends.
The updated trend module in View, works just as the original does, with the main difference, that pens can
now be configured based on data in the Historian (in addition to Live Data or View SE Datalogger data).
About This Section
In this section you will explore the following topics:
•
FactoryTalk View integration to the Historian
•
The Trending object for FactoryTalk View that has been modified for use with Historian data
•
How to add a trend to a View project and how to configure it to plot data from the Historian Follow the
steps below to complete Section 3.
Open View Studio
We will start by opening FactoryTalk View Studio.
1. From the Windows Start menu, select All Programs > Rockwell Software > FactoryTalk View >
FactoryTalk View Studio.
41 of 95
2. Select the View Site Edition (Network Station) application type as shown below:
Learning Point: FactoryTalk Historian SE does not integrate with View Site Edition
(Local Station or View Machine Edition applications.
3. Open the existing InstaCorp application:
Learning Point: The InstaCorp application was pre-created in the interest of saving time.
4. Maximize View Studio.
5. Observe that the Historian Server and FactoryTalk Live Data interface (FTLD1) are present under the
System tree and are integrated with View Studio in the same manner as the Administration Console:
42 of 95
Add a Trend to an Existing Display
1. Open the display process overview by double-clicking the display in the Graphics folder.
2. Add a new trend to the bottom of the screen by selecting the toolbar’s Trend button (looks like a
button with an “N” and circled below) or by selecting Objects > Advanced > Trend. Then, click and
drag a rectangular box selection on the lower portion of the display.
43 of 95
3. Right-click on the newly created trend object and select Properties….
44 of 95
4. On the General tab, note that the Data Server default = Real-time data server. Change this to
Poll historical data as shown below:
Learning Point: Real-time data server means that the data originates from the Historian
snapshot and only exception filtering has been applied (if configured). Poll historical data
means that the data originates from the Historian archive file, and that both exception and
compression filtering have been applied (if configured).
5. On the Pens tab, change the Pen Source to Historian Server.
45 of 95
6. Click on the Add Pen(s)… button and then click on “…” button to search for point names.
7. In the Tag Search dialog, change the Tag Mask field to “*.PV” (as shown below) and click Search:
46 of 95
8. The search should return 6 tags, but we are currently only interested in 3 of them. Using Ctrl-Click,
select the 3 Temperature related tags (recently renamed) as shown below:
9. Click the Tag Search dialog’s OK button.
10. Click the Add Pen Configuration dialog’s Add button.
47 of 95
11. Click the Add Pen Configuration dialog’s OK button.
12. Click the Trend Properties dialog’s OK button to save your 3 new pens:
48 of 95
13. Save the changes in the Process Overview graphic.
14. Minimize FactoryTalk View Studio and return to the desktop.
15. From the Desktop, double-click the FactoryTalk View Site Edition client icon: Instant Soap.cli. Wait
for the View SE client to launch completely.
16. The T100 temperature should be cycling without any user input. Start the T200 temperature cycling
by clicking the green T200 Start button in the display. Wait 5-10 seconds and then start the T300
temperature cycling by clicking the green T300 Start button.
49 of 95
Learning Point: As observed previously using the Rockwell Software Data Client, the T100
temperature cycles continuously. The T200 & T300 temperatures are controlled with the
buttons and the cycles run roughly 90 seconds. There is a short delay before the pens
appear because this is historical data from the FT Historian archive (as opposed to live data
from RSLinx Enterprise).
Leave the View SE Client open, because you will need it for the remaining sections of the lab.
Close View Studio.
Section 4: FactoryTalk Historian DataLink (~20 min)
As a valuable reporting tool for Historians, Microsoft® Excel® has traditionally been the tool of choice. The
main advantage being that a lot of users know how to use Excel, and Excel adds a layer of simple
calculation and formatting options to the data.
FactoryTalk Historian DataLink is a very advanced add-in for reporting using Excel. With the Excel add-in,
data can become immediately available in Excel either as data in tables or as data in trends. Excel can
then be used to add further analysis on to the data, and to format the data for simple reporting.
50 of 95
DataLink adds a new menu to Microsoft® Excel, from where it is possible to retrieve data in various
formats, such as archived data, sampled data, time filtered data, timed data etc. The Add-in works directly
with Excel formulas and expressions, and it is possible to use either the Excel time expressions or the
Historian time expressions to identify the time intervals for the data retrieval.
About This Section
In this section you will explore the following topics:
•
Using Excel for Reporting with the Historian
•
Summary reports with FactoryTalk Historian DataLink
•
Trends with FactoryTalk Historian DataLink
•
How to use Excel cells to configure the reports and trends (points and time line) Follow the steps
below to complete Section 4.
FactoryTalk Historian DataLink
FactoryTalk Historian DataLink provides a live link between the Historian database and Microsoft Excel.
DataLink is installed as a spreadsheet add-in, allowing users to quickly access real time or historical data
from the Historian. Using DataLink makes entering manual data and performing complex data
calculations a snap.
FactoryTalk Historian DataLink for Excel is built with OSIsoft's SDK product. It allows users who have
experience using Microsoft Visual Basic for Applications (VBA) to develop Excel routines that call SDK
functions.
The FactoryTalk Historian DataLink add-in for Excel provides users of Microsoft Excel with the ability to
retrieve data associated with tags on a FactoryTalk Historian Server, directly into a spreadsheet.
FactoryTalk Historian DataLink provides the following functions to retrieve data from FactoryTalk
Historian:
•
Current value
•
Value at a specific time
•
Tag attributes
•
Evenly spaced (sampled) data
•
Sampled data while a given expression is true
•
Compressed (archived) data
•
Compressed data while a given expression is true
•
Sampled data for a user specified array of timestamps
•
Data from calculations on FactoryTalk Historian tag expressions
•
Amount of time while a FactoryTalk Historian tag expression was true
•
Totals, minima, maxima, standard deviations, ranges, averages, counts and means for FactoryTalk
Historian tags and FactoryTalk Historian expressions
51 of 95
•
Tagname from a specified Point ID
•
Tagnames from specified attribute masks
•
Alias value from module database
•
Property value from module database
Specifying time in FactoryTalk Historian
Absolute (a specific point in time)
•
: (NOW)
•
t : 00:00:00 on the current day (TODAY)
•
18-feb-05 16:00:00
Relative (time is offset from another time)
•
+8h : + 8 hours
Combined
• t+8h : today + 8 hours
dd-mmm-yy HH:mm:ss
•
dd Day
•
mmm
•
yy Year
•
HH Hours in 24 hour format
•
mm Minutes
Month (Jan, Feb, Mar, Apr, May, …)
ss Seconds Example:
18-feb-05 10:43:29
"Date" fields default to the current date "Time"
fields default to 00.
Absolute Time – Other Formats
Absolute time formats
52 of 95
Relative Time
Number of:
•
•
•
•
•
•
•
Hours (h)
Minutes (m)
Seconds (s)
Weeks (w)
Days (d)
Years (y)
Months (m)
Leading sign (+ or -) is required.
No default time unit: must specify d, h, m, s, w, mo, or y
Can use fractions only for Hours, Minutes and Seconds
+2.5h, -0.5m
Relative time is most often part of a Combined time
Combined Formats
•
Uses both an absolute and a relative time
•
The absolute part of the time can be *, T, Y, or a day of the week
53 of 95
Open Excel
1. Double-click the Excel file ‘Tank Temperatures.xls’ on the desktop.
2. Select the PI ribbon and observe the various functions available for use with the Historian data. With
this menu it is possible to extract data points to Excel for calculations, displaying trends, etc.:
Learning Point: In order for the PI ribbon to display in Excel, you must first install the
DataLink Client from the FactoryTalk Historian CD. In this lab, these steps have been
completed for you in the interest of saving time.
Create a summary report
The report template is pre-populated with logo and text, but does not have any data yet. We will add some
data points and a trend.
3. Select cell B5 and then select Compressed Data > Values for today from the PI ribbon:
54 of 95
55 of 95
4. In the Compressed Data dialog, enter/select the following (as shown below):
•
•
•
Time Range
Start Time to “*”
End Time” to “*-30s”
select hide count
select show timestamps
5. Next, click the Tagname(s) button to open the Tag Search dialog.
6. In the Tag Search dialog, select Favorites > Last Search (which should be “*.PV”). Select the
“CLX1.T100_Demo_Temp.PV” tag (as shown below) and click the OK button:
56 of 95
3. Click the Compressed Data dialog OK button (lower right hand corner) to export the data into Excel
as shown below.
Learning Point: The data for Tank 100 is always changing in the SoftLogix controller;
however DataLink only shows you a “point-in-time” snapshot of the data that was stored in
the FT Historian. To refresh the Tank 100 data, select the toolbar Update button (the default
is every 5 seconds).
4. Return to Excel and repeat steps 1-5 for Tank 200 (cell E5), this time selecting the
“CLX1.T200_Demo_Temp.PV” tag in step 5.
57 of 95
Learning Point: For Tank 200, you should receive records time stamped at 1 second
intervals even if the data is not changing. The time stamps are every 1 second because there
is no exception or compression deviation and the T200 point is Polled (as opposed to
Advised).
5. Return to Excel and repeat steps 1-5 for Tank 300 (cell H5), this time selecting the
“CLX1.T300_Demo_Temp.PV” tag in step 5.
Learning Point: Expect no values for T300 initially because – like T100 - this point is
Advised (as opposed to Polled) and because its temperature cycle must be started manually
using the Start button in the View SE client.
6. Return to the FactoryTalk View SE client and Start the cycle for Tank 200. Return to Excel and
observe the timestamps that begin to populate column E and the changing values that begin to
populate column F.
Learning Point: Return to the FactoryTalk View SE client to monitor and control the cycle for
Tanks 200 and 300. Return to Excel to observe the changes.
7. Optional: Observe that the most recent data is at the top of the 3 ‘Temp’ columns. This can be
changed by reversing the times specified in Step 2 to Start Time of “-30s”, the End Time to “*”.
8. Select cell K5 in the worksheet’s open space to the right and select Insert Trend from the PI ribbon:
58 of 95
9. In the Trend Wizard, select “Data from PI” and click the “…” button to select the tags.
9. In the Tag Search dialog, select Favorites > Last Search.
10. This time select all three “Demo_Temp.PV” tags. Click OK.
59 of 95
11. Select the Markers box for all three points as shown below and click Next:
Learning Point: When checked, a data event is indicated with a Marker on the trace.
12. Set the “StartTime” to “*-2m”, the “End Time” to “*”, and check Enable Updates (as shown below)
then click Next:
60 of 95
13. Change the Trend Title to “Temperature Trend” (as shown below) and click Finish to add the trend to
the report.
14. The report is now finished with actual data and a trend:
61 of 95
Learning Point: This data is from the FT Historian archive. Each data event in the archive is
indicated with a marker on the trace. For more information, right-click on the trend, select
Define Trend and click Help.
15. Make sure that the upper-left most cell of the Trend is K5. If not, move the trend by right-clicking on
the Trend and selecting “Move/Resize” and entering K5:
Create a Report with Flexible Parameters
FactoryTalk Historian DataLink is tightly integrated with Excel, so that Excel cells can be accessed as
flexible parameters for the components from the DataLink menu. The trend can be made more dynamic
by linking it to cell based time specifications.
1. Select the following cells in row 3 (above the existing trend) and enter the following text:
•
•
•
•
Cell L3: “Start time:”
Cell M3: “*-15m”
Cell N3: “End time”
Cell O3: “*”
2. Right-click on the trend and choose Define Trend Time Range.
62 of 95
3. Use the cell pickers on the right hand side of both time fields to link the appropriate worksheet cells to
the start and end times as shown below:
4. Click Finish. Change the Start time (M3) and End time (O3) values and observe how it affects the
chart.
5. Exit Excel. You do not need to save the file.
Section 5: FactoryTalk VantagePoint (~30 min)
About this Section
FactoryTalk® VantagePoint provides unified access to virtually all manufacturing/plant data sources, and
produces web-based reports, such as dashboards, trends, X-Y plots, Microsoft® Excel reports and more
63 of 95
that can be used by manufacturing operators, engineers, supervisors, management and executives
throughout a plant — to manage cost, quality, production, assets and resources more effectively.
FactoryTalk VantagePoint is configured to connect to Logix and FactoryTalk Historian so users can begin
producing meaningful, pre-configured reports almost immediately
Create Instance of the production line and Tank
1. Launch VantagePoint Manager (Start > All Programs > Rockwell Software> FactoryTalk
VantagePoint > Manager).
1. The left hand pane displays the VantagePoint model (tree-like structure). Select MyEnterprise.
2. Right-click on MyEnterprise and select New > Folder. Name the folder “InstaCorp”.
3. Right-click on InstaCorp and select New > Folder. Name the folder “Reports”
64 of 95
Learning Point: Later in the lab, we’ll place the InstaCorp related reports we create in this
folder.
4. Right-click on InstaCorp and select New > Folder. Name the folder ”InstaSoap”.
5. Right-click on InstaSoap and select New > Folder. Name the folder “Mixing”.
6. Right-click on Mixing and select New > Folder. Name the folder “Tank100” Repeat and also
create “Tank200”. Repeat and also create “Tank300”:
Learning Point: Later in the lab, we’ll place tags in these 3 “Tank” folders.
Create a FactoryTalk connector
7. In the VantagePoint model, navigate to System.Sources.FactoryTalk.
65 of 95
Learning Point: The FactoryTalk connector is for the ‘Production Historian’ we created in the
FT Administration Console earlier in the lab.
The FactoryTalkHistorian connector is for additional FactoryTalk Historians that are “external”
(i.e., reside in a different FactoryTalk Directory).
8. Right-click on the FactoryTalk node and select New > Item.
9. In the User name field, enter ftadmin. In the Password field, enter ftadmin. Check the checkbox
that states “This is an existing account. Use it as the FactoryTalk user instead” as shown below:
66 of 95
Learning Point: In the interest of saving time, the FactoryTalk User name ‘ftadmin’ was
precreated for you.
10. Click Next.
11. Select the option Yes, please and click Finish.
12. Select the option I would like to import FactoryTalk Historian tags and click Next.
67 of 95
13. Check the Production Historian option and click Next
14. The Historian ME dialog is not applicable to this lab, so simply click Finish.
68 of 95
15. After 60-75 seconds you will see a dialog box when the import is completed:
16. Click OK.
17. In the VantagePoint model, navigate to
System.Sources.FactoryTalk.localhost.Historians.ProductionHistorian.Tags.
18. You should see all of the imported Historian tags in the lower left hand pane.
69 of 95
Using Trend
In this section, you will explore many of the features available in VantagePoint Trend.
Start Trend
1. Launch VantagePoint Trend (Start > All Programs > Rockwell Software> FactoryTalk
VantagePoint > Trend)
2. Navigate to System.Sources.FactoryTalk.localhost.Historians.Production Historian.Tags as
shown below:
3. Select the Filter Item icon:
70 of 95
4. Expand the Filter by clicking the down arrow:
5. Enter ‘Demo_Temp’ in the Name field as shown below and click Apply.
6. The list of tags is filtered to only show tags that contain “Demo_Temp” in the tag name. Find the
following 3 tags in the tags list and drag-and-drop them into the trace window on the right.
•
CLX1.T100_Demo_Temp.PV
•
CLX1.T200_Demo_Te
mp.PV
CLX1.T300_Demo_Temp.PV
Your screen should look nearly identical to the one below:
71 of 95
Learning Point: Notice that the timestamps do not change because this Trend is
currently only a “point in time snapshot” until Live Mode is selected.
7. On the Trend tool bar, select Live Mode
to get the live/refreshing trend data.
8. Return to the FactoryTalk View SE client and Start the T200 Temp Cycle. Return to Trend and
observe the trace for T200.
9. Return to the FactoryTalk View SE client and Start the T300 Temp Cycle. Return to Trend and
observe the trace for T300.
10. On the Trend tool bar, enable the X/Y cursors to perform trace analysis.
11. On the Trend tool bar, zoom in and out.
12. On the Trend tool bar, de-select Live Mode
, then Pan left and right.
Publish a Trend
72 of 95
Publishing is used to make your trend report visible to any licensed FT VantagePoint user through a
browser. It facilitates process analysis by allowing users to share trends.
13. Using the trace from the previous section, select File > Publish.
14. Select the MyEnterprise.InstaCorp.Reports folder.
15. In the Name field, enter “Mixing Tank Temperatures Trend” and then click the Publish button (as
shown below):
16. Launch VantagePoint Portal (Start > All Programs > Rockwell Software> FactoryTalk
VantagePoint > Portal).
73 of 95
Learning Point: The VantagePoint Portal works with Internet Explorer and is used on client
computers where only viewing of reports is required.
17. On the Portal menu, select Reports > MyEnterprise.
18. Browse the tree to MyEnterprise.InstaCorp.Reports and select Mixing Tank Temperatures Trend.
74 of 95
19. The Trend is generated and displayed in the pane on the right.
20. Return to the FactoryTalk View SE client and Start the T200 Temp Cycle. Return to Trend and
observe the trace for T200.
21. Return to the FactoryTalk View SE client and Start the T300 Temp Cycle. Return to Trend and
observe the trace for T300.
22. Optional: Launch other Sample Reports under the MyEnterprise folder. When finished, Close
VantagePoint Portal (Internet Explorer). Close VantagePoint Trend (if still open).
Creating a Basic Excel Report
75 of 95
In this section, you will use the VantagePoint Excel Add-in wizard to create a simple report. The wizard
will guide you through the steps necessary to bring VantagePoint’s rich data into Excel where it can be
formatted to create powerful reports.
1. Return to VantagePoint Manager.
2. Navigate to System.Sources.FactoryTalk.localhost.Historians.Production Historian.Tags as
show below:
3. Drag and drop CLX1.T100_Demo_Temp.PV into the recently created Tank100 folder. Click on
Tank100 and ensure that the tag appears in the Item Name area as shown below:
4. Navigate again to System.Sources.FactoryTalk.localhost.Historians.Production Historian.Tags
5. Drag and drop CLX1.T200_Demo_Temp.PV into the recently created Tank200 folder.
76 of 95
6. Navigate again to System.Sources.FactoryTalk.localhost.Historians.Production Historian.Tags
7. Drag and drop CLX1.T300_Demo_Temp.PV into the recently created Tank300 folder.
8. Close (or minimize) VantagePoint Manager.
Create a Tank Temperature Report
1. Launch Microsoft Excel.
2. Select the VantagePoint ribbon.
3. Select Insert Function as shown below:
4. Select the History option and click Next.
5. Navigate to MyEnterprise.InstaCorp.InstaSoap.Mixing.Tank100.
6. Select the CLX1.T100_Demo_Temp.PV tag and move it to the right pane using the > button as
shown below:
77 of 95
7. Repeat Step 6 for CLX1.T200_Demo_Temp.PV tag and CLX1.T300_Demo_Temp.PV.
8. Click Next.
9. In the Time Selection dialog, select the Last minute from the drop down time selector and click Next.
78 of 95
10. In the Data Options dialog:
• deselect Quality - Include All and select Good
• select the Data Format as Wide
• select the Skip Advanced options checkbox as shown below:
11. Click Next.
12. In the Function Options dialog, retain all the default settings and click Finish.
13. Your Excel work sheet should look very similar to the one below:
79 of 95
Format the Report
1. Right-click on the tab Sheet2 and select Delete. Repeat for tab Sheet3.
2. Right-click on the sheet named Parameters and select Hide.
3. Right-click on Sheet1, select Rename and enter Mixing Tank Temperatures.
4. Click the Quick Access Toolbar’s Refresh button to analyze data over the last one minute.
5. Save the Excel file on the desktop with the name Mixing Tank Temperatures Report.xlsx.
Learning Point: An Excel chart can also be included this report.
Publish the Report
1. Click the Quick Access Toolbar’s Publish button.
2. In the Report Type Selection dialog, accept the default A report with parameters and click Next:
3. In the External Parameters dialog, select Tags and click Next:
80 of 95
4. In the Report Folder Selection dialog, select MyEnterprise.InstaCorp.Reports as the location to
publish and accept Mixing Tank Temperatures Report as the name and click Next:
5. In the Summary dialog, select Browse to published report and click Finish. Your published report
should be displayed in the VantagePoint Portal. Click “Generate” to refresh the report.
Learning Point: This report is now available to any licensed VantagePoint client with a
browser. Excel is not needed on the client computer to view the report.
6. On the Portal menu, Reports > MyEnterprise.
7. Navigate to MyEnterprise.InstaCorp.Reports. Your published Mixing Tank Temperatures Report
should be located there (in addition to the Mixing Tank Temperatures Trend created earlier).
81 of 95
82 of 95
Section 6: FactoryTalk Historian Backup (~10 min)
It’s important to backup the FT Historian SE, so that you don’t lose data and configuration information. All
backups of FT Historian SE that are done while the system is running are managed by the PI Backup
Subsystem (PI\bin\pibackup.exe). Typically, the backups are launched via the C:\Program
Files\FactoryTalk Historian\Server\PI\adm\pibackup.bat backup script. The pibackup.bat script can be
used to start a backup from the command line or in a scheduled task. It is highly recommended to
perform a backup at least daily and to external media.
About This Section
In this section you will explore the following topics:
•
Scheduling an automatic backup
•
Testing the scheduled backup
Follow the steps below to complete Section 6.
Scheduling an Automatic Backup
1. Open a Command Prompt. At the command prompt, enter “set PI” to display the four (4) FT
Historian Environment Variables as shown below:
2. At the command prompt, enter “cd %piserver%”. This should navigate to C:\Program
Files\Rockwell Software\FactoryTalk Historian\Server
3. At the command prompt, enter “cd adm”. This should navigate to C:\Program Files\Rockwell
Software\FactoryTalk Historian\Server\adm
4. Create a manual task backup to the C:\FTHBackup folder by entering the following command at the
command prompt:
pibackup.bat C:\FTHBackup\ -install
Learning Point: This pibackup.bat command with the ‘–install’ switch automatically creates a
scheduled backup task in the Windows Operating System for subsequent use. If the
destination folder (in this case C:\FTHBackup) does not already exist, it is created
83 of 95
automatically. Note: In a production environment, the backup destination should be on
external media.
When the command window indicates that the script has completed successfully, open the Window’s
Scheduled Tasks by selecting: Start > All Programs > Accessories > System Tools > Task
Scheduler. You should have a new scheduled task named “PI Server Backup” that has yet to be
executed:
Learning Point: Notice that the “Last Run Time” = Never. This backup has only been
scheduled, but not actually executed.
Testing the Scheduled Backup
1. Right-click on the “PI Server Backup” scheduled task and select Run. The ‘Status’ field for this task
should change to “Running” and the “Last Run Time” field should be updated with the current time.
Note: The initial backup will take ~1 minute to complete.
2. When the status disappears, the task is complete. Using Windows Explorer, navigate to the
“FTHBackup” folder in the root of C and examine the contents of that folder.
3. Repeat the Backup (step #1) again. When the task is complete, return to the “FTHBackup” folder
and notice the additional pibackupdatetime.txt file.
84 of 95
Learning Point: The second backup you performed created a second text file and added
new data the first (i.e., it is “incremental”). Each subsequent scheduled backup will also be
incremental (and will create another text file).
4. Right-click on the “PI Server Backup” schedule task and select Properties. Observe the 4 tabs and
the settings that can be changed to modify this scheduled task:
5. Close the PI Server Backup dialog, the Task Scheduler and Windows Explorer.
Section 7: Optional Advanced Applications (~15 min)
The raw data captured into a Historian can become much more valuable, when you put applications on
top of that data. Some of the obvious applications are server side calculations that take a combination of
collected values and generate new values using expressions.
85 of 95
Performance Equations and Totalizers are used for just that. Performance Equations (PE’s) are used to
generate derived values based on collected values and Totalizers are used to generate statistical results
based on the captured data.
About This Section
In this section you will explore the following topics:
•
Using Performance Equations for generating
derived values
•
Using Totalizers for Statistical Analysis Follow
the steps below to complete Section 7
Create a Performance Equation
1. Launch the System Management Tools (from the Windows Start menu, select All Programs >
Rockwell Software > FactoryTalk Historian > System Management Tools).
2. Navigate to the “Performance Equations” editor under the “Points” group.
3. Click on the new performance equation toolbar icon to the left of “Tag Mask”.
86 of 95
4. On the general tab, fill in the Name “Tank_Combined_Volume” and Descriptor “Combined volume of
T100 and T200”. Select the Point type “Float32” as shown below:
5. On the “Equation” tab, manually enter the Equation below - or - use the Equation browse button to
search for the tags to build this equation:
‘InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Volume.PV’ +
‘InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T200_Demo_Volume.PV’
Learning Point: The volume tags still have their original (long) names because we did not
rename them in Section 2 them like we did the temperature tags.
87 of 95
6. Click the Evaluate button to check the syntax. Correct any syntax errors before proceeding.
7. On the “Scheduling” tab, specify Clock scheduling and a “Scan class” of 1 as shown below:
Learning Point: On our system, a Performance Equation scan class of 1 corresponds to a
recalculation every 1 second as defined in the file pipeschd.bat.
Do not confuse Performance Equation scan classes with Interface Node scan classes that
were mentioned briefly in Section 2.
Interface Node scan classes are used by the interface to determine data collection rates.
Performance Equation scan classes are used by the server to determine calculation rates.
8. On the “Archive” tab, specify a “Span” = 1000.
88 of 95
9. Finally, click the save performance equation icon on the toolbar. You should see a new “Successfully
created PE Tag…” session record:
89 of 95
10. Navigate to the Current Values plug-in under the “Data” group and view (add) the two tank volumes
tags and the new ‘Tank_Combined_Volume’ PE tag as shown below. Make sure you click the start
button on the toolbar to initiate the updates:
Learning Point: The ‘Tank_Combined_Value’ PE tag should update every 1 second based
on the scan class selected (1).
Create a Totalizer
1. Select the Totalizers plug-in under the Points group.
2. Click the new totalizer icon to the left of the “Tag Mask”.
90 of 95
3. Complete the Name & Type tab as shown below:
Name
field:
T100_Temp_Cycle_Avg
Source Tag: CLX1.T100_Demo_Temp.PV
Point Type: Float32.
Totalizer Type: Summary Calculation
Block, Time-Weighted, Average
91 of 95
92 of 95
4. On the Sampling tab, use the following filter expression:
‘CLX1.T100_Demo_Temp.PV’ > 60.1
Learning Point: The quotes must be exact.
5. Complete the Results tab as shown below: Write final results: Based on a trigger event
Details: When the following expression changes ‘CLX1.T100_Demo_Temp.PV’ > 60.1 (Same
expression as used on the Sampling tab)
Write interim results: Do not write interim results
6. Complete the Archive tab as shown below:
Typical value = 100; Zero = 0; Span = 150
Exception Deviation = 0 Compression Deviation = 0
93 of 95
7. Finally, click the Save icon.
8. Open the Archive Editor plug-in under the Data group.
9. Use the tag search to locate the new totalizer: T100_Temp_Cycle_Avg.
10. Click the “Get Events” button and examine the entries.
94 of 95
This concludes the lab.
Thanks for attending!
Notes
95 of 95
Download