Here is a litte python driver for the HP5316A counter I wrote.
I hope it works haven't tested througly yet.
usage example:
from HP5316x import HP5316X
instrument = HP5316X("GPIB1::20::INSTR")
instrument.measmode = instrument.MeasModes.PERIOD_A
instrument.gatemode = instrument.GateModes.LONG_FRONT
instrument.triggerlevelmode = instrument.TriggerLevelModes.SET_LEVEL
instrument.timeout = 10
instrument.triggerlevel_a = 0.01
instrument.triggerslope_a = instrument.TriggerSlopes.POSITIVE
meas = instrument.get_measurement()
if meas is not None:
print("raw answer: " + meas.raw)
print("value: " + str(meas.value))
print("unit: " + meas.unit)
print("overflow: " + str(meas.overflow))
del instrument