A long-running cell test can fit a cycler during its routine steps but exceed the configured current limit during a short performance check. A small preflight script can catch that mismatch before a plan reaches the bench.
This is an offline example using synthetic inputs. It does not talk to a cycler or decide whether a current is safe for any cell.
Define the steps
Use the nominal capacity in amp-hours (Ah) and the signed C-rate for each step. In this example a negative C-rate denotes discharge. The current capacity check uses the absolute value, so a discharge is checked even if it has a negative sign. Confirm the sign convention if you are importing a real file.
| Step | Capacity | C-rate | Current magnitude |
|---|---|---|---|
| charge | 10 Ah | 1C | 10 A |
| discharge | 10 Ah | -2C | 20 A |
| performance pulse | 12 Ah | 2C | 24 A |
Run the check in Python
Save the code as preflight.py and run python preflight.py. It uses only the standard library. The strings keep decimal input exact when comparing a value with a configured boundary.
from decimal import Decimal def over_limit(steps, max_amps): limit = Decimal(max_amps) flagged = [] for name, capacity_ah, signed_c_rate in steps: amps = Decimal(capacity_ah) * abs(Decimal(signed_c_rate)) if amps > limit: flagged.append((name, amps)) return flagged steps = [ ("charge", "10", "1"), ("discharge", "10", "-2"), ("performance pulse", "12", "2"), ] for name, amps in over_limit(steps, "20"): print(f"{name}: {amps} A exceeds the configured 20 A limit") The example prints performance pulse: 24 A exceeds the configured 20 A limit. The discharge step equals the limit and is not flagged. If your lab requires operating headroom, enter its lower approved planning threshold instead of the channel's maximum.
What to check when importing real plans
Document whether the capacity column is in Ah or mAh. Validate that each row has a positive capacity and a finite rate. Use separate limits if the equipment specifies different charge and discharge capability. Include the test plan revision in the report, and keep the output beside the approved test procedure.
Current is one equipment-planning check. Review voltage limits, duration, temperature, protections and the selected measurement range separately. NEWARE's technical note on cycler current ranges explains why the smallest useful current and percent-of-full-scale accuracy also matter. The code and sample are independent of any particular make or model.
AI disclosure: This tutorial and its synthetic example were generated with AI. The example's expected result was checked locally.

