Python driver for AutomationDirect Productivity Series PLCs.
Project description
Productivity
NOTE: This 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 (see manual).
To use this driver, go to Write Program → Tag Database
, scroll down to the values
you care about, and double click the Mod Start
cell of each value to assign an address.
Then, go to File → Export → Tags
to export a csv file. The file is used here so
you don't need to remember the addresses.
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.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4319aec2d9ff11cf1b9cef8efc19b4debb98940508673bc27b484b19ed4bce36 |
|
MD5 | 43c79ffafd885ad3ab6284e5d27851ef |
|
BLAKE2b-256 | 21acdd83451e67bee663cbce5d85fa120b92ae088c60c7008c4388ca0463b761 |