FactoryTalk Historian SE Basic Lab 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 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 3 of 9 9 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 .................................................................................................................... 79 Section 6: FactoryTalk Historian Backup (~10 min) .............................................................................. 86 About This Section ...................................................................................................................................... 86 Scheduling an Automatic Backup ............................................................................................................... 86 Testing the Scheduled Backup ................................................................................................................... 87 Section 7: Optional Advanced Applications (~15 min) ......................................................................... 89 About This Section ...................................................................................................................................... 89 Create a Performance Equation ................................................................................................................. 89 Create a Totalizer ........................................................................................................................................ 94 4 of 9 9 Be fore you be gin At the conclusion of the presentation, read Section 1 – Introduction to Historian. About t his la b 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. T ools & pre re quisit e s 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 5 of 9 9 Doc um e nt Conve nt ions 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. 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. 6 of 9 9 Se c t ion 1 : I nt roduc t ion t o H ist oria n (~1 0 m inut e s) 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 T his Se c t ion 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 7 of 9 9 H ist oria n a pplic a t ions 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 9 9 H ist oria n Arc hit e c t ure s / Dist ribut e d H ist oria n 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 9 9 Ca pt uring T im e -se rie s da t a vs. Re la t iona l da t a 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. Filt e ring a nd Com pre ssion 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. The first step is the Exception test. This test filters all values out that only differ slightly from the previous value. 1 0 of 9 9 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. 1 1 of 9 9 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. 1 2 of 9 9 Se c t ion 2 : Configura t ion a nd Se t up (~3 5 m in) 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 T his Se c t ion 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 t im e -se rie s da t a c olle c t ion 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. 1 3 of 9 9 First, some terminology: • A control system tag or memory tag refers to a name assigned to a register in the control system or HMI. • 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. Che c k t he t a gs in Logix 5 0 0 0 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. 1 4 of 9 9 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: 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. 1 5 of 9 9 Ope n Fa c t oryT a lk Adm in Console a nd c he c k Da t a Sourc e s 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: 1. From the Windows Start menu, select All Programs > Rockwell Software > FactoryTalk Administration Console 2. When prompted select the Network FactoryTalk 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): 1. InstaCorp 2. 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. 1 6 of 9 9 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: 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 FactoryTalk Live Data Test Client. Be patient while the data collection is initialized. 1 7 of 9 9 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). Later in the lab, this span will be configured in the properties of each Historian tag. 12. Close the Live Data Client. Cre a t e a ne w H ist oria n Se rve r With the connection to the controller verified, are now ready to create a connection to the Historian Server. 1. Return to the FT Administration Console, expand the Connections folder, and then select the Historical Data folder: Learning Point: Note the absence of any connection from the application tree to a Historian server. 1 8 of 9 9 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’. Create a connection to your Historian Server by pressing the Test Server Connection button: Be patient…this may take a few seconds… 1 9 of 9 9 4. When the Server connection is created, click Finish: Assign Lic e nse s 1. Verify that the ‘Production Historian’ Server and the ‘FTLD1’ Factory Talk Live Data Interface #1 now appear under the Connections > Historical Data folder in the System tree. Learning Point: The ‘FTLD1’ Factory Talk Live Data Interface #1 was created silently along with the Historian Server connection in the previous step. 2 0 of 9 9 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 neither of the two available FHSE.50K licenses supplied by the Activation Server have been assigned. Assign one (1) license by changing the “Assigned” 0 to a 1 (as shown below), and click Apply: Learning Point: The one available FHSE.Advanced license is not required for this Basic Lab, so assigning it is optional. 2 1 of 9 9 4. Select the Point Sources tab and notice that the Points In Use column = 0 for all three rows: 5. Click OK to close the Historian Server Connection Properties dialog. Disc ove ring H ist oria n Point s 1. Return to the Mixing folder as shown below: 2 2 of 9 9 2. Right-click the Mixing folder and select Discover Historian Points as shown below: 3. Configure the Auto Discovery parameters as shown below: • • • • • Accept the Default scan rate (1 second) De-select all the data sources except Linx Enterprise Accept the Mixing sub-area as the starting point for the search Select Enable data type filter Click Next to discover the controller(s) and configure the tags Learning Point: We de-selected the other 3 sources to speed up the search process and since we did not click Edit Discovery Rules, we are using the default Discovery Rules configuration. 2 3 of 9 9 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: 2 4 of 9 9 6. The system will configure the points to be collected in the Historian Learning Point: Using the default Discovery Rules, the Auto Discovery wizard discovered 1423 tags in our SoftLogix Controller (including 71 diagnostic tags) and assigned them to scan class 1 (1 second). However, there are far more than 1423 tags present in the SoftLogix Controller. To discover the additional tags, you would need to modify the default Discovery Rules and re-run the Auto Discovery wizard - or - perform manual tag addition using Add Individual Historian Points wizard. St a rt Da t a Colle c t ion 1. Click the Start button to start the FactoryTalk Live Data (FTLD) Interface as shown below: 2. Click OK to close the ‘New Historian Point Discovery Complete’ dialog: Learning Point: Historian is now examining 1423 SoftLogix controller points every 1 second. However, this does not equate to 1423 archive records per second unless all the values are changing every second. This collection behavior is configurable and will be addressed later in the lab. 2 5 of 9 9 M odify t he Point s w it h t he SM T ’s Point Builde r 1. Open up the properties dialog for the Production Historian Server by right-clicking on the server and selecting Properties: 2. Return to the General tab and click the Launch System Management Tools button: 2 6 of 9 9 Learning Point: The PI 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, select 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. 2 7 of 9 9 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 tags are found, stop and ask for assistance (Stale tags can be ignored at this time). 6. Select and expand the Points category and then double-click Point Builder icon to launch the Point Builder plug-in: 2 8 of 9 9 7. Within the Point Builder utility, click the Search Toolbar Icon as shown below: 8. In the Tag Search dialog, change the Tag Mask field to “ *.PV ” (as shown below) and click Search: 2 9 of 9 9 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 10. Click OK to return to the Point Builder. Highlight the first tag and click the Rename button: 3 0 of 9 9 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: 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 CLX1.T100_Demo_Temp.PV 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. 3 1 of 9 9 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 • click the toolbar Disk icon (Save) 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 or Compression filtering so that we can compare it to points with default Exception and Compression filtering. 3 2 of 9 9 17. Now select to the Classic Tab for CLX1.T200_Demo_Temp.PV. Make the point Polled (as opposed to Advised) by changing Location3 from 1 to 0 as shown below: Learning Point: See the table below for the locations definitions. The Location3 edit above makes CLX1.T200_Demo_Temp.PV from Unsolicited/Advised to Polled. 18. Click the toolbar Disk icon (Save). Learning Point: Historian points can be Polled, Advised (default) or Output. Advised tags are sent to the Historian snapshot only if they are changing beyond the Exception Deviation. Polled tags are periodically sent to the Historian snapshot even if the value does not change. With the T200 point changed to Polled (and Exception and Compression disabled), the Temperature for Tank T200 will be placed in the archive every one second even if the value does not change. 3 3 of 9 9 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: 3 4 of 9 9 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: 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 media 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: 3 5 of 9 9 Learning Point: Typically, you would change the defaults in this dialog to filter/limit the number of tags you import into Excel. 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: 3 6 of 9 9 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) • Column S: excdev (expression deviation) • Column T: excdevpercent (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 3 7 of 9 9 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 19 – 25). 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 numerous changes to multiple 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: 3 8 of 9 9 31. Note that the Service Status is ‘Started’ and the Startup Type is ‘Automatic’ as shown below: 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): 3 9 of 9 9 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 4 0 of 9 9 Se c t ion 3 : T re nding w it h Fa c t oryT a lk V ie w (~1 5 m in) 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 T his Se c t ion 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. 4 1 of 9 9 Ope n V ie w St udio We will start by opening FactoryTalk View Studio. 1. From the Windows Start menu, select All Programs > Rockwell Software > FactoryTalk View > FactoryTalk View Studio. 2. Select the View Site Edition (Network Station) application type as shown below: Learning Point: FactoryTalk Historian SE only integrates with View Site Edition (Network Distributed) and View Site Edition (Network Station) applications. 4 2 of 9 9 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: 4 3 of 9 9 Add a T re nd t o a n Ex ist ing Displa y 1. Open the display process overview by double-clicking the display in the Graphics folder. 4 4 of 9 9 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. 4 5 of 9 9 3. Right-click on the newly created trend object and select Properties…. 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 (memory) 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). 4 6 of 9 9 5. On the Pens tab, change the Pen Source to Historian Server. 6. Click on the Add Pen(s)… button and then click on “…” button to search for point names. 4 7 of 9 9 7. In the Tag Search dialog, change the Tag Mask field to “*.PV” (as shown below) and click Search: 8. The search should return 6 tags, but we are currently only interested in 3 of them. Using Ctrl-Click, select the 3 recently renamed temperature related tags as shown below: 9. Click the Tag Search dialog’s OK button. 4 8 of 9 9 10. Click the Add Pen Configuration dialog’s Add button. 11. Click the Add Pen Configuration dialog’s OK button. 4 9 of 9 9 12. Click the Trend Properties dialog’s OK button to save your 3 new pens: 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 shortcut. Wait for the View SE client to launch completely. 5 0 of 9 9 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. 17. Wait 5-10 seconds and then start the T300 temperature cycling by clicking the green T300 Start button. 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. 5 1 of 9 9 Se c t ion 4 : Fa c t oryT a lk H ist oria n Da t a Link (~2 0 m in) ® ® 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. ® 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 T his Se c t ion 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. Fa c t oryT a lk H ist oria n Da t a Link 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. 5 2 of 9 9 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 Tagname from a specified Point ID Tagnames from specified attribute masks Alias value from module database Property value from module database Spe c ifying t im e in Fa c t oryT a lk H ist oria n 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 5 3 of 9 9 dd-mmm-yy HH:mm:ss • • • • • • dd Day mmm Month (Jan, Feb, Mar, Apr, May, …) yy Year HH Hours in 24 hour format mm Minutes 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 5 4 of 9 9 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 5 5 of 9 9 Ope n Ex c e l 1. Double-click the Excel file ‘Tank Temperatures.xls’ on the desktop. 2. Select the PI DataLink ribbon and observe the various functions available for use with the Historian data. With this menu it is possible to extract Historical Data to Excel for calculations, displaying trends, etc.: Learning Point: In order for the PI DataLink ribbon to display in Excel, you must first install the DataLink Client from the FactoryTalk Historian media. In this lab, these steps have been completed for you in the interest of saving time. Cre a t e a sum m a ry re port 1. 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. 2. Select cell B5 and then select Compressed Data > Values for today from the PI DataLink ribbon: 5 6 of 9 9 3. 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 time stamps 4. Next, click the Data items(s) button to open the Search dialog. 5 7 of 9 9 5. In the Search dialog, select the second “VM-DATA” as shown below: Learning Point: The first “VM-DATA” is the FactoryTalk Asset Framework Server (as opposed to the FactoryTalk Historian Server). 6. In the Search dialog, enter “*.pv” as shown below and click the then search icon: 5 8 of 9 9 7. Select \\VM-DATA\CLX1.T100_Demo_Temp.PV and click the OK button to close the Search Dialog and then OK again 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 periodically refresh the Tank 100 data, click the toolbar Update button (the default is every 5 seconds and shown in the lower left hand corner of Excel). 8. Return to Excel and repeat steps 2-6 for Tank 200 (cell E5), this time selecting the “CLX1.T200_Demo_Temp.PV” tag in step 5. Learning Point: Recall that for Tank 200, we modified its configuration for no exception or compression filtering and to be Polled (as opposed to Advised or Output). Therefore, you should receive records at 1 second intervals even if the data is not changing. 9. Return to Excel and repeat steps 2-6 for Tank 300 (cell H5), this time selecting the “CLX1.T300_Demo_Temp.PV” tag in step 5. 5 9 of 9 9 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. 10. 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. 6 0 of 9 9 11. 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 “*”. 12. Select cell K5 in the worksheet’s open space to the right and select Insert Trend from the PI DataLink ribbon: 13. 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. 6 1 of 9 9 10. This time select all three “Demo_Temp.PV” tags. Click OK. 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. 6 2 of 9 9 12. Set the “StartTime” to “*-2m”, the “End Time” to “*”, and check Enable Updates (as shown below) then click Next: 13. Change the Trend Title to “Temperature Trend” (as shown below) and click Finish to add the trend to the report. 6 3 of 9 9 14. The report is now finished with actual data and a trend: 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: Cre a t e a Re port w it h Fle x ible Pa ra m e t e rs 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: “*” 6 4 of 9 9 2. Right-click on the trend and choose Define Trend Time Range. 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. 6 5 of 9 9 Se c t ion 5 : Fa c t oryT a lk V a nt a ge Point (~3 0 m in) About t his Se c t ion 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 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”. 6 6 of 9 9 3. Right-click on InstaCorp and select New > Folder. Name the folder “Reports” 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. 6 7 of 9 9 Create a FactoryTalk connector 7. In the VantagePoint model, navigate to System.Sources.FactoryTalk. 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. 6 8 of 9 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: 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. 6 9 of 9 9 12. Select the option I would like to import FactoryTalk Historian tags and click Next. 13. Check the Production Historian option and click Next 7 0 of 9 9 14. The Historian ME dialog is not applicable to this lab, so simply click Finish. Learning Point: This import is from the FT Historian (as opposed to the SoftLogix Controller). 15. After 60-75 seconds you will see a dialog box when the import is completed: 16. Click OK. 7 1 of 9 9 17. Navigate to System.Sources.FactoryTalk.localhost.Historians.ProductionHistorian.Tags as shown below: 18. You should see all of the imported Historian tags in the lower left hand pane. U sing T re nd 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) 7 2 of 9 9 2. Navigate to System.Sources.FactoryTalk.localhost.Historians.Production Historian.Tags as shown below: 3. Select the Filter Item icon: 4. Expand the Filter by clicking the down arrow: 7 3 of 9 9 5. Enter ‘Demo_Temp’ in the Name field and select Contains in the Condition 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_Temp.PV CLX1.T300_Demo_Temp.PV Your screen should look nearly identical to the one below: 7 4 of 9 9 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 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): 7 5 of 9 9 7 6 of 9 9 16. Launch VantagePoint Portal (Start > All Programs > Rockwell Software> FactoryTalk VantagePoint > Portal). 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. 7 7 of 9 9 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). 7 8 of 9 9 Cre a t ing a Ba sic Ex c e l Re port 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: 7 9 of 9 9 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. 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. 8 0 of 9 9 6. Select the CLX1.T100_Demo_Temp.PV tag and move it to the right pane using the > button as shown below: 7. Repeat Step 6 for CLX1.T200_Demo_Temp.PV tag and CLX1.T300_Demo_Temp.PV. 8. Click Next. 8 1 of 9 9 9. In the Time Selection dialog, select the Last minute from the drop down time selector and click Next. 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. 8 2 of 9 9 13. Your Excel work sheet should look very similar to the one below: 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: 8 3 of 9 9 3. In the External Parameters dialog, select Tags and click Next: 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. 8 4 of 9 9 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). 8 5 of 9 9 Se c t ion 6 : Fa c t oryT a lk H ist oria n Ba c k up (~1 0 m in) 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 T his Se c t ion 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. Sc he duling a n Aut om a t ic Ba c k up 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 8 6 of 9 9 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 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. T e st ing t he Sc he dule d Ba c k up 1. Right-click on the “PI Server Backup” scheduled task and select Run. Then click the Refresh icon. 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. 8 7 of 9 9 3. Repeat the Backup (step #1) again. When the task is complete, return to the “FTHBackup” folder and notice the additional pibackupdatetime.txt file. 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” scheduled task and select Properties. Observe the 6 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. 8 8 of 9 9 Se c t ion 7 : Opt iona l Adva nc e d Applic a t ions (~1 5 m in) 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. 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 T his Se c t ion 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 Cre a t e a Pe rform a nc e Equa t ion 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. 8 9 of 9 9 3. Click on the new performance equation toolbar icon to the left of “Tag Mask”. 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: 9 0 of 9 9 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. 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. 9 1 of 9 9 8. On the “Archive” tab, specify a “Span” = 1000. 9. Finally, click the save performance equation icon on the toolbar. You should see a new “Successfully created PE Tag…” session record: 9 2 of 9 9 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). 9 3 of 9 9 Cre a t e a T ot a lize r 1. Select the Totalizers plug-in under the Points group. 2. Click the new totalizer icon to the left of the “Tag Mask”. 9 4 of 9 9 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 9 5 of 9 9 4. Select the Sampling tab and configure as shown below: ‘CLX1.T100_Demo_Temp.PV’ > 60.1 Learning Point: The single quotes must be correct. 5. Select the Results tab and configure 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 9 6 of 9 9 6. Select the Archive tab and configure as shown below: Typical value = 100; Zero = 0; Span = 150 Exception Deviation = 0 Compression Deviation = 0 7. Finally, click the Save icon. . You should see a new “Successfully created totalizer…” session record 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. 9 7 of 9 9 10. Click the “Get Events” button and examine the entries. This concludes the lab. Thanks for attending! 9 8 of 9 9 N ot e s 9 9 of 9 9