How to Optimize Test Stations with TofuPilot
Test station cycle time directly limits production throughput. A 60-second test on two stations means 120 units per hour. Cut that to 45 seconds and you're at 160 without adding hardware. This guide covers how to find bottlenecks, reduce cycle time, and track station performance with TofuPilot.
Where Time Goes
A typical test station cycle breaks down into:
| Phase | Typical Share | Example |
|---|---|---|
| Fixture load/unload | 20-30% | Operator places DUT, closes clamp |
| Instrument settling | 10-20% | DMM auto-range, power supply ramp |
| Measurement acquisition | 30-40% | Read voltage, current, frequency |
| Data logging and reporting | 5-10% | Write results to database |
| Idle/wait | 5-15% | Operator between units |
The biggest gains usually come from instrument settling and measurement acquisition, not from faster code.
Step 1: Measure Your Baseline
You can't optimize what you don't measure. OpenHTF records the duration of every phase automatically. TofuPilot displays these timings in the test step performance view.
import openhtf as htf
from openhtf.util import units
@htf.measures(
htf.Measurement("supply_voltage_V")
.in_range(minimum=4.9, maximum=5.1)
.with_units(units.VOLT),
)
def phase_power_check(test):
"""Measure supply voltage after power-up."""
test.measurements.supply_voltage_V = 5.01
@htf.measures(
htf.Measurement("signal_amplitude_V")
.in_range(minimum=1.8, maximum=2.2)
.with_units(units.VOLT),
)
def phase_signal_check(test):
"""Measure signal output amplitude."""
test.measurements.signal_amplitude_V = 2.01
@htf.measures(
htf.Measurement("self_test_result").equals("PASS"),
)
def phase_firmware_self_test(test):
"""Run firmware self-test and check result."""
test.measurements.self_test_result = "PASS"Run this on 50 units and review the phase durations in TofuPilot. The longest phase is your bottleneck.
Step 2: Reduce Instrument Settling Time
Instrument settling is often the hidden time sink. Auto-ranging, input impedance switching, and filter settling add hundreds of milliseconds per measurement.
| Optimization | Time Saved | How |
|---|---|---|
| Fixed range instead of auto-range | 100-500ms per reading | Set range in SCPI before measuring |
| Reduce integration time (NPLC) | 50-200ms per reading | Lower NPLC from 10 to 1 (trades accuracy) |
| Minimize channel switching | 50-100ms per switch | Group measurements by channel |
| Parallel instrument commands | Varies | Send setup commands while another instrument reads |
Only reduce accuracy where the measurement margin allows it. If your limit is 4.9V to 5.1V and units read 5.0V with 1mV spread, you have room to reduce NPLC.
Step 3: Optimize Test Sequence
Phase order matters. Put the fastest-failing tests first to reduce average cycle time on bad units.
| Strategy | Effect |
|---|---|
| Fail-fast ordering | Tests that catch 80% of defects run first |
| Power-up checks before functional | Catch dead boards before slow tests |
| Skip downstream phases on failure | Don't test analog if power-up failed |
from openhtf import PhaseResult
@htf.measures(
htf.Measurement("power_good").equals("PASS"),
)
def phase_power_good(test):
"""Quick power check. If this fails, skip everything else."""
result = "PASS"
test.measurements.power_good = result
if result != "PASS":
return PhaseResult.STOPStep 4: Track Station Performance
Connect the test to TofuPilot and monitor station-level metrics over time.
from tofupilot.openhtf import TofuPilot
test = htf.Test(
phase_power_good,
phase_power_check,
phase_signal_check,
phase_firmware_self_test,
)
with TofuPilot(test):
test.execute(test_start=lambda: input("Scan serial: "))TofuPilot tracks station performance automatically. Open the Analytics tab to see:
- Throughput per station (units per hour)
- Phase duration breakdown showing where time is spent
- Yield per station to catch fixture or equipment issues
- Station comparison to identify underperforming stations
Optimization Checklist
| Check | Action |
|---|---|
| Longest phase identified | Review in TofuPilot step performance |
| Auto-range disabled where possible | Set fixed range via SCPI |
| NPLC reduced where margin allows | Check measurement distributions |
| Fail-fast order implemented | Move high-failure phases earlier |
| Phase skip on critical failure | Return PhaseResult.STOP |
| Fixture load time measured | Time the operator, not just the code |
Station optimization is iterative. Make one change, measure the effect in TofuPilot, then move to the next bottleneck. Small gains compound: five 10% improvements give you a 40% faster station.