Closed dei-p4i closed 1 year ago
It would be good to have tests for this issue.
opc.tcp://milo.digitalpetri.com:62541/milo ns=2;s=CTT/Static/All Profiles/Scalar/Int16
Write Set value to 1 by inject (value is 1) Set value to 0 by inject ("Error: expecting a number NaN") Set value to "0" by inject (value is 0)
Read read 1 by inject (msg.payload.value[0].value is 1) read 0 by inject (msg.payload.value[0].value.value is 0)
We working on a version 4.1 - we found a lot issues after the TS merge, which are to be fixed soon.
same problem with version 4.1
opc.tcp://milo.digitalpetri.com:62541/milo ns=2;s=CTT/Static/All Profiles/Scalar/Int16
Write Set value to 1 by inject (value is 1) Set value to 0 by inject ("Error: expecting a number NaN") Set value to "0" by inject (value is 0)
Read read 1 by inject (msg.payload.value[0].value is 1) read 0 by inject (msg.payload.value[0].value.value is 0)
We did not work on that for now. Maybe we have it next week in our next release.
@JoelKrec we should include this as a test in the package.
v4.1.1 actual test - release soon
Test Flow to implement in e2e testings
v4.1.1 the value is null, but with "OPCUA-IIoT-Inject" + "function" the value is 0
msg.payload.nodetype = 'inject'; msg.payload.injectType = 'write'
msg.payload.valuesToWrite = []; msg.payload.valuesToWrite[0] = "0";
return msg;
@CW0815 give v4.1.2 a try
This works with v4.1.2
But with a Response between Read and helper, the output is different at 0 and 1.
The response node is not working very well after the shift to TypeScript. See the TODO.md for more information.
This issue is stale because it has been open 60 days with no activity. It will be closed in 15 days, but can be saved by removing the stale label or commenting.
Which node-red-contrib-iiot-opcua version are you using?
4.0.9
What happened?
We encountered getting #NaN as values on our OPC UA Server, when using the write node, if the value was 0.0. Further testing showed that also 0 (for int types) and false (for boolean) resulted in null errors. Note: Before updating to 4.0.9 we used a 3.x.x version without that problem (don't remember exact version)
I found a probable problematic line of code in the package source: the if-test in the beginning of
buildNewVariant
in /src/core/opcua-iiot-core.ts:Server
OPCUA-IIoT-Flex-Server Node (Please attach AddressSpaceScript to the next section)
How can this be reproduced?
Zipped Demo with Flex-Server using (slightly modified) original addressSpace code: demo-iiot-opcua-zero-value-bug.json.zip
What did you expect to happen?
Value should be 0.0 (or 0 or false depending on used data type)
Other Information
No response