×
Skip to main content Link Search Menu Expand Document (external link) Right Arrow

Contents

Regulator

Regulator tag creates customizable control curves where the source tag’s output directly determines a writable tag’s value. Regulator tags are based on a unique model not shared with any other tag and does not generate loggable historical data, which is why, unlike with other tags, the Tag Editor is not tabbed when editing a regulator.

Before creating a regulator, determine the required number of points on the regulator curve and create twice as many writable device-based tags with a scalar non-boolean data type; for a detailed explanation and example of how the tag works, see Principles of Regulation.

Parameters

Connected Tags

  • Source Tag
    Tag whose value is monitored and plotted on the X axis of the regulator curve. Must return an integer.
  • Output Tag
    Tag whose value is overwritten by the regulator, plotted on the Y axis of the curve. Must be a writable device-based tag with a scalar non-boolean data type.
  • Writable Output
    Additional filter; output tag picker only shows tags with the matching state of the Writable checkbox. Output tags must support writability but do not have to be made writable.

Axes Settings

Determine the coordinate field size for the regulator curve:

  • X Min
    Leftmost limit,
  • X Max
    Rightmost limit,
  • Y Min
    Lowermost limit,
  • Y Max
    Uppermost limit

of any point’s position in the coordinate plane.

By default, all values are set to either 100 or -100, producing a 200×200 field. Any of the four parameters can take both positive and negative values. However, since negative values correspond to the positions to the left and/or below the point of origin in the coordinate system, they are strongly recommendable for X Min and Y Min.

Points

A regulator tag requires at least one point to be able to be saved. Having more points allows a greater precision in curve-based regulation; however, for practical purposes it is recommended not to have more than 7-8 points.

Each point is determined by two values: X and Y, representing its position in the coordinate plane. Each of these two values must be stored in a device-based tag; therefore, two tags are required per point.

  • + ADD NEW
    Creates a point.
  • No value
    Click to reveal two tag selector options:
    •  Select tag from page opens the list of all pages in their respective directories as arranged under Pages. Select a page and click OK to open page viewer, then select a tag present on the page. To go to a different page, click on its name in the upper right corner to open a dropdown menu of pages or click CANCEL or anywhere outside the page viewer to go back to page selection.
    •  Select tag from tree opens the list of all tags in their respective directories as arranged under Tags.
    Either selector has a Filter field atop.
  • Delete
    Deletes selected points without confirmation.

Principles of Regulation

The regulator runs the following algorithm on the provided control points to generate the regulation curve:

  1. Enumerate the curve points with the coordinates $ X_1Y_1, X_2Y_2… X_nY_n $ following their positions in the coordinate plane from left to right, from top to bottom; thus, point $X_2Y_2$ is located to the right of, and/or below, point $X_1Y_1$.
  2. For each pair of adjacent points, compute a slope-intercept linear function and use it to populate the plane with $f(x)$ values between the points. These subcurves between regulation points are independent of each other. Thus, the subcurve $ [ X_1Y_1; X_2Y_2] $ is computed independently from $ [ X_2Y_2; X_3Y_3] $.
  3. Use the source tag’s value as $X$ and write the corresponding $Y$ to the output tag. If $X$ does not lie on the regulator curve, do not update the output tag.