Skip to main content

Client library for the PILS specification

Project description

This is a client library for the PILS PLC interface specification, found here: https://forge.frm2.tum.de/public/doc/plc/master/html/

A minimal example of usage:

import logging
import zapf.scan

# Connection via different protocols is abstracted via URIs.
# Here we connect via Modbus/TCP using slave number 0.
URI = 'modbus://my.plc.host:502/0'

# The Scanner allows reading the PLC's "indexer" which provides
# all metadata about the PLC and its devices.
scanner = zapf.scan.Scanner(URI, logging.root)
plc_data = scanner.get_plc_data()
print('connected to PLC:', plc_data.plc_name)

# For each found device, this will create a client object and
# read the most basic property - the current value.
for dev in scanner.scan_devices():
    print('got a device:', dev)
    print('device value:', device.read_value())

Project details


Download files

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

Source Distribution

zapf-0.5.2.tar.gz (436.1 kB view details)

Uploaded Source

Built Distribution

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

zapf-0.5.2-py3-none-any.whl (69.1 kB view details)

Uploaded Python 3

File details

Details for the file zapf-0.5.2.tar.gz.

File metadata

  • Download URL: zapf-0.5.2.tar.gz
  • Upload date:
  • Size: 436.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.11

File hashes

Hashes for zapf-0.5.2.tar.gz
Algorithm Hash digest
SHA256 025b88f95b3ba95eb0e238434f3803247ba1d25ce7b3d6af86f6ab39c868edb2
MD5 49756d0a6d2ad10fee2e4525c296cfc3
BLAKE2b-256 b16e5b1b024917bd68c240df783d891833bcefc4bb7ba14821409e1f859ce1ee

See more details on using hashes here.

File details

Details for the file zapf-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: zapf-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 69.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.11

File hashes

Hashes for zapf-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef33df02c72a1cafedc22f944f8793b06fa687e5d9e6c5564df67764da737914
MD5 4ed353af8bea6eb6ebf5cb23d934c15a
BLAKE2b-256 87bcc7ce5119e1dca92badc2b68e4d9c9a6dad6d60f9b3bf3d723920e6bf2d4f

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