Siemens S7 PLCs communication with python-snap7.
Project description
Wrapper for python-snap7 library.
Authors
Installation
Install as a package from source files
git clone https://github.com/Jaimead7/PyPLC.git
cd PyPLC
py -m pip install .
Install as a package from pypi
py -m pip install jaimead7-pyplc
Usage
Create a .toml file with the structure descrived in ./docs/examples/plc.toml.
from pathlib import Path
import pyPLC
file_path: Path = Path('./docs/examples/plc.toml')
manager: PyPLC = PyPLC.from_file(file_path)
ret = manager.connect()
ret, value = manager.read_var(var= 'Var1') # value = 10.5
ret, value = manager.write_var(var= 'Var1', value= 3.4)
ret, value = manager.read_var(var= 'Var1') # value = 3.4
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jaimead7_pyplc-0.0.1-py3-none-any.whl.
File metadata
- Download URL: jaimead7_pyplc-0.0.1-py3-none-any.whl
- Upload date:
- Size: 60.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9505cf9fabc955c8394c8068605ba385380ed455aad7c7c8bf20c227701003f6
|
|
| MD5 |
d6af09d6bb0d352dd60f8c4a11dc969b
|
|
| BLAKE2b-256 |
c8142055f4a08f9ae41991972a28d42d5ffb0229bada94ea00a500c0cfc86124
|