FactoryTalk Historian SE Advanced 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 Advanced Lab Contents Before you begin ........................................................................................................................................... 5 About this Lab ................................................................................................................................................................................... 5 Tools & prerequisites ........................................................................................................................................................................ 5 Lab 1: Reporting With VantagePoint............................................................................................................ 7 Section 1: Creating a Dashboard Report from a Template .............................................................................................................. 7 Section 2: Publish and View the Dashboard from the VantagePoint Portal................................................................................... 23 Lab 2: Interface Buffering and Redundancy .............................................................................................. 26 Section 1: Interface Buffering......................................................................................................................................................... 26 Section 2: Interface Redundancy ................................................................................................................................................... 37 Lab 3: Event Framing ................................................................................................................................. 62 Section 1: Configuring PIBaGen .................................................................................................................................................... 62 Section 2: BatchView ..................................................................................................................................................................... 79 Lab 4: External Data Access ...................................................................................................................... 89 Section 1: FactoryTalk Historian OLEDB Basics ........................................................................................................................... 89 Section 2: Using Microsoft Reporting Services .............................................................................................................................. 92 Lab 5: DataLink for Reporting .................................................................................................................. 106 Section 1: Sampled vs. Compressed Data .................................................................................................................................. 106 Section 2: Archived data and Digital tags .................................................................................................................................... 124 Section 3: DataLink Trend Object ................................................................................................................................................ 128 Section 4: Filtered Compressed Function .................................................................................................................................... 134 Section 5: Time Filtered Function ................................................................................................................................................ 140 Lab 6: System Management .................................................................................................................... 146 Section 1: Exploring the Rule Editor ............................................................................................................................................ 146 Section 2: Excel Tag Configurator ............................................................................................................................................... 161 Section 3: Data collection: Polled vs. Advised mode ................................................................................................................... 175 Section 4: Performance Equations .............................................................................................................................................. 191 3 of 329 Section 5: Totalizers .................................................................................................................................................................... 202 Section 6: Event triggered points ................................................................................................................................................. 213 Section 7: Basic Output Points .................................................................................................................................................... 233 Lab 7: ProcessBook for Analytics ............................................................................................................ 247 Section 1: Beyond Basic Trending ............................................................................................................................................... 247 Section 2: Dynamic Elements in ProcessBook ............................................................................................................................ 272 Section 3: ProcessBook Displays in FactoryTalk View SE .......................................................................................................... 289 Section 4: Using ProcessBook Datasets ..................................................................................................................................... 299 Section 5: SQC Charting in ProcessBook.................................................................................................................................... 315 4 of 329 Before you begin The following steps must be completed before starting the lab exercise: 1. If not already running, Start the VMware images for the lab (DATA, SERVER, and CLIENT). About this Lab Welcome to the FactoryTalk Historian Advanced Lab! This session provides you with an opportunity to explore more advanced features of FactoryTalk Historian Site Edition. 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. Lab Format This lab is a “pick and choose” lab, with seven (7) different labs to choose from. Each lab will take about 30 min to one hour, so it is not expected that you will finish all seven labs. You will be able to download this manual after RSTechED, for further learning later. Tools & prerequisites Lab Materials For this Hands-On lab, we have provided you with the following materials that will allow you to complete the labs in this workbook. Software This hands-on lab uses the following software: Microsoft Windows Server 2008 R2 Standard SP1 Microsoft Windows 7 Enterprise SP1 Microsoft Internet Explorer, version 9 Microsoft Office Excel 2010 32-bit SP1 Microsoft SQL Server 2008 Standard Edition R2 FactoryTalk Historian Site Edition, pre-release of version 3.0 FactoryTalk VantagePoint, version 4.0 FactoryTalk Historian ProcessBook, version 3.20.01 FactoryTalk Historian DataLink, version 4.20.01 FactoryTalk Historian BatchView Add-in, version 3.10.20 FactoryTalk Historian ActiveView, version 3.20.02 FactoryTalk Services Platform and Administration Console, version 2.50 (CPR 9 SR 5) 5 of 329 FactoryTalk View Site Edition, version 6.10 (CPR 9 SR 4) SoftLogix, pre-release of version 20 RSLogix 5000, version 20 (CPR 9 SR 5) RSLinx Classic, version 2.59 (CPR 9 SR 5) RSLinx Enterprise, version 5.50 (CPR 9 SR 5) PI OLEDB, version 2010 R3 Xcelsius 2008 Hardware devices required One (1) “host” computer with VMware virtualization software will host three “guest” operating systems for a total of three virtual computers in a workgroup. The VMware images are named as follows: “DATA”: A Windows 2008 Server computer to act as a processor (SoftLogix). FactoryTalk View SE Server, RSLinx Enterprise, RSLinx Classic, RSLogix 5000 and a FactoryTalk Live Data Interface have been pre-installed (and activated) for you. “SERVER”: A Windows 2008 Server computer to act as a FactoryTalk Directory and FactoryTalk Historian Site Edition and VantagePoint Servers. Internet Information Server (IIS), Microsoft SQL Server 2008 Standard Edition have also been pre-installed (and activated) for you. “CLIENT”: A Windows 7 Enterprise computer to act as a client for FactoryTalk Historian SE, VantagePoint and View SE and to host the client tools: ProcessBook, DataLink, ActiveView, FactoryTalk View SE Client, Internet Explorer and VantagePoint Portal. Communications Overview: Host PC Virtual Ethernet DATA (SoftLogix, RSLinx, FTView SE Server and FTLD Interface) SERVER (FTDirectory, FTHistorian SE and FTVantagePoint Servers) 6 of 329 CLIENT (FTHistorian SE, FT View SE and FTVantagePoint Clients) Lab 1: Reporting With VantagePoint Section 1: Creating a Dashboard Report from a Template 1. Go to the CLIENT Image. 2. Start Xcelsius 2008 from the desktop icon or Start > All Programs > Xcelsius > Xcelsius 2008. 3. Click Continue when prompted. 4. Wait until all of the Xcelsius windows open, including an instance of Microsoft Excel in the lower-center of the screen. If you get this message, wait about 30 seconds and click Retry. 7 of 329 5. We will use a partially completed template and add functionality to connect to Historian tags via VantagePoint. In the Xcelsius menu at the top of the screen, select File > Open and open C:\Lab Files\Historian Advanced Lab\Dashboard Template.xlf. 6. In the Microsoft Excel window in the middle of the screen, click on cell C3 (red cell). In the Excel VantagePoint menu, select Insert: 7. Select History and click Next. 8 of 329 8. In the VantagePoint Model, navigate to System > Sources > FactoryTalk > localhost > Historians > Production Historian and click on Tags. Select the InstaCorp…T100_Demo_Temp.PV tag and move it to the right with the > button. Click Next. 9. Select Use this Range and then click New…. 9 of 329 10. Browse to MyEnterprise > Samples v4 > Support > Report Library > Time Periods, select the Last 1 minute time period and move it to the right with the > button. Click Next. 11. In the Data Options window, be sure the Skip advanced options is NOT selected or “unchecked”, and click Next. 10 of 329 12. Select Average and number of samples of 1. Click Finish and wait for the spreadsheet to populate with data. 13. Click on cell C12 (green cell). 11 of 329 14. Select the VantagePoint > Insert function. Select History and after clicking Next you will see this screen. We are using the same tag, so just click Next. 15. We are using the same time range, so select Use this Range and click Next. 16. In the Data Options window, be sure the Skip advanced options is NOT selected or “unchecked”, and click Next. 12 of 329 17. This time click the Count option, change number of samples to 1 and then click Finish. 18. On the canvas area, click on Label 1. 19. On the right side of the screen in the General area (may need to click on it to give it focus), click the Link to Cell option and click the “cell picker” button (may need to widen this window for the "cell picker" to appear). 13 of 329 20. Select cell D6 and click OK. 21. Select Gauge1. On the right of the screen click the General area. Specify the Title to be Average Temperature. Browse to select Data By Range from cell D9 and set Maximum limit to 150. 14 of 329 22. Also on Gauge1, go to Appearance > Text tab and click on Value (make sure it remains "checked"). Below in the Number Format area, change to Numeric and select 2 Decimal Places. 15 of 329 23. Select Gauge2 on the canvas in the center of the screen. On the right, in the General area, specify the Title to be Number of Values and browse to set Data By Range to cell D18 and change Maximum Limit to 1000. 16 of 329 24. Resize your objects as desired and add color or other options of your choice. 25. Select View > Canvas Sizing > Fit Canvas to Components. 26. From the Data menu in Xcelsius (not the Excel menu) select Connections… 17 of 329 27. Click Add. 28. Select Excel XML Maps. 29. Click Add. 18 of 329 30. Select Flash Variables. 31. Click Connection 1 Flash Variables. 19 of 329 32. Click Import Named Ranges. Items will be added to the Ranges: field. 33. Click the first ExcelXML Map. 34. Select the Usage tab. Turn on Refresh Before Components Are Loaded and Refresh every 30 seconds. 20 of 329 35. On the Definition tab, select the “cell picker” button. 36. Select cell C3 (red cell) and click OK. 37. Select the second ExcelXML Map and set the Usage tab as follows: 38. On the Definition tab, use the “cell picker” button and select cell C12 (green cell). 21 of 329 39. Close the Data Manager dialog. 40. Select File > Save As on the Xcelsius menu and save your dashboard as C:\Lab Files\Historian Advanced Lab\MyTemperatureReport.xlf. 41. Select File > Export > Flash (SWF)… 42. Save to C:\Lab Files\Historian Advanced Lab directory as MyTemperatureReport.swf. Note: You will see the following dialog while the SWF file is being generated. 22 of 329 Section 2: Publish and View the Dashboard from the VantagePoint Portal 1. From the Excel > VantagePoint menu (not the Xcelsius menu) select Publish. 2. Use the icons to browse to the SWF and XLF files. Click Next. 3. Check the TimePeriods box to allow users change the TimePeriod as a Parameter in the report (you will see what this means when you view your report). Click Next. 23 of 329 4. Browse to the Reports folder under MyEnterprise > MyPlant and name the report MyTemperatureReport. Click Next. 5. Check the box for Browse to published dashboard and click Finish. 24 of 329 6. The report should soon appear, similar to the following. Approximately every 30 seconds you should see the two values update. 7. Note that you can select a different relative time period and click Generate Report and the gauges will reflect that average and count. 8. Note that you can select any Absolute Time Period and the report will reflect your choice when you click Generate Report. 9. Close VantagePoint Portal and Xcelsius. This lab is complete. 25 of 329 Lab 2: Interface Buffering and Redundancy Section 1: Interface Buffering 1. Select the CLIENT image. 2. Open FactoryTalk Historian ProcessBook. 3. Close the ProcessBook demo file that opens at default. 26 of 329 4. From the File menu select New. 5. Select the ProcessBook Display (.pdi) File option, and click the OK button. 6. Change to build mode by selecting the Build button on the toolbar: 7. Select the Trend button on the toolbar: 8. Add a Trend to the Display (click-hold, drag and release) 27 of 329 9. Do the following steps: Use the Tag Search button to select the tag that ends in …T100_Demo_Temp.PV Change the Plot Time Start to *-10m Click OK 28 of 329 10. Do the following steps: Resize the display and trend object to appear as below. Note: If you do not see the "long" tag name to the right of the plot surface you need to widen the Display window and Trend object to make room for the tag name to appear. Note: You may need to go to Build mode in order to re-size the trend If you went to Build mode, put the display back in run mode Verify that the value for the …T100_Demo_Temp.PV tag is changing and the trend updating. 11. In order to “monitor” the buffering subsystem, there are “queue statistics” we can monitor on the computer with the Interface that is doing the buffering. The FTLD Interface FactoryTalk Historian Server is using is installed on the DATA image. Switch to the DATA image. 29 of 329 12. Open the Interface Configuration Utility (ICU). 13. From the Interface selection box, pick the FTLD1 interface. 14. Once selected, pick Tools > Buffering. 30 of 329 15. Notice that this interface is configured to use the PI Buffer Subsystem. 16. Select Buffered Servers and notice this interface is configured to buffer data for the historian server we are using, named SERVER. 17. Click OK on the Buffering dialog and close the ICU. 18. Open a command prompt by clicking Start > Run… and specifying to run the program cmd. 31 of 329 19. Change to the path of: C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\PIPC\BIN 20. Your command prompt should look similar to this: 21. Enter the command: pibufss -qs Note: “pibufss” is the buffer service, then there needs to be a space, a “-“ (dash) followed by “qs” for queue statistics. 22. The result of this command should be similar to the following. The first column of numbers is the “count” at that moment. The second column is “change since last update”. Note that you should be accumulating Total Event Writes and Total Event Reads, but no Current Queue Events at this time. 23. Leave the Command Prompt open and return to the CLIENT image. 24. Verify that your trend in ProcessBook is still displayed and the …T100_Demo_Temp.PV tag is still changing. 25. Go to the SERVER image. 32 of 329 26. We will simulate a Historian Server outage by manually stopping Historian. Stop your Historian Server by selecting Start > All Programs > Rockwell Software > FactoryTalk Historian SE > Stop FactoryTalk Historian SE. Wait for all of the services to stop and the dialog to close itself before proceeding. 27. Go back to the CLIENT image and look at your ProcessBook trend. When the Historian Server is shut down, you will see a “break” and apparent “loss of data" and the tag identified as Disconnected. 28. Go back to the DATA image. 33 of 329 29. Since the Historian Server is not available, the FTLD Interface is still collecting, but buffering the data. You should see Current Queue Events accumulating (may take several “updates”). 30. Return to the SERVER image. 31. Restart the Historian Server by selecting Start > All Programs > Rockwell Software > FactoryTalk Historian SE > Start FactoryTalk Historian SE. 32. While the Server is restarting (may take several minutes), return to the DATA image. 34 of 329 33. See if you can “catch” when the server finishes restarting and the pibufss buffer “empties”. Current Queue Events value should go to 0 (zero) and the “change since last” value should be negative. This may take several minutes. 34. Return to the CLIENT image. 35. Your trend should now be updating with values. 36. If you see any gaps, you may need to use the Scroll Time tool to “refresh” the data in the trend. You can also use this tool to scroll to a time period many minutes ago when you know the server was “down”. The trend should be displaying data with “no gaps”. 35 of 329 37. Use the Revert button to revert to current time and “live” data. 38. Leave ProcessBook and this trend running for the next section. 39. Go to the DATA image. Make sure the command window has focus and select Ctrl-C to stop the queue statistics. Close the command window. 36 of 329 Section 2: Interface Redundancy In the VMware images being used in this lab, RSLinx Enterprise and the FTLD Interface we have been using are on the DATA image. To demonstrate Interface Redundancy, another FTLD Interface has been installed on the CLIENT image. It is NOT recommended in real applications that Interfaces be run on “client machines”, but for the purposes of this lab we will use an interface on the CLIENT image as a redundant interface to the one on the DATA image. Part A – Configuring Buffering and Initial CLIENT Interface Configuration 1. Go to the DATA image. 2. Open the Interface Configuration Utility (ICU). 37 of 329 3. Use the ICU on this image to confirm the interface is running (select FTLD1 Interface from drop-down list and look for "Running" at the bottom of the dialog)… 4. …and configured for Buffering. 38 of 329 5. Close the Buffering dialog but leave the ICU open. 6. Go to the CLIENT image. 7. On the CLIENT image, we want to verify the connection to the Historian Server named SERVER. Launch the AboutPI-SDK utility. 39 of 329 8. Click on the Connections entry, the SERVER checkbox and confirm SERVER connected dialog appears at bottom. 9. Select File > Exit PISDKUtility to close the About PI-SDK. 40 of 329 10. Launch the Interface Configuration Utility (ICU). 11. Click the Create new Interface Instance from .BAT file toolbar button . 12. Navigate to the LDInterface directory and select the FTLDInt_FTLD.bat.bak file. Click the Open button. 41 of 329 13. You will be prompted to select the Host PI Server. Select SERVER from the drop-down box and click the OK button. 14. Note that the Interface ID is set to the default value of 1 and will be the same ID as that of our primary interface on DATA, Interface ID of 1. 42 of 329 15. Select the Service category. Change the Display name to FTLD1 and then click the service Create button. 16. Select the Buffering… command from the Tools menu. 17. Change the radio button to Enable buffering with PI Buffer Subsystem. 18. Read the messages and click OK (you will not start the service YET!) 43 of 329 19. Notice you are in the Buffered Servers dialog. Select SERVER from the drop-down box. Click the OK button. 20. First, click General and then click Service on the left. Click Yes make the PIBufss service a dependancy. This dialog would come up later before you could start the interface, but since we are finishing the configuration for Buffering we “forced” it to appear now to get out of the way. Leave the ICU open. 44 of 329 Part B - Create Shared Folder 1. We need to create a “shared folder” to store a “handshaking file” that the two redundant interfaces will use to control their redundancy. Go to the SERVER image. Note: A computer running a Historian Server is NOT a recommended place for this shared "handshaking" folder. However, since it is the only image that will not be running an Interface, we will use it for training purposes in this lab. 2. Go to Start > All Programs > Administrative Tools > Share and Storage Management. 45 of 329 3. Click on Provision Share… on right side of dialog 4. Click the Browse button 5. Click the c$ drive and then Make New Folder button 46 of 329 6. Name the folder FTH_Shared (press Enter after typing name) and then click OK 7. Click Next > several times to accept defaults until this screen. Select the second option and then Next > Note: In a “real application”, you may wish to adjust these permissions for a different user name or group of users. 47 of 329 8. Click Next > on dialog that follows and then Create on this dialog. 9. Click Close and then close the Share and Storage Management dialog. 48 of 329 Part C – Configuring Interfaces for Failover 1. Change to the DATA image which should still have its ICU open. 2. Verify the FTLD1 interface is still selected in the drop-down box. 3. Select the Failover sub-category under UniInt in the left pane. 4. Check the box to Enable UniInt Failover. 5. Select Phase 2. 6. For Synchronization File Path, browse to the FTH_Shared folder on Server (Network > SERVER > FTH_Shared) and click Open. The file FTLDInt_FTLD_1.dat will be created in this folder. 7. Select UFO (Universal FailOver) Type of HOT. 8. Carefully confirm all following selections. When confirmed, select Apply. 49 of 329 9. Read this message (we will come back later to finish the configuration) and click OK 10. Click OK (we will stop and restart the interface later) 11. Go to the CLIENT image 50 of 329 12. Make the same selections on this interface as you did on the other. IMPORTANT! - In addition, select Failover ID # 2 for this instance and Failover ID # 1 for the other instance - IMPORTANT! Verify all below selections. 13. Click Apply on above dialog 14. Click OK 51 of 329 Part D – Modifying FTLD Service Properties 1. Still on the CLIENT image, go to Services by selecting Start > Control Panel > System and Security > Administrative Tools > Services 2. Double-click the FTLD1 Service 3. Select the Log On tab, and specify to use Administrator account with password of rockwell. Click OK 52 of 329 4. Read and click OK 5. Close Services, Administrative Tools and System and Security dialogs 6. Go to the DATA image 7. Go to Services (Start > Administrative Tools > Services) and make the same changes to the FTLD1 interface on this image. Use Administrator with password of rockwell. Click OK. 53 of 329 8. Read and click OK. 9. Read and click OK. You will not stop and restart the service YET! 10. Close the Services dialog. 54 of 329 Part E – Finishing up and Testing the Interface Redundancy 1. Still on the DATA image, in the ICU, click the Browse button to select the “other instance”. 2. You will click the FTLDInt1 interface on the CLIENT image and click OK. 3. In the “tag area”, below where you identified the UFO Type and Synchronization File Path, right-click on the tags and select Create UFO_State Digital Set on Server SERVER…: 55 of 329 4. Click OK on this dialog. 5. Right-click on the “tag area” again and select Create all points (UFO Phase 2). 6. Click the Apply button at the bottom-right of the dialog box and click OK on the Interface Changes Require Restart dialog box that will appear. 7. Restart the interface. Look for Ready and Running at the bottom-left of the dialog box. Leave the ICU open. 8. Return to the CLIENT image. 56 of 329 9. Select the Browse button. 10. Click the interface on DATA image and click OK 11. Click the Apply button at the bottom of the dialog box and then start this interface by clicking 12. Click Yes if asked if you would like the ICU to start the PIBufss Service. 57 of 329 . 13. Switch over to the SERVER image. 14. Launch the System Management Tools (SMT). 15. Expand the Data category and select the Current Values plug-in. 58 of 329 16. Use the search button to add all of the FTLDInt1_* tags to the current values monitor and click the Start Updating toolbar button. You should be seeing: ActiveID = 1 – Interface Node with Failover ID#1 is currently "Primary" and sending data to Historian Server DeviceStatus = 0 – Zero is “good” status Heartbeats = Incrementing numbers indicate Interface Nodes #1 and #2 are responsive States = Current “Primary” or “Backup” state of Interface Nodes #1 and #2. Under certain conditions could also indicate “Off” or “Transition” 17. Leaving the SMT open, go to the CLIENT image and the ProcessBook: application, which should still be running the below display from earlier in this lab. If not running, start ProcessBook and create a display with a trend of the tag ending in …T100_Demo_Temp.PV. Ask instructor for assistance if needed. Note – at this time you may see a “gap” in the data from when you restarted the interface on the DATA image. This was prior to finalizing interface redundancy. The remainder of this lab will test the redundancy since you’ve completed its configuration. Note: Since the Interface on image DATA is currently Primary (you should have seen that with the SMT on image SERVER), this tag being trended is coming from the Interface on image DATA to the Historian Server. 18. Switch back to the DATA image. 59 of 329 19. Use the ICU to stop the Interface by clicking . 20. Switch back to the CLIENT image. 21. There could be a short delay but then the backup interface should take over. Does data collection continue with no "loss of data"? 22. Switch back to the DATA image and start the Interface. 23. Switch back to the SERVER image. 60 of 329 24. Did the Interfaces “switch roles”? The Interface on CLIENT (Failover ID #2) is now “Primary” and the Interface on DATA (Failover ID #1) is “Backup”? 25. Experiment with stopping a “Primary” interface to verify the “Secondary” Interface takes over, with no data loss. Just be sure you don’t end up with both Interfaces stopped. You WILL FOR SURE lose data then! 26. When you are finished experimenting, revert back to non-redundant conditions by: Make sure the Interface Node on DATA (ID#1) is Primary On the CLIENT image, stop the Interface with the ICU, then close the ICU. Use the ICU on DATA image to de-select Enable UniInt Failover, click Apply and Restart the Interface Node. 27. On all three images, close any open applications (SMT, ProcessBook, ICU, etc). This lab is complete. 61 of 329 Lab 3: Event Framing Section 1: Configuring PIBaGen What You Will Learn How to configure the PIBaGen To Populate Batches This exercise covers creating a PIUNIT in the module database. It can be configured to work with PIBaGen. The batch counter can be used as the batch active and batch label tag. The phase counter will be used as a sub-batch id and label. The PIBaGen service may need to be manually started. Reference The PI Batch Generator Interface (PIBaGen) collects data from the Historian Server (from the Historian Data Archive and the PI Module Database), generates batch data and writes the batch data to the Historian Server in the Batch Database. PIBaGen is used when there is no native interface to generate and store batch data in the PI System. PIBaGen automatically generates PIUnitBatches, Batches and Sub Batches for each PIUnit that is configured and registered. The generated batch information can be accessed using tools like BatchView and PI Batch Database Editor. This interface is not UniInt based and does not support any Failover. It only populates the PI Batch Database based on PI Events and does populates only one PI Point which represents the status of the interface. A PIUnit represents a piece of equipment in which a product is processed in batches. The Aliases of the PIUnit define the PI Points associated with the equipment. Each time a product is processed through a PIUnit, a PIUnitBatch is created. Since there can be only one batch processed in a piece of equipment at any time, there can be only one PIUnitBatch associated with a PIUnit at any time A PIUnitBatch is the data object that encapsulates one ISA S88 concept of a batch. Here is the definition from S88: “The material that is being produced or that has been produced by a single execution of a batch process.” PIBaGen recognizes the start and end of the processing in a PIUnit, and therefore the start and end of the PIUnitBatch, by changes in values of a PI Point known as “Active Point.” Starting a PIUnitBatch includes writing the start time and other properties of PIUnitBatch like Batch ID, procedure name, product name etc., to the PI Batch Database. PIBaGen optionally also adds the PIUnitBatch to the collection of PIUnitBatches under an object called Batch. A Batch is used to record the production of a specific “Batch”; in practice this usually involves one or more PIUnitBatches in one or more PI Units (one or more pieces of equipment). A Batch allows collecting related PIUnitBatches. All the Batches and properties associated with Batches, like Product Name, Batch Recipe, etc., are stored in the PI Batch Database. The SubBatch information is also written to the PI Batch Database by the PIBaGen interface. A SubBatch is a definable portion of a PIUnitBatch and is always associated with a PIUnitBatch. The start and end time for each of these definable portions is determined by a separate Active Point called “SubBatch Active Point.” Examples of S88 Sub-batches are Operations and Phases. Every SubBatch has a name, a Heading and a collection of Sub Batches associated with it. The SubBatch collection allows for a hierarchy of Sub Batches. Specifying the PI Points for Active Points and all other properties of Batches, PIUnitBatches and Sub Batches is called the “PIUnit Configuration.” PIUnit configuration is stored as Aliases and Properties in the PI Module Database. The creation and configuration of the PIUnit is done using the PI Batch Generator Plug-in for PI SMT. 62 of 329 Reference Manuals Batch Generator (PIBaGen) Interface to the PI System Guide C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\PIPC\Interfaces\PIBaGen Other Reference Manuals PI Server Installation Guide for information on installation of the Batch Database and PIBaGen PI SDK User Manual and Help file, for information on PI Batch objects and programmatically writing or editing batches and on the PI Module Database. PI System Management Tools (PI SMT) online Help files, for information on using the PI Batch Generator plug-in and Batch Database plug-in Batch Database Support of the PI Batch Subsystem, for information how the PI Batch Subsystem data can be supported through PI Batch Database and PI-SDK, the impact on existing batch applications, and for techniques to move to the PI Batch Database. PI BatchView User Manual, for information on viewing batches using the BatchView software. 1. Verify that you are on the SERVER image. 2. Launch the Interface Configuration Utility (ICU). 63 of 329 3. Click the Import Existing Interface from .BAT file toolbar button. 4. Navigate to the PIBaGen subdirectory location: C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\PIPC\Interfaces\PIBaGen. 5. Open the file named PIBaGen.bat. 6. The Interface will be named: PIBaGen. 7. Change the type from none to other_non_uniint. 8. From the ICU toolbar click Save. 9. Click Yes to continue when warned that no point source has been specified. 64 of 329 10. In the Service area, set Startup Type to Auto and click the Apply button Click Yes if you get the message Do you wish to proceed without specifying a Point Source? 11. Click the Start button on the toolbar. Click Yes if asked Do you wish to proceed with interface startup without defining scan classes? 12. Open Windows Computer Manager Services and check that the newly created PIBaGen service is running (click Start > All Programs > Administrative Tools > Services and look for PI Batch Generator Interface). 13. Close the Services dialog and click the Close button to close the ICU. 65 of 329 14. Use Windows Explorer to navigate to the directory C:\Program Files\Rockwell Software\FactoryTalk Historian\Server\adm. Look closely for these three files which you will edit in the following steps. pisrvsitestop.bat pisrvsitestart.bat pisitestart.bat 15. Right-click on pisrvsitestop.bat and select Edit from the context menu. 16. Remove the REM statement from in front of net stop pibagen. 17. Save and Close the file. 18. Right-click on pisrvsitestart.bat and select Edit from the context menu. 19. Remove the REM statement from in front of net start pibagen. 66 of 329 20. Save and Close the file. 21. Right-click on pisitestart.bat and select Edit from the context menu. 22. Remove the REM statements from the PI-Batch Generator Interface block (7 total lines near the bottom of this bat file – need to scroll down). 23. Save and Close the file. Close Windows Explorer. 67 of 329 Create a new PIUnit… 1. Still on the SERVER image, launch the System Management Tools (SMT). 2. Expand the Operation category and select the Module Database plug-in. 68 of 329 3. Expand SERVER and right-click on Modules and select New. 4. Name the Module Reactor Section and click OK. Note: If you already have a module called Reactor Section, proceed using that already created module. 5. Right-click on Reactor Section module and select New > PIUnit. 6. Enter T100 into the Module Name field and click OK (not shown). 7. Assign an alias to the PIUnit, right-click on the T100 module and create a new Alias. 69 of 329 8. Enter Temperature into the Alias Name field and map it to the PI Server named SERVER and tag ending in …T100_Demo_Temp.PV tag (use the SEARCH button), and click OK. 9. Launch the FactoryTalk Administration Console (Start > All Programs > Rockwell Software > FactoryTalk Administration Console). 10. Click Network directory, click OK. 11. In the FT Administration Console explorer, right-click InstaCorp and click Add Individual Historian Points… 70 of 329 12. Select Browse Tags. 13. Browse InstaSoap > Mixing > CLX1 > Online and select the tag T100_Batch_Counter.ACC. 14. Click Add Tags(s) to List, (the selected tag will be displayed in the lower window). 15. Use similar steps to also add T100_Phase_Counter.ACC. 71 of 329 16. When you click OK on the above dialog, your screen should have both tags listed such as follows. Click OK on this dialog. 17. Close Administration Console and switch back to System Management Tools (SMT). 18. Expand the Batch category and select the Batch Generator plug-in: 72 of 329 19. Select SERVER in the middle pane under Registered Units Only tab (see below graphic). 20. Select the Interface tab in the right pane. 21. Set the Configuration Module Name to PIBaGen. 22. In the middle pane, click the Save toolbar button. 23. Switch to the MDB View tab and navigate to the T100 PIUnit (SERVER > Reactor Section). 73 of 329 24. Using Batch Generator plug-in, (the right hand configuration view), select the PIUnitBatches tab and configure the following: Set the Active Point to use the T100_Batch_Counter.ACC tag ActivePoint Behavior to use Step and Include zeroth state (Continuous) Set Unit Batch ID Point to use the T100_Batch_Counter.ACC tag Change the Recovery Options checkbox to Do not recover anything. 74 of 329 25. Select the PISubBatches tab and right-click on SubBatch Hierarchy. Right click to Add New SubBatch or click the New SubBatch Configuration icon . 26. Name the SubBatch Heating. 27. Using SubBatch configuration view, configure the following: Set the Active Point to use the T100_Phase_Counter.ACC tag ActivePoint Behavior to use Step and the Include zeroth state (Continuous) box is checked Set SubBatch Name Point to Use ActivePoint value 75 of 329 28. In the Batch Generator plug-in tree view, select and right-click the T100 PIUnit and Save (or use the Save icon on the tool bar). 29. The PiBaGen interface will not monitor a PIUnit and generate batch data if the PIUnit is not registered. Registering a PIUnit is like turning the scan option ON for a Historian Tag or Point. Right-click again on the T100 PIUnit and select Register. 30. Expand the Batch Database plug-in (see below graphic). 31. Expand the tree until you can see the T100 unit in the center window. 32. Select and right-click T100 to Search for PIUnitBatch, or click on the Search for PIUnitBatch 76 of 329 . 33. Ensure that the PIUnitBatch search PIUnit field will be populated with \\SERVER\Reactor Section\T100, if not, enter T100. Note: if you starting the search from the top of the Batch database tree, then the PIUnit field would contain an ‘*’. Need to replace this with T100. 34. Click OK. 77 of 329 35. Expand the Batch database search results and verify that Unit Batches are being created by PIBaGen. In the following example, there are 3 Unit Batches. The last unit batch in the list (7806) has PISubBatches 0 and 1 finished and 2 still running (you can tell because it is selected and on the right you see End Time is "Still Running"...finished SubBatches would have both Start and End times specified). If you do not see a “tree” with a “plus sign” (+) when you searched for PIUnitBatch, you may need to wait several seconds and search again. Multiple search results will appear in the same window. Note: Up to this point you have created a PIUnit and Historian is monitoring and archiving Batch information. The Batch information you have configured is information such as: What triggers the start and end of a Batch and Sub Batches – their "Active Points" Where the value of the Batch ID will come from - the "Unit Batch ID Point" A tag’s value to monitor during the Batch cycles, the "Temperature Alias" that you created within the PIUnit You have also seen how to monitor basic information of the Batches and Sub Batches, such as Batch IDs and Start and End Times, from within the SMT. In the next section you will see how a BatchView add-on can be used to monitor batch information from within a ProcessBook display. 36. Close the SMT and Administration Console (if still open). 78 of 329 Section 2: BatchView What You Will Learn To configure a BatchView Group in ProcessBook To compare a sub-batch phase against a golden batch In this exercise, you are going to be looking at a couple of ways to visualize the batch information being generated by the results of the previous exercise, You will configure a simple BatchView Group trend of the batches in absolute time view. Then switch to a relative view and pick a batch to represent a golden batch. Align a phase of the golden batch for comparison against other sub-batches 1. Go to the CLIENT image. 2. The following steps will build a basic ProcessBook display for our BatchView. Launch ProcessBook. 79 of 329 3. Close the ProcessBook demo file that opens at default. 4. From the File menu select New. 5. Select new ProcessBook Display (.pdi) File, set the Display Name to BatchView, and click the OK button. 6. Change to build mode by selecting the Build button on the toolbar: 7. Select the Batch Group button on the toolbar: 80 of 329 8. Click and drag a Batch Group into the empty space which covers most of the work area. 9. In the Search Parameters area, change the following: Unit Name parameter from * to T100 Time Range and Duration to Between: *-10m and * 10. Click the Search button. 81 of 329 11. From the Available Aliases pane at the bottom of the Batch group definition dialog, select the Temperature alias and click the Add Alias -> button. 12. Select the Layout tab. 13. From the Visible Symbols pane, check the Results check box. 82 of 329 14. Select the Settings tab and from the Plot Time pane, set the Absolute radio-button. 15. Click OK. The display may take a moment to retrieve all the data. 16. When the display appears, select the Run button on the ProcessBook toolbar (it may automatically be selected). If you wish to resize the Batch object, you need to go to Build Mode (hammer icon) and then back to Run Mode once you are ready to view the batch information. 83 of 329 17. All the batches active during the last ten minutes are displayed in absolute time from the start of the first batch to the end of the last batch. Note: The most recently completed batch is dark red, while the still in-process batches are light green. Note: The temperature alias is the same color as the batch that it corresponds with. 17. In the Results Panel, select a Unit Batch and click the symbol to show the Sub-Batches. 18. In the Batch Gantt Panel (upper right) select a Unit Batch Batches. 84 of 329 and click the symbol to show the Sub- 19. To display precise time information of a unit batch, right-clicking on Unit Batch menu select Properties… 20. Close the Properties dialog. 85 of 329 and from the context 21. Change back to build mode by selecting the Build tool on the ProcessBook toolbar. 22. Double-click on the Batch Group object. 23. Select the Settings tab. 24. From the Plot Time pane, set the Relative - Start and End Time radio-button. Enter an Offset value of -60s for the Start time. Click OK. 25. Select the Run button on the ProcessBook toolbar. Note: The unit batches are aligned based on their start time. Times along the x-axis are now seconds into the batch. You should be able to easily see if some batches took longer (or less time) than others. 86 of 329 26. Pick a Unit Batch that you would like to be the Golden Batch. 27. Click in the Anchor column symbol in the results pane for that Unit Batch. 28. The batch turns yellow to indicate it is the Golden Batch. The batch will be prevented from expiring from the search results. 29. Select the Golden Batch in the Batch Gantt chart on the right, and then click the Batches. symbol to show the Sub- 30. Suppose the 2nd phase of the unit batch is particularly critical for the process, you can align all the unit batches based on their 2nd phase of the golden batch. 31. Right-click on the 2nd phase of the golden batch and select Align to every PIUnitBatch\2 from the contextmenu. 87 of 329 32. Expand some of the sub batches and compare the 2nd phase against that of the golden batch. 33. Experiment with the Batch Group object as you wish. When done, close ProcessBook. This lab is complete 88 of 329 Lab 4: External Data Access Section 1: FactoryTalk Historian OLEDB Basics About This Section In this exercise, you will examine some of the built-in capabilities of the FactoryTalk Historian OLEDB layer. The OLEDB layer provides convenient access to archive data, a mechanism for performing system configuration, and the ability to perform complex performance equation calculations In this section you will learn how to use the PI-OLEDB Tester to examine some sophisticated functionality provided by the OLEDB layer Reference PI OLEDB exposes PI data in form of tables which are grouped into catalogs as listed below: piarchive pibatch pids pifunction piheading pilog pimodule pipoint piuser contains archive related tables contains batch data tables contains PI digital state tables contains tables representing PE functions contains heading tables contains the pimessagelog table contains a set of tables representing the Module Database contains tag configuration tables (one per point class) contains user database tables Documents on computer with FactoryTalk Historian Server and OLDB Provider installed C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\PIPC\OLEDB\Doc\PI OLEDB Provider 2010 R3_EN.pdf C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\PIPC\OLEDB\Doc\PI OLEDB Provider 2010 R3 Release Notes.pdf C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\PIPC\OLEDB\Tools\PI OLEDB Tester\ SampleStatements.txt 89 of 329 This exercise will involve examining functionality provided by the OLEDB layer. Not only do the tables provide easy access to some PI calculations, but there are also some custom SQL functions provided to ease calculations and translations of states. 1. On the SERVER image, launch the PI-OLEDB tester application by starting the following executable… C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\PIPC\OLEDB\Tools\PI OLEDB Tester\PIOLEDBTester.exe. 2. If prompted to login, select the Use Windows NT Integrated security checkbox and then click OK. 3. Select Sample Statements >> . 90 of 329 4. In the Archive Statements category, there are 34 sample queries. To help understand the statement functionality, each statement is accompanied with a short comment. Review entries to see how to handle the following types of situations: Translating a digital state or status Retrieve snapshot data Count archive entries Work with annotations Work with timestep interpolated data Use SQL CASE statement 4. Click on various Sample SQL Statements and click Execute. Review results displayed at the bottom of the dialog. 5. If you like you can try editing one of the SQL Statements or try entering one of your own, executing and reviewing results. 6. Close PI-OLEDB Tester, Windows Explorer and/or My Computer (if still open). This section of the lab is complete 91 of 329 Section 2: Using Microsoft Reporting Services What You Will Learn How to create a basic Microsoft Reporting Services report for reporting on FactoryTalk Historian data In this exercise you will go through the process of creating a basic Microsoft Reporting Services report which pulls data from FactoryTalk Historian archives. SQL Server 2008 Reporting Services SQL Server 2008 Reporting Services is a server-based reporting platform that can be used to create and manage tabular, matrix, graphical, and free-form reports that contain data from relational and multidimensional data sources. The reports can be viewed and managed over a World Wide Web-based connection. Reporting Services includes the following core components: Complete set of tools that you can use to create, manage, and view reports Report Server (NT Service) component that hosts and processes reports in a variety of formats. These (output) formats include HTML, PDF, TIFF, Excel, CSV, and more. One of the sources of data that Reporting Services can work with is OLEDB Providers. The PI OLEDB is pre-installed on the SERVER image. Reporting Services detailed help can be found in MS SQL Server Books Online available at http://www.microsoft.com/sql/default.mspx 1. Verify that you are on the SERVER image. 2. From the Start Menu, launch the SQL Server Business Intelligence Development Studio by selecting All Programs > Microsoft SQL Server 2008 R2 > SQL Server Business Intelligence Development Studio. 92 of 329 3. On the File menu, point to New, and then click Project… 4. In the Project types list, click Business Intelligence Projects (see below graphic). 5. In the Templates list, click Report Server Project. 6. In the Name field, enter FTH MSReport. 7. Click OK to create the project. 8. The FTH MSReport solution will be displayed momentarily in VS (Visual Studio) Solution Explorer view (a window on the right side). 93 of 329 9. You need to specify the target Server URL for the project. If the properties page is not automatically displayed when creating the report, in the Solution Explorer, right-click FTH MSReport and click Properties. 10. Set the Target Server URL to http://localhost/ReportServer (see below). 11. Click OK. 94 of 329 In order to collect data from the Historian server, you need to create a connection to the Historian server. In this exercise, you will add a shared data source via PI OLEDB. 1. Right-click the Shared Data Sources folder and select Add New Data Source 2. The Shared Data Source dialog box appears. 3. Enter PIOLEDB in the Name field. 4. Select OLE DB from the Type: drop-down list. 5. Click the Edit… button to fill in the PI OLEDB connection properties (following steps). 95 of 329 6. Select OLE Provider to PI OLE DB Provider from the drop-down list 7. Enter SERVER into Server or file name field. 8. Specify Use Windows NT Integrated Security. 9. Verify that the following options are selected and entered correctly in the image below. 10. Click Test Connection. 11. Verify that the connection succeeded and click OK, and OK again 96 of 329 12. Add the following to the Connection string: ;Integrated Security = SSPI 13. Verify the above configuration options and click OK. 14. After the data source is defined, Report Designer creates a dataset (you named it PIOLEDB). 15. To create a report definition file, in the Solution Explorer right-click Reports, point to Add, and click New Item... 97 of 329 16. Select Report Wizard. 17. In Name field, leave the default name Report1.rdl. 18. Click Add. 19. The Report Wizard welcome page will be displayed. Click Next. 98 of 329 20. Verify the shared data source is set to PIOLEDB. 21. Click Next. 22. In the design query type the following: SELECT tag, time, value, status FROM piarchive..picomp WHERE tag LIKE ? AND time >= ? AND time <= ? ORDER BY tag, time 23. Click Next. 24. Select the report type as Tabular. 99 of 329 25. Click Next. 26. In the report design table, select tag and then click the Page > button to move “tag” into the page display field. 27. Select time and click Group > to move “time” into the Group display field. 28. Select Value and Status and click Details > to move “value” and “status” into the details display field. 29. Verify that the following groups have been configured. 30. Click Next. 31. Select the default Stepped. 100 of 329 32. Click Next. 33. Select the default Slate. 34. Click Next. 35. In Report Name field, leave the default report name Report1. 101 of 329 36. Click Finish. 37. A view opens that contains Design and Preview tabs; the report opens in Design view (may need to click on Design to give it focus). 38. From the Report Data window on the left, double-click on Parameter1 102 of 329 39. Configure the Parameter1 properties with the following settings: Prompt: Tag Mask Data type: Text Click OK 40. Repeat the parameter configuration steps for Parameter2 with the following settings Prompt: Start Time Data type: Date/Time 41. Repeat the parameter configuration steps for Parameter3 with the following settings Prompt: End Time Data type: Date/Time 42. From the VS design view window select the Preview tab to preview Report1. 43. Set the parameters to the following: Tag Mask: *T100*.PV Start Time: Date and Time of 5 minutes ago (for example, 4/21/2012 11:00:00 AM) End Time: Date of tomorrow 103 of 329 44. Click View Report and observe the results. 104 of 329 45. Once you made any desired edits to the report and were satisfied with its appearance, you would normally save and deploy the project/report in order to view in a browser. These steps are not included in this lab, but the end result would appear similar to the following. 46. Close Microsoft Visual Studio. This lab is complete 105 of 329 Lab 5: DataLink for Reporting Section 1: Sampled vs. Compressed Data What You Will Learn How to use DataLink’s data retrieval functions and what the difference is between sampled and compressed data. FactoryTalk Historian DataLink provides many different methods to retrieve data. A fundamental difference in many of the functions is whether you are retrieving sampled or compressed data. Sampled data is regularly spaced data where interpolated values are returned if there is not a recorded value at a particular timestamp. Compressed data is simply the actual recorded values that were archived. This exercise demonstrates the difference, but begins with an introduction to displaying data from FactoryTalk Historian in an Excel spreadsheet using DataLink. Part A – DataLink Introduction 1. Verify that you are on the CLIENT image: 2. Launch Excel 2010 by selecting Start > All Programs > Microsoft Office > Microsoft Office Excel 2010. 3. Enter text into the spreadsheet and “widen” rows as appropriate to create a spreadsheet similar to the following: 106 of 329 4. Click in the cell under the text Temperature; and then select PI > Current Value: 5. In the dialog box that appears, click the Search button to the right of the Tagnames(s) field: 107 of 329 6. Do the following steps: Enter Tag Mask of *T100* Click Search Pick …T100_Demo_Temp.PV tag Click OK 7. Click time at left. Then, click OK. 108 of 329 8. You should have the Current Value of the …T100_Demo_Temp.PV tag with timestamp displayed such as the following. Note: If one or more of your cells filled with hash marks (##########), widen out the column(s) to make more room for the information to fit. 9. This Current Value will not dynamically update, but notice if you press F9, whether this cell is selected or not, the “current value” link will update (try it). Note that at times the tag’s value may not be changing for many seconds in a row, so if the value doesn’t change when you press F9, please wait a few seconds and try again. 10. You can also click the Update button on the toolbar to cause the value to update automatically. 11. Click the Update button to stop or deselect automatic updates (Temperature value and timestamp should stop updating). 12. Now, select the cell under the Last Minute: text and select the Compressed Data button. Note: The “bottom half” of the button will give “preconfigured” options of “Values for yesterday”, “Values for today” and “Values for past day”. We want to configure start and end times ourselves, so click the “top half” of the button: 109 of 329 13. Make the following entries: Search and select the same …T100_Demo_Temp.PV tag Start Time of * End Time of *-1m Hide count Show timestamps 110 of 329 14. Click OK. 15. Your spreadsheet should now be showing the last minute’s worth of data from the archive. Note: Although this tag might be configured with a 1 second scan class, based on times when the tag’s value isn’t changing and also exception and compressions settings, there is not likely to be data archived every second (below graphic only showing partial data). 16. Notice that pressing F9 will continue to update the single Current Value on the spreadsheet, but seems to have no effect on updating the Compressed Data (Start Time / End Time) array. A special key combination of Ctrl – Alt – Shift – F9 will update this and other arrays you might add, as well as the single Current Value field. Please try this key combination to verify. 17. Like the F9 key, the Update button you used earlier will only update the Current Value field. However, if you click Settings to the right of the Update Button, you can change to Full Calculate and also specify a time interval if desired (minimum of 5 seconds). 18. Turn “off” automatic update (click Update button if selected to “de-select”). 111 of 329 19. Select the cell under the cell containing Last 10 Values Archived and select PI > Compressed Data. 112 of 329 20. Make the following choices: Select Number of Values Select same …T100_Demo_Temp.PV tag Start time of * Number of Values of 10 Select backwards in time Show timestamps Click OK 113 of 329 21. You should see the last 10 values archived displayed. This new series of data, as well as the other data on your spreadsheet, should update with Ctrl – Alt – Shift – F9. Note: In the last dialog you selected a Start Time of *, which specifies “now” or “current time”. You also selected backwards in time. This was necessary because otherwise the entry would try to show data “ahead” of the Start Time, instead of data archived prior to the Start Time. Perhaps fine if the start time was at some point in the past. However, by Start Time of “current” or “now”, data “ahead” of that time would have to be data archived in the future, “predicted” by FactoryTalk Historian. FactoryTalk Historian is good, but not that good! 22. When satisfied with the spreadsheet results, close the spreadsheet and save to My Documents as Temperature Report.xlsx. 114 of 329 Part B – DataLink Sampled vs. Compressed Data 1. Verify that you are on the CLIENT image: 2. If not already running, launch Excel 2010 by selecting Start > All Programs > Microsoft Office > Microsoft Office Excel 2010. 3. Open the file DL Samp Data.xls located in the lab files directory (C:\Lab Files\Historian Advanced Lab): 115 of 329 4. Note the “preloaded” Start and End times in cells B3 and B4 (yours will not exactly match the below). Rather than “static” date/times, this spreadsheet is using a formula to enter yesterday (TODAY – 1) at 9:00am as the start time and yesterday at 9:01am as the end time. For the remainder of this lab to work correctly, this exercise assumes your Historian Server was up and running and archiving data between 9:00am and 9:01am the day before you are actually doing this exercise. If you do not think data was being archived yesterday between these times, please modify the formula to sometime when data was being archived and/or consult with your instructor for assistance. A simple option would be to use Start time of *-1m to select one minute ago, and end time of * which would mean current time or "now". 5. Enter *-1m in cell B3 and * in cell B4. Then, select cell B2 and then use the Tag Search… command on the PI menu. 116 of 329 6. Set the Tag Mask to *Temp.PV and then click the Search button. Select the tag InstaCorp.InstaSoap.Mixing:RSLinx Enterprise.CLX1.T100_Demo_Temp.PV then click the OK button. 117 of 329 7. Select cell “D26” and then use the Sampled Data button on the PI menu. Note: If you click the “bottom half” of the button it will give you a list of pre-configured options. Click the top half to fill-in choices yourself. 118 of 329 8. Begin filling in the required parameters by clicking in the Tagname(s) field. 9. Click on cell B2 and you should see the address of that cell “fill in” the Tagname(s) field. 119 of 329 10. Check the show timestamps box, and then use the same technique detailed in steps 8 & 9 to pick the following cells: Start Time End Time Time Interval B3 B4 B5 Your dialog should appear as follows. After confirming, click OK. 120 of 329 11. After you clicked the OK button, the “Sampled Data” columns should be filled in with equally spaced data points between the start and end times. 12. Now click in cell G26 and then select the Compressed Data button on the PI menu. 121 of 329 13. Select both the hide count and show timestamps checkboxes. Next, click in the desired field in the “Compressed Data” dialog box and click the corresponding cell in your spreadsheet to fill in the dialog as follows: Tagname(s) Start Time End Time B2 B3 B4 You dialog should appear as follows. Click OK. 122 of 329 14. The chart is now updated with both regularly sampled and archived (compressed) data points. Notice that you may see small discrepancies that can appear in the sampled data when a peak happens between samples. The archived (compressed) data provides a more accurate representation of what actually occurred than what you see with periodically interpolated data points. Note: If your chart is “drastically different” than the following example, you may need to “refresh” as specified in the step below. 15. Also note the difference in quantity of source data points. If you want to refresh the data and update the chart, you can right-click within the Compressed Data set and choose Recalculate (Resize) Function off the context menu. You can do the same with the Sampled Data to refresh both of them. 16. Close Microsoft Excel and save your spreadsheet if you wish (it is not used later in this lab). This section of the lab is complete 123 of 329 Section 2: Archived data and Digital tags What You Will Learn How to use DataLink’s retrieval of archived digital state changes to calculate simple metrics. In the previous exercise we explored the difference in sampled versus compressed retrieval of a time-series process value. In this exercise we use the compressed data function to retrieve state changes of a digital tag. By employing some Excel logic functions we can quickly calculate some very basic metrics. In this exercise we will be looking at the tag BA:Active.2 to determine the operating time percentage for a batch pump. 1. Verify that you are on the CLIENT image: 2. Launch Excel 2010 by selecting Start > All Programs > Microsoft Office > Microsoft Office Excel 2010. 3. Open the file DL Comp Data.xls located in the lab files directory (C:\Lab Files\Historian Advanced Lab): 4. Select cell B2 and then type BA:Active.2 in the cell. 124 of 329 5. Select cell A7 and then choose the Compressed Data button on the PI menu. 125 of 329 6. Select the option button for Number of Values and checkbox show timestamps. Next, click in the desired field in the “Compressed Data” dialog box and click the corresponding cell in your spreadsheet to fill in the dialog as follows: Tagname(s) Start Time Number of Values B2 B3 B4 126 of 329 7. After you click the OK button, the Time and Status columns should have been populated with state transition data. Select cell C8 and enter the formula: =IF(B7=”Active”, A8-A7, 0) 8. Copy the formula in C8 to cells C9 through C23. If status is going from "Inactive" to "Active", the cell in Column C will contain zeros (0:00:00). If instead, status is going from "Active" to "Inactive", the cell in Column C indicates how long the value was "Active". The simple summation and division formulas on the right will automatically calculate a running time percentage. 9. Close Excel. This section of the lab is complete 127 of 329 Section 3: DataLink Trend Object What You Will Learn How to use DataLink’s Trend Object for charting time-series data from FactoryTalk Historian and Excel native data. FactroyTalk Historian DataLink provides a Trend Object for Excel that has the capability of charting data within Excel as well as data directly from FactoryTalk Historian. This exercise will give you experience using that object with both kinds of data. 1. Verify that you are on the CLIENT image. 2. Launch Excel 2010 by selecting Start > All Programs > Microsoft Office > Microsoft Office Excel 2010. 3. Open the file DL Trend.xls located in the lab files directory (C:\Lab files\Historian Advanced Lab). 128 of 329 4. Begin by selecting cell C6 and then choose the Insert Trend command on the PI menu. 5. On the Trend Add-in Wizard dialog, first switch the radio-button to Data from PI. Next, use the cell picker button to select cell B5 for the Tag name. After clicking cell B5 you need to click the button in the Trend Add-in Wizard) . Finally, click the Add - > button. 129 of 329 6. Now switch the radio-button back to Data on worksheet. Select the checkbox for First element is trace name. Use the cell picker button to select a data range of cells A8 through B17. Click the Add - > button and then the Next > button. 7. Select the Enable updates checkbox. Next, click the reference worksheet buttons for both the Start Time and End Time. 130 of 329 8. Use the cell picker buttons to select cell B2 for the Start Time and cell B3 for the End Time. Click the Next > button. 9. Set the optional Trend title to Tank Levels and then click the Format… button. 131 of 329 10. Select the Vertical Scale property. On the Options tab, change the Format to General and the Position to Outside Left. Click the OK button: 11. Click the Finish button on the Trend Add-in Wizard. 132 of 329 12. Enjoy your interactive trend. Trend Cursors are available just like in ProcessBook ("pull" Trend Cursor from left edge of trend - not shown in below graphic). Mouse-over data point pop-ups are also available (as shown below). 13. Unlike a regular Excel chart, the DataLink Trend is fixed to a specific location on the worksheet. You can move or resize the trend by selecting the appropriate option on the trend’s right-click context menu. Once you click Move/Resize, you need to click and drag over all of the cells you want to "cover" with the moved and/or resized trend, then click OK. 14. Close Excel. This section of the lab is complete 133 of 329 Section 4: Filtered Compressed Function What You Will Learn How to use the PI DataLink Calculated Data function In this exercise you are going to use Excel and the FactoryTalk Historian DataLink “Compressed Data” function with a filter expression to retrieve up to twenty Tank 100 temperature readings from the last two minutes which are above an arbitrary limit of 149. The two available Compressed Data functions are: 1. Compressed Data (start time/number) Function: PINCompFilDat Retrieves compressed data that satisfies a filter condition. The user determines the initial date-time and the number of values to be returned. 2. Compressed Data (start time/end time) Function: PICompFilDat Retrieves compressed data based on a start time and an end time that satisfies a filter condition. For this exercise you will use the Compressed Data (start time/number) function. Filter Expressions: The following describes the syntax of valid filter expressions in FactoryTalk Historian DataLink. A filter expression uses the same arithmetic operators and functions as a calculation expression. In addition, one or more relational operators are needed. Relational operators are: < less than = equal to > greater than <= less than or equal to <> not equal to >= greater than or equal to Example: (abs('my:tag') >= 14.65) The above expression evaluates to TRUE if the absolute value of the tag mytag is at least 14.65. 134 of 329 To comparing digital tags, use the digital state string itself. For example: ('my.tag' = "Manual") A filter expression may also contain logical operators such as: AND returns TRUE if both arguments are TRUE OR returns TRUE if at least one of the arguments is TRUE NOT returns TRUE if argument is FALSE, and vice-versa Example: The following expression evaluates to TRUE if the value of the tag sinusoid is less than 45 and the square root of the value of the tag vdf1002 is greater than 2: ('sinusoid' < 45 and sqr('vdf1002') > 2) 1. Verify that you are on the CLIENT image. 2. Launch Excel 2010 and open the file DataLink Filtered Compressed _Template.xls located in the lab files directory (C:\Lab Files\Historian Advanced Lab). 3. Select Cell B3. 4. From the Excel PI menu, select Tag Search. 135 of 329 5. In the search Tag Mask field type *T100*PV then click Search. 6. Select the tag: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV. 7. Click OK. 8. The Tag Name field will display …T100_Demo_Temp.PV with the current value of that tag below (cell B4). If the Current Value cell displays “#NAME?” or “Tag not found”, right-click on the cell, select Current Value…, then click OK on the dialog that appears. 136 of 329 9. To calculate the values for the last two minutes, enter a Start Time of *-2m in cell B5. 10. In this exercise you are using the Filtered Compressed Data Number function, so do not enter an End Time, just leave it blank. 11. Set the Number of Values to 20 (cell B7). 12. Before adding the Compressed Data function, you will copy the tag name to the clipboard. The tag name is long and prone to error when typing by hand. Select cell B3. Click and drag over the entire tag name in the address bar, right-click and copy the tag name to the clipboard (be sure from the address bar – not from cell B3). You will paste this tag into a dialog box in a few steps from now. 13. Select cell A16 under the Start Time field. 14. From the PI menu, select Compressed Data 137 of 329 15. Select the option of Number of Values. Populate the Compressed Data (Start Time / Number) dialog using cell references by clicking the fields and selecting the required cell as detailed below: Tagname(s): Cell B3 Start Time: Cell B5 Number of Values: Cell B7 16. To determine when T100_Demo_Temp is greater than 149, enter the following in the Filter Expression field: 'InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV'>149 Note: There are single quotation marks around the tag name. Instead of typing, you may optionally paste the tag address copied in step 12 and add the end quotation mark and >149 comparison. When copied to the clipboard, be aware that there was already a single quotation mark at the beginning of the tag name (put there so Excel knew it was text, not a value or expression) 17. Click show timestamps and verify the following options. When ready, click OK. 138 of 329 18. Review the filtered data. You have used the Compressed Data function to show up to 20 values from the archive for this tag, starting 2 minutes ago, but only those that are greater than 149. 19. Save your work and close Excel. This section of the lab is complete 139 of 329 Section 5: Time Filtered Function What You Will Learn How to use the PI DataLink Time Filtered to calculate the operating time status In this exercise you are going to use the Excel PI DataLink “Time Filtered” function to view the status changes of a digital tag to determine over the last day and how much time in each hour was spent in the active state. This method performs the calculation in a single step. You will be using the tag “BA:ACTIVE.2” to determine the active state time. Function: PITimeFilter Retrieves the amount of time where an expression is true 1. Verify that you are on the CLIENT image. 2. Launch Excel. 3. Open the file DataLink Time Filtered _Template.xls located in the lab files directory (C:\Lab Files\Historian Advanced Lab). 140 of 329 4. Set the various time options… Enter a Start Time of *-1d in cell B6 (one day ago). Enter an End Time of * in cell B7 (current time starting now). Enter a Time Interval of 1h in cell B10 (interval period for the calculation data). To configure the Time Unit, on the worksheet, select Cell B11. 5. From the Excel Data menu, select Validation. 6. For the validation criteria set Allow field to List. 7. In the Source field enter: seconds, minutes, hours, days and click OK. 8. Select Cell B11 and click the drop down list selector icon 141 of 329 and select minutes 9. Next, add the expression that will be used in the Time Filtered function. Select cell B12 and enter the below expression. Important Note: The first two characters are two Single Quotations, ’’. Then, there is a single quotation after the tag name and Double Quotations before and after Active. After you enter the expressions, the cell view only displays the 1st single quotation character. Two single quotations are required at the beginning because the first single quote tells Excel that what follows is not a “formula”. The second single quote is part of the “pair” that needs to surround the tag name BA:ACTIVE.2. Tag names have to be within single quotes, same syntax used in Performance Equations. 10. Verify the settings which will return 24 time filtered values, one value per hour in a day. These values will be the number of minutes per hour that the expression was true. 11. In the data output area, select Cell A15 under Date / Time. 12. From the Excel PI menu, select Time Filtered. 142 of 329 13. For each parameter click in the appropriate field and select the required cell reference as detailed below: Expression(s) Cell B12 Start Time: Cell B6 End Time: Cell B7 Time Interval (optional): Cell B10 Time Units: Cell B11 Note: To be able to select the Time Units from a selected cell rather than from the drop down list, click the cell icon then click in the field before clicking Cell B11. Check show start time checkbox 14. Verify the following options and then click OK. 143 of 329 15. Review the Time Filtered data. Note: The 24 listed items are the number of minutes per hour over a 24-hour period when the expression being evaluated is true. If your Historian has not been running for very long, perhaps only the “most recent” hour or two (bottom of the list) might be considered “valid”. Times when Historian was not actively archiving might have the tag 100% of the time (60 minutes of the hour) in an “Active” state (you would see 60's listed) or 100% of the time in an “Inactive” state (you would see 0's listed) 16. Modify one or more of the time parameters (i.e. Start Time, End Time, Time Interval, and/or Time Unit) and review the data. Right-click on cell A15 and select Recalculate (Resize) Function on the context menu Note: If the time parameters modified result in increases in size of the output data area, (more returned rows), then you may need to Recalculate (resize) Function. 144 of 329 17. A Time Filtered expression can contain multiple conditions using the logical operators OR and AND Modify the expression to use the AND operator by entering (remember first two characters are single quotations): '’BA.ACTIVE.2’=”Active” AND 'Sinusoid'>30 Note the difference in the calculation of time when this condition was met. 18. Modify the expression to use the OR operator by entering: '’BA.ACTIVE.2’=”Active” OR 'Sinusoid'>30 19. Save your work and close Excel. This lab is complete 145 of 329 Lab 6: System Management Section 1: Exploring the Rule Editor What You Will Learn How to use the FactoryTalk Historian auto-discovery wizard to locate and configure data points for collection. In a ControlLogix processor that is running in the DATA image, there are six tag structures using a User-Defined Data type. These structures are as follows: Each of these structures consists of several “members”. “PV” (process variable) is one of them: FactoryTalk Historian provides an auto-discovery wizard which can interrogate FactoryTalk directory data sources and automatically configure their data points for collection. In this exercise we will use the wizard’s advanced rules definition to specifically select the PV values from this group of tags for collection by the historian server. 1. Verify that you are on the CLIENT image: 2. Launch the FactoryTalk Administration Console by selecting Start > All Programs > Rockwell Software > FactoryTalk Administration Console. 146 of 329 3. When prompted, select the Network FactoryTalk Directory and then OK. 4. In the network tree, right-click on the InstaSoap area under the InstaCorp application and choose the Discover Historian Points… context-menu entry. 147 of 329 5. Begin by DEselecting the Linx Classic, Other OPC_DA Servers and HMI/Alarm Servers checkboxes. Then, click the Edit Discovery Rules button. 6. On the following dialog box, you can use options to create or select Rules for the discovery wizard to use. You could also create or select defined Tag Attributes. Click the Rule File Management… button. 148 of 329 7. The following dialog has no rules defined. Click the New button. 8. On the following dialog, enter the Rule File Name and Description specified, then click OK. 9. Check the Active checkbox, and then click Open. 149 of 329 10. You should return to the following dialog. The rule file you created should be listed as Current Rule File. Click New to define the discovery rules that will be used. 11. The Define Discovery Rule dialog will let you define what we are going to be searching for. Define that we are looking for ControlLogix tags that have “PV” as a member and the specific part of the tag is the .PV value by making the selections highlighted below. DO NOT CLICK OK YET!. 150 of 329 12. Now, in the Using this configuration selection box, select <New Configuration>. 13. This dialog will let us define some Tag Attributes that will be used as the tags are brought into Historian. Enter the File Name and Eng Units selections as shown below. 151 of 329 14. Click on the Archive tab, and change Span to 150. Then, click OK. 152 of 329 15. The dialog should appear as follows. Click OK. 16. The Rule Editor dialog should now appear as follows. Click Save. A Close button will appear. Click Close. 153 of 329 17. You will return to the Discover New Historian Points dialog box where you can select Next to conduct the “search”: 18. You will see this window while the discovery process is performed. Discovery can take several minutes. You should not be alarmed if several minutes go by without any points being added. We used a relatively narrow specification for discovery in this exercise. 154 of 329 19. When the discovery process is completed, you will be presented with a list of the matching points. You have the opportunity to deselect individual or groups of points, change the scan class for individual or groups of points, or even open a tag browser interface to add more points. Click the Confirm Points button: 155 of 329 20. The below completion dialog confirms that 6 data points were added to the historian using interface FTLD1. Note: In this lab these six points might already be in the Historian Server for the other labs to work, so you may be getting a message “Added 0 points to Production Historian(FTLD1)”. It will not add the points if they already exist. Click the OK button and then close the FactoryTalk Administration Console: 156 of 329 At this point in the exercise, you have use the auto-discovery wizard to bring 6 tags into your Historian database. While using the wizard, the choices you made caused the following: The six tags are from a ControlLogix controller and are from tags with members of PV and the actual tags are those that end with .PV. The tags are in the Historian database with the following attributes, “modified” from the defaults: Engineering Units of seconds Span of 150 The remainder of this lab will have you create a Trend in ProcessBook to “test” one of the tags you may have created. You could also use System Management Tools (SMT) to view current or recorded values for the tags. 1. Launch ProcessBook by selecting Start > All Programs > Rockwell Software > FactoryTalk Historian SE > FactoryTalk Historian Processbook. 2. Close the ProcessBook demo file that opens at default. 3. From the File menu select New. 157 of 329 4. Select new ProcessBook Display (.pdi) File, set the Display Name to Test, and click the OK button. 5. Change to build mode by selecting the Build button on the toolbar: 6. Select the Trend button on the toolbar: 7. Add a Trend to the Display (click-hold, drag and release) 158 of 329 8. Click on the Tag Search… button to select the following tag: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV Set the Plot Time Start to *-10 Minutes. Click the OK button: 159 of 329 9. Verify that the tag is showing recording data. 10. Close the ProcessBook application. This section of the lab is complete 160 of 329 Section 2: Excel Tag Configurator What You Will Learn How to use the Tag Configurator in Microsoft Excel to perform bulk tag creation and manipulation. Tag Configurator FactoryTalk Historian comes with a useful add-in for Microsoft Excel called the Tag Configurator. This add-in shows up as the PI-SMT menu in Excel. Using this add-in we can perform bulk tag management tasks such as creation, modification, and even deletion. In this exercise we will be using the Tag Configurator to automatically create historian tags as well as to do bulk modifications of tags. 1. Go to the SERVER image. 2. Launch Excel 2010 by selecting Start > All Programs > Microsoft Office > Microsoft Excel 2010. 3. Open the file BA2 Tags.xls located in C:\Lab Files\Server\Lab Files\Historian Advanced Lab. Note: The text at the top of the columns indicates what information (attribute) is contained in the cells below. Items such as the name of the Tag, if archiving is on or off, when this tag was last changed and by who, settings for Compression (deviation, percent and max), etc, are contained within this spreadsheet. 161 of 329 4. We want to add these tags to the FactoryTalk Historian system for use in a later exercise. Go to the Add-Ins tab and select Export Tags… on the PI-SMT menu. 5. On the Export PI Tags dialog, change to or verify that the Mode is set to Create or Edit (these tags may or may not already exist at this point in your Server) and then click the OK button. 162 of 329 6. Acknowledge the results dialog by clicking the OK button. If newly added, these tags will start being collected within a couple of minutes. 7. Create a new workbook to work with by clicking File > New option and create a “Blank Workbook”: 8. We are going to import into Excel the tags that we discovered in a previous exercise. Go to the Add-Ins tab and select Import Tags… on the PI-SMT menu. 163 of 329 9. Set the Tag Mask to *.PV and verify the Point Source is ftld then click the OK button. 10. Acknowledge the results dialog by clicking the OK button. 164 of 329 11. We want to collect six .SCA member tags so we will use the .PV tags as a template. Begin by dragging a selection box around the six “Tag” names in column B: 12. On the Home tab, select Find & Select > Replace… 13. Configure the dialog as follows and select Replace All. Click OK on the message box that follows and close the Find and Replace dialog. 165 of 329 14. You should now have all tags listed with .SCA at the end instead of .PV. 15. Note that column Y is identified as “instrument tag” and contains the same .PV tags that column B had: 16. Use the same “find and replace” procedure to also change all of these tags to .SCA instead of .PV: 17. To create the new tags, go to the Add-Ins tab and select Export Tags… on the PI-SMT menu. 166 of 329 18. On the Export PI Tags dialog, verify that the Mode is set to Create and then click the OK button: 19. Acknowledge the results dialog by clicking the OK button. 167 of 329 20. Our new tags will start being collected within a couple of minutes. At this point we would like to modify the compression parameters for all of our temperature data points. We will use the Tag Configurator to make these changes en masse. First we need to clear out the worksheet from our previous efforts. On the PI-SMT menu, choose the Clear Sheet command. 21. Click Yes to confirm clearing the current sheet. 22. Select the Import Tags… command on the PI-SMT menu: 168 of 329 23. This time, set the Tag Mask to *Temp.* and verify the Point Source is set to ftld then click the OK button. Click OK again on the confirmation dialog that will appear. 24. We want to ensure that any compressed interpolated temperature value is within ± 0.6 of what the uncompressed interpolated value would have been. We also want to have an archived value at least every minute. To satisfy the first condition, we specify a CompDev of 0.6. Use your copy and paste skills to change the compdev column (F), to “0.6” for all tags: 169 of 329 25. Compression deviation can be entered in "Engineering Units" (compdev) or "Percent of Span" (compdevpercent), with compdevpercent taking priority or precedence. Important to realize that compdevpercent values will ALWAYS override compdev. So, for the compdev values to be used, we must now delete the compdevpercent column, G, from the worksheet. Right-click on the G column (the entire column, not just a cell), then choose the Delete command from the menu. 26. To satisfy the second condition, an archived value at least every minute, now set the compmax column, which is now column G, to 60 (entered in seconds). Note that exception filtering occurs before compression filtering, and this compmax setting assumes values are coming from the exception test at least every minute for the compression max setting to have the intended effect. 27. Now, choose the Export Tags… command on the PI-SMT menu. 170 of 329 28. Change the Mode to Edit and then click the OK button. 29. Click the OK button on the results dialog. 30. The changes to the tags will tag effect within a couple of minutes. Use the System Management Tools (SMT) to verify information about the tags you’ve just edited such as the following. Ask your instructor if you are not familiar with using the SMT at this point. Use Data > Current Values to view Current Values Use Data > Archive Editor to view Archived Values Use Points > Point Builder to verify your changes of Compression Deviation of 0.6 Engineering Units and Max Time of 1 minute (60 seconds). 31. Close Excel and the SMT. 171 of 329 Changing Tag Names (not actually part of this lab…for informational purposes) Note that many tag names resulting from using the Discover Historian Points… and Add Individual Historian Points… can be very long, including Application, Area and Server names such as the ones you’ve just been working with in this lab: If you don’t want to work with these long, somewhat “complex” names, one option available to you is in the SMT Point Builder. By selecting the Rename button, you can rename the tag. All of the data previously archived will still be associated with this tag: For example, in the dialog box below, after clicking the Rename button, the new name of T100_Temp is being given to the tag originally named InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV: 172 of 329 If wanting to change many names at once, the Tag Configurator in Excel could be very useful. However, if one attempts to change the names in the Tag field and export the tags to Historian as an Edit, there would be errors because the exporting function would be looking for tags with these exact names to already exist. The example below shows the Tagname in B2 using the Rename button in the SMT Point Builder and the Tagname in B4 and B6 edited directly in the Excel cells. The PI Tag Configurator returned 2 errors for the tagnames edited in Excel. 173 of 329 Bulk-changing of tag names in Excel can but done, but what must occur is a column inserted identified as NewTag. Names entered into that column will be the new names for the tags, and data previously archived will still be associated with those tags. If a row in that column is left “empty”, that tag name will not be affected. In the following example, notice the NewTag column that has been added and three of the tags have new, “reduced-length” tag names specified. When exported, all six of the tags were “edited”. But, only three of them received new names in the process The “Instrument Tag” column, identified as column Y in the below, would remain with the original, “full” tag names. The “Instrument Tag” setting for a tag identifies the actual address and/or location of the data: Note: If you have had time and actually followed this procedure to change your “Demo_Temp” tag names, please change them back as the original names will be used in future exercises. Sorry for any inconvenience, but thanks much for your great initiative! This section of the lab is complete 174 of 329 Section 3: Data collection: Polled vs. Advised mode What You Will Learn Compare Polled Against Advised Data Collection Modes In this exercise, you will compare polled versus advised data collection modes. You will configure two separate FactoryTalk Historian points which collect data from the same location in the SoftLogix controller, initially with no exception testing. The point used in SoftLogix will be a “storage value” that you can write to using the Rockwell Software Data Client in order to test. Polled Mode Collection Set location 3 = 0 for polled mode Poll the data source at scan interval Works with ExcMax and unchanging data Advised Mode Collection Set location 3 = 1 for advised mode Will not work with ExcMax and non-changing data values Less network intensive than polled mode at fast scan rates Part A 1. Verify that you are on the SERVER image. 2. Open the FactoryTalk Administration Console, select Network directory and OK. 175 of 329 3. Right-click on the Mach3 Area of Line1 of the Application MyApp. Select Add Individual Historian Points… 4. Select Browse Tags… on the dialog box that appears. 176 of 329 5. Do the following steps: Under Mach3 > FTHistorian > Online, select Program:MainProgram Select the StoreValue_1 tag Click Add Tag(s) to List Click OK 177 of 329 6. Click OK on dialog that follows to add this tag to Historian. 7. In the following steps you will use Excel to create and configure two separate FactoryTalk Historian points, one polled and the other advised mode. They will both collect data from the same location in the SoftLogix controller, the StoreValue_1 tag. Close the FactoryTalk Administration Console and open Microsoft Office Excel 2010. 8. Select the Import Tags… command from the Add-Ins > PI-SMT menu. Import the StoreValue_1 tag (full tag syntax: MyApp/Line1/Mach3:Mach3_Ent:[FTHistorian] Program:MainProgram.StoreValue_1) using the following parameters: Select: All attributes for tag mask specification Tag Mask : *StoreValue_1 Point source: ftld Point Class: classic Click OK 9. After clicking OK on the ”Import succeeded”message that appears; your Excel spreadsheet should appear similar to the following. 178 of 329 10. This spreadsheet now contains the attributes for the MyApp/Line1/Mach3:Mach3_Ent: [FTHistorian]Program:MainProgram.StoreValue_1 tag. Change/set the specific tag attributes as listed below (do not change any attributes not listed): Tag: StoreValue_1_Advised compdev 0 compdevpercent 0 compmax 0 compressing 0 excdev 0 excdevpercent 0 excmax 0 11. Copy this entire row of tag information and paste into the row below to create a duplicate row. 12. Change the attributes in this second row as follows: Tag: StoreValue_1_Polled location3: 0 (polled mode) 13. Your spreadsheet should now appear as follows (some of the columns not modified are deleted in below graphic for clarity – don’t delete them in your spreadsheet). Note: One column that you did not change is instrumenttag. This column remains as the “source” of the data that will be read into both the StoreValue_1_Advised and StoreValue_1_Polled tags. The contents of this instrumenttag field is the MyApp…StoreValue_1 tag because we started by importing this specific tag into Excel and used it as a “template” to create the other two tags (Advised and Polled versions). 179 of 329 14. To create the new tags, select the Export Tags… command on the PI-SMT menu. 15. In the Export PI Tags dialog, verify that the Mode is set to Create and click the OK button. 16. Click the OK button to acknowledge the results. 17. Minimize (do not close) Excel. You will need this same spreadsheet later in Part B of this exercise. 18. Open the System Management Tools (SMT) and go to Data > Archive Editor. 180 of 329 19. Select the Search icon 20. Do the following steps: Enter Tag Mask of Store* Click Search Click Select StoreValue_1_Advised Click OK 181 of 329 21. You should see results similar to the below, only Pt Created and a single zero is displayed. With an Advised tag, values will not normally come into the server unless they have changed. 22. Click on the to open up another tab 23. Repeat Step 19 and 20 to select StoredValue_1_Polled. Initially the tags value was Pt Created, and then, after a short delay the value was read every second. At this time, there is nothing changing the StoreValue_1 tag in the CLX memory so every value read should be a zero (0). 182 of 329 24. We now will manually change the value of the StoreValue_1 tag in the CLX processor. Open the Data Client tool from Start > All Programs > Rockwell Software > FactoryTalk Tools. 25. Select Network Connection and click the OK button. 26. Select Mach3 of Line1 of the MyApp application and click OK. 27. Click OK on the following dialog. 183 of 329 28. Select the StoreValue_1 tag in the Program:MainProgram location and click OK. 29. Right-click on the tag and select Write Item(s) and then Async Write…: 184 of 329 30. Type in a value of 1 and then click OK. 31. Repeat the above steps to download a 2 to the StoreValue_1 tag. 32. Repeat these steps one more time to download a 3 to the StoreValue_1 tag. button in the SMT, 33. Now in the SMT when you select the StoreValue_1_Polled tag and click the Refresh you will see events listed such as the following (scroll to the bottom) which include multiple instances of the 1, 2 and 3 values (still being polled every second).: 185 of 329 34. If you select the StoreValue_1_Advised tag and click Refresh, you should see results similar to the following which only contain the values “when they changed”: 186 of 329 Part B In the previous portion of this exercise, you created two tags to demonstrate differences between advised and polled tags. The polled tag was read into FactoryTalk Historian every second, whether it changed or not. This portion looks at adding Exception Deviation to a tag to prevent duplicate values from being read in and further demonstrates differences in functionality between Advised and Polled tags. 1. You minimized an Excel spreadsheet that you used to create the Advised and Polled tags. Restore or maximize the spreadsheet and do the following: Change the excdev values to 2 (this will set “exception deviation” to 2 engineering units) Delete the entire excdevpercent column (using “percent of span” is another way to set exception deviation. We want to use “engineering units” instead of “percent of span”, and if we don’t delete this column the “percent of span” will override the “engineering units”) Change the excmax values to 120 (this will create 120 second, or two minute “windows” of values coming into the interface node) 2. Select PI-SMT and Export tags… 3. On the following dialog, select Mode of Edit and then click OK. 187 of 329 4. Select OK on the dialog that follows and then minimize Excel. Wait AT LEAST two minutes to give the FTLD interface time to put these changes into effect. IMPORTANT TO WAIT OR YOU WILL NOT GET EXPECTED RESULTS! 5. Use the Data Client to download values within plus or minus 2 to the StoreValue_1 tag. For example, assuming the last value downloaded was 3, download values of 4, 5, 1 and then 2. 6. Use Refresh in the SMT to see the values last recorded to the StoreValue_1_Polled and StoreValue_1_Advised tags. Because these downloaded values are within the plus and minus of the exception deviation of 2, they should not appear. However, note that you have also specified an excmax of 120 seconds. This means that if two minutes have gone by since the last value was received in the snapshot, another value would be read in, even if within the plus or minus “deadband”. You also might be seeing a value read into the Advised tag because of your edits of that tag…somewhat like a “refresh” of the tag’s value from RSLinx Enterprise. 7. Leave the value of 2 in the StoreValue_1 tag for several minutes. 8. When you look at the results of the StoreValue_1_Polled tag using Refresh, you should see that even when the value does not change, you will see a value read in at the end of the excmax “window” and a value at the beginning of the next two minute excmax “window”. These could be considered “heartbeats”…values read into the server even if they didn’t change. 9. When you look at the StoreValue_1_Advised tag events, you should still see a value of 3 in the tag, but nothing further is likely to be displayed unless the value changes again after two minutes from when the last value was read. That could take many minutes, hours, days, etc. If the value of the tag is not changing at all, the excmax attribute value has no effect…no such “heartbeat”. 188 of 329 Summaries regarding differences between FTLD Advised and Polled tags: Advised Tags Timestamps comes from RSLinx Enterprise (Data Source). If the value of the tag changes more than the excdev, the tag will be read into the snapshot with the timestamp of when the change occurred. If the value of the tag changes within the excdev, it will not automatically trigger a read into the snapshot. However, if the value continues to change at least a small amount, new timestamps will be coming into the FTLD Interface. As a result, the excmax attribute will have an effect by causing a new value to come into the snapshot. If the value of StoreValue_1 does not change at all, no values will come into the snapshot. The excmax attribute will have no effect. So, important to realize that values that do not change for extended periods of time will not be read into the snapshot until they do change. Could be many minutes, hours, days, weeks or longer between values coming into the snapshot. At times when the tag is edited it may result in a read of the tags value into the snapshot, even if the value has not changed. Location 4 stores Scan Class for Advised tags. RSLinx Enterprise will only look for changes in values of this tag at this time interval. It is possible to “miss” changes in the tag if they occur and then change back within this time interval. Polled Tags Timestamps come from FactoryTalk Live Data Interface. If the value of the tag changes more than the excdev (exception deviation), the tag will be read into the snapshot with the timestamp of when the tag was read. If the value of the tag changes within the excdev, it will not automatically trigger a read into the snapshot. However, the excmax attribute will cause two values to be read into the snapshot, the last value at the end of one “window” and the other at the beginning of the next “window”. If the value of StoreValue_1 does not change at all, since the FTLD interface is still polling the value every second it gets new timestamps so knows when the excmax “window” ends. The excmax attribute in this case will cause the current value to be read twice, once for the end of one “window” and another for the beginning of the next window. Location 4 stores Scan Class for Polled tags. The FTLD Interface will poll RSLinx Enterprise for tag values at this time interval. It is possible to “miss” changes in the tag if they occur and then change back within this time interval. 189 of 329 Sample Scenario: Approximate Time 12:00 12:00:30 12:01 12:03 12:11 Value 20 21 22 21 5 Results from Advised tag: Results from Polled tag: This section of the lab is complete 190 of 329 Section 4: Performance Equations What You Will Learn How to use Performance Equations to perform server-side recordable instance and summary calculations. 1. Verify that you are on the SERVER image: 2. Launch the System Management Tools (SMT). 3. Expand the Points category and select the Performance Equations plug-in. 4. Our first performance equation is going to be a Fahrenheit to Celsius conversion. Click on the New toolbar button to begin creation of a new Performance Equation tag. 191 of 329 5. On the General tab, set the following fields: Name: T100_Demo_Temp_DegC Descriptor: Tank T100 Temperature Point type: Float32 Eng Units: Deg C 6. On the Equation tab, set the Equation to: (‘CDT158’ - 32) * 5/9. you don’t get an error. Your actual value will differ: 192 of 329 Click the Evaluate button just to make sure 7. On the Scheduling tab, change the radio button to Event-based scheduling. Change the timestamp assignment option to timestamp of the triggering event. Use the button to select the tag: CDT158. 8. On the Archive tab, set the following fields: Exception Deviation: 0.25 Compression Deviation: 0.5 Compression Max Time: 15 Min 9. Click the Save toolbar button and check for a success message in the session record: 193 of 329 10. The next Performance Equation (PE) will combine two tank levels. Click on the New toolbar button to begin creation of a new Performance Equation tag: 11. On the General tab, set the following fields: Name: BA:COMBINED_LEVELS Descriptor: BA 1 & 2 Combined Levels Point type: Float32 Eng Units: ft 12. On the Equation tab, set the Equation to: ‘BA:LEVEL.1’ + ‘BA:LEVEL.2’. Click the Evaluate button just to make sure you don’t get an error. Your actual value will differ. 194 of 329 13. On the Scheduling tab, change the Scan class to 3 which will cause the equation to be calculated every 30 seconds. 14. On the Archive tab, set the following fields: Exception Deviation: 0.25 Compression Deviation: 0.5 Compression Max Time: 15 Min 15. Click the Save toolbar button and check for a success message in the session record. 195 of 329 16. The next PE will perform a totalizer summary calculation. We are going to pretend that the T100_Demo_Temp.PV tag represents a flow rate in gallons per hour. Start by clicking the New toolbar button to begin creation of a new Performance Equation tag. 17. On the General tab, set the following fields: Name: T100_Flow_1h_Total Descriptor: Tank T100 One Hour Effluent Total Point type: Float32 Eng Units: gal 196 of 329 18. We want to totalize the T100_Demo_Temp.PV tag but only when at least 95% of the readings are not suspect. On the Equation tab, set the Equation to the following. Hint…type in as "one line" (without hitting the "Enter" key) and use the scratch": button when appropriate to search for tags to fill in your equation, rather than typing the tag names in “from if pctgood(‘InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Volume.PV’, ‘*-1h’, ‘*’) > 95 then tagtot(‘InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Volume.PV’, ‘*-1h’, ‘*’)*24 else 0 Note The multiplication by 24 to convert into a per day value which FactoryTalk Historian needs. Click the Evaluate button to make sure you don’t get an error. Actual result will differ. 19. On the Scheduling tab, change the Scan class to 2 which will cause the equation to be calculated every 2 minutes. 197 of 329 20. On the Archive tab, set the following fields: Exception Deviation: 0.25 Compression Deviation: 0.5 Compression Max Time: 0 hours and 15 Min 21. Click the Save toolbar button and check for a success message in the session record. 22. The last PE will totalize the amount of time that CDM158 is in the “manual” state. Start by clicking the New toolbar button to begin creation of a new Performance Equation tag 198 of 329 23. On the General tab, set the following fields. Name: CDM158_Manual_Percent Descriptor: Percent of time in manual mode over last hour Point type: Float32 Eng Units: min / hr 24. On the Equation tab, set the Equation to: timeeq('cdm158','*-1h','*',"manual")/36 Notice the single-quotes enclose tag names but the double-quotes for the literal string. Click the Evaluate button to make sure you don’t get an error. Your actual result will differ: Note: The timeeq function returns amount of time in seconds, so to convert to "% per hour", you are dividing by 36 (3600 seconds in an hour divided by 100 to get "percentage" = 36) 199 of 329 25. On the Scheduling tab, change the Scan class to 2 which will cause the equation to be calculated every 2 minutes. 26. On the Archive tab, set the following fields: Typical value: 50 Zero: 0 Span: 100 Step: Off Exception Deviation: 0.25 Compression Deviation: 0.5 Exception Max Time: 10 Min Compression Max Time: 15 Min 27. Click the Save toolbar button and check for a success message in the session record. 200 of 329 28. We want to watch some of our new Performance Equation tags. Expand the Data category and select the Current Values plug-in. 29. Use the Tag Search… button (possibly repeatedly) to select the following tags: BA:COMBINED_LEVELS BA:LEVEL.1 BA:LEVEL.2 CDM158 CDM158_Manual_Percent InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV T100_Demo_Temp_DegC T100_Flow_1h_Total 30. Click the Start Updating button to watch the relationship between the tags: 31. Close the SMT. This section of the lab is complete 201 of 329 Section 5: Totalizers What You Will Learn How to use Totalizers to perform server-side recordable instance and summary calculations. 1. Verify that you are on the SERVER image by checking the hostname on the background image. 2. Launch the System Management Tools (SMT). 3. Expand the Points category and select the Totalizers plug-in. 4. Our first Totalizer is going to be a T100_Flow_1h_Total tag. We are going pretend that T100_Demo_Temp.PV represents a flow rate in gal / hour which we want to totalize over the preceding hour. Click on the Create a new Totalizer toolbar button to begin. 202 of 329 5. On the Name & Type tab, set the following fields: Name: T100_Flow_1h_Tot Descriptor: Tank T100 One Hour Effluent Total Source Tag: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV Eng Units: gal Point type: Float32 Totalizer Type: Moving Time Weighted Total 6. DO NOT reproduce what you see in the following image. If we wanted to precisely emulate the Performance Equations configuration of writing a total every two minutes, on the Sampling tab we would select to Periodically sample Interpolated values every 2 Minutes (again, do not make these selections…just for informational purposes). 203 of 329 7. Instead, we can achieve much more precise results by choosing to sample Whenever a new source tag event occurs (Natural). Use this setting on your Sampling tab. 8. On the Results tab, set the following fields: Write final results: After a time period elapses Results every: 1 Hour(s) 204 of 329 9. On the Archive tab, set the following fields: Typical Value: 50 Zero: 0 Span: 100 Step: Off Exception Deviation: 0.25 Compression Deviation: 0.5 Compression Max Time: 15 Min 10. On the Options tab, set the following fields: Conversion Factor: 24.0 Pct good values needed: 95 Note: The Totalizer assumes tag rate of "Units per day". Since we really are using "Units per hour", we need to specify a Conversion Factor of 24. 205 of 329 11. Click the Save toolbar button and check for a success message in the session record: 12. The next Totalizer will reproduce the calculation from the CDM158_Manual_Percent performance equation. Click on the Create a new Totalizer toolbar button to begin: 13. On the Name & Type tab, set the following fields: Name: CDM158_Manual_Pct Descriptor: Percent of time in manual mode over last hour Source Tag: CDM158 Eng Units: % Point type: Float32 Totalizer Type: Count Events, Time when TRUE, Moving, equal to, Manual 206 of 329 14. On the Sampling tab, select Whenever a new source tag even occurs (Natural): 15. On the Results tab, set the following fields: Write final results: After a time period elapses Results every: 1 Hour(s) 207 of 329 16. On the Archive tab, set the following fields: Typical value: 50 Zero: 0 Span: 100 Step: Off Exception Deviation: 0.25 Compression Deviation: 0.5 Compression Max Time: 15 Min 17. On the Options tab, set the following fields. Conversion Factor: 0.02778 Pct good values needed: 95 Note: This Totalizer will determine the number of seconds the CDM158 tag is set to "Manual" in the last hour. Dividing by 36 would give the "percentage" of time. However, the Conversion Factor is a "multiplication" so instead of dividing by 36 we will use the equivalent of multiplying by 0.02778. 208 of 329 18. Click the Save toolbar button and check for a success message in the session record: 19. The last Totalizer will perform a block average on the BA:LEVEL.1 tag: 20. On the Name & Type tab, set the following fields: Name: BA:LEVEL1.STEPAVG Descriptor: BA:LEVEL.1 one minute block average Source Tag: BA:LEVEL.1 Point type: Float32 Totalizer Type: Summary, Block, Time Weighted, Average 209 of 329 21. On the Sampling tab, select Whenever a new source tag even occurs (Natural). 22. On the Results tab, set the following fields: Write final results: After time period elapses Results every: 1 Minute(s) Write interim results: stamped one second after start 210 of 329 23. On the Archive tab, set the following fields: Typical value: 50 Zero: 0 Span: 100 Step: On Shutdown: On Compressing: Off Exception Deviation: 0 Exception Max Time: 0 24. Click the Save” toolbar button and check for a success message in the session record. 211 of 329 25. We want to watch some of our new Totalizer tags. Expand the Data category and select the Current Values plug-in. 26. Use the Tag Search… button (possibly repeatedly) to select the following tags: BA:LEVEL1.STEPAVG BA:LEVEL.1 CDM158 CDM158_Manual_Pct CDM158_Manual_Percent InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV T100_Flow_1h_Tot T100_Flow_1h_Total 27. Click the Start Updating button to watch the relationship between the tags. Note that one or more tags may show a value of Configure at this time. This “initial value” is normal if a totalizer tag has not calculated a value yet. 28. Close the SMT. This section of the lab is complete 212 of 329 Section 6: Event triggered points What You Will Learn How to configure Event Triggered Reads FactoryTalk Historian tags can be configure to be read in “polled” or “advised” modes. In general, if “polled”, tags would be read every certain time interval (like once per second). If “advised”, a change in that tag’s value will trigger a read (the tag's value with a timestamp actually being "sent" from RSLinx Enterprise to the FTLD Interface). In this exercise, you will examine event triggered reads which take place only when a specific change is detected in a separate, “triggering” tag. Event triggered reads can be configured to operate in one of four modes: Anychange Increment Decrement Nonzero Part A In our first contrived example, assume that you have a batch process comprised of three phases (1, 2, and 3). There is also a zero (0) phase that indicates the process is in a stopped state. Phases progress in order from 0 to 3 and back to 0. In this scenario, you have a process variable that you want to record at the beginning of every running state. To accomplish this, you are going to use the “Increment” event trigger mode. In this first section, you will configure the collection of the phase indicator which will be the trigger. 1. Verify that you are on the SERVER image. 2. Launch the FactoryTalk Administration Console. 3. Select Network directory, then click OK. 213 of 329 4. In the Administration console explorer, right-click InstaCorp, and click Add Individual Historian Points… 5. Click Browse Tags…. 6. Browse InstaSoap > Mixing > CLX1 > Online and select the tag: T100_Phase_Counter.ACC. 214 of 329 7. Click Add Tags(s) to List, (selected tag will be displayed in the lower window) and click OK. 8. Click OK. Note: The new tag just added to the FT Historian will have the name InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Phase_Counter.ACC 9. Close Administration Console. 215 of 329 In this second section, you will configure collection of the start of phase parameter. This parameter will actually be the tank volume which you will assume is not already being collected all the time. 1. Launch the System Management Tools (SMT). 2. Expand the Points category and select the Point Builder plug-in. 3. Using the Point Builder SMT plug-in, click on the Search toolbar button. 216 of 329 4. Enter a Tag Mask of *T100* and then click the Search button. 5. Select tag: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Volume.PV. Note: BE SURE TO PICK "VOLUME", NOT "TEMP"! 6. Click OK. 217 of 329 7. Highlight the entire name and overtype a new name of T100_Phase_Start_Vol. 8. Set the Exdesc (Extended Descriptor) field to the following. Note: EVENT must be UPPERCASE!: EVENT='InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Phase_Counter.ACC' Increment 9. Select the Archive Tab and configure the following attributes: Compressing OFF Exception testing off by setting Exception Deviation and Exception Max Time both to zero 218 of 329 10. Select the Classic tab. Set Location 3 to “0” (to identify as Polled or Event Trigger Input point). Note: A "1" is the default and represents Advised mode. 11. Click the Save button on the toolbar. 12. Expand the Data category and select the Current Values plug-in. 219 of 329 13. Using the Current Values SMT plug-in, click on the Search toolbar button. 14. Enter a Tag Mask of *T100* and click the Search button. 15. Select the following tags: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Volume.PV InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Phase_Counter.ACC T100_Phase_Start_Vol 16. Click OK. 17. Using the Current Values SMT plug-in, click the Start Updating toolbar button. 220 of 329 18. While the phase counter stays the same, observe the following: T100_Demo_Volume.PV changes T100_Phase_Start_Vol remains at its previous value 19. When the Phase Counter increments, observe the following: T100_Phase_Start_Vol is set equal to T100_Demo_Volume.PV 20. When the Phase Counter rolls over from 3 to 0, observe the following: T100_Demo_Volume.PV changes T100_Phase_Start_Vol remains at its previous value and does not get updated Note: Only when T100_Phase_Counter increments does the T100_Demo_Volume.PV get "copied" into T100_Phase_Start_Vol 221 of 329 Part B In our second example, you will assume you have a reserve coolant tank. When the tank is being depleted, you want to correlate the temperature of an exothermic reactor vessel. When the coolant tank is being filled or is steady-state, you are unconcerned with the tank temperature. In this example, you will use the “Decrement” mode. For this part of the exercise, you will pretend that you are not already collecting the tank temperature all the time. 1. Expand the Points category and select the Point Builder plug-in. 2. Using the Point Builder SMT plug-in, click the Search toolbar button. 222 of 329 3. Enter a Tag Mask of *T100* and then click the Search button. 4. Select tag: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Temp.PV. Note: BE SURE TO PICK "TEMP", NOT "VOLUME"! 5. Click OK. 223 of 329 6. Click on the TEMP tag in the upper window, and then in the General tab below highlight the entire tag name and overtype a new name of: T100_Draining_Temp. 7. Set the Exdesc (Extended Descriptor) field to the following. Note: EVENT must be UPPERCASE! EVENT='InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Volume.PV' Decrement 8. Select the Classic tab. 9. Set or verify Location 3 to 0. 10. Click the Save button on the toolbar. 224 of 329 Visualize the tags from examples 1 and 2 to see if they are working correctly using ProcessBook by following these steps: 1. Select the CLIENT image. 2. Open FactoryTalk Historian ProcessBook. 3. Close the ProcessBook demo file that opens at default. 225 of 329 4. From the File menu select New. 5. Select the new ProcessBook Display (.pdi) File option, enter name of Event Triggered Read and click the OK button. 6. Change to build mode by selecting the Build button on the toolbar: 7. Select the Trend button on the toolbar: 226 of 329 8. Add a Trend to the Display (click-hold, drag and release) 9. The Define Trend dialog will appear. Select the Tag Search button. 227 of 329 10. Select the Tag Mask to *T100* and click Search. 11. Select the following two tags: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Phase_Counter.ACC T100_Phase_Start_Vol 12. Click OK. 228 of 329 13. Rename Plot-0 to Phase Increment. 14. Set the Scale radio button to Multiple Scales. 15. Set the Plot Time Start to *-5m. 16. Click on the New Plot button. 229 of 329 17. Rename Plot-1 to Volume Decrement. 18. Use the Tag Search button to select the following two tags: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_Demo_Volume.PV T100_Draining_Temp 19. Set the Scale radio button to Multiple Scales. 20. Set the Plot Time Start to *-5m. 230 of 329 21. On the Display Format tab, check the Markers checkbox. 22. In the Plot drop-down box, select the Phase Increment plot. 23. Check the box for Markers. 24. Click OK (not shown below).. 25. If necessary, select the Run button on the ProcessBook toolbar. 231 of 329 26. Below is an example of the results you should be seeing. If your Phase Increment trend is not showing the pens both using “full scale” (ranging from bottom to top of trend), go to Build mode, double-click on the trend and click “OK” on the dialog to refresh the configuration. In the Phase Increment trend, you should be noticing the incrementing of the “trigger” tag is causing the other tag to be read. The tag is not read when the “trigger tag” decrements. In the Volume Decrement trend, the “trigger tag” decrementing caused the other tag to be updated. While the “trigger tag” is incrementing, the other tag is not read. 27. Close ProcessBook. This section of the lab is complete 232 of 329 Section 7: Basic Output Points What You Will Learn How to configure an outpoint point using the source tag method In this exercise, you are going to look at FactoryTalk Historian’s basic output point capabilities. This capability should be avoided for real-time control purposes where an HMI using a FactoryTalk Live Data connection is much more appropriate. It is useful for scenarios where complex calculations are performed by FactoryTalk Historian and the results are handed back to the HMI or control system for possible further action. This exercise will specifically explore a scenario where you have a tank effluent stream which is being discharged back into a local river. Government regulations do not regulate the spot temperature of the effluent, but they do set restrictions based on the 5 minute time-weighted average of the effluent temperature. Extra stream processing must be performed when the 5 minute time-weighted average exceeds 106 degrees. Because the time-weighted average calculation is more sophisticated than you are comfortable programming in the controller, FactoryTalk Historian will take care of this calculation and pass the result back to the controller for further action. Reference Output Tags Set location 3 = 2 for output mode Source Tag specifies the source of the data to be sent. Instrument Tag specifies the destination of the Source Tag value Data transfer is triggered when Source Tag value changes and snapshot entry updated In the first part of this exercise you will configure a Totalizer to perform the time-weighted average calculation. 1. Verify that you are on the CLIENT image. 2. Launch the System Management Tools (SMT). 233 of 329 3. If not already selected, click SERVER. 4. Expand the Points category and select the Totalizers plug-in. 5. Using the Totalizers SMT plug-in, click on the Create a new Totalizer toolbar button. 234 of 329 6. Set the totalizer name to T100_TWA_Temperature. 7. Click the tag search button to the right of the Source Tag. 8. Enter a Tag Mask of *T100*. 9. Click the Search button. 10. Select tag: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise: CLX1.T100_Demo_Temp.PV. 11. Click OK. 12. Verify the above selected Source Tag. 235 of 329 13. Under the Name & Type section, set the following: Change the Summary Calculation from Block to Moving. Change the Summary Calculation from Total to Average. 14. Select the Results Tab. 15. Under the Details section, set the Results every to 5 Minute(s). 236 of 329 16. Select the Archive tab and configure the following attributes: Exception Deviation to 0 Compression Deviation to 0.1 Exception Deviation Max Time to 0 Set the Compression Max Time to 15 Minutes 17. Click the Save button on the toolbar. 18. Minimize the SMT. 237 of 329 In the next section you are going to configure the output point for data collection to automate the configuration of most of the parameters. Later, you will change it from data collection to output mode. 1. Launch the FactoryTalk Administrator Console. 2. Select Network directory, then click OK. 3. In the Administration Console explorer, right-click InstaCorp, and click Add Individual Historian Points… 238 of 329 4. Click Browse Tags…. 5. Browse InstaSoap > Mixing > CLX1 > Online and select the tag T100_TWA_Temp. 239 of 329 6. Click Add Tags(s) to List, (the selected tag will be displayed in the lower window). 7. Click OK. 8. Click OK again. The new tag just added to FT Historian will have the name InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_TWA_Temp. 9. Close the FactoryTalk Administration Console. 240 of 329 In the next section you will modify the newly configured tag to be used for output instead of input. 1. Return to the minimized SMT application. 2. Expand the Points category and select the Point Builder plug-in. 3. Using the Point Builder SMT plug-in under the Points category, click on the Search toolbar button. 241 of 329 4. Enter a Tag Mask of *T100*. 5. Click the Search button. 6. Select tag: InstaCorp.InstaSoap.Mixing:RSLinx Enterprise:CLX1.T100_TWA_Temp. Note: Do not accidentally load the similarly named T100_TWA_Temperature totalizer. 7. Click OK. 8. Verify the previously selected tag name. 242 of 329 9. Use the Tag search button next to the Source tag field. 10. Select the tag: T100_TWA_Temperature. 11. Click OK. 12. Select the Classic tab. 13. Change Location3 to 2. This configures the tag as an Output tag. Whenever the value in the Source Tag field changes (the Totalizer tag, T100_TWA_Temperature), it will be sent to the Instrument Tag (T100_TWA_Temp in CLX1). 14. Click the Save button on the toolbar. 243 of 329 The time-weighted average values should now be written down to the controller. To verify, you are going to use the Rockwell Software Data Client to read the value from the controller. 1. Launch the Rockwell Software data client by selecting Start > All Programs > Rockwell Software > FactoryTalk Tools > Rockwell Software Data Client. 2. Select FactoryTalk. 3. Select Network and click OK. 244 of 329 4. Expand $Global, select InstaCorp and click OK: 5. Change the Update Rate to 1000 (ms) and click OK. 245 of 329 6. Expand the tree InstaCorp > InstaSoap > Mixing > CLX1 and click Online. 7. In the right-hand view, click on the T100_TWA_Temp tag. 8. Click OK. 9. Verify that the value is being updated regularly. As an “output tag”, T100_TWA_Temp in the controller is being written to by Historian. The value is coming from the value of tag T100_TWA_Temperature, and the value is being written every time T100_TWA_Temperature changes. 10. To better confirm what is happening, you could display the current value of T100_TWA_Temperature in the SMT while also watching the above Data Client. When you see the value of T100_TWA_Temperature change in the SMT, very soon afterwards in the Data Client you should see that same value written to T100_TWA_Temp. 11. Close the SMT and Data Client. This lab is complete 246 of 329 Lab 7: ProcessBook for Analytics Section 1: Beyond Basic Trending What You Will Learn How to build basic trends in FactoryTalk ProcessBook and use the multi-trend layout options. Part A – Single-page ProcessBook 1. Select the CLIENT image. 2. Launch ProcessBook by going to Start > All Programs > Rockwell Software > FactoryTalk Historian SE > FactoryTalk Historian ProcessBook.. 247 of 329 3. Close the ProcessBook demo file that opens at default. 4. From the File menu select New. 5. Select the ProcessBook (.piw) File type. Give your new ProcessBook workbook the name of Trends and click OK. 6. Again, click on the File > New option. 248 of 329 7. Select the ProcessBook Entry type and then click the OK button. 8. Set the entry Label to Basic Trends and select an entry Type of Text. Click the OK button. 9. Again, click on File > New. 249 of 329 10. Select the ProcessBook Entry type and then click the OK button. 11. Set the entry Label to Simple Trend and select an entry Type of Display. Set the Level to 2 and click the OK button: 12. You should now have a ProcessBook workbook that looks similar to the following. 250 of 329 13. Change to build mode by selecting the Build button on the toolbar. 14. Select the Trend button on the toolbar. 15. Drag a box in some empty space to create a trend. 16. On the General tab, click the Tag Search… button: 251 of 329 17. Set the Point Source to ftld and click the Search button: 18. Select the …TI100 tag and click the OK button. 252 of 329 19. Set the Start time to *-5 Minutes and then click the OK button. 20. You should now have a simple interactive trend: 253 of 329 Multi-Trend Layout Now that you have some experience building a basic trend, we will use these skills to create multiple trends arranged together. 1. Again, click on File > New. 2. Select the ProcessBook Entry type and then click the OK button. 254 of 329 3. Set the entry Label to Multi-Trends and select an entry Type of Display. Set the Level to 2 and click the OK button. 4. Change to build mode by selecting the Build button on the toolbar. 5. 5. Select the Trend button on the toolbar. 6. Drag a box in some empty space to create a trend. 255 of 329 7. Do the following steps: Set the Plot name to Level. Use the Tag Search… button to select the tag …T100_Sim_Vol [refer to previous section for detailed steps]. Set Plot Time Start to *-5 Minutes. Do NOT click the OK button. Last, click the New Plot button. 256 of 329 8. Do the following steps: Set the Plot Name to Temp. Use the Tag Search… button to select the tag …TI100 [refer to previous section for detailed steps]. Set Plot Time Start to *-3 Minutes. Do NOT click the OK button. Last, click the New Plot button. 257 of 329 9. Do the following steps: Set the Plot Name to T100. Use the Tag Search… button to select both tags …T100_Demo_Temp.PV and …T100_Demo_Volume.PV [refer to previous section for detailed steps]. Set Plot Time Start to *-50 seconds. Do NOT click the OK button. 258 of 329 10. On the Display Format tab, select Level from the drop-down and uncheck the Value Scale Inside Axis option. Do NOT click the OK button. 259 of 329 11. On the Layout tab, fill in the following values: Row: 1 Col: 2 ExRow: 1 ExCol: 1 These settings will cause the first (bottom) row to contain two columns (trends) and the additional second row to contain one column (trend). It is now safe to click the OK button. The only time you can access the Layout tab is during the initial creation of a new trend. Once the trend is completed, you cannot go back and edit the layout. The end result will be three “separate” trends which can be edited individually. 260 of 329 12. You should now have a lovely multi-trend. 13. Click on the Save toolbar button. 14. Save the processbook as Trends.PIW in My Documents. 15. Close the Displays and Trends.PIW processbook file. 261 of 329 Part B – Multi-page ProcessBook 1. Create a new ProcessBook (.piw) File and give it the name of Production Data. Click OK. 2. With the Production Data ProcessBook open, select Tools > Preferences. 262 of 329 3. On the General tab, uncheck the Prefer Run Mode option (if not already unchecked). This will keep the processbook from going into “Run mode” as items are added. Click OK when finished (not shown). 4. Your processbook may have entered Run mode if your Run Mode Bias option was on prior to step 3 above. Put the processbook in Build mode by clicking on the build icon in the tool bar. 263 of 329 5. In the last section, you always used the New button to add entries to the processbook. This time, select the Insert menu and then Text. 6. Enter Label of Tank Levels and click OK. 7. Again, select Insert > Text and this time enter a Label of Tank Temperatures. 8. One more time, select Insert > Text and enter a Label of Miscellaneous 264 of 329 9. When finished, your processbook should appear as follows. Note: The three tabs creating individual “pages” of your processbook: 10. Click on the Tank Levels tab to bring that page forward. 265 of 329 11. Select Insert > Display: 12. Enter a Label of Tank 1 and change the Level to 3 which will result in indenting the display name on the page a couple of times. Then, click OK. 13. A “blank” processbook display will appear. 266 of 329 14. As you did in Part A of this exercise, add a Trend to this display using ControlLogix tag that ends in …T100_Sim_Vol. Use a Start Time of *-2 Minutes. Your display should appear similar to the following (may need to “widen” your trend for the long tag name to appear on the right side such as in the below example): 15. Close the Tank 1 display. It will ask you if you want to save changes, be sure to click Yes: You will actually be saving your entire processbook .PIW file (the display is embedded in it). Save to My Documents. 267 of 329 16. Your processbook should now appear as follows, with a Display named Tank 1 under the Text of Tank Levels: 17. Select Insert > Display again and name the new display Tank 2. Do not bother putting a trend or anything else on the display for now. Close and save it. Your processbook should appear as follows, with Tank 2 above Tank 1: 18. Obviously, if that is what you intended and prefer there is no need to change anything. However, if you want to change the order you could select View > Outline. Instead of Book mode, your processbook would then appear as follows: 268 of 329 19. If your processbook appears in this way, with Tank 2 above Tank 1, first select Tank1 and then click the arrow up button. The order should be changed. 20. If you go back to View > Book mode, your processbook should appear as follows (you may need to click the Tank Levels tab to bring that page forward): 21. You may have noticed that the tabs on the right-hand side of the processbook are appearing in reverse order of how we entered them, with Miscellaneous on top and Tank Levels on the bottom. To reverse that order, go back to View > Outline mode. Select the individual lines of text that you added and use the arrow up and arrow down buttons to move the order to match the following: 269 of 329 22. When you go back to View > Book mode, the tabs will now be in the order you’ve specified: 23. Click on the Miscellaneous tab and select Insert > Link / OS Command. Configure the dialog box as follows. Use the Browse… button to select notepad.exe from the directory C:\Windows (will need to look for “all files”, not just .piw or .pdi files) Set Level to 3. Click OK when all other settings are made. Notepad will automatically open, you can close it. 24. When your processbook is in Run mode, you now have a link to open Notepad in case you wanted to enter some notes and save them, or open previously written notes that were saved as .txt files in case you want to read them (try it!). 270 of 329 25. Add another link on your Miscellaneous processbook page to launch Microsoft Excel. The path to Excel on your computer should be C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE. Note: As a possible enhancement, when Excel opens you could have it automatically open a particular workbook if your link is configured similar to the following (this example assumes C:\Production Report.xls actually exists – it does not at this time - and is a valid Excel workbook – is not at this time): C:\Program Files (x86)\Microsoft Office\OFFICE14\EXCEL.EXE" "C:\Production Report.xls" 26. As time allows, experiment with your processbook file adding items such as: Add one or more displays to the Tank Temperatures page Additional lines of Text as “headings” or “section dividers” on the pages Change order tabs are displayed and/or order of items on pages Launch additional applications from your processbook, such as the Windows Calculator, Paint, etc. 27. Save your processbook file and close ProcessBook. Also close any other applications that might have opened during this exercise, such as Excel or Notepad. This section of the lab is complete 271 of 329 Section 2: Dynamic Elements in ProcessBook What You Will Learn How to use dynamic elements in ProcessBook displays to create sophisticated displays. Besides simple trends, you can also use dynamically updating elements in ProcessBook displays. These are live elements whose properties change with time. This exercise will give you the opportunity to work with the following: Dynamic Text Value Dynamic Bar Graph Multi-State Symbol PART A – Edit Zero and Span of Tag with the SMT In this exercise you will be using the tag “T100_Sim_Vol” in the ControlLogix processor to control some dynamic elements in ProcessBook. The value of this tag in the controller is ranging between 0 and 120. In the Historian Point that is associated with this tag, it is important to verify that the “Zero” and “Span” setting for this Point are correct. 1. Verify that you are on the CLIENT image: 2. Open the System Management Tools (SMT). 272 of 329 3. Select the SERVER Server if not already selected, then open the Points options and select Point Builder. 4. Select the Search icon. 273 of 329 5. Set Tag Mask to *Sim_Vol*, click Search, select the …T100_Sim_Vol tag and then click OK: 6. Select the Archive Tab and verify Zero is set to 0 and Span to 120. If not, make required changes. 7. Click Save. 8. Close System Management Tools. 274 of 329 PART B – ProcessBook Dynamic Elements We are going to modify an existing ProcessBook display which contains a tank diagram. First we will add a dynamic value to show the exact tank level. Then we will add two multi-state symbols to act as high and low level alarm lights. Finally, we will use a dynamic bar graph to visually display the level on top of the tank. 1. Verify that you are on the CLIENT image: 2. Launch ProcessBook by going to Start > All Programs > Rockwell Software > FactoryTalk Historian SE > FactoryTalk Historian ProcessBook.. 3. Close the ProcessBook demo file that opens at default. 275 of 329 4. Use the Open icon on the toolbar to open the file PB Dyn Elem.PDI located in the lab files folder (C:\Lab Files\Historian Advanced Lab\). 5. Select View > Toolbars… and turn on the Formatting Toolbar. Click Close. 6. Click in a “blank area” of the display to “unselect” any objects. Because nothing is selected yet, we can set the default color properties for everything drawn in the future. Click on the “Drawing Color” toolbar button (if “grayed out”, click somewhere “blank” on the display to give it focus first): 7. Set the default Line color to black and then click the OK button. 276 of 329 8. If in Run mode, switch to build-mode and activate the Value toolbar button. 9. Click on the background to the right of the tank to initiate the dynamic value dialog. 10. Click on the Tag Search… button. 277 of 329 11. Change the Tag Mask to *Sim_Vol* and click the Search button. Select the …T100_Sim_Vol tag and then click on the OK button. 12. Click on the OK button. 278 of 329 13. Now select the static Text toolbar button. 14. Click just above the dynamic level value and type the text Level. 15. Now select the Ellipse toolbar button. 16. With the Ellipse tool, use click-and-drag to draw two small circles next to the tank. You can force a circle by holding down the Shift key while you drag. 17. With the default build cursor, click on the upper circle to select it. Then click on the Multi-State Symbol toolbar button. 279 of 329 18. Click on the Tag Search… button to select the …T100_Sim_Vol tag. Review step 11 for the details of tag selection. Change the Color for State 1 to green (State 2 will default to red). Change the Values for State 1 to be “<= 90. Finally, click the OK button: 280 of 329 19. Repeat steps 17 & 18 for the lower circle. This time however, specify a Values for State 1 of <= 10. Specify the color of State 1 to be red, and that of State 2 to be green. Use the State drop-down box to select the state to edit. Click OK when done. 20. Select the Bar toolbar button. 281 of 329 21. Using the Bar tool, drag a rectangle which exactly covers the box portion of the tank. 22. Click the Tag Search… button to select the tag …T100_Sim_Vol, then click OK: 23. With the Bar object you just drew still selected, click the Drawing Color toolbar button: 282 of 329 24. Change the Line and Background colors to None and then click the OK button: 25. Click on the stem of the stirrer and on the Arrange menu, choose the Bring To Front command. 283 of 329 26. Repeat step 25 with the Stirred tank label. You will have to click more than once (slowly, not double-clicking) to select the text label beneath the Bar we added on top. 27. Save the ProcessBook file. 28. Click the Run button (although you might have noticed things updating in the “build mode” anyway) and observe the function of the display and Dynamic Elements you’ve added. 29. Exercise continues with next section (leave your display open and in Run mode) 284 of 329 PART C – More with ProcessBook 1. In ProcessBook, select Tools > Preferences. 2. Select the Trend tab and review the items listed. These settings determine the “Default” settings for trends added to ProcessBook displays: 285 of 329 3. Change the “Start Plot Scale” from *-8 Hour to *-5 Minutes (need to "type it in" if not on dropdown list): 4. Click OK to accept the changes and close the Preferences dialog box. 5. If you wanted to add a trend to your current ProcessBook display, you could do so with the standard trend button you’ve used several times already (don’t actually do this). 6. Instead, this time click on the …T100_Sim_Vol value on your running Processbook display. 7. Be sure that your display is in the Run mode. If not, change to Run mode and then re-click on the …T100_Sim_Vol value. Then, click the Trend Display icon on the toolbar (not the Trend tool you’ve previously used!). 8. You should get an instant “Ad Hoc” trend of the selected tag. 286 of 329 9. Close the “Ad Hoc” trend. Click the value again and then click the Point Attributes icon: 10. You should get a Point Attributes window for this tag as follows: 11. Close the Point Attributes window 12. Add two additional Value objects to your display assigned to tags of your choice: 287 of 329 13. Go back to Run mode if your editing took you to Build mode. With all three values “selected” (either “rubberband” the cursor around them or use “ctrl-clicks”), create an Ad Hoc trend. 14. With all three values “selected”, select Point Attributes. You should see a drop-down list letting you select each of the tags, one at a time, to view their attributes. 15. Save and close the ProcessBook file. This section of the lab is complete 288 of 329 Section 3: ProcessBook Displays in FactoryTalk View SE What You Will Learn How to extract individual ProcessBook displays from a ProcessBook workbook and embed them inside a FactoryTalk View SE display. FactoryTalk Historian ActiveView provides the ability to embed fully interactive ProcessBook displays in any ActiveX container. ActiveView provides a utility to extract individual displays from a ProcessBook workbook. It also produces an HTML file which attempts to recreate the general structure of the original workbook file. PART A – Using ActiveView via Internet Explorer 1. Verify you are on the CLIENT image. 2. Launch ProcessBook if not already running. 3. Close the ProcessBook demo file that opened at default: 4. Use the Open icon on the toolbar to open the file Trends.PIW which you created in an earlier exercise and saved to My Documents. If you did not complete the earlier exercise, instead open the PBDEMO.PIW file located in C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\Server\PIPC\Procbook\en. 289 of 329 5. Leaving open the Trends.PIW file, open the EXPORT.PDI file located in: C:\Program Files (x86)\Rockwell Software\FactoryTalk Historian\Server\PIPC\ACVIEW\WebDev 6. Specify an Export Path of C:\Temp and then click the OK button. 7. When completed, click the Close button. Note: This Temp folder on the C:\ drive has been created ahead of time and is a "shared folder". This will allow you to access these files from the SERVER image a bit later in this exercise. 8. Close the EXPORT.PDI file, the Trends.PIW file and ProcessBook itself. 9. Go to the SERVER image: 290 of 329 10. Open up Computer, Network and then Temp on Client: 11. These are the files the EXPORT.PDI application created in the CLIENT C:\Temp folder. Select all files, right click and select Copy: 291 of 329 12. Go to C:\Inetpub\wwwroot, right-click (there will be some other files/folders there) and select Paste 13. The copied files should now appear in this directory. These files will be used by the ActiveView Server to provide the ProcessBook displays to ActiveView clients. 14. Return to the CLIENT image: 15. Open Internet Explorer. 16. Set the address to: http://SERVER/PBhome.htm 292 of 329 17. Click on the Simple Trend. Note: That the first time you use ActiveView per session you may see a blank white box or one containing “connecting” message while it tries to connect to the historian server. This is normal. Just wait several seconds while the connection is established. 18. After the connection is established, the ProcessBook displays will display and be fully interactive. You can switch to other displays without experiencing the initial connection delay. 19. Close Internet Explorer. 293 of 329 PART B – Using ActiveView in a FactoryTalk View SE Display 1. Still on the CLIENT image, we will use ActiveView to embed a ProcessBook display in a FactoryTalk View SE display. Launch FactoryTalk View Studio. 2. When prompted, select the Site Edition (Network) application type and click Continue. 294 of 329 3. Open the InstaCorp application. 4. Once the application is fully open, open the MixingHMI display named process overview by double-clicking on its entry. 295 of 329 5. Use the ActiveX Control object to draw a box in some empty space. 6. Select the PI ActiveView Control from the list and click the OK button. 296 of 329 7. Double-click on the ActiveX to bring up the configuration dialog. 8. Leave the entry on the Server Ini tab blank. Go to the Display URL tab and enter a Display URL of: http://SERVER/MULTI-TRENDS.PDI. Click the OK button (not shown below). Note: If you did not complete the earlier exercise and exported the PBDEMO.PIW instead, use a URL of: http://SERVER/Pulp Prep.PDI: 297 of 329 9. After clicking OK on above dialog, switch the FactoryTalk View display to test mode by clicking on the Test Display toolbar button. 10. You now have a fully interactive ProcessBook display embedded in FactoryTalk View. After you have experimented with the display, close all the applications. This section of the exercise is finished. 11. Close FactoryTalk View Studio and save changes. This section of the lab is complete 298 of 329 Section 4: Using ProcessBook Datasets What You Will Learn How to use ProcessBook’s data sets to produce values and trends based on locally calculated data. FactoryTalk Historian ProcessBook data sets provide a means of producing locally calculated data. Data sets can perform flexible calculations on dynamic data which can be trended or displayed like any other historian data point. The calculations are local to the ProcessBook workbook and provide an ideal place to prototype calculations which once finalized can later be moved to server side calculation mechanisms like performance equations. PART A – Calculations on Single Tag 1. Verify that you are on the CLIENT image: 2. Launch ProcessBook by going to Start > All Programs > Rockwell Software > FactoryTalk Historian SE > FactoryTalk Historian ProcessBook.. 299 of 329 3. Close the ProcessBook demo file that opens at default. 4. From the File menu select New. 5. Select new ProcessBook Display (.pdi) File, set the Display Name to Test, and click the OK button. 6. Select the Data Sets… command on the Tools menu. 300 of 329 7. In the Data Sets dialog, click on the New button and choose the PI Calculation sub-type. 8. Set the data set Name to LEVEL and the Description to Tank Level. Set the Tag or Expression to the tag “SINUSOID” and the “Interval” to “1h” then click the OK button: 301 of 329 9. Close the Data Sets dialog by clicking the Close button. 10. Change to build mode by selecting the Build button on the toolbar (your ProcessBook may already be in build mode). 11. Select the Trend button on the toolbar. 12. Drag a box in some empty space to create a trend. 302 of 329 13. Use the drop-down to the right of the Tag Search… button to select a PI Calculation: 14. First, select LEVEL from the Data Sets list. Next, select from the Columns the Average, Minimum, and Maximum columns (use Ctrl-clicks). Finally, click the OK button: 303 of 329 15. Change the Start Time to *-12 Hour and then click the OK button: 304 of 329 16. Examine the effect of the data set calculations on the SINUSOID tag. Notice how the summary calculations that we selected are performed on an hourly basis as configured by the “Interval” setting. (note that the below trend is showing 12 hours of data…if your Historian Server has not been constantly archiving data over the last 12 hours, your trend may have only a portion of such data). 17. Save, then close the Test display. 305 of 329 PART B – Calculations With Multiple Tags We will now explore using Data Sets to perform custom calculations utilizing multiple tags. 1. Use the Open icon on the toolbar to open the file Data Sets.PDI located in the lab files folder (C:\Lab Files\Historian Advanced Lab): 2. If you get the following dialog, it is because this ProcessBook file was last working with a Server named VMHIST. That is not the server we are using, so we will replace that server name with the server named SERVER by clicking OK. 3. Again, select the Data Sets… entry on the Tools menu. 306 of 329 4. Notice that the Data Sets dialog does not show the “LEVEL” data set you created earlier. This is because the data set we previously created is local to the file in which it was created. Click on the New button and choose the PI Calculation sub-type. 5. On the PI Calculation Data dialog, set the following values, then click OK. Name: PRODUCTA Description: %Product A Tag or Expression: 'CDT158' / ('CDT158' + 'BA:TEMP.1') * 100 Calculation Interval 10m Value Column Name: % Product A Note: if your cursor is still in the Tag or Expression field, you may need to click outside of that field (into another field) for the expression to be “tested” before the Value Column Name field will appear). Click OK. 307 of 329 6. Back in the Data Sets dialog, click on the Close button: 7. Verify in the build mode by selecting the Build button on the toolbar: 8. Click on the Value toolbar button. 9. Use the Value tool and click on the area beneath the % Product A label. 308 of 329 10. Select PI Calculation from the drop-down to the right of the Tag Search… button. 11. Select PRODUCTA from the Saved Data Sets list. Next select %ProductA from the Data Set Columns list. Finally, click the OK button. 309 of 329 12. Click the OK button: 13. Notice that the tank outlet now displays the current percentage of Product A (your value will differ). 310 of 329 14. With the Build cursor selected, double-click on the empty Plot-0. 15. Select PI Calculation from the drop-down to the right of the Tag Search… button: 311 of 329 16. Select PRODUCTA from the Saved Data Sets list. Next select %ProductA from the Data Set Columns list. Finally, click the OK button. 312 of 329 17. Click the OK button: 313 of 329 18. Now you can enjoy a live updating trend of the calculated product A percentage (your trend may not have as much data as shown below). 19. Close ProcessBook. This section of the lab is complete 314 of 329 Section 5: SQC Charting in ProcessBook What You Will Learn How to use the PI SQC add-in to configure control charts in ProcessBook and perform common SQC calculations. The PI SQC (Statistical Quality Control) add-in for ProcessBook provides a client side SQC mechanism for FactoryTalk Historian. With the add-in, users can flexibly configure SQC control charts. These charts can have advanced filtering, perform SQC statistical calculations, and even check data points against SQC alarm conditions. 1. Verify that you are on the SERVER image: 2. Launch Microsoft Office Excel 2010. 3. Click the Open option and open the file ProcessBook SQC Setup.xls located in the lab files folder (C:\Lab Files\ Server \ Lab Files \ Historian Advanced Lab\): 4. Choose the Export Tags… entry on the PI-SMT menu under Add-Ins. 5. On the Export PI Tags dialog, verify that the Mode is set to Create and then click the OK button. 315 of 329 6. Acknowledge the results dialog by clicking the OK button. 7. Close Excel. 8. Go to the CLIENT image and launch ProcessBook. 9. Close the PIDEMO.PIW file that opens at default. 10. Open the file SQC.PDI located in the lab files folder (C:\Lab Files\Historian Advanced Lab\) 11. Click OK to select the SERVER Server: 316 of 329 12. Verify that you are in Run mode and then explore the interactive SQC chart. If you are getting a message in the middle of the chart indicating “Not enough samples”, just wait 2-3 minutes until it goes away and the SQC charts have "data". 317 of 329 13. Click and drag a rectangle on the data plot to zoom in to the selected area. 14. Click the Revert Time Ranges toolbar button to undo the zoom. 15. Double-click on the chart control to maximize it. Double-click on it again to return it to its original size and location. 318 of 329 16. Use the One Time Period Back and One Time Period Forward toolbar buttons to scroll through the data (may have to wait a few minutes if you get a No or not enough data points or Not enough samples message). 17. Use the Scroll Time bar to free scroll through the data. 18. Use the set time range button to look at a specific period of data. 19. Set the time span from *-4 Hour to * and click the OK button. 319 of 329 20. Use the Trend Cursor to explore the data values. Once you click the Trend Cursor tool, you may need to click and drag the cursor (like a vertical bar) from the right edge of the trend area. 21. Double-click on the Exercise 1: [Individuals] title bar to bring up the Statistics Window. Note: That this will only work if there are enough values for a “bell curve” to be drawn such as shown below…if this won’t work for you, wait a minute or so and watch for the curve to appear: 320 of 329 22. Examine the various statistics and information available, eventually selecting the Plotted Data option and click on the Save Data To File button: 321 of 329 23. Save the data as sqcdata.txt in the My Documents folder: 24. Close the Statistics Window and open the sqcdata.txt file in Notepad. 322 of 329 25. When you are done examining the available statistics, close Notepad and close the ProcessBook display file and save changes (DO NOT close ProcessBook itself). 26. Click on the New toolbar button: 27. Select new ProcessBook Display (.pdi) File, set the Display Name to XBar, and click the OK button. 28. Switch to Build mode and then click on the SQC Chart toolbar button. 29. Drag a rectangle on the background to create an SQC Chart. 323 of 329 30. On the General tab, set the following fields. Chart Title: XBar Control Chart Chart Type: X - Bar Chart Tag: stationary1 31. After clicking OK on the above dialog, click the Save toolbar button. 324 of 329 32. Click the Save button to save this display to My Documents. 33. Take some time to explore your recently created SQC chart. When you are ready, use the Save As… command on the File menu. 34. Set the new name to Moving Avg.PDI and then click the Save button: 35. Double-click the chart to return to the configuration dialog (must be in Build mode): 36. On the General tab, set the Chart Title to Moving Avg Control Chart. Next change the Chart Type to Moving Average. 325 of 329 37. On the Sample tab, set the Sample Size to 5 and then click OK: 38. Click the Save toolbar button. 39. Take some time to experiment with the SQC chart. Be sure to go to Run mode to see any updates. 40. When ready, first close the current PDI (Moving Avg.PDI). Then, reopen the XBar.PDI file. 41. Use the Save As… command on the File menu. 42. Set the new name to XBar Time Sampled.PDI and then click the Save button. 43. Double-click the chart to return to the configuration dialog (must be in Build mode). 326 of 329 44. We want to change the sampling algorithm. We want to take two samples every ten minutes starting on 5 and 6 minutes after the hour. On the Sample tab, make the following changes: Calculation Basis to “Time” Calculation Period to “00:10:00” Sample Period to “00:01:00” Start Time of Sample to “00:05:00” Finally, click the OK button: 45. Put the display in Run mode. Initially you may not have enough samples and it may take some time for the chart to start showing data. Experiment with the chart as desired...you may want to "come back later" (if time permits) to view data in the chart. When ready to proceed, click the Save button on the toolbar and close Processbook. This lab is complete 327 of 329 Publication XXXX-XX###X-EN-P — Month Year Supersedes Publication XXXX-XX###X-EN-P — Month Year Copyright© 2012 Rockwell Automation, Inc. All rights reserved.