Python client library for TOYOPUC computer-link communication over TCP and UDP
Project description
Computer Link Protocol for Python
A user-focused Python library for JTEKT TOYOPUC Computer Link communication.
The recommended entry points are the high-level ToyopucDeviceClient class and the async helper functions in toyopuc.
Key Features
- High-Level First: Read and write by device string such as
P1-D0000,P1-M0000,ES0000, andFR000000. - Common Tasks Included: Batch reads, typed 32-bit / float access, bit-in-word updates, FR writes, relay access, and GUI monitoring.
- Profile-Aware Addressing: Supports TOYOPUC-Plus, Nano 10GX, PC10G, and related profiles.
- Practical Samples: Sync, async, UDP, FR, relay, clock/status, and GUI examples are included.
Quick Start
Installation
pip install toyopuc-computerlink
Latest release metadata and downloads are available at https://pypi.org/project/toyopuc-computerlink/.
Synchronous example
from toyopuc import ToyopucDeviceClient
with ToyopucDeviceClient("192.168.250.100", 1025) as client:
value = client.read("P1-D0000")
print(f"P1-D0000 = {value}")
client.write("P1-D0001", 1234)
client.write("P1-M0000", 1)
snapshot = client.read_many(["P1-D0000", "P1-D0001", "P1-M0000"])
print(snapshot)
Asynchronous example
import asyncio
from toyopuc import open_and_connect, read_named, read_typed, write_typed
async def main() -> None:
async with await open_and_connect("192.168.250.100", 1025) as plc:
speed = await read_typed(plc, "P1-D0100", "F")
print(f"speed = {speed}")
await write_typed(plc, "P1-D0200", "L", -500)
values = await read_named(plc, ["P1-D0000", "P1-D0100:F", "P1-D0000.0"])
print(values)
asyncio.run(main())
Basic area families P/K/V/T/C/L/X/Y/M/S/N/R/D require a P1-, P2-, or P3- prefix when a profile is in use.
Common user tasks
- Read or write one device:
client.read("P1-D0000"),client.write("P1-M0000", 1) - Read a mixed snapshot:
client.read_many([...])orawait read_named(plc, [...]) - Read 32-bit or float values:
client.read_dword(...),client.read_float32(...),await read_typed(..., "D" / "L" / "F") - Change one flag bit inside a word:
await write_bit_in_word(plc, "P1-D0100", bit_index=3, value=True) - Read or write FR storage:
client.read_fr(...),client.write_fr(..., commit=True) - Work through relay:
samples/relay_basic.py - Inspect clock and CPU status:
samples/clock_and_status.py
User docs
Start with these sample programs:
samples/high_level_minimal.pysamples/high_level_basic.pysamples/high_level_all_sync.pysamples/high_level_all_async.pysamples/high_level_udp.pysamples/fr_basic.pysamples/relay_basic.pysamples/clock_and_status.py
Maintainer-only protocol details remain under docsrc/maintainer/.
Development & CI
Quality is managed via run_ci.bat.
Local checks
run_ci.bat
For a release-style verification including docs:
release_check.bat
License
Distributed under the MIT License.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toyopuc_computerlink-0.1.4.tar.gz.
File metadata
- Download URL: toyopuc_computerlink-0.1.4.tar.gz
- Upload date:
- Size: 47.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d33d17cd194b88ad1c5dee7f0754ac61bfb5adaddf9b7cad4ffd589feb27cdad
|
|
| MD5 |
b3d270664def27db0beb2b76d0f977c9
|
|
| BLAKE2b-256 |
61019318e0ad5384b05ed5439925569e621802d849e3c7c24dcf36f520b4fb89
|
File details
Details for the file toyopuc_computerlink-0.1.4-py3-none-any.whl.
File metadata
- Download URL: toyopuc_computerlink-0.1.4-py3-none-any.whl
- Upload date:
- Size: 42.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe121c403e620c61f42903c4a4febe1d2cf474b1c860ec5fa29903bf60224f36
|
|
| MD5 |
290568ed6a7de13e6400971c3908a0f9
|
|
| BLAKE2b-256 |
95f9b3c0929a0b5492765b3a8e6877a4be62a1eae2b087c23ce32adefdfce47a
|