Author Topic: HP 5316A/B python driver  (Read 692 times)

0 Members and 1 Guest are viewing this topic.

Offline justanothernameTopic starter

  • Regular Contributor
  • *
  • Posts: 143
  • Country: at
HP 5316A/B python driver
« on: January 01, 2021, 10:22:34 pm »
Here is a litte python driver for the HP5316A counter I wrote.
I hope it works haven't tested througly yet.
usage example:

Code: [Select]
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


« Last Edit: January 01, 2021, 10:36:02 pm by justanothername »
 
The following users thanked this post: colorado.rob


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf