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 PLC firmware.
To do this, go to Write Program → Tag Database
, scroll down to the values you
care about, and click the Mod Start
cell of each value. This will assign
Modbus addresses (e.g. 300001
) to the values.
Command Line
$ productivity the-plc-ip-address
Per the manual, this will print a sample of Modbus registers. You can pipe this as needed. However, you'll likely want the python functionality below.
Python
This 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') 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.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d529884278bd1030869940cdef0480d9622095454c25471e167a72fe4967df67 |
|
MD5 | c7f30a7203b527f4e2878d58c8225a3d |
|
BLAKE2b-256 | 33e45b7a09cc8ea68fa687df01124514d323c0193fe3bc950395886d379ee161 |