home Home / Wrong Part, Right Program? Preventing Recipe Mismatches in Robot Cells

Wrong Part, Right Program? Preventing Recipe Mismatches in Robot Cells

The cell ran the wrong program for four hours. The part was right, the fixture was right, the program was right, and the combination was wrong: a variant that shared the same footprint and the same fixture location but needed a different weld schedule and a different torque. Nothing alarmed, because nothing was checking the combination.

Concept diagram matching part, fixture and tool identity to the robot program.
Concept diagram matching part, fixture and tool identity to the robot program.

Recipe mismatch is the failure mode that hides behind good components. Every element of the cell can be individually correct and the product can still be wrong, because correctness here is a property of the combination rather than of the parts. And combinations are exactly what a cell is not naturally good at verifying.

The fix is not a better reader. It is deciding, in writing and in advance, what match the cell must establish, what evidence establishes it, and what the cell is permitted to do when the evidence is ambiguous. Then testing all three with parts that are deliberately wrong.

Define the Match the Cell Must Establish

The first step is to stop treating “identify the part” as one requirement, because it is several, and they are not satisfied by the same evidence.

Related reading: robot configuration and revision control.

A cell that welds a family of variants has to establish at least four separate matches, and each can fail independently.

The part is the variant it is supposed to be. This is the identity match, and it is what most discussions of part identification are about.

The program loaded is the one qualified for that variant. This is the recipe match, and it is a match between two records rather than between a sensor and a part. It fails when the part is right and the program is stale, or when a program was edited and the variant records were not updated.

The tooling is the tooling that variant requires. A gripper, a fixture insert, a welding head, a torque tool. This is the tooling match, and it fails when a changeover was completed for the part but not for the tool.

The state the part is in is the state the recipe assumes. Raw, machined, cleaned, primed, previously welded. This is the state match, and it is the one most often left implicit, which is why it fails most often.

Those four are not a taxonomy for its own sake. They fail differently, they are evidenced differently, and they are caught by different tests.

Consider what happens when only the first is checked. A cell with a reliable reader on the infeed will happily confirm that the part is variant B while running a program that was last validated for variant B's predecessor, with a fixture insert left over from variant A. The reader is working perfectly. The cell is producing scrap.

Now consider the reverse. A cell with a rigorous program management system and no part identification will run the correct recipe for the wrong part, and it will do so with a fully documented parameter set that makes the resulting nonconformance look like a process problem rather than a logistics problem.

So the first deliverable of this section is a match matrix: the four matches, the evidence that establishes each, and the failure mode that each evidence is intended to catch. It should fit on a page and it should be signed by someone from production and someone from quality, because the disagreement between those two functions about what counts as established is the most useful conversation in the project.

One further distinction belongs in the matrix and it is the one that keeps the whole design honest: establishing a match is not the same as judging compatibility.

A reader tells you what the code says. A program tells you what it is. Neither tells you whether those two belong together. Compatibility is a judgement made by a rule, and the rule lives in the cell's control logic or in the manufacturing execution system, and it has to be written and maintained by someone who understands the product.

The distinction matters because a cell can be excellent at identification and have no compatibility logic at all. It knows exactly what part it is holding and exactly which program is loaded, and nobody has told it that these two are not supposed to go together. That cell will report a clean read and produce a nonconforming part, and the report will be true.

Choose Evidence for Each Identity

With the matrix defined, the next question is what physical evidence establishes each identity, and the honest answer is that different identities need different evidence.

Related reading: automatic robot tool-changer interfaces.

Balluff's identification product material describes the general architecture, and it is worth using as a map. RFID systems use data carriers attached to the object being identified, with the carrier acting as memory, data transferred between carrier and read head, and read heads connected to the controller through an evaluation unit or an IO-Link network module. The same family of products spans frequency bands, with the UHF variant described as complying with ISO 18000-6C and EPC Gen2 Class1, offering read ranges of six metres and beyond, and having a capability to detect multiple data carriers simultaneously.

Those are capability statements about a product family and they are useful as a map of the options rather than as a recommendation. What matters for the match matrix is the shape of each option's evidence.

A carrier on the part is evidence about the carrier. If the carrier is attached to the pallet rather than the part, the identity is the pallet's. If the carrier is on a fixture insert, the identity is the insert's. Each of those is legitimate and each answers a different question. A cell that reads the pallet and believes it knows the part has made an assumption that will fail the first time two variants share a pallet type.

A code on the part is evidence about the part, with the caveat that the code is only as durable as the surface it is on, and that direct part marking on a machined surface is a different reliability problem from a printed label on a carton.

