+ All Categories
Home > Documents > PI Exercises PB en 4.0-Gs

PI Exercises PB en 4.0-Gs

Date post: 07-Aug-2018
Category:
Upload: informationemissary
View: 237 times
Download: 0 times
Share this document with a friend

of 14

Transcript
  • 8/20/2019 PI Exercises PB en 4.0-Gs

    1/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 1

    PI ProcessBook

    Exercise 1 - Basics

    Objectives

    Familiarize yourself with the Common Dialog Windows

    Familiarize yourself with the PI ProcessBook environment.

    Learn how to manipulate a trend display using an existing PI ProcessBook.

    Exercise A: Exploring the Common Dialog Windows

    1. Tag Search Window

    1. Open the Tag Search Window with the button or with the Tag Search option of the Tools menu.

    2. Use “b*” in the tag mask  field and click on the Search button to get all the tags beginning by“b”. 

    3. Click on the first tag name. Then press the shift key and click on the second tag name. Thiswill select the first two tags. Click on the Pt. Attr  button to access the Point Attributes of thosetags. You can move from one tag to another with the arrow keys on your keyboard.

    4. Write “*” in the tag mask field and “*reactor*” in the descriptor field , then press Search to findall the tags with the string “reactor” in the descriptor. 

    5. Erase the descriptor field and enter “0” (zero) in the Value field, then press Search to find allthe tags with a snapshot value of 0.

    6. Try to build searches based on multiple search criteria.

    2. Connection Window

    1. Open the Connection Window with the Connections option of the File menu.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    2/30

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    3/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 3

      Maximize the trend.

      Zoom in and out of the trend.

      Go backward and forward in time by one or by several time periods.

      Change the time scale to 1 day.

      Find when the maximum value was attained (Hint : use the trend cursor).

      Revert back to the original time scale.

      Return back to the Batch Reactor display.

    Using a Trend

    Solution

    1. Load the PI ProcessBook file « C:\Program Files\PIPC\PROCBOOK\Pidemo.piw ».

    2. Take a moment to locate the different components of the menu bar: Title, Menu and Tools.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    4/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 4

    3. Open the batch reactor display, (see the example below), located in the Refinery  tab.

    4. With the Run mode pointer, display a section of the trend display. Drag the pointer diagonally todraw a rectangle. This area will be magnified when you release the mouse button. To return to

    the original time scale, use the View option in the menu bar, then Revert or use this tool .

    5. With the Run mode pointer, expand the trend on the entire display window. Double-click withinthe trend. To return at the original time scale, double-click within the trend again.

    6. Use the time forward and backward buttons to scroll the time range forward or backward on a

    trend . To modify the time range, use the View > Time Range. Change the time scaleto 1 day.

    7. Use a trend cursor  to find when the maximum value of the last day occurred. .

    8. Return to the original time scale. (see step 4).

    9. Alter the y-axis scale of a trend by double clicking on the y-axis. Use the Trend  Scale dialog boxto change the vertical scale for the tag in the trend. You do not have to be in Build  mode to editthe trend.

    10. Return to the original Batch reactor display.

    11. Exit PI ProcessBook without saving.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    5/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 5

    Exercise 2 - Building a PI ProcessBook

    Objectives

    Learn how to build and modify a PI ProcessBook.

    Learn the differences between the Run mode and the Build  mode.

    Understand the PI ProcessBook entries hierarchy.

    Use the Book  and Outline views to visualize and modify a PI ProcessBook.

    Exercise

    You are asked to create a new PI ProcessBook into which you will insert newelements and establish links to other PI ProcessBook components and applications.You will also assign a level of hierarchy to each element.

    1. Create a new PI ProcessBook using the following steps:

      Select the New  option from the File menu.

     A new screen appears with three choices:

      ProcessBook (.piw) File.

      ProcessBook Entry (There are five types: display, linked display, linked ProcessBook,text entry and operating system command).

      ProcessBook Display (.pdi) File.

      Select ProcessBook File and name it PB exercise2 My first ProcessBook .

      Click OK.

     A new screen appears with the name PB exercise2 My first ProcessBook .

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    6/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 6

    2. Insert a Text type entry on level 1 and name it Exercise book using the steps below:

      In Build  mode, select the Text option from the Insert menu.

     A new screen appears in which you must supply additional information.

      Type a label, ie. “Exercise book”.

     As this is your first entry, its hierarchy level is 1 and it may not be modified.

      Click OK.

     A title corresponding to “Exercise book” appears in the ProcessBook file created earlier.

    3. Insert a Display type entry on level 2 and name it Display 1.

      In Build  mode, select the Display option from the Insert menu.

     A new screen appears in which you must supply additional information.

      Type a label named “Display 1”.

      Choose a hierarchy level of 2.

      Click OK.

      This will create and open a display. You can add a trend into it or simply close it with theClose option of the File menu.

      Save the PI ProcessBook file with the name “PB exercise My First ProcessBook” 

     A title on the second hierarchy level corresponding to Display 1 appears in the PIProcessBook file created earlier.

    4. Add a Linked Display type entry on Level 3 and name it “Linked display 1”.

      To link a display from another ProcessBook file, the file must be opened (open the file

    Pidemo.piw).

      In Build  mode, select Link / OS Command from the Insert menu.

     A new screen appears in which you must supply additional information.

      Type a label name “Linked Display 1”.

      Choose a hierarchy level of 3.

      Press the arrow next to the Browse  button and select Display  Search. Select the BatchReactor Display from the Pidemo.piw  ProcessBook file.(Hint: Do not forget to open theProcessBook where the display resides.).

      Click OK.

      This will link the display and open it. You can close it with the Close option of the File Menu.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    7/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 7

     A title on the third hierarchy level corresponding to Linked display 1 appears in the PIProcessBook file created earlier.

    5. Insert a Linked ProcessBook type entry on level 2 and name it “PB from exercise 1”.

      In Build  mode, select Link / OS Command from the insert menu.

     A new screen appears in which you must supply additional information.

      Type a label named “PB from exercise 1”.

      Choose a hierarchy level of 2.

      Press the arrow next to the Browse  button and select ProcessBook file. Browse to and

    select the pidemo.piw ProcessBook used in exercise 1.

      Click OK.

      This will link the ProcessBook and open it. You can close it with the Close option of the File menu.

     A title on the second hierarchy level corresponding to “PB from exercise 1” appears in theProcessBook file.

    6. Insert an Operating System Command type entry on level 2 and name it “Calculator ”.

      In Build mode, select Link / OS Command from the Insert menu.

     A new screen appears in which you must supply additional information.

      Type a label named “Calculator ”.

      Choose a hierarchy level of 2.

      Press the arrow next to the Browse  button and select Applications. Browse to select thecalc.exe file from the c:\winnt\system32 directory for Windows NT4/2000, orc:\windows\system32 directory for Windows 95/98/XP/ME/2003.

      Click OK.

      This will create the OS command and open the calculator. You can close it with the Close option of the File menu.

     A title on the second hierarchy level corresponding to “Calculator ”  appears in the PIProcessBook.

    7. Modify your PI ProcessBook. Change the order in which the entries appear and modify the

    hierarchy to resemble the next figure.

      In Build  mode, select outline from the view menu. Use the four arrows located in the upperleft corner of the window.

      The signs + and – are used to expand or collapse the hierarchy level of the selected entry.

      Numbers 1 – 9 are used to display different levels of hierarchy in the PI ProcessBook.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    8/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 8

    The final result should resemble the figure below.

    Building a ProcessBook

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    9/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 9

    Exercise 3 - Building Trends

    Objectives

    Build trends.

    Familiarize students with the different trend building options.

    Exercise 3A – Trend Display

    You are now ready to create a trend with PI tags. To place the trends in theProcessBook you created during Exercise 2, you must open the ProcessBook andthen double click on Display 1 entry.

    The goal of this exercise is to build a trend similar to the figure below using thefollowing steps:

      Add a trend containing the “SINUSOID”  tag. Use the trend item from the tool bar. (Hint :make sure you are in build mode).

      Edit the trend to show the last 5 days of values.

      Edit the trend so the title reads “Exercise 3”.

      Close the trend configuration and save the file.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    10/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 10

    Building a Trend

    Solution 3A

    1. Open Display 1.

    2. In Build  mode, use the Trend  tool . Drag diagonally to create a rectangular area to contain thetrend. When you release the mouse button, the Trend definition dialog box is displayed.

    3. Enter the following information in the General tab:

      Type the trend name in the Plot box : Exercise 3A.

      Use the Tag Search button to locate and select the “SINUSOID” tag. To facilitate the query,use a mask, ie: Sin*;

      Specify the time range to display the last 5 days in the Plot Time section.

    Style: Full time stamp.

    Start: *-5 Day 

    End: * 

      Click on OK to create the trend.

    4. Save the trend object by saving the display (File >Save).

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    11/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 11

    Problem 3B – Multiple Trends Display

     Add a new display entry in the ProcessBook you created in exercise 2. Place it onlevel 2 and name it “Exercise 3B”. Create three trends arranged per the figure

    below.

    Using Multiple Trends

    Trends should show units of each tag as well as their names and descriptions.Refer to the next characteristics to create these trends.

      Trend 1 displays BA:LEVEL.1 tag with a green color for y-scale located outside the trend.Change the line weight and use a different marker type.

      Trend 2 displays BA:CONC.1 tag with a blue color for y-scale located inside the trend.Change the line style and use a different marker type.

      Trend 3 displays CDT158 tag with a yellow color for y-scale located inside the trend. Changethe line weight or line style, and use a different marker type.

    Solution 3B

    1. Add a new display entry in the ProcessBook you created during exercise 2, its level will be 2 andname it “Exercise 3B”. Refer at Exercise 2 - Building a PI ProcessBook. 

    2. In Build  mode, use the Trend  tool . Drag the mouse diagonally to create a rectangular areato contain the trend. When you release the mouse button the Trend definition dialog box isdisplayed.

    3. Enter the following information in the General tab:

      Type the trend name in the Plot box: Trend 1.

    Trend 1

    Trend 3

    Trend 2

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    12/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 12

      Use the Tag Search button to locate and select the “BA:LEVEL.1” tag. 

      Click on New Plot button. The plot name is updated to Plot-1 and there is now no tag in Tagsin Plot area.

      Type the name for the second trend in the Plot box: Trend 2.

      Use the Tag Search button to locate and select “BA:CONC.1” tag. Click OK .

      Click on New Plot button.

      Type the name for the third trend in the Plot box: Trend 3.

      Use the Tag Search button to locate and select “CDT158”, then click on the Display Format  tab.

    4. In Display Format:

      Modify display format of Trend 1 to show y-scale outside the trend.

      Click on Trace Format tab.

    5. In Trace Format:

      Assign green to Trend 1.

      Assign blue to Trend 2.

      Assign yellow to Trend 3, then click on Layout tab.

    6. In Layout:

      Enter the trends arrangement: [Row : 1 x Col : 2] [ExRow : 1 x ExCol : 1]. An overall view isshown in the preview area.

      Trends are finished. Click on OK. It is important to note that the Layout tab will not appearafter you have edited these trends. Be sure that you have arranged trends properly before youexit this configuration screen.

    7. Save and exit the display.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    13/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 13

    Exercise 4 - Inserting Static Elements in Displays

    Objectives

    Learn to add static elements to your displays.

    Exercise

    The goal is to represent a process as a schematic to make it easy for all personnelto identify its components. Drawing tools are available to create schematics.

    In this exercise, you are to create a simple schematic to represent a tank, anagitator and a valve as presented in the figure below.

    In the ProcessBook you created in Exercise 2, add a new display entry that will benamed Exercise 4.

      In this display, reproduce the stirred tank drawn below. If you wish, you can activate the SnapTo Grid  option from the Arrange menu.

      Using the Symbol Library  tool (from the toolbar), create the tank. If you wish, you can modifythe color or fill pattern using the Options  button of the symbol library. Select the “Tank”category and the “Flat vessel 7” symbol. 

      Create the feed and the outlet pipes.

      Write "stirred tank" in the tank.

      Using the Symbol Library   tool (from the toolbar), create the agitator. If you wish, you canmodify the color or fill pattern using the Options  button of the symbol library. Select the“Mixers” category and the “Mixer blade” symbol. 

      Using the Symbol Library  tool (from the toolbar), create the valve. If you wish, you can modifythe color or fill pattern using the Options  button of the symbol library. Select the “Valves”

    category and the “Hand valve 2” symbol. 

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    14/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 14

    Inserting Static Elements in Displays

    Solution

    1. Hint: It can be easier to arrange and align objects when the grid is activated.

      From the Arrange menu, activate the Snap to grid  option.

    2. Draw the tank with the “Symbol Library” option of the Draw menu.  Once this option is selected,use the left button of the mouse to select the area where you want the symbol. Select the “Tank”category, then the “Flat vessel 7” symbol. Click on “Options” if you want to change the color or fillpattern of the tank. Note that the color can only be changed if the Fill mode is Shaded, Solid or  Hollow .

    3. Add the feed and outlet pipes.

      Start by modifying the line width with the Line Width  button . Note that you may alsochange the ending of lines to obtain arrows. It is possible to draw lines first and change theirends later.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    15/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 15

      Draw lines with the Line option from the Draw menu. Select the lines and modify their ends

    with the Line Width button. An option is to use the Poly-Line button and draw a line withmultiple sections.

    4. Add the agitator in the tank.

      Draw the agitator with the Symbol Library  option of the Draw  menu. Once this option isselected, use the left button of the mouse to select the area where you want the symbol.Select the “Mixers” category, then the “Mixer blade” symbol. Click on Options if you want tochange the color or fill pattern of the tank.

      Write in the tank: “Stirred tank” with the Text  option of the Draw  menu.

    5. Add a valve on the outlet pipe.

      Draw the valve with the Symbol Library  option of the Draw  menu. Once this option isselected, use the left button of the mouse to select the area where you want the symbol.Select the “Valves” category, then the “Hand valve 2” symbol. Click on Options if you want tochange the color or fill pattern of the tank. .

    OR

      Create the symbol yourself using the basic drawing tools.

    6. Save and exit the display.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    16/30

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    17/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 17

    Exercise 5 - Inserting Dynamic Elements in Displays

    Objectives

    Learn how to enhance your displays by adding live elements whose propertieschange in time. These elements consist of the following ProcessBook objects:

      Bar Graph

      Value of a PI Tag

      Multi-State Symbol

      Command Button

    Exercise

    Dynamic elements allow displaying changes of operating conditions in time, whichfacilitates the understanding of the use of dynamic elements in schematics.

    With this exercise, you use the display created in Exercise 4, add a level indicatorand an alarm display (low and high). Modify the design of the tank so that itgraphically shows the level.

    To add these elements, follow these steps:

      Insert a level indicator using the Value tool.

      Add a low and high visual alarm. (Draw two circles; then modify their properties using Multi-state Symbol ).

      Write the text associated with each alarm as shown in the figure below.

      Create a bar graph over the tank body and make it the same size as the tank. This might beeasier if the Snap to Grid  option of the Arrange menu is not activated.

      Insert a command button in your display from the button  icon. A configuration dialog boxappears. In the text item, enter « Calculator ». Select Operating system command   as itstype. Finally, in the action item, enter the command line that will start the calculator (Typically:C:\WINDOWS\SYSTEM32\CALC.EXE or C:\WINNT\SYSTEM32\CALC.EXE).

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    18/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 18

      Keep the propeller and the text inside the tank, in front of the bar graph. (Hint: use the Bringto front  command in the Arrange menu).

      Save the display you created in PDI format (Exercise5.pdi). Use the Save as item of the File menu.

    Inserting Dynamic Elements

    Solution

    1. Open the display created in Exercise 4.

    2. Insert a level indicator.

      Use the Value  option from the Draw   menu to insert the “BA:LEVEL.1”  tag value. Write“Level (%)” above the value with the Text  option from the Draw  menu.

    3. Add a low and high visual alarm.

      With the Ellipse option of the Draw  menu, draw two small circles, as shown in the figure below – they will be activated to become visual alarms;

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    19/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 19

      In the Build  mode, select the high-level circle and then click on Multi-State button . SelectBA:LEVEL.1 tag. Set the number of states to 2. Define the limit of the first state at

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    20/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 20

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    21/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 21

    Exercise 6 - PI Calculation Datasets

    Objectives

    Learn how to use dynamic elements based on datasets.

    Learn how to obtain statistics from PI data archives.

    Learn how to define equations with PI points.

    Exercise 1A – PI Summary

    In the ProcessBook you created in Exercise 2, add a new display entry namedDataSet1. In it, display in a new trend the hourly minimum value, maximum valueand the tank level average. Synchronize the calculations at 00:00:00 AM. Thetrend has to display the results of the last 12 hours in a stairstep trace.

     Also, add a value item to show the percentage of good values.

    Use the “Sinusoid” PI tag to do this exercise. The figure below illustrates theresulting trend.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    22/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 22

    Trend “Tank level” 

    Solution 1A

    1. Create a new display type entry titled DataSet1 in the ProcessBook you created in Exercise 2 andopen it.

    2. Create a dataset with the Data Set/New/PICalculation item of the Tools menu.

    3. Enter the following parameters in the PI Calculation Data dialog:

      Name: Level  

      Description: Tank level

      Refresh interval: 1 min 

      Step Plot: yes 

      Server: select a server  

      Tag name: Sinusoid  

      Interval: 1 h 

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    23/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 23

      Synchronization: 00:00:00  

    4. Build a new trend named “Tank level”. Click PI Calculation from the dropdown menu to select thecurves.

    5. Select the dataset you just created. Select the Average, Minimum and Maximum columns by

    holding down the Ctrl  key. Return to the Define Trend  dialog by clicking the OK  button.

    6. Set the plot time:

      Start: *-12h 

      End: *

    7. Set the display and trace formats as you want and click on OK.

    8. Add the percent good values with the Value item of the Draw  menu.

    9. Click on the PI Calculation button from the dropdown menu and choose the PctGood  column.

    10. Set the value‟s format to general, select a tag name position from the drop-down list and click OK .

    11. Save the display in PDI format.

    Exercise 1B – PI Expressions

    Two different products (A and B) feed a tank. You want to illustrate in a trend theproduct‟s percentage use per 30 minutes. The synchronization of the calculations

    starts at 00:00:00 AM (every 30 minutes starting at midnight). The trend shouldshow the results for the last 8 hours in a stairstep trace. Use the tag name CDT158 as product A and BA:TEMP.1 as product B. Define a column named “%Product A”for the results of the calculation. Use the following expression:

    'CDT158'*100/('CDT158'+'BA:TEMP.1’) 

    Place the trend in a new display entry named DataSet2 in the ProcessBook createdin Exercise 2. The figure below presents the resulting trend.

     Add a tank (static drawing + bar object) that will show the two products at the inletand the usage percentage of product A at the outlet.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    24/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 24

    Solution 1B

    Add Trend

    1. In the PI ProcessBook of Exercise 2, create a display type entry named “DataSet2” and open it. 

    2. Create a dataset with the Data Set  item of the Tools menu.

    3. Enter the following parameters in the PI Calculation Data dialog:

      Name: ProductA 

      Description: % Product A 

      Refresh interval: 1 m 

      Step Plot: yes 

      Server: select a server  

      Expression: 'CDT158'*100/('CDT158'+'BA:TEMP.1‟) 

      Interval: 10m 

      Synchronization: 00:00:00  

      Column: %ProductA

    4. Create a new trend named “% Product A”. Click on PI Calculation on the dropdown menu.

    5. Choose the dataset “Product A” and select the column “%ProductA”. Return to the Define Trenddialog.

    6. Set the plot time:

      Start: *-8h 

      End: *

    7. Set the display and trace formats as you want and click on OK.

    Add Tank

    1. Draw a tank with two inlet pipes and an outlet pipe as seen in the figure below.

    2. Type the products‟ names and add the CDT158 tag value as product A and the BA:TEMP.1 tagvalue as product B.

    3. Type “%ProductA =” at the tank‟s outlet and add the value and the timestamp of column%ProductA of the ProductA dataset.

    4. Save the Display and the PI ProcessBook.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    25/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 25

    Trend « % Product A »

    Notes on ODBC Exercises

    For the following two exercises to work properly, the following items must be installedon your system:

      LabData_2006.MDB (a Microsoft Access data file)

      The ODBC Data Source configured in your system

      ODBC tags.xls (with the PI-SMT menu in Microsoft Excel)

    The last element in the above list reflects three tags that must be created for thisexercise to work. You can create them individually or use the free SMT download TagConfigurator for Microsoft Excel to export them into your PI database. Each of thesetags makes use of standard interfaces and needs only be created to begin functioning.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    26/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 26

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    27/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 27

    Exercise 7 - ODBC Datasets

    Objectives

    Demonstrate your ability to construct an ODBC Connection and an ODBC DataSet.

    Problem

    You want to trend test values from a database used and maintained by your laboratorythat looks like this one:

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    28/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 28

    The result should resemble the illustration below.

    Approach

    We will use an ODBC DataSet that uses a SQL Query to filter the data from the labdatabase. In that query, we‟ll use placeholders to send the start time and end time ofthe graph through with the SQL query. As the trend updates, the query will updateautomatically.

    Please try to complete the exercise before moving on to the answer below.

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    29/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.No part of this publication may be reproduced or transmitted, in any form or by anymeans without prior permission of OSIsoft Inc.

     All rights reserved, OSIsoft Inc.  2007

    Page 29

    Step-by-Step Solution

    1. Create a new ProcessBook display and select Tools Data Sets.

    2. Select New   ODBC .

    3. Enter a name and a description for the new dataset

    4. Choose “LabData” from the Data Source list (if “LabData” is not available in the choice list,you will have to create it to point to LabData_2006.mdb).

    5. Next we have to build the query; you can type it manually or use the Microsoft Queryapplication (if available) by clicking on the Design… button. The request is built as follows: 

    SELECT TEST_DATA.TIME_TAKEN, TEST_DATA.VALUE FROM TEST_DATA WHERE(TEST_DATA.TIME_TAKEN>=? AND TEST_DATA.TIME_TAKEN

  • 8/20/2019 PI Exercises PB en 4.0-Gs

    30/30

    PI ProcessBook Exercises

    The information contained in this guide is confidential and may be subject to revision.

    7. Hit „Check Syntax‟. ProcessBook will test the query and once it finds it syntactically correct, itwill allow you to select OK.

    8. Back on the blank display, create a trend (use the last 24 hours as a range) using the DataSetyou just created. Trend the “Value” element. 

    Note here that we can edit the DataSet (SQL query, placeholders, etc.) from this window; if we do so it willbe edited for all elements that use it.

    9. Hit OK, finish the trend as usual and the data from the Access database will now be visible inyour trend – you can mix it with PI Data if desired!


Recommended