59
PI DataLink Exercises – version 4.6 Table of contents Introduction................................................................ 3 Exercise DL1 - Activity Report..............................................5 Exercise DL2 - Operational Start Up........................................11 Exercise DL3 - Daily Production............................................13 Exercise DL4 - Off-spec Production.........................................17 Exercise DL5 - Expression Calculation (Archive Value)......................21 Exercise DL6 – Quality Control Report (Optional)...........................25 Exercise DL7 - Operating Time with Time Filtered...........................31 Exercise DL8 - Tank Level..................................................35 Exercise DL9 - Advanced Calculated Data (Optional).........................39 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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008 Page 1

Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

Embed Size (px)

Citation preview

Page 1: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Table of contents

Introduction........................................................................................................................................................ 3

Exercise DL1 - Activity Report.............................................................................................................................. 5

Exercise DL2 - Operational Start Up................................................................................................................... 11

Exercise DL3 - Daily Production......................................................................................................................... 13

Exercise DL4 - Off-spec Production.................................................................................................................... 17

Exercise DL5 - Expression Calculation (Archive Value)........................................................................................21

Exercise DL6 – Quality Control Report (Optional)...............................................................................................25

Exercise DL7 - Operating Time with Time Filtered..............................................................................................31

Exercise DL8 - Tank Level................................................................................................................................... 35

Exercise DL9 - Advanced Calculated Data (Optional)..........................................................................................39

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 1

Page 2: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

IntroductionThe following are the PI DataLink exercises. Some of the exercises cannot be completed unless you have completed the previous ones.

These exercises can be completed with either Microsoft Excel 2003 or Microsoft Excel 2007 using the PI DataLink version 4.0.3 and higher.

The exercises in this book are designed to be performed using live software. In order to perform the exercises in a self-study environment, you will have to have an installed and working PI System and the appropriate client applications. Some applications require tags, modules, and/or elements and attributes to be configured. If there are configurations required they will be described in detail before the exercise. Occasionally, sample data files are provided. Prerequisites are described for each exercise.

The exercises are designed to be accomplished using only the descriptions in the Approach sections. If you have trouble you can reference the Step-by-step Solutions at the end of each exercise. You should always try to complete the exercise from the Approach section first.

