Code Monkey home page Code Monkey logo

acronymmaker's Introduction

Overview

This project is one the beauties in the world that saved me a lot of time. The story is that when you want to program a controller or in other words an industrial cpu (PLC) you should map each variable on it. For mapping the variables you should use a framework (in my case) that's called Niagara NX @tridium and you should write the register address and its name. For example you might want to map the DO1 (which stands for the pin digital output 1) as a Heat pump comand. Sometimes those names are too long and it's not standard to write all of the name. Because on a long term period it may create anomalies for saving the historical data on the local and cloud databases. As an example we might have a variable whose name is "Scattato Termico Pompa Scambiatore Preparatore ACS 2 (QECI+ACS) ". In this case it's inappropriate to save a pin as this long name.

So what will you do ?
YOU WILL MAKE AN ACRONYM FOR EACH NAME

So you should look at the original electrical scheme, think about acronyms for each name and write it manually on the framework. As an example, for that long name above, you should think about an acronym like : QECIACS_ACS2_PmpScambPrep_ScatTerm and write it on the specific register as its name. It's notable that these acronyms have an standard and each company has its own standard. But the problem is that you should pick each name from the electrical scheme manually, think about its acronym and write that manually on the program. This takes so much time and time means money for a company ๐Ÿ˜„.

As you can see that's an algorithmic problem and it might be resolvable by a computer. So what i've done recently is that I made a program which takes an electrical scheme as a dxf (a CAD format) file and gives a list of acronyms for each pin name.

Implementation

It reads a dxf file with ezdxf library, searches for a specific style format (in this case ROMANS style) and format each word. Then it looks on a predefined python dictionary and gets acronyms for each word. In the end it concatenates each word for making the acronym of the original word. Every word which is not in the dictionary file, gets shortened by a prefixed length. One thing that you should do before running the program is to change the wanted words style to the ROMANS style on the dxf file (You can do it with Autocad).

On the picture above you can see the highlighted words that need to have ROMANS style in order to be selected.

Contribution

You might want to see the issues if you'd like to contribute to this project but I'll be happy if you have any ideas and you'd like to contribute.
Feel free to ask any questions that you might have on this project.

acronymmaker's People

Contributors

zzzzz1st avatar jaivardhan-bhola avatar

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.