write
(To be removed) Write values to group 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
write(
writes
values to all the items contained in the GObj
,Values
)dagroup
object
GObj
. Values
is a cell array of values--one for each
item. To ensure that a specific value is written to the correct item object, you should
construct the Values
cell array based on the order of the items returned
by the Item
property of GObj
.
write(
writes
values to all the items contained in the vector of IObj
,Values
)daitem
objects
specified by IObj
.
The data types of the values do not need to match the canonical data type of the associated items. However an error is returned if a data type conversion cannot be performed.
Because the values are written to the device, this operation might be slow. The function does not return until it verifies that the device has actually accepted or rejected the data.
Note
The behavior of an OPC server when writing NaN
to an item is
server-dependent. If you attempt to write NaN
to an OPC server, the
value might be silently ignored by the OPC server. That is, the server might not
generate any events in response to writing NaN
to an item.