Skip to main content

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)


Metadata

Release files for pcom 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pcom 0.2
File Interpreter ABI Platform
pcom-0.2-py3-none-any.whl Python 3 none any Details

Release files / pcom-0.2-py3-none-any.whl

Download URL pcom-0.2-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e914fd38c41c07903c1b64d927ccd847835ab0bb5b3b966c3c13ec691fb23a1
BLAKE2b-256 checksum
How to use checksums
12ede94cdac168f8e95deb403fa807740b2e6703e301752f64100c61d0e3d410
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

0.11

1 release file

0.10

1 release file

0.9.1

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.3

1 release file

This release

0.2 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page