5 Replies Latest reply on May 31, 2011 10:23 PM by dtakara

    Interesting Project - Electricity Market Trading Processbook Display

    OxleyCreek

      I am working with a Power company who are installing a new PI system. They have a number of different SCADA systems at their sites. One of their requirements is a PI display for their Market Trading staff that provides a consistent view across the sites instead of having to connect to different SCADA HMI's as they do now.

       

      There are 12 "screens" in this display that are selected by a ribbon of buttons at the top of the display that is always visible - this mimics a typical SCADA HMI display. Some of the screens are quite complicated in that there are hundreds of tags that represents 30 minute MW bids for 48 hours for multiple generator units.  

       

      It needs to be as responsive as possible so I want to avoid loading separate display files as they navigate through the "screens".

       

      If it was up was up to me I would be using C#, Windows forms and PI SDK but the client sees processbook as something they can maintain themselves and I guess this is fair enough.

       

      My plan is to build the individual screens as layers in a Processbook display with the layers in a verticle stack -  when the user selects a screen via a command button the relevant layer is made visible and others made invisible.  The individual screens are combined as composite symbols to make things more manageable.

       

      I have started the project and the concept seems to work with the two screens I have developed so far. There are a couple of issues that are a problem.

       

      I want to give the composite symbols ("Screens") descriptive names so my VBA code is more readable - it seems I can only do this with VBA code - is it possible to rename symbols on the processbook design screen? When I want to edit a composite symbol I will need to ungroup and then regroup afterward - my names will be lost and it will be a nightmare to have to write code every time to rename the symbols back to what my VBA code expects.

       

      Am I likely to run into limitations with the number of symbols I can have in a processbook display - is there a limit? I will probably end up with 1000 - 2000 symbols.

       

      Am I asking too much of processbook and VBA? Would activeview combined with windows forms be a better option.

       

      Michael Jones

       

       

       

       

        • Re: Interesting Project - Electricity Market Trading Processbook Display
          dtakara

          Hi Michael,

           

          Thank you for sharing your use case with the community! It's certainly interesting!

           

          As for your question

           

          Michael Jones

          I want to give the composite symbols ("Screens") descriptive names so my VBA code is more readable - it seems I can only do this with VBA code - is it possible to rename symbols on the processbook design screen? When I want to edit a composite symbol I will need to ungroup and then regroup afterward - my names will be lost and it will be a nightmare to have to write code every time to rename the symbols back to what my VBA code expects. 

           

           

           

           

          as far as I know, in ProcessBook build mode it is possible to rename symbols, but not composite symbols.

           

          You may want to use the subs below, as auxiliary tools while maintaining your composite symbols. I am attaching a sample display where they can be experimented.

           
          Sub ShowCompositeSymbolProperties()
                Dim compositeSymbol As Composite
                Dim component As symbol
                Dim i, j As Integer
                Dim message As String
                
                For Each symbol In ThisDisplay.Symbols
                      If TypeOf symbol Is Composite Then
                          Set compositeSymbol = symbol
                          message = "Composite Symbol name is " & compositeSymbol.Name & vbCrLf
                          message = message & "Composite Symbol components are: " & vbCrLf
                          For j = 1 To compositeSymbol.GroupedSymbols.Count
                                Set component = compositeSymbol.GroupedSymbols.Item(j)
                                message = message & "[" & CStr(j) & "] " & component.Name & vbCrLf
                          Next
                          MsgBox message
                      End If
                Next symbol
                
                Set compositeSymbol = Nothing
                Set component = Nothing
          End Sub
          
          Sub RenameCompositeSymbol()
                Dim compositeSymbol As Composite
                Dim i As Integer
                
                For Each symbol In ThisDisplay.Symbols
                      If TypeOf symbol Is Composite Then
                            Set compositeSymbol = symbol
                            ' renaming compositeSymbol from "SymbolGroupA" to "SymbolGroupB"
                            If compositeSymbol.Name = "SymbolGroupA" Then
                                compositeSymbol.Name = "SymbolGroupB"
                            End If
                      End If
                Next symbol
                
                Set compositeSymbol = Nothing
          End Sub
          

          Regarding your other questions, I'll let other people in the community comment. When I was a system integrator myself, I never had to think of options to build ProcessBook displays with so many symbols.