ReadArrayOfInt16
Reads an array with elements of type integer from an ADS device.
object.ReadArrayOfInt16(
nIndexGroup As Long,
nIndexOffset As Long,
nCount As Long
) As Variant
Parameter
nIndexGroup | Index group of the ADS variable. |
nIndexOffset | Index offset of the ADS variable. |
nCount | Number of elements which are 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 WORD, ARRAY OF INT or ARRAY OF UINT.
Samples
VBScript:
Dim VarArrayInt16
VarArrayInt16 = TcClientSync.ReadArrayOfInt16(&H4020, 0,2)
WScript.echo "VarArrayInt16(0) = ", VarArrayInt16(0)
WScript.echo "VarArrayInt16(1) = ", VarArrayInt16(1)
JScript:
var VarArrayInt16;
VarArrayInt16 = TcClientSync.ReadArrayOfInt16(0x4020, 0, 2);
WScript.echo("VarArrayInt16[0] = ",VarArrayInt16[0]);
WScript.echo("VarArrayInt16[1] = ",VarArrayInt16[1]);