Giter Club home page Giter Club logo

ardplc's Introduction

ARDPLC - Context, Brief and Future

This project is still being developed as my undergraduate thesis in Electrical and Electronics Engineering. It is developed with C# using Winforms, Arduino is the chosen MCU for the project for the easiness of the compiling proccess. The software is mainly designed for use in small/prototype PLC-type operations. It also consists of a basic Structured Text to C++ translator. Antlr was used for the translation. It also consists of a simulation mode, saving loading previously drawn files aswell.

It is planned to integrate wireless code uploading to an Arduino that is connected to internet.

ARDPLC - Main

The app opens up to this screen, it is the main window for drawing Ladder apps. It is divided into two parts, the left part is for workspace, current pin and Used pins panels, that show information about current drawing and chosen coil/pin.

Each row is named as Networks and even though there is no limit for number of Networks there is only 9 columns (-1 as the first one is not usable) for coil/pin usage. Some coils and pins can only be used in specific columns.

[The limit for column number can be altered easily with some minor modifications.]

Current version only supports one parallel coil/pin for each coil/pin. It is also in planned to add support for multiple parallel coils/pins.

The top bar at the drawing window is for coils and functions.

(I won't be explaining each function here as it is planned to add help menu to each of them.)

ARDPLC - Pin Configuration

Each pin is configured as below before the main cycle begins. Pins 0 and 1 are reserved for serial use that is going to be implemented as soon as possible.

[Support for Arduino Mega or ESP32 with SD card support for storing the drawn .lae files may be added in the future. SD card support wasn't added to UNO as it would have decreased the usable pins and leave us with even fewer pins.]

ARDPLC - Building

The building first creates a C++ header file containing functions for each function written specifically for Arduino UNO. Then it translates the latter diagram into a C++ .ino file.(Translation from ST to C++ happens here as well.) The start function consists of pin declarations done with pin manipulation. The loop function is split into three main parts. Like in a PLC these three logical blocks are I/O Scan, program cycle and I/O writing. Each pin is read first to be used as Bool values in the program cycle. Then these bool values are used to write to outputs in I/O writing part at the end of the loop function.

Lastly the Arduino IDE builds the hex file for us and puts it in a build folder created by us in the workpath. Hex files for each example is also provided in the corresponding example folder.

*Building requires a Arduino IDE and the path to Arduino IDE needs to be changed located in WindowsFormsApp -> Classes -> Listing.cs -> Build_Init method. strCmdText string should be changed with path to Arduino folder. (This is going to be modifiable in runtime from the GUI ASAP.)

ARDPLC - Examples

Examples for showing basics of each function is in the examples folder, each folder also consists of a Proteus drawing or simulating the coils with LED's. (Missing functions such as STF and ISF will be added as soon as possible.)

ardplc's People

Contributors

esrefimadrabaz 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.