Code Monkey home page Code Monkey logo

plcrex's Introduction

PLCreX - Simplification, Transformation, Analysis, and Validation of IEC 61131-3 Programmable Logic Controllers

Maintenance Windows Python 3.9 Tests Coverage Documentation Status GPLv3 license



Quick Start

Explore the docs »

  • Download Python v3.9 [.url]
  • Download IEC-Checker v0.4 via IEC-Checker's GitHub releases [.url]
  • Download Kicodia v122798884 via KIELER's Download page [.url]
  • Download NuSMV symbolic model checker v2.6.0 via NuSMV's homepage [.url]
  • Download Microsoft Build Tools 2015 .url
  • Install PLCreX via PyPI: pip install plcrex or
  • Install PLCreX via PLCreX's GitHub repository: install-windows.bat
    • Activate virtual environment (venv): run.bat
    • [optional] Run local tests: coverage run -m pytest ./tests/ --verbose

Key Features

 Usage: plcrex [OPTIONS] COMMAND [ARGS]...

╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version                                                                                                      │
│ --install-completion        [bash|zsh|fish|powershell|pwsh]  Install completion for the specified shell.       │
│                                                              [default: None]                                   │
│ --show-completion           [bash|zsh|fish|powershell|pwsh]  Show completion for the specified shell, to copy  │
│                                                              it or customize the installation.                 │
│                                                              [default: None]                                   │
│ --help                                                       Show this message and exit.                       │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ fbd-to-sctx              FBD-to-SCCharts Compiler (Data-Flow)    *.xml → *.sctx                                │
│ fbd-to-st                FBD-to-ST Compiler                      *.xml → *.st                                  │
│ fbd-to-st-ext            FBD-to-ST Compiler (extended)           *.xml → *.st                                  │
│ iec-check                IEC-Checker                             *.st → *.log                                  │
│ impact-analysis          I/O-Impact Analysis                     *.xml → *.dot                                 │
│ st-parser                ST-Parser                               *.st → *.dot/*.txt                            │
│ st-to-qrz                ST-to-Quartz Compiler                   *.st → *.qrz                                  │
│ st-to-scl                ST-to-SCL Compiler                      *.st → *.scl                                  │
│ st-to-sctx               ST-to-SCCharts Compiler (Control-Flow)  *.st → *.sctx                                 │
│ test-case-gen            Test-Case-Generator                     stdin → stdout                                │
│ xml-validator            XML-Validator                           *.xml → stdout                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Explore the docs »

Usage: python -m plcrex --help

Analysis & Validation

Description Script Version
IEC-Checker ieccheck 2.0.0
I/O-Impact Analysis fbdia 2.0.0
ST-Parser stp 2.0.0
Test-Case-Generator tcgen 4.0.0
XML-Validator xmlval 2.0.0

Transformation & Simplification

Description Script Version
FBD-to-ST fbd2st 2.0.0
FBD-to-ST (extended) fbd2st 2.0.0
FBD-to-SCCharts fbd2x 2.0.0
ST-to-Quartz st2qrz 1.0.0
ST-to-SCL st2scl 1.0.0
ST-to-SCCharts st2scl 1.0.0

Models

The translations of the models are based on PLCreX's intermediate model *.pim:

Package Description Version
st Structured Text 1.0.2
qrz Quartz Model 1.0.1
scl Sequentially Constructive Language 1.0.2

Licenses

PLCreX and its dependencies are licensed as follows:

Tool Version License
PLCreX 2.0.0 GPLv3
IEC-Checker 0.4 LGPL v3.0
NuSMV 2.6.0 LGPL v2.1
KIELER 122798884 Eclipse Public License (EPL)

Acknowledgments

Inspiration, code snippets, etc.

plcrex's People

Contributors

marwern avatar plcrex avatar txae 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  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

plcrex's Issues

export UML Statechart TwinCAT and import enterprise architecht or visual paradigm

UML_Cycle.zip
hello,
I would like to export UML Statechart TwinCAT and import enterprise architecht or visual paradigm,
I attach a file exported from TwinCAT in plcopenXML format...
and I would like to change it to another format such as sysml or any other so that it could be imported in enterprise architect or visual paradigm and then also do the opposite, I think it would be a good idea in this way it could be developed on both sides and be able to export/import ...
thanks you

test-case-gen

add new features: --full and --no-full to get only one test case; + add constraints

I/O impact analysis

For more complex FBDs (CFCs) it would be nice to have an I/O impact analysis. I'm thinking of an overview that shows the dependency between inputs and outputs.

Binary pyd files

Hi,

Your project look awesome, can’t wait to give it a try. However, I noticed that the conversion libraries are pre-compiled pyd files. Is the source code for these in a different repository?

Kind Regards

Ben

Rework TC081.st

wrong syntax in TC081.st

Ctr := TON2((IN1+IN2+IN3)=42 AND SR1.Q,3).ET;

-->

TON2((IN1+IN2+IN3)=42 AND SR1.Q,3);
Ctr := TON2.ET;

add st2tree option to fbd2st transpiler

  • add new parameter to cli
  • rework needed, because "TON0(IN := AND(i1,i2),PT := i3);" cannot be parsed. My grammar expects smart format "TON0(AND(i1,i2), i3);"

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.