GetTagValue

Gets the value of the specified tag from the project tags database.

Function Group Execution Windows Embedded Thin Client
GetTagValue Tags Database Synchronous Supported Supported Supported

Syntax

GetTagValue( "strTagName", optNumRefresh )
strTagName
The name of the tag of which you want to get the value.
Note: The tag name must be enclosed in quotes, as shown in the syntax diagram, or else the project will try to get the value of the named tag.
optNumRefresh
Tag that you want to use as a trigger to refresh the function. When the value of the specified Tag changes, the function is executed again. (Normally, a function executes only when the object on which it is configured changes in some way, such as when a Pushbutton object is clicked.) To execute the function at a regular interval, you can use one of project's system tags such as Second, Minute or Hour.

Returned value

This function only returns the value of the Tag specified by strTagName. If the specified Tag does not exist, then the function returns null.

Note: The value of the Tag specified by optNumRefresh does not affect the function's returned value in any way.

Examples

Tag Name Expression
requiredTag = 15 GetTagName( "requiredTag", Second ) // Return = 15
pointerTag = "Required Tag"

requiredTag = 15

optNum = Second

GetTagName( pointerTag, optNum ) // Return = 15