Add plot-sweep command, degauss buttons, sweep ramp-down, and time estimate
- Add offline `plot-sweep` CLI command: generates efficiency overlay, heatmap, and power loss plots from sweep CSV (no instruments needed) - Add degauss buttons to CH5/CH6 in GUI (sends :DEMAg SCPI command) - Gradual load ramp-down at end of 2D sweep to avoid transients - Live sweep time estimate in GUI based on grid size × settle time - Update HIOKI submodule to include degauss CLI command Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -739,10 +739,26 @@ class MPPTTestbench:
|
||||
v += v_step
|
||||
|
||||
finally:
|
||||
# Ramp load down gradually to avoid sudden transients
|
||||
cur_load = ll - l_step if n > 0 else l_start
|
||||
ramp_steps = max(int(abs(cur_load - l_start) / abs(l_step)), 1) if l_step != 0 else 1
|
||||
ramp_steps = min(ramp_steps, 10) # cap at 10 steps
|
||||
if abs(cur_load) > abs(l_start) and ramp_steps > 1:
|
||||
decrement = (cur_load - l_start) / ramp_steps
|
||||
print(f"\n Ramping load down from {cur_load:.1f} to "
|
||||
f"{l_start:.1f}{unit} in {ramp_steps} steps...")
|
||||
for i in range(1, ramp_steps + 1):
|
||||
step_val = cur_load - decrement * i
|
||||
self._apply_load_value(load_mode, step_val)
|
||||
time.sleep(0.5)
|
||||
else:
|
||||
self._apply_load_value(load_mode, l_start)
|
||||
time.sleep(0.5)
|
||||
|
||||
self.load.load_off()
|
||||
self.supply.set_voltage(IDLE_VOLTAGE)
|
||||
print(
|
||||
f"\n Load OFF. Supply returning to {IDLE_VOLTAGE:.0f}V "
|
||||
f" Load OFF. Supply returning to {IDLE_VOLTAGE:.0f}V "
|
||||
f"(output stays ON)"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user