Skip to main content

A collection of tools to facilitate EPICS commissioning of PLC based systems

Project description

CI Coverage PyPI License

dls_plc_tools

Tools for interrogating Omron NX PLCs over EtherNet/IP, to support EPICS commissioning of PLC-based vacuum systems at Diamond Light Source.

They let you browse the tags a PLC publishes, inspect the layout of its structures, and watch values update live — without a Sysmac Studio licence or physical access to the controller. Everything is read-only explicit messaging: the same mechanism the EPICS ether_ip driver uses, serviced in the controller's spare time, so it is safe to run against production PLCs.

There are two front-ends over the aphyt library: a command-line tool (dls-read-plc) and a PySide6 desktop GUI (dls-read-plc-gui).

What Where
Source https://github.com/DiamondLightSource/dls-plc-tools
PyPI pip install dls-plc-tools
Docker docker run ghcr.io/diamondlightsource/dls-plc-tools:latest
Releases https://github.com/DiamondLightSource/dls-plc-tools/releases

Command-line tool

With just an IP address, dls-read-plc discovers every published structure tag on the PLC and summarises each one — its member layout and how many instances are actually in use:

dls-read-plc 172.23.x.x

Other modes:

dls-read-plc 172.23.x.x -l              # list every published tag and its type
dls-read-plc 172.23.x.x -s Seq          # show one structure's members and array bounds
dls-read-plc 172.23.x.x -d Seq          # live-updating table of a structure's values
dls-read-plc 172.23.x.x -d Seq -m Desc,State,Status   # choose which members to watch

--detail/-d redraws a table every 2 seconds (floor 0.5 s, set with --interval), highlighting cells that have changed. Press Ctrl-C to stop. See dls-read-plc --help for the full option list.

GUI

dls-read-plc-gui 172.23.x.x

dls-read-plc-gui gives you a browsable list of the PLC's published tags, a live table of a selected structure's values (changed cells flash amber), and an export of the discovered structure layouts to an Excel spreadsheet. The IP address argument is optional — you can also enter it in the window.

Installation

pip install dls-plc-tools

Or, for development, using uv:

git clone https://github.com/DiamondLightSource/dls-plc-tools.git
cd dls-plc-tools
uv sync
uv run dls-read-plc <ip>

Notes

  • These tools only ever read. They never write to the controller, never start a keep-alive poll, and keep at most one request in flight. Poll rates default to ~2 s and are floored at 0.5 s.
  • Tags are visible over EtherNet/IP only if they are globals with Network Publish set in Sysmac Studio, plus the controller's _-prefixed system variables. Enumeration uses Omron's Tag Name Server object (CIP class 0x6A).
  • DLS structures are structure-of-arrays: Seq.Interfc[1] is instance 1, with index 0 reserved as padding. A non-empty Desc entry marks an instance that is actually in use.

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

dls_plc_tools-1.0.0b2.tar.gz (84.5 kB view details)

Uploaded Source

Built Distribution

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

dls_plc_tools-1.0.0b2-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file dls_plc_tools-1.0.0b2.tar.gz.

File metadata

  • Download URL: dls_plc_tools-1.0.0b2.tar.gz
  • Upload date:
  • Size: 84.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dls_plc_tools-1.0.0b2.tar.gz
Algorithm Hash digest
SHA256 777a6ccf65af945ae81d8c0f993b3550a14713215e017c42feef2c88f2373496
MD5 af13547f49d663808fca6fdd005efced
BLAKE2b-256 9fe11d9160c7fbb0622f9133f6ae568411f817e0208a0d1c11c971c190f42524

See more details on using hashes here.

File details

Details for the file dls_plc_tools-1.0.0b2-py3-none-any.whl.

File metadata

  • Download URL: dls_plc_tools-1.0.0b2-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dls_plc_tools-1.0.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 d0e3ed349f4c130e7b34ec750f76f684f1bf4fde276d67512b098bc8eb9101ef
MD5 81d97a3506dd2c7442c2a11b888f8e2e
BLAKE2b-256 18325288140c3635c5b5c46f2dc7fdd8c3c36a358925ad175ad5b8849ff1a899

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