[英]I cannot get value from server in Eclipse Milo Client and KepServerEx server
我正在使用 Eclipse Milo 0.6.3 和 KepServerEx 6。找到與服務器的連接。
我的目標是在 Java 客戶端中獲取標簽值並處理它們;
如果我這樣做: client.getAddressSpace().getObjectNode(new NodeId(2,"Codesys.CA1.Application.GVL_OPC_Vars.MDD_a_bArrB1000[x]")).browse()
我得到List<ReferenceDescription> referenceDescriptions
的List<ReferenceDescription> referenceDescriptions
(2000 個變量)
但是當我嘗試獲取單個標簽時,出現錯誤:
UaVariableNode node = client.getAddressSpace().getVariableNode(new NodeId(0, "Codesys.CA1.Application.GVL_OPC_Vars.MDD_a_bArrB1000[x].MDD_a_bArrB1000[1]")); DataValue value = node.readValue();
異常跟蹤:
status=Bad_NodeIdUnknown, description=The node id refers to a node that does not exist in the server address space.
PLC中的MDD_a_bArrB0000, MDD_a_bArrB1000, MDD_a_bArrB3000, MDD_a_bArrB4000
都是數組。
如果有人可以幫助我,請在這方面。
您正在構建的NodeId
肯定是錯誤的。 命名空間索引 0 保留供 OPC 基金會使用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.