Search the Community
Showing results for tags 'aggregation'.
Background: Sensors or calculated tags that totalize a value over time often need to be reset due to maxing out the range of the sensor or the number of available digits in the calculation database. This can create a saw-tooth signal that resets every time this range maximum is reached. In actuality, the signal is constantly increasing rather than building up to the range max and then stepping down to zero to begin counting back up towards the max. Solution: Use Seeq Formula to convert the saw-tooth signal into a continuously increasing signal bounded in time by some reset period determined by the Subject Matter Expert. 1. In this example we begin with a saw-tooth counter signal that resets every time the sensor reaches its range max of 100. 2. Use Seeq Formula to convert the sawtooth signal into a continuous, increasing signal. Note that in order for Seeq to do this calculation, a bounding condition is required. This can either be a repeating periodic condition, or a condition created using the custom condition tool. This can be done in one step using the following code: //creates a bounding condition for running sum calculation $reset = years() //calculates running delta of signal between each sample, compares to zero to ignore negative running delta values, //calculates the running sum of the running delta signal over the bounding condition $signal .runningDelta() .max(0) .runningAggregate(sum(),$reset)
FAQ: We have various conditions that are calculated from signals on a variety of different equipment and assets. We would like to view them in a histogram that is broken out by month, and for each month each asset has a separate bar in the histogram. Example Solution: 1. For three signals, we want to create a histogram that is the total time per month spent above some threshold. In this example, each signal is associated with a different cooling tower Area. 2. We have a condition for when each signal is above it's threshold value. These conditions were created using the value search tool. 3. The three conditions can be combined into a single condition (here it is called "Combined In High Mode w Area as Property"). In the formula tool, before combining the conditions, we assign each condition a property called 'Area' and set the value as that particular asset area. Once the properties are set we use the combineWith() function to combine them into one final signal. The formula syntax below will achieve this: //Create a new condition for each original condition that has a property of 'Area'. $A=$AHigh.setProperty('Area','Area A') $G=$GHigh.setProperty('Area','Area G') $I=$IHigh.setProperty('Area','Area I') //Combine the new conditions created into a new condition with all of the high power modes where each capsule //has a property of 'Area' that describes the signal that was searched to identify that original condition. combineWith($A,$G,$I) ***Note: the combineWith() function in Seeq Formula is required here because it will retain capsule properties of individual conditions when combining them. Using union() or any other composite condition type logic will NOT retain the capsule properties of the individual condition.*** 4. Use the Histogram tool and the multiple grouping functionalities to aggregate over both time, and the capsule property of 'Area'. Final Result: (remove other items from the details pane to view just the histogram)