Skip to content
ispyisail edited this page Oct 9, 2026 · 3 revisions

PLC modules: I/O tables and linking a wire to a specific point

A PLC module (an I/O card, a controller) is drawn as one master element that lists every I/O point it has, and each wire leaving it is a separate slave element that gets linked to exactly one of those points β€” so the drawing always shows which physical terminal a given wire actually attaches to, with its address, function text and comment carried along automatically.

This is a specific case of QET's general master/slave mechanism β€” the Linking elements page (Β§2, Β§5) documents the .elmt data format this is built on. This page is the workflow: how to author a PLC master's I/O table, how to link a slave to a specific entry, and what the linking widget actually shows you.

Source: sources/ui/plclinkwidget.{cpp,h} (linking UI), sources/editor/ui/elementpropertieseditorwidget.cpp (I/O table editor), sources/editor/graphicspart/partplctable.{cpp,h} (symbol placeholder), sources/properties/elementdata.h (the PlcIO data itself).


1. Authoring a PLC master

In the Element Editor, under File β†’ Element properties, set the element's type to Master and its master type to PLC module. This does two things the ordinary master editor doesn't:

  • Hides the max slaves and contact groups controls entirely β€” a PLC master doesn't cap how many slaves may attach to it as a whole (see Β§5 for what actually limits it).
  • Replaces them with a PLC Configuration group: an I/O table you build row by row with +/- buttons.

Each row is one I/O point:

Column Holds
Type one of six values β€” see below
Address e.g. 1.0, 1.1
Function free text, e.g. Motor K1
Annotation free text
Cross-reference auto-filled once a slave links here β€” leave it blank

A second table alongside it sets how many terminals that row has (1–4) and their labels; leaving labels blank falls back to T1, T2, … automatically.

The six I/O types are digital/analogue/universal, each input or output: Digital input, Digital output, Analogue input, Analogue output, Universal input, Universal output.

On the symbol's own drawing, add a PLC Table part (from the drawing tools, alongside line/rectangle/terminal) and position it where the live table should render. It's a placeholder only β€” you're marking where the table goes and sizing space for it, not drawing the table's contents; the actual rows come from the I/O table above, filled in at runtime from every slave that ends up linked to this master.


2. Authoring a PLC slave

A slave that represents one wire from one PLC I/O point needs link_type set to Slave, and in the state list β€” not the type list β€” pick PLC slave. This is the one entry in that list that isn't really a state: choosing it sets type = plc and state = Other behind the scenes, and disables the ordinary type list, exactly as documented in Linking elements Β§3.


3. Linking a slave to a specific I/O entry

Both elements need to already be placed somewhere in the project β€” the master on any sheet, the slave wherever its wire actually is. Then:

  1. Select the slave on its diagram and open its properties. Because its type is PLC, the properties panel shows an Programmable Logic Controller (PLC) tab instead of the ordinary single-link widget.
  2. That tab lists every PLC master in the project as an expandable tree β€” Master label (folio N), each expanding to its I/O rows with columns for Label/Type/Address/Function/Annotation/Terminals.
  3. Already-linked rows are struck through and greyed out, with a tooltip naming which slave holds them β€” they can't be selected.
  4. Right-click a free row β†’ Log in. The link is made immediately and is undoable like any other edit.

Once linked, the tab changes shape: the tree disappears, replaced by This element is already linked, a Unlink button, and View this item (jumps to and highlights the master on its sheet). Unlink first if you need to attach the slave somewhere else β€” there's no direct re-link.

Finding the right row in a large project

  • The search field filters live, across every master's rows at once β€” by label, type, address, function or comment text, whichever column matches.
  • "Hide connected elements" hides every already-linked row (and collapses a master entirely if all of its rows are taken). This is a per-user preference, remembered between sessions β€” check it once and it stays checked.

4. What updates automatically, and what doesn't

  • The cross-reference column fills in once you link β€” don't type anything into it yourself while authoring the master; it's overwritten by whichever slave ends up attached.
  • Terminal labels come from the I/O row's own terminal-count/labels table, not from the slave.
  • The master's drawn table repaints live when a linked slave moves β€” MasterElement::connectSlavePositionUpdates() wires slave position changes straight to the master's repaint, so nothing needs a manual refresh after moving a wire.

5. A PLC master's own "full" behaviour is not what you'd expect

