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

Syntax<br />

Round( numValue )<br />

numValue<br />

A Real tag that holds the value to be rounded.<br />

Returned value<br />

Returns the integer result of the round function.<br />

Examples<br />

Tag Name<br />

Expression<br />

Tag Round( "345.87" ) // Returned value = 346<br />

Tag Round( "65.323" ) // Returned value = 65<br />

SetBit<br />

Sets a single bit in an Integer tag to 1.<br />

Function Group Execution Windows Embedded Thin Client<br />

SetBit Arithmetic Synchronous Supported Supported Supported<br />

Syntax<br />

SetBit( tagName, numBitNumber )<br />

tagName<br />

numBitNumber<br />

The name of an Integer tag where the bit value will be set.<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 />

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

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

Returned value<br />

0 No error<br />

1 Invalid parameter<br />

2 Tag does not exist<br />

Notes<br />

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

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

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

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

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

Saved successfully!

Ooh no, something went wrong!