WriteArrayOfInt16

Writes an array with elements of type integer to an ADS device.

object.WriteArrayOfInt16(
  nIndexGroup As Long,
  nIndexOffset As Long,
  pValue As Variant
)

Parameters

nIndexGroup

Index group of the ADS variable.

nIndexOffset

Index offset of the ADS variable

nCount

Number of elements to write.

Return value

-

Description

The write process is executed synchronously. In the IEC 61131-6 the array corresponds to the data type ARRAY OF WORD, ARRAY OF INT oder ARRAY OF UINT.

Samples

VBScript:

Dim VarArrayInt16(1)
VarArrayInt16(0) = 0
VarArrayInt16(1) = 1
Call TcClientSync.WriteArrayOfInt16(&H4020, 0, VarArrayInt16)

JScript:

var VarArrayInt16[2];
VarArrayInt16[0] = 0;
VarArrayInt16[1] = 1;
TcClientSync.WriteArrayOfInt16(0x4020, 0,
VarArrayInt16);