PLCreX - Simplification, Transformation, Analysis, and Validation of IEC 61131-3 Programmable Logic Controllers
![](https://private-user-images.githubusercontent.com/92115516/304556155-8558b705-720a-4e8c-80cb-10747f38fa58.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDEwNzksIm5iZiI6MTcyNDMwMDc3OSwicGF0aCI6Ii85MjExNTUxNi8zMDQ1NTYxNTUtODU1OGI3MDUtNzIwYS00ZThjLTgwY2ItMTA3NDdmMzhmYTU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIyVDA0MjYxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwYTlhMDk1ZDhmZTE1NDEzYTI4MzRjNDFjNTZkMWU5YWMzMTQxYjI0MTQ1YTVkZjdmMTUyMjNhZmVkZWM1MGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qTPn7PCXOobi34jSms0X-dZKfdAHglh6AX1Qt2YS3T0)
Quick links
Releases
·
Documentation
·
Quick Start
·
Key Features
·
Licenses
·
Acknowledgments
- 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
- Activate virtual environment (venv):
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 │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Usage: python -m plcrex --help
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 |
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 |
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 |
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) |
Inspiration, code snippets, etc.