[Feature Request]: better error message when data-content doesn't mach data-spec in S7
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 504
- Avg merge
- 10h 55m
- Merged PRs (30d)
- 43
Description
### What would you like to happen?
recently i implemented plc communication using S7 put/get-protocol. After some fumbling the adress syntax was correct and reading/writing worked. Then i needed to write value 0x8000 into an `"%DB123.DBW96:INT"`, which failed. Lengthy probing revealed, that `0x8000` is not an Integer in S7, so that `WORD` format needs to be used instead of `INT`.
I ask for better error message when communication detects this. All we have now is some NPE when accessing the result-status.
### Programming Languages
- [x] plc4j
- [ ] plc4go
- [ ] plc4c
- [ ] plc4net
### Protocols
- [ ] AB-Ethernet
- [ ] ADS /AMS
- [ ] BACnet/IP
- [ ] CANopen
- [ ] DeltaV
- [ ] DF1
- [ ] EtherNet/IP
- [ ] Firmata
- [ ] KNXnet/IP
- [ ] Modbus
- [ ] OPC-UA
- [x] S7
Contributor guide
Research direction
Start by reproducing the plc4j S7 put/get case using "%DB123.DBW96:INT" and the value 0x8000, then trace how the data-content/data-spec mismatch reaches result-status. Done means the communication reports a specific, useful mismatch instead of producing an NPE and indicates that WORD is required for this value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- embedded-iot, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100