Hot-plug
Hot-plug means a module is unplugged, drops out or is plugged back in while the system runs. While a module is missing, the remaining slaves stay in OP and the PDO cycle keeps running as usual.
A module that is declared in the configuration and matches its declaration is configured by the master automatically once it is plugged back in, and is brought up to OP. You do not need a state machine in the application layer. Devices that are not in the configuration and modules that do not match are never promoted automatically; they are only reported as they are.
Feature overview
| Capability | Description |
|---|---|
| Drop-out without interruption | The other slaves stay in OP, and the PDO cycle continues |
| Automatic recovery | A module that is declared and matches its declaration is configured automatically and brought up to OP after it is plugged back in |
| Optional slots | Slots that may be absent are marked optional in the configuration; their absence is not an error |
| Binding mode | By module identity (default) or by wiring position, decides which slot a module on site maps to |
| Safety boundary | Undeclared devices and modules that do not match are not promoted automatically; they are only reported as they are |
Declaring modules and optional slots
In the configuration, declare one slot for each module you might use. Mark the slots that may be absent as optional: their absence is not an error, and the other slaves enter OP as usual. If a slot declared as required is absent, this run cannot enter OP.
On a site where the wiring position is not fixed, use the default "by module identity" binding: a module is recognized wherever it is plugged in, and moving it or leaving a few modules unconnected does not affect the other modules. When devices are installed at fixed stations and the assembly order matters, use "by wiring position".
What happens after a module is plugged in
Once a module is plugged back in, the master completes the following steps automatically, with no application-layer involvement:
- Detect that the module is answering again.
- Find the slot in the configuration under the current binding mode.
- See who it is: check that the module plugged back in is the one you declared — vendor, model and revision must all match, and same-model modules are still told apart from one another.
- Once the module is confirmed, the master applies that slot's configuration and advances the module to OP.
- PDOs take effect according to the configuration layout; the other slaves are not affected.
Automatic promotion is not unconditional. Only two cases are handled automatically: a module plugged in at the end of the chain, or re-inserted into its original empty slot.
If a module is plugged in mid-chain and shifts the order of the modules behind it, the master does not handle it automatically: it does not rewrite the positions of other modules; it stops and prompts you to rescan the bus. This is deliberate — rewriting positions would misconfigure other stations.
Automatic promotion covers only chain-end insertion and empty-slot re-insertion, and expected_wkc does not change because of automatic promotion. Promotion runs about once every 1 second, and a module already being promoted is not triggered again.
| Case | Master behaviour |
|---|---|
| Declared, matches the declaration, at the chain end or re-inserted into an empty slot | Configured automatically and brought up to OP |
| Declared, matches the declaration, but inserted mid-chain and shifts the later modules | Not promoted; prompts you to rescan the bus |
| Declared, does not match the declaration | Not promoted; reported as a mismatch |
| Device not in the configuration | Not promoted; reported as an unknown device as it is |
| Optional slot absent | Not an error; the other slaves keep running |
| Required slot absent | Cannot enter OP; reported as missing as it is |
Automatic promotion happens only for modules that are declared in the configuration and match their declaration. Undeclared extra devices and modules that do not match are never promoted automatically: the master does not pull them into OP just because they were plugged in, and does not automatically include them in the control outputs.
Failures are reported as they are, never as success: the station stays unpromoted and the reason is given, recovery keeps retrying, and expected_wkc is not lowered to make the numbers match.
Hot-plug for tool modules
Some modules are used as tool modules: today you fit A, tomorrow B, and you plug each one into whichever position is handy. The default "by module identity" mode covers this.
It ignores wiring order and does not care which position you use. Plug it in and it is recognized; move it from position 3 to position 7 and it is still the same module. Leaving a few modules out is fine too — the rest keep working, and nothing stops because one is missing.
Compare with "by wiring position": there, the position is the workstation — the third position means the third workstation — and a module in the wrong place is called out. That mode suits fixed installations such as fixtures and tooling; for interchangeable tool modules, "by module identity" is less work.
FAQ
| Symptom | Cause | Action |
|---|---|---|
| Not in OP after being plugged back in | It does not match the declaration, or the module has no slot in the configuration | Check the mismatch / unknown-device events; once the correct module is back it is promoted automatically |
| The whole line cannot enter OP because an optional module is offline | The slot is not marked optional | Mark the slot optional before entering OP |
| The module is not recognized after being moved | A by-wiring-position binding is in use | Switch to by module identity, or declare the position per station |
| An undeclared device does not work after being plugged in | The automatic flow only serves declared modules | Have the application layer start the connection explicitly, or add the module to the configuration |