WaveBench v0.4.2
WaveBench v0.4.2 Release Notes / 发布说明
中文
WaveBench v0.4.2 是一个保守的小版本,重点是给已经接入的信号源、电源和 run plan 增加第一层软件安全上限,并改善 PyVISA 通信失败时的命令行错误呈现。
新增
- 新增
[safety_limits]配置区:max_source_vpp:限制信号源 Vpp 写操作。max_power_voltage_v:限制电源设定电压。max_power_current_limit_a:限制电源限流值。
source set-vpp、source arb-load、power set会在写仪器前检查安全上限。run plan会在创建 run 目录和连接仪器前静态检查 run plan 中的 source/power 超限步骤。run check与run verify也会结合当前配置检查安全上限;通过时run check输出safety_limits=ok / 安全上限=通过。source output on与power output on会先读取当前设定值;如果当前幅度、电压或限流超出配置上限,则拒绝打开输出。
修复
- PyVISA 的 query/write/binary query/
*OPC?失败现在会包装为 WaveBench 的用户可读错误,不再泄露 Python traceback。
验证
- 本地测试:
171 passed。 - GitHub CI:Python 3.11 / 3.12 均通过。
- 保守验证:
- 使用不存在的 VISA resource 验证超限路径先返回安全错误,没有进入连接仪器。
- 使用实际 DG4202 CH2 验证:当当前 CH2 为 5 Vpp,而
max_source_vpp = 2.0时,source output on会在写输出前拒绝,并保持设备状态不变。 - 验证低于安全上限时不会被误拦截;后续 I/O timeout 会被包装成
wavebench:用户错误。
English
WaveBench v0.4.2 is a conservative patch release focused on adding first-layer software safety limits for the existing source, power, and run-plan paths, plus cleaner CLI errors for PyVISA communication failures.
Added
- Added the
[safety_limits]config table:max_source_vpp: caps signal-generator Vpp write operations.max_power_voltage_v: caps power-supply voltage setpoints.max_power_current_limit_a: caps power-supply current-limit setpoints.
source set-vpp,source arb-load, andpower setnow check safety limits before instrument writes.run plannow statically checks source/power limit violations before creating a run directory or connecting to instruments.run checkandrun verifyalso apply the configured safety limits; successfulrun checkprintssafety_limits=ok / 安全上限=通过.source output onandpower output onread current setpoints first; if the current amplitude, voltage, or current limit exceeds the configured limits, WaveBench refuses to enable output.
Fixed
- PyVISA query/write/binary-query/
*OPC?failures are now wrapped as user-readable WaveBench errors instead of leaking Python tracebacks.
Validation
- Local tests:
171 passed. - GitHub CI: Python 3.11 / 3.12 passed.
- Conservative validation:
- Verified with intentionally nonexistent VISA resources that over-limit paths return safety errors before instrument connection.
- Verified against a real DG4202 CH2: with CH2 currently at 5 Vpp and
max_source_vpp = 2.0,source output onis rejected before writing output state, leaving the instrument unchanged. - Verified that under-limit paths are not falsely blocked; subsequent I/O timeouts are wrapped as
wavebench:user errors.