Read - method of object PmaOpcClientGroup

Reading the selected block from the data group (defined on the "Data" page) from the OPC server.
Boolean Read(Long Attr, Long From, Long To)
oClientData.Read Attr, From, To
Attr(Long) The sum of following values specifies the transfer method: (see OPC DA Basic terms)
1 - Data from the DEVICE, otherwise from the CACHE. If DEVICE is entered, then the method Read will surely execute communication with the device. Therefore it can be slower than reading from CACHE, but it is for sure that the most recent values were read.
2 - Synchronous access, otherwise asynchronous. The synchronous access comes handy if immediately after calling the Read it is needed to have the read data set on the "Data" page. The main disadvantge is that the Read can take longer time (because of waiting for data receive) slowing down the whole application.

The asynchronous access the transmission impulse is done, but the data can be received later, therefore immediately after terminating the Read method the data may not be set yet.

From(Long) Index of the first value (zero-based index).
To(Long) Index of the last value (zero-based index). -1 represents "till the end".
Return Values:
true - on success
false - on error
Calling the method oClientData.Read 0,0,-1 is identical to the Refresh method. For reading all data it is better to use the Refresh method.

The Read method needn't be called if the "Update from server at server change" configurator is checked (on the "Parameters" page) because the data are then "read" automatically.

See also:
JavaScriptVBScriptSelect and copy to clipboard

if (oClientData.Read(2, 4, 7))
PROMOTIC 9.0.8 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice