Skip navigation
All Places > PI Developers Club > Blog > Author: RJKSolutions
1 2 Previous Next

PI Developers Club

20 Posts authored by: RJKSolutions

"vCampus Live! 2013 needs you!"



Register now!


It is that time of year again where vCampus Live! is just around the corner, a particular highlight of the year for me!
This year will be Oliver's 2nd vCampus Live! event, flying for 11 hours on a plane to be in San Francisco for the event. Such dedication from a 17 month old.
So who is Oliver? Well he's my son, my 2nd son. I'm sure most already know my eldest son Ethan who's 4 years old and a vCampus Live! veteran. There's a reason why Oliver is pointing at you whilst you read my blog post and that stroy unfolds below so please read on.




I'm a big fan of vCampus especially the vCampus Live! event. It is awesome for numerous reasons, in fact I usually get more out of the 2 days attendance at vCampus Live! than I tend to out of 1 years subscription to the forums. That's not meant to devalue the forums in any form, they're invaluable but I wanted to exaggerate & emphasise the value of attending vCampus Live! in person; standing in front of the developers/product managers/VPs as you tell them about complex situations that you're using the OSIsoft toolset and watching them various expressions on their faces - ranging from a big cheesy smile  to sheer panic as you show them a bug or potential gap in their particular tool's/application's offering . You can hunt down find OSIsoft employees that you've not met before but exchanged email and really thrash out issues, give feedback and find out sneaky bits of information on future versions of products. Sometimes you even get to see the developer's lego DeLorean car . You just can't get that sort of interaction from a virtual presence, you have to do that in person.


I've been to all but 1 of the vCampus Live! events, and I'll hopefully be to the foreseeable events. Besides the reasons above for attending I have another reason for attending, cheesecake. Yep, cheesecake. We simply do not have the Chessecake Factory franchise in the UK so I have to make the annual visit to Union Square in San Francisco to visit the Cheeckcake Factory. This is a passion shared by my eldest son Ethan. When I mentioned in passing to him that I would be going back to vCampus Live! he instantly knew it would be in San Francisco and began to jump our living room shouting "we're going to San Francisco again....we're going to San Francisco again..." followed by a moment of silence which was broken by the next chant of "CHEESECAKE!". Oh dear, that is not the plan. The plan is that I would be going alone this year and now I have about 30 seconds to contemplate how to break the news to Ethan that he in fact won't be coming this year as he has a lot on at that time of year. With beads of sweat forming I began to panic and decided to break the news to him in the morning. That was a long night.


Turns out the lure of cheesecake was too much for my wife too. The decision was made that we would all be heading over. Phew, no breaking the news to Ethan after all. He is now counting down the days until we fly out (as am I ). Needless to say Ethan was excited to be going once again...





So if you've not already registered there is still plenty of time to register, and plenty of time to be as excited as Ethan about vCampus Live! 2013. Once you've registered then be sure to visit the Cheesecake Factory on top of Macy's and at the event be sure to give every single OSIsoft employee as tough a time as you like - this is the community's event, the community would not exist with you!

Here I am again already working on the draft (final version by the time you are reading this) of my 3rd blog about the PowerShell Tools for the PI System within the space of a week. That has to be some kind of record for me to maintain my attention on one topic for so long.


So far I covered a couple of aspects to the PowerShell Tools for the PI System; Connecting to the PI Server and AF Server (collectively known as the PI System), and some real world PI Server archive management issues that I've had to deal with. Hopefully you've enjoyed reading them so far.


For this next blog post I want to talk about PI Interfaces with particular emphasis on two of the most commonly used, the PI Interface for OPC and the PI Interface for Performance Monitor. Now the fact that I am going to focus on those two interfaces in my post doesn't mean you should only carry on reading if you have a particular interest or heavy use of those 2 PI Interfaces, the point of this post is to show you once again how easy, simple and somewhat relaxing it is to automate changes/auditing of PI Interfaces in general with the PowerShell Tools for the PI System. Yes, I did say "relaxing", not sure why but that's just how it feels sometimes working with these OSIsoft CmdLets you just don't need to think too much about it as OSIsoft have done most of the hard work. Anyway feels like I am waffling again so lets get on with it.


PI Interface design changes to 50+instances


Okay, here is the scenario. Imagine you are working in an environment when you have a blueprint of a complete PI System, how the various aspects of the PI System (AF Server, PI Interfaces, PI Server, ...) interact with each other. That blueprint is then used to produce numerous replica PI Systems that are deployed to numerous geographical locations - if you have an interest in how to do that type of deployment then check out my UC 2013 presentation on that very topic. Each of the deployed PI Systems are then merrily doing their job, collecting data, visualizing data, and replicating data back to a single central PI System (via PI to PI).

Yes the title is correct, despite the brilliant work that has gone into PI Server there are still numerous management issues. Some of those issues are related to the PI Server archives and I want to cover a couple of them in this blog post which follows on from my previous blog post on connecting to the PI System via PowerShell.


Archive Time Span

Let me start with a simple scenario that I wanted to track automatically; I wanted to continuously know what the complete lifespan of all on-line archives is. I am working with space limited PI Systems where there is a requirement to only have a small time span of data available - for example the last 12 months of data. To achieve this from the PI Server perspective you need to set the tuning parameter "Archive_OverwriteDataOnAutoShiftFailure" to "1" to allow old archive files to be overwritten. The main reason for that overwrite of data to occur is typically low disk space, which in my scenario is perfect (and it works fine).


However, what I cannot tell automatically via Performance Counters is what is the time span of all on-line archive. You can't even deduce that from the existing performance counters. So how am I supposed to monitor that my rolling archives are indeed keeping at least 12 months of archive data on-line? The answer is to use the PowerShell Tools for the PI System with a couple of lines of code, it is so simple that I encourage everyone to start exploring the PowerShell Tools for the PI System to find other "quick wins" for your PI System management.


