driver: power: siglent: make the measured power reading optional#2
Open
Thomas-Vreys wants to merge 1 commit into
Open
driver: power: siglent: make the measured power reading optional#2Thomas-Vreys wants to merge 1 commit into
Thomas-Vreys wants to merge 1 commit into
Conversation
Thomas-Vreys
force-pushed
the
siglent-extension
branch
from
July 22, 2026 09:59
478dfe6 to
e13cf96
Compare
Not every SPD model implements MEAS:POWE?. Such a model leaves the query unanswered, so the read times out and pyvisa raises VisaIOError. Tested on Siglent SPD1305X model by querying watts from non-existend channel "MEAS:POWE? CH9" Add tests in labgrid for both failure modes: an unanswered query and a non-numeric reply. This work was sponsored by OIP Sensor Systems. Signed-off-by: Thomas Vreys <thomas.vreys999@gmail.com>
Thomas-Vreys
force-pushed
the
siglent-extension
branch
from
July 22, 2026 10:03
e13cf96 to
c5f1aea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a reply on your previous message:
Watts: verified on my SPD1305X,
MEAS:POWE? CH1is answered normally.For the unsupported case I have no model that lacks it, so I forced the
same path with queries the firmware does not implement (
MEAS:NOPE?, andMEAS:POWE? CH9on a non-existent channel): the PSU queues-113,Undefined headerand never answers, so pyvisa raisesVisaIOErroron timeout. On your PSU,
MEAS:POWE? CH1should hit exactly that — adirect check on hardware that really lacks the command.
Power protocol: no change needed.
ProgrammablePowerProtocolalreadydeclares
show/voltage/ampsfrom your commit, andwattsis just anextra key in the dict
show()returns.Tests: "Voltage and Current but no Power" was indeed not covered —
test_siglent_showmocksMEAS:POWE?, so that path never ran. Added atest for it, parametrized over both failure modes (unanswered query,
non-numeric reply), asserting
wattsis None and the other readingssurvive.
There is another thing that needs to be done:
siglentis the only power backend implementingpower_show/power_voltage/power_amps, yetNetworkPowerDriver.show()calls
self.backend.power_show()unconditionally, sopower showagainste.g. gude raises a raw
AttributeError(same forpower config). This is the method you added.