Properly licensed software is required. OSIsoft does not provide sample software or test environments for this tutorial. Any sample data files or configuration files referenced can be acquired as part of the zipped Training Materials package that can be downloaded from the OSIsoft technical support web site (http://support.osisoft.com). You will be required to register to validate customer status.

If you have any questions please contact the Training Department at [email protected].

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 3

Page 3: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL1 - Activity Report

Objectives Learn to extract single values from the PI database using the following functions:

Current value; Archive value; Tag attribute.

Problem DescriptionYou need to build a basic activity report using data collected in your PI Server. You want this type of report to show values from the production plant floor before morning meeting. This report will show current values and ones from a specified time every morning.

ApproachWe will use the Current Value, Archive Value and Tag Attributes features to fill in a template of an activity report. Remember that we should base our PI DataLink queries on cell references whenever possible. Open the file Exercise_DL1_Template.xls and fill in data into all of the fields. Note all of the tags used in this example have engineering units.

Try to do this exercise on your own before proceeding to the step-by-step solution.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 5

Page 4: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Step-by-Step Solution

1. Open the file Exercise_DL1_Template.xls.

2. Select on the cell B7.

3. Click on PI ribbon > Tag Attributes.

4. In the task pane click in the Tagname(s) field.

5. Click and drag through cells A7 through A11 to select the cell range.

6. In the Attributes drop-down select descriptor.

7. Click on the OK button.

8. Select the cell C7.

9. Repeat Steps 3 – 7 instead selecting engunits in the Attributes drop-down.

10. Select on the cell D7.

11. Click on PI ribbon > Current Value.

12. In the task pane click in the Tagname(s) field.

13. Click and drag through cells A7 through A11 to select the cell range.

14. Select the time at left radio button.

15. Click on the OK button.

16. Select on the cell B19.

17. Click on PI ribbon > Archive Value.

18. In the task pane click in the Tagname(s) field.

19. Click and drag through cells A19 through A23 to select the cell range.

20. In the task pane click in the Timestamp field.

21. Select the cell D14.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 6

Page 5: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

22. Change the Retrieval Mode to interpolated.

23. Select the time at left radio button.

24. Click on the OK button.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 7

Page 6: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

25. Repeat steps 17 – 25 for the columns to the right, changing the Retrieval Mode to the appropriate selection from the heading (e.g., change the Retrieval Mode to previous for the Previous column, etc.).

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 8

Page 7: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Note 1

Notice that you can use the PI Datalink functions without the dialog box. Simply type in the formulas as follows:

Tag attribute:

Syntax =PITagAtt("tagname","NameOfAttributeYouWant","PIServer")

Example =PITagAtt($A$7,"descriptor",)or =PITagAtt("sinusoid","units",)

Current Value:

Syntax =PICurrVal("tagname",Outcode, "PIServer")

Example =PICurrVal($A$7,1,)

Archive value:

Syntax =PIArcVal("tagname","Date",Outcode, "PIServer","Mode")

Where mode = Interpolated or previous or next

Example =PIArcVal($A$7,$D$13,1,, "Interpolated")

Exact Time Value:

Syntax =PIExTimeVal("tagname","Date","PIServer")

Example =PIExTimeVal($A$7,$H$25,)

Note 2

We have seen that it is possible to enter a formula by entering one tag at a time. However it is possible to save time by selecting a range of cells instead of a single cell or using the copy/paste function of MS Excel. You must edit the formula and remove any unnecessary $character (absolute cell references) before using MS Excel copy/paste function.

Note 3

Note the impact of the point type and step attributes when you use archive value. For digital tags, the interpolated and previous values are equal and have the same timestamp because no interpolation is possible between states.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 9

Page 8: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 10

Page 9: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL2 - Operational Start Up

Objectives Learn to retrieve process data using the Compressed Data function.

Problem DescriptionYou need to compare the values stored in the PI Server that relate to the startup of a piece of equipment in your facility. You want to determine if there is any deviation between startup operations examining today and comparing it to the same time period the day before.

The tag you want to use as a metric is CDT158. Your shift begins at 6:30 am in the morning and you want to gather the first 30 values beginning at that time for today and yesterday, and do some quick math to determine the deviation. A ten percent deviation in a positive or negative direction will be considered over / under range. All other outcomes will be considered nominal.

ApproachWe need to create a spreadsheet that will show the first 30 values of the day for the tag CDT158. We also want to compare those values with the previous day’s starting 30 values. Open the file Exercise_DL2_Template.xls and fill in data into all of the fields. Both queries are using the Compressed Data (Start Time / Number) query. Use cell references for all of the dialog box fields. The formulas used to compare the two queries are found in the upper right portion of the spreadsheet. They both have a single quote inserted before the equal sign so MS Excel will treat them as strings and not formulas. You can copy and paste the contents and then remove the leading single quotes.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 11

Page 10: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Try to do this exercise on your own before proceeding to the step-by-step solution.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 12

Page 11: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Step-by-Step Solution

26. Open the file Exercise_DL2_Template.xls.

27. Select cell A10.

28. Click on PI ribbon > Compressed Data.

29. In the task pane select the Number of Values radio button.

30. In the task pane click in the Tagname(s) field.

31. Click on cell B3.

32. In the task pane click in the Start Time field.

33. Click on cell B5.

34. In the task pane click in the Number of Values field.

35. Click on cell B6.

36. In the task pane select the Show Timestamps check box.

37. Click on the OK button.

38. Select on cell D10.

39. Repeat steps 4-13 but modify the Start Time field for the today’s start time (cell B4).

40. Select cell K3.

41. In the Formula Bar select all except the single quote at the beginning of the expression.

42. Paste the expression without the single quote into cell G10.

43. Propagate the result down to cell G39 by dragging the cell by the lower-right corner.

44. Select on cell K6.

45. In the Formula Bar select all except the single quote at the beginning of the

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 13

Page 12: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

expression.

46. Paste the expression without the single quote into cell I10.

47. Propagate the result down to cell I39 by dragging the cell’s handle at the lower-right corner.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 14

Page 13: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL3 - Daily Production

Objectives Learn to extract calculated values using Calculated data function.

Problem DescriptionYou are the production manager and want to create a report showing last week’s daily production totals. You want to display the total production, average, minimum and maximum and standard deviation for that week. Also, you would like to present this data on a daily basis.

ApproachWe’ll use the built-in PI Calculated Data functions to show the above stats for the entire week (no time interval needs to be specified) and each day of the week (time interval of 24h).

Try to do this exercise on your own before proceeding to the step-by-step solution.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 15

Page 14: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Step-by-Step Solution

48. Open the file Exercise_DL3_Template.xls.

49. Select cell B16.

50. Click on PI ribbon > Calculated Data.

51. Make sure the PI Tag radio button is selected.

52. In the task pane click in the Tagname(s) field.

53. Click on cell B3.

54. In the task pane click in the Start Time field.

55. Click on cell B4.

56. In the task pane click in the End Time field.

57. Click on cell B5.

58. In the Calculation Mode drop-down select total.

59. For total calculation mode only enter 1440 in the Conversion Factor field. For all other calculation modes leave this field to one or 1.

60. Click on the OK button.

61. Repeat steps 3-14 for columns C through G using the appropriate selection for Calculation Mode (e.g., select Average in column C). In column G activate the show percent good check box.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 16

Page 15: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

62. Select cell A20.

63. Click on PI ribbon > Calculated Data.

64. In the task pane make sure the PI Tag radio button is selected.

65. In the task pane click in the Tagname(s) field.

66. Click on cell B3.

67. In the task pane click in the Start Time field.

68. Click on cell B4.

69. In the task pane click in the End Time field.

70. Click on cell B5.

71. In the task pane click in the Time Interval (optional) field.

72. Click on cell B7.

73. In the Calculation Mode drop-down select total.

74. For total calculation mode only enter 1440 in the Conversion Factor field. For all other Calculation Modes leave this field to one or 1.

75. In column A only activate the show end time check box in order to fill the Time stamp column.

76. Click on the OK button.

77. Repeat steps 16-30 for columns C through G using the appropriate selection for Calculation Mode (e.g., select Average in column C). In column G activate the show percent good check box.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 17

Page 16: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL4 - Off-spec Production

Objectives Learn to apply filters to select the values to extract using the Filter Expression option of the

Sampled data function.

Problem DescriptionAs a quality control manager, you want to examine the production over the last 8 hours for a tag that does not report many values due to its lack of volatility and thus its high compression rate on the PI Sever. Since there are only a few values passing through the compression, it is better to perform a Sampled Data query rather than a Compressed Data query.

The tag you will use is SINUSOID and you want to build a report that will make it clear where the lowest 20% of values lie.

ApproachUse PI Datalink’s Sampled Data function to get evenly spaced data. Because we only want to see data that are outside of the norm, we will apply filters to show high values, low values, and a list including both.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 19

Page 17: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Note 1

The MS Excel Today() function returns the serial number of the current date. The serial number is the date-time code used by Microsoft Excel for date and time calculations. Microsoft Excel stores dates as whole number of days starting at 1900. Dates and times are values and therefore can be added, subtracted, and included in other calculations.

Syntax: =TODAY()

Example: =(Today() –10 + 16/24) is today minus 10 days at 4 PM

When you enter a date in Microsoft Excel 97 and you enter only two digits for the year, Microsoft Excel enters the year as follows: The years 2000 through 2029 if you type 00 through 29 for the year. For example, if you type 5/28/19, Microsoft Excel assumes the date is May 28, 2019.The years 1930 through 1999 if you type 30 through 99 for the year. For example, if you type 5/28/91, Microsoft Excel assumes the date is May 28, 1991.

Note 2

For PI 2 users: you must use the short tag name rather than the long tag name in the syntax of your filter expression.

Try to do this exercise on your own before proceeding to the step-by-step solution.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 20

Page 18: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Step-by-Step Solution

78. Open the file Exercise_DL4_Template.xlsx.

79. Select cell A8.

80. Click on PI ribbon > Sampled Data.

81. In the task pane make sure the PI Tag radio button is selected.

82. In the task pane click in the Tagname(s) field.

83. Click on cell B4.

84. In the task pane click in the Start Time field.

85. Click on cell B5.

86. In the task pane click in the End Time field.

87. Click on cell B6.

88. In the task pane click in the Time Interval field.

89. Click on cell B7.

90. Check the show timestamps check box.

91. Click on the OK button.

92. Select all of the cells that contain data in column B (use the CTRL+SHIFT+↓).

93. Click on Home ribbon > Conditional Formatting > Data Bars > Blue Data Bar. You should have a data area scaled with blue bars.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 21

Page 19: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

94. Click on Conditional Formatting > Top/Bottom Rules > Bottom 10%...

95. Change the number to 20%.

96. Click on the OK button.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 22

Page 20: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 23

Page 21: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL5 - Expression Calculation (Archive Value)

Objectives Learn to carry out a calculation for the current value of an expression; Use MS Excel’s Conditional Formatting to make your PI Data Link reports more useful.

Problem DescriptionAs a Shift Team Leader in a bottling plant, you want to produce a real time report that shows the average speed of the bottle filler for the past hour. You also wish to compare this average to the average of the 3 hours before, to know whether you are positively impacting production speed for your shift or not. The speed of the bottle filler is measured by the tag SINUSOID.

ApproachUsing the built-in function TagAvg, calculate and display the average for the filler speed tag (SINUSOID) for the last hour. Using the built-in functions Sgn and TagAvg, calculate whether your hourly production rate is better or worse than that for the three hours prior. Use MS Excel’s conditional formatting to get a quick view of your performance.

Try to do this exercise on your own before proceeding to the step-by-step solution.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 25

Page 22: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Step-by-Step Solution

97. Open the file Exercise_DL5_Template.xls.

98. Enter this expression: TagAvg('sinusoid', '*-1h', '*') into cell B9.

99. Enter this expression: SGN(TagAvg('sinusoid','*-1h','*')-TagAvg('sinusoid','*-4h','*-1h')) into cell B16.

100. Select the cell B11.

101. Click on PI ribbon > Archive Value.

102. In the task pane select the PI Expression radio button.

103. In the task pane click in the Expression(s) field.

104. Click on cell B9.

105. Enter * (PI abbreviation for now timestamp) in the Timestamp field.

106. Click on the OK button.

107. Select on cell B18.

108. Click on PI ribbon > Archive Value.

109. In the task pane select the PI Expression radio button.

110. In the task pane click in the Expression(s) field.

111. Click on cell B18.

112. Enter * in the Timestamp field.

113. Click on the OK button.

114. Select cell H2.

115. Click on Home ribbon > Conditional Formatting > Highlight Cells Rules > Equal To…

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 26

Page 23: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

116. Select Custom Format… from the with drop-down option.

117. Choose a green color for the filling of the cell.

118. Click on the OK button.

119. Repeat steps 20 – 24 but for the association between the red color and value -1.

120. Press CTRL+R to refresh the color of the bottle image.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 27

Page 24: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL6 – Quality Control Report (Optional)Objectives

Learn to apply complex filters to extract archived values; Learn to synchronize data extraction; Learn to extract maximum value of a time range using Calculated data function; Use MS Excel’s Conditional Formatting to make your PI Data Link reports more useful.

Problem DescriptionAs the person in charge of the quality control of the process, you want to easily identify when specific characteristics of the process exceeds quality threshold values. The process you analyze takes place in seven (7) phases. During three (3) phases of the process, the monitoring of physical characteristics is critical at the phase change; these phases are Phase1, Phase3 and Phase5. The physical characteristics give indication of the quality of the product made in the reactor.

The physical characteristics are the electrical conductivity which is measured by the expression: 'BA:CONC.1' / 100 and the temperature is measure by the expression: 'BA:TEMP.1' * 10. The threshold value for electrical conductivity should not overcome 0.45 Siemens/cm, and temperature in the reactor should not overcome 500 degree Celsius

Also, it is necessary to follow the conductivity and temperature peak of the day and find when it happened.

You need to build your report to make it easier to analyze in a short period of time, so put red visual indicators when threshold values are exceeded and blue ones when everything is normal. You need to be able to locate any high values of the day using the MS Excel Conditional Formatting.

ApproachWe will use the Compressed Data function with a filter expression to retrieve when the different critical phases took place during the day. The filter expression will contain many criteria tied together with OR a logical operator.

The Archive Value function will be used to retrieve physical characteristic measurements at the phase’s change. We will use the built-in PI Calculated Data function to show the conductivity and temperature peak of the day. Use MS Excel’s conditional formatting to get a quick view of your performance.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 29

Page 25: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Try to do this exercise on your own before proceeding to the step-by-step solution.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 30

Page 26: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Step-by-Step Solution

121. Open the file Exercise_DL6_Template.xls.

122. Enter the tag name 'BA:PHASE.1 in cell B4

123. Enter the expression: ''BA:CONC.1' / 100 in cell B5.

124. Enter the expression: ''BA:TEMP.1' * 10 in cell B6.

125. Build the filter expression to use. Enter the expression: ''BA:PHASE.1'="Phase1" OR 'BA:PHASE.1'="Phase3" OR 'BA:PHASE.1'="Phase5" in cell B9.

126. Select cell A12.

127. Click on PI Ribbon > Compressed Data.

128. In the task pane click in the Tagname(s) field.

129. Click on cell B4.

130. In the task pane click in the Start Time field.

131. Click on cell B7.

132. In the task pane click in the End Time field.

133. Click on cell B8.

134. In the task pane click in the Filter Expression (optional) field.

135. Click on cell B9.

136. Check the hide count option to remove the number of values extracted.

137. Check the show timestamps option.

138. Click on the OK button.

139. To extract the conductivity measurement at the phase’s change, we need to use the individual timestamps returned by the Compressed Data function as input timestamps for the Archive Value function. Let’s start by selecting cell C12.

140. Click on PI Ribbon > Archive Value.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 31

Page 27: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

141. Select the PI Expression radio button in the task pane.

142. In the task pane click in the Expression(s) field.

143. Click on cell B5.

144. In the task pane click in the Timestamp field.

145. Click on cell A12.

146. Click on the OK button.

147. Select cell C12, localize in the Address Bar the second argument which will be a cell reference and click on the text forming the cell address.

148. Press on the F4 key on the keyboard two (2) times. This will transform the absolute cell reference into a row relative cell reference. It means the dollar sign in front of the row position will be removed. You will then see a reference like Sheet1!$A12 instead of Sheet1!$A$12.

149. Propagate the result down to cell C150 by dragging the cell’s handle at the lower-right corner.

150. To extract the temperature measurement at the phase’s change, we need to use the individual timestamps returned by the Compressed Data function as input timestamps for the Archive Value function. Let’s start by selecting cell D12.

151. Click on PI Ribbon > Archive Value.

152. Select the PI Expression radio button in the task pane.

153. In the task pane click in the Expression(s) field.

154. Click on cell B6.

155. In the task pane click in the Timestamp field.

156. Click on cell A12.

157. Click on the OK button.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 32

Page 28: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

158. Select cell D12, localize in the Address Bar the second argument which will be a cell reference and click on the text forming the cell address.

159. Press on the F4 key on the keyboard two (2) times. This will transform the absolute cell reference into a row relative cell reference

160. Propagate the result down to cell D150 by dragging the cell’s handle at the lower-right corner.

161. To extract the conductivity peak we need to use the Calculated Data function and put the result on cell F13; select cell F13.

162. Click on PI Ribbon > Calculated Data.

163. Select the PI Expression radio button in the task pane.

164. Click on cell B5.

165. In the task pane click in the Start Time field.

166. Click on cell B7.

167. In the task pane click in the End Time field.

168. Click on cell B8.

169. In the task pane click in the Filter Expression (Optional) field.

170. Click on cell B9.

171. In the Calculation Mode drop-down select maximum.

172. Check the show min/max time option.

173. Click on the OK button.

174. To extract the temperature peak we need to use the Calculated Data function and put the result on cell F17; select cell F17.

175. Click on PI Ribbon > Calculated Data.

176. Select the PI Expression radio button in the task pane.

177. Click on cell B6.

178. In the task pane click in the Start Time field.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 33

Page 29: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

179. Click on cell B7.

180. In the task pane click in the End Time field.

181. Click on cell B8.

182. In the task pane click in the Filter Expression (Optional) field.

183. Click on cell B9.

184. In the Calculation Mode drop-down select maximum.

185. Check the show min/max time option.

186. Click on the OK button.

187. We need to make this report more appealing for the verification; we will use the Conditional Formatting capabilities of MS Excel to make it through. Select cell range from C12 to C150.

188. Click on Home ribbon > Conditional Formatting > Data Bars > Blue Data Bar

189. Be sure to keep the cell C12 to C150 range selected.

190. Click on Home ribbon > Conditional Formatting > Highlight Cell Rules > Greater Than

191. Enter the value 0.49 in the Format cells that are GREATER THAN field.

192. Select Custom Format… from the with drop-down option.

193. Choose a blue color for the filling of the cell.

194. Click on the OK button.

195. Select cell range from D12 to D150.

196. Click on Home ribbon > Conditional Formatting > Highlight Cell Rules > Between

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 34

Page 30: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

197. Enter the value 0 and 500 in the Format cells that are BETWEEN field.

198. Select Custom Format… from the with drop-down option.

199. Choose a green color for the filling of the cell.

200. Click on the OK button.

201. Be sure to keep the cell D12 to D150 range selected.

202. Click on Home ribbon > Conditional Formatting > Highlight Cell Rules > Greater Than

203. Enter the value 500 in the Format cells that are GREATER THAN field.

204. Select Custom Format… from the with drop-down option.

205. Choose a red color for the filling of the cell.

206. Click on the OK button.

207. The resulting report should look similarly to the one presented below.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 35

Page 31: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 36

Page 32: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL7 - Operating Time with Time Filtered

Objectives Calculate an operating time with the function Time Filtered.

Problem DescriptionAs the person in charge of the maintenance program, you want to know the operating time for a specific pump. Find the amount of time the pump was ACTIVE using the function Time Filtered. This method performs the calculation in a single step; saving the step of doing the filtering with the IF function in MS Excel. It returns the amount of time that an expression is true.

The operating status is measured by the tag BA:ACTIVE.1.

ApproachThe Time Filtered function returns the amount of time that an expression is true. Use Time Filtered results to perform an analysis of the time that your machine state was ACTIVE. The report should allow the user to select the time unit to display.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 37

Page 33: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Try to do this exercise on your own before proceeding to the step-by-step solution.

Step-by-Step Solution

208. Open the file Exercise_DL7_Template.xls.

209. Enter the expression: ''BA:ACTIVE.1' = "Active" in cell B7.

210. Select cell A10.

211. Click on PI Ribbon > Time Filtered.

212. In the task pane click in the Expression(s) field.

213. Click on cell B7.

214. In the task pane click in the Start Time field.

215. Click on cell B4.

216. In the task pane click in the End Time field.

217. Click on cell B5.

218. In the task pane click in the Time Interval (optional) field.

219. Click on cell B6.

220. In the task pane click in the Time Units field.

221. Click on cell C9.

222. Select the show start time check box.

223. Click on the OK button.

224. For data validation steps write this time unit: seconds in cell I2, and minutes in cell I3, and hours in cell I4, and days in cell I5.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 38

Page 34: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 39

Page 35: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

225. Select cell C9.

226. Click on Data ribbon > Data Validation.

227. In the dialog box choose allow a List.

228. In the Source field below select the cell range you just created (=$I$2:$I$5).

229. Click on the OK button.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 40

Page 36: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL8 - Tank Level

Objectives Learn to use the Insert Trend function with data from MS Excel worksheet and PI data.

Problem DescriptionYou have some production limit specifications and you want to be able to see how the previous day’s production measured up against those limits. The production tag you need to use is CDT158 and the limits are as follows:

Upper Limit 225

Target Rate 150

Lower Limit 75

ApproachUse a PI Trend in MS Excel to display real-time data alongside MS Excel data. We could use MS Excel’s graphing capability; however we would not have automatic refreshing.

Try to do this exercise on your own before proceeding to the step-by-step solution.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 41

Page 37: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Step-by-Step Solution

230. Open the file Exercise_DL8_Template.xls.

231. Select cell B7.

232. Click on PI ribbon > Insert Trend.

233. Select the Data from PI radio button.

234. Select cells C2 for the Tag name field.

235. Click on the Add -> button; it will add the tag data to the trend.

236. Select the Data on worksheet radio button.

237. Select the First element is trace name check box.

238. In the Cell range containing data field, select the cell range containing the data (dates, limit names and limit values). Click on the Add-> button.

239. Click on the Next button.

240. Select the Start time and End time from cells C4 and C5.

241. Click on the Next button.

242. Click on the Finish button.

243. Right-click on the trend object.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 42

Page 38: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

244. Select Export Data from the contextual menu.

245. In the dialog box select cell J2.

246. Check the Use Trace Name as heading check box.

247. Click on the OK button.

248. The result should look similarly to the figure below.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 43

Page 39: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Exercise DL9 - Advanced Calculated Data (Optional)

Objectives Learn to perform operations on tags using Advanced Calculated Data.

Problem DescriptionAs the section head of a small sawmill you are responsible for the quality and the quantity of board produced. You wish to create a PI DataLink report to help your weekly analysis of shift performance.

The tag BA:CONC.1 represents the length of board produced, and each archived value represents another full board. Boards under 5 feet long are considered scrap, which means they should not be included as production. Accounting has determined that scrap production costs $2.00 for every foot.

The plant starts up on Monday at 8:00 am and goes idle at 4:00 pm on Friday. Shifts are 8 hours long and run 24 hours per day.

Produce a report for last week, by shift, of the following:

The number of boards produced, excluding scrap; The average board length produced, excluding scrap; The cost of scrap.

ApproachWe will combine a number of functions in the Advanced Calculated Data. We want to determine for a given interval, how many events were archived event (a board being produced is an archived event), the boards’ average length (using an event-weighted expression), as long as they were over a certain length. Afterward, we will run a calculation to determine how much production was lost to scrap. All of this will be done per interval, which this time is our shift schedule for all last week.

Try to do this exercise on your own before proceeding to the step-by-step solution.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 45

Page 40: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

Step-by-Step Solution

249. Open the file Exercise_DL9_Template.xls.

250. Select cell A16.

251. Click on the PI ribbon > Calculated Data.

252. Select the PI Tag radio button in the task pane.

253. In the task pane click in the Tagname(s) field.

254. Click on cell B4.

255. In the task pane click in the Start Time field.

256. Click on cell B5.

257. In the task pane click in the End Time field.

258. Click on cell B6.

259. In the task pane click in the Time Interval (optional) field.

260. Click on cell B7.

261. In the task pane click in the Filter Expression (optional) field.

262. Click on cell B9.

263. In the Calculation Mode drop-down select Count.

264. Expand the Advanced area.

265. In the Calculation Basis drop-down select event-weighted.

266. Check show start time check box.

267. Click on the OK button.

268. Select cell C16.

269. Click on PI ribbon > Calculated Data.

270. Click on PI Tag radio button in the task pane.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 46

Page 41: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

271. In the task pane click in the Tagname(s) field.

272. Click on cell B4.

273. In the task pane click in the Start Time field.

274. Click on cell B5.

275. In the task pane click in the End Time field.

276. Click on cell B6.

277. In the task pane click in the Time Interval (optional) field.

278. Click on cell B7.

279. In the task pane click in the Filter Expression (optional) field.

280. Click on cell B9.

281. In the Calculation Mode drop-down select Average.

282. Click on the OK button.

283. Select on cell D16.

284. Click on PI ribbon > Calculated Data.

285. In the task pane click in the Time Interval (optional) field.

286. Click on cell B7.

287. In the task pane click in the Filter Expression (optional) field.

288. Click on cell B10.

289. In the Calculation Mode drop-down select Total.

290. Expand the Advanced area.

291. In the Calculation Basis drop-down select event-weighted.

292. Click on the OK button.

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 47

Page 42: Exercises Format template - PROYTEK, S.A. - Offline Visita 2011/…  · Web viewDeveloped March 2008 using Office Word 2007. ... Open the file Exercise_DL1_Template.xls and fill

PI DataLink Exercises – version 4.6

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 any means without prior permission of OSIsoft Canada. All rights reserved, OSIsoft 2008

Page 48