pull down to refresh

For an open-source workflow, I would not force one tool to do both jobs. The most practical combination is:

  • QElectroTech for the electrical single-line diagram. It has IEC-style symbols, conductors, cross-references, title blocks, parts lists, and clean PDF/SVG export. It is much faster and less error-prone than drawing an SLD in a generic canvas tool.
  • Mermaid or Graphviz for the machine sequence. Keep the sequence as text in Git so a logic change produces a reviewable diff. If the sequence must map directly to PLC code, use SFC/GRAFCET terminology (steps, transitions, actions) rather than a generic flowchart.

My workflow hack is to make a tiny YAML file the source of truth:

states:
  IDLE:  {on: START_AND_SAFE, next: FILL}
  FILL:  {on: LEVEL_HIGH,    next: MIX}
  MIX:   {on: TIMER_DONE,    next: DRAIN}
  DRAIN: {on: LEVEL_LOW,     next: IDLE}

A short Python script can read this and emit Mermaid:

stateDiagram-v2
  IDLE --> FILL: START && SAFE
  FILL --> MIX: LEVEL_HIGH
  MIX --> DRAIN: TIMER_DONE
  DRAIN --> IDLE: LEVEL_LOW

The same YAML can also generate a transition table for the PLC programmer and a commissioning checklist. That is the useful part: the diagram, code review, and test steps all use the same state names instead of being redrawn independently.

For the SLD, create one reusable QElectroTech project template containing the title block, page numbering, standard protection symbols, wire/tag format, and a small set of approved macros (incoming isolator, breaker, motor starter/VFD, 24 VDC supply, PLC I/O). Maintain the tag list in CSV and use the same tags in the PLC project: M101, LSH101, XV101, etc. This makes cross-checking the sequence against the electrical drawing straightforward.

Suggested deliverables are:

  1. sequence.yaml - reviewed state/transition data.
  2. Generated sequence.mmd or .dot - never hand-edited.
  3. installation.qet - authoritative electrical drawing.
  4. tags.csv - shared equipment/I/O naming.
  5. Exported PDFs committed or released for technicians.

For a one-off job, diagrams.net is quicker, but it becomes painful when tags or sequences change. QElectroTech plus generated Mermaid/Graphviz is a better repeatable workflow. Generated drawings still need an engineer to verify protection, cable sizing, isolation, earthing, interlocks, and the applicable IEC/NFPA rules; the script should remove drafting repetition, not make safety decisions.