UAEnable — enables or disables an individual OPC UA client connection.
(UAEnable label 0|1)
label
The client connection label, as a string.
0|1
Use 1 to enable, or 0 to
disable.
A message indicating success or error. Please refer to Return Syntax for details.
This command enables or disables an individual OPC UA client connection by label. It must be called within a temporary edit session started with UABeginEdit and ending with UAApplyEdit.
require ("Application");
class UaTest Application
{
}
method UaTest.enableUa(label, enabled)
{
datahub_command("(UABeginEdit)", 1);
datahub_command(format("(UAEnable %s %d)",
stringc(label),
number(enabled)), 1);
datahub_command("(UAApplyEdit)", 1);
}
method UaTest.constructor ()
{
.enableUa("OPCUA000", 1);
}
ApplicationSingleton (UaTest);