Skip to main content

A basic PCOM implementation in Python

Project description

PCOM

A very basic Unitronics PCOM protocol implementation in Python.

How to use

from pcom import commands
from pcom.plc import EthernetPlc

with EthernetPlc(address=('192.168.5.43', 1616)) as plc:
    # Read realtime clock
    c = commands.ReadRtc()
    res = plc.send(c)
    print(res)

    # Set realtime clock
    c = commands.SetRtc(value=datetime.now())
    plc.send(c)

    # Set MB 300 through 304
    values = [True, False, True, True, False]
    c = commands.SetBits(code=commands.SetBits.MEMORY, address=300, values=values)
    plc.send(c)


Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pcom-0.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file pcom-0.1-py3-none-any.whl.

File metadata

  • Download URL: pcom-0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.11.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for pcom-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d06bd38d6153c6a799534283e27e03a6a886a0d77839fd5ece706bd018826a83
MD5 ca7f186a07bc076aca58cb887d5a25c2
BLAKE2b-256 474fe29a0b9b35220074cecda7db355add6c184c81e45cbfe925f5f9e2b0485d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page