additem
(To be removed) Add data access items to dagroup
object
Support for the OPC Data Access (DA) standard will be removed in a future release. Instead use OPC Unified Architecture (UA). See Version History.
Syntax
Description
IObj = additem(GObj,'IName')
adds items to
the group object GObj
with fully qualified item IDs given by
IName
. The object IObj
is the created item
object or objects, with properties described in daitem Properties. You specify IName
as a
single item ID or as a cell array of item IDs.
The daitem
object provides a connection to a data variable in
the physical device and returns information about the data variable, such as its
value, quality, and time stamp. Note that you cannot add a given item to the same
group more than once. However, you can add the same item to different groups.
By default, IObj
is active; that is, if the group’s Subscription property is
on
, the item's Value, Quality, and TimeStamp properties will be updated
at the group's UpdateRate.
Servers often require item IDs to be specified in the correct case. You can use
the serveritems
function to find valid
item IDs.
Note
You cannot add items to a public group. A public group has a fixed set of
item IDs common to all clients sharing that group. The
GroupType
property of a dagroup
object indicates the type of group.
IObj = additem(GObj,'IName','DataType')
adds items to the group object GObj
with the requested data type
given by
'
DataType
'
. You
specify '
DataType
'
as a cell array of character vectors, one for each item ID.
'
DataType
'
is
the data type in which the item's value is stored in the MATLAB® workspace. The supported data types are 'logical'
,
'int8'
, 'uint8'
,
'int16'
, 'uint16'
,
'int32'
, 'uint32'
,
'single'
, 'double'
,
'char'
, and 'date'
. Note that if the
requested data type is rejected by the server, the item is not added. The requested
data type is stored in the DataType
property. The canonical data
type (the data type used by the server to store the item value) is stored in the
CanonicalDataType
property.
IObj = additem (GObj,'IName','DataType','Active')
adds items to the group object GObj
with active status given by
'
Active
'
. You
specify '
Active
'
as
a cell array of character vectors, one for each item ID.
'
Active
'
can be
'on'
or 'off'
. The active status is stored
in the Active
property.