1

Count Number of Changes in String Tag value

We are doing a thruput improvement project and trying to find a way to calculate how many serialized units move thru our workcells.  The most robust signal we have to track this with currently is a string tag for the serialID of each unit, but I'm having trouble figuring out how to use the built-in Calculation functions to determine this accurately.

I'm hoping to figure out something that behaves like NumberOfTransitions does for a Bool tag, but for a string tag.

We want to build a dashboard once we can figure this out, to track each workcell's thruput by hour and a rollup for the area.

Thanks in advance for any ideas.

6 replies

null
    • smason
    • 2 mths ago
    • Reported - view

    Hi ,

    Would the Count aggregate work in this case? It simply counts the good raw values in an interval.

      • patch_hyland
      • 2 mths ago
      • Reported - view

      Hi  , we had tried the Count aggregate for this, but it seemed like if the same value was written for a different unit, the count aggregate did not consider that in its aggregation.  To be fair I haven't read the detailed OPC Foundation document about the details of how this aggregate works.

      • smason
      • 2 mths ago
      • Reported - view

      Based on my testing, the Count aggregate counts every raw value, even if they repeat. I did this against a string tag I have that updates every second. There are only 8 unique string values that repeat, but the aggregate returns 3600.

      • patch_hyland
      • 2 mths ago
      • Reported - view

      Thanks , oh, that may be the source of our problem.  We're trying to get a count of unique strings over a period, so per your example/test, we would want an aggregate that tells us '8' not '3600'

      • smason
      • 1 mth ago
      • Reported - view

      Gotcha. That makes that sense. I'm not sure how we would create that calculation at the moment. There definitely isn't any aggregate by itself that would do it. There would need to be some other logic involved.

      • patch_hyland
      • 1 mth ago
      • Reported - view

       Alright, well thank you for responding to my questions!  I appreciate it.

Content aside

print this pagePrint this page
  • Status Answered
  • 1 Likes
  • 1 mth agoLast active
  • 6Replies
  • 23Views
  • 2 Following