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

The number of decimal places to be displayed, for the range of real numbers specified by<br />

numBaseValue.<br />

Returned value<br />

0 Error<br />

1 Success<br />

Notes<br />

If you call this function more than once with different parameters for each call, then you can build a<br />

virtual table of format settings. You can set a different number of decimal places for each range of real<br />

numbers, and all of the settings are saved for the duration of runtime or until you reset the table using the<br />

ResetDecimalPointsTable function.<br />

Note: This formatting does not change the actual value of any tag or expression. It only changes<br />

how the value is displayed by on-screen objects.<br />

Examples<br />

Tag Name<br />

Expression<br />

Tag SetDecimalPoints( 1.5, 3 ) // Displays 3 decimal places for all real numbers greater than or equal to 1.5.<br />

Tag SetDecimalPoints( −3, 1 ) // Displays 1 decimal place for all real numbers less than or equal to −3.<br />

SetDisplayUnit<br />

Finds all tags and all Grid object and Trend Control object values that have a specific engineering unit (as<br />

stored in the Unit tag field), and then sets the DisplayUnit, UnitDiv, and UnitAdd fields on those tags.<br />

Function Group Execution Windows Embedded Thin Client<br />

SetDisplayUnit Graphic Synchronous Supported Supported Supported<br />

Syntax<br />

SetDisplayUnit(strUnitOrigin,strDisplayUnit,numDiv,numAdd)<br />

strUnitOrigin<br />

strDisplayUnit<br />

numDiv<br />

numAdd<br />

The engineering unit to be matched.<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 strUnitOrigin parameter is empty.<br />

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

Page 652<br />

<strong>InduSoft</strong> Web Studio

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

Saved successfully!

Ooh no, something went wrong!