ReadArrayOfInt8

Reads an array with elements of type byte from an ADS device.

object.ReadArrayOfInt8(
  nIndexGroup As Long,
  nIndexOffset As Long,
  nCount As Long
) As Variant

Parameters

nIndexGroup

Index group of the ADS variable.

nIndexOffset

Index offset of the ADS variable

nCount

Number of elements to be read.

Return value

The array being read from the ADS device

Description

The read process is executed synchronously. In the IEC 61131-6 the array corresponds to the data type ARRAY OF BYTE, ARRAY OF SINT or ARRAY OF USINT..

Samples

VBScript:

Dim VarArrayInt8
VarArrayInt8 = TcClientSync.ReadArrayOfInt8(&H4020, 0, 2)
WScript.echo "VarArrayInt8(0) = ", VarArrayInt8(0)
WScript.echo "VarArrayInt8(1) = ", VarArrayInt8(1)

JScript:

var VarArrayInt8;
VarArrayInt8 = TcClientSync.ReadArrayOfInt8(0x4020, 0, 2);
WScript.echo("VarArrayInt8[0] = ", VarArrayInt8[0]);
WScript.echo("VarArrayInt8[1] = ", VarArrayInt8[1]);