All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- #293 Support WSTRINGS in structures
- #292 Improve performance of get_value_from_ctype_data for arrays
- #273 Add TC3 port 2, 3, 4 constants
- #247 Add support for FreeBSD (tc/bsd)
- #274 Support WSTRING datatype
- #269 Refactor Connection class in its own module, add helper functions
- #260 Fix decoding of symbol comments
- #282 Removed sample project in adslib to fix install error on Windows
- #264 Fix error when using read_list_by_name on Linux machines
- #249 Add testserver package to setup.py
- #223 Add structure support for symbols
- #238 Add LINT type to DATATYPE_MAP
- #239 Add device notification handling for AdvancedHandler in testserver
- #221 CI now uses Github Actions instead of TravisCI. Also Upload to PyPi is now on automatic.
- #242 Upgrade requirements.txt
- #243 Refactor testserver as a package with multiple files
- Use TwinCAT3 default port 851 (PORT_TC3PLC1) in docs
- #187 Support structured data types in
read_list_by_name
- #220 Support structured data types in
write_list_by_name
. Also the AdvancedHandler of the testserver now support sumup_read and sumup_write commands. - #195 Read/write by name without passing the datatype
- #200 Split read write by list into max-ads-sub-comands chunks
- #206 AdsSymbol now supports DT, DATE_TIME and TIME datatypes
- #202 Testserver now support variable sumread and sumwrite with variable length for uint8 and string datatypes
- #209 Removed duplicate tests and added addtional asserts to existing tests
- #212 Add type annotations to structs.py
- comprehensive documentation and short Quickstart guide
- #192 Make AdsSymbol even more pythonic
- Replace AdsSymbol.set_auto_update function by AdsSymbol.auto_update property
- Make AdsSymbol.value a property
- AdsSymbol.value setter writes to plc if AdsSymbol.auto_update is True
- #193 Remove testserver_ex package which is still in development. The testserver_ex package can be found in the [testserver_ex branch](https://github. com/stlehmann/pyads/tree/testserver_ex).
- fixed error with source distribution not containing adslib directory
- #174 Add
AdsSymbol
class for pythonic access - #169 Add adsGetNetIdForPLC to pyads_ex
- #179 Added destructor to
pyads.Connection
- #155 Add get_all_symbols method to Connection
- #157 Add write_structure_by_name method to Connection
- #161 Add sum read and write commands
- #150 Use function annotations and variable annotations for type annotations
- #140 Fix lineendings to LF in the repository
- #139 Fix documentation and test issues with DeviceNotifications
- ea707 Fix documentation on ReadTheDocs
- 45859 Fix issue with async handling in adslib
- #130 Allow read_write with NULL read/write data
- #131 Add FILETIME passthrough to notification decorator
- #111 test cases for notification decorators
- #113 Add option not to check for data size
- #118 Add support for arrays in notification decorator
- #112 Add getters/setters for connection netid and port
- #128 Deprecation warning for older non-class functions. In future versions only methods of the Connection class are supported.
- #127 Drop support for Python 2
- #120 Allow to write ctypes directly
- #125 Add notifications by address. The
data_name
parameter changed todata
as now not only strings can be passed but also a tuple with index group and offset. - #123 Add ULINT data type
- #106 Store notification callbacks per AmsAddr
- new function read_structure_by_name to read a structure with multiple datatypes from the plc (issue #82, many thanks to @chrisbeardy)
- simplify pyads.add_route, now the ams address can be supplied by a string instead of an AmsAddr object
- get/release handle methods for faster read/write by name
- add routes to a plc remotely with pyads.add_route_to_plc()
- update adslib to current upstream version (2018-03-22)
- fix structure definition inaccurarcies (issue #72)
- fix compatibility issue with new version of adslib (issue #78)
- fixed bug where parameter return_ctypes has not been passed through call hierarchy of all calls, thanks to pyhannes
- rename src directory to adslib to prevent naming conflicts
- add return_ctypes parameter for read functions to omit time-costy time conversion
- add array datatype support for read_write function
- add test with array datatype for read and read/write function
- add section for usage of array datatypes in Readme
- AdsLib: allow UNIX flavors to build more easily
- add support for ctypes.Structure in notification callback decorators
- remove race-condition related to the notification decorator, thanks to Luka Belingar for the bugfix
- bugfix: notifications on Windows didn't work
- bugfix: do not call add_route or delete_rout on Windows platform in Connection class
- increased coverage
With version 3.0.1 only the extended ADS functions will be used. This allows to use the same library functions for Linux and Windows. As a result the pyads.py module has been removed from the package. Certain older versions of TcAdsDll don't support the 'Ex' set of functions. If you experience trouble please update your TwinCAT version.
The new version also comes with completely covered PEP484 compliant type-annotations. So you can conveniently apply static type-checking with mypy or others.
- Apply to new PyPi
- Add
set_local_address
function to change local address on Linuxjk:w
Long Description for PyPi
Fix error with older TwinCAT2 versions and notifications.
Extended Testserver supports multiple device notifications
Notification callback decorator
Extended testserver that keeps written values and supports Device Notifications.
Include shared library for Linux ADS communication. No manual installation necessary anymore.
Connection
class to allow a more convenient object oriented workflow. Each
device connection is now an object with methods for reading, writing, ...
However it is still possible to use the old-style functional approach.
Added device notifications. Device notifications can now be used to monitor values on the PLC. On certain changes callbacks can be used to react. Thanks to the great implementation by Peter Janeck.
Linux support!
Pyads now has Linux compatibility by wrapping the open source ADS library provided by Beckhoff. The main API is identical on both Linux and Windows, however the Linux implementation includes a built in router which needs to be managed programmatically using pyads.add_route(ams_address, ip_address)
and pyads.delete_route(ams_address)
.
Version 2.1.0 also features vastly improved test coverage of the API, and the addition of a dummy test server for full integration testing.
I wanted to make the Wrapper more pythonic so I created a new module named pyads.ads that contains all the functions from pyads.pyads but in a more pythonic way. You can still access the old functions by using the pyads.pyads module.
Improvements:
- more pythonic function names (e.g. 'write' instead of 'adsSyncWrite')
- easier handling of reading and writing Strings
- no error codes, if errors occur an Exception with the error code will be raised