read
(To be removed) Read data synchronously from OPC DA groups or items
Support for the OPC Data Access (DA) standard will be removed in a future release. Instead use OPC Unified Architecture (UA). See Version History.
Description
and
S
= read(GObj
)
read
data for all the items contained in the S
= read(IObj
)dagroup
object,
GObj
, or for the vector of daitem
objects,
IObj
. The data is read from the OPC server’s cache, and
assigned to the structure S
.
You can synchronously read from the cache only if the Active
property is set to 'on'
for both the item and the group that
contains the item. A warning is issued if any of the objects passed to
read
are inactive. An inactive item is still returned in
S
, but the Quality
is set to
'BAD: Out of Service'
.
and
S
= read(GObj
,Src
)
read data from the source specified by S
= read(IObj
,Src
)Src
.
Src
can be 'cache'
or
'device'
. If Src
is
'device'
, data is returned directly from the device. If
Src
is 'cache'
, data is returned from the
OPC server's cache, which contains a copy of the device data. Note that the
Active
property is ignored when reading from
'device'
. Note also, that reading data from the device can be
slow.
When a read
operation succeeds, the Value, Quality, and TimeStamp properties of the associated items are updated to reflect
the values obtained from the read operation.