diff options
Diffstat (limited to 'qolab/hardware')
-rw-r--r-- | qolab/hardware/multimeter/hp_34401.py | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/qolab/hardware/multimeter/hp_34401.py b/qolab/hardware/multimeter/hp_34401.py index ef9c647..36d862c 100644 --- a/qolab/hardware/multimeter/hp_34401.py +++ b/qolab/hardware/multimeter/hp_34401.py @@ -6,11 +6,18 @@ import time class HP_34401(MultimeterSCPI): - """HP 34401 multimeter (same as Agilent)""" - - """ - rm = pyvisa.ResourceManager() - instr=rm.open_resource('ASRL/dev/ttyUSB0::INSTR') + r"""HP 34401 multimeter (same as Agilent 34401) + + Example + ------- + + >>> from qolab.hardware.multimeter.hp_34401 import HP_34401 + >>> rm = pyvisa.ResourceManager() + >>> instr=rm.open_resource('ASRL/dev/ttyUSB0::INSTR') + >>> multimeter = HP_34401(instr) + >>> print("------ Header start -------------") + >>> print(str.join("\n", multimeter.getHeader())) + >>> print("------ Header ends -------------") """ def __init__(self, resource, *args, **kwds): @@ -97,9 +104,11 @@ class HP_34401(MultimeterSCPI): self, desired_function_string, function_internal_name ): """ - Get the reading but first check if we are set to do specific function/measurement. - If the instrument set to do different function, set to desired one - Note: the function name should be in quotes, i.e. '"Volt"' + Get the required reading. + + But first check if the multimeter is set to do specific function/measurement. + If the instrument set to do different function, set to the desired one. + Note: the function name should be in quotes, i.e. "Volt". """ if not self.isSensing(function_internal_name): self.rawFunction = desired_function_string |