Counts Over Periods of Time

Discussion created by rdube02 Champion on Mar 29, 2013
Latest reply on Apr 1, 2013 by rdube02

Hi everyone,


I'm attempting to do something similar to some script I've done before, but I can't quite figure this one out. I suspect there's a solution using IPICalculation that I just don't know about. I'm working in ProcessBook using VBA code.


What I'm trying to do is to examine a string PI tag over a period of time, say 4 days - and I want to generate an array of values that represent the number of times that the tag equaled a certain value.  For example, it's a reason code that could contain 7 or 8 different reasons for dumping a part - in this case I want to know how many times the tag was "Bad Spring" each hour over the course of those 4 days.


I think I need to pull in PIvalues over the 4 days, and then parse through those values and calculate the total for each hour over the 4 days, right? Or is there an IPICalculation call that I can use to do this without writing a bunch of loops to go through all the data?


Thanks for any insight you can offer!