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

Expression<br />

Tag Pow( 2, 3 ) // Returned value = 8<br />

Tag Pow( 10, 4 ) // Returned value = 10000<br />

ResetBit<br />

Resets a single bit in an Integer tag to 0.<br />

Function Group Execution Windows Embedded Thin Client<br />

ResetBit Arithmetic Synchronous Supported Supported Supported<br />

Syntax<br />

ResetBit( tagName, numBitNumber )<br />

tagName<br />

numBitNumber<br />

The name of an Integer tag where the bit value will be reset.<br />

Note: To directly specify the name of a tag, rather than take the value of<br />

the tag, you must enclose the tag name in double-quotes. For example,<br />

ResetBit( "Second", 1 ).<br />

A numeric tag or value specifying the position (0…31) of the bit to reset.<br />

Returned value<br />

0 No error<br />

1 Invalid parameter<br />

2 Tag does not exist<br />

Notes<br />

You can use the Bit field to read/write values from specific bits in an integer tag. For example, enter Second-<br />

>b0 to access the LSB (Least Significant Bit of the Second tag), and Second->b31 to access the MSB (Most<br />

Significant Bit of the Second tag).<br />

Examples<br />

Tag Name<br />

Tag<br />

Tag<br />

Expression<br />

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

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

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

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

Round<br />

Rounds numValue to the nearest integer.<br />

Function Group Execution Windows Embedded Thin Client<br />

Round Arithmetic Synchronous Supported Supported Supported<br />

Page 540<br />

<strong>InduSoft</strong> Web Studio

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

Saved successfully!

Ooh no, something went wrong!