OPCInterfacesDA30 Property
General info
Label |
OPC Server Interface DA 3.0 |
Description |
OPC Server Interface DA 3.0. |
Data type |
UInt64 |
Default value |
0 |
Type |
FlagGroup |
Code |
514 |
Symbolic name |
MODEL_PROP_OPCINTERFACESDA30 |
Lua access code |
syslib.model.properties.OPCInterfacesDA30 |
Available since |
1.0 |
- Parent properties
Attributes
| Name | Tooltip |
|---|---|
| PROP_VISIBLE | The property is visible in DataStudio and can be read by the inmation APIs. |
| PROP_VOLATILE | The property exists during runtime of the service only and is not saved to the image. |
| PROP_DETECTABLE | Property is detectable by system-driven server endpoint investigation. |
| PROP_HAS_DEFAULT | The property has a default value as standard. |
Flags
Flag group: OPCServerInterface_DA_30
Examples
Read from or write to the OPCInterfacesDA30 property.
-- Read from the OPCInterfacesDA30
syslib.getvalue("<OBJECT FULL PATH>.OPCComCRuntimeInformation.AvailableInterfaces.OPCInterfacesDA30")
-- Write to the OPCInterfacesDA30
syslib.setvalue("<OBJECT FULL PATH>.OPCComCRuntimeInformation.AvailableInterfaces.OPCInterfacesDA30",
syslib.model.flags.OPCServerInterface_DA_30.IOPC_SERVER)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the OPCInterfacesDA30
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.OPCComCRuntimeInformation.AvailableInterfaces.OPCInterfacesDA30"));
// Write to the OPCInterfacesDA30
Result result = sli.WriteValue(sc, new WriteItem(OPCServerInterface_DA_30.IOPC_SERVER, "<OBJECT FULL PATH>.OPCComCRuntimeInformation.AvailableInterfaces.OPCInterfacesDA30"));
A switch-like function of the flags.
function get_flag_name(mask)
local _opcsida = syslib.model.flags.OPCServerInterface_DA_30
if mask & _opcsida.IOPC_SERVER == _opcsida.IOPC_SERVER then return 'IOPC_SERVER'
elseif mask & _opcsida.IOPC_COMMON == _opcsida.IOPC_COMMON then return 'IOPC_COMMON'
elseif mask & _opcsida.ICONNECTION_POINT_CONTAINER == _opcsida.ICONNECTION_POINT_CONTAINER then return 'ICONNECTION_POINT_CONTAINER'
elseif mask & _opcsida.IOPC_BROWSE == _opcsida.IOPC_BROWSE then return 'IOPC_BROWSE'
elseif mask & _opcsida.IOPC_ITEM_IO == _opcsida.IOPC_ITEM_IO then return 'IOPC_ITEM_IO'
elseif mask & _opcsida.IOPC_ITEM_MGT == _opcsida.IOPC_ITEM_MGT then return 'IOPC_ITEM_MGT'
elseif mask & _opcsida.IOPC_GROUP_STATE_MGT == _opcsida.IOPC_GROUP_STATE_MGT then return 'IOPC_GROUP_STATE_MGT'
elseif mask & _opcsida.IOPC_GROUP_STATE_MGT2 == _opcsida.IOPC_GROUP_STATE_MGT2 then return 'IOPC_GROUP_STATE_MGT2'
elseif mask & _opcsida.IOPC_SYNC_IO == _opcsida.IOPC_SYNC_IO then return 'IOPC_SYNC_IO'
elseif mask & _opcsida.IOPC_SYNC_IO2 == _opcsida.IOPC_SYNC_IO2 then return 'IOPC_SYNC_IO2'
elseif mask & _opcsida.IOPC_ASYNC_IO2 == _opcsida.IOPC_ASYNC_IO2 then return 'IOPC_ASYNC_IO2'
elseif mask & _opcsida.IOPC_ASYNC_IO3 == _opcsida.IOPC_ASYNC_IO3 then return 'IOPC_ASYNC_IO3'
elseif mask & _opcsida.IOPC_ITEM_DEADBAND_MGT == _opcsida.IOPC_ITEM_DEADBAND_MGT then return 'IOPC_ITEM_DEADBAND_MGT'
elseif mask & _opcsida.IOPC_ITEM_SAMPLING_MGT_OPTIONAL == _opcsida.IOPC_ITEM_SAMPLING_MGT_OPTIONAL then return 'IOPC_ITEM_SAMPLING_MGT_OPTIONAL'
end
end
return get_flag_name(syslib.model.flags.OPCServerInterface_DA_30.IOPC_SERVER)