7 Replies Latest reply on Jan 24, 2019 9:37 AM by pauljohnson

    Using Performance Equations with Digital States

    pauljohnson

      Hi there I am experimenting with performance equations to satisfy a use-case within our company.  We have a number of analogue tags which hold Amps.  I have associated a digital set (Traffic Lights) with this particular use-case, the idea being that when Amps falls below x  it will respond with a 'Green' state

      Amps is between x and y it will respond with an 'Amber' state

      Amps is above y it will respond with a 'Red' State

       

      The digital state 'Traffic Lights' is

      0 - White

      1 - Green

      2 - Amber

      3 - Red

       

      As an example:

       

      The PE Tag is - 33~SUB1~TRANSFORMER~~~~DMD~TOPSTEST1

      - DMD denotes <D>erived <M>ulti-state <D>igital

      - TAI denotes <T>elemmetered <A>nalogue <I>nstantaneous

      and the associated calculation:

      IF '33~SUB~TRANSFORMER1~~AMPS~~TAI'<=600THEN "Green"

      ELSE IF '33~TRANSFORMER1~~AMPS~~TAI'>600 OR '33~TRANSFORMER1~~AMPS~~TAI'<=700 THEN "Amber"

      ELSE IF '33~TRANSFORMER1~~AMPS~~TAI''>700 THEN "Red"

      ELSE 0

       

      A more complex example might be:

       

      IF '33~SUB~TRANSFORMER1~~AMPS~~TAI'<=600 OR '33~SUB~TRANSFORMER2~~AMPS~~TAI'<=600 THEN "Green"

      ELSE IF ('33~TRANSFORMER1~~AMPS~~TAI'>600 OR '33~TRANSFORMER1~~AMPS~~TAI'<=700) OR ('33~TRANSFORMER2~~AMPS~~TAI'>600 OR '33~TRANSFORMER2~~AMPS~~TAI'<=700) THEN "Amber"

      ELSE IF ('33~SUB~TRANSFORMER1~~AMPS~~TAI'>700) OR ('33~SUB~TRANSFORMER2~~AMPS~~TAI' >700) THEN "Red"

      ELSE 0

       

      Ideally I would like the PEs to be event-based, however I cant see any way in PISMT of specifying this...

      If the PEs must be based on 'Clock Scheduling' then it needs to be refreshed very frequently, How would I go about specifying this in PISMT for say a refresh rate of 1 second?  Would a refresh rate of this frequency have a detrimental effect on the system?

       

      Kind Regards

      Paul.

        • Re: Using Performance Equations with Digital States
          Lal_Babu_Shaik

          Hi Paul

           

          Please note that PI PE event based scheduling on single point.

          Scheduling reference : PI Server

           

          Could see complex calculations which requires multiple tiggers. I would suggest PI AF, PI AF Analysis (Calculations), PI Vision (Visualisation - if required).

          AF : Building Asset Hierarchies with PI AF

          1) Create enumeration set (TRANSFORMER_STATUS)

          • 0 - White
          • 1 - Green
          • 2 - Amber
          • 3 - Red

          2) Create element template e.g. TRANSFORMER.

          3) Add attributes to element template

          AF analysis: Configuring Analytics with PI AF

          4) Create analysis similar to PE mentioned above and schedule event based trigger and output written to PI Points(output)

          5) Create elements using from transformer template.

           

          PI Vision:

          6) Visualise using PI Vision. You can add multistate on symbol and use enumeration set value and define color in the PI Vision.

          Add Graphics and Configure Multi-state Behavior

          1 of 1 people found this helpful
          • Re: Using Performance Equations with Digital States
            sraposo

            Hi Paul,

             

            You can set the triggering tag under "scheduling" in PI SMT:

             

             

            As Lal correctly pointed out, you can only specify a single triggering tag.

             

            You could set the period to 1s. If the evaluation takes longer than 1s then it may skip. This configuration wouldn't affect the performance of the scheduler, simply that specific calculation.

             

            I agree with Lal, using Asset Analytics would be a much better approach!

             

            Thanks,

            Seb

            • Re: Using Performance Equations with Digital States
              pauljohnson

              Guys

              Thanks for your feedback, we unfortunately due to legacy requirements, do not have a functioning PI-AF/Asset Analytics solution in place so are still reliant on the old pre-AF architecture, hence the use of performance equations.

               

              Seb

               

              From PISMT it seems the smallest configurable period is 30 secs, unless there is some other way, such as via Datalink of specifying the period.

               

              Kind Regards

              Paul.

              • Re: Using Performance Equations with Digital States
                pauljohnson

                Seb

                 

                Ok, after some discussion with the end user who has asked for this functionality it transpires that the data will be batched every 10 minutes, so as it turns out the 30 sec refresh period is fine.  I have also got the less complicated of the examples quoted working as per these:

                 

                Tag - 33~AREC3~WINDFARM 1A~~~S~TMD~TOPSTEST1

                IF '33~SUB1~TRANSFORMER1~~AMPS~S~TAI' <= 680 THEN "Green" ELSE IF ('33~SUB1~TRANSFORMER1~~AMPS~S~TAI'> 680) OR ('33~SUB1~TRANSFORMER1~~AMPS~S~TAI'<=700)  THEN "Amber" ELSE IF '33~SUB1~TRANSFORMER1~~AMPS~S~TAI' > 700 THEN "Red" ELSE "White"

                 

                and

                 

                Tag - 33~AREC3~WINDFARM 1A~~~S~TMD~TOPSTEST1

                IF '33~SUB1~TRANSFORMER2~~AMPS~S~TAI' <= 680 THEN "Green" ELSE IF ('33~SUB1~TRANSFORMER2~~AMPS~S~TAI' > 680) OR ('33~SUB1~TRANSFORMER2~~AMPS~S~TAI'<=700)  THEN "Amber" ELSE IF '33~SUB1~TRANSFORMER2~~AMPS~S~TAI' > 700 THEN "Red" ELSE "White"

                 

                However although it seems a logical extension of the above syntax the following generates a 'Performance Equation parsing error'.  In the example below, the calculation uses the digital output from the above PEs to provide the state of an object which sits above them in the network hierarchy.

                 

                IF ('33~SUB1~TRANSFORMER1~~~S~TMD~TOPSTEST1' = "Green") AND ('33~SUB1~TRANSFORMER2~~~S~TMD~TOPSTEST1' = "Green") THEN "Green" ELSE IF ('33~~SUB1~TRANSFORMER1~~~S~TMD~TOPSTEST1' = "Red") OR ('33~SUB1~TRANSFORMER2~~~S~TMD~TOPSTEST1' = "Red") THEN "Red" ELSE "Amber"

                 

                This is really frustrating :-/

                 

                Kind Regards

                Paul.