My practical stack would be QElectroTech for the issued electrical drawing and Graphviz for the generated operating sequence. Trying to make one tool do both usually makes the result harder to maintain.
In QElectroTech, create one single-line folio and one control/GRAFCET folio. Use a reusable IEC symbol collection and title block, and keep the same equipment tags everywhere (QF1, KM1, M1, etc.). QET projects already group folios, elements, conductors, cross-references and reports; a folio also maps cleanly to a page when exporting PDF. Export the parts/nomenclature CSV as a simple QA check.
Keep the PLC sequence as text in Git and render it automatically. Example steps.csv:
step,label,next,condition
S0,Idle,S1,START and E-stop OK
S1,Start M1,S2,M1 aux and 3 s elapsed
S2,Start M2,S0,STOP or fault
Minimal dependency-free generator:
# seq2dot.py
import csv, sys
def esc(s):
return s.replace("\\", "\\\\").replace('"', '\\"')
with open(sys.argv[1], newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
print('digraph plc { rankdir=LR; node [shape=box, style=rounded];')
for r in rows:
label = f'{r["step"]}: {r["label"]}'
print(f' "{esc(r["step"])}" [label="{esc(label)}"];')
for r in rows:
print(f' "{esc(r["step"])}" -> "{esc(r["next"])}" '
f'[label="{esc(r["condition"])}"];')
print("}")
Graphviz dot is a good fit here because it lays out directed sequences hierarchically and produces reviewable SVG. QElectroTech is the better place for the final single-line/control sheets, conductor numbering and PDF package.
Workflow hack: use the exact same device tags in the CSV and QET project, regenerate the SVG in CI, and ship .qet, .csv, .dot, SVG and PDF together. A sequence change then appears as a small text diff instead of a redraw. I would avoid generating QET XML directly unless the QET version is pinned; the format is XML, but the GUI should remain the authority for the electrical drawing.
Official references: https://download.qelectrotech.org/qet/manuals/html/users/project/what_is.html, https://download.qelectrotech.org/qet/manuals/html/users/folio/index.html, https://graphviz.org/doc/info/command.html.
For a real installation, the generated diagram is documentation—not a substitute for checking fault current, protection/selectivity, cable sizing, interlocks and local-code compliance by a qualified engineer.
My practical stack would be QElectroTech for the issued electrical drawing and Graphviz for the generated operating sequence. Trying to make one tool do both usually makes the result harder to maintain.
QF1,KM1,M1, etc.). QET projects already group folios, elements, conductors, cross-references and reports; a folio also maps cleanly to a page when exporting PDF. Export the parts/nomenclature CSV as a simple QA check.steps.csv:step,label,next,condition S0,Idle,S1,START and E-stop OK S1,Start M1,S2,M1 aux and 3 s elapsed S2,Start M2,S0,STOP or faultMinimal dependency-free generator:
# seq2dot.py import csv, sys def esc(s): return s.replace("\\", "\\\\").replace('"', '\\"') with open(sys.argv[1], newline="", encoding="utf-8") as f: rows = list(csv.DictReader(f)) print('digraph plc { rankdir=LR; node [shape=box, style=rounded];') for r in rows: label = f'{r["step"]}: {r["label"]}' print(f' "{esc(r["step"])}" [label="{esc(label)}"];') for r in rows: print(f' "{esc(r["step"])}" -> "{esc(r["next"])}" ' f'[label="{esc(r["condition"])}"];') print("}")Render it with:
python seq2dot.py steps.csv > sequence.dot dot -Tsvg sequence.dot -o sequence.svgGraphviz
dotis a good fit here because it lays out directed sequences hierarchically and produces reviewable SVG. QElectroTech is the better place for the final single-line/control sheets, conductor numbering and PDF package.Workflow hack: use the exact same device tags in the CSV and QET project, regenerate the SVG in CI, and ship
.qet,.csv,.dot, SVG and PDF together. A sequence change then appears as a small text diff instead of a redraw. I would avoid generating QET XML directly unless the QET version is pinned; the format is XML, but the GUI should remain the authority for the electrical drawing.Official references: https://download.qelectrotech.org/qet/manuals/html/users/project/what_is.html, https://download.qelectrotech.org/qet/manuals/html/users/folio/index.html, https://graphviz.org/doc/info/command.html.
For a real installation, the generated diagram is documentation—not a substitute for checking fault current, protection/selectivity, cable sizing, interlocks and local-code compliance by a qualified engineer.