Below is a principal-level explanation of Recipes & Configuration in industrial machine software, aligned to Domain 1 Topic 11: recipe-driven operation, parameter management, configuration safety, and validation.
PART 1 — WHAT RECIPES & CONFIGURATION MEAN IN MACHINE SOFTWARE
In industrial machine software, a recipe is not just a saved preset. It is a controlled set of parameters that defines how the machine should run a specific product, process, inspection mode, or operating condition.
A recipe tells the machine things like:
- where to move
- how fast to move
- what thresholds to use
- what devices to enable
- how long to wait
- what sequence variations to apply
In real production systems, the machine is often physically the same, but the behavior changes substantially depending on the selected recipe. That is why recipe handling is part of core machine control, not just a convenience feature.
A machine configuration is different. Configuration usually describes the machine itself or the environment it runs in. It tends to be more stable and less product-specific.
For example:
Recipe:
- wafer scan pitch
- autofocus enable
- illumination intensity for a specific wafer type
- defect threshold
- stage settle delay for a particular process
Machine configuration:
- installed camera model
- axis travel limits
- hardware revision
- number of lighting channels
- whether a vacuum module is present
- controller communication endpoints
A useful mental model is this:
- Recipe = how this run should behave
- Machine configuration = what this machine is capable of and how it is built
- Runtime state = what the machine is doing right now
- Operator/UI preference = how the user wants the screen or workstation to behave
That distinction matters a lot.
The four categories clearly separated
1. Recipe data
This is production-intent data. It directly affects machine behavior during execution.
Examples:
- scan speed
- image exposure
- pick positions
- pressure thresholds
- dwell times
- product dimensions
- inspection tolerances
2. Machine configuration
This is environment and capability data. It describes the machine installation and available hardware.
Examples:
- stage max speed capability
- installed optics set
- axis count
- safety zone definitions
- controller firmware compatibility flags
3. Runtime state
This is live state, not something you edit as a recipe.
Examples:
- current axis position
- vacuum currently on/off
- current alarm state
- current active recipe name
- whether subsystem apply has completed
4. Operator preference / UI settings
This is usually non-process-critical personalization.
Examples:
- dark mode
- which columns to show
- preferred units on screen display
- panel layout
- last opened screen
A common beginner mistake is to mix these together. Once that happens, engineers start loading runtime state from recipe files, or storing machine capability assumptions inside recipes, or letting UI preferences alter production behavior. That leads to extremely hard-to-debug systems.
Real examples
Wafer inspection example
A wafer inspection recipe may include:
- scan region
- stage velocity
- autofocus strategy
- illumination mode
- camera exposure/gain
- defect sensitivity threshold
- image capture overlap
- settle time before acquisition
The machine configuration may include:
- installed camera type
- maximum supported stage acceleration
- lens family
- light controller channel mapping
- hardware revision constraints
Pick-and-place example
A recipe may include:
- feeder positions
- pick height
- place height
- vacuum timing
- nozzle selection
- vision threshold
- retry count
- product orientation rules
The machine configuration may include:
- nozzle bank installed
- conveyor length
- axis stroke
- whether side camera exists
- IO mapping for vacuum valves
Industrial machines need this controlled parameterization because the same machine platform often serves multiple products, product revisions, processes, and customer environments. Hardcoding behavior would make the system unusable in production.
PART 2 — RECIPE-DRIVEN OPERATION
A recipe-driven machine changes behavior based on the selected recipe. That sounds simple, but in real systems it means the recipe influences multiple layers at once:
- workflow branching
- motion targets and speeds
- sensor thresholds
- timing windows
- vision parameters
- allowed operating range
- subsystem enablement
So the recipe is not passive data sitting in storage. It is part of the machine’s behavioral contract.
For example, in a wafer inspection machine, selecting a recipe might change all of the following:
- stage scan speed
- autofocus usage
- exposure time
- defect threshold
- image stitching overlap
- stop conditions for anomalies
- alignment checkpoints
In a pick-and-place machine, selecting a different product recipe may change:
- feeder map
- motion profiles
- product orientation logic
- acceptable placement error
- vacuum timing
- camera search window
- retry strategy
That is why strong engineers treat recipe application as a controlled runtime transition, not as “just loading some values.”
Why recipe is part of machine logic
A recipe is tied directly to machine control because software decisions are parameterized by it. Typical examples:
- motion planner uses recipe positions and speeds
- workflow decides whether to execute optional steps
- vision subsystem picks thresholds and timing from recipe
- alarm logic may use recipe-dependent tolerances
- control logic may block execution if recipe is incompatible with current hardware
If the recipe is wrong, the machine may still “run,” but run incorrectly. That is what makes recipe failures dangerous: they often create valid-looking bad behavior rather than obvious crashes.
Why wrong recipe is dangerous
Wrong recipe does not always fail loudly.
It may cause:
- slow quality drift
- intermittent misses
- product damage
- throughput degradation
- false rejects
- false accepts
- motion into marginal areas
- unstable process windows
This is a classic machine software problem: the machine can appear healthy while production is actually wrong.
Experienced engineers learn to think this way:
A recipe is not merely a convenience for flexibility. It is one of the main ways production intent is injected into control software.
PART 3 — PARAMETER CATEGORIES
Below are the practical parameter categories that appear in real industrial machines.
1. Motion positions and speeds
These define where the machine moves and how it gets there.
Examples:
- pickup X/Y/Z position
- inspection scan start/end
- stage velocity
- acceleration
- settle offset
- retract distance
What they control:
- physical path
- timing
- throughput
- mechanical interaction
How they affect behavior:
- directly determine physical movement
- affect vibration, settling, and process timing
- influence cycle time and collision risk
Typical risks if wrong:
- crash into tooling
- miss inspection region
- fail to reach pickup point
- unstable imaging due to vibration
- overtravel toward unsafe zones
2. Timing and delay values
These define when the machine waits, checks, or sequences events.
Examples:
- vacuum settle delay
- camera trigger delay
- motor settle time
- retry timeout
- conveyor debounce time
What they control:
- sequence pacing
- synchronization
- readiness assumptions
How they affect behavior:
- determine whether downstream actions happen too early or too late
- often mediate between physical latency and software expectations
Typical risks if wrong:
- reading sensor before stable
- imaging while stage still vibrating
- vacuum not fully established before lift
- timeout storms
- reduced throughput from excessive waiting
3. Vision / camera settings
These define image capture and inspection behavior.
Examples:
- exposure
- gain
- light intensity
- threshold
- focus mode
- ROI
- image sampling interval
What they control:
- image quality
- defect detectability
- acquisition robustness
How they affect behavior:
- shape the usable signal for inspection
- influence speed-quality tradeoffs
- must stay compatible with motion timing
Typical risks if wrong:
- blurred images
- overexposure
- underexposure
- false defects
- missed defects
- unstable results across lots
4. Thresholds and tolerances
These define acceptance windows and decision boundaries.
Examples:
- alignment tolerance
- defect size threshold
- vacuum pressure minimum
- placement error limit
- edge detection threshold
What they control:
- pass/fail decisions
- process acceptability
- alarm sensitivity
How they affect behavior:
- directly impact yield and false alarm rate
- influence when machine stops vs continues
Typical risks if wrong:
- reject good product
- accept bad product
- nuisance alarms
- hidden quality escape
- unstable behavior around edge cases
5. Product-specific rules
These define logical behavior for different products.
Examples:
- number of inspection sites
- skip optional station
- allowed orientation variants
- special handling for fragile products
- per-product retry policy
What they control:
- workflow path
- special-case behavior
- product-specific logic
How they affect behavior:
- changes what the machine does, not just numeric tuning
- often impacts sequence branching and validation needs
Typical risks if wrong:
- wrong step executed
- product mishandled
- missing inspection step
- wrong placement pattern
6. Subsystem enable / disable settings
These determine which features or modules participate.
Examples:
- autofocus enabled
- barcode reader enabled
- pre-align step enabled
- secondary camera active
- vacuum verification required
What they control:
- whether specific subsystem logic is part of the run
How they affect behavior:
- change workflow shape
- influence required dependencies and checks
Typical risks if wrong:
- critical verification skipped
- subsystem expected but not ready
- unsupported path activated
- hidden incompatibility with hardware setup
7. Safety-sensitive operating limits
These are not safety PLC logic, but software-visible limits that constrain operation.
Examples:
- max recipe speed
- allowed Z travel window
- force threshold
- max retry count before stop
- product family-specific restricted motion area
What they control:
- safe operational envelope from the application side
How they affect behavior:
- constrain otherwise legal commands
- reduce risk from bad process settings
Typical risks if wrong:
- machine enters marginal or damaging behavior
- software permits operation too close to hardware edge
- repeated retries worsen fault condition
A strong engineer never sees “parameter” as a generic concept. Every parameter belongs to a control context, and that context determines how dangerous it is.
PART 4 — CONFIGURATION SAFETY & VALIDATION
Recipe validation is one of the most underestimated areas in machine software.
Many weak systems validate only this:
- field is present
- number parses
- value is between min and max
That is not enough.
In production, a value can be individually valid and still be operationally dangerous.
What real validation includes
1. Range validation
Basic min/max checks.
Example:
- exposure must be between 10 and 5000 µs
- stage speed must be between 1 and 800 mm/s
Necessary, but not sufficient.
2. Dependency validation
Checks relationship between parameters.
Example:
- scan speed and exposure must be compatible
- pick height must be below safe retract height
- autofocus enable requires autofocus hardware present
This catches valid individual values that are invalid in combination.
3. Unit consistency
Checks whether values are stored and interpreted consistently.
Examples:
- mm vs µm
- ms vs s
- degrees vs radians
- camera line rate vs frame exposure units
This sounds trivial, but unit mistakes can create catastrophic real-world behavior.
4. Hardware capability checks
Checks that the machine can actually execute the requested recipe.
Examples:
- requested acceleration exceeds installed stage capability
- recipe assumes second light channel not present
- required camera mode not supported by installed model
5. Compatibility checks between recipe and machine state
Checks that recipe can be safely activated right now.
Examples:
- recipe requires homed axes
- active hardware revision differs from recipe target revision
- machine is in auto run and activation is not allowed
- subsystem not initialized
Why “in range” is not enough
Consider this case:
- exposure = 15 ms
- scan speed = 600 mm/s
Each value may be individually valid. But together, the exposure is too long for the motion speed. Result:
- motion blur
- bad defect detection
- inconsistent quality
Or this:
- X target is inside global travel limits
- but outside product-safe zone for current tooling setup
Again, range passes, but operation is unsafe.
That is why experienced teams validate at multiple levels:
- field level
- cross-field level
- subsystem level
- machine capability level
- activation-time level
Why validation must happen before activation
Edit-time validation is helpful, but not enough. Machine context changes:
- hardware revision changes
- subsystem becomes unavailable
- machine not homed
- current mode disallows activation
- active tooling differs
- machine capability altered by maintenance
A recipe that was valid yesterday may not be safe to activate today.
So robust systems do validation at least twice:
- when recipe is edited or imported
- when recipe is activated for actual use
Validation flow diagram
+-----------+ +----------------+ +------------------+ +------------------+
| Operator | ---> | Recipe Editor | ---> | Static Validator | ---> | Save as Draft |
+-----------+ +----------------+ +------------------+ +------------------+
|
v
+----------------------+
| Validation Findings |
| errors / warnings |
+----------------------+
Later, before use:
+-----------+ +----------------+ +--------------------+ +----------------------+
| Operator | ---> | Activate Recipe | ---> | Activation Checker | ---> | Subsystem Capability |
+-----------+ +----------------+ +--------------------+ | and Compatibility |
+----------------------+
|
v
+----------------------+
| Allow / Block |
| Activation |
+----------------------+Diagram explanation
The key idea is that saving a recipe and activating a recipe are different control points. Static validation checks structure and internal logic. Activation checks current machine reality.
PART 5 — RECIPE LIFECYCLE
In real machines, recipes need a controlled lifecycle. A realistic lifecycle looks like this:
- create
- edit
- validate
- approve
- activate
- run
- revise
- archive
A recipe should not jump straight from “someone typed values” to “machine is using it.”
Draft vs active recipe
A draft recipe is still under construction or review. It may be incomplete, unapproved, or not yet machine-compatible.
An active recipe is the controlled version the machine is allowed to run.
This distinction is critical because industrial machines often need traceability and predictable production behavior. If people can casually edit live process parameters during production, you invite drift, instability, and blame ambiguity.
Offline editing vs online activation
Strong systems separate:
- editing
- validation
- approval
- activation
Offline editing means recipe changes can be prepared without instantly affecting machine behavior.
Online activation means the recipe becomes the current operational set for the machine.
That boundary matters because activation is a runtime event with consequences. It often requires:
- correct mode
- machine idle or safe condition
- subsystem acknowledgment
- logging
- permission checks
Why activation needs control and traceability
Because when something goes wrong, one of the first questions is:
- What recipe version was active?
- Who activated it?
- Was validation passed?
- Did the machine fully apply it?
- Was the operator running a draft or an approved version?
If you cannot answer those questions, troubleshooting becomes political instead of technical.
Recipe lifecycle state diagram
+------------------+
| Archived |
+------------------+
^
|
|
+---------+ edit +---------+ validate ok +-----------+ approve +-----------+
| Created | --------> | Draft | --------------> | Validated | ----------> | Approved |
+---------+ +---------+ +-----------+ +-----------+
| | |
| validate fail | revise | activate
v v v
+-------------+ +---------+ +-----------+
| Invalid | -----------> | Draft | | Active |
+-------------+ revise +---------+ +-----------+
|
| revise
v
+-----------+
| Superseded|
+-----------+Diagram explanation
This model prevents uncontrolled use of half-finished settings. In practice, you may simplify the states, but the core principle remains: not every saved recipe is runnable, and not every validated recipe is active.
PART 6 — APPLYING RECIPES TO THE MACHINE
This is where many systems become fragile.
The words load, validate, apply, and activate are often used loosely, but they mean different things.
1. Load
Read recipe data from storage into an internal model.
This does not mean the machine is using it yet.
2. Validate
Check whether the recipe is internally consistent and compatible with machine context.
Still does not mean the machine is using it yet.
3. Apply
Push relevant settings to subsystems.
Examples:
- motion subsystem receives profile set
- vision subsystem receives camera settings
- sequence engine receives workflow flags
- subsystem-specific caches update
Still may not mean the machine is ready.
4. Activate
Declare that this recipe is the officially active operational recipe for the next run or current mode.
Activation should happen only after apply succeeds and subsystems acknowledge readiness.
Why partial application is dangerous
Suppose the stage controller received new motion settings, but the vision subsystem still uses old exposure parameters. Now the machine is in a mixed state:
- motion is new
- vision is old
- UI may show recipe as active
- physical behavior is inconsistent
That creates exactly the kind of failures that are hardest to diagnose because nothing is obviously broken.
Why UI showing new value means little
A common weak design is:
- operator selects recipe
- UI updates displayed values
- system assumes machine now uses them
But real machines often have:
- subsystem caches
- delayed apply
- apply failures
- controller-side retained values
- async acknowledgment
- per-subsystem readiness transitions
So “displayed value changed” is not trustworthy proof of runtime application.
Stale cached values and inconsistent subsystem state
These problems are very real:
- a subsystem reads recipe once at startup and never refreshes
- one adapter uses current recipe object, another uses copied values
- a controller silently rejects some settings
- a background worker keeps old thresholds
- apply success is assumed rather than acknowledged
This is why strong systems treat recipe application as a coordinated operation with acknowledgments.
Sequence diagram: select → validate → apply → ready
Operator UI RecipeManager Validator Subsystems MachineState
| | | | | |
| select | | | | |
|----------->| | | | |
| | load recipe | | | |
| |------------------>| | | |
| | | validate | | |
| | |--------------->| | |
| | |<---------------| result | |
| | | | | |
| | | apply request | | |
| | |-------------------------------->| |
| | | | apply params | |
| | | |<---------------| ack / fail |
| | | | | |
| | | set active only if all ack ok | |
| | |--------------------------------------------------->|
| |<-----------------| machine ready / blocked | |
| status | | | | |Diagram explanation
The important point is that activation is not just a UI event. It is a coordinated transition across validation, subsystem application, acknowledgment, and machine state update.
PART 7 — REAL-WORLD FAILURE SCENARIOS
1. Wrong recipe selected for the product
What it looks like in production
The machine runs, but results are off:
- wrong inspection threshold
- wrong motion positions
- wrong pickup geometry
- unusual false rejects or damaged parts
Why it is difficult
The machine may not throw an obvious fault. It is doing exactly what the selected recipe tells it to do.
How experienced engineers prevent or investigate it
- enforce product-to-recipe compatibility checks
- show strong recipe identity and revision on run screen
- require confirmation or barcode/product match
- log active recipe ID with run history and alarms
- compare recent failures to recipe changes first
2. Hidden dependency between parameters
What it looks like
Changing one “harmless” value destabilizes performance:
- scan speed increased slightly
- inspection quality collapses
- autofocus misses increase
- false alarms rise
Why it is difficult
The badness is in the interaction, not the individual value.
How experienced engineers handle it
- capture cross-parameter rules explicitly
- validate relationships, not just fields
- document dependency-sensitive parameters clearly
- use subsystem-owned validation, not only central generic validation
3. Operator changes parameter that should be locked
What it looks like
Production becomes inconsistent across shifts or lots.
Why it is difficult
The change may be legal in software but operationally inappropriate.
How experienced engineers handle it
- define edit permissions by parameter category
- distinguish tuning, engineering, service, and protected parameters
- require approval for sensitive changes
- log who changed what and when
- separate temporary override from persistent recipe revision
4. Outdated recipe after hardware change
What it looks like
After replacing a camera, stage, nozzle, or light module, old recipes behave poorly or fail intermittently.
Why it is difficult
The recipe was valid in the previous machine context. After hardware change, assumptions are no longer true.
How experienced engineers handle it
- include hardware compatibility metadata
- revalidate recipe against current hardware revision
- block activation if capability mismatch exists
- mark recipes as requiring review after service events
5. Recipe says one thing, machine still uses old cached values
What it looks like
UI shows updated settings, but behavior matches old parameters. Very common symptom:
- “We changed exposure, but image still looks the same”
- “The speed value changed in UI, but stage motion didn’t”
Why it is difficult
There are multiple layers:
- UI model
- recipe manager
- subsystem cache
- controller-side runtime state
How experienced engineers handle it
- require subsystem apply acknowledgment
- provide diagnostics showing applied vs requested values
- avoid hidden local caches
- centralize active configuration source of truth
- add trace logs around apply transitions
6. Gradual recipe drift causes unstable production behavior
What it looks like
Over weeks or months:
- someone tweaks thresholds
- another person adjusts timing
- someone copies recipe and edits slightly
- process becomes fragile and inconsistent
Why it is difficult
No single change looks dramatic. The instability emerges from accumulated uncontrolled edits.
How experienced engineers handle it
- version recipes explicitly
- require comments/reason on changes
- compare revisions
- control copy-and-modify workflows
- define gold baseline recipes
- periodically review drift against known stable process windows
This last scenario is extremely common in production. Machines often become unstable not from one bug, but from slow uncontrolled parameter evolution.
PART 8 — SOFTWARE DESIGN IMPLICATIONS
Recipe and configuration management needs explicit architecture. If you do not design it clearly, it becomes a hidden control plane spread across UI code, adapters, JSON files, magic defaults, and controller wrappers.
That always becomes fragile.
Why explicit architecture matters
Because recipe/configuration affects:
- machine behavior
- subsystem coordination
- validation safety
- traceability
- troubleshooting
- permission control
- production consistency
This is too important to leave as incidental plumbing.
What strong designs usually contain
Typed models
Parameters should be explicit, named, structured, and semantically meaningful.
Bad:
Dictionary<string, object>- magic strings
- untyped blobs
Good:
- explicit models
- domain types
- units and constraints represented clearly
- clear category ownership
Clear ownership
Every parameter should have an owner.
Examples:
- motion subsystem owns motion-related validation semantics
- vision subsystem owns imaging constraints
- recipe manager owns lifecycle and orchestration
- UI edits but does not define machine truth
Without ownership, validation becomes shallow and responsibility becomes blurred.
Validation rules
Validation should exist in layers:
- schema/shape validation
- business/process validation
- subsystem constraint validation
- machine capability validation
- activation-time validation
Versioning
Recipes need identifiable revisions.
Because you will need to answer:
- Which version ran?
- What changed?
- When did instability start?
- Which version was approved?
Audit trail
Production systems need change visibility:
- who changed it
- what changed
- why
- when
- which machine/environment it applied to
Change control
Not every user should change every parameter at every time.
Strong systems distinguish:
- operator
- process engineer
- service engineer
- developer/admin
Permissions
Some parameters are safe to adjust. Some should be protected. Some require approval or machine idle state.
Good vs bad approaches
Bad approaches
- loose dictionaries
- magic string keys
- hidden defaults
- silent fallback to “best effort”
- no distinction between draft and active
- per-screen local copies
- UI writes directly to live machine values
- subsystems quietly ignoring unsupported parameters
These create false confidence and non-deterministic behavior.
Good approaches
- explicit schema
- typed parameter model
- validation pipeline
- controlled activation flow
- subsystem acknowledgment
- traceable revisions
- permissioned edits
- clear separation between recipe, config, and runtime state
Component diagram
+------------------+ +-------------------+ +------------------+
| Recipe Editor UI | ----> | Recipe Manager | ----> | Active Recipe |
| / HMI | | lifecycle/control | | Context |
+------------------+ +-------------------+ +------------------+
| | |
| v |
| +-------------------+ |
| | Validator | |
| | rules/checks | |
| +-------------------+ |
| | |
| v |
| +-------------------+ |
| | Audit / Versioning| |
| +-------------------+ |
| | |
| v |
| +-------------------+ |
+---------------> | Subsystem Adapters| <--------------+
| motion/vision/io |
+-------------------+Diagram explanation
The UI is not the source of truth. The recipe manager controls lifecycle. Validator determines whether a recipe can be trusted. Subsystem adapters apply parameters to real machine components. Active machine state should only be updated after controlled application.
PART 9 — INTERVIEW / REAL-WORLD TALKING POINTS
How to explain recipe-driven operation clearly
A good explanation is:
In industrial machines, recipes are controlled parameter sets that define how the machine runs a specific product or process. They do not just store values; they directly shape motion, timing, thresholds, subsystem behavior, and workflow branching. Because recipe values affect real physical behavior, recipe loading and activation must be validated, controlled, and traceable.
That is much stronger than saying “recipes are like configuration files.”
Why recipes are central to industrial machines
Because industrial machines need to reuse the same hardware platform across:
- different products
- different process conditions
- different customer requirements
- different operating modes
Recipes are the mechanism that makes that flexibility practical. But that flexibility becomes dangerous without validation and control.
Common mistakes software engineers make when entering machine software
A few very common ones:
1. Treating recipes like app settings
In machine software, wrong settings do not just annoy users. They can damage hardware, reduce yield, or create unsafe behavior.
2. Validating only at field level
Checking min/max is not enough. Cross-parameter, subsystem, and machine-context validation are essential.
3. Letting UI become the source of truth
What the screen shows and what the machine is actually using may differ unless apply/acknowledgment is explicit.
4. Mixing recipe, config, and runtime state
That leads to confusing ownership and debugging chaos.
5. Ignoring traceability
When production becomes unstable, teams need to know exactly which recipe version was active and what changed.
6. Allowing silent fallbacks
Silent defaults and best-effort ignores are deadly in machine control because they hide real mismatches.
What strong engineers understand about safe parameter management
Strong engineers understand that:
- recipe is a behavioral contract, not just stored data
- parameter categories have different risk levels
- activation is a controlled runtime transition
- validation must include machine context
- partial apply is dangerous
- auditability and versioning are operational necessities
- safe flexibility requires explicit architecture
They also understand a deeper truth:
Many production problems are not code bugs in the classic sense. They are configuration-control failures, recipe drift, incompatible assumptions, or weak activation design.
That is a very important machine-software mindset shift.
Final summary
Recipes and configuration are central to industrial machine software because they define how a machine adapts behavior across products, processes, and environments. In real systems, recipes influence motion, timing, thresholds, workflow choices, and subsystem behavior, so they must be treated as part of machine control—not as casual settings.
The core architectural lessons are:
- keep recipe, machine configuration, runtime state, and UI preferences separate
- use typed models and explicit ownership
- validate at multiple levels, especially before activation
- distinguish draft from active
- require subsystem apply acknowledgment
- maintain versioning, audit trail, permissions, and change control
- never trust a UI change alone as proof the machine is running with the new parameters
That is how experienced teams keep flexible machines safe, predictable, and diagnosable in production.