PILS? Zapf it!
==============
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())
Raw data
{
"_id": null,
"home_page": "https://forge.frm2.tum.de/review/plugins/gitiles/mlz/pils/zapf",
"name": "zapf",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Georg Brandl",
"author_email": "g.brandl@fz-juelich.de",
"download_url": "https://files.pythonhosted.org/packages/3f/d2/0919a24d58ea129faa062dc4cc930fa9a06e9f0d07db4ac7ae025d3a2de8/zapf-0.4.15.tar.gz",
"platform": null,
"description": "PILS? Zapf it!\n==============\n\nThis is a client library for the PILS PLC interface specification,\nfound here: https://forge.frm2.tum.de/public/doc/plc/master/html/\n\nA minimal example of usage::\n\n import logging\n import zapf.scan\n\n # Connection via different protocols is abstracted via URIs.\n # Here we connect via Modbus/TCP using slave number 0.\n URI = 'modbus://my.plc.host:502/0'\n\n # The Scanner allows reading the PLC's \"indexer\" which provides\n # all metadata about the PLC and its devices.\n scanner = zapf.scan.Scanner(URI, logging.root)\n plc_data = scanner.get_plc_data()\n print('connected to PLC:', plc_data.plc_name)\n\n # For each found device, this will create a client object and\n # read the most basic property - the current value.\n for dev in scanner.scan_devices():\n print('got a device:', dev)\n print('device value:', device.read_value())\n",
"bugtrack_url": null,
"license": "GPL-2.0+",
"summary": "Client library for the PILS specification",
"version": "0.4.15",
"project_urls": {
"Homepage": "https://forge.frm2.tum.de/review/plugins/gitiles/mlz/pils/zapf"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3fd20919a24d58ea129faa062dc4cc930fa9a06e9f0d07db4ac7ae025d3a2de8",
"md5": "3e3114c7cba7aeb5dacb293863caa11b",
"sha256": "a58f939eaacfe5bc8a7b890621422ff6e391da5141c93ed3dc469a49a50f8f79"
},
"downloads": -1,
"filename": "zapf-0.4.15.tar.gz",
"has_sig": false,
"md5_digest": "3e3114c7cba7aeb5dacb293863caa11b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 437510,
"upload_time": "2024-11-06T11:20:11",
"upload_time_iso_8601": "2024-11-06T11:20:11.877160Z",
"url": "https://files.pythonhosted.org/packages/3f/d2/0919a24d58ea129faa062dc4cc930fa9a06e9f0d07db4ac7ae025d3a2de8/zapf-0.4.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-06 11:20:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "zapf"
}