New AF SDK guide for beginners

Version 1

    OSIsoft is pleased to announce the AF SDK (Asset Framework Software Development Kit) Getting Started Guide. The Getting Started Guide is for developers who have basic programming skills but who are not familiar with AF SDK. The guide will teach you how to develop powerful customized applications for your PI system.

     

    Table of contents:

    • Introduction
      • About OSIsoft developer technologies
      • AF SDK versus PI SDK
      • Where to find help
    • Configuration
      • Create the database for your PI system
      • Create an application structure
      • Set the target framework
      • Add AF SDK references to your project
      • Specify namespaces
    • Programming exercises
      • Lesson 1: Connect to PI Data Archive or PI AF
        database
        • AF SDK basics
        • Connect to a PI Server or AF Database
        • Lesson one exercises
        • Lesson 1 hints and tips
        • Lesson 1 exercise solutions
      • Lesson 2: Searching for assets
        • Lesson 2 exercises
        • Lesson 2 hints and tips
        • Lesson 2 exercise solutions
      • Lesson 3: Reading and writing data
        • Lesson 3 exercises
        • Lesson 3 hints and tips
        • Lesson 3 exercise solutions
      • Lesson 4: Building an AF hierarchy
        • Lesson 4 exercises
        • Lesson 4 hints and tips
        • Lesson 4 exercise solutions
      • Lesson 5: Working with AF event frames
        • Lesson 5 exercises
        • Lesson 5 hints and tips
        • Lesson 5 exercise solutions
    • Conclusion
    • Technical support and other resources

     

    There are two ways to configure an environment for developing applications. The easiest way is to simply sign up with OSIsoft Learning or PI Developers Club space within PI Square and create a Virtual Learning Environment (VLE). A VLE is a virtual computer that is configured with the appropriate versions of PI Data Archive, PI AF, Visual Studio, .NET, and AF SDK. Other than creating the VLE, no additional configuration is required. A VLE is available for this Getting Started Guide at a nominal cost. See the OSIsoft Learning page Virtual Learning Environment Overview (https://learning.osisoft.com/Labs/LabInformation) for details.

     

    The other way to configure an environment for developing applications is to use an existing PI Data Archive and PI AF database at your company or organization. To run the examples in this Getting Started Guide you must have the following:

     

    • An operational PI Data Archive and PI AF system, preferably a system used for testing or QA work. Because this Getting Started Guide creates and edits tags and asset elements, you should not use a production system.

    • AF SDK version 2.9.1. You can download the latest version from OSIsoft Tech Support (https://techsupport.osisoft.com/Downloads/All-Downloads/Developer-Technologies/All-Products).

    • .NET version 4.5. See the OSIsoft Tech Support page .NET 4.5 differences (https://techsupport.osisoft.com/Documentation/PI-AF-SDK/html/cc26e52eb3fc-4b0b-9ff5-0526a8b4c8cc.htm) for more information.

    • Microsoft Visual Studio 2015 or Microsoft Visual Studio Community edition (available free). Visual Studio Express 2017 is also available free from Microsoft.