Promotic

NetPutDataMtx - method of the AtouchX object

Description:
Reads the entire database variable or a slice of the database matrix.
The method writes the content of the entire database variable or database matrix. The writing is performed asynchronously, after the writing is finished the EndNetPutData event is triggered, which reports the result of the communication. The event is also passed the Param value, which is used by the user for identification.
 
The content written must match the database variable being written. The matrix (and its part) must DATA be a two-dimensional array, whose number of rows and columns corresponds to the number of rows and columns being written. In this case, the initial indices of DATA do not matter, but only the dimensions. When writing just one element of the database matrix, DATA can be a simple value or a two-dimensional array of one row and one column.
 
DATA must be of such a type that its values can be written to a database variable without loss of information.
Syntax:
Integer NetPutDataMtx(Long WID, Variant Param, Integer Row, Integer Col, Integer Rows, Integer Cols, Variant DATA)
Parameters:
WID(Long) WID of the database variable to be written.
Param(Variant) The value that is passed unchanged to the write termination event.
Row(Integer) Index of the initial row of the matrix (zero-based index), where it is written.
Col(Integer) Index of the initial column of the matrix (zero-based index) where it is written.
Rows(Integer) The number of rows of the matrix to be written.
Cols(Integer) The number of columns of the matrix to be written.
DATA(Variant) Written content of the database variable.
Return values:
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oATC = pMe.Pm("/AtouchApp").Acx;
var nState;
var nWID = 2005;
var nParam = 100;
var DATA = "Data array";
DATA = DATA.SaveToVbArray();
nState = oATC.NetPutDataMtx(nWID, 3, 0, 10, 8, nParam, DATA);
PROMOTIC 9.0.21 SCADA system documentation - MICROSYS, spol. s r.o.

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