I am trying to create an event list in Processbook/Coresight that will show the last 40 events that have come in from a specific PI tag (see attached). Is there any way to do this in Processbook or Coresight?
In Coresight it is not possible and using PI ProcessBoook there is no a straight forward procedure and it involves programming in VBA.
Option 1 (Easiest way but data will not update): Create an Excel file by using PI DataLink and retrieving compressed data - Number of values and save it into a file. Then, in Processbook, navigate to Insert > Object. Create from file and define the excel file with the information from DataLink. Select also “Link” and OK. In this case, the table will not update unless you make double click into it and the excel file will open. You can keep the excel file opened and set the Excel’s visible property to false so that the Excel application will be hidden from the end users. This way, the table will update if there is another VBA code that will perform a full Calculate in Excel.
Option 2: Insert an Excel OLE object in Processbook and force the object to update with new information whenever a new action occurs in ProcessBook. You can define the DataLink function manually (you do not have the menu so you have to write the formula by yourself). Then, write VBA to work with the OLE object, see more information in the youtube video: http://www.youtube.com/watch?v=k94rW7f1Jrs&feature=relmfu
An example of the code would be:
Private Sub Display_Open()
Dim myobj As Object
Set myobj =Application.ActiveDisplay.OLEObjects.Item(1).Object
'If you ever want to allow editing of the spreadsheet using an in-place activation:
'This is terminated by:
Set myobj = Nothing
Option 3: Using VBA code to access the information directly.
Hi Cyril Brunner Were you able to test any of the options provided? Can we consider the thread solved?
Interestingly...if the original poster wants to, then you can list out the events with some fusing of Web API to PI Coresight. Some inspiration can be found here: What next for my PI Coresight hackathon?
I'd be quite interested to reproduce the "Details" add-in from ProcessBook into PI Coresight.
I would not say its solved, we were able to achieve this in Datalink but no in processbook or coresight.
Seeing this thread bumped up.
One could create some analytics AF attributes that would get an increasing level of events reading backwards using PreEvent, and show all 40 in CoreSight. Not so nice, but using child elements, eyes don't hurt too much...
Retrieving data ...