An ordinary master (coil, protection, commutator) with max_slaves set disappears entirely from linking UIs once it hits that count β€” the "hidden" note in this widget exists for exactly that case. A PLC master never does this, checked directly: max_slaves is forced to -1 for a PLC master (Β§1), and MasterElement::isFull() has no PLC-specific branch β€” it only ever checks max_slaves or contact-group count, neither of which a PLC master has.

So a PLC master whose I/O table is completely linked stays visible in the tree β€” every one of its rows will simply show struck-through, with the master item itself collapsing out of view only if the hide linked checkbox is on and hides every child. It is not reported as full, because per-row capacity (one slave per I/O entry) and whole-master capacity (max_slaves) are two different, independently-tracked limits, and only the second one is what "full" means anywhere else in QET.


6. What this shares with, and doesn't share with, ordinary master/slave

Same rules as any master/slave pair: a link needs matching types (a PLC slave can only take a PLC master's I/O entry, never an ordinary master's slot, and vice versa) and a free target. Everything else is different in shape:

Ordinary master/slave PLC master/slave
What a master offers up to max_slaves slots, or explicit contact groups one row per I/O point, no overall cap
What "full" means slot/group count reached never, at the master level β€” only per-row
What the link carries which contact this slave represents which I/O point, with address/function/comment
Where you pick the target inline on the diagram (single-link widget) a searchable, filterable tree of every master in the project

See also: Linking elements Β· Elements XML

Getting Started

Home

🌐 Languages β€” English Β· FranΓ§ais Β· Deutsch

Downloads

Windows without admin rights β€” the portable archive, no installer

Quick Start Guide

User Manual

FAQ

Tips & Tricks

Guides

Conductors β€” wire properties, what feeds which export, cables, and hops where wires cross

Wires per terminal β€” limit the wires on a terminal, chain wiring instead of stars

Printing and exporting β€” paper, PDF, images, and what each path does differently

Linking elements β€” master, slave, terminal

PLC modules β€” I/O tables and linking a wire to a specific point

Using the element editor β€” drawing tools, saving, checks

Generic devices β€” a quick box symbol with terminals on any side, made by a wizard (pending)

Grid size and element size β€” why symbols aren't all the same scale, and scaling one without leaving the grid

Preferences reference β€” what each settings page does

Saving and loading settings β€” your whole setup in one file, to copy or keep

Keyboard-only control β€” mouseless QET, and what still needs a mouse

Mouse modifiers β€” what Shift, Ctrl and Alt change while you drag

3D mouse β€” SpaceMouse pan, zoom and buttons

Aligning items β€” snap symbols back to the grid, or line them up

Pictures on a sheet β€” labels, crop, transparency, what they cost in the file

Arcs and curved wires β€” the Arc tool, pulling an arc in or out, rounding a corner with a fillet, dashed arcs for lighting layouts

Grouping items β€” select, move and copy several items as one

Finding your place on a sheet β€” go to a cell like B13 or 4-B7, keep the headers in sight, show the cell limits, zoom and pan

Showing and hiding kinds of items β€” hide texts, wire numbers, shapes, pictures, tables or cross-references on every sheet

Drawing faster β€” place without dragging, the S shortcut bar, command search, gestures

Customising QElectroTech β€” keys, toolbar size and contents, the gesture ring (partly pending)

Managing collections β€” folders, writability, building your own shortlist

Templates β€” reusable multi-element blocks, placed by double-click or drag

Search & Replace β€” bulk property changes

Building a nomenclature query β€” the BOM/summary table builder

Linking wires across pages β€” sheet reports

Variables & formulas β€” %f, %{label}, sequences

Auto-numbering β€” schemes, sequences, freezing

Terminal strips β€” strips, levels, bridges

Title block templates β€” the .titleblock format

Importing EPLAN parts (.edz) β€” EPLAN Data Portal

DXF import & export β€” two unrelated features, one format; command-line export and layers

The project database β€” the in-memory SQLite cache

File formats
Elements XML
Project XML
Development

Building from Source

Contributing Code

Automating QET β€” CLI, XML formats, external tools

CLI Reference β€” command line usage

JavaScript Scripting β€” --run, geometry editing, undo

MCP server β€” let an AI assistant read, verify and edit projects

Connecting an AI assistant β€” setup for Claude, Copilot, Gemini, Codex, Cursor, LM Studio

Script buttons β€” stored scripts with an icon, by hand or by an assistant

Live mode β€” an assistant working in the open project while you watch

Macro recorder β€” record a task by hand, for an assistant to script

Development Roadmap

Vision β€” proposal, under discussion

Developer Tools

About

Features

History

Community

License

Contributing to this Wiki

Clone this wiki locally