18 Replies Latest reply on May 26, 2015 12:35 PM by Nocodes79

    Generating PI Coresight displays with tables on the fly


      Hello everyone,


      we are studying the possibility of generating Coresight display (not just simple ad-hoc trends) on the fly.


      The idea would be following:

      1. querying AF to get a list of the attributes we want to show (through JDBC\ PI WebAPI)
      2. generating a display in Coresight with a table showing all attributes' information
      3. showing the display to user
      4. on close, remove the display from the Coresight site


      Apart from using 3rd party component to show the table, I think the only possibility would be generating the Coresight display directly using the SQL DB behind Coresight, but it would need reverse engineering the DB and it would be not supported nor recommended by OSISoft.

      Does anyone have experience about this kind disply generation with Coresight?


      Does anyone have any other idea about how to create the displays programatically?


      Thank you in advance.

        • Re: Generating PI Coresight displays with tables on the fly

          Hello Nicola,


          We had a presentation at vCampus Live! 2011 that showed how to to interact with the PI Coresight Web Service and programmatically generate a PI Coresight display from another application (that presentation can be downloaded here). To be fair, that example is quite old , and at least one of the technologies used in PI Coresight back then (PI Web Services) has been replaced by PI Web API. You could use that for "inspiration" though

          A couple of questions:

          1. Why aren't ad hoc trends an option in your case? it seems to me they address most of your needs (with the extra step that you would have to change a trend for a table)
          2. Which programming technology do you intend to use?

          Please let us know, we are definitely interested in having more details on your use case and eager to help.



            • Re: Generating PI Coresight displays with tables on the fly

              The techniques in the 2011 presentation should still work, but I'd highly, highly recommend not using that interface into PI Coresight. It's based on the older "SOAP" technology and is left in PI Coresight for backwards compatibility and may be replaced in the near future.Besides that, I believe the API I used then still only created trends and these displays were saved permanently, so the clean up of them would be a problem.


              The URL parameters we have now are superior, but still they only generate trends.


              In the short term I can't think of any good approach other than what Tom suggested below.

            • Re: Generating PI Coresight displays with tables on the fly

              Hi Nicola,


              Good question, and it is good to hear of someone wanting to use PI Coresight in this way.


              As you probably expect from the PI Coresight product manager, I would not recommend writing directly to the SQL database.  This could cause the whole application to become unstable, and maybe even more of a problem, anything you do is likely to break when the PI Coresight server is upgraded, meaning you will have to regularly debug and fix your application if you want to take advantage of new features (and we have lots of really cool stuff coming ).


              I do have a suggestion for you however.  Manually create a PI Coresight display with the table information you want, then use the related asset feature (URL parameter: ?Asset=) to switch the data in the display to show the asset the user needs to see.  Of course this requires that the problem you are trying to solve has some manageable number of similar assets and that you have these assets created in AF using a template.


              Another option is to use an element relative PI ProcessBook display imported in to PI Coresight 2014 and then set the Element of Interest (URL parameter: ?CurrentElement= ).  Similar requirements as above, but in this case you can use relative element paths to have a more complex display, and the elements do not need to be based on a template.


              From a long term perspective, I expect you will be able to pragmatically create more complex displays in PI Coresight, but it will not be until we introduce a new display editor that is build in HTML5 instead of Silverlight.  We have already started on the new editor and expect to deliver the first iteration in the first half of 2016.


              I hope this helps.

              • Re: Generating PI Coresight displays with tables on the fly

                Hi all,


                thank you for the answers. The need to generate it progrmatically is due to the lack of homogeinity.


                I mean that the objective would be comparing some wind turbines parameters for different plants.

                Let's suppose we have:

                • plant 1: 3 WTG's
                • plant 2: 10 WTG's


                For example, I would want to show the Gearbox Temperature at each turbine in a table. So I would select the plant and I would have to check how many turbines elements each plant has and retrieve data in the table for each turbine.


                So in the table I would have 3 measures for the first plant and 10 for the second. In my understanding this dynamic number of attributes to show behaviour cannot be accomplished using the URL parameters. Am I missing something?


                Then I would like to switch the measure to check the wind speed at different WTG's. This wouldn't be possible either in my undestanding..


                About the technology in use, I am not really sure as it is a portal developed by a different company. I only know it uses some kind of Java technology with a component to embed Internet Explorer pages.

                  • Re: Generating PI Coresight displays with tables on the fly
                    Eugene Lee

                    Hi Nicola,


                    First, to use the related asset feature, you should derive all your turbines from a common Turbine template. In the table, you will only need 2 measures. One for the Gearbox Temperature and one for the Wind Speed. It doesn't matter which plant the Turbine is under since you will need to include the full asset path anyway in the URL parameter which will need to include the plant number.


                    The related asset feature has to be based on templates. So in your case, plant1 and plant2 does not seem to be able to share the same template unless you create 7 empty placeholder turbines in plant1 to match that of plant2.

                      • Re: Generating PI Coresight displays with tables on the fly

                        Hi Eugene,


                        that is the reason why I can't use URL parameters.


                        I can't add dummy Turbines because the AF DB is feeding more application and adding dummy tubines would mess the other applications. Furthermore there are something like 500 plants with some which have around 100 WTG's.


                        So I would have 500*100= 50k turbines where only around 15k trubines are real and this doesn't look really clean as a solution for this case.

                    • Re: Generating PI Coresight displays with tables on the fly

                      Hi Nicola,


                      Were you able to reach a resolution regarding your question above? If so, please let us know or mark one of the answers as "Correct Answer"? If not, would you mind giving us some more information on the current status of the project so we can further assist you? Thanks.

                        • Re: Generating PI Coresight displays with tables on the fly

                          Hi Daphne,


                          I really appreciate all the answers. The solution would be similar to the one proposed by Marc Fortin.


                          For the moment we decided not to implement the table with Coresight.


                          If I can propose an enhancement it would be to permit the table to show data for an element and its children.

                          It would be something like:

                          - select element

                          - select attribute/s to show for the element

                          - enable show data for children

                          - filter children with one template

                          - select attribute/s to show for children


                          The result would be a table with data for the attribute/s selected for the parent and the data of the attribute selected for each one of the elements children. From my experience it is something really useful for cases like Wind Farms where you have a big amount of WTG's to compare and eventually compare it with the Farm Average.