Python driver for AutomationDirect Productivity Series PLCs.
Project description
Productivity
August 2019: This driver is in very early stages of development.
Python ≥3.5 driver and command-line tool for AutomationDirect Productivity Series PLCs.
Installation
pip install productivity
Usage
PLC Configuration
This driver uses Modbus TCP/IP for communication. Unlike the ClickPLC, modbus addresses need to be manually configured in the Productivity PLC firmware.
To do this, go to Write Program → Tag Database
, scroll down to the values you
care about, and double click the Mod Start
cell of each value. This will assign
Modbus addresses (e.g. 300001
) to the values.
Then, go to File → Export → Tags
to export a csv file. This will be used
by this driver so you don't need to remember addresses.
More can be found in the manual.
Command Line
$ productivity the-plc-ip-address path/to/tags.csv
See productivity --help
for more.
Python
This driver uses Python ≥3.5's async/await syntax to asynchronously communicate with a ClickPLC. For example:
import asyncio
from productivity import ProductivityPLC
async def get():
async with ProductivityPLC('the-plc-ip-address', 'path/to/tags.csv') as plc:
print(await plc.get())
asyncio.run(get())
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 Distribution
Built Distribution
Hashes for productivity-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 645ac30263aa7d182a8630c2a37cdb43eb532e89a26a22a7e1574133c913f5fb |
|
MD5 | bb464f96c0b04f45de872b156bacc478 |
|
BLAKE2b-256 | c1f37ff921206d09b65e4430b974f76e8b0c04fbe9a1cac72f4cd1d7d5b0305f |