Function Tags
Not counted towards your tag license limit.
This is a legacy tag type. You are advised to use the I/O and Calculations Tag instead.
Use this legacy type only if you are certain that it contains unique features that are absolutely necessary to your work.
The Function tag type is used to perform mathematical and logical calculations using numeric values and, optionally, the values of other tags. A Function tag can accept up to four tag values or numeric values as properties, and the result of the calculation becomes the value of the Function tag. Other tags can use the value of a Function tag.
The output of a Function tag with no configured function parameters is undefined. It is not guaranteed to be any specific value, not even invalid.
Function tags are an older technology, maintained for backward-compatibility. You are advised to use Calculation tags for most applications.
The ID tab of every tag includes the same common elements: Name, Area, Description, and Help ID.
Name:
Uniquely identifies each tag in the application. If the tag is a child of another, the parent names will be displayed in a separate area before the name field.
You may right-click on the tag's name to add or remove a conditional start expression.
Area
The area field is used to group similar tags together. By defining an area, you make it possible to:
- Filter for particular tag groups when searching in the tag browser
- Link dial-out alarm rosters to Alarm tags having a particular area
- Limit the number of tags loaded upon startup.
- Filter the alarm display to show only certain areas.
- Filter tag selection by area when building reports
When working with Parent-Child tag structures, the area property of all child tags will automatically match the configured area of a parent. Naturally, you can change any tag's area as required. In the case of a child tag, the field background will turn yellow to indicate that you have applied an override. (Orange in the case of user-defined types. Refer to Configuration Field Colors)
To use the area field effectively, you might consider setting the same Area for each I/O driver and its related I/O tags to group all the tags representing the equipment processes installed at each I/O device. You might also consider naming the Area property for the physical location of the tag (i.e. a station or name of a landmark near the location of the I/O device). For serial port or Roster tags, you might configure the Area property according to the purpose of each tag, such as System or Communications.
You may define as many areas as you wish and you may leave the area blank for some tags (note that for Modem tags that are to be used with the Alarm Notification System, it is actually required that the area field be left blank).
To define a new area, type the name in the field. It will immediately be added. To use an existing area, use the drop-down list feature. Re-typing an existing area name is not recommended since a typo or misspelling will result in a second area being created.
There is no tool to remove an area name from VTScada since such a tool is unnecessary. An area definition will exist as long as any tag uses it and will stop existing when no tag uses it (following the next re-start).
Description
Tag names tend to be brief. The description field provides a way to give each tag a human-friendly note describing its purpose. While not mandatory, the description is highly recommended.
Tag descriptions are displayed in the tag browser, in the list of tags to be selected for a report and also on-screen when the operator holds the pointer over the tag’s widget. For installations that use the Alarm Notification System, the description will be spoken when identifying the tag that caused the alarm.
The description field will store up to 65,500 characters, but this will exceed the practical limits of what can be displayed on-screen.
This note is relevant only to those with a multilingual user interface:
When editing any textual parameter (description, area, engineering units...) always work in the phrase editor. Any changes made directly to the textual parameter will result in a new phrase being created rather than the existing phrase being changed.
In a unilingual application this makes no difference, but in a multilingual application it is regarded as poor practice.
Help Search Key
Used only by those who have created their own CHM-format context sensitive help files to accompany their application.
Function properties Operator tab
The Operator tab identifies the operation that will be performed on the inputs for this tag.
OpCode
The OpCode drop-down list enables you to specify the type of operation to be performed on the values associated with this Function tag.
The parameters (values) that will be used for the selected operation, are configured on the tab, Inputs.
- Parameters that are not configured have no impact on the resulting value of the function.
- Parameters whose value evaluates to Invalid will cause most function operations to return Invalid.
The supported operations are:
+ | All configured parameters are added. Any parameter that contains a tag or expression that evaluates to Invalid will result in the Function tag having the value, Invalid. |
- | Parameter 1 - Parameter 2 - Parameter 3 - Parameter 4 (disregarding any unconfigured parameters). Any parameter that contains a tag or expression that evaluates to Invalid will result in the Function tag having the value, Invalid. |
* | Parameter 1 * Parameter 2 * Parameter 3 * Parameter 4 (disregarding any unconfigured parameters). Any parameter that contains a tag or expression that evaluates to Invalid will result in the Function tag having the value, Invalid. |
/ | Parameter 1 / Parameter 2 / Parameter 3 / Parameter 4 (disregarding any unconfigured parameters). Any parameter that contains a tag or expression that evaluates to Invalid will result in the Function tag having the value, Invalid. |
& |
Logical AND. Three results are possible: TRUE, FALSE or Invalid. |
| | Logical OR. Logical Three results are possible: TRUE, FALSE or Invalid. * If any configured parameter is TRUE, then the result will be TRUE. * If all configured parameters are FALSE, then the result will be FALSE. * If no configured parameters evaluate to TRUE, but at least one evaluates to Invalid, then the result will be Invalid. |
Average | Average of Parameters 1 through 4 (excluding any undefined values). |
Max | Maximum of Parameters 1 through 4 (excluding any undefined values). |
Min | Minimum of Function Parameters 1 through 4 (excluding any undefined values). |
Integrate | Performs time integral of Parameter 1 * Parameter 2, every Parameter 3 seconds. * If Parameter 2 is not defined, it defaults to a value of 1. * If Parameter 3 is not defined, it defaults to a value of 1 second. For example, if Parameter 2 and Parameter 3 were not defined, the calculation would be Parameter 1 * 1 every 1 second). |
Function properties Inputs tab
The Inputs tab identifies the numeric values or tag values that will be factors in the calculation.
Function Parameter X
The Function Parameter 1 through to Function Parameter 4 fields enable you to specify up to four factors in the calculation performed by this tag.
You may use a constant, expression or tag as the source of the value for each parameter. Parameters that are not configured are essentially ignored, in that they will not have an effect on the result of the calculation.
Parameters that are configured, but which evaluate to Invalid, will have an effect on the calculation as noted in the description of each operational code. Note that tags can have an invalid value when there is an error in communication. Many expressions can return a value of Invalid. For example, if attempting to divide by zero.
You cannot select a Function tag as one of its own function parameters.
Function properties Manual tab
The Manual tab contains the Manual Data and Questionable Data properties. The Manual Data field can be used to enter a user-defined value for this tag that will override the value of its calculation. Use the Questionable Data check box to flag this tag’s data as being questionable in the event that you feel the values it is reporting might not be correct, or when this tag has initially been created and you wish to ensure that its data is monitored for validity.
Manual Data
Enables you to set a user-defined value for this tag, rather than reading the value from the associated I/O device (i.e. this user-defined value overrides the data incoming from the equipment).
If this field is anything other than a blank, or an invalid number, then the value from the I/O device is ignored and this value will be used instead.
The widget used by any tag with Manual Data will include an exclamation mark.
If the value entered into the Manual Data field is a 0, the actual value reported by the equipment is also overridden, as 0 is considered a valid value. Therefore, if it is your intention to resume reading data from the I/O device, you must clear the Manual Data field entirely.
Questionable Data
Use this field to flag the tag’s data in the event that you suspect the values it is reporting might not be correct, or when this tag has initially been created and you wish to ensure that its data is marked for extra monitoring.
This tag can be used in an owner/contributor structure where multiple contributor tags can supply their values to an owner tag.
There is no specific "owner" tag type, rather an owner tag is typically a custom-designed tag that is created using VTScada scripting code.
Owner
Specify a tag to which this contributor should supply its data. An owner tag is one which you must design and then create, using the VTScada scripting language.
The owner tag may keep track of different aspects of each contributor's data, from the presence of a user-defined manual data value, to questionable data, according to the configuration of the check boxes appearing beneath the Owner field. These check boxes also determine the way that this contributor tag's value should be used in the owner tag's calculations.
Set Owner\DataX(…) to Value
When selected, the Set Owner\DataX[…] To Value check box is used to set the value of this contributor tag as the nth element in the owner tag's array. You may choose to set this contributor tag's value in more than one of the owner tag's array elements if required.
Set Active/Unack. Priority
An owner tag may keep track of the alarm priority and status of its contributors. When selected, the Set Active/Unack. Priority check box causes the owner tag to keep track of the priority of the contributor's active alarm (or records an Invalid if the contributor is not in an alarm state). Selecting the Set Active/Unack. Priority check box also causes the owner tag to record whether the alarm has been acknowledged.
Record Use of Manual Data
An owner tag may keep track of the number of contributor tags that are providing manual data (user-defined values), rather than reading data from their I/O device. When selected, the Record Use of Manual Data check box is used to increment the owner's count of the number of tags that are contributing manual data by 1 when manual data has been provided for this contributor, and decrement this count by 1 when no manual data value has been specified.
Record Data Quality (Analog and Digital Input only)
An owner tag may keep track of the quality of the data for each of its contributors. When selected, the Record Tag Quality check box is used to increment the owner tag's count of the number of tags that are contributing quality data by 1, and decrement this count by 1 when this contributor is not supplying quality data.
Record Tag Validity
An owner tag may keep track of the questionable status of the data for each of its contributors. When selected, the Record Tag Validity check box is used to increment the owner tag's count of the number of tags that are contributing questionable data by 1, and decrement this count by 1 when this contributor is not supplying questionable data.
When this tag is represented on screen by widgets that can use a Style Settings tag, you can save development time by choosing the Style Settings tag that holds the correct display configuration for this tag instance.
The default configuration will use System Style, the default style tag that is automatically part of every new VTScada application.
Function properties Script tab
Optionally, link one or more Script tags to this tag. A Script tag provides a means of creating a procedure, using VTScada’s programming language, that will run whenever this tag’s value changes.
Function properties Logger tab
The logger tab enables you to associate a single Logger tag with this tag. The Logger tag works with an Historian to this tag’s data to disk so that it can be plotted on the Historical Data Viewer page. The new logger tag will be created as a child of the current tag.
The following widgets are available to display information about your application’s Function tags:
Alarm Priority Box | Alarm Priority Icon |
Color Line Widget | LCD 5x7 Matrix Widget |
Equipment / Status Color Indicator | |
Indicator Light Widget | |
LCD 7 Segment Widget | Left Bar Widget |