Catalog · How the catalog works
DUTImporter4OpenPLC
Tool for importing IEC 61131-3 STRUCTs and injects resulting .json format into OpenPLCs project.json file.
- ★ 1 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
DUTImporter4OpenPLC
Tool for importing IEC 61131-3 DUTs (such as STRUCTs and ENUMs) declared as plain text into an OpenPLC project.json file.
The tool parses DUT definitions from .st or .txt files and converts them into a format compatible with OpenPLC projects.
Both Linux and Windows executables are provided, but building from source is recommended as this allows easy modification.
The example types used when testing has also been provided.
Features
The following elements are currently supported:
- Removing comments (OpenPLC does not support comments inside structs)
- Base types
- Strings
- Initial values
- Single-dimension arrays
- Multi-dimensional arrays
- Nested structs
- Arrays of user-defined types
- Enumerated types
Build from source
Requires the Free Pascal Compiler. This will work for both Linux and Windows:
git clone <repository-url>
cd <directory>
fpc DUTImporter4OpenPLC.pasHow to use
The script expects a file or a folder containing DUTs decalred in separate .st or .txt fiels, as you would in Codesys as inputs, and expetcs the path to your OpenPLC project. Make sure to backup your OpenPLC project before use!!!
Run from terminal (ommit "./" on Windows):
./DUTImport4OpenPLC <Path to STRUCT> <Path to project.json>
