Code Monkey home page Code Monkey logo

ironplc's Introduction

IronPLC

⚠ This project's capabilities are limited to a parser, semantic analyzer, and Visual Studio Code Extension that are that are building blocks for a complete IEC 61131-3 runtime and development environment.

IronPLC aims to be a SoftPLC written entirely in safe Rust for embedded devices running programs written in the IEC 61131-3 language.

IronPLC Integration IronPLC Deployment License: MIT Lines of Code

SoftPLCs enable embedded and other computers to operate as programmable logic controllers (PLCs) that execute all sorts of processes from home automation and factories machines to industrial process and electrical power grid control. PLC devices do this by implementing control algorithms that connect to sensors, transducers and actuators through analog/digital IO, industrial protocols such as I²C and Modbus, or even common internet protocol such as HTTP.

Mission

A complete runtime and development environment for IEC 61131-3. The runtime aims to be written entirely in safe Rust to prevent security issues. The development environment aims to be available via Visual Studio Code to provide a first class environment.

Milestones

The project is progressing towards a minimum loveable product. The following milestones are the current plan to achieve that loveable product.

  • ✅ Implement a parser for a single IEC 61131-3 structured text file
  • ✅ Implement a Visual Studio Code Extension that uses the parser
  • ✅ Build Windows and macOS installers
  • ✅ Setup weekly automated deployments
  • ✅ Build documentation website
  • ✅ Implement semantic analyzer for multiple IEC 61131-3 structured text file
  • Build a tokenizer to enable syntax highlighting

Usage

Go to ironplc.com and follow the instructions to get started.

Contributing

Contributions are very welcome. See CONTRIBUTING.md for details.

Contact

Create an issue to reach out about IronPLC.

Similar Projects

  • RuSTy - Structured text compiler written in Rust. RuSTy is further along but the LGPL and LGPL licenses are difficult for industrial uses.
  • Structured Text language Support - Structured text language support for Visual Studio Code.
  • Beremiz - A Python-based PLC programming environment.
  • msr - A Rust library for industrial automation.
  • ethercat-rs - An experimental Rust automation toolbox using the IgH (Etherlab) EtherCAT master.
  • rustmatic - Rustmatic is a thought experiment on creating a PLC-like environment in Rust.

ironplc's People

Contributors

craigbreaden avatar garretfick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ironplc's Issues

Integer values do not retain the sign (positive or negative) during parsing

Describe the bug
Signed integer values can be positive or negative, but the parser is dropping the sign.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

System

  • OS: [e.g. Ubuntu 18.04, Windows 10]
  • Distribution: [e.g. Installer, Built Source]

Additional context
Add any other context about the problem here.

Time values should return error rather than throw if the value is not valid

Describe the bug
When parsing, the PEG parser should return "not a match" when the pattern does not match. However, the current behavior is to error if a time value is not valid.

In parser.rs, rule daytime(), the code unwraps the value, which panics. Instead, the code should be more like the following:

{ Ok(()) } else { Err(literal) } }

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
The parser should return a time value if valid, otherwise return an error and continue on if not.
There should be an integration test that validates parsing works if the value is good. There should be a unit test that shows the failure.

Screenshots
N/A

System

  • OS: all
  • Distribution: all

Additional context
Add any other context about the problem here.

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.