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

Edge HMI

SetDisplayUnit

  • Last UpdatedOct 29, 2026
  • 1 minute read

Finds all tags and all Grid object and Trend Control object values that have a specific engineering unit (as stored in the Unit tag field), and then sets the DisplayUnit, UnitDiv, and UnitAdd fields on those tags.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

SetDisplayUnit

Graphic

Synchronous

No

Supported

Supported

Supported

Supported

Supported

Syntax

SetDisplayUnit(strUnitOrigin,strDisplayUnit,numDiv,numAdd)

strUnitOrigin

The engineering unit to be matched.

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

strUnitOrigin parameter is empty.

-3

numDiv parameter is invalid (equal to 0).

Notes

This function only affects how the tag values are displayed on screen; it does not change the actual tag values in any way.

Examples

Tag Name

Expression

Tag

SetDisplayUnit( "C", "F", 0.555556, 32 ) // For all tags and object values with a Unit of "C", 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