YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Processbook Module Relative Displays Options · View
Rob Lyon
#1 Posted : Monday, October 25, 2010 8:21:50 AM
Rank: Newbie
Groups: Member

Joined: 10/25/2010
Posts: 3
Location: New Zealand
I'm looking for some help and advice with a processbook Module Relative Display I'm working on.

The display has 40 Aliases on it. For each Alias tag there are 4 properties also read from the MDB and displayed, making a total of 200 value symbols. There's a Trend Element to show a trend of the selected Alias tag and an MDB tree element to change the module context. The display can and does operate in ActiveView as well as in Process Book. Everything is working correctly.

But its as slow as a wet week. It takes around 60 seconds to open and around 20 seconds to update after changing the module context. If I build a test display with no VBA code and around 20 Alias Tags performance is fine. Is this normal or is something wrong ? Any hints or tips on getting the best out of a the module database would be much appreciated.
Sponsor  
 

OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System.
We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ  or contact OSIsoft vCampus for more details.
RJK Solutions
#2 Posted : Wednesday, October 27, 2010 11:01:20 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Hi Rob,

What type of VBA code do you have in the background of the MRD? What version of ProcessBook do you have? i.e. Do you have AF available?
Assuming you have no real network issues then you shouldn't see load times of 60 seconds...something certainly not acting as it should there.


Principal Consultant
Real-Time Data Management @ Wipro Technologies
Rob Lyon
#3 Posted : Thursday, October 28, 2010 12:15:19 AM
Rank: Newbie
Groups: Member

Joined: 10/25/2010
Posts: 3
Location: New Zealand
I have as little VBA code as I can get away with.

The VBA code sets the Module Context depending on the value of a PI Tag (ie. If current Grade is "X", set module context = "X".) From everything I can figure out in the code, the ContextResolver takes about 100ms to resolve each tag on the display. Hence, it is not a noticeable problem when there are only 10 tags or so, but its very obvious when there are 200 tags.

There is also code to loop through all the MultiState symbols in the Symbols collection and reset the limits of each multistate as required. This routine works correctly and is reasonably quick, (but it has problems because it is triggered before the Context resolver has finished properly, but that's a different story) and code to update a trend symbol. In total maybe 150 lines of VBA code


The end user has PB version 3.0.15.7, but I have version 3.2.0.0 and the problem is the same on both versions.

No, the end user does not have AF, so I cant get round the issue by migrating away from MDB Tongue

Assuming we have no real network issues is a big assumption. We already suspect the performance of the network (or at least the connection between PI clients & the Server) as it takes quite some considerable time to load large quantities of trend data - ( to the point where some OSI guys have commented "Hmm, it shouldn't take that long. I wonder whats wrong", before wandering off onto the next issue. )

Everything I can see points to the context resolver being horribly inefficient, but "why" is a different question. Think
Tommy
#4 Posted : Tuesday, November 02, 2010 9:56:37 PM
Rank: Member
Groups: Member

Joined: 7/19/2010
Posts: 20
Can you try to pull the MDB tags in to Excel and see how slow or fast that is?

In one system, I have roughly 30 MDB Aliases, each with 10 properties. In Excel, I list the Aliases in a column, and the properties across a row, and use the "import MDB property values" command with pointers to excel cells to build the correct path to the MDB property (e.g. the property address is "path\to\"&$A2&"\"&B$1 (to create "path\to\module1\property1"). Then I copy the entire PI formula into all the other cells and Excel then queries the MDB 300 times for values.

My point is that when I VPN into the network, the workbook updates very slowly - on a similar time scale that Rob is experiencing. However, when I am on-site and on the network, it is much much faster (probably as fast as Rob was hoping in the first place).

Maybe you can build something in Excel to pull those values in and see if that's still slow?
Is ProcessBook still slow if you delete the trend?
Can you post a section of the VBA code? Is it perhaps trying to make a new connection to the server for each of the 200 Alias tags?
Disclaimer: Any code presented by myself might be unconventional because of the lack of formal training. Any corrections are welcome. =)
Rob Lyon
#5 Posted : Wednesday, November 10, 2010 12:54:40 AM
Rank: Newbie
Groups: Member

Joined: 10/25/2010
Posts: 3
Location: New Zealand
I haven't tried excel because the whole point is to use a PB display. The display will eventually end up embedded on our DCS using ActiveView so an excel solution is no use to me unfortunately.

I have an open support case with OSI. We have eliminated suspected network issues by installing the same PB display on a couple of different PI systems at the customers other sites. Performance is terrible everywhere.

There are only 2 calls to the context resolver in the code - one for properties and one for aliases. So if it is trying to make a new connection for each of the 200 tags it is not something I can control.


Code:
Private Sub MDBTree1_nodeSelectedEvent(rightClick As Boolean, selectionType As Integer, treeNode As PIMDBTreeCtl.MDBNode)
   
    ' This routine updates the module context with the selected module
   
    If rightClick Then Exit Sub
   
    Dim mrd As ContextHandler
    Set mrd = ThisDisplay.Application.ContextHandlers.Item("Alias")
    mrd.CurrentContext(ThisDisplay) = MDBTree1.getFullPathName(treeNode, MDBPATH_FULL)
   
    Set mrd = ThisDisplay.Application.ContextHandlers.Item("Property")
    mrd.CurrentContext(ThisDisplay) = MDBTree1.getFullPathName(treeNode, MDBPATH_FULL)

    ' there seems to be a problem with the execution of MRD.CurrentContext and / or MRD.contextupdated
   
End Sub


There are a lot of modules as well and it seems the context resolver gest exponentially slower the more possible contexts and tags there are on a display.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.