Azure-Samples / iot-edge-opc-plc

Sample OPC UA server with nodes that generate random and increasing data, anomalies and much more ...
MIT License
218 stars 94 forks source link

Cannot choose Slow or Fast nodes type of Bool or UIntArray #345

Closed dambsst closed 6 months ago

dambsst commented 6 months ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

start the app with NodeType=Bool or UintArray: --st=bool OR --st=uintarray OR --ft=bool OR --ft=uintarray docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --st=bool

Any log messages given by the failure

System.ArgumentNullException: Value cannot be null. (Parameter 'stepSize')
at OpcPlc.BaseDataVariableStateExtended..ctor(NodeState nodeState, Boolean randomize, Object stepSize, Object minValue, Object maxValue) in D:\a\1\s\src\BaseDataVariableStateExtended.cs:line 21

Expected/desired behavior

The application runs normally with the new node type, as defined in the documentation

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) Docker image latest

Versions

mcr.microsoft.com/iotedge/opc-plc:latest OpcPlc v2.12.3 from 01/26/2024 10:11:26 starting up ... OPC UA SDK 1.5.373.3 from 01/26/2024 06:22:14

Mention any other details that might be useful

Value is intentionally set to null. Is the feature still in progress? src/PluginNodes/SlowFastCommon.cs#L98

src/PluginNodes/SlowFastCommon.cs#L108


Thanks! We'll be in touch soon.

luiscantero commented 6 months ago

Thanks for reporting this. The linked PR fixes the issue. We should be doing a new release tomorrow as soon as another PR completes.