Data Point Expression Functions

The following table lists Data Point expression functions. Refer to the Alarm Type Expressions for additional information.

Data point function parameters that appear in square brackets [ ] are optional.

Data Point Function Name

Function Description

tagmethod(pointName, methodName, inputArgs...)

Invokes a server method with a set of input arguments and returns an array of values representing the output method arguments.

Parameters:

  • pointName: Text representing the data point name.
  • methodName: Text representing the server's method name.
  • inputArgs: Zero or more values passed as input arguments to server method call.

Returns: Returns an array of the output method arguments.

tagraw(pointName, start, end, maxValues)

Reads historical values in the time domain up to the specified maximum number of values.

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • maxValues: Maximum number of values to return in single function call. Value must be between 1 and 1000.

Returns: Returns zero or other raw values that is organized in array of values.

tagagg(pointName, aggregateType, start, end, [pctGood], [pctBad], [resamplePeriod], [uncertainAsBad], [slopedExtrapolation])

Calculates one or more resampled values for the specified aggregate type name.

Parameters:

  • pointName: Text representing the data point name.
  • aggregateType: Aggregate type name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • pctGood: This is a numeric value range 0-100 indicating the percentage of good samples for a given time interval that returns a good status code for the processed value.
  • pctBad: This is a numeric value range 0-100 indicating the percentage of bad samples in given time interval that returns a bad status code for the processed value. When NaN (Not a Number) value is used, then percentBad is calculated as 100.0 - pctGood.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.
  • slopedExtrapolation: Indicates how the server interpolates data when no boundary value exists. For example, extrapolating into the future from the last known value.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagtavg(pointName, start, end, [pctGood], [pctBad], [resamplePeriod], [uncertainAsBad], [slopedExtrapolation])

Returns a time weighted average value for resample interval.

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • pctGood: This is a numeric value range 0-100 indicating the percentage of good samples for a given time interval that returns a good status code for the processed value.
  • pctBad: This is a numeric value range 0-100 indicating the percentage of bad samples in given time interval that returns a bad status code for the processed value. When NaN (Not a Number) value is used, then percentBad is calculated as 100.0 - pctGood.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.
  • slopedExtrapolation: Indicates how the server interpolates data when no boundary value exists. For example, extrapolating into the future from the last known value.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagsum(pointName, start, end, [pctGood, [pctBad], [resamplePeriod], [uncertainAsBad])

Returns sum value for all raw values in resample interval.

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • pctGood: This is a numeric value range 0-100 indicating the percentage of good samples for a given time interval that returns a good status code for the processed value.
  • pctBad: This is a numeric value range 0-100 indicating the percentage of bad samples in given time interval that returns a bad status code for the processed value. When NaN (Not a Number) value is used, then percentBad is calculated as 100.0 - pctGood.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagtotal(pointName, start, end, [pctGood], [pctBad], [resamplePeriod], [uncertainAsBad], [slopedExtrapolation])

Returns total value for resample interval (normalized to milliseconds).

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • pctGood: This is a numeric value range 0-100 indicating the percentage of good samples for a given time interval that returns a good status code for the processed value.
  • pctBad: This is a numeric value range 0-100 indicating the percentage of bad samples in given time interval that returns a bad status code for the processed value. When NaN (Not a Number) value is used, then percentBad is calculated as 100.0 - pctGood.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.
  • slopedExtrapolation: Indicates how the server interpolates data when no boundary value exists. For example, extrapolating into the future from the last known value.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagstart(pointName, start, end, [resamplePeriod], [uncertainAsBad], [slopedExtrapolation])

Returns the value at the start time for the interval by calculating the Simple Bounding Values for the interval.

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.
  • slopedExtrapolation: Indicates how the server interpolates data when no boundary value exists. For example, extrapolating into the future from the last known value.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagend(pointName, start, end, [resamplePeriod], [uncertainAsBad], [slopedExtrapolation])

Returns the value at the end time for the interval by calculating the Simple Bounding Values for the interval.

Parameters: See tagstart for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagdelta(pointName, start, end, [resamplePeriod], [uncertainAsBad], [slopedExtrapolation])

Returns the difference between the Start Bound and the End Bound Aggregates with the exception that both the start and end must be good values.

Parameters: See tagstart for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagrawstart(pointName, start, end, [resamplePeriod], [uncertainAsBad])

Returns the earliest raw value within the interval and returns that value with the timestamp at which that value occurs.

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagrawend(pointName, start, end, [resamplePeriod], [uncertainAsBad])

Returns the latest raw value within the interval and returns that value with the timestamp at which that value occurs.

Parameters: See tagrawstart for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagrawdelta(pointName, start, end, [resamplePeriod], [uncertainAsBad])

Returns the difference between the earliest and latest good raw values in the interval.

Parameters: See tagrawstart for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagmin(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad], [slopedExtrapolation])

