diff --git a/CHANGELOG.md b/CHANGELOG.md index 60d77d76..03c81fc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added * [#384](https://github.com/stlehmann/pyads/pull/384) Enable processing of nested structures +### Changed + +* [#437](https://github.com/stlehmann/pyads/pull/437) Solve issue of too little buffer space allocated to receive for automatic AMS NetID query + ## 3.4.2 ### Changed -* [#402](https://github.com/stlehmann/pyads/pull/402) Universal DLL path for TwinCat 4026 and 4024 +* [#402](https://github.com/stlehmann/pyads/pull/402) Universal DLL path for TwinCat 4026 and 4024 ## 3.4.1 diff --git a/pyads/pyads_ex.py b/pyads/pyads_ex.py index 6a7e4459..575a2ead 100644 --- a/pyads/pyads_ex.py +++ b/pyads/pyads_ex.py @@ -394,8 +394,10 @@ def adsGetNetIdForPLC(ip_address: str) -> str: data_header += struct.pack(">4s", b"\x00\x00\x00\x00") # Block of unknown data, addr = send_raw_udp_message( - ip_address, data_header, 395 - ) # PLC response is 395 bytes long + ip_address, data_header, 398 + ) + # PLC response should be 395 bytes long, but some PLCs running build 4026+ + # respond with more bytes, so this takes care of that rcvd_packet_header = data[ 0:12