Calculation process
- Last UpdatedApr 24, 2025
- 2 minute read
This section describes the relationship between the flowTotalConfig and flowTotalJoin tables and the operations that the application performs to calculate a flow total value.
The Flow Total application can calculate sums for up to four separate calculation elements for each flowTotalConfig record. The value of each element is the sum of corresponding data source rows in one or more flowTotalJoin records. Each data source row corresponds to an assigned point in the RealTime database (RTDB). When the Monitor process runs, it performs the specified operation on each point's value. The sum of these operations becomes the current value of the corresponding flowTotalConfig record's calculation element.
As illustrated in the figure below, rows 0, 1, 2, and 3 in a flowTotalJoin record correspond to calculation elements 0, 1, 2, and 3 in a flowTotalConfig record. The current value of the analog record in our example, "0analog", is 91. There are two flowTotalJoin records associated with the flowTotalConfig record "0flowTotalConfig". In row 0 of both these flowTotalJoin records, an Administrator has configured the application to add together the current value of "0analog" to arrive at the current value of calculation element 0 (the Current Value 0 cell in the Flowtotal Summary window [91 + 91 = 182]).

Similarly, notice that calculation element 1 of the "0flowTotalConfig" record is associated with only one data source row in the corresponding flowTotalJoin record. When the Monitor process runs, it subtracts the value of "0rate" (119) and, since the Multiplier is 2, multiplies the value by 2 to arrive at the current value of calculation element 1 (the Current Value 1 cell in the Flowtotal Summary window [-119 x 2 = -238]).
The table below provides an additional example.
|
flowTotalJoin Records for the flowTotalConfig record "0flowTotalCon" |
flowTotalConfig record "0flowTotalConfig" |
|||||
|---|---|---|---|---|---|---|
|
Record |
Row # |
Operation |
Database Path |
Multiplier |
Resulting Equation |
Value of Calculation Element 0 |
|
1 |
0 |
+ |
1Analog (value = 2) |
3 |
(2x3) - 4 + (7x2) |
16 |
|
2 |
0 |
- |
2Analog (value = 4) |
1 |
||
|
3 |
0 |
+ |
3Analog (value = 7) |
2 |
||