scl_templates: Aufruf-Template FB_ILS_MTRO_2Sep2Swi (ohne Referenz-Aufrufstelle)

Mubea wird damit vollstaendig aus Templates erzeugt. Der FB existiert noch
nicht in der ILSLib; die Schnittstelle ist aus 2Sep1Swi (Separatoren) und
1Sep2Swi (Weichen) angenommen und steht im Template-Kopf - mit den
SPS-Kollegen abzustimmen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael StanglandClaude Opus 5.5 committed 2026-10-28 23:13:02 +01:00
1 parent dd955999a9
commit 25ab362c0a
7 files changed
+215 -52

No files matched your search

+13 -8
View File
@@ -66,10 +66,12 @@ Coverage per catalog type (`lib/tro_catalog.py`):
| `2Sep1Swi` | `FB_ILS_MTRO_2Sep1Swi` | **no** | yes | from interface only — needs a real call site |
| `EmptyCarrBuffer` | `FB_EmptyCarrBuffer` | **no** | yes | from interface only — needs a real call site |
| `LoadingBoom` | `FB_LoadingBoom_INBOUND` | **no** | yes | from interface only — needs a real call site |
| `2Sep2Swi` | `FB_ILS_MTRO_2Sep2Swi` | **no** | **no** | no — FB does not exist yet (Mubea needs it) |
| `2Sep2Swi` | `FB_ILS_MTRO_2Sep2Swi` | **no** | **no** | ✅ done WITHOUT reference (2026-10-28) — FB does not exist yet (Mubea needs it); interface assumed from `2Sep1Swi` (separators) + `1Sep2Swi` (switches), see template header |
So 7 types can be done with a test against real code. 3 can only be checked against the
interface until someone supplies a real call site. `2Sep2Swi` stays on the fallback (§9).
interface until someone supplies a real call site. `2Sep2Swi` has a template that is only
covered by rendering the real plants and the mubea golden file - the FB has to be created
in the ILSLib to match its assumed interface (or the template adjusted).
---
@@ -410,14 +412,15 @@ as `carousel_run` from connection kinds).
| Situation | Behaviour | Exit |
|---|---|---|
| Template exists for the TRO's `fbType` | render template | 0 |
| No template (e.g. `2Sep2Swi`) | render with the current `emit_*` code; header lines `// Aus Template : …` / `// Generisch : … (kein Template - von Hand pruefen)` and an entry in the console summary | 0 |
| No template (e.g. `2Sep1Swi`) | render with the current `emit_*` code; header lines `// Aus Template : …` / `// Generisch : … (kein Template - von Hand pruefen)` and an entry in the console summary | 0 |
| No template **and** `--strict` | stop, write nothing | 1 |
| Template uses an undefined variable / syntax error | stop, write nothing, show template file and line | 1 |
| Naming rule with unknown placeholder | stop, write nothing | 1 |
| Invalid TRO-JSON | unchanged from today | 1 |
With `--templates` the console summary gets a `Templates` line (implemented); the
`Namensregeln` line follows with step 4. Real output for mubea today:
`Namensregeln` line follows with step 4. Real output for mubea before the `2Sep2Swi`
template (since 2026-10-28 mubea is fully rendered from templates):
```
Templates = 4 von 5 Typen (generisch: FB_ILS_MTRO_2Sep2Swi)
@@ -452,9 +455,9 @@ Each step ends with all tests green and is usable on its own.
| 2 ✅ | `scl_context.py`: build the render context from `TroDocument`; `emit_*` read from it — `tests/test_scl_context.py` | golden files byte-identical (also checked on dematic and showroom, with and without `--start`) |
| 3 ✅ | Pilot `FB_ILS_MTRO_1Sep1Swi.scl.j2` + `_macros`; switches `--templates`, `--strict`; class-C table (§6) filled with proposals — **still to be confirmed by a PLC engineer**; round-trip test | round trip against TRO107 passes; only the 1Sep1Swi REGIONs (+ header) differ from the generic golden files |
| 4 | `scl_naming.py` + `cfg/scl_naming.ini`; switch `--naming` | naming tests pass; Mubea renders with names instead of TODOs where a rule exists |
| 5 ✅ | Remaining call-site templates (`1Sep`, `Vario`, `1Sep2Swi`, `1Sep_SSCC`, `Vario_workStation`, `PinStore_Auto`), each with round trip against its reference (`PinStore_Auto`: the parts the reference abbreviates are left out of the comparison); decisions in §6 — **still to be confirmed by a PLC engineer**. Interface check (§8.2) for `Vario_workStation` still open | every round trip passes; HundM05 fully from templates, mubea except `2Sep2Swi` |
| 5 ✅ | Remaining call-site templates (`1Sep`, `Vario`, `1Sep2Swi`, `1Sep_SSCC`, `Vario_workStation`, `PinStore_Auto`), each with round trip against its reference (`PinStore_Auto`: the parts the reference abbreviates are left out of the comparison); decisions in §6 — **still to be confirmed by a PLC engineer**. Interface check (§8.2) for `Vario_workStation` still open | every round trip passes; HundM05 fully from templates, mubea too since the `2Sep2Swi` template (2026-10-28, no reference) |
| 6 | Templates on by default; new `--no-templates` keeps the old path for one release | golden files updated and reviewed; one import into TIA Portal (as for Mubea) |
| 7 | Remove `emit_*` once every type in use has a template (`2Sep2Swi` needs a call site first) | fallback only for types without FB |
| 7 | Remove `emit_*` once every type in use has a template (`2Sep2Swi` has one, but without call site - confirm it once the FB exists) | fallback only for types without FB |
Docs touched along the way: `doc/Python_Scripts.md` §5b, `doc/Commandlines.md` §2.5,
`CLAUDE.md` (roadmap), this file.
@@ -511,8 +514,10 @@ jam-area DBs) until an E-Planung export exists, and the `pruefen` timings.
4. `xInRelease`: `TRUE` as in the reference, or the `"DB_TRO_TEST"` test release used today?
5. Real call sites for `2Sep1Swi`, `EmptyCarrBuffer`, `LoadingBoom` — available from
another plant?
6. `FB_ILS_MTRO_2Sep2Swi` (Mubea): will it be created in the ILSLib, or should the two
transfer points be modelled with existing types?
6. `FB_ILS_MTRO_2Sep2Swi` (Mubea): to be created in the ILSLib (decided 2026-10-28,
the two transfer points stay one TRO). Its call site is drafted in
`lib/scl_templates/FB_ILS_MTRO_2Sep2Swi.scl.j2`; open: the assumed interface
(`bSep<n>Type`, `stInOutCognexInterface1/2`, priority manager, `xNewSwitch`).
7. `nTo1Destinations`: TRO107 has 2 exits but the value 3 ("Info noetig fuer HMI"). Does
it count the destinations behind the switch rather than its exits? If so, which
destinations — the per-exit target lists in the skeleton could supply them.