8 Replies Latest reply on Feb 21, 2018 12:55 PM by Olav

    ACE recalculation does not update output tags

    Olav

      Hi.

       

      I have a PI ACE calculation that I wish to recalculate for a timeframe a few months back. The calculation is running on a clock schedule, and normal operation works as intended. However, when trying to run a recalculation, the output tags does not update. I cannot find any error messages in the PI message log on the PI archive or on the PI ACE node. Any tips on how to troubleshoot would be appreciated.

       

      I have read the PI ACE manual and several KB's on the subject, but am not able to solve the issue.

        • Re: ACE recalculation does not update output tags
          Dan Fishman

          Is the timeframe you wish to recalculate longer than 30 days?  Also, have you turned up the debug logs for ACE and looked for any messages regarding recalculation?

           

          From my experience, ACE recalculation could take a minute or two to actually start and the changes to be read from the module database. Is there any code that changes the behavior during recalculations or any code that might use DateTime.Now() instead of .ExeTime?

          1 of 1 people found this helpful
            • Re: ACE recalculation does not update output tags
              Olav

              Hi.

               

              The timeframe we are trying to calculate is up to 30 days, but not longer. The debug is turned up to maximum, but we do not get any error messages. We also have custom logging writing to anSQL database, but no errors there either.

               

              We do have a piece of code calculating accumulated values that use the DateTime.Now(). Could this be the problem, and should we just replace it with .ExeTime?

                • Re: ACE recalculation does not update output tags
                  Dan Fishman

                  That piece of code is not likely the issue, but might not give you the desired results durning recalculation.  That DateTime.Now() will use the current computer time as the timestamp (best practice is to use .ExeTime, if you need the time when the calculation is scheduled; else unexpected results could occur.

                   

                  The fact that you see no debug messages seems like it is more of a communication issue between ACE scheduler and the module database.  When you adjust the ACE message logs, do you see a change in logging?  I'm wondering if just trying to stop and restart the equation will resolve the issue.  It might be best to test on another ACE test executable.  Also, is ACE in failover mode and actually running the equation on the server whose logs you are viewing?  About six years ago, OSIsoft allowed ACE to be loaded balanced and it causes some confusion on where ACE is actually running.

                  1 of 1 people found this helpful
                    • Re: ACE recalculation does not update output tags
                      Olav

                      We found that some of the output tags are actually being recalculated, we just didn't see it, because the data was already there. When we deleted some of the data on those tags, they were recalculated. So I don't think it is a com error.

                       

                      There seems to be trhee tags that are not being recalculated, even when all existing data is removed. When running on the normal clock cycle everything works, the problem is only there when recalculating for passed dates.

                • Re: ACE recalculation does not update output tags
                  Olav

                  Now we think that the problem has most likely something to do with the code, so now I have a side question. I cannot get the debug function to start. That is, it starts to load, but it just drops out again and doesn't stop at any breakpoints. I can't see any error messages either. Any tips?

                   

                  Update: I get this error message in the ACE log every time I try to run the debug function: Deleting connection:  PIACEClassLibraryHost.exe(4824), GetQueuedCompletionStatus error:   Broken Pipe [109] The pipe has been ended. Connection: PIACEClassLibraryHost.exe(4824) (14, 109), ID: 141

                    • Re: ACE recalculation does not update output tags
                      Dan Fishman

                      Here is how ACE debugging works: Debug an ACE Calculation and the Different Types of Debug   When you debug ACE, be sure to debug ACE through the ACE Wizard and not the visual studio debugger.  Using the visual studio debugger you will not be able to debug that ACE class library. 

                       

                      If several outputs are not working, check and make sure they not outputting at Now(), else when you recalculate you will always be writing out at ACE scheduler current time.  It looks like that message could be the debug program closing. 

                      1 of 1 people found this helpful
                        • Re: ACE recalculation does not update output tags
                          Olav

                          Hi.

                           

                          I am using the PI ACE Wizard debug. The problem is the PIACEclasslibraryhost.exe starts, but it does not show any build information in the debug output window. It says it is starting the calculation, but after that it just closes down again, and doesn't really start the code. Or maybe it does, it seems in the PI Message log that the code has run, but it does not stop at the breakpoint.

                           

                      • Re: ACE recalculation does not update output tags
                        Olav

                        It turns out in the end that we had a problem with the code and the order that output tags were written to the PI data archive. Because of this, it was unable to update the tags when recalculating.