oClientData.Read Attr, From, To
Attr | (Long) The sum of following values determines 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". |
The Read method needn't be called if the configurator Update from server at server change is set on the Parameters page because the data are then "read" automatically.