mikakaraila / node-red-contrib-opcua

A Node-RED node to communicate OPC UA. Uses node-opcua library.
Other
217 stars 197 forks source link

A question about the error log of "writemultiple" function. #726

Closed wyplzx closed 1 month ago

wyplzx commented 2 months ago

Hello, A question about the error log of "writemultiple" function. When using the "writemultiple" method, it is found that: msg.topic fills in the old method of set msg.topic with nodeid" or set msg.topic with "writemultiple". After the execution is completed, the OPC tag data can be updated and written normally. But at the same time, an error message will be reported: [[error] [OpcUa-Client:MULTIWRITE] Client node error on: MULTIWRITE error: ["Write multiple as array session is not active!"] Can you help to check the following code in "opcuaclient.js": node_error("Write multiple as array session is not active!") in node-red-contrib-opcua/blob/master/opcua/102-opcuaclient.js (opcuaclient.js, line:1896), Does it need to be put together with the code of: "set_node_status_to("invalid session");" (opcuaclient.js, line:1894), to reduce log printing. Thank you very much.

Multiple_Write_issue_2024-09-05-001.json QQ20240905-150441 QQ20240905-150214 code: https://github.com/mikakaraila/node-red-contrib-opcua/blob/master/opcua/102-opcuaclient.js https://github.com/mikakaraila/node-red-contrib-opcua/blob/master/opcua/102-opcuaclient.js

wyplzx commented 1 month ago

Thanks @mikakaraila very much.. Very Good!!!