18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

Notes<br />

This function only affects how the tag values are displayed on screen; it does not change the actual tag values<br />

in any way.<br />

Examples<br />

Tag Name<br />

Tag<br />

Expression<br />

SetDisplayUnit( "C", "F", 0.555556, 32 ) // For all tags and object values with a Unit of "C", the<br />

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.<br />

SetTagDisplayUnit<br />

Sets the DisplayUnit, UnitDiv, and UnitAdd properties on a specific tag.<br />

Function Group Execution Windows Embedded Thin Client<br />

SetTagDisplayUnit Graphic Synchronous Supported Supported Supported<br />

Syntax<br />

SetTagDisplayUnit(strTagName,strDisplayUnit,numDiv,numAdd)<br />

strTagName<br />

strDisplayUnit<br />

numDiv<br />

numAdd<br />

The name of the specific tag on which the DisplayUnit, UnitDiv and UnitAdd tag fields will be<br />

set.<br />

Note: If this parameter is given a tag, then that tag should contain the name of<br />

the tag on which the tag fields will be set.<br />

The new value for the DisplayUnit tag field.<br />

The new value for the UnitDiv tag field.<br />

The new value for the UnitAdd tag field.<br />

Returned value<br />

0 Success.<br />

-1 Wrong number of parameters.<br />

-2 Specified tag doesn't exist.<br />

-3 numDiv parameter is invalid (equal to 0).<br />

Examples<br />

Tag Name<br />

Tag<br />

Expression<br />

SetTagDisplayUnit( "TagTemp", "F", 0.555556, 32 ) // For the tag "TagTemp", the<br />

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.<br />

<strong>InduSoft</strong> Web Studio Page 653

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!