6 Replies Latest reply on Dec 8, 2016 5:11 PM by jmcgraw

    Populating Future Data - Updating Multiple Values on Single Tag

    KOEPKEJR

      We have just  begun looking into Future Data with PI and I am running into an issue.  I would like to create a single tag which contains 168 hours of forecast data.  This forecast data is updated every hour therefore I would like to overwrite the previously written 167 hours of forecast with the new data.

       

      In PSE is it possible to:

      • Write multiple forecast values to a single pi tag (each offset by an hour)?
      • Align the output timestamps such that the previous forecast for a given hour is overwritten?
      • Do all of this without creating 168 analyses?

       

      For simplicity, assume I have 168 separate tags representing each hours' forecast.

       

      Thanks in advance,

       

      Joel

        • Re: Populating Future Data - Updating Multiple Values on Single Tag
          jmcgraw

          Hi Joel,

           

          Could you elaborate on the source your forecast? Are you planning on using AF Analytics for calculating your forecast values, or will they be coming from a third-party analytics platform?

           

          If you're going to be using an analysis expression supported by AF Analytics, you could use some of the new analysis execution and recalculation functionality exposed in AFSDK 2.8.5. If you're using a third-party predictive analytics solution (e.g., Azure ML Predictive Web Service, on-site R server, etc.), you could possibly use the PI Connector/Interface for UFL and choose to overwrite existing events to accomplish your goal.

           

          Thanks,

          John

            • Re: Populating Future Data - Updating Multiple Values on Single Tag
              KOEPKEJR

              John - Thanks for the response.  The type of information we want to use is calculated in different black-box-esque applications.  We are getting the data as tags and by querying Oracle instances.

               

              I would prefer an out-of-the-box approach as opposed to custom code.

                • Re: Populating Future Data - Updating Multiple Values on Single Tag
                  jmcgraw

                  How are you obtaining the data from Oracle? Are you using AF Linked/Imported Tables or the PI Interface for RDBMS?

                   

                  If you're using the PI Interface for RDBMS, here's an approach that should work:

                  1. The PI Interface for RDBMS supports future data tags, just configure them as any other RDBMS PI Point
                  2. Configure this point to be on a 1-hour scanclass with no offset (so it will query new values every hour)
                  3. Develop your query so that it returns the rows for the 168 hour window you're interested in
                  4. The RDBMS Interface will overwrite the existing values at the timestamps returned by the query by default, i.e., updating your forecast tag to the most recent forecast events.

                   

                  Please let me know if this methodology sounds like it will work for you and if you encounter any issues in implementation.

                  • Re: Populating Future Data - Updating Multiple Values on Single Tag
                    jmcgraw

                    Hi Joel,

                     

                    Have you had an opportunity to evaluate the recommendation above for configuring the PI Interface for RDBMS? Please let us know if this approach works for your needs.

                     

                    Kind regards,

                    John

                      • Re: Populating Future Data - Updating Multiple Values on Single Tag
                        KOEPKEJR

                        John - We are using AF Linked tables to bring in the Oracle forecast data.  We have not yet utilized RDBMS at our facility.  As for the forecast data being received as tags (e.g. forecastHour0, forecastHour1, etc.), I don't believe RDBMS is a solution.

                         

                        Is it not possible to use PSE to load this forecast information?

                          • Re: Populating Future Data - Updating Multiple Values on Single Tag
                            jmcgraw

                            The forecast data could be stored within one tag written to by the RDBMS interface, which can be scheduled to query and write out the 168 hourly values to a single tag every hour, overwriting existing values, or as desired. It is a highly configurable interface that is worth investigating for this use case.

                             

                            Currently, there is no way to use AF Analytics to perform this task. It could be technically possible with 168 different analyses, however even this would not allow you to overwrite values without the use of the AFSDK to recalculate the analyses.

                             

                            If you wish to store this Oracle forecast data in PI Tags, the best solution is using the PI Interface for RDBMS configured as mentioned above. I'd be happy to discuss this over the phone if that's helpful.