milo如何浏览Kepware OPC

时间:2018-10-18 08:21:52

标签: milo

当我尝试浏览Kepware OPC的节点时,在浏览数组标签节点时我有此异常

    \Server\_AdvancedTags\_ConnectionSharing\_CustomAlarms\_DataLogger\_EFMExporter\_IDF_for_Splunk\_IoT_Gateway\_LocalHistorian\_Redundancy\_Scheduler\_SecurityPolicies\_SNMP Agent\_System\_ThingWorx\Channel1\_Statistics\_System\Device1\_System\_Hints\B0-B9999 [r][c] Boolean Array
\Server\_AdvancedTags\_ConnectionSharing\_CustomAlarms\_DataLogger\_EFMExporter\_IDF_for_Splunk\_IoT_Gateway\_LocalHistorian\_Redundancy\_Scheduler\_SecurityPolicies\_SNMP Agent\_System\_ThingWorx\Channel1\_Statistics\_System\Device1\_System\_Hints\B0-B9999 [r][c] Boolean Array\B0-B9999 Boolean
java.util.concurrent.ExecutionException: UaException: status=Bad_NodeIdUnknown, message=The node id refers to a node that does not exist in the server address space.

以下代码:

    private void NodeDiscoverAsync(Node rootNode,String indent) throws ExecutionException, InterruptedException {
    List<Node> childs = client.getAddressSpace().browseNode(rootNode).get();
    if(childs.size()==0)
    {
        System.out.println(indent);
    }
    else
    {
        for (Node node : childs)
        {
            indent = indent + "\\" + node.getDisplayName().get().getText();
            NodeDiscoverAsync(node,indent);
        }
    }
}

我做错了什么?

0 个答案:

没有答案
相关问题