9 Replies Latest reply on Oct 20, 2011 3:36 AM by Henryk Schneider

    Questionable/Substituted flags

    krachtr

      I've been playing with the Questionable and Substituted bits with the SDK and would now like to somehow monitor the number of tags that my Pi server has  received (over some time period) that have one or the other of these flags set. Is using ACE the only way to do something like this or is there a better way???

        • Re: Questionable/Substituted flags
          MichaelvdV@Atos

          You could use a simple PI OLEDB Query like:

          
          

          select * from picomp2 where time between '<start>' and '<end>'  and substituted = <0/1> and questionable = <0/1>

           

            • Re: Questionable/Substituted flags

              What exactly are you trying to achieve? I'm asking because there are a few different ways to do this and your original post doesn't provide enough information to point to the solution right away - where should the results go (Excel, used programmatically, back in a PI Point)?  At what frequency should this be done (does it need to be scheduled, is it ad hoc, can do it in real time as values come in)? 

               

              You touched on 2 possible options in your original post (PI ACE and PI SDK) although I am not clear on which one you are using... are you using PI ACE's native PIACEPoint.IsSet function, or PI SDK's PIPoint object within your PI ACE code? If it needs to be in PI ACE and can be done on an on-event basis, then you might want to use the IsSet function...

               

              I would like to add a side note to Michael's answer: while his PI OLEDB based solution would also work, note that it would require that you install PI OLEDB Provider in addition to PI ACE, if you need to get this done in PI ACE. And then you would need to use the ADO[.NET] objects in your PI ACE code.

               

              This should give you a few pointers, but please do not hesitate to further clarify what you are trying to do and we will come up with a more precise answer...

                • Re: Questionable/Substituted flags
                  krachtr

                  Steve,

                   

                  I am attempting to do a little preprocessing of data at the datasource where I will set the questionable bit (if all input values are not available) or substituted if a recalc. The results will be written to PI points. I would prefer real time detection (the way alarm tags and groups work) but there seems no way to trigger an event using questionable or substituted. Every 30 minutes would be OK for now. Yes, I am using the PI SDK to write data to the server but have not set up ACE yet. I was really looking for a little guidance as to which way to proceed from here.

                   

                  Rusty