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.4.15.tar.gz (437.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: zapf-0.4.15.tar.gz
  • Upload date:
  • Size: 437.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.7

File hashes

Hashes for zapf-0.4.15.tar.gz
Algorithm Hash digest
SHA256 a58f939eaacfe5bc8a7b890621422ff6e391da5141c93ed3dc469a49a50f8f79
MD5 3e3114c7cba7aeb5dacb293863caa11b
BLAKE2b-256 3fd20919a24d58ea129faa062dc4cc930fa9a06e9f0d07db4ac7ae025d3a2de8

See more details on using hashes here.

Supported by

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