I would like to find out the number of machine stops for 12 hours using Tagtot in AF.

There is a machine stop tag value. This tag has a value of "0" when it is normal and "1" when it is machine stop. I want to use this tag to find out the number of machine stops that occur twice a day, every 12 hours.

I would like to ask you how to make an equation to configure using Tagtot in AF.

And I want to know the number of stops every 12 hours with one output tag.

The time is as follows.

07:00~19:00,19:00~07:00
tampon stop.png

Parents
  • An easy way to do this is to create an analysis that is event-triggered based on your input tag that can be 0 or 1.

    In the expression check if the tag changed from 0 to 1 (you can use the deltavalue function for this). If the value changed (deltavalue = 1) then output a value (it can be anything, but 1 would make sense) and if it does not change the use the NoOutput() function to output no value.

    Ensure the output is written to a PI Point (can be an int PI Point) and compression is turned off. Compression off ensures that every output is stored in the PI point, which we need to ensure we don't compress out any events. Compression off is not recommended in most cases, but for this use case it is essential.

     

    The output PI point will now contain a value every time the input changed from 0 to 1 (a stop event), and never a value any any other time.

     

    To count the number of stops in 12 hours you can simply use the EventCount() function to count the number of events the analysis output to the PI point.

     

    There is no need to use the TagTot() function in the solution. EventCount() is sufficient.

Reply
  • An easy way to do this is to create an analysis that is event-triggered based on your input tag that can be 0 or 1.

    In the expression check if the tag changed from 0 to 1 (you can use the deltavalue function for this). If the value changed (deltavalue = 1) then output a value (it can be anything, but 1 would make sense) and if it does not change the use the NoOutput() function to output no value.

    Ensure the output is written to a PI Point (can be an int PI Point) and compression is turned off. Compression off ensures that every output is stored in the PI point, which we need to ensure we don't compress out any events. Compression off is not recommended in most cases, but for this use case it is essential.

     

    The output PI point will now contain a value every time the input changed from 0 to 1 (a stop event), and never a value any any other time.

     

    To count the number of stops in 12 hours you can simply use the EventCount() function to count the number of events the analysis output to the PI point.

     

    There is no need to use the TagTot() function in the solution. EventCount() is sufficient.

Children
No Data