A tool identification carrier is evidence about the tool, and this is where Balluff's own application material becomes concrete. In a Chinese-language application article published on the e-works manufacturing portal, the company describes RFID-based tool identification in machining, with low-frequency BIS C or high-frequency BIS M systems ensuring that the CNC controller always has the correct tool data available: number, diameter, length, number of inserts. The same article notes the company's history of converting inductive sensor technology into RFID systems for tool identification in the 1950s, which is context rather than evidence, and it is presented as the manufacturer's own account.

That article is a manufacturer's application piece republished by an industry portal, so it supports what the systems are used for and not what they achieve. Read it that way and it is useful: it establishes that tool identity is a recognised identity in machining cells, and that the data carried can include the parameters the controller needs, not just a name.

For the state match, there is usually no carrier at all and the evidence has to be inferred or measured: a vision check, a sensor, an upstream process record, or an operator confirmation. This is the weakest link in most cells and it should be labelled as such in the matrix rather than glossed.

A further evidenced point about where reading can physically happen comes from a Chinese engineering forum thread on reading Balluff RFID from a Siemens 840D sl control. The post describes a retrofit in which tool RFID data was written by a tool presetter and read into the machine's tool table, and it notes that because of the geometry of the tool's RFID tag in the magazine, the read head could not be mounted inside the magazine and was instead mounted near the spindle, with reading starting after a tool change or a new tool load.

That is a forum post, not a specification, and it is presented here as exactly that: a field account of a geometric constraint. But the constraint is general and it is the kind of thing that kills identification projects late. The read point has to be somewhere the carrier is actually presented to the head, at a distance and an orientation the head can handle, at a moment when the cell can act on the result. A cell that reads the pallet at the infeed and needs the answer at the fixture has a window problem, and the window is a mechanical constraint rather than a software one.

So the evidence selection has a physical dimension that belongs in the matrix. For each identity: what carries it, where it is read, when in the cycle it is read, and what the cell can still do if the read happens after the point of no return.

Herrmann's ultrasonic welding material offers an example of the state problem in a different domain. Its joint geometry catalogue sets out forms for plastics and separately lists one form for semi-crystalline plastics, which is a quiet admission that the material form is one of the inputs to the joint choice. My reading, not the supplier's, is that this is the step that matters: a rule that ties joint form to material form has to be encoded somewhere, rather than inferred at the machine. Knowing that the part is made of polypropylene does not tell the cell that the fixture insert is the right one for polypropylene; only the rule does.

Define What Allows the Job to Start

This is where the design becomes a control decision, and where the most common mistake is made: treating the start condition as a permissive that is either present or absent, when it is actually a small state machine with defined transitions and defined failure handling.

The start permission should be an explicit list of conditions, all of which must be true, and each of which must be independently evaluable.

The part identity is read and valid. The program identity is read and valid, and it matches a record. The tooling identity is read and valid. The state check has returned the expected result. The compatibility rule has been evaluated and returned a match. No condition is in an unknown state.

That last clause is the one that does the work, and it is the one most often missing. A cell that requires all conditions to be true will start when a condition is unknown, because an unknown condition is not a false condition in most control logic. A missing read becomes an empty string, an empty string does not equal a mismatch, and the cell starts.

So the logic has to be three-valued rather than two-valued: match, mismatch, unknown. And the unknown state has to be a block, not a warning.

There is a second design question hidden in the same place, and it is about what the cell does when the match fails. Three responses are defensible and they should be chosen deliberately rather than defaulted.

Refuse to start, and require a person to resolve it. This is the safest and the slowest, and it is appropriate when the consequence of a wrong combination is severe or when the resolution requires judgement.

Reject the part and continue. This keeps the cell running and diverts the problem, which is appropriate when the failure is a part problem rather than a cell problem, and it depends on having somewhere to put the part and a way to preserve its identity. That is the subject of a separate discipline and this article does not cover it.

Stop and alarm. This is appropriate when the failure indicates that the cell's own state is unknown, because continuing to run a cell whose state is unknown is the one thing that cannot be justified.

Now the boundary that this whole section has to respect, and it is a hard one.

A part identification check is not a safety function, and it must never be presented or credited as one.

Balluff's own product literature makes the distinction at the product level, and it is instructive. The company describes IO-Link as the interface for connecting intelligent sensors and actuators to the controller, with multi-protocol recognition and web-based configuration. It separately describes IO-Link Safety as a distinct development for safety functions in industrial automation.

Those are two different things, and the reason they are two different things is that a safety function has requirements that an ordinary identification channel does not meet: a defined performance level, diagnostic coverage, failure modes that lead to a safe state, and validation of the whole safety function rather than of the sensor.

