Skip to main content

Siemens S7 PLCs communication with python-snap7.

Project description

PyPLC

Wrapper for python-snap7 library.

Authors

Jaime Alvarez Diaz
email
GitHub Profile

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jaimead7_pyplc-0.0.1-py3-none-any.whl (60.4 kB view details)

Uploaded Python 3

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

Hashes for jaimead7_pyplc-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9505cf9fabc955c8394c8068605ba385380ed455aad7c7c8bf20c227701003f6
MD5 d6af09d6bb0d352dd60f8c4a11dc969b
BLAKE2b-256 c8142055f4a08f9ae41991972a28d42d5ffb0229bada94ea00a500c0cfc86124

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page