This is a set of tools to be used in combination with the EasyBuilder Pro app from Weintek.
EasyBuilder Pro is an HMI (Human Machine Interface) designer app that integrates to physical devices sold by Weintek.
This project aims to make integration with other systems easier. Notably, the macro system provided by Weintek lacks some key functionalities and can be a bit tedious to use. So this library attempts to make writing macro code a bit more enjoyable.
- A Python library to write macros in Python and generate the resulting EasyBuilder macro code
- A drawing library for the dynamic drawing object
- A set of tools to import and merge tags from select PLCs (Programmable Logic Controllers)
First install Python (Python 3.9 or newer).
Once installed, create a virtual environment:
Linux / macOS:
python -m venv venv
source ./venv/bin/activateWindows:
python -m venv venv
.\venv\Scripts\activateInstall the library:
python -m pip install --upgrade pip
pip install git+https://github.com/IliTheButterfly/EasyBuilderMacroGenerator.gitThen follow the instructions in Getting started.
| Tool | Description |
|---|---|
koyo_tags_import |
Convert a Koyo PLC nicknames CSV to an EasyBuilder tag CSV |
combine_tags |
Merge two EasyBuilder tag CSV files into one |
Both tools support --force, --strategy, and --dry-run flags. See their individual docs for details.
The same functionality is available as importable functions for use in scripts:
from eb_macro_gen.tools.io import load_eb_tags, save_eb_tags, load_koyo_tags
from eb_macro_gen.tools.merge import merge_eb_tags, ConflictStrategy
# Load and convert Koyo PLC nicknames
koyo_tags = load_koyo_tags("koyo_nicknames.csv", "MyKoyoPLC")
# Merge with existing EasyBuilder tags
existing = load_eb_tags("eb_tags.csv")
merged, result = merge_eb_tags(existing, koyo_tags, strategy=ConflictStrategy.REPLACE_ADDRESS)
print(result)
save_eb_tags(merged, "output.csv")See the Tags generator docs for a full end-to-end example including using loaded tags directly in macro generation.
Create and activate a virtual environment (same as the setup instructions above), then install development dependencies and run pytest:
python -m pip install --upgrade pip
pip install -e ".[dev]"
pytestVS Code is preconfigured in .vscode/settings.json to run pytest from the repository root with the src/ layout. Open the Testing panel and click Run Tests.
If VS Code shows No module named pytest, your selected interpreter is missing test dependencies. Install them in that same environment with pip install -e ".[dev]" (or pip install pytest).
- Add string to char array conversion
- Add recipe generation and management
- Add structs as a concept that integrates in the code
- Add Rockwell tag import tool