1.8 KiB
1.8 KiB
Test Procedure — v0.2.2 Issue #10 Sweep fallback timing
Purpose
Verify that sweep fallback no longer depends on an immediate SYST:ERR? after the first SWWV write.
The new logic should do this sequence:
*CLS- send first sweep command
- wait on
*OPC? - then read
SYST:ERR? - only if needed, retry with
SPAC
Test files
SDG2042X_V0.2.2.pytest_v0.2.2_Issue_10_sweep_fallback.py
Preconditions
- SDG reachable via LAN on port
5025 - No other program connected to the instrument
- Output load/test setup safe for a short sweep test
Command
Example:
python3 test_v0.2.2_Issue_10_sweep_fallback.py --ip 192.168.178.50 --channel C1
Optional custom values:
python3 test_v0.2.2_Issue_10_sweep_fallback.py \
--ip 192.168.178.50 \
--channel C1 \
--start 1000 \
--stop 5000 \
--time 1.0 \
--type LIN
What the script checks
- Socket connection and
*IDN? - Safe baseline setup (
BSWVto sine) - Direct one-form check for:
WAV,...SPAC,...
- Production-like bug #10 helper
- Stale-error immunity:
- inject old error
- run helper again
- helper must still succeed because it starts with
*CLS
Pass criteria
critical tests passed: True- exit code
0 - no final
[ERR]style failures from the script
Interpretation
- If only one of the direct forms works, that is acceptable. The important point is that the production-like helper succeeds.
- If the stale-error test fails, the error-clear / sync sequence is still not robust enough.
- If both direct forms fail, then bug #10 may be masked by a larger sweep syntax compatibility issue.
Notes
This test script intentionally mirrors the current GUI sweep token style (WAV, STAR) so it checks the real regression path for Issue #10, not a separate protocol cleanup.