Promotic

GetBit - method of the PmVar object

Description:
Returns the bit in the value of the variable. This value must be integer (Byte, Integer, Long).
Syntax:
Long GetBit(Long nIndex)
Parameters:
nIndex(Long) Bit index (zero-based index).
Return value:
1 - bit is set
0 - bit is reset
Note:
The property returns the value of the Long type instead of Boolean one because the experience shows it more practical in this case.
See also:
- PmVar.SetBit (method)
- Pm.GetBit (method)
- Pm.SetBit (method)
- PmBuffer.GetBit (method)
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oData = pMe.Pm("/Data");
var bBit = oData.Item(0).GetBit(1);

History:
Pm9.00.00: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.