Git Product home page Git Product logo

acd's Introduction

ACD Tools

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.

Parsing the ACD file

The exporting of the L5X file isn't complete, we are able to parse the data types, tags and programs into a Controller python object though.

To get the Controller object and get the program/routines/rungs/tags/datatypes, use something like this

from acd.export_l5x import ExportL5x

controller = ExportL5x("../resources/CuteLogix.ACD", "build/output.l5x").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.unzip.Unzip class. This extracts the database files to a directory.

from acd.unzip import Unzip

unzip = Unzip('CuteLogix.ACD')
unzip.write_files('output_directory')

acd's People

Contributors

dmroeder avatar hutcheb avatar vadoola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

acd's Issues

self._db.commit() inside the loop

Is there any reason these self._db.commit() lines indented into the for loop?

       log.info("Getting records from ACD Comments file and storing in sqllite database")
        comments_db = DbExtract(os.path.join(self._temp_dir, "Comments.Dat"))
        for record in comments_db.records:
            CommentsRecord(self._cur, record)
            self._db.commit()

        log.info("Getting records from ACD Nameless file and storing in sqllite database")
        nameless_db = DbExtract(os.path.join(self._temp_dir, "Nameless.Dat"))
        for record in nameless_db.records:
            NamelessRecord(self._cur, record)
            self._db.commit()

Listing Forces

Is there a way to extract forces? Any kind of hint would be much appreciated. I'm suspecting it has to do something with xrefs.dat. Any hints to parse xrefs?

UnicodeDecodeError

There is a decode error I think error handling system has to be in place

Extracting Bit Descriptions/Comments

I'm trying to extract some I/O bit descriptors. Like the image below.

image

Any ideas on how to link individual comment/description to tag or a component?

The id's that can be extracted from comments.dat doesn't seem to have a relation to components or other parts.

Kaitai Struct File

Hi I came across this project several months ago, and was interested, but never had time to dig into it much. About 1-2 months ago I had a bit of time, and noticed this project hadn't been updated in a while. Thinking this project might be dead, I actually started digging through your code, and building a Kaitai Struct File based on it, that I might be able to use later to try and change/expand/make my own version of this library.

I notice now that the project isn't dead, just was on hiatus, and while I haven't finished these Kaitai Struct files, they still might be useful (and maybe I will get some time to keep working on them). I was wondering if you might be interested in adding them to your repo, or if you think you would use them at all?

If you aren't familiar Katai Struct, you essentially create a YAML file describing a binary file format. You can use the IDE to visualize files as you work on the YAML file. I find it useful when reverse engineering file formats.

You can then use the Katai Struct compiler to generate parsing code in a bunch of different languages, including Python.

Let me know if you are interested, and I'll see if I can clean them up a bit and do a pull request. I've been meaning to clean them up and make the repo public but I just haven't had a chance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.