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

Examples<br />

Tag Name<br />

Tag<br />

Tag<br />

Expression<br />

GetBit( "numSource", 4 ) // If the tag numSource held a value of 0, then this function returns 0 and<br />

numSource holds a new value of 16.<br />

GetBit( "numSource", 1 ) // If the tag numSource held the value 17, then this function returns 0 and<br />

numSource holds a new value of 19.<br />

Sqrt<br />

Takes the square root of numValue.<br />

Function Group Execution Windows Embedded Thin Client<br />

Sqrt Arithmetic Synchronous Supported Supported Supported<br />

Syntax<br />

Sqrt( numValue )<br />

numValue<br />

Integer or Real tag to be square rooted.<br />

Returned value<br />

Returns the square root of the value in the numValue tag.<br />

Note: If numValue has a negative value, then this function returns the value 0 and sets the quality<br />

of the returned tag to BAD.<br />

Examples<br />

Tag Name<br />

Expression<br />

Tag SQRT( 25 ) // Returns the value 5<br />

Tag SQRT( 67 ) // Returns the value 8.185353<br />

Swap16<br />

Swaps the two lower bytes of a tag.<br />

Function Group Execution Windows Embedded Thin Client<br />

Swap16 Arithmetic Synchronous Supported Supported Supported<br />

Syntax<br />

Swap16( numValue )<br />

numValue<br />

Integer tag that holds the numeric value of the bytes to be swapped.<br />

Returned value<br />

Returns the numeric value after swapping the bytes.<br />

Page 542<br />

<strong>InduSoft</strong> Web Studio

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

Saved successfully!

Ooh no, something went wrong!