Configuration OPC UA Server (Milo)?

谁说我不能喝 提交于 2020-01-23 02:52:05

问题


I've just checked out the Eclipse Milo Project (https://projects.eclipse.org/proposals/milo), which seems to be a great project for an "open" OPC UA Client/Server even with the implemented OPC Stack. The project on github (https://github.com/eclipse/milo) contains a Hello World example, where an OPC Server is started and an example node is sent and received from the client. Everything works fine!

But in my next step, I wanted to check if the server is configured correctly. Therefore I've installed Matrikon Explorer, but the Explorer is stating out "No OPC servers installed on this machine" right after start (while the hello world example with a running OPC Server is running of course).

Also checked, if SAP Plant Connectivity is recognizing the OPC Server (which is the goal of my project) -> "Found no OPC Server on your system/localhost"

Where is my problem, what do I have to do, to install and configure the Server correctly?

Here's the Hello World Example:

public static void main(String[] args) throws Exception {
    // Start server

    int port = 12686;
    String serverName = "test-server";
    OpcUaServerConfig serverConfig = OpcUaServerConfig.builder()
        .setBindPort(port)
        .setCertificateManager(new DefaultCertificateManager())
        .setCertificateValidator(new DefaultCertificateValidator(createTempDir()))
        .setServerName(serverName)
        .setUserTokenPolicies(singletonList(USER_TOKEN_POLICY_ANONYMOUS))
        .build();

    OpcUaServer server = new OpcUaServer(serverConfig);

    server.getNamespaceManager().registerAndAdd(
        "urn:eclipse:milo:opcua:test-namespace",
        idx -> new HelloNamespace());

    server.startup();

    while(true){
        System.out.println("server running");
    }
}

回答1:


Matrikon Explorer is an OPC-COM/DA client, and is probably interrogating the OPC Enum service in order to find registered COM clients.

OPC-UA is an entirely different, platform independent, technology. The concept of registration still exists, but it's not forced by default.

Try using an OPC-UA client like UaExpert to connect. Given the configuration you've copied, you'll want to point UaExpert at the endpoint URL opc.tcp://localhost:12686/test-server

I'm guessing there will be an issue once you connect with the partially implemented "hello world" namespace. I'll make sure we get a fully usable namespace example committed this week.

You can also look at the OpcUaClientIT integration test class for various client functionality and another example of setting up a server.



来源:https://stackoverflow.com/questions/38830195/configuration-opc-ua-server-milo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!