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)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|