BiancoRoyal / node-red-contrib-iiot-opcua

deprecated - very new developed by PLUS for Node-RED - https://plus4nodered.com
https://www.npmjs.com/package/node-red-contrib-iiot-opcua
BSD 3-Clause "New" or "Revised" License
34 stars 8 forks source link

Writing Arrays via Write Node #51

Closed thedraft closed 5 years ago

thedraft commented 6 years ago

I'm submitting a ...

Problem

I want to write an array using the Write Node, but only the first value of the array is written. I applied the structure of the message according to the help entry, maybe I'm missing something. I also tried the message structure from the wiki with arrayType "Array" and it didn't work properly.

Minimal reproduction of the problem with instructions

  1. Sending the msg object to a connected write node: msg : Object object ----payload: object ----topic: "ns=0;s=inputSpectrum" ----nodetype: "write" ----injectType: "write" ----addressSpaceItems: array[1] ------0: object --------name: "inputSpectrum" --------nodeId: "ns=0;s=inputSpectrum" --------datatypeName: "Float" --------arrayTypeName: "Array" ----valuesToWrite: array[512]
  2. Monitor server via opcua-commander, only first value of the array is transmitted to the server
biancode commented 5 years ago

Hi, valuesToWrite should be an array[1] and the first object in the array has to be array[512]

Every entry in valuesToWrite is 1:1 for the addressSpaceItems:

----payload: object ----topic: "Writing" ----nodetype: "write" ----injectType: "write" ----addressSpaceItems: array[1] ------0: object --------name: "inputSpectrum" --------nodeId: "ns=0;s=inputSpectrum" --------datatypeName: "Float" --------arrayTypeName: "Array" ----valuesToWrite: array[1] ----------- [0] array[512]

But maybe there is more implementation to get it to work.

biancode commented 5 years ago

please, test with v3 and reopen if you got more information