11 Replies Latest reply on Jan 10, 2018 7:00 AM by Eugene Lee

    Question - Coresight Symbol Extension with Multiple data source using AF heading as input.

    dmauldin@dbmsoft.com

      I have been trying to understand the behavior of the data object returned when "Multiple" data source is returned.   I have searched the documentation for a description, but have not found anything.   I have tried to understand the logic for the donut symbol that was created. 

       

      My goal for this current exploration is to create a single Symbol that will display the value of selected attributes for an AF entry.  I am using the supplied AF example for Feeders.

       

      I have been trying to understand the expected behavior when I select an AF heading as the input for a symbol.

       

       

       

       

      If, for the symbol, I specify a data source of Single and use TX211 as an input, multiple instances of the symbol are created, one for each child attribute.  My interpretation was that, if I specified Multiple, I would receive a data object that had a row for each attribute.  But, it looks like I only receive the first attribute (Current).  Is this the expected behavior?   If so, then I can parse the returned data.Path or use the webAPI to get the parent.   Then, I could iterate through the attributes, selecting and displaying the ones I want.   Is this the best way? 

       

      I also need to understand the data return for data update for a Multiple data source.     Is there some documentation that I am missing?   If not, could you provide an explanation.  I am studying the existing symbols, but trying to reverse engineer the object is not only difficult, but, for me, probably error prone.   I would like to understand the Multiple data source for a couple of other symbols that I want to develop.

       

       

      Thanks.

       

      Don

        • Re: Question - Coresight Symbol Extension with Multiple data source using AF heading as input.
          asorokina

          Hi Don,

           

          Your interpretation is right, data source Multiple should give you multiple rows (assuming the DataShape is 'Table'). While playing around with this, I noticed that changing the symbol Datashape or datasourceBehavior parameters for some reason doesn't update the existing symbols on the display (even after hard-refreshing the page, cache cleaning and iisreset). I had to switch the symbol to something else (e.g. trend symbol) and then switch it back to my custom symbol. Another option is to delete the symbol and re-add it. I'll report this issue internally.

           

          More information on data source behaviors and data shapes can be found under the Data Updates chapter of the documentation, page 12. To add some visual examples to what we have in the manual: below is a table of examples of returned data objects with different datasourceBehavior and DataShape parameters.

           

          Cheers,

          Anna

           

          DataShape

          CS.Extensibility.Enums.DatasourceBehaviors.Single

          CS.Extensibility.Enums.DatasourceBehaviors.Multiple

          Value

           

          Regular data update:

           

          With metadata:

          Value data shape doesn't support multiple data sources.

          This configuration will produce the same results as with CS.Extensibility.Enums.DatasourceBehaviors.Single. Only the first data stream dropped on the symbol will be present in the returned data object.

          Gauge

           

          Regular data update:

           

          With metadata:

           

          Gauge data shape doesn't support multiple data sources.

          This configuration will produce the same results as with CS.Extensibility.Enums.DatasourceBehaviors.Single. Only the first data stream dropped on the symbol will be present in the returned data object.

           

          Trend

          This configuration will result in the same data object as with CS.Extensibility.Enums.DatasourceBehaviors.Multiple.

          However, the Traces array will be limited to one element only.

           

           

           

           

          Regular data update:

          With metadata:

          Table

          This configuration will result in the same data object as with CS.Extensibility.Enums.DatasourceBehaviors.Multiple.

          However, the Rows array will be limited to one element only.

          Regular data update:

           

          With metadata:

          TimeSeries

           

          This configuration will result in the same data object as with CS.Extensibility.Enums.DatasourceBehaviors.Multiple.

          However, the Data array will be limited to one element only

           

          Regular data update:

           

          With metadata:

           

          5 of 5 people found this helpful
            • Re: Question - Coresight Symbol Extension with Multiple data source using AF heading as input.
              dmauldin@dbmsoft.com

              Thank you, Anna.

               

              I have been doing more testing(lots).  The information you provided helps.

               

              I am still confused about the expected behavior when I use an AF element with attributes as the single input to a symbol with a "table" DataSourceBehavior.  I have been using the OSIsoft supplied test systems for both Distribution Transformers and Feeders.  I modified the PutVal symbol into a "Multiple Test" symbol.  The MultipleTest.js code reads the input array, tests for the presence of the path for each row, and logs the path for the rows(zero based).

               

              I have multiple attachments

              sym-MultipleTest.js: the symbol javascript

              sym-MultipleTest-template.html for the symbol

               

              af_feeder.png - a screenshot for TX211 for the feeder  voltage af database

              af_transformer.png - a screenshot for TX211 for the Substation Transformer af database

               

              Feeder.PNG - A screenshot for the symbol outputs when TX211 from the Feeder database is the only input to the symbol

              SUbstation.PNG - A screenshot for the symbol outputs when TX211 from the SUbstation database is the only input to the symbol.

               

              I do not understand the results.

              All of the attributes for TX211 are a part of the data array.  I have not found documentation for this, but it seems repeatable.

              More surprising is that some, but not all, of the attribute tag references are included in the data array.  I am surprised that only some of these tags are included.

                   Feeder - Loadf, Load, Current   Included 

                   Substation - Loadx, CUrrent, Top-Oil Temperature, LTCPosition   Included   Others not.

               

               

               

               

              Could you describe the expected behavior when, for these databases, the TX211 entry alone is used to create the symbol.

               

               

              Thanks.

               

              don

                • Re: Question - Coresight Symbol Extension with Multiple data source using AF heading as input.
                  asorokina

                  All of the attributes for TX211 are a part of the data array. I have not found documentation for this, but it seems repeatable.

                  That's right. This is exactly the same behavior you see when you drag and drop an AF Element to create a native PI Coresight table. It will automatically pick every attribute of the dropped AF element.

                  More surprising is that some, but not all, of the attribute tag references are included in the data array. I am surprised that only some of these tags are included.

                  Feeder - Loadf, Load, Current Included

                  Substation - Loadx, CUrrent, Top-Oil Temperature, LTCPosition Included Others not.

                  The Tagname entries you see in the list are in fact child attributes of the attributes that you've listed. They're used behind the scenes, not really intended for humans.

                   

                  Cheers,

                  Anna

                  • Re: Question - Coresight Symbol Extension with Multiple data source using AF heading as input.
                    Eugene Lee

                    All of the attributes for TX211 are a part of the data array.  I have not found documentation for this, but it seems repeatable.

                    More surprising is that some, but not all, of the attribute tag references are included in the data array.  I am surprised that only some of these tags are included.

                         Feeder - Loadf, Load, Current   Included

                         Substation - Loadx, CUrrent, Top-Oil Temperature, LTCPosition   Included   Others not.

                    I don't really understand what you mean by some, but not all, of the attribute tag references are included in the data array because you already said All of the attributes for TX211 are a part of the data array. They kind of contradict?

                  • Re: Question - Coresight Symbol Extension with Multiple data source using AF heading as input.
                    Roger Palmen

                    I should have read this part more closely: I noticed that changing the symbol Datashape or datasourceBehavior parameters for some reason doesn't update the existing symbols on the display (even after hard-refreshing the page, cache cleaning and iisreset). I had to switch the symbol to something else (e.g. trend symbol) and then switch it back to my custom symbol. Another option is to delete the symbol and re-add it. I'll report this issue internally.

                     

                     

                    That would have saved me some time wondering why i did not get the data i expected!

                    • Re: Question - Coresight Symbol Extension with Multiple data source using AF heading as input.
                      NicPickering

                      What is the coding language that you have shown here?

                       

                      I'm looking at creating a custom symbol and this might be able to help me. I have very little knowledge of creating custom script or custom symbols, I was wondering if you could give me a run down of the basics?

                    • Re: Question - Coresight Symbol Extension with Multiple data source using AF heading as input.
                      dmauldin@dbmsoft.com

                      Thanks, Anna.  Thanks, Eugene.

                       

                      Anna, your explanation of the sub tags makes sense.  I had not noticed the + sign indicating that there was something underneath them.  I was only counting the top level assets and comparing that to the number of rows in the data array.  But, I still do not understand one thing.

                       

                      In the AF Feeder database for transformers, there are four instances in  which a tagname is a child of the attribute

                           Current

                           Loadx

                           LTC Position

                           Top-Oil Temperature.

                       

                      But, only three of these instances of tagnames show up in the data array.

                            Current

                           Loadx

                           LTC Position

                       

                      Top-Oil Temperature | Tagname does not.

                       

                      I am not sure why this would be the case.

                       

                      Ideas?

                       

                      But, this explanation is sufficient for me to move forward.

                       

                      As stated, my goal is to create a composite symbol with information from several attributes in the symbol.   This removes generality, since the symbol will be tailored to a particular AF database.   But, it will create some flexibility in creating displays.

                       

                      After I get this working, my goal is to be able to create a station display that is sufficiently general to accommodate different numbers of assets  ( 1-4 transformers, for instance) that can be viewed on an element relative basis (station).

                       

                       

                      Thanks for clarifying my understanding.

                       

                       

                      Don

                      • Re: Question - Coresight Symbol Extension with Multiple data source using AF heading as input.
                        dmauldin@dbmsoft.com

                        Thanks, Anna.

                         

                        The collection feature looks very similar to what I am trying to implement.

                        I still have lots of studying and testing to do.

                         

                        Thanks again for all your help.

                         

                         

                        don