Change how out-of-range tag values are handled

A project tag will occasionally receive a value that is outside of its normal range. You can change how these out-of-range values are handled during run time.

Note: This topic applies only to Integer and Real-type tags, because they are the only tags for which the Min and Max properties have meaning. Boolean-type tags can only have values of 0 and 1, and String-type tags do not have numeric values at all.

A project tag has a range of possible values, and that range is determined by the tag’s Min and Max properties. By default, if the tag receives a new value that is outside of its range — that is, if the value is less than the minimum or greater than the maximum — then the received value is ignored, the existing value is retained, the tag quality is set to UNCERTAIN, and a warning message is sent to the Output window.

In some situations, however, it is useful to change how these out-of-range values are handled — in particular, you may need to emulate how out-of-range values are handled by another vendor’s hardware or software, such as Wonderware InTouch.

To change this behavior, you must manually edit your project file (e.g., projectname.app) to add or modify the following settings:
  [Options]  WriteOutOfRange={FALSE|TRUE}  CapOutOfRange={FALSE|TRUE}  
WriteOutOfRange
By default, this setting is FALSE. When this setting is TRUE, out-of-range tag values are accepted as good (i.e., the tag quality is not set to UNCERTAIN).
CapOutOfRange
By default, this setting is FALSE. When this setting is TRUE, out-of-range tag values are capped at the tag’s minimum and maximum.
Note: If a setting is not present in the project file, then its default value is used.

To change how out-of-range tag values are handled:

  1. Locate your project file, which is typically at: […]DocumentsInduSoft Web Studio v7.1 Projectsprojectnameprojectname.app
  2. Open the project file with a standard text editor, such as Notepad, and then add or modify the settings WriteOutOfRange and CapOutOfRange. The following table shows how the two settings work together:
    Settings Behavior
      [Options]  WriteOutOfRange=FALSE  CapOutOfRange=FALSE  
    The received value is ignored, the existing value is retained, the tag quality is set to UNCERTAIN, and a warning message is sent to the Output window.

    This is the default behavior.

      [Options]  WriteOutOfRange=FALSE  CapOutOfRange=TRUE  
    If the received value is lower than Min, then the tag value is set to Min, and if the received value is greater than Max, then the tag value is set to Max. The tag quality is set to UNCERTAIN.
      [Options]  WriteOutOfRange=TRUE  CapOutOfRange=FALSE  
    Min and Max are ignored when setting tag values; the tag value is set to whatever value it receives, and the tag quality is set to GOOD.

    Min and Max are still applied to linear conversions in device communication.

      [Options]  WriteOutOfRange=TRUE  CapOutOfRange=TRUE  
    If the received value is lower than Min, then the tag value is set to Min, and if the received value is greater than Max, then the tag value is set to Max. The tag quality is set to GOOD.
  3. Save and close the project file.

Change how out-of-range tag values are handled