System Variables
System Variables are automatically created and managed by StatStream to store values generated by system calculations, aggregations, and automation features.
Unlike user-created variables, System Variables do not require manual configuration. Whenever StatStream performs a calculation or automation task, the resulting value is stored in a System Variable, making it available for dashboards, reports, alerts, analytics, and other system features.
Automatic Creation
Section titled “Automatic Creation”Whenever a supported system feature generates a calculated value, StatStream checks whether the corresponding System Variable already exists.
- If the variable exists, its value is updated.
- If the variable does not exist, it is created automatically before storing the calculated value.
This ensures that calculation results are always available without requiring manual setup.
Supported System Variables
Section titled “Supported System Variables”System Variables are automatically generated for the following features:
- Shift Combined Aggregation
- Shift Time-of-Use (TOU) Combined
- Discrete Aggregation
- Action outputs
- Other system-generated calculations
Shift Combined Aggregation
Section titled “Shift Combined Aggregation”Shift Combined Aggregation stores the final aggregated value for an entire production shift.
The System Variable name is generated using the shift name and the configured aggregation suffix.
Naming Convention
Section titled “Naming Convention”SYS_<SHIFT_NAME>_<SUFFIX>Example
Section titled “Example”| Configuration | Value |
|---|---|
| Shift Name | MORNING_SHIFT |
| Aggregation Suffix | AVG |
| Generated System Variable | SYS_MORNING_SHIFT_AVG |
At the end of the shift, StatStream calculates the aggregated value and stores it in the generated System Variable.
Common aggregation suffixes include:
AVGSUMMINMAXCOUNT
The suffix depends on the aggregation configured for the calculation.
Shift Time-of-Use (TOU) Combined
Section titled “Shift Time-of-Use (TOU) Combined”Shift TOU Combined stores the total electricity cost accumulated during a production shift.
When a shift is completed, StatStream calculates the combined energy charge and stores the result in a System Variable.
Naming Convention
Section titled “Naming Convention”SYS_<SHIFT_NAME>_CHARGE_<SUFFIX>Example
Section titled “Example”| Configuration | Value |
|---|---|
| Shift Name | NIGHT_SHIFT |
| Suffix | COMBINED |
| Generated System Variable | SYS_NIGHT_SHIFT_CHARGE_COMBINED |
The generated variable can be used like any other variable throughout StatStream, including dashboards, reports, alerts, and analytics.
Discrete Aggregation
Section titled “Discrete Aggregation”Discrete Aggregation creates a System Variable for the aggregated value of an existing variable.
The generated variable name combines the original variable name with the configured aggregation suffix.
Naming Convention
Section titled “Naming Convention”SYS_<VARIABLE_NAME>_<SUFFIX>Example
Section titled “Example”| Source Variable | Aggregation | Generated System Variable |
|---|---|---|
CURRENT | AVG | SYS_CURRENT_AVG |
VOLTAGE | AVG | SYS_VOLTAGE_AVG |
POWER | AVG | SYS_POWER_AVG |
Benefits
Section titled “Benefits”System Variables provide a consistent way to store and reuse automatically generated values across StatStream.
Key benefits include:
- Automatic creation and maintenance by the system.
- Consistent naming conventions.
- No manual configuration required.
- Available for dashboards, reports, alerts, analytics, AI recommendations, and additional calculations.
- Behave like standard variables and can be referenced throughout the platform.