Closed Jasper-Harvey0 closed 1 year ago
I am still hunting some issues where the DMM will crash after being given a bad command, requiring a power cycle.
Also, @Jasper-Harvey0, can you please update the release notes before you put the PR back to open?
I have made a few updates to the drivers to help remove direct writes to the instruments in some test scripts.
Main change is functions for manual triggering of the DMM. Typical test scripts that use manual triggering look something like:
dmm._write("TRIG:SOUR BUS") # set DMM to remote trigger
dmm._write(f"TRIG:COUN {sample_count}") # set amount of tigger counts
time.sleep(1)
dmm._write("INIT") # Arm DMM for next measurement
for trig in range(0, sample_count): # loop manually to collect samples and step voltage
dmm._write("*TRG") # trigger DMM measurement
if trig == 5: # voltage step change part way through loop
# Do stuff
pass
samples = dmm.instrument.query_ascii_values("FETCH?") # retrieve measurements from DMM
This now looks like the following:
dmm.set_manual_trigger(samples=1) # Set to manual trigger mode. 1 sample per trigger event
for trig in range(0, sample_count):
dmm.trigger()
if trig == 5:
# Do stuff
pass
samples = dmm.measurements() # Collect measurements from buffer
@jcollins1983 Can we get this merged?
@Jasper-Harvey0, you will need to resolve the conflict on the releae notes now.
I have the driver for the new DMM working. Cleaned up some unused code in the Fluke driver too