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 Read method 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" tab. The main disadvantge is that the Read method 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 "Refresh from server at server change" configurator is checked (on the "Parameters" tab) because the data are then "read" automatically.
var oOpcGroup = pMe.Pm("/OpcClient/Group1");
if (oOpcGroup.Read(2, 4, 7))
//...