Calculation of how many times my production line is stopped?

Hi guys, I have an attribute that gives me the value of false when the production line is stopped and true when it is running, I want to make an analysis of how many times it stopped in the day and the week, could you help me to know how to do it, thanks in advance

  • Hi. This is a straight forward task using two analyses.

     

    1. Create an analysis called Production Stop Indicator. Trigger it from the production line attribute you mentioned, and use logic to output 1 when the production is stopped, and no output when it's running. Then write the values to a PI Point output attribute. The expression is: if 'ProductionLineStatusAttribute' = false then 1 else NoOutput()
    2. Create another analysis that is triggered from the output of the Production Stop Indicator (first analysis created). Then you have a choice between the two following methods to obtain the number of stops in your desired time period:
      1. Use the EventCount function to count all events of the Production Stop Indicator attribute. Since we only output values when the production is stopped, you can safely consider the count of the events the number of stops.
      2. Use the TagTot function to return the sum of all the stops (i.e. value 1) in the Production Stop Indicator attribute. Make sure you use the TagTot function overload with 6 input parameters, and the sixt one needs to be "EventWeighted"

     

    PS! It's important this is implemented as two analyses. It doesn't work if you have two expressions in the same analysis!

  • Hello all. I would suggest you consider a different approach to get the count. In order to help users prevent line outages, they need more than a count. Suggest you make an event frame for each outage. Load that dude up with all relevant data and instructions for an investigation of an outage of this prod line. Publish event frame reports using PI Notifications and your favorite BI tools. Create a churn of employees commenting on the event frames. You can use just about any reporting tool to count the event frames. plus you have richer data alongside to include in your work. For example: "How many line outages did I have when it was raining". or "What was the avg length of our outages this year against last year", what does the temperature profile or pattern, was it the same"

  • Steve, your suggestion is on point - counting with event frames would be the perfect solution. EXCEPT for the fact that you need to go outside the PI System to get the count of event frames, which has been a short coming of this approach since the beginning.

    Customers have a need to see these statistics inside the PI System, so for that reason I always create an event indicator using formulas or expression analyses, and then I can use that to:

    • Count the number of events using the above mentioned approaches
    • Trigger an Event Frame

     

    To make life easier for my customers, I have created a prototype for a custom data reference called EventFrame Statistics, which uses the AF SDK to provide the most common statistics needed - directly in PI System Explorer. If someone's interested in purchasing this solution from Amitec, you can send me a message here on PISquare or find my contact details here: https://www.amitec.no/about