A cell that uses a code reader to confirm the part is the right variant has built a quality control, and a good one. It has not built a safeguard. If the consequence of a wrong combination is a hazard to a person rather than a nonconformance, the identification cannot be part of the safety justification and a separate safety function is required.

Write that boundary into the design document. It prevents two failure modes at once: an identification system being credited with protection it does not provide, and a genuine safety requirement being met with a quality control and signed off by people who did not notice the category error.

Challenge the Cell During Changeover and Restart

A matching logic that works during steady production and fails at changeover is a matching logic that fails at the moment it matters most, because changeover is when the combinations are supposed to change.

Test it there, deliberately, and test it in the specific ways changeover goes wrong.

The partial changeover is the first and most common. The part changes, the program changes, and the fixture insert does not. A matching logic that checks part and program will pass this. A matching logic that checks tooling will catch it, which is the argument for the tooling match being an independent condition rather than an inference from the part.

The reversed partial changeover is the second. The fixture is changed for the next product while the current batch is still running, because the changeover is being staged for efficiency. Now the tooling does not match the part, and the cell is producing nonconforming parts with a clean read on every check that was designed around the part.

The stale program is the third. The part is variant C, the program is variant C's, and the program was edited three weeks ago by someone solving a different problem and the variant record was not updated. The identity matches and the capability does not. Catching this requires the program identity to include a version and the compatibility rule to compare versions, not just names.

The restart is the fourth and it is the one most often untested. After an interruption, a mid-cycle stop, a fault, or a shift change, the cell resumes with parts and tools in positions that do not correspond to any clean start state. A logic that establishes its conditions at the top of the cycle and then runs will resume without re-establishing them.

The test for the restart case is to interrupt the cell deliberately at several points and check what it does. Mid-cycle with a part in the fixture. Between the identity read and the program call. After the program call and before the first process step. In each case the cell should be in a defined state and should require the conditions to be re-established before it continues.

There is a related question about who is allowed to change what. If an operator can select a program manually, the entire matching logic is advisory, because the selection is the real decision. That is not necessarily wrong: manual selection with a verified interlock is a legitimate design. What is wrong is a manual selection that is described as automatic verification.

So the changeover and restart test is a set of deliberate scenarios, run on the actual cell, with the actual parts and the actual tooling, and with the result recorded per scenario. The scenarios should include the ones that are inconvenient, because the inconvenient ones are the ones that happen at 2 a.m.

One more challenge worth running, and it is the cheapest of all: give the cell a part it has never seen. Not a wrong part from the family. A part from a different family, with a code format the reader was not configured for, or no code at all. The correct answer is a defined refusal, and the incorrect answer is an empty string that happens to satisfy the logic.

Handle Ambiguity Without Guessing

Every identification system has a category of outcome that is neither a match nor a mismatch, and the design has to decide what to do with it before it happens.

The ambiguous outcomes are predictable, which is what makes this tractable.

Multiple carriers read at once. UHF systems are designed with the capability to detect several data carriers in the field simultaneously, which is a feature in a logistics context and a hazard in a cell where exactly one part should be present. A cell that reads two carriers has to decide which one is the part, and the honest answer is that it does not know.

A carrier read with low confidence. A code partially obscured by coolant, by a witness mark, by a handling mark. The reader returns a result and the result is uncertain, and many systems will return the best guess rather than a failure.

A carrier that reads correctly and belongs to a part that is not where the cell expects. A pallet in the wrong station. A part left in the fixture from the previous cycle.

A read that succeeds after the point of no return. The cell commits to a program before the identity is confirmed, and the confirmation arrives late.

For each of those, the design decision is one of three, and there is no fourth.

Block and require a person. The cell stops and someone resolves it with information the cell does not have.

Resolve from a second source. The cell has a second, independent piece of evidence, and the two together are sufficient. This is the strongest design and the most expensive, and it must be genuinely independent: two reads of the same carrier by two heads on the same channel is not independence.

Proceed with a defined assumption and record it. The cell assumes the most likely identity, acts on it, and records the assumption so that the assumption can be audited. This is acceptable only where the consequence of a wrong assumption is contained, and the containment has to be real rather than asserted.

What is never acceptable is a design that proceeds because the ambiguity was not detected. That is not a decision, it is an absence of one, and it produces the worst outcome: a nonconformance with a clean record.

