OPCAddItem2 — adds OPC items to a connection.
(OPCAddItem2 label flags propid item (parent...))
label
The name for this connection, as displayed in the OPC option of the Properties window.
flags
one or more of the following:
IS_BRANCH
|
= 0X0001
|
IS_LEAF
|
= 0X0002
|
IS_PROP
|
= 0X0004
|
PARENT_IS_LEAF
|
= 0X0008
|
IS_EXPLICIT
|
= 0X0010
|
![]() | |
The |
propid
If this point is a property of an OPC leaf item
(IS_PROP is true), then the property ID must
be entered here. Otherwise, enter 0. This entry
is ignored if IS_PROP is not true.
item
The name of the item on the OPC server, as a string.
parent...)A list of parent DataHub points (OPC branch nodes) that lead to this
point, each as a string. If the point is a property (has a non-zero
propid), then the last element of the
list should be an OPC leaf node. OPC servers can use the
"." character in item names, so this
hierarchy is not necessarily derivable from the point name.
A message indicating success or error. Please refer to Return Syntax for details.
This command adds OPC items to an OPC server connection. It does not take effect until the OPCApply command is issued.
(OPCAddItem2 "MyOPCServer" 2 0 "Tank3.Level" ("Tank3" "Level"))