Download presentation
Presentation is loading. Please wait.
1
PI ProcessBook, PI DataLink and RtWebParts
The Visuals Using PI DataLink All rights reserved, OSIsoft Inc. © 2008
2
PI ProcessBook, PI DataLink and RtWebParts
Introductions PI ProcessBook, PI DataLink and RtWebParts Instructor Students Tell us about your PI System What is your role with PI? What skills do you need to learn? All rights reserved, OSIsoft Inc. © 2008
3
PI ProcessBook, PI DataLink and RtWebParts
Course Overview PI ProcessBook, PI DataLink and RtWebParts Length: 1 day Interactive course: Theory 50% Exercises and examples 50% All rights reserved, OSIsoft Inc. © 2008
4
PI ProcessBook, PI DataLink and RtWebParts
Objectives PI ProcessBook, PI DataLink and RtWebParts Understand the fundamentals of PI technology Learn to access data in the PI server Become familiar with the use of PI Datalink Please ask questions as they arise! All rights reserved, OSIsoft Inc. © 2008
5
PI ProcessBook, PI DataLink and RtWebParts
Course Content PI ProcessBook, PI DataLink and RtWebParts Introduction to PI Common Dialog Windows PI Tags Data Flow PI Time Format PI Datalink All rights reserved, OSIsoft Inc. © 2008
6
PI ProcessBook, PI DataLink and RtWebParts
1.0 Introduction to PI Objectives Define the parts of a PI System Define a tag and its meaningful attributes Explain the PI Server data flow All rights reserved, OSIsoft Inc. © 2008
7
OSIsoft is a Trusted Partner
PI ProcessBook, PI DataLink and RtWebParts 14,000+ Customers, 110+ countries Knowledgeable Recognized Global Leader Dominant market position across industries 14,000+ Customer Installations 40% of Fortune 1000 process and manufacturing companies use the PI System 65% of Global 500 process and manufacturing companies use the PI System Experienced 30+ Year History Founded 1980, ~630 professionals HQ San Leandro, CA OSIsoft is a Trusted Partner OSIsoft has been in business as a private company for over 25 years. We are recognized for our strong partnerships with Microsoft and SAP and over 11,000 customer installations. Our customers trust the PI System to safeguard their data and to provide real-time, enterprise-wide visibility into real-time events and operational performance. OSIsoft was founded over 25 years ago by Dr. J. Patrick Kennedy. Dr Kennedy’s focus is on delivering value to our customers and today, he spends most of his time speaking to and meeting customers. Delivering value to customers is our primary mission – as quoted by Dr Kennedy: “We are rewarded when we deliver superior value. This means delivering a platform on which our customers can continuously improve their business performance.” Strategic Partnerships Microsoft, SAP, Cisco, Intel Rockwell, Emerson Recognized > $188M Revenues Over 20% reinvested in R&D Approaching 50% revenue from outside N. America All rights reserved, OSIsoft Inc. © 2008
8
Global Presence Moscow, Russia Calgary, Alberta Frankfurt, Germany
San Leandro, CA Phoenix, AZ Houston and Longview,TX Frankfurt, Germany Czech Republic Paris, France Montréal, Québec Philadelphia, PA Cleveland, OH Johnson City, TN Savannah, GA Tokyo, Japan Madrid, Spain Beijing, China Shanghai, China Manama, Bahrain Naucalpan, México Singapore São Paulo, Brazil KwaZulu, Natal, South Africa Perth, Australia Sydney, Australia OSIsoft Offices New Plymouth, New Zealand
9
PI ProcessBook, PI DataLink and PI WebParts
1.0 PI Basics All rights reserved, OSIsoft Inc. © 2009
10
PI ProcessBook, PI DataLink and PI WebParts
1.1 What is a PI System? All rights reserved, OSIsoft Inc. © 2009
11
PI ProcessBook, PI DataLink and PI WebParts
The PI System 2010 PI ProcessBook, PI DataLink and PI WebParts Windows integrated security PI System 2010 PI Server PI Notifications PI Analytics PE Totalizer PI ACE High availability PI Asset Framework PI Archives 64-bit product Real-time Interfaces Virtualization Real-Time Data DCS / PLC / SCADA / OPC HISTORIANS / INTERFACES Custom Data APIs / SDKs IT Data IT MONITOR Relational Data OLEDB / ODBC SQL SERVER / ORACLE Web Services SOA / EXTERNAL DATA LEGACY APPS All rights reserved, OSIsoft Inc. © 2009
12
PI ProcessBook, PI DataLink and PI WebParts
Basic Parts PI ProcessBook, PI DataLink and PI WebParts All rights reserved, OSIsoft Inc. © 2009
13
Architecture of a Typical PI System
PI ProcessBook, PI DataLink and PI WebParts All rights reserved, OSIsoft Inc. © 2009
14
PI ProcessBook, PI DataLink and PI WebParts
1.2 PI Tags All rights reserved, OSIsoft Inc. © 2009
15
PI ProcessBook, PI DataLink and PI WebParts
What is a PI Tag? PI ProcessBook, PI DataLink and PI WebParts It is a unique storage point for data in the PI system. It is simply a single point of measurement. Examples A flow rate from a flowmeter A controller’s mode of operation The batch number of a product Text comments from an operator The results of a totalizer or calculation All rights reserved, OSIsoft Inc. © 2009
16
PI ProcessBook, PI DataLink and RtWebParts
PI Tag Attributes PI ProcessBook, PI DataLink and RtWebParts Each PI Tag has a set of attributes for: Describing the tag to a User/Client Application “How is the information displayed?” Describing the tag to the Control System Interface “How is the information found?” Describing the tag to the PI Server “How is the information stored?” All rights reserved, OSIsoft Inc. © 2008
17
PI Tag Attributes – Display
PI ProcessBook, PI DataLink and RtWebParts Tag name: unique name of the PI point Descriptor: PI tag description EngUnits: Engineering units PointType: type of variable stored Zero, Span and Typical value: minimum, range and typical values Point source: allows grouping of PI tags by data interface (DCS,PLC, or other sources) Tag Attributes The configuration information for a point is stored as a list of attributes. These attributes include: Tag : The tag name is used to uniquely identify the point. This means that the tag point attribute is the key to the information about the point. Descriptor: PI tag description. EngUnits: The engineering unit string describes the units of the measurement. You may use any string, and the string may be of any length. PointClass: The Point Database has several different point classes, such as Base and Classic. Point class is assigned when the point is created. The point class of an existing point cannot be changed. The point class determines which attributes are accessible. PointType: There are many point types in PI. PointType is assigned when the point is created and cannot be changed. Zero: A zero is required for all numeric data type points to indicate the lowest value possible. It does not have to be the same as the instrument zero, but that is usually a logical choice. Span: The span is the difference between the top of the range and the bottom of the range. It is required for all numeric data type points. TypicalValue: The typical value is used only to document an example of a reasonable value for this point. For a numeric tag, it must be greater than or equal to the zero, and less than or equal to the zero plus the span. All rights reserved, OSIsoft Inc. © 2008
18
PI ProcessBook, PI DataLink and RtWebParts
1.2 Data Flow All rights reserved, OSIsoft Inc. © 2008
19
PI ProcessBook, PI DataLink and RtWebParts
Data Tests PI ProcessBook, PI DataLink and RtWebParts Every value can go through 2 data screening tests before being archived: Exception Test “Send only significant changes in data to the server” Compression Test “Store only data needed to reliably represent process behavior” All rights reserved, OSIsoft Inc. © 2008
20
PI ProcessBook, PI DataLink and RtWebParts
New Value (scan or exception based) Exception Test Snapshot PI Compression Algorithm PI Archives Data Flow PI ProcessBook, PI DataLink and RtWebParts Data acquisition node Data Flow A value has to pass two tests to be stored in the PI archive: the exception test and the compression test. Exception Test The exception test is done at the interface level. The values that pass this test are sent to the PI server and become “snapshots”. Compression Test The compression test is done at the server level. The compression algorithm determines which of the snapshots will be kept in the archive RtWebParts, ProcessBook, Totalizer, SQC, ACE, Performance Equations all get data directly from the SNAPSHOT. PI server All rights reserved, OSIsoft Inc. © 2008
21
PI ProcessBook, PI DataLink and RtWebParts
Raw Data - Example PI ProcessBook, PI DataLink and RtWebParts Raw values scanned on the data source. Without Exception and Compression tests, these would all be archived Temperature Time All rights reserved, OSIsoft Inc. © 2008
22
Exception Test (Interface Level)
PI ProcessBook, PI DataLink and RtWebParts Exception Test: ExcMax (time) + ExcDev Current Snapshot - ExcDev New values outside the box violate the Exception test. The Exception Test is performed by the interface When a value violates the Exception test, this value and the previous one are sent to the PI Server. Exception Test A value violates the exception test if: Its value differs from the previous snapshot value by the exception deviation specification (ExcDev) OR the time since the last exception is greater or equal to the maximum exception time (ExcMax) BUT No values are reported until the minimum exception time (ExcMin) has elapsed since the last exception. When a value violates this test, that value and the previous value are sent to the server Notes: ExcMax and ExcMin are in seconds All rights reserved, OSIsoft Inc. © 2008
23
PI ProcessBook, PI DataLink and RtWebParts
Exception Test PI ProcessBook, PI DataLink and RtWebParts When a value passes this test, that value and the previous value are reported. Why? To have a better representation of the actual tag behavior passes the exception test Previous value Trend if previous value is sent Trend if previous value is not sent Temperature Sending the previous value When a value violates the exception test, that value and the previous value are reported to the server. This is done to ensure the actual behavior of the tag is properly represented in a case as shown above. Otherwise, the client tools would show a slow and steady slope from the last archived value to the new violating value instead of a constant value followed by an abrupt change. +/- ExcDev Snapshot value Time All rights reserved, OSIsoft Inc. © 2008
24
Exception Test - Example
PI ProcessBook, PI DataLink and RtWebParts Temperature P E E E E E E E P E P E E P E Time E: Exception P: Previous All rights reserved, OSIsoft Inc. © 2008
25
Exception Test - Results
PI ProcessBook, PI DataLink and RtWebParts Successive values sent to the PI Server. When a value is sent, it becomes the new snapshot. Temperature Time All rights reserved, OSIsoft Inc. © 2008
26
PI ProcessBook, PI DataLink and RtWebParts
Directed Exercise PI ProcessBook, PI DataLink and RtWebParts Consider the following parameters: ExcDevPercent: 2 Span; 200 ExcMax: 180 The current snapshot value and timestamp are: :00:00 Which pass the exception test (not including previous values): Time Value Snapshot Time Current Snapshot 10:00:00 70.3 10:01:00 67.1 10:02:00 71.4 10:03:00 70.1 10:04:00 68.2 10:05:00 66.0 10:06:00 65.8 10:07:00 64.2 10:08:00 60.0 10:09:00 63.1 The answers are provided by the trainer. Exception reporting All rights reserved, OSIsoft Inc. © 2008
27
PI ProcessBook, PI DataLink and RtWebParts
Turning Off Exception? PI ProcessBook, PI DataLink and RtWebParts Behavior of ExcDev = 0, ExcMax = 0, is that Exception Test is turned off All values are sent to PI. This will increase the traffic between the data collection node and the server. Limitation The current file size limitation on the PI Buffer server data file (apibuf.dat) is 2GB. This 2GB fills relatively quickly with uncompressed data and even quicker if data has not gone through exception reporting. There is no limitation otherwise than the hard disk space when the PI Buffer Subsystem is used. All rights reserved, OSIsoft Inc. © 2008
28
Compression Test (PI Server)
PI ProcessBook, PI DataLink and RtWebParts Current snapshot Compression Test: + CompDev Last archived value - CompDev < CompMax (s) If a value between the last archive event and the current snapshot is outside the box, the current snapshot violates the compression test. In this case, the value previous to the current snapshot will be archived. The Compression Test is done by the PI Server Compression can be turned off with the Compressing attribute Compression After leaving the Snapshot, events are evaluated according to the compression specifications to see if they are significant events. If so, they are sent to the Event Queue. If not, they are discarded. This process is called compression. There are three (3) possibilities where an event can bypass the compression process and be put directly in the Event Queue: If the Compressing attribute for the point is set to OFF. If the timestamp is older than the timestamp of the current snapshot. Such an event is sometimes expressed in term of out of order event. If the Status attribute of the Point has changed. The compression method used by PI allows PI to keep orders of magnitude of more data online than conventional scanned systems. The data are also much more detailed than in an archiving system based on averages or periodic samples. The compression method is called swinging door compression. Swinging door compression discards values that fall on a line connecting values that are recorded in the archive file. When a new value is received by the Snapshot Subsystem, the previous value is recorded only if any of the values since the last recorded value do not fall within the compression deviation blanket. The deviation blanket is a parallelogram extending between the last recorded value and the new value with a width equal to twice the compression deviation specification. All rights reserved, OSIsoft Inc. © 2008
29
Compression Test – Example
PI ProcessBook, PI DataLink and RtWebParts The compression algorithm is performed on new snapshots to determine which data is kept in the PI archives A Temperature A A A A A A Time A: Archived Value All rights reserved, OSIsoft Inc. © 2008
30
PI ProcessBook, PI DataLink and RtWebParts
Compression Results PI ProcessBook, PI DataLink and RtWebParts Values kept in the PI archives Temperature When the user requests a tag-time for which the value is interpolated, the difference can be no greater than ±CompDev Time All rights reserved, OSIsoft Inc. © 2008
31
PI ProcessBook, PI DataLink and RtWebParts
Compression Results PI ProcessBook, PI DataLink and RtWebParts Raw values scanned After Exception After Compressionression Temperature Time All rights reserved, OSIsoft Inc. © 2008
32
Turning Off Compression?
PI ProcessBook, PI DataLink and RtWebParts Behavior of Compression Compressing set to Off: all exceptions are archived (no compression) Better Compressing set to ON, CompDev set to 0: successive identical values (or values aligning perfectly) are not archived. This is much more efficient All rights reserved, OSIsoft Inc. © 2008
33
PI ProcessBook, PI DataLink and RtWebParts
Data Flow PI ProcessBook, PI DataLink and RtWebParts The exception and compression specifications should be adjusted to achieve efficient archive storage without losing significant data. Disk space and Performance vs Data accuracy All rights reserved, OSIsoft Inc. © 2008
34
Exception and Compression Attributes
PI ProcessBook, PI DataLink and RtWebParts Exception and Compression Attributes Each PI Tag can be individually configured for its exception reporting and compression Exception Reporting Attributes Compression ExcDev or ExcDevPercent ExcMax ExcMin CompDev or CompDevpercent CompMax CompMin Compressing PI System Default Settings Default tag settings for PI tags are: Zero = 0 and Span = 100 Exception = 1% and Compression = 2% In many cases, these default values are not adequate. Carefully review the configuration of following attributes according to the nature of what is being measured: CompDev, CompDevpercent, CompMax, CompMin, Compressing ExcDev, ExcDevPercent, ExcMax, ExcMin All rights reserved, OSIsoft Inc. © 2008
35
Recommended Data Compression Specifications
PI ProcessBook, PI DataLink and RtWebParts Recommended Data Compression Specifications Set the Compression Deviation to the minimum change that is measurable by the instrument. Set the Exception Deviation to ½ of the compression deviation Note: these are starting point recommendations. Note: ExcMin, ExcMax, CompMin and CompMax are in SECONDS Compression Specifications You can adjust the compression parameters to produce efficient archive storage without losing significant data. The compression maximum time is usually set to one value for all points in the system. It should be large enough that a point that does not change at all uses very little archive space. A compression maximum time of one work shift (for example, 8 hours) is often a good choice. Use the compression minimum time (CompMin) to prevent an extremely noisy point from using a large amount of archive space. This parameter should be set to zero for any point coming from an interface that does exception reporting. In this case, the exception minimum time should be used to control particularly noisy points. For a data acquisition system with a slow scan time, this parameter is not important. There are few cases where you want to use a non-zero compression minimum time. Notes: The maximum time specification does not guarantee that a value will be written to the Archive within a certain time. The archive waits for events to be sent to it. It does not check to see if a point has timed out. It does not “create” new values. All rights reserved, OSIsoft Inc. © 2008
36
PI ProcessBook, PI DataLink and RtWebParts
1.3 PI Time Format All rights reserved, OSIsoft Inc. © 2008
37
PI ProcessBook, PI DataLink and RtWebParts
PI Time Format PI ProcessBook, PI DataLink and RtWebParts Absolute (a specific point in time) * : (NOW) t : 00:00:00 on the current day (TODAY) 18-feb-05 16:00:00 Relative (time is offset from another time) +8h : + 8 hours Combined t+8h : today + 8 hours All rights reserved, OSIsoft Inc. © 2008
38
PI ProcessBook, PI DataLink and RtWebParts
Absolute Time PI ProcessBook, PI DataLink and RtWebParts dd-mmm-yy HH:mm:ss.00000 dd Day mmm Month (Jan, Feb, Mar, Apr, May, …) yy Year HH Hours in 24 hour format mm Minutes ss Seconds 00000 Milliseconds Example: 18-feb-05 10:43:29.323 All rights reserved, OSIsoft Inc. © 2008
39
PI ProcessBook, PI DataLink and RtWebParts
Absolute Time PI ProcessBook, PI DataLink and RtWebParts dd-mmm-yy HH:mm:ss "Date" fields default to the current date "Time" fields default to 00. Expression Meaning 25 00:00:00 on the 25th of the current month 25-Aug-03 00:00:00 on that date 8: 08:00:00 on the current date 25 8 08:00:00 on the 25th of the current month 21:30:01.02 9:30: PM on the current date All rights reserved, OSIsoft Inc. © 2008
40
Absolute Time – Other Formats
PI ProcessBook, PI DataLink and RtWebParts Absolute time formats Symbol Meaning * Current time t 00:00:00 on the current day (TODAY) y 00:00:00 on the previous day (YESTERDAY) Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. Sunday 00:00:00 on the most recent of that day of the week Time Syntax Examples of time usage: 1. To build a trend report or a trend representing the whole of yesterday. Start time: y (midnight yesterday morning) End time: t (midnight this morning) 2. To build a report or a trend from the beginning of the month until now: Start time: 1 (first day of the current month at midnight) End time: * (now) Notes: the time range of such a trend will vary from 1 second to 31 days. All rights reserved, OSIsoft Inc. © 2008
41
PI ProcessBook, PI DataLink and RtWebParts
Relative Time PI ProcessBook, PI DataLink and RtWebParts Number of: Hours (h) Minutes (m) Seconds (s) Leading sign (+ or -) is required. No default time unit: must specify d, h, m, s, w, mo, or y Can use fractions only for Hours, Minutes and Seconds +2.5h, -0.5m Relative time is most often part of a Combined time Weeks (w) Days (d) Years (y) Months (mo) Syntax Meaning +2d + two days -1.5h - One hour and a half +32m + 32 minutes -15 s - 15 seconds All rights reserved, OSIsoft Inc. © 2008
42
PI ProcessBook, PI DataLink and RtWebParts
Combined Formats PI ProcessBook, PI DataLink and RtWebParts Uses both an absolute and a relative time The absolute part of the time can be *, T, Y, or a day of the week Syntax Meaning *-8h 8 hours ago T-7d 00:00:00, 7 days ago Y+11h Yesterday at 11:00:00 AM Monday h 02:30:00 PM on the most recent Monday All rights reserved, OSIsoft Inc. © 2008
43
PI ProcessBook, PI DataLink and RtWebParts
Directed Exercise PI ProcessBook, PI DataLink and RtWebParts PI Time Express the following timestamps using the absolute time format: Tuesday-2d 1 6: y+8h *-30m Express the following times in valid PI timestamps: Today at 6:00 AM The 4th of the current month at 16:00 12 hours ago Correct answers are provided by the trainer. PI Time All rights reserved, OSIsoft Inc. © 2008
44
Group Recap Question (optional)
PI ProcessBook, PI DataLink and RtWebParts What are the two filtering tests that each event that is read on the data source can go through before being archived in the PI Server? Which of the following are invalid PI times? a d. y-1y b : e. *-Monday c. t-1.5d f. 09-Jun-06 22:45: 3. c (fractional intervals are only supported for hours, minutes and seconds) and e (invalid offset format) 2. The exception test (on the data acquisition node) and the compression test (on the PI server) 1. The Server, The Analytics and The Visuals Answers: All rights reserved, OSIsoft Inc. © 2008
45
PI ProcessBook, PI DataLink and RtWebParts
2.0 Common Dialog Windows Common Dialog Windows OSIsoft’s programs use two different sets of dialog windows; those fomerly used in client tools and System Management Tools (i.e. ProcessBook 2.x, HealthCheck), and the newer ones found in PI System Management Tools (PI SMT) and versions 3.x and higher of the client tools. These sets include the following windows: Connections Tag Search Tag Information All rights reserved, OSIsoft Inc. © 2008
46
PI Connection Manager Viewing Connection Information
PI ProcessBook, PI DataLink and RtWebParts Use the check boxes to connect / disconnect from the available PI servers PI Server Connections The PI Connection Manager dialog box is used to manage server connections. To connect to a server, click on the check box next to the server name. To add a server to the list, click on Server > Add Server… item. The added server will now appear in the connection manager. Connection settings Connection information All rights reserved, OSIsoft Inc. © 2008
47
PI Connection Manager Editing Connection Settings
PI ProcessBook, PI DataLink and RtWebParts The connection settings can de edited Click the Save button to apply the changes To change the default PI server, select Tools > Options All rights reserved, OSIsoft Inc. © 2008
48
PI Connection Manager Adding a New Connection
PI ProcessBook, PI DataLink and RtWebParts To add a new PI server connection, select Server > Add Server Network Path: either PI Server IP address or Hostname Default User Name: PI user used to connect Password: password if PI user is password protected Confirm: validates the connection at creation time Connection Type: PI 3 or PI 2 server Port Number: 5450 for a PI 3 Server or 545 for a PI 2 Server All rights reserved, OSIsoft Inc. © 2008
49
PI Connection Manager Changing Passwords
PI ProcessBook, PI DataLink and RtWebParts A PI user can change is own password from the PI Connection Manager Select Tools > Change Password All rights reserved, OSIsoft Inc. © 2008
50
PI ProcessBook, PI DataLink and RtWebParts
Directed Exercise PI ProcessBook, PI DataLink and RtWebParts Connecting to PI: Learn about connecting to PI with the PI SDK Discover the IP address and computer name of your PI Server Right click on My Computer from the desktop (or menus) and select Properties on the second tab, and locate Computer Name. Find the name of your computer and write it down. Select Run from the Start Menu and enter CMD to get a prompt and enter IPCONFIG. This should display your TCP/IP address – XXX.XXX.XXX.XXX. Write it down too. Exchange this information with a neighbor – getting their IP address and computer name. From the command prompt, enter: PING <your neighbor’s IP address>. From the command prompt, enter: NSLOOKUP <neighbor’s computer name>. Using About PI SDK.exe found under .\program files\pipc\pisdk or from the PI SMT console, select Connections > Add server. Add your neighbor’s PI server by entering their computer name with a default user of PIDemo. Connect to this PI server as PI User PIDemo. All rights reserved, OSIsoft Inc. © 2008
51
Tag Search Window – Basic Search
PI ProcessBook, PI DataLink and RtWebParts Select PI Server(s) to search through Tag name mask Look for a specific point type/class/source Look for a specific value/status/attribute Tag Search Window – Basic Search Use any or all of the following criteria to locate the tag: PI Server: Select the name of the PI Server on which you want to search for the tag from. Tag Mask: Enter the name of the tag. You can use wildcard characters to help with the search: * represents any number of characters and ? represents one character. For example, B* in the Tag Mask text box locates all the tags whose name begins with B. Descriptor. Enter the description of the tag. This field is not case-sensitive, and wildcards as described above are valid. Point Type. To narrow a search to only Float tags, Int16 tags, String tags, etc. Point Source. Enter the one character code which associates a tag with an interface or PI module. The code is not case-sensitive. Use * to represent any point source. Point Class. Narrow the search to include only points of a certain class (classic, SQC_alarm, etc). Use * to search through all. Engineering Units. Narrow the search to points with a certain engineering unit mask. Use * to represent any engineering units. For example to find all the points with units representing a rate, we might enter */* here. Value/Status/Point Attribute... Only one of these may be specified at once. Value is the current reading for a tag. Use * to represent any value. Status allows the specification of a certain system digital state for a tag (use the ‘…’ button to look through the system digital state set.) One useful example of this would be to search bu Status = Pt Created (state no. 253) to see all points which have not received values since their creation. Searching by Point Attribute allows the specification of any of the point attributes in the search, for example all the points for which compressing=0. The above field specifications may be combined (but only one of Value, Status and Point Attribute may be selected) Tag search results Start searching according to the criteria Display the attributes/values for selected tags Validate selection All rights reserved, OSIsoft Inc. © 2008
52
PI ProcessBook, PI DataLink and RtWebParts
Tag Search Strategies PI ProcessBook, PI DataLink and RtWebParts Tag Search using wildcards: Use * to replace any number of characters Example: flow* = flow_meter1, flow_meter2, flow_meter3 Use ? to replace one character Example: tank?_level = tankA_level, tankB_level Note 1: Search criteria are not case sensitive Note 2: Search criteria can be combined Example: Look for Tag Mask = flow* and Point Source = o You can use more than one asterisk in a search mask. Please not that the description search – unassisted by a tag search mask – will take significant time. This is not an efficient search in many cases unless it works with other search masks. The searches are character matching – not word matching – so *OIL* will also match COIL and BOILER – and *TI* in the tag mask search will yield both 1U:TI467.PV and 34:RUNTIME Refine your searches until you get less than about 80 responses – then you can scan the results window (with the scroll bar) and find your tag(s). With the PI-SDK standard tag search – you can make advanced tag searches with SQL queries and you can save your searches as “favorites” All rights reserved, OSIsoft Inc. © 2008
53
Tag Search Window – Advanced Search
PI ProcessBook, PI DataLink and RtWebParts SQL-like query based on user-defined conditions 1- Define condition 2- Click 'Add' … 3- Click 'Search Tag Search Window – Advanced Search Advanced Tag Search allows almost limitless flexibility for tag searches. You can set and combine very specific criteria on the properties, history, and even behavior of the points you wish to find. For the Advanced search, the user constructs his or her own SQL query. There is no guarantee that the query will be syntactically correct. However, the search criteria are much more flexible than with the Simple search. Any point attribute from Point Class Classic can be used to restrict the search and there are various methods to search by value. Example SQL queries are shipped with the PI Tag Search Dialog. These queries can be viewed by clicking on the Favorites button and browsing to the desired example under the Examples folder. Examples: To search for all PI Points that have archiving OFF (0), the following text should appear in the where clause field: PIpoint.Archiving = 0 To search for all digital points, use: PIpoint.PointType = 'D' To search for all real, integer, or string points, one would replace the 'D' with 'R', 'I', or 'S', respectively. To find all integer points that have a snapshot value of 1, use: PIpoint.PointType = 'I' AND PIcomp.Status = 1 AND PIpoint.Tag = PIcomp.Tag AND PIcomp.Time = DATE("*") All rights reserved, OSIsoft Inc. © 2008
54
Tag Search Window – Alias Search
PI ProcessBook, PI DataLink and RtWebParts Search through aliases in the PI ModuleDB (described later) Tag Search Window – Alias Search For facilities that have organized data into modules, this is a great way to search for that unknown tag name that corresponds to the more familiar Module/Alias structure. The Alias Search criteria include the following: Search Context; Module Mask; Alias Mask; Heading Set Mask; Heading Mask. The Search Context is a path to a PI Server or PI Module. For example, the following are valid search contexts as long as Localhost is in the Known Servers Table and as long as Reactor1 is a PIModule in Localhost. \\localhost; \\localhost\Reactor1. If \\localhost\Reactor1 is used as the search context, then Reactor1 and all sub PIModules to Reactor1 will be searched for PIAliases when the Search button is pressed. The wildcard characters * and ? can be used in any of the mask fields. The asterisk (*) is a multi-character wildcard and the question mark (?) is a single-character wildcard. For example, using "Temp*" as an Alias Mask will return all PIAliases in the Search Context that start with "Temp". The masks are always case insensitive. Using "Tem?" as an Alias Mask will return all PIAliases in the Search Context that start with "Tem" and end with any other character. All rights reserved, OSIsoft Inc. © 2008
55
Tag Information Windows
PI ProcessBook, PI DataLink and RtWebParts Pt. Attr... Pt. Values... What are Point Attributes? All of the information that is required to gather data from a particular data source is stored within the context of a PI point by means of point attributes. Certain point attributes can be used to store numeric information such as integers and floating-point numbers, and other attributes can be used to store character string information, such as the name (or tag) of the point. For example, if a measurement needs to be read from a particular device in a network, the IP address needs to be stored in one of the point attributes. All rights reserved, OSIsoft Inc. © 2008
56
Directed Exercise – Searching for tags
PI ProcessBook, PI DataLink and RtWebParts Tag Mask: BA* Tag Mask: *158* Descriptor: *end* Advanced Search: PIpoint.Span > 100 AND PIpoint.CompDevPercent > 1 Save this search as a favorite. All rights reserved, OSIsoft Inc. © 2008
57
Group Recap Question (optional)
PI ProcessBook, PI DataLink and RtWebParts What information needs to be specified when creating a new connection to a PI server? What are the two wildcard characters available in a tag search? 3. c and f 2. * (any number of characters) and ? (single character) 1. The PI server name (hostname or IP address), the connection type (PI3 or PI2), the default user name and the port number (5450 for a PI3 connection and 545 for a PI2 connection) Answers: All rights reserved, OSIsoft Inc. © 2008
58
PI ProcessBook, PI DataLink and RtWebParts
All rights reserved, OSIsoft Inc. © 2008
59
PI ProcessBook, PI DataLink and RtWebParts
Objectives Learn how to effectively use PI DataLink in MS Excel Be able to retrieve current and archived values Be able to retrieve sampled values from the archive Learn how to retrieve calculated values Learn how to retrieve PI expressions values Learn how to filter the results Learn how to use the trend element All rights reserved, OSIsoft Inc. © 2008
60
PI ProcessBook, PI DataLink and RtWebParts
What is PI DataLink ? PI ProcessBook, PI DataLink and RtWebParts PI DataLink is an OSIsoft Add-In for Microsoft Excel (and Lotus 1-2-3) This Add-In lets you import data from the PI System into a spreadsheet for further analysis PI DataLink OSIsoft's PI DataLink provides a link between the PI Server and spreadsheet programs running on Microsoft Windows platforms. With PI DataLink, a user running Microsoft Excel or Lotus can exchange information directly with the PI System databases. This feature, combined with the functionality of the spreadsheet programs themselves, make PI DataLink a powerful and easy-to-use tool for gathering, analyzing, and reporting PI data. All rights reserved, OSIsoft Inc. © 2008
61
PI ProcessBook, PI DataLink and RtWebParts
PI DataLink Menu PI ProcessBook, PI DataLink and RtWebParts 1 2 3 4 5 6 7 8 1. Functions that retrieve a single value 2. Functions that retrieve series of values 3. Functions that retrieve calculated values 4. Trend display tool, Tag search and connections 5. Alternate tag identification methods 6. Module Database related methods 7. Settings and help 8. Notification search Overview The PI DataLink add-in for Excel provides users of Microsoft Excel with the ability to retrieve data associated with tags on a PI server, directly into a spreadsheet. Moreover, users have the ability to write spreadsheet values back into PI. PI DataLink provides the following functions to retrieve data from PI: Current value; Value at a specific time; Tag attributes; Evenly spaced (sampled) data; Sampled data while a given expression is true.; Compressed (archived) data.; Compressed data while a given expression is true; Sampled data for a user specified array of timestamps; Data from calculations on PI tag expressions; Amount of time while a PI tag expression was true; Totals, minima, maxima, standard deviations, ranges, averages, counts, and means for PI tags and PI expressions; Tag name from a specified Point ID; Alias value from module database; Property value from module database; Notifications. All rights reserved, OSIsoft Inc. © 2008
62
PI DataLink Menu with Excel 2003
PI ProcessBook, PI DataLink and RtWebParts Function to retrieve notifications Functions that retrieve a single value Functions that retrieve series of values Functions that retrieve calculated values Alternate tag identification methods Trend display tool Users of Excel 2003 The PI DataLink add-in for Excel still work with Microsoft Excel It offers a new functionality regarding the notification search. Tag search, connections, settings and help All rights reserved, OSIsoft Inc. © 2008
63
PI ProcessBook, PI DataLink and RtWebParts
PI DataLink Settings PI ProcessBook, PI DataLink and RtWebParts 1. Determines how tags selected in the Tag Search dialog window are copied on the spreadsheet: Columns or Rows 2. Determines if the PI server's name is copied automatically in PI DataLink dialog boxes 3. Determines which time zone PI DataLink interprets time from (PI server vs client station) 4. Option to Display #N/A instead of blanks when there are more cells than data to fill them 5. Option to ignore locale settings on the operating system when parsing timestamps 6. Determines the number format for PI DataLink results 7. Determines the date/time format for PI DataLink results 1 2 3 4 5 6 7 Settings Dialog Box This dialog box controls your settings and preferences for PI DataLink. The set of radio buttons In a row or In a column determines whether the selected tags in the TagSearch dialog box are copied to the spreadsheet along a row or a column. The Copy PIServer name check box determines whether the PI Server's name is copied into the PIServer edit field if TagSearch is called from a PI dialog box. This option also determines whether the server names are copied into the spreadsheet for selected tags if TagSearch is called directly from the PI menu. The Use PIServer Time Zone check box determines whether or not all the PI DataLink functions interpret time using the PI server time zone instead of the client machine time zone information. This option affects systems where the PI 3 Server machine has different time zone settings than the client machine. The Display #N/A instead of Blanks check box determines whether or not "#N/A" or blanks are displayed when there is less data than the size of the DataLink function array. Select this check box when the DataLink function results are plotted by the Excel charting package. The Locale Independent check box determines whether localized time strings should be used when parsing time data. Select this check box to force PI DataLink to parse the time string according to PI time format rules. This defines the date-time order as dd-MMM-yyyy hh:mm:ss, and the language of any strings as English. Clear this check box to enable PI DataLink to parse the time string according to your local regional settings, including date-time format preferences. If locale- specific parsing fails, PI DataLink will attempt to parse according to PI time format rules. If you want to get the milliseconds automatically use this string: dd-MMM-yyyy hh:mm:ss.000 The Number format edit box lets you specify a default number formatting code. This string may be any valid code from the Format, Cells, Number list. The Time format edit box lets you specify a default time formatting code. This string may be any valid code from the Format, Cells, Number list. PI DataLink used with MS Excel is rounding timestamp to the millisecond unit. All rights reserved, OSIsoft Inc. © 2008
64
PI ProcessBook, PI DataLink and PI WebParts
DataLink Settings PI ProcessBook, PI DataLink and PI WebParts 1 2 4 3 All rights reserved, OSIsoft Inc. © 2009
65
PI ProcessBook, PI DataLink and RtWebParts
Help on functions PI ProcessBook, PI DataLink and RtWebParts Hovering the mouse over a specific function make the description appears below the ribbon. To get help from the documentation, click on the function icon and press F1 on the keyboard. All rights reserved, OSIsoft Inc. © 2008
66
PI ProcessBook, PI DataLink and RtWebParts
Preset functions PI ProcessBook, PI DataLink and RtWebParts Every function in the ribbon with a triangle pointing downward gives you preset functions These preset functions have the time related fields already filled for you or location of data Click on the desired options to use them Preset functions The PI DataLink add-in for Excel provides preset functions to save time for most common type of data query. At least a preset function exist for these PI DataLink functions: Archive Value; Compressed Data Sampled Data; Timed Data Time Filtered; Tag Search; Module Browse. All rights reserved, OSIsoft Inc. © 2008
67
PI ProcessBook, PI DataLink and RtWebParts
Current Value PI ProcessBook, PI DataLink and RtWebParts Function: PICurrVal Retrieves the current value for a tag Arguments PI Server name or cell reference Tag name or cell reference(s) to a list of tags Output Cell Display the timestamp 1 2 3 4 All rights reserved, OSIsoft Inc. © 2008
68
PI ProcessBook, PI DataLink and RtWebParts
Archive Value PI ProcessBook, PI DataLink and RtWebParts Function: PIArcVal Retrieves a single value from the PI archive for a specified time stamp Arguments Tag or Expression data retrieval PI Server name or cell reference Tag name or cell reference(s) to a list of tags Time when to retrieve the data How data are retrieved Output Cell Display the timestamp 1 2 3 4 5 6 7 All rights reserved, OSIsoft Inc. © 2008
69
PI ProcessBook, PI DataLink and RtWebParts
Archive Value PI ProcessBook, PI DataLink and RtWebParts Retrieval Mode Retrieves a value from the PI archive for a specified time All rights reserved, OSIsoft Inc. © 2008
70
PI ProcessBook, PI DataLink and RtWebParts
Archive Value PI ProcessBook, PI DataLink and RtWebParts Retrieval Mode • Previous - retrieves the value exactly matching or preceding the specified timestamp. • Previous only - retrieves the value preceding the specified timestamp. • Interpolated - interpolates the value at the specified time. • Auto - retrieves the value exactly matching or interpolates the value at the specified time. • Next - retrieves the value exactly matching or following the specified timestamp. • Next Only - retrieves the value following the specified timestamp. • Exact Time - retrieves only a value exactly matching the timestamp, or returns No events found if no value exists. All rights reserved, OSIsoft Inc. © 2008
71
PI ProcessBook, PI DataLink and RtWebParts
Interpolated Values PI ProcessBook, PI DataLink and RtWebParts 3.5 3 2.5 2 Values 1.5 1 0.5 Interpolated Values In many cases, a value is retrieved for a specific timestamp in a PI DataLink function. However, in some case there will be no value for the specific timestamp in the PI system archive; the value will be interpolated linearly between the last and the next archived events. 1 2 3 4 5 Time All rights reserved, OSIsoft Inc. © 2008
72
PI ProcessBook, PI DataLink and RtWebParts
Tag Attributes PI ProcessBook, PI DataLink and RtWebParts Function: PITagAtt Retrieves an attribute associated with a tag Arguments PI Server name or cell reference Tag name or cell reference(s) to a list of tags Attribute Output Cell 1 2 3 4 All rights reserved, OSIsoft Inc. © 2008
73
PI ProcessBook, PI DataLink and RtWebParts
Update a Spreadsheet PI ProcessBook, PI DataLink and RtWebParts Pressing F9 key does Recalculates Excel dynamic time functions Recalculates Current Value function Recalculates other PI DataLink functions based on these functions Pressing CTRL+SHIFT+ALT+F9 simultaneously does Everything that F9 does Recalculates other PI DataLink functions based on relative PI time (i.e. ‘Monday', '*', '*-3h') Best practice to build your spreadsheet Use references to cells for the Tag Name, Start Time and End Time Use references to cells containing dynamic Excel time functions =NOW() and =TODAY() =PICURRVAL() Refreshing PI Data in a Spreadsheet There are two ways to refresh the data on a spreadsheet. One way is to right-click on any part of the array and select the Recalculate (Resize) function. This method works best if you have a variable size array where the number of values returned could be different depending on what range of values retrieved. If there are less values, there is no problem. However, if more values are retrieved, those values will not show unless the Recalculate function is selected. The second way is to make a change to the arguments passed to the PI DataLink functions. Because PI DataLink retrieves data from the PI Server via functions, values on the spreadsheet update only when a function argument changes. Pressing F9 in Excel does not force PI DataLink functions to get new data from the PI server. The only exception is the Current value function, which updates whenever Excel recalculates. Notes: the F9 and CTRL+SHIFT+ALT+F9 functions apply to all spreadsheets of all open workbooks. All rights reserved, OSIsoft Inc. © 2008
74
Refreshing Your Queries
PI ProcessBook, PI DataLink and PI WebParts All rights reserved, OSIsoft Inc. © 2009
75
Dynamic Time Functions in Excel
PI ProcessBook, PI DataLink and RtWebParts Function: =TODAY() Returns today’s date at 00:00:00 Example: =Today() – 1 signifies yesterday at 00:00:00 Function: =NOW() Returns the current time and date Example: =Now() - 3/24 signifies 3 hours ago Dynamic Time Functions in Excel The best way to create a spreadsheet that updates with minimal user interaction is to use MS Excel dynamic date functions like NOW() or TODAY() to build a time stamp, e.g. use (TODAY() + 8/24) for 8am today. Then refer to this cell in the start time or end time argument of the PI DataLink query. Whenever MS Excel recalculates (due to the user pressing F9 or changing any cells in the spreadsheet), the dynamic time functions will be updated by MS Excel, causing the PI DataLink function to run. Note that the value of the time stamp does not have to change in order for MS Excel to trigger the PI DataLink function. As long as an Excel dynamic time function is used to construct the time stamp and this time stamp is used in the PI DataLink argument, MS Excel will trigger the PI DataLink function when the spreadsheet recalculates. Notes: Date functions in Excel are in units per day. Notes: These functions are in units per day All rights reserved, OSIsoft Inc. © 2008
76
PI ProcessBook, PI DataLink and RtWebParts
Directed Exercise PI ProcessBook, PI DataLink and RtWebParts Open the PI and Excel time.xls spreadsheet located on the CD Fill the table converting the desired times with PI and Excel time abbreviations All rights reserved, OSIsoft Inc. © 2008
77
PI ProcessBook, PI DataLink and RtWebParts
Exercise DL1 PI ProcessBook, PI DataLink and RtWebParts Activity Report Objective: Learn to extract a single value from a PI Database using the following functions: Current value function Archive value function Tag attributes function All rights reserved, OSIsoft Inc. © 2008
78
Archived vs. Sampled Values
PI ProcessBook, PI DataLink and RtWebParts Archived: Values stored in the PI archive Sampled: Values evenly spaced in time. These values are interpolated from the archived values. Archived vs. Sampled Data It is often preferable to use Archived Data instead of Sampled Data, since Archived Data are the real values stored in the PI archives and therefore are the values that represent each point most accurately. Sampled Data are for the most part interpolated and therefore may in some cases hide important process fluctuations. All rights reserved, OSIsoft Inc. © 2008
79
Compressed data (start time/end time)
PI ProcessBook, PI DataLink and RtWebParts Function: PICompDat Retrieves compressed data from the archive based on a start time and an end time Arguments Search for a time range PI Server name or cell reference Tag name or cell reference(s) to a list of tags Date/Time to begin extraction to Date/Time to end; data can be returned in reverse order Filter Show or hide the filtered data zone How to treat data at the beginning and end of the time range Output Cell Display count, timestamps, quality bits and annotations Vertical or horizontal result 1 2 3 4 5 6 7 8 Compressed Data (Times) Dialog Box This dialog box returns compressed values from the data archive based on a start time and an end time. The number of data points retrieved for the given time period can be returned in the first cell. If a filter expression is not specified, the PICompDat() function is called. Otherwise, the PICompFilDat() function is called. Syntax: =PICompDat (tagname, stime, etime, outcode, PIServer, boundarytype) Select Hide count if you do not want to display the amount of data events retrieved from the archive. Select Show bits if you want to show the extended status bits associated with the returned events. Select Show annotations if you want to show the annotations associated with the returned events. Example The following retrieves compressed data points and corresponding time stamps for the tag CDF144 starting from 1:00 a.m. to 3:00 a.m. this morning from the default PI Server with inside as boundary type: =PICompDat("cdf144","1:00","3:00",1,,"inside") 9 10 All rights reserved, OSIsoft Inc. © 2008
80
Calculation Boundary Types
PI ProcessBook, PI DataLink and RtWebParts Inside (default): Returns values at start and end times, if they exist, or the nearest values occurring within the range. • Outside: Returns the closest values occurring immediately outside the range. • Interpolated: Returns interpolated values at start and end times. • Auto: Interpolated, but using Inside behavior for tags with step attributes set on Windows-based PI Servers. There are 4 boundary types: Inside (default) – Returns data points at and between start time and end time; Outside – Returns data points between start time and end time including a data point at or prior to start time and a data point at or prior to end time; Interpolated – Returns data points between start time and end time including a data point interpolated at start time and a data point interpolated at end time; Auto – Same as interpolated except if resolution code 4 tags on PI 2 Server or Step attribute is set on PI 3 Server, behavior follows that of Inside. All rights reserved, OSIsoft Inc. © 2008
81
Calculation Boundary Types
PI ProcessBook, PI DataLink and RtWebParts C D A F (interpolation) G (interpolation) B E Start End Time Time There are 4 boundary types: Inside (default) – Returns data points at and between start time and end time; Outside – Returns data points between start time and end time including a data point at or prior to start time and a data point at or prior to end time; Interpolated – Returns data points between start time and end time including a data point interpolated at start time and a data point interpolated at end time; Auto – Same as interpolated except if resolution code 4 tags on PI 2 Server or Step attribute is set on PI 3 Server, behavior follows that of Inside. Inside (B,C,D) Outside (A,B,C,D,E) Interpolated (F,B,C,D,G) All rights reserved, OSIsoft Inc. © 2008
82
Compressed Data (start time/number)
PI ProcessBook, PI DataLink and RtWebParts Function: PINCompDat Retrieves compressed data from the archive based on a start time and a number of values to be returned Arguments Search for a number of value PI Server name or cell reference Tag name or cell reference(s) to a list of tags Date/Time to begin extraction to Date/Time with a number of values; data can be returned in reverse order Filter Show or hide the filtered data zone How to treat data at the beginning and end of the time range Output Cell Display timestamps, quality bits and annotations Vertical or horizontal result 1 2 3 4 5 6 7 8 Compressed Data (Number) Dialog Box This dialog box returns compressed values from the PI Server based on a start time and a specified number of data points. If a filter expression is not specified, the PINCompDat() function is called. Otherwise, the PINCompFilDat() function is called. This dialog box returns empty strings when there is a smaller number of values than the number which you specified. For example, if you wish to retrieve 400 values starting from midnight today and there are only 356 values (including filtered events), the final 44 cells have blank strings in them. Check the Backwards in time checkbox if you want to gather data from the archive going backwards from the time that was entered in Start time. The 4 boundary types detailed in the page for Compressed Data (start time/end time) are the same: inside, outside, interpolated and auto. Syntax: =PINCompDat(tagname, stime, numvals, outcode, PIServer, boundarytype) Example The following retrieves 10 compressed data points and corresponding time stamps for the tag CDF144 starting from 1:00 a.m. this morning: =PINCompData("cdf144","1:00",10,1,A5,"inside") 9 10 All rights reserved, OSIsoft Inc. © 2008
83
PI ProcessBook, PI DataLink and RtWebParts
Quality Flags PI ProcessBook, PI DataLink and RtWebParts Some applications allow reading or writing of additional information such as the quality or the status of a specific value (questionable, substituted) These bits can be shown in a separate column, beside the value itself Consult interface-specific documentation to determine if they support this functionality The PI Server allows addition of annotations on archived values This information can be shown with the show annotations option They will be in another column beside the other(s) Quality Bits The following three digital flags are available in PI for Windows NT and UNIX. If any of the three are set, they indicate that the data value is valid, but the status of the data value is not normal. Annotated indicates that there is a comment about a value that is available elsewhere; Substituted indicates that the value has been changed from its original value. This value is set only by the PI Archive Subsystem when an existing value is changed; Questionable indicates that there is some reason to doubt the accuracy of the value. This is the only flag freely available to interface programs. All rights reserved, OSIsoft Inc. © 2008
84
PI ProcessBook, PI DataLink and RtWebParts
Sampled Data PI ProcessBook, PI DataLink and RtWebParts Function: PISampDat Retrieves evenly spaced interpolated values from the archive Arguments Tag or Expression data retrieval PI Server name or cell reference Tag name or cell reference(s) to a list of tags Date/Time to begin interpolation with evenly time space data and Date/Time to end Filter Show or hide the filtered data zone Output Cell Display timestamps Vertical or horizontal result 1 2 3 4 5 6 7 8 9 All rights reserved, OSIsoft Inc. © 2008
85
PI ProcessBook, PI DataLink and RtWebParts
Resize the array PI ProcessBook, PI DataLink and RtWebParts If the array has not been resized to show all values, the last row of data will contain this message: Resize to show all values All rights reserved, OSIsoft Inc. © 2008
86
PI ProcessBook, PI DataLink and RtWebParts
To Edit an Array PI ProcessBook, PI DataLink and RtWebParts Three options are available: Manually: Select the new cell range for the array Press F2 Press CTRL+SHIFT+ENTER simultaneously Via the dialog window: Right-click on a cell in the array Select the name of the function in the contextual menu Do the modifications in the dialog window Click on OK For functions that need to be resized: Select the Recalculate (Resize) PIDL formula option Editing an array All of PI DataLink functions, except PITagAtt(), PIPutVal(), and PIPutValX(), return array values. This being the case, you must first select the appropriate array output range. Next, enter the PI function and its arguments into MS Excel's formula bar. Finally, place the PI function into the cells with the CTRL+SHIFT+ENTER combination of keystrokes. See the MS Excel User's Guide for more information on array functions. Also, note that MS Excel function wizard will only insert function into one cell on the spreadsheet. Therefore, it may not be appropriate to use the function wizard to enter PI functions into MS Excel. All rights reserved, OSIsoft Inc. © 2008
87
PI ProcessBook, PI DataLink and PI WebParts
How to Resize an Array PI ProcessBook, PI DataLink and PI WebParts All rights reserved, OSIsoft Inc. © 2009
88
PI ProcessBook, PI DataLink and RtWebParts
Array Values PI ProcessBook, PI DataLink and RtWebParts Use this PI DataLink setting to output #N/A in the cells of a PI DataLink array not containing any data All rights reserved, OSIsoft Inc. © 2008
89
PI ProcessBook, PI DataLink and RtWebParts
Exercise DL2 PI ProcessBook, PI DataLink and RtWebParts Operational Start Up Objective: Learn to retrieve process data using the Compressed Data function All rights reserved, OSIsoft Inc. © 2008
90
PI ProcessBook, PI DataLink and RtWebParts
Timed Data PI ProcessBook, PI DataLink and RtWebParts Function: PITimeDat Retrieves sampled data synchronized with an array of time values Arguments Tag or Expression data retrieval PI Server name or cell reference Tag name or cell reference(s) to a list of tags Time when to retrieve the data; it must use reference cells only How data are retrieved Output Cell 1 2 3 4 5 6 All rights reserved, OSIsoft Inc. © 2008
91
PI ProcessBook, PI DataLink and RtWebParts
Calculated Data PI ProcessBook, PI DataLink and RtWebParts Function: PICalcDat Retrieves a calculated value for a given tag, in a specified time interval. Calculations allowed are: total, minimum, maximum, standard deviation, range, count, average and mean Arguments Tag or Expression data retrieval PI Server name or cell reference Tag name or cell reference(s) to a list of tags Date/Time to begin calculation to Date/Time to end 1 2 3 4 Calculated Data Dialog Box This dialog box returns a single calculated value or evenly spaced calculated values from the PI Server. Calculation modes are: Total (time-weighted), Minimum, Maximum, Standard deviation (time-weighted), Range, Average (time weighted), Mean (non-time-weighted). To retrieve a single calculated value, do not specify an interval and the PICalcVal() function is used. To retrieve evenly spaced calculated data, the specified interval determines the spacing of the calculation and the PICalcDat() function is used. Check show pctgood if you want PI DataLink to display the percentage of the time range that contains good value. We recommend that you always look at the percent good value before using the calculation result. The percent good value is normally returned to the right of calculated value cell. Conversion factor should be a multiplicative factor and set to 1 for Minimum, Maximum, Standard deviation (time-weighted), Range, Average (time weighted), Mean (non-time-weighted). See next page for more details. Timestamp(s) are returned when the calculation mode is Minimum, Maximum, or Range. Example: The following calculates a time-weighted total for the tag CDF144 from yesterday to today from the default PI Server: =PICalcVal("cdf144","y","t","total",1440,4,) The result is multiplied by The percent good is returned next to the total. All rights reserved, OSIsoft Inc. © 2008
92
PI ProcessBook, PI DataLink and RtWebParts
Calculated Data PI ProcessBook, PI DataLink and RtWebParts Arguments… Sub-interval calculation Filter Conversion Factor Type of calculation Weighting How expression is evaluated Sampling frequency Minimum % of good value needed Output Cell Display time, minimum or maximum timestamp inside the interval Display % of good value Vertical or horizontal result 9 10 11 12 13 14 5 15 6 16 7 8 All rights reserved, OSIsoft Inc. © 2008
93
The Three Rules of Performance Equations
PI ProcessBook, PI DataLink and PI WebParts Numbers and operators are written as is. Tag names and timestamps are written in single quotes: 'CDT158' Strings are written in double quotes: "This is a string" All rights reserved, OSIsoft Inc. © 2009
94
Performance Equation Functions
PI ProcessBook, PI DataLink and PI WebParts % of time tag has good values PctGood() Range of min to max Range() Time-weighted standard deviation StDev() Time-weighted average TagAvg() Event-weighted average TagMean() Maximum value in period TagMax() Minimum value in period TagMin () Time integral over a period TagTot() All rights reserved, OSIsoft Inc. © 2009
95
What is a Conversion Factor?
PI ProcessBook, PI DataLink and RtWebParts Used with PI DataLink, in the Calculated Data function A multiplier used to change a number from one unit of measure to another Ex: 1000 g/kg, 2.54 cm/inch, 24 hours/day, 1440 minutes/day When using the Total function in Calculated Data, it is used to correct PI’s assumption that the data is in units per day Is equal to 1.0 when source data is in units/day Conversion Factor The conversion factor is most often used when the calculation mode is Total and time engineering units of the PI tag being totalized (rate tag) is not the same as the server default of units/day. Example: For a flow measured in m³/min, a conversion factor of 1440 must be supplied. This is because the PI server assumes all inputs to totalizations are expressed in units per day, and 1440 represents the conversion between the actual rate tag (units per minute) and the rate that PI assumes (units per day). This is independent of the interval of the proposed totalization. For example, the conversion factor of an 8 hour totalization of a rate tag measured in units/min is still 1440. Computing Totals When the calculation mode is Total and part of the archived data within the range are bad, the reported value is equal to the calculated total value divided by the fraction of the time period with good archived data. This data normalization is equivalent to the assumption that for the bad data time range, the tag value takes on the average value of the entire range. However, this assumption may not be valid when a large fraction of the time range contains bad data. Therefore, we recommend that you always look at the percent good value before using the calculation result. All rights reserved, OSIsoft Inc. © 2008
96
PI ProcessBook, PI DataLink and RtWebParts
Conversion Factors PI ProcessBook, PI DataLink and RtWebParts It is important to supply the correct conversion factor when calculating TOTALS with PI because PI assumes the engineering units of a rate tag is units per day. Example: For a flow measured in m³/h, a conversion factor of 24 must be supplied to convert between the engineering units of the rate tag and the units/day assumption of PI. By default, the PI server assumes source tag values are expressed in units per day. If a tag is measured at a rate other than units per day, a conversion factor must be supplied to convert input values and calculate totals correctly. Since a conversion factor is after all, just a simple multiplication, you can supply a conversion factor that does "double duty" by converting for both the rate and the engineering units, so for example if the rate tag is in thousands of gallons per minutes and you want the answer in gallons (not thousands of gallons) then you can use the conversion factor of 1,440,000 (which is simply 1440 * 1000). All rights reserved, OSIsoft Inc. © 2008
97
PI System Manager I – Essential Skills
Computing Totals PI System Manager I – Essential Skills Flow (GPM) 7 PI assumes this measurement to be units/day 5 3 1 1 2 3 4 5 6 7 8 9 10 11 Time (m) Normal total = (3 gpm x 3m) + (5 gpm x 2m) + (1 gpm x 3m) = 22 gallons Trapezoidal Rule in PI PI total = ((3 gallons per day x 3m x 1day/1440m) + (5 gallons per day x 2m x 1day/1440m) + (1 gallon per day x 3m x 1day/1440m)) * 1440m/1d = 22 gallons The total computed by PI must be multiplied by a factor of 1440 All rights reserved, OSIsoft Inc. © 2009
98
PI ProcessBook, PI DataLink and RtWebParts
Exercise DL3 PI ProcessBook, PI DataLink and RtWebParts Daily Production Objective: Learn to extract multiple calculated values from a PI Database using the Calculated Data function All rights reserved, OSIsoft Inc. © 2008
99
PI ProcessBook, PI DataLink and RtWebParts
Filtered Sampled Data PI ProcessBook, PI DataLink and RtWebParts Function: PISampFilDat Retrieves a series of evenly spaced interpolated values that satisfy a filter condition Arguments Filter expression using the Performance Equation syntax In this example, the filter is written to remove all values from tag <tagname> which are lesser or equal than 120 Show or hide the filtered data zone 1 Sampled Data Dialog Box This dialog box gathers evenly spaced, sampled values from the archive. If a filter expression is not specified, the PISampDat() function is called. Otherwise, the PISampFilDat() function is called. If a filter expression is specified, the specified range of compressed values are retrieved from the PI Server while a given filter expression is true. If the Mark as filtered option is selected, a Filtered status is returned for each group of values that does not satisfy the filter expression. Syntax: =PISampFilDat(tagname, stime, etime, interval, filtexp, filtcode, outcode, PIServer) Example: The following formula retrieves sampled data for SINUSOID at 11-Nov-04, 11-Nov-04 1:00AM, 11-Nov-04 2:00AM, and 11-Nov-04 3:00AM: =PISampFilDat(“sinusoid”,“11-Nov-04”,“+3h”,“1h”,A1,1,1,) Notes: Since tag names in filter expression should be enclosed with single quotes, if the filter expression begins with a tag name, you need to begin the expression with two single quotes when the filter expression is stored in a cell on the worksheet. 2 All rights reserved, OSIsoft Inc. © 2008
100
Filtered Compressed Data
PI ProcessBook, PI DataLink and RtWebParts Function: PICompFilDat or PINCompFilDat Retrieves compressed data based on a start time and an end time or an initial date/time and a number of values to be returned which also satisfy a filter condition Arguments Search for a time range or for a number of value Filter expression using the Performance Equation syntax In this example, the filter is written to remove all values from tag <another tagname> which are not equal to the digital state ON Show or hide the filtered data zone 1 2 3 Compressed Data Dialog Box This dialog box returns compressed values from the PI Server, based on a start time and an end time. The number of data points retrieved for the given time period is returned in the first cell. If the time range option is chosen and a filter expression is not specified, the PICompDat() function is called. Otherwise, the PICompFilDat() function is called. If the number of values option is chosen and a filter expression is not specified, the PINCompDat() function is called. Otherwise, the PINCompFilDat() function is called. If a filter expression is specified, the specified range of compressed values are retrieved from the PI Server while a given filter expression is true. If the Mark as filtered option is selected, a Filtered status is returned for each group of values that does not satisfy the filter expression. Syntax: =PICompFilDat(tagname, stime, etime, filtexp, filtcode, outcode, PIServer) or =PINCompFilDat(tagname, stime, numvals, filtexp, filtcode, outcode, PIServer) Example 1 The following retrieves compressed data points and the corresponding times, starting from 2:00 a.m. and ending at 10:00 a.m., for the tag CDF144 when the tag CDEP158 is greater than 380: =PICompFilDat("cdf144","2:00","10:00","'cdep158'>380",1,1,) Example 2 The following retrieves 10 compressed data points and the corresponding times, starting at 2:00 a.m., for the tag CDF144 while the tag CDEP158 is greater than 380: =PINCompFilDat("cdf144","2:00",10," 'cdep158'>380",1,1,) All rights reserved, OSIsoft Inc. © 2008
101
Conditional formatting in Excel 2007
PI ProcessBook, PI DataLink and RtWebParts New conditional formatting of Excel gives great look and a comprehensive perspective to your report Useful to compare values extracted from PI All rights reserved, OSIsoft Inc. © 2008
102
CONCATENATE Function in Excel
PI ProcessBook, PI DataLink and RtWebParts Cannot combine text and references to cells in PI DataLink dialog boxes Use the CONCATENATE function to join several text strings into one text string Up to 30 text items Items can be: Text Numbers References to cell Syntax: =CONCATENATE(text1, text2, etc…) Example: =Concatenate("my name", " is ", B2) (assuming that cell B2 contains a name) "CONCATENATE" Function in Excel You cannot nest a Cell reference inside an expression inside a PI DataLink formula. The PI DataLink program cannot follow a cell reference in an expression. So you must use the CONCATENATE function in order to build the expression, and then have PI DataLink read the expression. It is possible to join up to 30 text items using the CONCATENATE Excel function. The text items can be text strings, numbers, or single-cell references. The "&" operator can be used instead of CONCATENATE to join text items. Example =A1 & B2 & “>” & C3 All rights reserved, OSIsoft Inc. © 2008
103
PI ProcessBook, PI DataLink and RtWebParts
Exercise DL4 PI ProcessBook, PI DataLink and RtWebParts Off-Specification Production Objective: Learn to apply filters to select the values to extract from a PI Database using the following function Sampled Data All rights reserved, OSIsoft Inc. © 2008
104
Expression Calculation
PI ProcessBook, PI DataLink and RtWebParts Function: PIExpDat Retrieves data from calculations on tag expressions (via the Sampled Data dialog box) Arguments PI Server name or cell reference Expression to evaluate following the Performance Equation syntax 1 2 Expression Calculation There are a number of options available for calculating expressions that contain tags. Above is one example (the Sampled Data dialog box). Syntax: =PIExpDat(expression, stime, etime, interval, outcode, PIServer) Example The following calculates the square root of the value of the tag SINUSOID from the PI Server named THEVAX at one-hour intervals, starting from midnight yesterday to midnight today: =PIExpDat("sqr('sinusoid')","y","t","1h",1,"thevax") It also displays the timestamps. Notes: Since a tag name in a filter expression should be enclosed with single quotes, begin the expression with two single quotes when the expression is stored in a cell on the worksheet if the expression begins with a tag name. All rights reserved, OSIsoft Inc. © 2008
105
Other Expression Calculation Methods
PI ProcessBook, PI DataLink and RtWebParts Expression calculations can also be performed For one specific time in the past (Archive Value dialog box) For a specific list of timestamps (Timed Data dialog box) To obtain statistics or totals on an expression (Advanced Calculated Data dialog box) All rights reserved, OSIsoft Inc. © 2008
106
PI Calculated Data vs. PI Expression
PI ProcessBook, PI DataLink and RtWebParts PI Calculated Data - Compute the maximum of sinusoid tag over each 24 hour period for the last 168 hours (7 days) PI Expression - Compute the maximum of sinusoid tag for the most recent 8 hours, every 24 hours period for the last 168 hours (7 days) All rights reserved, OSIsoft Inc. © 2008
107
PI Calculated Data vs. PI Expression
PI ProcessBook, PI DataLink and RtWebParts PI Calculated Data *-7d * time 1day 1day 1day 1day 1day 1day 1day max max max max max max max PI Expression 1day 1day 1day 1day 1day 1day 1day time 8h 8h 8h 8h 8h 8h 8h max max max max max max max If the time interval in the PI expression was changed to 1 day, it means for TagMax(‘sinusoid’, ‘*-1d’, ‘*’) function, the results of both expressions will be identical. All rights reserved, OSIsoft Inc. © 2008
108
PI ProcessBook, PI DataLink and RtWebParts
Exercise DL5 PI ProcessBook, PI DataLink and RtWebParts Expression Calculation 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. All rights reserved, OSIsoft Inc. © 2008
109
Exercise DL6 (Optional)
PI ProcessBook, PI DataLink and RtWebParts Quality Control Report 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 DataLink report easy to use All rights reserved, OSIsoft Inc. © 2008
110
Advanced Calculated Data
PI ProcessBook, PI DataLink and RtWebParts Returns a single calculated value or evenly spaced calculated values from the PI data archive Advanced features: Filtering Expression sampling options Event-weighted or time-weighted calculations Definition of a minimum percent of good values Advanced Calculated Data Dialog Box This dialog box returns a single calculated value or evenly spaced calculated values. Calculation modes are: total, minimum, maximum, standard deviation, range, average and count. If a filter expression is specified, the requested summaries on the source point are calculated for the time ranges where the expression evaluates to true. Refer to Appendix A for more information on the filter expression syntax. To retrieve a single calculated value, do not specify an interval. To retrieve evenly spaced calculated data, the specified interval determines the spacing of the calculation. Please consult PI DataLink's online help for more details about the parameters: expression sampling modes for the filter expression; expression sampling modes for expression to be summarized; expression sampling interval; calculation basis; minimum percent good parameters. All rights reserved, OSIsoft Inc. © 2008
111
Expression Sampling Modes - Example
PI ProcessBook, PI DataLink and RtWebParts Event-weighted average between 11 PM and 12 AM for tag CDT158 with a filter expression like (‘BA:CONC.1’ + ‘BA:TEMP.1’ > 30) All rights reserved, OSIsoft Inc. © 2008
112
Expression Sampling Modes – PI Expression
PI ProcessBook, PI DataLink and RtWebParts Expression Sampling Modes For the filter expression: Pt. Compressed, Exp. Compressed, Interpolated For the expression being evaluated: Compressed, Interpolated When making a calculation on a PI expression with a filter, only one of these is available for selection. The filtering expression sampling mode follows the one chosen for the PI expression Expression Sampling Modes There are three (3) expression sampling modes for sampling the filter expression: Pt. Compressed (default) – Evaluates the filter expression at the timestamp of any compressed value of the source point; Exp. Compressed – Evaluates the filter expression at the timestamp of any compressed values of any tags in the filter expression; Interpolated – Evaluates the filter expression at evenly spaced sampling intervals. There are two (2) expression sampling modes for sampling the expression to be summarized: Compressed (default) – Evaluates the expression at the timestamp of any compressed values of any tags in the expression; Interpolated – Evaluates the expression at evenly spaced sampling intervals. All rights reserved, OSIsoft Inc. © 2008
113
Expression Sampling Modes – Point Compressed
PI ProcessBook, PI DataLink and RtWebParts Evaluates the filter expression at the timestamp of any compressed value of the source point CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/ :00: /01/ :00:00 67.25 75.45 63.25 64.75 75.32 61.12 44.76 Filter Expression is ‘BA:CONC.1’ + ‘BA:TEMP.1’ > 30 35.54 28.97 17.21 23.1 All rights reserved, OSIsoft Inc. © 2008
114
Expression Sampling Modes – Expression Compressed
PI ProcessBook, PI DataLink and RtWebParts Evaluates the filter expression at the timestamp of any compressed values of any tags in the filter expression CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/ :00: /01/ :00:00 61.21 54.79 46.89 Filter Expression is ‘BA:CONC.1’ + ‘BA:TEMP.1’ > 30 33.76 17.86 17.54 14.65 All rights reserved, OSIsoft Inc. © 2008
115
Expression Sampling Modes – Interpolated
PI ProcessBook, PI DataLink and RtWebParts Evaluates the filter expression at evenly spaced sampling intervals CDT158 BA:CONC.1 BA:TEMP.1 Advanced Calculated Result 11/01/ :00: /01/ :00:00 73.98 62.97 50.34 Filter Expression is ‘BA:CONC.1’ + ‘BA:TEMP.1’ > 30 29.56 26.21 All rights reserved, OSIsoft Inc. © 2008
116
PI ProcessBook, PI DataLink and RtWebParts
Directed Exercise PI ProcessBook, PI DataLink and RtWebParts Perform a event-weighted average using a filter to be evaluated to every source point events. Perform a time-weighted average using a filter to be evaluated to every expression points events. Directed Exercise: Pt.Compressed evaluation Perform a event-weighted average of wood planks produced (represented by SINUSOID tag) per hour for the last week when pressure is between 150 and 180 psig (represented by CDEP158 tag). The filter must be evaluated on the source point because the readings are more frequent and precise compare to the one in the filter. Expression compressed evaluation Perform a time-weighted total on the consumed product (represented by BA:CONC.1 tag), using Advanced Calculated Data, for the last day for every work shift (12 hours beginning at 7h00 AM) when production recipe involves to go through phase2 reactor (represented by BA:PHASE.1 tag). The filter must be evaluated on the points defined in the expression because the readings are more frequent and precise. All rights reserved, OSIsoft Inc. © 2008
117
Time Functions in Performance Equation
PI ProcessBook, PI DataLink and RtWebParts TimeEq: Returns the number of seconds that a tag was at a specified value Syntax: TimeEq(tag, start time, end time, value) Example: TimeEq('BA:ACTIVE.1', '*-2h', '*', "ACTIVE") TimeNE, TimeLT, TimeLE, TimeGT and TimeGE also available Time Functions in Performance Equation TimeEQ : Returns the number of seconds that a tag was at a specified value. TimeNE : Returns the number of seconds that a tag was not at a specified value. TimeLT : Returns the number of seconds that a tag was lower than a specified value. TimeLE : Returns the number of seconds that a tag was lower than or equal to a specified value. TimeGT : Returns the number of seconds that a tag was greater than a specified value. TimeGE : Returns the number of seconds that a tag was greater than or equal to a specified value. Notes: that the result of these functions is in seconds Divide the result of these functions by to convert it in days All rights reserved, OSIsoft Inc. © 2008
118
PI ProcessBook, PI DataLink and RtWebParts
Time Filtered PI ProcessBook, PI DataLink and RtWebParts Function: PITimeFilter Retrieves the amount of time where an expression is true Arguments PI Server name or cell reference Expression to evaluate Date/Time to begin evaluation to Date/Time to end Sub-interval evaluation Time units of the response Output Cell Display Start Time or End Time Display % of good value Vertical or horizontal result 1 2 3 4 5 6 7 8 9 All rights reserved, OSIsoft Inc. © 2008
119
PI ProcessBook, PI DataLink and RtWebParts
Data validation cell PI ProcessBook, PI DataLink and RtWebParts Data validation constrains input answer in a cell to criteria: Integer numbers only Decimal numbers only Date and/or time Items chosen from a list Useful to build preformatted report. All rights reserved, OSIsoft Inc. © 2008
120
PI ProcessBook, PI DataLink and RtWebParts
Exercise DL7 PI ProcessBook, PI DataLink and RtWebParts Operating Time - Excel Objective: Calculate an operating time with the function Time Filtered All rights reserved, OSIsoft Inc. © 2008
121
PI ProcessBook, PI DataLink and RtWebParts
Trend Display Tool PI ProcessBook, PI DataLink and RtWebParts Create trends similar to PI ProcessBook trends Based on PI Data and/or Data from the worksheet Option to update automatically Option to modify scales and appearance Possibility to zoom in a part of the trend Select PI Ribbon > Insert Trend Trend Display Tool The Trend Control is an ActiveX control that can be inserted onto any MS Excel spreadsheet. The trend can display data from both the spreadsheet and a PI Server tag. To create a trend, a trend wizard is provided to make inserting trends easier. There are two sources of data that the Trend Control can plot: Worksheet Data and PI Data All rights reserved, OSIsoft Inc. © 2008
122
Trend Display Tool Configuration
PI ProcessBook, PI DataLink and RtWebParts Trend Wizard Define data sources Define how they are displayed Format Properties Configure every single item on trend Colors, line styles, etc. Trend Display Tool – Configuration Data on Worksheet The Trend Wizard can be used to create a trend from data on an MS Excel worksheet. Specify cell range of the data (typing it manually or selecting it with the mouse); For ease of use with PI DataLink functions, the Include all cells in array option is specified as the default (and choose only one cell of the array in this case); The Plot as stepped data option gives the trace a jagged-saw look (staircase). Data from PI The Trend Wizard can also be used to create a trend from data directly from the PI Server. Specify the tag name: typing it manually or searching it using he Search… button or using a reference to a cell; Click on the Add button. Trend Title and Placement The last screen of the Trend Wizard is to configure the trend title and the placement of the trend. If a new worksheet is selected, the trend is placed on a blank worksheet at the top left corner. If the existing worksheet option is specified, then the cell where the trend is to be placed must be specified. All rights reserved, OSIsoft Inc. © 2008
123
Trend Display Tool Right-Click Menu
PI ProcessBook, PI DataLink and RtWebParts The right-click menu allows the user to: Temporary modify the scales and the time frame Revert to original scales and time frame Permanently modify the scales and the time frame (the Revert option does not apply to this change) Add a scroll bar for the time frame Add markers Change the trend's appearance (colors, lines, etc.) Add or remove traces Delete, move, resize the trend Right-Click Menu Quick changes can be made to the trend by selecting some of the items on the right-click menu. Using the Change Scale… allows the changing of both the time range and Y-axis scale of the trend. If a change in the scale is deemed undesirable, the Revert option can be selected to undo the changes made. The Revert option always reverts back to the settings defined in the Trend Wizard. To scroll through time, scroll bars can be enabled with the Scroll Bar option. The scroll bar appears at the bottom of the trend. Again, the Revert option can be used to undo changes made by the scroll bar. To change the format of the trace or the trend itself, use the Format… option. For instance, this option can be used to change the color or line thickness of a trace. Also it can be used to add legends to the trend. Define Trend… and Define Trend Time Range… bring back the Trend Wizard screens. Resizing and Moving a Trend To resize or move a trend, use the Creation mode of the VBA toolbar; To display the toolbar, use View > Toolbars > Visual Basic; Do not erase or modify the objects hidden under the trend because they contain its properties. All rights reserved, OSIsoft Inc. © 2008
124
PI ProcessBook, PI DataLink and RtWebParts
Exercise DL8 PI ProcessBook, PI DataLink and RtWebParts Tank Level Objective: Learn to use the Insert Trend function with: Data from MS Excel worksheet and PI data All rights reserved, OSIsoft Inc. © 2008
125
PI ProcessBook, PI DataLink and RtWebParts
PointID to Tag PI ProcessBook, PI DataLink and RtWebParts Function: PIPointIDToTag This function allows the user to always make reference to a specific point ID and not the tag name. Very useful when tag names are expected to change Arguments PI Server name or cell reference Point ID Output Cell 1 2 3 All rights reserved, OSIsoft Inc. © 2008
126
PI ProcessBook, PI DataLink and RtWebParts
Attribute Mask to Tag PI ProcessBook, PI DataLink and RtWebParts Function: PIAttributeMaskToTag This function returns a list of tag names in PI that match one o more specified tag attribute values. Arguments PI Server name or cell reference Tag name or cell reference(s) to a list of tags Descriptor mask, default to everything Point Source mask, default to everything Point Type mask , default to everything Point Class mask , default to everything Engineering Units mask , default to everything Output Cell Vertical or horizontal result 1 2 3 4 5 6 7 8 9 All rights reserved, OSIsoft Inc. © 2008
127
PI ProcessBook, PI DataLink and RtWebParts
Recap Exercise DL9 PI ProcessBook, PI DataLink and RtWebParts (Optional) Time Permitting - Build a PI DataLink Report to: Use PI function to show number of saleable boards produced per shift Use PI function to show average length of saleable boards Show total value of scrap produced per shift Add meaningful text labels and formatting to the data to facilitate its use Work in teams if you wish Bonus: Display the current value of the tag in RED when the reactor temperature drops below 60 All rights reserved, OSIsoft Inc. © 2008
128
PI ProcessBook, PI DataLink and RtWebParts
5.0 PI Module Database All rights reserved, OSIsoft Inc. © 2008
129
PI ProcessBook, PI DataLink and RtWebParts
PI Module Database PI ProcessBook, PI DataLink and RtWebParts Objectives Describe the PI Module Database structure Integrate the PI Module Database in PI ProcessBook and PI DataLink All rights reserved, OSIsoft Inc. © 2008
130
PI ProcessBook, PI DataLink and RtWebParts
PI Module Database PI ProcessBook, PI DataLink and RtWebParts Each PI Server has its own PI Module Database (PI ModuleDB) The PI ModuleDB is used to organize an enterprise’s information streams into logical sub-areas The path to a certain area is called a context If the context (plant, unit, etc) is changed, the referenced PI points will change, without having to search again for their tag names All rights reserved, OSIsoft Inc. © 2008
131
PI ModuleDB – Physical Model
PI ProcessBook, PI DataLink and RtWebParts The structure of the PI ModuleDB allows the information to be stored hierarchically in relation to a physical model, a business model or an application model. Enterprise Division Department Location Unit Equipment Class Equipment All rights reserved, OSIsoft Inc. © 2008
132
PI Module DB – PI Modules
PI ProcessBook, PI DataLink and RtWebParts Each module has: Configurable information – PI Properties Linked tags – PI Aliases Dated versions - Revision number, Version number, Effective Date, Obsolete Date and Query Date System assigned information – UniqueID, Owner, Parent list, etc. Sub-Modules with the same characteristics – PI Modules All rights reserved, OSIsoft Inc. © 2008
133
PI Module DB – PI Properties
PI ProcessBook, PI DataLink and RtWebParts PI Properties are collections of named values that can store information related to a PI module A PIProperty has a name and a value The Value can be nearly any type: string, numeric, date, etc. PIProperties are used to store information about a module, example: Serial number Installation date Name of the technician who performed the installation All rights reserved, OSIsoft Inc. © 2008
134
PI ModuleDB – PI Properties
PI ProcessBook, PI DataLink and RtWebParts PI Properties can also be hierarchical All rights reserved, OSIsoft Inc. © 2008
135
PI ModuleDB – PI Aliases
PI ProcessBook, PI DataLink and RtWebParts PI Aliases let you configure common names to access real time information => PI tags All rights reserved, OSIsoft Inc. © 2008
136
PI Module DB – PI Aliases
PI ProcessBook, PI DataLink and RtWebParts Reactor1 Reactor 2 Reactor 3 Reactor 4 Temperature identification without aliases RX:TC143.PV RX:TC144.PV RX:TC145.PV RX:TC146.PV Temperature identification with aliases Temperature Reactor1 Reactor 2 Reactor 3 Reactor 4 All rights reserved, OSIsoft Inc. © 2008
137
Tag Search Window – Alias Search
PI ProcessBook, PI DataLink and RtWebParts Search by browsing the PI ModuleDB or specifying search criteria You can filter by context, module name, alias, heading set and heading The result pane shows the underlying tags for the aliases found All rights reserved, OSIsoft Inc. © 2008
138
PI DataLink and the PI ModuleDB
PI ProcessBook, PI DataLink and RtWebParts 1 3 2 Retrieves the value of PI aliases (PI tag name) Retrieves the value of PI properties Retrieves PI ModuleDB information (module name, context, alias name, property name) All rights reserved, OSIsoft Inc. © 2008
139
PI ProcessBook, PI DataLink and RtWebParts
Module Database PI ProcessBook, PI DataLink and RtWebParts Select the type of object you want to retrieve from the PI ModuleDB You can retrieve all aliases or properties in a module by selecting the collection object Select the copy module path option to retrieve the context along with the object (can be used as a cell reference in other calls) All rights reserved, OSIsoft Inc. © 2008
140
PI ProcessBook, PI DataLink and RtWebParts
Alias PI ProcessBook, PI DataLink and RtWebParts Function: PIAliasToTag Retrieves the underlying tags for the specified PI aliases Arguments PI Server name or cell reference Alias or cell reference(s) to a list of aliases Module Database path to resolve Date of application Output Cell Display server name 1 2 3 4 5 6 All rights reserved, OSIsoft Inc. © 2008
141
PI ProcessBook, PI DataLink and RtWebParts
Property PI ProcessBook, PI DataLink and RtWebParts Function: PIPropertyToTag Retrieves the underlying tags for the specified PI properties Arguments PI Server name or cell reference Property or cell reference(s) to a list of properties Module Database path to resolve Date of application Output Cell Vertical or horizontal result 1 2 3 4 5 6 All rights reserved, OSIsoft Inc. © 2008
142
Module Relative reports in PI DataLink
PI ProcessBook, PI DataLink and RtWebParts 1. Retrieve the aliases, properties and the current context Get this information with Module Database function 2. Retrieve the tag names and property values Alias and Property functions retrieve tag names and property respectively. Use cell reference for aliases, properties and module path. 3. Set Cell Reference Build your PI DataLink report making cell references to the tag names 4. Change context Change the current context and see the tag name change. Column showing tag names can be hidden. All rights reserved, OSIsoft Inc. © 2008
143
Module Relative reports in PI DataLink
PI ProcessBook, PI DataLink and RtWebParts 2. Retrieve tag names and properties 1. Retrieve aliases, properties and current context 4. Change context 3. Set cell reference All rights reserved, OSIsoft Inc. © 2008
144
PI ProcessBook, PI DataLink and RtWebParts
Exercise MDB2 PI ProcessBook, PI DataLink and RtWebParts Module Relative Spreadsheets Objective: Reduce the time required to produce and execute PI DataLink reports by basing them upon module contexts, as defined in the PI Module Database. All rights reserved, OSIsoft Inc. © 2008
145
PI ProcessBook, PI DataLink and RtWebParts
Conclusion “By using PI, we have been able to see what we guessed was happening. We have been able to validate our ideas and turn them into substantive savings. In our case, 10% of our operations budget.” Chilkoot Ward Director of Utilities University of Alaska (Power Generation) All rights reserved, OSIsoft Inc. © 2008
146
PI ProcessBook, PI DataLink and RtWebParts
Questions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.