Herrmann's automation material contains a line that illustrates the value of a defined assumption. It notes that complex automated lines often integrate the ultrasonic process as a self-contained system with its own welding process controller, so that complex welding applications can be performed repeatably. The self-contained controller is a design that contains its own ambiguity: it makes its own decisions and reports its own verdict, rather than deferring to a higher-level system that may not have the information.

There is a useful general principle in that: the closer a decision is made to the information it needs, the fewer unknowns it has to handle. A matching decision made at the fixture, by the device that is holding the part, has less uncertainty than the same decision made at a line controller that knows about the part second-hand.

One caution to attach to that principle. Making decisions locally also makes them invisible, and an invisible decision is hard to audit. So a local decision needs a local record, exported upward, which brings the design back to the requirement that the cell report what it decided and why.

Finally, there is a human ambiguity that no reader can solve and that the design has to acknowledge. A person can be certain the part is variant D and be wrong. The cell's record of what it believed is the only thing that will settle the argument, and it is worth designing the record for that argument rather than for the routine case. Whatever the cell decided, it should be able to say, months later, what evidence it had, what rule it applied, and what it concluded. That is a small requirement and it is the difference between a defensible process and a plausible one.

Accept the Matching Logic with Deliberate Mismatches

The acceptance test for a matching logic is not a successful run. It is a set of failures that were caught.

That inversion is the whole of this section. A cell that runs a hundred correct parts has demonstrated that the logic does not obstruct production. It has not demonstrated that the logic detects anything, and the two are different claims.

So build the acceptance around deliberately introduced mismatches, one at a time, each with a defined expected outcome, run on the actual cell with the actual hardware.

The mismatch set should cover, at minimum, each row of the match matrix in the failing direction.

A wrong part from the same family, correctly coded. Expected outcome: identified, evaluated against the rule, refused. If the cell starts, the compatibility rule is missing or wrong.

A correct part with the wrong program selected. Expected outcome: refused. If the cell starts, the program identity is not part of the condition.

A correct part and program with the wrong fixture insert. Expected outcome: refused. If the cell starts, the tooling match is an inference rather than an independent check.

A correct part and program in the wrong state, for example an unwelded part presented to a station expecting a welded one. Expected outcome: refused. If the cell starts, the state check is nominal.

A part with no readable code. Expected outcome: a defined refusal. If the cell starts, an empty read is satisfying the logic.

Two carriers present at once. Expected outcome: block or resolve from a second source, with the resolution recorded. If the cell picks one silently, the ambiguity handling is absent.

A correct part presented after an interruption, with the cell in an undefined state. Expected outcome: conditions re-established before continuing. If the cell resumes, the restart handling is absent.

For each scenario, record three things: what the cell did, what it reported, and what a person had to do. The third is the one that decides whether the design survives production, because a logic that blocks correctly and gives no diagnostic produces an operator who learns to bypass it.

Then run the same set twice, once with the cell in its normal condition and once in a degraded condition: a dirty lens, a carrier with a scuff, a read head slightly out of alignment, a network delay on the way to the controller. A matching logic that works only when everything is clean is a matching logic that works for the first month.

Two final points, and they are about how this is written down.

The first concerns the boundary this article has already stated and will state again, because it is the one that gets violated in acceptance documents. Nothing in this test set constitutes a safety validation. The scenarios are quality scenarios. If any of them has a safety consequence, that consequence has to be addressed by a safety function with its own design, its own validation, and its own documentation, and the identification logic cannot be counted towards it. A cell that blocks a wrong part because it is the wrong variant has not added a safeguard. It has added a control.

The second concerns what happens after acceptance. A matching logic degrades, because the things it depends on degrade: codes get damaged, carriers fall off, read heads drift, rules become stale, and programs get edited. So the acceptance should produce a maintenance schedule as well as a result, with the specific things that have to be rechecked and the interval at which each is rechecked. A logic validated once and never revisited is a logic whose validation has an expiry date nobody wrote down.

Which is the reason to keep the whole package in one document: the match matrix, the evidence selection, the start conditions, the changeover and restart scenarios, the ambiguity rules, and the mismatch test set. Six sections that only make sense together, because the failure this whole article is about is the failure of a combination, and a combination is exactly what a set of separate documents cannot describe.

The cell ran the wrong program for four hours because nobody had written down what “right” meant for the combination, and afterwards nobody could say why it happened. Both of those gaps have the same fix, and it is not a better reader. It is a record built for the argument you will have eight months from now, in a room with three people who all remember the shift differently, about whether the cell ever checked the combination at all.

Map the part, fixture, tool, and recipe combinations you intend to run. AIsirRobot can help turn that map into supplier questions about identity evidence, start permission, and controlled exceptions.

Contact Us