Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

productivity-0.2.0.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

productivity-0.2.0-py2.py3-none-any.whl (14.3 kB view hashes)

Uploaded Python 2 Python 3

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