On the panel, accepted and rejected totals can look plausible while the reject gate diverts the wrong assembly. Start here: store one inspection result per first-sensor event with FFL, then remove the oldest result at the second sensor with FFU. This works while parts reach the second sensor in the same order and every physical arrival creates exactly one PLC event. If operators can insert or remove parts, or assemblies can change order, add identity or distance tracking—or move rejection next to inspection.
Read the symptoms before changing logic
Watch the physical assemblies and the PLC sequence together. The important question is not whether the reject output energizes. Ask whether the record removed from the queue belongs to the assembly at the second sensor.
| Symptom | Likely cause |
|---|---|
| Every decision is shifted by one assembly | The first or second sensor missed an event, generated two events, or the queue was initialized with the wrong contents. |
| Tracking fails after an operator removes a part | The PLC still holds a record for a physical assembly that is no longer present. |
| Tracking fails after an assembly is inserted between sensors | The second sensor receives a part that never created an upstream queue entry. |
| Results remain correct through a conveyor stop | The event order and physical order remained unchanged; elapsed time does not affect an event-driven FIFO. |
| Errors appear when parts slip, overtake, or change lanes | A simple FIFO no longer represents the physical sequence. |
| Rejects are correct only for long runs of identical results | Accepted and rejected counters are tracking quantities, not the exact order of mixed assemblies. |
Check sensor event counts first. One assembly passing each station must produce one false-to-true transition at that station. Rewriting reject timing, adding delays, or changing counter presets wastes time when the queue has already lost synchronization.
Understand what the FIFO preserves
FFL and FFU operate as a pair. On successive false-to-true transitions, FFL places inspection records into a user-created FIFO stack. FFU removes those records in the same order.
The record can be as small as an accepted/incomplete code. It can also contain a part number and assembly code when the selected controller supports the required data representation. The tracking mechanism depends on order, not the time between sensors.
First sensor rising edge:
FFL(load the inspection result into the FIFO)
Second sensor rising edge:
FFU(remove the oldest inspection result)
accepted result -> accept assembly
incomplete result -> reject assembly
Three or four assemblies between the sensors means several records can be outstanding simultaneously. Size the FIFO for the maximum number that can exist after upstream inspection but before downstream removal. Do not blindly use a length of four: count assemblies at both sensor boundaries and any accumulation that can occur during stopping or blocking.
Choose the tracking method that matches movement
- Use a FIFO when both sensors see the same assemblies in the same sequence. Conveyor speed changes and ordinary stops do not break the association.
- Use a shift register driven by conveyor travel pulses when the decision must follow physical distance. Select the pulse interval from the required position accuracy, then shift the stored inspection data once per one-shot travel pulse.
- Add barcode or RF identification when assemblies can be inserted, removed, rerouted, or reordered. Match the inspection record to identity instead of assuming sequence.
- Move the reject operation next to the inspection sensor when no process must occur between inspection and rejection. This removes the tracking interval and its desynchronization modes.
A contiguous integer-file shift register is another implementation. A travel pulse copies the current table into a buffer, then copies the buffered records one position forward. The example addresses N12:0 through N12:10 and buffer N13:0 through N13:10 illustrate that pattern, but use them only if they are free and valid in the selected controller.
Program the FIFO procedure
- Confirm that the selected Allen-Bradley PLC supports
FFLandFFU. Use that PLC's instruction help for its required file and control operands. - Define one inspection record per assembly. At minimum, distinguish accepted from incomplete; do not combine consecutive assemblies into accepted and rejected totals.
- Convert the first sensor into one clean false-to-true event. Load the completed inspection result once with
FFL. Do not execute a new load on every scan while the sensor remains on. - Convert the second sensor into one clean false-to-true event. Execute
FFUonce and use the unloaded oldest result to select accept or reject. - Block normal tracking if a downstream event occurs while the FIFO is empty. That condition means the physical conveyor and stored records disagree.
- Prevent another load when the FIFO has no free capacity. Stop admitting assemblies or stop the controlled conveyor sequence rather than overwriting an unprocessed record.
- Define startup and recovery. The simplest startup requires no assemblies between the sensors and an empty FIFO. If assemblies remain in the zone, reconcile each physical assembly with its inspection result before automatic operation.
- Provide a controlled operator recovery function through the HMI or operator station. Restrict it to clearing or correcting tracking data after the physical zone has been checked.
If the reject actuator sits beyond the second sensor, the unloaded result still must travel to the actuator position. Treat that location as another tracked event or use conveyor travel pulses; a timer alone cannot correct for variable speed or unplanned stops.
Verify the physical-to-data sequence
- Empty the tracking zone and clear the FIFO using the defined initialization procedure.
- Run a known mixed pattern, such as accepted, incomplete, accepted, incomplete. Record the upstream inspection decision for each assembly.
- Confirm that every first-sensor transition adds exactly one record and every second-sensor transition removes exactly one record.
- Compare each unloaded record with the assembly physically at the second sensor. Confirm that only the incomplete assemblies receive the reject command.
- Stop and restart the conveyor with several assemblies between sensors. The queue order must remain unchanged.
- Test a controlled downstream blockage. A jam that preserves order must not change the decisions after movement resumes.
- Exercise the defined missing-part recovery procedure. The system must stop or request reconciliation rather than silently shifting every later decision.
Trend or display the current queue occupancy, both sensor event counts, the last loaded result, and the last unloaded result. These observations separate a bad inspection decision from a tracking error without changing the production logic.
Avoid recurring tracking failures
- Do not clear the FIFO merely because the conveyor stops. Clear it only when the physical zone is empty or has been reconciled.
- Do not permit manual insertion or removal between sensors during automatic tracking. If production requires it, use positive part identification or a deliberate reconciliation workflow.
- Do not use accepted and rejected countdown counters for arbitrary mixed sequences. Two totals cannot preserve order such as accepted, rejected, accepted, rejected.
- Do not drive a distance-based shift register from the upstream part sensor. Drive it from a conveyor travel pulse and apply a one-shot so one pulse creates one shift.
- Do not ignore intermittent sensor detection. A missed or duplicate transition offsets every later FIFO association until recovery.
- Do not assume a simple FIFO works across merging lanes, overtaking, recirculation, or branching routes. Track identity and route state in those layouts.
FAQ
What happens if an operator removes a part between the sensors?
The FIFO retains that part's record, so the second sensor applies it to the following assembly. Stop tracking, inspect the entire zone, and reconcile or clear the queue before restarting.
What happens if either conveyor sensor misses one assembly?
A missed first-sensor event causes a downstream FIFO-empty condition or a shifted decision. A missed second-sensor event leaves an extra record in the queue and also shifts later decisions.
When should I stop troubleshooting and escalate?
Stop when sensor event counts are correct but FFL/FFU status, file behavior, or instruction execution still differs from the selected PLC's instruction help. Record the controller model, program state, FIFO configuration, sensor transitions, and observed unloaded values, then escalate through the official Allen-Bradley support channel.