OPC-UA是OPC基金会开发的一种通用协议。
灵狐提供了channel-opc-ua服务和fox-edge-server-protocol-opc-ua解码器来读取对端opc-ua服务器的数据
opc的对象涉及到两个概念,分别是namespace和identifier,它们确定了一个具体的采样对象。
整个opc的全体对象的信息可以通过browseTree测试获得,不过该操作一次读取的数据量非常巨大,不一定能够读取成功。
你也可以用第三方测试工具,读取节点信息。
{
"operate": "browseTree"
}
{
"tableName": "fox-edge-opc-ua/v1/1.0.0/101.OPC_UA_ReadNode Table.csv",
"objectName": "Simulation",
"templateName": "读子节点数值"
}
配置参数

操作返回结果
[
{
"uuid": "810f9795-66a1-402a-8c4a-578947a4f9de",
"operateMode": "exchange",
"deviceName": "Prosys-OPC-UA-Simulation",
"deviceType": "OPC-UA",
"operateName": "读子节点数值",
"param": {
"tableName": "fox-edge-opc-ua/v1/1.0.0/101.OPC_UA_ReadNode Table.csv",
"objectName": "Simulation",
"templateName": "读子节点数值"
},
"timeout": 2000,
"record": true,
"data": {
"commStatus": {
"commSuccessTime": 1697532171647,
"commFailedCount": 0,
"commFailedTime": 0
},
"value": {
"status": {
"Counter": 22,
"Random": -0.975265554635254,
"Expression": 0.4978869773366248,
"Triangle": -1.5999999304314072,
"Sawtooth": 0.3999999761581421,
"Square": 2,
"Sinusoid": -1.9021129988215173
}
}
},
"code": 200,
"msg": ""
}
]