At the moment I am dealing purely with a single PI Server and running the PowerShell scripts on the PI server - I will tackle PI Collective and Collective monitoring in my next blog post.


We need to connect to the PI server, which you should remember from my last blog post:

if ((Get-PSSnapin "OSIsoft.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "OSIsoft.PowerShell" }

[OSIsoft.SMT.PIServer]$PI = Get-PIServer -Name "vCampusDemo" | Connect-PIServer



Okay, so now we are connected.
In order to retrieve all the registered archives from the connected PI server OSIsoft have kindly built us the "Get-PIArchive" CmdLet. Without specifying an archive name the CmdLet will return an Array of all the registered archives. 

[Array]$ARCHIVES = Get-PIArchive -PIServer $PI



Simple, right? 
However, I'm not interested in empty archives that currently have no data, and I want to order the archives in a chronological descending order so that I can take a short cut to get the time span of all archives. So I'm going to pipe the archive list to a "where" filter to eliminate the empty archives and then sort the remaining archives:

[Array]$ARCHIVES = Get-PIArchive -PIServer $PI | where { $_.StartTime -ne $null } | sort -Property StartTime -Descending



 A PI Server archive without a start time is an empty archive waiting to be used/shifted to. They've now gone, great. I also sorted the archive list because I want to use the first and last element of the array to provide a simple time span result of all archives. Before you start shouting at the screen, I know there could be archive gaps in between...I am coming to that next. For now here is the code:

$Now = [DateTime]::Now
$TimeSpan = New-TimeSpan -Seconds ($Now.Subtract($ARCHIVES.GetValue($ARCHIVES.Length - 1).StartTime).TotalSeconds)
Write-Host "(Simple) Total archive online timespan = " $TimeSpan.ToString()



Something to note with this is that the first Archive object in the array will be the primary archive, which has no end time. The end time is the current time so for simplicity I substitute the current time of the PI Server as that archive's end time. I then subtract the last Archive object's start time to get the time span (inclusive of archive gaps) of on-line archive data. Now with this time span I could do what I like with the value, most likely send to a PI tag (via the "Add-PIValue" CmdLet - subject to a later blog) and notify on its value.


As I alluded to earlier in this blog post I am not taking into account archive gaps. So the result I just got is not accurate enough for me, I want to know the time span of on-line archive and if there are archive gaps. This got me thinking as to the best way to achieve this with as little code as possible, after all I don't necessarily want a a "PI Professional" to maintain these PowerShell script, they should be as obvious as possible for others to maintain. I had to do some more research into some PowerShell CmdLets and better use of piping between CmdLets...some time later...I decided on how I would do it for now and was pleasantly surprised on how I ended up doing it.


Each PI Server archive has a LifeTime property, which is a TimeSpan object. So I could filter out empty archives and now select the LifeTime property of each archive. I then discovered the "Measure-Object" CmdLet that will provide you with statistics depending on what you want, and one of the statistics available is "Sum". Perfect, but you cannot sum TimeSpans. Instead I had to use the "ExpandProperty" parameter for the Select CmdLet so that I could sum up the "TotalSeconds" property of each TimeSpan. Now it is perfect.

$sum = Get-PIArchive -PIServer $PI | where { $_.StartTime -ne $null } | select -ExpandProperty LifeTime | Measure-Object TotalSeconds -Sum



Now I can compare the time span of Primary Archive -> Oldest Archive Time Span with the LifeTime TotalSeconds Time Span to detect if there are any archive gaps.

$ArchiveGaps = ((New-TimeSpan -Seconds $sum.Sum).ToString() -eq $TimeSpan.ToString()) 



Job done.


Archive names for rolling archives


Following on from the above scenario I found out to my horror that when the PI Server overwrites an old archive as per the tuning parameters configuration it doesn't rename the archive file! This means that the first time the archive file is created it is given a name based on the tuning parameters "Archive_AutoArchiveFileRoot" and "Archive_AutoArchiveFileFormat" then that archive name will remain forever no matter how many times the archive is overwritten. If like me you have some form of self-confessed OCD then the archive names not matching the configuration after an archive shift overwrite was keeping me up at night.  


Anyway, after already tackling the archive on-line data time span issue I had done a lot of the work for getting at the archives. What I need to do now was check the name of each archive and make sure it matched the tuning parameter configuration. The first check of the Powershell Tools for the PI System yielded the CmdLet I needed; Get-PITuningParameter. This was straightforward to get what I needed for my checks, having already connected to the PI Server:



$AutoArchiveFileRoot = (Get-PITuningParameter -Name "Archive_AutoArchiveFileRoot" -PIServer $PI).Value
$AutoArchiveFileFormat = (Get-PITuningParameter -Name "Archive_AutoArchiveFileFormat" -PIServer $PI).Value



The archive file format is one of three possibilities:


0: [root]_D_Mon_YYYY_H_M_S[.ext]
1: [root]_YYYY-MM-DD_HH-MM-SS[.ext]
2: [root]_UTCSECONDS[.ext]


Okay so the format is really just a date time format for the archive's start time, so we'll use the same logic for our check and, if required, rename.


Let's get the archives in a chronological order and assign what we think the name of the archive "should be":



$AutoArchiveFileExt = (Get-PITuningParameter -Name "Archive_AutoArchiveFileExt" -PIServer $PI).Value
$AutoArchiveFileRoot = (Get-PITuningParameter -Name "Archive_AutoArchiveFileRoot" -PIServer $PI).Value
$AutoArchiveFileFormat = (Get-PITuningParameter -Name "Archive_AutoArchiveFileFormat" -PIServer $PI).Value

[Array]$ARCHIVES = Get-PIArchive -PIServer $PI | where { $_.StartTime -ne $null } | sort -Property StartTime -Descending
foreach ($ARCHIVE in $ARCHIVES)
     $ARCHIVE_NAME = ""
     switch ($AutoArchiveFileFormat)
          0 {$ARCHIVE_NAME = '{0:d_Mon_yyyy_H_M_s}' -f $ARCHIVE.StartTime}
          1 {$ARCHIVE_NAME = '{0:yyyy-MM-dd_HH-mm-ss}' -f $ARCHIVE.StartTime}
          2 {$ARCHIVE_NAME = $ARCHIVE.StartTime.ToFileTimeUtc()}
     $ARCHIVE_NAME = [String]::Concat($AutoArchiveFileRoot, $ARCHIVE_NAME)


 We can simply format the Archive StartTime property to the required archive name format defined in the tuning parameters, then join that with the file root tuning parameter.


Next the comparison...



if ($ARCHIVE.Name -eq ($ARCHIVE_NAME))
          Write-Host "Archive name '" $ARCHIVE.Name "' is correct. No action."
          Write-Host "Archive name '" $ARCHIVE.Name "' is incorrect, should be '$ARCHIVE_NAME'."



You can use this as a sanity check that the logic for comparison is accurate. On "normal" usage of the PI Server you'll likely have all archives named correctly, unless you changed the tuning parameters after the first archive was created. For my scenario there was no telling how many of the archives would have been rolled over so I had to do this check periodically based on my data rates to the PI Server.


What do I do now that I know there are archives named incorrectly? Well unregister them and rename them of course. Couple more interesting CmdLets that OSIsoft have provided to us, "Unregister-PIArchive" and "Register-PIArchive". This is becoming easier than I first thought.


Okay then, I am going to unregister each non-conforming archive, rename it, then register it as the new name. However, I am not going to do anything with the primary archive...I'll wait for the next archive shift before renaming that one. I can live with having the primary archive named incorrectly (although OSIsoft should fix this whole issue in PI Server 2013).



          if ($ARCHIVE.EndTime -ne $null)
               Unregister-PIArchive -Name $ARCHIVE.Name -PIServer $PI 
               Move-Item $ARCHIVE.Name $ARCHIVE_NAME
               Move-Item ($ARCHIVE.Name + ".ann") ($ARCHIVE_NAME + ".ann")
               Register-PIArchive -Name ($ARCHIVE_NAME) -PIServer $PI 
               Write-Host "Primary archive '" $ARCHIVE.Name "' will not be renamed until after the next archive shift."



Yep, it really is that easy. All those sleepless nights wiped out in a few lines of code. You could have all kinds of fun with these OSIsoft CmdLets.


Job done.






For a couple of issues that historically have been complicated to achieve using regular command file scripts they have been solved with very little PowerShell code. Big thanks to OSIsoft for providing the CmdLets to simplify these real-world issues with very little effort.


Obviously any system management automation carries potential for unexpected exceptions, irregularities in PI Server setup/configuration ... so you should have some detailed knowledge of your PI System before going in with all guns blazing. I've omitted any detailed exception handling for simplicity of this blog post - make sure you handle exceptions and check your environment first!




What's next?


I want to look at some PI Module Database management for PI Interfaces. Whilst we don't have AF based PI Interfaces some of us still have to get our hands dirty with the PI Module Database. I didn't want to get my hands dirty, I like my hands, so I automated a whole bunch of PI Interface & PI Module Database work. This is coming up next.



Ever wondered how you use PowerShell to connect to the PI System?
Too busy to learn another data access method?
Not had any real exposure to PowerShell thus far?


Then read on as I introduce you to connecting to the PI Server and AF Server using the OSIsoft PowerShell Tools for the PI System.


This blog does not explain the specifics of PowerShell but merely shows you how to use PowerShell with the PI System. For details of PowerShell itself I suggest you ask our mutual colleagues; Google and Bing.


I am by no means a PowerShell guru, just a programming nomad who has currently settled in the land of PowerShell until I am ready for my next journey. I set myself a goal at the beginning of the year to understand PowerShell and happy to have achieved that so far. In fact, I’ve used it in projects already to save hours/days (and large amounts of $’s, £’s …) of work.


Feedback most welcome!
Suggestions for further PowerShell topics most welcome too!
Nomination for OSIsoft vCampus All-Star 2013 a must!   (I’m starting early this year…)


Adding the OSIsoft PowerShell snapin.


We can’t do anything without the Powershell Snapin that provides the CmdLets we need.


Snapins are added using the “Add-PSSnapin” CmdLet; opposite CmdLets tend to exist so in this instance there is a “Remove-PSSnapin” CmdLet too:



Add-PSSnapin "OSIsoft.PowerShell"
Remove-PSSnapin "OSIsoft.PowerShell"



Now of course that Snapin could already have been added which means we’ll get some ugly red text thrown at us, so we’ll handle that explicitly:



if ((Get-PSSnapin "OSIsoft.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "OSIsoft.PowerShell" }



With the snapin loaded we have access to a wealth of PI System CmdLets that pretty much cover most aspects of the PI System from a management perspective. What’s more is the abstraction that the CmdLets provide mean scripts produced can easily be supported by any PowerShell scripters without needing to have the deep knowledge of the PI System SDKs.


Connecting to a PI Server.


Connecting to a PI Server is extremely simple and achieved with 2 CmdLets; Get-PIServer and Connect-PIServer (Disconnect-PIServer is available too but we don’t need that right now).


This is the code required using those 2 CmdLets to connect to a PI Server named “vCampusDemo”:



[OSIsoft.SMT.PIServer]$PI = Get-PIServer -Name "vCampusDemo" | Connect-PIServer



How beautiful does that look? Extremely.


Once you have your PIServer object the world is your oyster as to what you want to do with it, for example checking the version of the PI Server:



Write-Host $PI.Version



There are endless things you’ll want to do to that PI Server, but I’ll cover that in some further blogs. For now, let’s just concentrate on getting you connected.
If you’re working with a PI Collective and have a connection preference then that is already covered, just specify your preference when connecting:



[OSIsoft.SMT.PIServer]$PI = Get-PIServer -Name "vCampusDemo" | Connect-PIServer -ConnectionPreference RequirePrimary



One neat parameter of the Connect-PIServer CmdLet I found was “-AcceptServerIDChange”. It is pretty self-explanatory and works great – if you have a PI Server that recently changed Server Id and you’re connecting then it will automatically accept the new Server Id, which will be updated in the PI-SDK registry.


Connecting to an AF Server (PI System).


Can’t be as easy as connecting to a PI Server, can it? Yes, yes it can. The same CmdLet pattern is available for an AF Server; Get-AFServer, Connect-AFServer, Disconnect-AFServer.



[OSIsoft.AF.PISystem]$AF = Get-AFServer -Name "vCampusDemoAF" | Connect-AFServer



Just as beautiful as the PI Server connection I think you’ll agree. Same as with the PI Server, connection preference for an AF Collective is supported:



[OSIsoft.AF.PISystem]$AF = Get-AFServer -Name "vCampusDemoAF" | Connect-AFServer -ConnectionPreference RequirePrimary



Connection error handling


With both the PI Server and AF Server we have just connected with no regards for how we want to handle exceptions, for example a PI Server doesn’t exist, or an AF Server connection was rejected.


For both our connections to the PI Server and AF Server we can have the connection attempts silently executed and then make our own checks on the objects returned.


PI Server connection becomes:



[OSIsoft.SMT.PIServer]$PI = Get-PIServer -Name "vCampusDemo" -ErrorAction SilentlyContinue | Connect-PIServer -ErrorAction SilentlyContinue

if ($PI -eq $null) { Write-Host "Uh oh, no connection the PI Server." -ForegroundColor Red }



Then, you guessed it; we can do the same thing for the AF Server connection:



[OSIsoft.AF.PISystem]$AF = Get-AFServer -Name "vCampusDemoAF" -ErrorAction SilentlyContinue | Connect-AFServer -ErrorAction SilentlyContinue

if ($AF -eq $null) { Write-Host "Uh oh, no connection to the AF Server." -ForegroundColor Red }



There is currently a bug with the “Get-PIServer” CmdLet that means it will throw an error even if you specify “SilentlyContinue” as the ErrorAction. This is being addressed by OSIsoft.




What’s next?


With the easy bit of connecting out of the way the next set of blogs on PowerShell with the PI System will focus on some management aspects of both systems. They will include some PI Server audits (PI Mappings/Trusts/Firewall), archive management, PI Interface manipulation (PI Module Database + remote command file edits) … Beyond those blog posts we’ll switch our attention to the AF Server.

vCampus Live 2012 Summary

Posted by RJKSolutions Dec 17, 2012

It has been far too long since vCampus Live 2012 for me to be writing this summary blog post but I felt the need to anyway.


For those of you who want to summary version then you can simply compile and run the following console application C# code:




If that code is too abstract for you then read on as I decompile the code.


Firstly I decided to travel well before vCampus Live started as I knew all too well that coming from the UK I would be jet lagged for the vCampus Programming Hackathon.  So I arrived on the Saturday before vCampus Live with my family in tow.  That was a challenge in itself, the amount of luggage required for a family of 4 that includes 2 children was unbelievable but, I digress.


Venue & Registration
The Grand Hyatt was in a great location and was a great venue for vCampus Live, strides ahead of last year’s venue.  The 36th floor was a great setting for events so was pleased to see that the Hackathon and Geek Extravaganza were being held up there.  The décor for vCampus Live was spot on, subtle things like the banners running down the middle of the escalators were a nice touch.  Congratulations to the event team and everyone involved for that!  Food, coffees, drinks, snacks, … all seemed to be well stocked and available, which was great.


Registration was simple and painless, seemed to work great.  A little shy on “freebies” that we usually get during registration but no great shame.


The Hackathons
The Hackathons were side-by-side in that they were both run at the same time.  The selfish person inside me wanted to participate in both the Security and Programming Hackathon but I had to choose one so I opted for the programming Hackathon.  Having already been drip fed some details of what the hackathon would entail I was still a little nervous because I just didn’t know what to expect or how I would react as an individual (even though I thrive on pressure) or how as a team we would work together. 

Michael opened the Hackathon and started talking about the data, the rules of engagement, and what was expected.  He touched on the team aspect of the Hackathon and mentioned encouraging others to join a team even if you didn’t know anyone on that team…I liked that idea.  Two of my Wipro colleagues, Zev Arnold and Peter Jackson, were also participating in the hackathon so we needed two more.  A very nice guy called Paw from Denmark approached our table and asked to join, he was more than welcome.  So we needed one more for a team of 5.  Out came my iPhone, I opened Twitter and sent Lonnie Bowling a tweet asking him to come join us on our team in the Hackathon.  Lonnie was presenting the next day so needed some beauty sleep so couldn’t join us this year.  I’ve given him 1 years notice for the next Hackathon to get plenty of sleep.  Then like a scene out of a film, the hackathon room doors were thrown open, a bright shining light filled the room and there at the centre of the light was a shadowy figure.  The room fell silent, footsteps were heard approaching our hackathon table followed by a Canadian French accent “Hi Rhys”…it was Gael Cotett, our French saviour and soon to be 5th member of our team.  Dramatic recollection aside, Gael was the 5th member of our team after joining us a few hours in to the hackathon right when we hit some issues with the “mapping” portion of our application where he helped to get us back on track.  Gael even went to bed, got in to his pyjamas, made a hot chocolate, put his eye mask on (okay, I’m exaggerating again) but then realised something about our application and ran back to the hackathon room to explain.  A great example of team work during the hackathon.


We did experience something during the hackathon that none of our team members were prepared for, something that proved to be the most difficult part of the entire hackathon for us: a team name.  Yep, we could write an application all night long but couldn’t focus our minds on a team name until we stumbled on the team name “01”.  We know, we know, we suck at team names.  We have vowed to go on a 1 week “team names 101” course.


In the end we finished our application, a journey mapping application with fuel efficiency overlays based on Event Frames, and presented to the judging panel.  We were all proud of what we achieved in such a short space of time.  Well it turned out that despite the poor team name, team “01” were chosen as the winners of the 1st Programming Hackathon! 

The cloud based environment seemed to work great on the whole for the hackathon, a few hiccups along the way but small things that will help to shape an even better hackathon next year.


The hackathons are definitely a must for all future vCampus Live events!


Hands-on labs
The hands-on labs this year were great and much improved from last year.  I had a couple of highlights from the hands-on labs, Abacus and OData. 
Abacus looks like it is going to propel AF further in to the laps of customers, not only because it looks like a well put together addition for AF but because it completes one of the most sought after gaps with AF; AF based scheduled calculations.  With that said it was after all a preview of what is coming and not at a beta stage yet.  There were questions that everyone wanted to ask, there were things that didn’t flow nicely (it would help to be able to drag & drop Attributes), and things that I just wanted time to try and break.  Overall I came away with a smile and disappointment, disappointing that I don’t have Abacus right now in a couple of projects.


The OData hands-on was one of my highlights because it was a new area of technology for me, it seemed to work great, had great content in the material and was the one lab I came away with multiple idea explosions in my brain.  It was definitely a light bulb moment for me, suddenly I started to get why the OData service is going to be great for mobile development, Win8 development and Azure (e.g. data exchange).  Great Job OSIsoft.


Keynote speakers
Rob Craft and Stephen Few were fantastic.  Some of the simplicity of Stephen’s work was a real eye opener, I am sure most of us think twice now before we change the type of an Excel chart to a Pie Chart.
Rob Craft had a wonderful presentation style that kept me glued to his every word, apart from the time when I was distracted by the shoes he was wearing.


Being voted as a vCampus All-Star for the 3rd year in a row was an obvious highlight and proud moment of vCampus Live 2012 for me.   I have long been a massive fan of vCampus and the community it has grown (that continues to grow daily!) so it is always a great honour to be rewarded by the very thing you believe in.  Even after 3-4 years of participating in vCampus I still feel the need to participate more each day as newer OSIsoft products are released, as the community grows, and as new innovative ways of using the PI System are materialising.  Looks like there are some changes coming up with OSIsoft communities as a whole, something I want to continue to participate in.   
It was a privilege to share the stage with Lonnie Bowling and Michael Halhead (in spirit ) as community All-Stars.
The OSIsoft All-Star awards this year were a great addition to the All-Star ceremony, after all the community wouldn’t be the same without the active participation of OSIsoft and its staff.  Congratulations to David Hollebeek, Chris Manhard and one of the vCampus founding fathers Steve Pilon.


Geek Extravaganza
The Geek Extravaganza night was a great idea that was implemented after everyone’s feedback from last year.  There was quizzes, drink, food, Jenga, drink, food, multiplayer RPG, drink, food … I even found out the next day that there was a Dancing arcade game.  Now I would have loved to have found that game on the night and thrown down some moves albeit long limbed moves…next year I’m all over it.  I hope this stays for future vCampus Live events.


Developers Lounge
My only disappointment of the event was the developers lounge.  It just didn’t seem to work for what I was expecting.  I was hoping for something like the expo pods at the regular User Conference but only OSIsoft expo pods (Event Frames, AF, PI Server, ProcessBook, ...) that are manned by 1 or 2 OSIsoft employees at a time so you can walk up to a pod, talk about a problem/issue/enhancement or whatever and see it right in front of you.  The room was too big with too little going on – why not have some arcade machines in there, a Xbox, … foster more of an engaging atmosphere.  My opinion on the developers lounge anyway, be interesting to hear other opinions here.


All in all a very successful vCampus Live 2012, thanks OSIsoft!  Only problem you have now is to better it next year.






Here are some humorous comments about my trip to vCampus Live 2012:

  • I forgot to pack my English Tea Bags; literally a “noooooooooo” moment when I realised sat on my flight halfway across the Atlantic Ocean.  Boy was I glad to get a proper cup of tea when I got home.


  • Heading back to my hotel room at about 2 am for “some sleep” during the hackathon only to flip open my laptop and work some more on our application in my room.  About 2 hours later I lied down for my 2nd attempt at some sleep but 2 hours later I was woken by my excited 3 year old son with the biggest smile shaking me saying “did you win Daddy?”  Needless to say that was my cue to get up, showered and back up to the hackathon room to finish off.  At least I could tell him and his younger brother the next day that we did win


  • Being sleep deprived for Day 1 of vCampus Live felt like I was walking around drunk.


  • Tweeting before vCampus Live about my new “Beats by Dr. Dre” headphones for some late night hackathon programming, having that tweet featured on the “new look vCampus” presentation by Ahmad but then realising after vCampus Live had finished that I didn’t even get the headphones out of my suitcase.


  • I was far too excited on the San Francisco 'Ride the Ducks' city tour.


  • Our ridiculously poor attempt at a Hackathon Team Name: “Team 01”.  Surpassed by our even worse application name of “01a”.


  • Telling a fib in Bubba Gumps restaurant on Fishermans Wharf that it was my birthday just so they would sing their happy birthday chant.  (It was my birthday 2 weeks before vCampus Live.)  My son, Ethan, had fish in a boat shaped plate.  He was amazed.


  • My obsession with eating the energy/protein bars from the developers lounge.  Apologies if every time you saw/spoke to me that I was eating one of those.


  • Trying to ice skate with a 3 year old after not skating myself for about 15 years.


After Part 1 and Part 2 of my blog on some fun stuff with ProcessBook I decided to do another post on the topic, most likely my last as I will soon find something else fun to do with the PI System & tools.  I tend to have a short attention span.


Anyway I will get right down to it.


vCampus Live is right around the corner, I am very excited to geek out in San Francisco.  I have seen the vCampus Live marketing banner in emails, on vCampus, on OSIsoft's TechSupport site, ... you can't miss it.  So I decide I would draw that in ProcessBook Trends.


This is the banner: 




Well I had to modify the code I created previously, this image was much bigger than the OSIsoft logo and needed some tweaking.  Well here is the 1st attempt:




Seemed to work pretty well.  Just as a reminder, this is drawn using traces on ProcessBook Trends using only PI Points as the data source!


I wanted it slightly better and more clear so had to tweak some more settings including the display zoom level.  This is the final result:




I was satisfied with that so stopped there.


You can even use the ProcessBook playback tool to show the trends updating to give the illusion of a scrolling banner from an image file  I was tempted to create an interface that ate an image pixel by pixel and drew it in ProcessBook but it is more work than my interest on this topic will last.




Next fun topic?  Not sure, feel free to post up suggestions.

I am finding the need to have a break from the norm with PI data to explore some interesting concepts with PI, which more than likely have no commercial benefit...they're just fun!


I blogged recently about writing my name on a ProcessBook trend.  Here is the blog post:


Cool, right?


Well I decided to go one better and draw the OSIsoft logo on a ProcessBook trend.  At first it was daunting and I seemed to scratch my head a lot in search of how I could do this, in fact I am sure I have a bald spot now.  I wanted it to look good, not the type of result where you need to squint your eyes to see the logo.  Anyway, long story short I did with some fairly simple code.  Below is how it came out after a couple of iterations to the code.  So, what do you think?




Feel free to guess how I achieved this.  Here is a hint (and a note for the ProcessBook team): you can only manipulate the characteristics of the 1st 12 pens of a trend even though you can have 50 traces (1st 8 pens are sequential in the enum, the last 4 jump up the enum a bit)!

I am a big fan of vCampus, surely that is obvious by now, but I also really like the OSIsoft Community.  As a result I keep in touch with Nick D’Orazio and we briefly talked about this post on the Community Forum:


ProcessBook Trend of turbine speed showed hunting (oscillation) where non occurred.


We both thought it made for a cool trend, and it is good to see how data visualizes itself sometimes.  I dropped in to the conversation that in my youth (I’m a father of 2 now and getting old at 31) I spent some time playing with ProcessBook trends and could make shapes and letters with a trace.  Nick was intrigued and asked for some evidence.


I dusted off some DVDs in search of my code but didn’t find any.  That to me was a personal challenge; I need to re-create an example of that. So off I went…




Well I didn’t spend as long as I thought I would as the memories of all those late nights came flooding back.  15 minutes or so later I came up the following in ProcessBook using the Trend object. 




Can you spot the hidden meaning of the data?






Now the mini challenge; can you figure out how I did this?

I thought I would take you all on a (scary) journey down the rabbit hole to see what wonderful concepts with the PI System are trying to fight their way out of my brain.  These are the type of projects that I have talked about before on the vCampus discussion hall, or even contemplated developing until I find myself moving on to the next crazy idea.  About time I shared some of these so they get the airtime they deserve and hopefully to get the creative juices flowing for others.


Actually, some of the ideas do make it in to code when I suddenly decide that it is time for a solo hackathon – you know, you finally settle down for the evening after getting both kids to bed when you find that you just can’t get that idea out of your head so you just start coding (usually whilst watching a re-run of the film ‘The Matrix’ for the 25th time)…then all of a sudden it is 4am, you have to get up for work in a few hours so not point sleeping now, right?




These R&D projects are ones that I will write about in a series of blog posts over the coming weeks so stay tuned.  To give you an idea of some of them, of which some are clearly inspired by rumours of what OSIsoft is researching, the following list gives a headline of the projects:

  • Natural Interface for PI System Management (Microsoft Kinect Sensor based).  “Grab hold of an interface connection and manage it.”
  • Emotional PI – Changing application user experience based on the users mood (Microsoft Kinect Sensor based –facial tracking!)
  • Server Side Buffering with Point Priorities (Windows Azure).  This was quite an easy one – are you listening PI Server team?
  • Next generation Performance Equations (AF + Microsoft StreamInsight).
  • Social PI – My PI Server just tweeted me!  So I tweeted it back!! (Twitter REST based).
  • Mobile based AF asset walker with location services (employing graph theory).

Whilst I flick endlessly through my calendar to find time to blog about each of these crazy ideas, is there any preference to what you all would like to read about first


Nearly 1 "PI" years old

Posted by RJKSolutions Sep 12, 2012

Today is my son Ethan's 3rd birthday, how time flies. I remember in 2010 I took him on one of his first flights, a monster 12 hour flight to San Francisco for an OSIsoft User Conference, he was 7 months old.  Ahmad once called him the youngest PI geek, which is probably true but I don't think he talks about the same PI as I do. After getting my 1st vCampus All Star award I posted a picture of Ethan wearing my vCampus t-shirt, so Ethan is well and truly exposed to the PI System ecosystem. I'll be sure to hire him when he is old enough Recently I tweeted a picture of my newest son Oliver (3 months old) and I on the beach in my 2nd vCampus All-Star t-shirt...maybe Ethan's crown has been taken as the youngest geek?


Anyway, apart from a trip down memory lane the point of my blog is that today on his 3rd birthday I wondered when is Ethan PI years old? Answer: November 2nd. So he will be having a "PI cake" and extra celebration on that day, and I'll be sure to post some pictures on my blog.


Sadly I found out I am 10.12 PI years old, which means I just missed out on my PI cake

Okay, so it was my son and he is actually 2 and half years old (as he tells me often the half is important) but today he taught me a lesson or two that made me sit back, reflect, and come up with this blog post.




My son, Ethan, is someone I am very proud of because he is already a geek like me [:)] In fact he even has his own iPad (iPad 2, not the “new iPad” – that is mine!!!) and already the way he used the user interface is so natural.  There is no clicking of the maximize button, using “File -> Open”, and so on, no he literally just swipes his way through the iPad with ease finding what he wants. 




I had a long day today that meant I was mentally exhausted and put my iPhone down, which was the cue for Ethan to come and grab my iPhone.  First, he swipes to unlock it and enters my code (I made the mistake of telling him it once, he still hasn’t forgotten it), which he then follows with “Oooo Daddy you have 4 Facebooks and 12 e-mails”.  I smiled, “Facebooks”.  Ethan then proceeded to open Facebook and pulled down the news feed to refresh it.  I thought to myself, “why didn’t he click refresh or hit F5”, then I realized that his generation just isn’t going to know that type of interface especially on mobile or tablet devices.  It is already the norm for them at such a young age, something us old school folk have had to adjust to, although the old way still comes back to haunt us.




The story continues…


After refreshing my news feed he then opens my notifications and shouted “Oooo Daddy tagged in a photo” followed by a swift click on the notification link.  At that point I sat up sharply just in case the photo was something I wasn’t expecting.   Up pops the photograph upon which he spreads his fingers to zoom in and finds me in the photograph.  Instead of pinching to zoom out he double-touches the screen and it zooms out…well I did not know that!  So that was my lesson on how to interface with my own phone.  Needless to say I shall be watching how Ethan uses his iPad to pick up some more tips.




The story continues just a little bit more…


When I have a few minutes spare I have an obsession, no not the kind you have to go to meetings for, it is the Microsoft Kinect.  To date I have concentrated quietly in my office on data streaming from the Kinect device using AF SDK RDA on Windows Server 8 to the PI Server 2012 as fast and efficiently as possible – some great results so far. 


After bathing Ethan I scuttled off to my home office and fired up my laptop.  Ethan comes in to the office whilst I am watching the performance counter of the PI Server snapshot events/second increasing then decreasing as my tracked skeleton is moving about on the screen.  He laughs.  He then spots the second Kinect sensor lying around in my office and says, “I’ll use this one, you use that one”.  “Okay” I said apprehensively.  I started waving at my Kinect sensor and Ethan saw my skeleton on the screen.  He laughed some more.  He then turned around so we were back to back, put his Kinect sensor on the floor facing him and started to wave at it using the opposite arm that I was using.  “Bing” – that was the sound of the light bulb going off above my head.  Before I work on any visualization or application with all this data being collected I need a second pair of eyes, in this case a second Kinect sensor validating the first load of data being produced.  The Kinect SDK supports multiple Kinect sensors so I now know what I am going to be doing for the foreseeable, working with two huge streams of data, validating each other with their inverse.




To give you all an appreciation of how all this data can be used to make sense for visualization or for a natural user interface application, PI Event Frames play a huge part in what I have built so far.  Imagine correlating specific events or gestures a user makes whilst using your application for viewing/interacting with real-time process data…not only do you see the user acknowledge an alarm, but you could check if they were even looking at what they were doing whilst acknowledging that alarm!  Validate quite literally how a user interacts with your application.




Take it even further in to the future and you drive a new car off the dealership with a Kinect sensor embedded in to the dashboard, able to detect if you are tired or you didn’t check your mirrors before taking that turn (face tracking correlated with the signals from indicator stork + light bulb, and speed of the car for distance to the turn)…a cars black box based on the PI System & Kinect!




Anyway, what started out to be a bit of a random story did flourish in to what I was trying to get across, and what I see people like our community friend Lonnie already blogging about, the world is being taken over by 2 year olds who don’t need mice, they just need their fingers and a piece of glass.



Some recent thoughts...

Posted by RJKSolutions Mar 12, 2012

Hello Community,


I have been feeling guilty recently for not blogging more frequently on vCampus, if only I could find some more hours in the day - the curse of being a vCampus All-Star .


Firstly, I want to start off talking about the OSIsoft User Conference that is coming up (go register now!).  Unfortunately I won't be able to make it this year as I have baby #2 on the way, due to arrive early May so I cannot take the risk of being an 11 hour flight away when I get that important call.  I need to stop having children that are due on or around the User Conference or vCampus Live! events.  There will be plenty of my Wipro colleagues in attendance (I encourage you to speak with them about anything PI) gathering intel and plying OSIsoft employees with alcohol with strict instructions to find out more about details and timelines for Server Side Buffering (Jay, watch out ).  Yep, I did it again, I mentioned SSB.  Seriously, the User Conference is a great annual event and I wish I could be there again this year.  I will be at vCampus Live! though with some exciting presentations.




For my next topic I am going to talk about StreamInsight.  vCampus has a dedicated forum ( for StreamInsight that seems to be relatively quiet, either people are keeping their cards close to their chests or they have not started on the road to development with PI & StreamInsight.  I am a StreamInsight fan since spending the last few months researching StreamInsight, developing with StreamInsight and looking at the OSIsoft PI for StreamInsight Adapters (that you can download right here on vCampus), and concluded that we need to get some more community involvement and discussion around development with the PI for StreamInsight Adapters.  How many of you reading this blog post have developed something using PI SDK?  Now all of you with your hands up, how many of you used EventPipes to capture data events as they happened?  If you still have your hand up then I suggest you take a look at the event driven nature of StreamInsight and keep it at the back of your mind next time you start developing an application that needs to respond to real-time events as they happen on your PI Server or Collective.  (Many, many other reasons for using StreamInsight but just wanted to fire off some thought processes in your heads with the PI SDK Eventipes example.)
In my usual obsessive manner, I will continue to post discussion points related to PI & StreamInsight, or random ideas that pop in to my head at inconvenient times related to how PI & StreamInsight can be used together.  For example, I have a nagging idea related to how Coresight can use a neat StreamInsight engine for common data requests for more efficient data retrieval.  Soon I will find some time to make sense of it and post it up on the forum. 




Lastly, I want to talk about the vCampus Community.  I hope that everyone else is feeling the nice momentum that the community has right now and is enjoying being part of that community.  Having been around since the beginning of vCampus I have seen it grow like my own son, from being relatively quiet needing input and guidance, to growing in to a self sufficient entity that now talks back!  I imagine that a lot of answers people have are now found by searching the forums, that people downloaded the AF SDK CTP with Rich Data Access  or the OLEDB Enterprise 2010 R3 quicker than they did the Windows 8 Consumer Preview, or that people get more e-mail updates (that they are genuinely interested in) from vCampus than they do from Facebook!  All in all, vCampus has been one of the best initiatives from OSIsoft for a long time and looks as though it is growing stronger each year; it is backed by a great vCampus team.  What I am looking forward to in the future is seeing an equivalent online community for TechSupport, and seeing both of those communities become a single thriving community one day.


That is all for now.



Firstly, blown away that I was voted as an All-Star for the 2nd year running.  Thanks to everyone that voted, but note that this now means I will just continue to post more, and more, and more, ...
Also, I want to congratulate Lonnie and Asle for being voted as All-Stars too!  Well deserved for both of you.


The Palace Hotel was a great venue with easy to access rooms for each of the presentations, learning labs and roundtables.  Quite liked the fact that we had breakfast and had the morning presentation in the same room, only issue with this would be that the stage seemed a little shoved in to the corner.  Nice to visit San Francisco again, but would be nice to have an event/conference on the East Coast of the USA (New York?) or in Europe (my biased opinion coming from Europe).
The Developers lounge was a nice addition to the event, although I didn't get much time in there. 


Learning Labs:
On the face of it a great idea and an opportunity to get hands on with some of the PI products, I saw some people got some real benefit from the labs which was good to see.  Couple of issues for me personally... 1) for future learning labs it might be an idea to give an anticipated level of experience/knowledge of the product, some of them were not as the title described (e.g. Coresight 'under the hood' was just installing Coresight). 2) there were quite a few problems with the match up to the virtual environment and what was on the handouts, missing steps, incorrect steps, and so on.  These need to be more accurate.
Of the learning labs I did like the PI Event Frames lab, it had good content.  For future learning labs how about before the event attendees submit a real world problem and all people that attend a learning lab help to solve a problem (that OSIsoft picks) with some real hands on work of the PI product(s) in focus? 


High quality presentations that were a credit to the event, some got me very excited.  In particular I thoroughly enjoyed the PI Server 2012 presentation.  A lot of features in PI Server 2012 I have needed for a long time now and it is exciting to see they are coming, the presentation was well presented considering it also involved some live demonstrations.  Powershell, Archive data backfiling on the fly, incredible performance updates to some core parts of the PI server (update signup rates, point lists, start up times, ...), etc - already pushing one project I am working on to sign up for the PI Server 2012 Technology Adaption Program.
The next presentation that caught my full attention was a surprise to me, it was the security presentation about STUXNET and security in general.  A real eye opener that got my attention quickly and immediately made me download Metasploit, Armitage and some other tools to take a serious look in to the security aspects of PI System projects that I am involved in.  Great presentation from SCADAHacker and Bryan Owen.
Some others that I watched and enjoyed were the Cloud/Mobile (Lonnie), Event Frame Corrosion Coupon, Ekho (like this system a lot), and human body monitoring presentations.  


Any other presentations of note that you all watched? Please let me know so I can catch the recordings.


Overall, great event, great attendees, great OSIsoft staff and great All-Star goodies!!  Will definitely be attending next year.



PI is wrong!

Posted by RJKSolutions Jun 28, 2011

No, I am not referring to OSIsoft's data historian but to the mathematical circle constant 'PI'; Tau is, apparently, right and PI is wrong.


March 14th is 'PI day' but today (June 28th) is 'Tau day' and you call read all about it in the Tau Manifesto or in Bob Palais' PI is wrong publication.


Hopefully no one in OSIsoft's marketing department panics at my blog title (or decides to rebrand the products, e.g. "Tau Coresight") .

Skeletal PI

Posted by RJKSolutions Jun 17, 2011

A quick blog post, apologies (or maybe a blessing) for the lack of the usual waffling in my posts.  I mentioned about the Kinect for Windows SDK in one of my other blog posts, well it is now officially available for free from Microsoft Research!  Read all about it here.


Never mind all this 'cloud' nonsense, being able to wave at PI is what everyone wants!  


How about an OSIsoft vCampus competition for the first novel development of Kinect with PI?



Filter Blog

By date: By tag: