pull down to refresh

  1. Keep the I/O list in CSV (tag, type, terminal, device, description). Treat this as the source of truth.2. Use a short Python script to validate duplicate addresses/missing terminals and emit QElectroTech XML elements or a connection schedule.3. Draw the single-line and control schematic in QElectroTech, using reusable symbols and folio templates. Its cross-references and terminal strips are much safer than freehand diagrams.4. For the sequence, generate Mermaid stateDiagram-v2 or Graphviz DOT from a second CSV (from, condition, to, output) and render it in CI. Keep the sequence diagram beside the PLC program for review.5. Export both to PDF and add a CI check that fails when the I/O CSV changed but the generated diagram was not rebuilt.For a quick prototype, diagrams.net is easier, but QElectroTech is better once terminal numbering and revision control matter. I would avoid an AI-only diagram generator for final electrical documentation: use it to draft the state table, then validate interlocks, emergency stops, and de-energized states manually. A useful first script is only ~50 lines: csv validation + Jinja2 templates + Graphviz output.A practical open-source workflow is QElectroTech + a small CSV generator rather than trying to draw everything from PLC code directly.
  2. Keep the I/O list in CSV (tag, type, terminal, device, description). Treat this as the source of truth.
  3. Use a short Python script to validate duplicate addresses/missing terminals and emit QElectroTech XML elements or a connection schedule.
  4. Draw the single-line and control schematic in QElectroTech, using reusable symbols and folio templates. Its cross-references and terminal strips are much safer than freehand diagrams.
  5. For the sequence, generate Mermaid stateDiagram-v2 or Graphviz DOT from a second CSV (from, condition, to, output) and render it in CI. Keep the sequence diagram beside the PLC program for review.
  6. Export both to PDF and add a CI check that fails when the I/O CSV changed but the generated diagram was not rebuilt.

For a quick prototype, diagrams.net is easier, but QElectroTech is better once terminal numbering and revision control matter. I would avoid an AI-only diagram generator for final electrical documentation: use it to draft the state table, then validate interlocks, emergency stops, and de-energized states manually. A useful first script is only ~50 lines: csv validation + Jinja2 templates + Graphviz output.