【发布时间】:2017-08-28 13:08:11
【问题描述】:
我已使用 https://github.com/node-opcua/node-opcua/blob/master/documentation/creating_a_client.md 中的代码创建了一个 opcclient 以从 sample_server 读取。那行得通。现在我想连接到 Matrikon OPC 模拟服务器。所以在节点 sample_client 中,我改变了
var endpointUrl = "opc.tcp://" + require("os").hostname() + ":8080/Matrikon.OPC.Simulation.1";
在 MatrikonOPC Explorer 的左侧选项卡中,我看到了
Localhost '\\compname'
Matrikon.OPC.Simulation.1
Group0
单击右侧窗格中的Group0 时,我有一个标签Random.Int1,并且该值不断变化。在服务器信息窗格中,它显示服务器正在运行。
当我运行节点sample_client 时,它没有输出......它甚至没有给出
“无法连接到端点”
错误。好像卡在后面的线里了
client.connect(endpointUrl,function (err) {
有人知道我为什么以及如何构建端点 url。
【问题讨论】:
标签: node-opcua