Topic: Prototype: simulating control circuits directly from .qet files
Hello everyone,
I'm Tony, an instructor of industrial mechatronics at SENAI (Brazil). My students learn contactor-based control circuits, and most of them use CADe_SIMU on Windows to simulate them. There is no free equivalent on Linux, so I started a small experiment: a simulator that reads QElectroTech .qet files directly.
What works today (command-line prototype, Python, no dependencies):
- reads elements, conductors and master/slave links from the .qet XML
- simulates push buttons, coils and NO/NC contacts (self-holding, interlocking, stop)
- push button type (NO/NC) is inferred from IEC terminal numbers (13-14 / 21-22)
Example: reversing starter with interlock, drawn in QET 0.100.0:
> S1 -> K1 = ON, K2 = off
> S2 -> K1 = ON, K2 = off (interlock blocks K2)
> S0 -> K1 = off, K2 = off
> S2 -> K1 = off, K2 = ONRepository (GPL-3.0): https://github.com/tonymarim/qet-simulador
Two example .qet files are included.
Disclosure: the prototype was written with the help of an AI assistant (Claude). I reviewed it and tested it with my own circuits.
Some questions for the community:
1. Has anyone worked on simulation on top of .qet files before? I don't want to duplicate effort.
2. Is relying on master/slave links plus IEC terminal numbering a sound approach? Or is there a more reliable way to identify NO/NC push buttons in the element definitions?
3. Would there be interest in this eventually becoming a plugin, like qet_tb_generator?
Any feedback is welcome. And thank you for QElectroTech!
Tony
