Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

SetTagDisplayUnit

  • Last UpdatedOct 29, 2026
  • 1 minute read

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

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

SetTagDisplayUnit

Graphic

Synchronous

No

Supported

Supported

Not supported

Supported

Not supported

Syntax

SetTagDisplayUnit(strTagName,strDisplayUnit,numDiv,numAdd)

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).

Notes

For performance reasons, limit the number of times a screen calls this function to 21 or fewer.

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.

In This Topic
Related Links