Returns the minimum good value for each interval, Simple Bounding Values are included.

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • pctGood: This is a numeric value range 0-100 indicating the percentage of good samples for a given time interval that returns a good status code for the processed value.
  • pctBad: This is a numeric value range 0-100 indicating the percentage of bad samples in given time interval that returns a bad status code for the processed value. When NaN (Not a Number) value is used, then percentBad is calculated as 100.0 - pctGood.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.
  • slopedExtrapolation: Indicates how the server interpolates data when no boundary value exists. For example, extrapolating into the future from the last known value.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagmax(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad], [slopedExtrapolation])

Returns the difference between the maximum and minimum values in the interval, Simple Bounding Values are included.

Parameters: See tagmin for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagrange(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad], [slopedExtrapolation])

Returns the difference between the maximum and minimum values in the interval, Simple Bounding Values are included.

Parameters: See tagmin for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagpctgood(pointName, start, end, [resamplePeriod])

Returns percent of good values for each interval (time weighted).

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagpctbad(pointName, start, end, [resamplePeriod])

Returns percent of bad values for each interval (time weighted).

Parameters: See tagpctgood for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagtimegood(pointName, start, end, [resamplePeriod])

Returns the sum of the duration of all good regions (each good region starts with good value sample).

Parameters: See tagpctgood for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagtimebad(pointName, start, end, [resamplePeriod])

Returns the sum of the duration of all bad value regions (each good region starts with bad value sample).

Parameters: See tagpctgood for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagworstqual(pointName, start, end, [resamplePeriod])

Returns the worst status of the raw values in the interval where a Bad status is worse than Uncertain and is worse than Good.

Parameters: See tagpctgood for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagtimezero(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad], [slopedExtrapolation])

Returns the time Duration during the interval that the Variable was in the zero state.

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • pctGood: This is a numeric value range 0-100 indicating the percentage of good samples for a given time interval that returns a good status code for the processed value.
  • pctBad: This is a numeric value range 0-100 indicating the percentage of bad samples in given time interval that returns a bad status code for the processed value. When NaN (Not a Number) value is used, then percentBad is calculated as 100.0 - pctGood.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.
  • slopedExtrapolation: Indicates how the server interpolates data when no boundary value exists. For example, extrapolating into the future from the last known value.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagtimenonzero(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad], [slopedExtrapolation])

Returns the time Duration during the interval that the Variable was in the non-zero state.

Parameters: See tagtimezero for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagcount(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad])

Returns a count of all the raw values in an interval.

Parameters:

  • pointName: Text representing the data point name.
  • start: The DateTime value indicating when to begin the time interval for processing data.
  • end: The DateTime, TimeSpan or Numeric milliseconds value offset against start time, indicating the end of the time interval for processing data.
  • pctGood: This is a numeric value range 0-100 indicating the percentage of good samples for a given time interval that returns a good status code for the processed value.
  • pctBad: This is a numeric value range 0-100 indicating the percentage of bad samples in given time interval that returns a bad status code for the processed value. When NaN (Not a Number) value is used, then percentBad is calculated as 100.0 - pctGood.
  • resamplePeriod: TimeSpan value representing aggregate resample period. When zero then it calculates aggregate for the whole-time interval specified by start and end times.
  • uncertainAsBad: Indicates how the server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

taganncount(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad])

Returns a count of all Annotations in the interval.

Parameters: See tagcount for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagntrans(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad])

Returns a count for the number of transitions the Variable had during the interval.

Parameters: See tagcount for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagstddev(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad])

Returns the standard deviation of the sample in the interval (N - 1).

Parameters: See tagcount for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagvariance(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad])

Returns variance for the sample in the interval (N - 1).

Parameters: See tagcount for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagstddevppl(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad])

Returns the population standard deviation in the interval (N).

Parameters: See tagcount for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagvarianceppl(pointName, start, end, [pctGood], [pctBad], [resamplePeriod],[uncertainAsBad])

Returns the population variance in the interval (N).

Parameters: See tagcount for parameter descriptions.

Returns: Returns one or more resampled values. Single resampled value can be accessed directly while multiple values are returned as an array of values.

tagdescription(pointName)

Returns the configured description text for the specified data point name.

Parameters:

  • pointName: Text representing the data point name.

Returns: Returns a text value representing the data point description.

tagunits(pointName)

Returns the configured value range for the specified data point name.

Parameters:

  • pointName: Text representing the data point name.

Returns: Returns a text value representing the data point engineering units.

tagvaluerange(pointName)

Returns the configured value range for the specified data point name.

Parameters:

  • pointName: Text representing the data point name.

Returns: Returns an array of two values, where the first value represents the low range, and second value is the high range.