Debug block

To provide debug information for value and trend requests, you link this block in line between other blocks in an algorithm.
Figure 67.   Example of a Debug block in an algorithm
Image

When the Enabled property is false the Debug Block just passes any value or trend request through to any downstream linked blocks. When its Enabled property is true the Debug Mode property controls which requests are processed to update the block’s Result property.

The following table documents how the Debug Mode property arrives at a Result.

Debug mode results

Debug Mode Description
All Requests If Enabled is true, updates Result for every request.
All Trend Requests If Enabled is true, updates Result with trend requests only.
All Value Requests If Enabled is true, updates Result with value requests only.
Next Request If Enabled is true, updates Result for the next request, then sets Enabled to false.
Next Trend Request If Enabled is true, updates Result for the next trend request, then sets Enabled to false.
Next Value Request If Enabled is true, updates Result for the next value request, then sets Enabled to false.

To help explain the algorithm results, the Debug Block updates the Result property with details that include: whether it was a trend or value request and what its configuration values were, such as time range, interval, missing data strategy, rollup function, aggregate function, etc. when it processes a request. The text below is an example of a Result property for a value request.

Value Request: 11–Oct-22 12:10:06 PM EDT
  aggregation = first
  data = alg:HighPowerBoolean
  dow = 7f
  interval = fifteenMinutes
  mdStrategy = Ignore Series;None
  node = local:|station:|slot:/AnalyticPlayground/HighPowerBoolean
  rollup = first
  seriesName =
  statusFilter = {ok}
  timeRange = today
  timeZone = America/New_York
  user = admin
  [Result] 11-Oct-22 12:10 PM EDT 952.8933040641983 {ok}

Even though this is a value request, as indicated by the first line of the result, the analytic request context contains default values for properties that were not explicitly set in the request, such as timeRange = today, interval = fifteenMinutes, rollup = first and aggregation = first.

Some analytic blocks are designed to modify the incoming request properties. This might affect the Result property of an upstream Debug Block. Consider the algorithm below with a Debug Block linked between a DataSourceBlock and a Request Overrides Block. The Request Overrides Block is configured to override the Interval = Day and Rollup = Max in the upstream analytic request.

Figure 68.   Example of a Debug Block in a sequence that overrides upstream property settings
Image

A Px view with an Analytic Table Binding sends a trend request without specifying the Interval or Rollup function.

Figure 69.   Table binding for a trend request
Image

The trend request time range is lastWeek so the unconfigured default interval should have been 6 hours and the unconfigured default rollup function is first. The Debug Block’s Result property shows the interval = day and rollup = max because the downstream Request Overrides Block is overriding those properties in the incoming request.

Trend Request: 11–Oct-22 4:40:56 PM EDT
  aggregation = first
  data = alg:RequestOverride
  dow = 7f
  interval = day
  mdStrategy = Ignore Series;None
  node = local:|station:|slot:/AnalyticPlayground/RequestOverride
  rollup = max
  seriesName =
  statusFilter = {ok}
  timeRange = lastWeek
  timeZone = America/New_York
  user = admin