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 |
Windows |
Embedded |
Thin Client |
SetDisplayUnit
|
Graphic |
Synchronous |
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. |