SetTagDisplayUnit

Sets the DisplayUnit, UnitDiv, and UnitAdd properties on a specific tag.

Function Group Execution Windows Embedded Thin Client Mobile Access
SetTagDisplayUnit Graphic Synchronous Supported Supported Supported Not supported

Syntax

Web Studio Help n graphic settagdisplayunit.xml d140574e85 SetTagDisplayUnit

strTagName
The name of the specific tag on which the DisplayUnit, UnitDiv and UnitAdd tag fields will be set.
Note: If this parameter is given a tag, then that tag should contain the name of the tag on which the tag fields will be set.
strDisplayUnit
The new value for the DisplayUnit tag field.
numDiv
The new value for the UnitDiv tag field.
numAdd
The new value for the UnitAdd tag field.

Returned value

0 Success.
-1 Wrong number of parameters.
-2 Specified tag doesn’t exist.
-3 numDiv parameter is invalid (equal to 0).

Examples

Tag Name Expression
Tag SetTagDisplayUnit( “TagTemp”, “F”, 0.555556, 32 ) // For the tag “TagTemp”, the DisplayUnit tag field is set to “F”, the UnitDiv tag field is set to 0.555556, and the UnitAdd tag field is set to 32.

SetTagDisplayUnit