A Python desktop application for communicating with Siemens PLCs using the S7Comm protocol. Built with PySide6 and python-snap7.
- Variable Configuration: Define PLC variables with name, data type, DB number, and byte/bit offset
- Live Monitoring: Poll and display variable values in real-time
- Read/Write Support: Toggle BOOL values or write numeric values through a simple interface
- Configuration Persistence: Save and load variable configurations to JSON files
| Type | Description |
|---|---|
| BOOL | Single bit (with bit offset 0-7) |
| BYTE | Unsigned 8-bit integer |
| INT | Signed 16-bit integer |
| DINT | Signed 32-bit integer |
| REAL | 32-bit floating point |
- Siemens S7-300
- Siemens S7-400
- Siemens S7-1200
- Siemens S7-1500
- Python 3.9+
- PLC with PUT/GET communication enabled
./setup.shsetup.batThe setup script will:
- Check for Python 3.9+
- Create a virtual environment in
venv/ - Install all dependencies
./run.shrun.batYou can also activate the virtual environment manually:
# macOS / Linux
source venv/bin/activate
python main.py
# Windows
venv\Scripts\activate
python main.py- Configure Variables: Add PLC variables specifying their data type, DB number, and offset
- Connect: Enter the PLC IP address, rack, and slot, then click Connect
- Monitor: View live values as they update from the PLC
- Write: Toggle BOOL values or click "Write..." to set new values
For S7-1200 and S7-1500 PLCs, you must enable PUT/GET communication in TIA Portal:
- Open PLC Properties → Protection & Security
- Set "Full access (no protection)"
- Check "Permit access with PUT/GET communication from remote partner"
Additionally, for each Data Block you want to access:
- Right-click the DB → Properties
- Uncheck "Optimized block access"
| PLC Series | Rack | Slot |
|---|---|---|
| S7-1200 | 0 | 1 |
| S7-1500 | 0 | 1 |
| S7-300/400 | 0 | 2 |
MIT