![PyPI](https://img.shields.io/pypi/v/acd-tools?label=acd-tools)
![PyPI - Downloads](https://img.shields.io/pypi/dm/acd-tools)
![ACD Tools](https://github.com/hutcheb/acd/actions/workflows/acd-tools.yml/badge.svg)
## Rockwell ACD Project File Tools
The Rockwell ACD file is an archive file that contains all the files
that are used by RSLogix/Studio 5000.
It consists of a number of text files containing version information, compressed XML
files containing project and tag information as well as a number of database files.
This library allows you to unzip all the files and extract information from these files.
### Installing
To install acd tools from pypi run
```bash
pip install acd-tools
```
### Parsing the ACD file
To get the Controller object and get the program/routines/rungs/tags/datatypes, use something like this
```python
from acd.api import ImportProjectFromFile
controller = ImportProjectFromFile("../resources/CuteLogix.ACD").import_project().controller
rung = controller.programs[0].routines[0].rungs[0]
data_type = controller.data_types[-1]
tag_name = controller.tags[75].text
tag_data_type = controller.tags[75].data_type
```
### Unzip
To extract the file use the acd.api.ExtractAcdDatabase class. This extracts the database files to a directory.
```python
from acd.api import ExtractAcdDatabase
ExtractAcdDatabase('CuteLogix.ACD', 'output_directory').extract()
```
### Extract Raw Records From ACD Files
A select number of database files contain interesting information. This will save each database record to a file
to make it easier to see whats in them.
```python
from acd.api import ExtractAcdDatabaseRecordsToFiles
ExtractAcdDatabaseRecordsToFiles('CuteLogix.ACD', 'output_directory').extract()
```
### Dump Comps Database Records
The Comps database contains a lot of information and can be export as a directory structure to make it easier to look at.
It will also extract the CIP class and instance and write it to the log file.
```python
from acd.api import DumpCompsRecordsToFile
DumpCompsRecordsToFile('CuteLogix.ACD', 'output_directory').extract()
```
### Converting from ACD to L5X
This hasn't been started but could be feasible eventually.
Raw data
{
"_id": null,
"home_page": "https://github.com/hutcheb/acd",
"name": "acd-tools",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "rockwell acd logix",
"author": "Ben Hutcheson",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/c5/82/e09243a515562927aaae02145dcfa0439f12525ca03ee437f3412e243047/acd_tools-0.2a7.tar.gz",
"platform": null,
"description": "\n\n![PyPI](https://img.shields.io/pypi/v/acd-tools?label=acd-tools)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/acd-tools)\n![ACD Tools](https://github.com/hutcheb/acd/actions/workflows/acd-tools.yml/badge.svg)\n\n## Rockwell ACD Project File Tools\n\nThe Rockwell ACD file is an archive file that contains all the files \nthat are used by RSLogix/Studio 5000.\n\nIt consists of a number of text files containing version information, compressed XML\nfiles containing project and tag information as well as a number of database files.\n\nThis library allows you to unzip all the files and extract information from these files.\n\n### Installing\n\nTo install acd tools from pypi run\n\n```bash\npip install acd-tools\n```\n\n### Parsing the ACD file\n\nTo get the Controller object and get the program/routines/rungs/tags/datatypes, use something like this\n```python\nfrom acd.api import ImportProjectFromFile\n\ncontroller = ImportProjectFromFile(\"../resources/CuteLogix.ACD\").import_project().controller\nrung = controller.programs[0].routines[0].rungs[0]\ndata_type = controller.data_types[-1]\ntag_name = controller.tags[75].text\ntag_data_type = controller.tags[75].data_type\n```\n\n### Unzip\n\nTo extract the file use the acd.api.ExtractAcdDatabase class. This extracts the database files to a directory.\n\n```python\nfrom acd.api import ExtractAcdDatabase\n\nExtractAcdDatabase('CuteLogix.ACD', 'output_directory').extract()\n\n```\n\n### Extract Raw Records From ACD Files\n\nA select number of database files contain interesting information. This will save each database record to a file\nto make it easier to see whats in them.\n\n```python\nfrom acd.api import ExtractAcdDatabaseRecordsToFiles\n\nExtractAcdDatabaseRecordsToFiles('CuteLogix.ACD', 'output_directory').extract()\n\n```\n\n### Dump Comps Database Records\n\nThe Comps database contains a lot of information and can be export as a directory structure to make it easier to look at.\nIt will also extract the CIP class and instance and write it to the log file.\n\n```python\nfrom acd.api import DumpCompsRecordsToFile\n\nDumpCompsRecordsToFile('CuteLogix.ACD', 'output_directory').extract()\n\n```\n\n### Converting from ACD to L5X\n\nThis hasn't been started but could be feasible eventually.\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Rockwell ACD File Tools",
"version": "0.2a7",
"project_urls": {
"Homepage": "https://github.com/hutcheb/acd"
},
"split_keywords": [
"rockwell",
"acd",
"logix"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "81ebde18603c85329cafd6b9167ca49212b90b21f999d98e1aac18c4c2ab41bc",
"md5": "186b618c719538327b56dee34dae6317",
"sha256": "df2c1169ee56a094beae8d19fa217c9b6e796e63c710a4735f8537ffe94dbf4e"
},
"downloads": -1,
"filename": "acd_tools-0.2a7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "186b618c719538327b56dee34dae6317",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 33725,
"upload_time": "2024-07-10T04:54:40",
"upload_time_iso_8601": "2024-07-10T04:54:40.880680Z",
"url": "https://files.pythonhosted.org/packages/81/eb/de18603c85329cafd6b9167ca49212b90b21f999d98e1aac18c4c2ab41bc/acd_tools-0.2a7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c582e09243a515562927aaae02145dcfa0439f12525ca03ee437f3412e243047",
"md5": "123502e5b2504f059f4f336760b5a471",
"sha256": "a8d15857f2aaab18def1348da584613d16d6b662b0b29425b5bc7de8294bd134"
},
"downloads": -1,
"filename": "acd_tools-0.2a7.tar.gz",
"has_sig": false,
"md5_digest": "123502e5b2504f059f4f336760b5a471",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25328,
"upload_time": "2024-07-10T04:54:43",
"upload_time_iso_8601": "2024-07-10T04:54:43.657314Z",
"url": "https://files.pythonhosted.org/packages/c5/82/e09243a515562927aaae02145dcfa0439f12525ca03ee437f3412e243047/acd_tools-0.2a7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-10 04:54:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hutcheb",
"github_project": "acd",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "acd-tools"
}