Commit 1704c3ba authored by Peter Jansweijer's avatar Peter Jansweijer

added forgotten "INP2:LEVEL:AUTO OFF" and some Gate settings

parent a51a5596
......@@ -55,6 +55,25 @@ def get_time_interval(freq_cnt, num_meas=1):
file_header += "#measurements:\n"
meas_data = []
for measurement in range(num_meas):
measurement = freq_cnt.ask("READ?")
meas_data.append(measurement+"\n")
......@@ -143,18 +162,24 @@ if __name__ == "__main__":
if len(sys.argv) >= 2: # just IP number
freq_cnt = vxi11.Instrument(sys.argv[1])
#freq_cnt = vxi11.Instrument("192.168.32.251")
# Put the device in a known state
freq_cnt.write("*RST")
freq_cnt.write("*CLS")
print(freq_cnt.ask("*IDN?"))
# Returns 'Agilent Technologies,53230A,MY50001484,02.05-1519.666-1.19-4.15-127-155-35'
if len(sys.argv) >= 3: # There are more arguments...
num_meas = int(sys.argv[2].split('=')[1])
print ("num_meas", num_meas)
# Put the device in a known state
freq_cnt.write("*RST")
# Setup Time Interval measurment from channel 1 -> 2
freq_cnt.write("CONFigure:TINTerval (@1),(@2)")
freq_cnt.write("SENSe:GATE:STARt:DELAy:SOURce IMMediate")
freq_cnt.write("SENSE:TINTerval:GATE:SOURce IMMediate")
freq_cnt.write("SENSE:TINTerval:GATE:POLarity POSitive")
# Use external 10MHz reference
freq_cnt.write("ROSCillator:SOURce EXTernal")
......@@ -185,6 +210,7 @@ if __name__ == "__main__":
freq_cnt.write("INP2:COUP DC")
freq_cnt.write("INP2:RANGE 5")
freq_cnt.write("INP2:SLOPE POS")
freq_cnt.write("INP2:LEVEL:AUTO OFF")
# A fixed trigger level is important for proper timing measurement
# MiniCircuits Splitters ZFRSC-123+ have ~ 6 + 3,75 dB attenuation (~ factor 3).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment