-
Couldn't load subscription status.
- Fork 0
Complete native Python S7 client implementation - Sharp7-like functionality without external dependencies #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete native Python S7 client implementation - Sharp7-like functionality without external dependencies #1
Conversation
Co-authored-by: lupaulus <20111917+lupaulus@users.noreply.github.com>
…entation Co-authored-by: lupaulus <20111917+lupaulus@users.noreply.github.com>
Co-authored-by: lupaulus <20111917+lupaulus@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Only work on s7_client, please remove s7_server changes
- See the sharp7 library please reimplement the same function; db_read, db_get, db_fill, write_multi_vars with the same parameters and return (adapted to python)
…ars and revert s7_server changes Co-authored-by: lupaulus <20111917+lupaulus@users.noreply.github.com>
I've addressed your feedback:
Added supporting Commit: 3a69792 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please implement all the Sharp7 client.cs method inside s7_client
…mpatibility Co-authored-by: lupaulus <20111917+lupaulus@users.noreply.github.com>
I have successfully implemented all Sharp7 client.cs methods inside s7_client.py. The implementation now includes: 116 total methods (up from 57) providing complete Sharp7 API compatibility:
All method signatures match Sharp7 patterns adapted for Python, ensuring full API compatibility. The s7_client.py is now a complete implementation of Sharp7 functionality in pure Python. Commit: 05cabf7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, continue to build the implementation in folder low-level, for the s7_server.py and the **s7_partner.py **
Use the https://github.com/davenardella/snap7 as reference to implement it into python
This PR implements a complete native Python S7 client in the
snap7/low_level/directory, providing Sharp7-like functionality without requiring external native library dependencies. This addresses the need for a pure Python implementation that can work in environments where native libraries are not available or desired.Overview
The implementation provides a fully functional S7 protocol client that can communicate with Siemens S7 PLCs using only Python standard libraries. It's designed to be API-compatible with the Sharp7 C# library while maintaining the familiar snap7 Python interface.
Key Features
Complete S7 Protocol Implementation
Enhanced API
Performance Benefits
Technical Implementation
Core Components
Fixed Issues
Comprehensive Testing
Usage Examples
Basic Connection and Operations
Data Conversion Utilities
Documentation and Examples
This PR includes comprehensive documentation:
snap7/low_level/README.md)examples_native_client.py)integration_example.py)test_native_client.py)NATIVE_CLIENT_SUMMARY.md)Compatibility
Benefits
This implementation successfully provides a complete alternative to the native library approach while maintaining full compatibility with existing code patterns.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
192.168.1.100python examples_native_client.py(packet block)python integration_example.py(packet block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.