Académique Documents
Professionnel Documents
Culture Documents
in PI AF
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 1
1.1
Configuring an Element in PI AF
1.1.1
Description
This lab teaches how to create AF objects by means of configuration using the PI System
Explorer tool.
1.1.2
1.1.3
Objectives
Create a new AF database
Create an AF Table
Create an Element Template with Attribute Templates
Create an AF Element
Problem Description
You just installed the PI AF 2.x Server and PI AF 2.x Client and you are now ready to
configure your asset database. You will start by configuring your tanks. Using the PI System
Explorer, you need to create a new AF database with an element template that will be used to
configure all of your tanks in your plant from the same manufacturer.
1.1.4
Suggested Approach
Part A
Create a new database in the PI System Explorer named MyAFDB_first initial and
lastname. (In the case of the Learning Lab solution, the completed database is called
Solution_MyAFDB_JDoe.)
Part B
Create a new AF table and name this table Material Properties. The table will have the
following columns defined:
Name
Value Type
Unit Of Measure
MaterialID
String
<None>
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 2
Density
Double
Viscosity
Double
Boiling Point
Double
Density
Viscosity
Boiling Point
WX1200
2100
1.2
520
HC1500
3422
0.9
650
AQ4500
8943
2.1
533
Part C
Create a new element template called Tank Template. The element template will have the
following element attributes:
Attribute Name
UOM
Value Type
Default Value
Data Reference
Level
ft (Length class)
Double
0 ft
<None>
Volume
m3 (Volume class)
Double
0 m3
<None>
Density
Double
0 kg/L
Table Lookup
Mass
kg (Mass class)
Double
0 kg
Formula
Product
<None>
String
n/a
<None>
Manufacturer
<None>
String
ACME HX Corp
<None>
* Serial Number
<None>
String
n/a
<None>
* Photo
<None>
File
n/a
<None>
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 3
In the template, create a table lookup data reference for the Density attribute. Use the
following table to configure the lookup value:
Table
Material Properties
Result Column
Density
Where
MaterialID = Product
In the template, create a formula data reference for the Mass attribute. Use the following to
configure the formula:
V = Volume
D = Density
Formula = V * D
Part D
Create a new element called Tank A based on the Tank Template element template and
assigned to its attributes the following values:
Attribute Name
Data Reference
Value
Level
PI Point
ba:level.1
Volume
PI Point
cdt158
Density
Table Lookup
Formula
<None>
HC1500
<None>
* Serial Number
<None>
90122323-112
* Photo
<None>
Mass
Product
Manufacturer
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 4
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 5
1.1.5
Step-by-Step Instructions
Part A
1.
2.
Right click anywhere in the list of databases and choose New Database
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 6
3.
Name the database MyAFDB_first initial and lastname (example: MYAFDB_JDoe) and click the OK
button.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 7
4.
Make sure the database is selected in the list of available databases and click the OK button to open
it
Part B
1.
In the PI System Explorer navigate to the library in the current database by clicking on Library in the
pane at the bottom left
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 8
2.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 9
3.
In the General tab, change the name of the table to Material Properties
4.
Select the Define Table tab and press the Insert a row (table column) button 4 times to add 4 new
rows. Your screen should appear as shown below.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 10
5.
Change the Name, Value Type and Unit Of Measure fields to match the screen below. (Note:
Viscosity UOM is found under the "Dynamic Viscosity" category.)
6.
Now that the table is defined lets add some entries to the table. Select the Table tab and enter the
values as shown below.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 11
7.
Check in the newly created table by selecting File Check In via the PI System Explorer
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 12
Part C
1.
In the PI System Explorer navigate to the library in the current database by clicking on Library in the
pane at the bottom left
2.
3.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 13
4.
Click on the Attribute Templates tab and then right click on the attribute pane (the white space)
and choose New Attribute Template to begin defining attribute templates
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 14
5.
Create the attribute templates listed in the table below with the Name, Unit of Measure (UOM),
Value Type, Default Value, and Data Reference listed in this table:
Attribute Name
UOM
Value Type
Default Value
Data Reference
Level
ft (Length class)
Double
0 ft
<None>
Volume
m3 (Volume class)
Double
0 m3
<None>
Density
Double
0 kg/L
Table Lookup
Mass
kg (Mass class)
Double
0 kg
Formula
Product
<None>
String
n/a
<None>
Manufacturer
<None>
String
ACME HX Corp
<None>
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 15
Note: Do not configure the Settings for the table lookup and formula data references. That is
done below.
6.
Create child attribute templates for Serial Number and Photo under Manufacturer. Right click on
the Manufacturer attribute and select New Child Attribute Template.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 16
7.
Create the child attribute templates listed in the table below with the Name, Unit of Measure
(UOM), Value Type, Default Value, and Data Reference listed in this table:
Attribute Name
UOM
Value Type
Default Value
Data Reference
Serial Number
<None>
String
n/a
<None>
Photo
<None>
File
n/a
<None>
8.
Select the attribute template Density and click on the Settings button beneath the Data Reference
drop down list box.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 17
9.
Select Material Properties as the table and Density as the Result column
In the Where group box, select MaterialID as the column, = as the Operator, and
Product as the Attribute or Value
10. Click the Add And button to add the where clause and click the OK button to accept
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 18
11. Select the attribute template Mass and click on the Settings button beneath the Data Reference
drop down list box
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 19
12. In the Parameters pane click on the Add variable to definitions button (
will appear:
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 20
13. Add the following variables: D = Density, V = Volume. Make to select the proper UOM so that the
formula will respect the dimensional analysis.
14. In the Equations pane, click on the Add new formula row button (
) and enter the formula V *
D. You can use the three drop downs (variables, operators and functions) to help write the formula.
1.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 21
Note: When configuring a formula data reference, especially one involving unit of measure conversion,
it is usually best that the UOMs for the inputs and result are specified explicitly. Do this in the
parameters configuration section by choosing the appropriate UOM from the Unit of Measure drop
down. Do this also in the Result section at the bottom left.
Part D
1.
In the PI System Explorer navigate to the elements in the current database by clicking on Elements in the pane
at the bottom left.
2.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 22
3.
Select the Tank Template template and click the OK button to accept the default values.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 23
4.
This creates an element but does not check it in. You have the option now to change its name and
attribute values before checking it in. In the General tab, change the name of the element to TankA
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 24
5.
6.
Select the Level attribute and change its data reference to a PI Point. Click anywhere on the screen
and then click the Settings button.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 25
7.
In the Tag name field, enter BA:LEVEL.1 and click the OK button
8.
Select the Volume attribute and change its data reference to a PI Point. Click anywhere on the
screen and then click the Settings button.
9.
In the Tag name field, enter CDT158 and click the OK button
10. Change the value of the rest of the attributes to match the table below
Attribute Name
Value
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 26
Product
HC1500
* Serial Number
90122323-112
C:\Program Files\PIPC\PISDK\osilogow.jpg
* Photo
11. Check in the changes to the element. Use either File Check In or the right click menu check in
option on the element name, or the Check In button on the toolbar.
12. To calculate the formula (Mass attribute) and get the table lookup value (Density attribute), right
click on the element and select the Refresh option.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 27
1.1.6
Executive Overview
If you prefer to look at a completed solution, you can open the existing AF database
Solution_MyAFDB_JDoe. To open Solution_MyAFDB_JDoe do the following steps:
In the PI System Explorer choose File > Database
Select the database " Solution_MyAFDB_JDoe" and click the OK button to open it.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, mechanical, photocopying,
recording, or otherwise, without the prior written permission of OSIsoft, LLC.
Copyright 1995-2009 OSIsoft, LLC, 777 Davis St., Suite 250, San Leandro, CA 94577
Page 28