This is the correct thread for you to clarify all of your questions concerning PI AF SDK workshop.
do you think that VS 2013 and AF SDK version 22.214.171.12438 (2014 R2) will be ok for excercises?
Small comment: video Specify Units of Measure for Data Value is not available in HD quality, hard to follow.
Yes, you can use PI AF SDK 2.6.1 for the exercises. Make sure you use the 4.0 version and build your application targeting .NET 4.5.
Regarding video resolution, try opening up the YouTube link and watch the videos there. You should be able to maximize the video to full screen with HD quality. Let me know if you run into any issues!
Just to explain something that Daphne wrote.
PI AF SDK 2.5+ provides two assemblies. The assembly version 126.96.36.199 should be used with .NET Framework 3.5. The assembly version 188.8.131.52 should be used with .NET Framework 4.5. Make sure you are using the second option in order to complete all the exercises.
Marcos Vainer Loeff
I'm not able to find the .dll for OSIsoft.AN.Notification. But I'm able to find the other libraries for OSIsoft.AN. Please find the screenshot below. Is there anything I missed installing ?
In your VS project, have you added a reference to AN SDK? Once PI Notifications is installed, AN SDK is located at %pihome%\Analytics\PublicAssemblies\OSIsoft.PIAnalytics.SDK.dll. You should then be able to add the OSIsoft.AN.Notification namespace to your project. If you haven't already, also install the PI Notifications Developer Tools for help files, sample code and intellisense.
Hi Daphne Ng,
I tried to add AN SDK as a reference but was not able to find in the mentioned location. As you mentioned, I tried installing the PI Notification Developer tool but not able to find the download file. Please check the screenshot below.
Screenshot 1 (Clicking on the link you gave in the reply).
Screenshot 2 (Clicking on the link displayed in Screenshot 1, I'm only finding the release notes and manuals and no installation files). Please help me figure out the installation file for PI Notification.
According to our record, your SSO account is not associated with any site, nor as a PI Developers Club member. Therefore the SSO account you used to sign in onto the Tech Support Download Center only showed User Manuals. Can you let me know if you should be associated to a site with current SRP? If so, you can add your site by following this link. Alternatively, you can also join PI Developers Club to obtain the development version of the software products.
1) Where can I download a copy of the AF SDK Reference?
2) On lecture Describe UOM Plugins & Categories in PI AF, there was a new release AF 2014 (2.6) where rollups can be performed using Asset-Based Analytics. I can get the child elements to rollup only if I click Refresh; is this the right behavior? Should we be doing the plug-in way or the new Analysis Templates? Will there be a new video?
3) On lecture Specify Units of Measure for Data Values the max resolution is on 360p, which is very blurry.
1) Please refer to this post - PI AF SDK Programming References - on where to download the AF SDK Reference.
2) Since PSE is not designed as a visualization tool, it does not automatically refresh the calculation results unless you click Refresh manually. You can see a similar behavior with other attributes (e.g. a PI Point data reference). If your rollup calculation is mapped to an attribute with a PI Point, you can see that the underlying archived data only depends on the scheduling information (event-triggered or periodic), instead of when you click "refresh".
We have been adding new, useful features to AF as new products get release. Another such example is that the string builder data reference in AF 2.6 replaced the custom data reference string concat. The idea of the original video is to show how one can use custom data references to add functionality in AF. If you plan to use the rollup feature, by all means use the one that comes with Asset-Based Analytics. We will evaluate to see if a new video can be recorded.
3) Elena made the same observation (see above). My suggestion was to try opening up the YouTube link and watch the videos there. You should be able to maximize the video to full screen with HD quality. Let me know if this works for you. If not, I can see whether we can upload a higher resolution video.
In lecture Find Specific PI Notification Instances in PI AF SDK
I added the following references accordingly:
I tried to add line:
Visual Studios Intellisense will even show both AF and AN namespaces after it was launched; but when I tried to build, it will get the error:
The type or namespace name 'AN' does not exist in the namespace 'OSIsoft' (are you missing an assembly reference?)
After the Build error, the AN namespace disappears from Intellisense.
Also from lecture Get Additional Data Values
In method btnGetData_Click() Data property cannot be not found under AFAttribute object. Intellisense will not display it and will get a compile error.
values = selectedAttribute.Data.RecordedValues(timeRange, AFBoundryType.Interpolated, desiredUOM, null, true);
I saw your directions for Vishnu Selvaraj and I tried to go to this page PI Notifications Developer Tools for help files, sample code and intellisense, but got the
The file you selected is not available. A newer or updated version may be available.Go to the following link to search for your download: All Downloads.
What should I look for in the All Downloads page?
I already installed the latest PI-AF-Client_2014-R2-SP1_.exe from the download.
Please advise. Thanks.
The PI Notifications Developer Tools are only available to PI Developers Club member. Let me send you a PM on how to get registered.
Regarding your error with the Data property, what version of AF SDK are you using? If you are using AF 2.6, your application has to target .NET 4.5 and using the AF SDK dll in the 4.0 directory. (You can use .NET 4.0 if you have AF 2.5 installed.)
The using OSIsoft.AN.Notification namespace problem is fixed now. I deleted both
OSIsoft.PIAnalytics.Common and OSIsoft.PIAnalytics.SDK
from the References and added them back. I noticed there were warnings on incompatible .NET framework. I changed the Properties from .NET 4 Client Profile to .NET 4 and the warnings went away.
I don't have .NET 4.5. How do I find out what version of AF SDK I have?
PI AF SDK comes installed with the PI AF Client. If you go to "Programs and Features" and look at the list of installed programs, you can find the version for PI AF Client there. Alternatively, you can also find the version information directly from the dll. Right-click the OSIsoft.AFSDK.dll and select the Details tab. You will find the version there.
Since PI AF SDK 2.5, there are two "versions" of OSIsoft.AFSDK.dll you can use:
Make sure you reference the AFSDK dll in the PublicAssemblies\4.0 folder for your project. If you are using AF 2.5, you can target .NET 4.0; if you are using AF 2.6, you have to target .NET 4.5.
I have been tied up with work since day 1 and will not be able to complete all the lectures, exercises, and the final project. Can I still complete the course at a later time?
How about next Friday? Would you be ready to submit by then?
I can try.
I have completed up to exercise 3. Due to my limited installation and access to company data, I won't be able to complete the remaining exercises and the final project.
Thank you for the feedback. I am glad that you are able to apply some of the AF SDK topics through completing the exercises. If you need help developing your AF SDK applications past new week, please feel free to post in PI Developers Club!
Hey Daphne Ng,
When I create an element using the template I had already created, I'm not able to edit the name and properties of the attributes in the element level. At the same time, when I create an element without a template I'm able to add/edit new attributes at element level. Is that the AF design currently or could I be missing some access to edit the attributes at element level in case of using template for the element ?
This is intended behavior. An element derived from a template gets its definition of categories, attributes, and ports from the template. The idea is that the element template serves as a model for a type of asset, whose attributes are identical. If you do want to add attributes, you can select the "Allow Extensions" check box in your element template. If the template allows extensions, then a derived element can contain extra categories, ports, and attributes that are not defined in the template. Attributes that are created as extensions do not change when the template changes. Note that this might make maintenance more difficult down the line, and the extra attributes will not work well in element-relative displays. Another alternative would be to create derived templates if you do want to extend your base template, and then build elements from the derived templates.
Daphne Ng Thanks a lot. This works for me.
Hey Marcos Vainer Loeff, Daphne Ng,
I created a PI tag with point type 'Digital'.When I try to map the PI tag with the AF attribute, there is a conflict with the 'Value Type'. What 'Value Type' should be used for mapping to 'Digital' PI tag ?
If you would like to see the digital state name, you can use a String; if you would like to see the digital state number, you can use an integer, etc. What value type are you currently using?
I would like to see the digital state name... I used string as value type but still the data type conflict exists.
Can you give me the full error message? Can you test it with a default digital state tag and see if you run into the issue?e.g.
This seems to be working Daphne Ng. But my previous issue is not resolved
Please find the full error message below:
If you look at your PI Point in PI System Management Tools, what is the current value? Also, what digital state set is your digital state tag using? If you look at the digital state set that the tag is using, do they have relevant states associated?
Retrieving data ...