This release is a pre-release and may not be stable for production use.
Rockwell ACD Project File Tools
The Rockwell .ACD file is an archive file that contains all the files used by RSLogix / Studio 5000 Logix Designer. It consists of version text files, compressed XML metadata, and several proprietary binary database files (Comps.Dat, SbRegion.Dat, Comments.Dat, Nameless.Dat).
This library parses those binary databases and exposes the project contents — controller tags, programs, ladder rungs, data types (UDTs), add-on instructions (AOIs), and hardware modules — as Python objects. It can also serialise the parsed project back to an L5X XML file that Studio 5000 can import.
Compatibility — Tested against Studio 5000 firmware versions 15–35. Python 3.8+ is supported; Python 3.12+ is recommended.
Installing
pip install acd-tools
Quick start — parse an ACD file
from acd.api import ImportProjectFromFile
project = ImportProjectFromFile("MyController.ACD").import_project()
controller = project.controller
# Basic controller info
print(controller._name) # controller name
print(controller.serial_number) # e.g. "16#AB12_3456"
print(controller.modified_date)
# Iterate controller-scoped tags
for tag in controller.tags:
print(f" {tag.name} ({tag.data_type}) — {tag._comments}")
# Walk programs -> routines -> ladder rungs
for program in controller.programs:
print(f"\nProgram: {program._name}")
for routine in program.routines:
print(f" Routine: {routine._name} [{routine.type}]")
for i, rung in enumerate(routine.rungs):
print(f" Rung {i}: {rung}")
# Inspect user-defined data types
for udt in controller.data_types:
member_names = [m.name for m in udt.members]
print(f"UDT {udt.name}: {member_names}")
# Inspect add-on instructions
for aoi in controller.aois:
print(f"AOI {aoi._name}: {len(aoi.routines)} routines, {len(aoi.tags)} params")
# Inspect hardware modules
for module in controller.map_devices:
print(f"Module {module._name}: vendor={module.vendor_id} "
f"type={module.product_type} code={module.product_code} slot={module.slot_no}")
Convert ACD to L5X
Export the parsed project as an L5X XML file (importable by Studio 5000):
from acd.api import ConvertAcdToL5x
ConvertAcdToL5x("MyController.ACD", "MyController.L5X").extract()
The output is pretty-printed by default. Pass pretty_print=False for a compact single-line file:
ConvertAcdToL5x("MyController.ACD", "MyController.L5X", pretty_print=False).extract()
Note — The L5X serialisation captures tags, programs, routines, rungs, UDTs, and AOIs. Hardware module metadata (catalog numbers, connection parameters) is not fully round-tripped because Rockwell stores those as opaque CIP identity records in the binary database rather than as strings.
Extract raw database files
Unzip all embedded files (.Dat, .XML, etc.) to a directory for inspection:
from acd.api import ExtractAcdDatabase
ExtractAcdDatabase("MyController.ACD", "output/").extract()
# output/ now contains Comps.Dat, SbRegion.Dat, Comments.Dat,
# Nameless.Dat, QuickInfo.XML, TagInfo.XML, XRefs.Dat, ...
Extract raw database records to files
Save every individual binary record from the Comps database as its own file, useful for reverse-engineering the record format:
from acd.api import ExtractAcdDatabaseRecordsToFiles
ExtractAcdDatabaseRecordsToFiles("MyController.ACD", "output/").extract()
Dump Comps database as a navigable folder tree
Writes the entire Comps database as a directory tree where each node is a .dat file.
A log file records the CIP class and instance for each record:
from acd.api import DumpCompsRecordsToFile
DumpCompsRecordsToFile("MyController.ACD", "output/").extract()
# Produces output/output.log + output/<comp_name>/<comp_name>.dat (recursive)
Low-level access via ExportL5x
For direct SQLite access to the parsed ACD databases:
from acd.l5x.export_l5x import ExportL5x
export = ExportL5x("MyController.ACD")
# Raw SQLite cursor — full access to comps, rungs, region_map, comments, nameless tables
cur = export._cur
cur.execute("SELECT comp_name, object_id FROM comps WHERE parent_id=0 AND record_type=256")
row = cur.fetchone()
ctrl_name, ctrl_id = row[0], row[1]
# High-level objects
controller = export.controller
project = export.project
Project structure
acd/
├── api.py # Public API (ImportProjectFromFile, ConvertAcdToL5x, ...)
├── l5x/
│ ├── export_l5x.py # ACD -> SQLite -> Python objects
│ └── elements.py # Dataclasses + Builder classes for all project elements
├── database/ # Binary .Dat file reader
├── record/ # Record parsers (Comps, SbRegion, Comments, Nameless)
├── generated/ # Kaitai Struct generated parsers (comps, comments, ...)
└── zip/ # ACD archive extraction
Running the tests
pip install -e ".[dev]"
pytest
Developing
Sections of the code are generated from kaitai template (.ksy) files in the resources/templates folder. These are generated during the install phase. The python scripts which are generated are located in the acd/generated folder.
Contributing
Contributions are welcome. Open an issue or pull request on GitHub.
The sample ACD file used by the tests is resources/CuteLogix.ACD.
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 acd_tools-0.3a2.tar.gz.
File metadata
- Download URL: acd_tools-0.3a2.tar.gz
- Upload date:
- Size: 96.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e08b98caa3e0c02a39dd0c3026f6b4a8bc07cabb78886fa02a68d7ead8439ef0
|
|
| MD5 |
95c80c99bf128485a7e76f3f70df019a
|
|
| BLAKE2b-256 |
f952d16b58d7dfd997bc5fd53b1271f6c63520b2646d148ff8b14c4c2559bf1d
|
Provenance
The following attestation bundles were made for acd_tools-0.3a2.tar.gz:
Publisher:
release.yml on hutcheb/acd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acd_tools-0.3a2.tar.gz -
Subject digest:
e08b98caa3e0c02a39dd0c3026f6b4a8bc07cabb78886fa02a68d7ead8439ef0 - Sigstore transparency entry: 2822999310
- Sigstore integration time:
-
Permalink:
hutcheb/acd@848c371f142eae856f5af51c5628be0e3a620c0b -
Branch / Tag:
refs/tags/0.3a2 - Owner: https://github.com/hutcheb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@848c371f142eae856f5af51c5628be0e3a620c0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file acd_tools-0.3a2-py3-none-any.whl.
File metadata
- Download URL: acd_tools-0.3a2-py3-none-any.whl
- Upload date:
- Size: 88.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fff35ccfe4655c3f9fcd7e3a136e8aec0189cd067940e7e97cb3ccb8f0ac88c
|
|
| MD5 |
7c53a1cc38b992e5f10c9694ca5907a6
|
|
| BLAKE2b-256 |
daf08eefb005c577dbb5b4a46d0263b06fefec5fbfe49d080bb41f42c20b075b
|
Provenance
The following attestation bundles were made for acd_tools-0.3a2-py3-none-any.whl:
Publisher:
release.yml on hutcheb/acd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acd_tools-0.3a2-py3-none-any.whl -
Subject digest:
2fff35ccfe4655c3f9fcd7e3a136e8aec0189cd067940e7e97cb3ccb8f0ac88c - Sigstore transparency entry: 2822999332
- Sigstore integration time:
-
Permalink:
hutcheb/acd@848c371f142eae856f5af51c5628be0e3a620c0b -
Branch / Tag:
refs/tags/0.3a2 - Owner: https://github.com/hutcheb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@848c371f142eae856f5af51c5628be0e3a620c0b -
Trigger Event:
push
-
Statement type: