ReadInt16

Reads a variable of type integer from an ADS device.

object.ReadInt16(
  nIndexGroup  As Long,
  nIndexOffset As Long
) As Integer

Parameters

nIndexGroup

Index group of the ADS variable.

nIndexOffset

Index offset of the ADS variable.

Return value

Value of the ADS variable.

Description

The reading procedure is performed synchronously. In IEC 61131-6 this corresponds to the WORD, INT or UINT data type.

Examples

VBScript:

Dim VarInt16
VarInt16 = TcClientSync.ReadInt16(&H4020, 0)
WScript.echo "VarInt16 = ", VarInt16

JScript:

var VarInt16;
VarInt16 = TcClientSync.ReadInt16(0x4020, 0);
WScript.echo("VarInt16 = ", VarInt16);