[Feature Request]: Support TC2 (Was: [Bug]: Invalid tag item type from old Beckhoff)
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 504
- Avg merge
- 10h 55m
- Merged PRs (30d)
- 43
Description
### What happened?
Run the read example for GO and changed to a single bool which i can read from other clients on the same computer.
Using an older PLC with Twincat 2 on port 801.
`readRequest, err := connection.GetConnection().ReadRequestBuilder().
AddTagAddress("value-bool", "MAIN.myBool").
Build()
if err != nil {
panic(err)
}`
`{"level":"debug","connection":"ads.Connection{}","time":"2024-02-25T17:12:04+01:00","message":"created connection, connecting now"}
{"level":"trace","time":"2024-02-25T17:12:04+01:00","message":"Connecting"}
{"level":"trace","time":"2024-02-25T17:12:04+01:00","message":"connecting"}
{"level":"trace","time":"2024-02-25T17:12:04+01:00","message":"Sending request"}
{"level":"trace","time":"2024-02-25T17:12:04+01:00","message":"Sending message"}
{"level":"trace","time":"2024-02-25T17:12:04+01:00","message":"Reading"}
{"level":"debug","tag":"*model.DirectPlcTag","time":"2024-02-25T17:12:04+01:00","message":"Invalid tag item type"}
{"level":"info","time":"2024-02-25T17:12:04+01:00","message":"Shutting down driver manager"}
{"level":"trace","name":"ads","time":"2024-02-25T17:12:04+01:00","message":"closing driver"}
{"level":"trace","name":"tcp","time":"2024-02-25T17:12:04+01:00","message":"closing transport"}
{"level":"trace","time":"2024-02-25T17:12:04+01:00","message":"Closing"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x28 pc=0x69ea5c]`
### Version
Latest
### Programming Languages
- [ ] plc4j
- [X] plc4go
- [ ] plc4c
- [ ] plc4net
### Protocols
- [ ] AB-Ethernet
- [X] ADS /AMS
- [ ] BACnet/IP
- [ ] CANopen
- [ ] DeltaV
- [ ] DF1
- [ ] EtherNet/IP
- [ ] Firmata
- [ ] KNXnet/IP
- [ ] Modbus
- [ ] OPC-UA
- [ ] S7
Contributor guide
Research direction
Start with the plc4go read example and trace the ReadRequestBuilder/AddTagAddress path for the ADS/AMS connection shown in the report. Reproduce the invalid tag item type using the older TwinCAT 2 PLC on port 801; done means the bool value can be read successfully without the nil-pointer panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100