Calculation parameter reference
- Last UpdatedNov 14, 2022
- 2 minute read
|
Property Name |
Property Description |
Default Value |
|---|---|---|
|
Name |
The calculation name. This is displayed as part of the data item label on symbols and used to reference this calculation in data items. Note: The property must not contain the period (".") character. |
(required) |
|
Server |
The data archive server to be used to evaluate the Expression. |
(required) |
|
Expression |
The expression evaluated for the calculation |
(required) |
|
IntervalMode |
The Time Interval setting for this calculation. This property must be set to "Custom" in order for the and parameters to have effect. |
"Auto" |
|
CalcInterval |
The Calc Interval for this calculation. must include a number and an interval abbreviation like "30s", "2h", "7d", etc. Note: If you set to "Auto" or if you do not specify one, this property is ignored. |
"10m" |
|
SyncTime |
The Sync Time for this calculation. Must be in 24-hour time format of . For example: . Note: If you set to "Auto" or if you do not specify one, this property is ignored. |
"00:00:00" |
|
Stepped |
Defines whether this calculation should be plotted in Stepped format. It must consist of a value of or . Note: Do not enclose the value in quotes. In JSON, boolean values are represented without quotes. For example: |
true |
|
ConversionFactor |
The Total Conversion Factor for the calculation. must include a number and an interval abbreviation. For example: , , , etc. Note: This property only affects retrieval of the "Total" column for the calculation. |
"1d" |
|
Description |
The description of the calculation |
N/A |
Example calculation definition with all properties specified
{
"Name": "Temperature",
"Server": "piserver",
"Expression": "'CDT158' * 2",
"IntervalMode": "Custom",
"CalcInterval": "1h",
"SyncTime": "04:30:00",
"Stepped": true,
"ConversionFactor": "7d",
"Description": "A useful temperature calculation"
}
Note: Properties with default values do not need to be specified. For example, to create a calculation with a non-default of "1h" and with default values for all other properties, the following sample illustrates the minimum required information:
{
"Name": "Temperature",
"Server": "piserver",
"Expression": "'CDT158' * 2",
"IntervalMode": "Custom",
"CalcInterval": "1h"
}