CMM lesson 17 · L4 series
One Part Family, One Program Structure
Part families invite the copy-paste program: duplicate, tweak, repeat. Left unmanaged, the copies can drift — a fix lands in some, a revision in others — until nobody can say with confidence which variant carries what. That risk is what this lesson answers. This lesson teaches the alternative — one program structure per family: a shared skeleton with variables for what differs, branches for what is optional, invariants that never vary, safe handling of invalid data, and prove-out discipline for every variant the structure produces.
Public lesson. All cases are sanitized: no part names, company names, customers, part numbers, or drawings. This lesson explains methods only; no production measurement results are presented. Treat heuristics as heuristics, not standards.
L4 outcome
Part families invite the copy-paste program: duplicate, tweak, repeat. Left unmanaged, the copies can drift — a fix lands in some, a revision in others — until nobody can say with confidence which variant carries what. That risk is what this lesson answers. This lesson teaches the alternative — one program structure per family: a shared skeleton with variables for what differs, branches for what is optional, invariants that never vary, safe handling of invalid data, and prove-out discipline for every variant the structure produces.
1. The divergence problem
A family of similar parts gets five programs. A measurement error is found and fixed in three of them. A revision lands and two are updated. Within a year the family has five opinions about how the same features should be measured, and an auditor asking "which program is right?" gets five answers. That is the risk the structure creates: when the unit of maintenance is a copied file, a fix lands only where someone remembers to carry it — nothing in the structure keeps the copies in step.
2. The shared skeleton
The alternative is one structure that generates the family's programs:
- Common blocks as subroutines. Alignment, recurring feature measurements, and report logic written once and called everywhere.
- Variables for what differs. Dimensions, hole counts, spacings — the values that genuinely change across the family — live as named parameters at the top, not buried as edits throughout the code.
- Branches for what is optional. A feature that exists on some variants is measured inside a branch keyed to the variant, not by deleting code in a copy.
A programmer opening any variant sees the same skeleton, the same datum logic, the same evaluation settings — and a short parameter list explaining how this variant differs.
3. What may vary, and what must never
The discipline is the boundary — my boundary, stated as the method this lesson teaches. Parameters may carry sizes, counts, and option flags. They may never carry the measurement intent: the datum strategy, the evaluation and fit settings, the safety moves, the report structure. A "variant" that needs different datum logic is not a variant — it is a different measurement problem wearing the family's name, and it graduates to its own program with its own validation. Letting intent ride in a parameter is how a family ends up accepting parts under two different definitions of the same characteristic.
4. Branches that fail safely
Branching logic has one unforgivable failure mode: silence. A branch that skips an absent optional feature is correct; a branch that skips a required characteristic because a condition misfired has just manufactured a pass. The rules:
- Optional features may branch. Required characteristics may not disappear quietly — if the branch cannot measure one, the run stops or flags, in the open.
- Invalid data is not data — and "invalid" here is a property of the datum itself, not of the characteristic's verdict: a missed probe hit (no point taken), an empty result (no value produced), or a value outside the valid range of the input that produced it. Those must halt or flag the run, and the record keeps the flag and where it happened. A valid value that falls outside the characteristic's tolerance is a different thing entirely: it is a result, and it belongs in the report as a fail — never in the bin.
- Retries are bounded and recorded. A silent retry loop that eventually "gets a number" produces a result whose provenance nobody can defend: the retries that made it left no trace.
5. Prove-out: shared structure is not shared validation
Each variant still earns its own proof. The build follows the offline discipline: program from the model, set the virtual alignment, generate paths with clearance moves, run the collision simulation — then prove it on the real machine at reduced speed — Speed Override at its lowest, around 10–20% — operator holding the joystick, ready on the E-Stop, running without a part or slowly with one, before the first full-speed run. A parameter set is a new machine path even when the skeleton is old: different lengths move the probe through different space. On top of the modules' offline and dry-run discipline, this lesson adds one requirement of its own: a first-article check on each variant — its first measured piece reviewed against the full characteristic list — before the variant runs production. The structure being trusted is exactly why each of its children must be checked.
6. Maintenance that stays honest
The payoff compounds: a strategy fix is made once, in the skeleton, and every variant inherits it; the change record describes one change instead of five near-identical ones. The honesty rule travels with it — my rule of thumb: when a variant accumulates exceptions until its parameter list is longer than the skeleton it feeds, the family has already split. Graduate that variant to its own program openly rather than letting the "family" become a fiction maintained by comments.
7. What this changed in my own programming
I stopped counting programs and started counting structures. When a new variant arrives, my first question is no longer "which program do I copy?" but "does this part honestly fit the family's skeleton — same datums, same intent, different numbers?" If yes, it is a parameters- and-prove-out job, sized by the variant and the checks it needs. If no, it gets its own program and its own validation, and the family stays a family instead of becoming a rumour.
L4 self-test
Explain
- By what mechanism can copied programs drift apart even when every programmer is disciplined? What property of the structure allows it?
- State the boundary rule: what may live in family parameters, and what must never vary inside a shared structure?
- Why does a shared, trusted structure still require its own prove-out for each variant — and what does this lesson add on top of the training modules' offline and dry-run discipline?
Scenario
- An audit finds three of five family variants missing a measurement fix made two years ago. Lay out the recovery: how do you establish one structure, and what happens to results the divergent variants already reported?
- A branch added for an optional feature can, under one condition, skip a required characteristic without erroring. What do you change, and what evidence proves the failure mode is gone?
Pass gate: given a family of similar parts, you can design the shared structure — skeleton, parameter list, branch map, invalid-data rules — prove each variant out safely, and state the condition under which a part does not belong to the family at all.