inspy.instrument.digitalmultimeter
Digital Multimeter Interfaces.
- class inspy.instrument.digitalmultimeter.DmmAgilent34410A(visa_address=None, transport=None)[source]
Bases:
DmmKeysight344xxAAgilent 34410A digital multimeter class. Untested.
Based on Keysight 344xxA class.
Inherits all methods from the DmmKeysight34465A class, and adds none.
- auto_log_level: int = 20
The log level used for automatic logging of method calls.
To disable logging set to logging.NOTSET.
- await_completion()
Wait for the instrument to complete the current operation.
- Return type:
None
- connect()
Connect to instrument using the transport layer.
- Return type:
None
- disconnect()
- Return type:
None
- get_averaging_time()
Get the integration time in seconds.
- Return type:
float- Returns:
Integration time in seconds.
- get_averaging_time_NPLC()
Get the integration time in number of power line cycles.
The length of a power line cycle for 50 Hz AC is 20ms, integrating the DC signal over a number of powerline cycles >1 helps reject power line induced AC noise.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :rtype:
float:returns: Integration time in number of power line cycles.
- get_errors()
Get a list of errors and error numbers from the instrument.
- Return type:
list[tuple[int,str]]- Returns:
A list where each value is a tuple of the error number and error description
- get_id()
Identification Query.
- Return type:
str- Returns:
Instrument Identification String.
- get_measure_frequency_bandwidth()
Get the AC filter configuration for frequency and period measurements.
- Return type:
float
- get_measurement_range()
Get the fixed measurement range.
Applies to the active trace function from get_sampling_measurement_mode().
- Return type:
float- Returns:
Measurement range.
- get_measurement_range_auto()
Get autorange status.
- Return type:
bool- Returns:
Autorange status boolean.
- get_measuring_status()
Get the ‘Measuring’ bit from the Standard Operation Register.
Indicates if the instrument is currently sampling.
- Return type:
bool- Returns:
Bit status boolean.
- get_sample_interval()
Get the sample interval setting for timed sampling.
The sampling interval is the time between samples.
- Return type:
float- Returns:
Sample interval setting in seconds.
- get_sample_interval_min()
Determine the recommended interval for the current measurement configuration.
- Return type:
float- Returns:
Minimum sample interval for current configuration in seconds.
- get_sample_points()
Get the number of samples points setting.
- Return type:
int- Returns:
Sample number setting.
- get_samples(polling_cycle=0.5)
Wait for measurements to complete and returns all measurements.
Polls the device to get trigger state and measuring status.
- Parameters:
polling_cycle (
float) – Set polling_cycle in seconds.- Return type:
list[float]- Returns:
List of samples.
- get_sampling_measurement_mode()
Get the current function or measurement mode that is set for sampling.
- Return type:
str- Returns:
The current function as a string (e.g.
VOLT:AC)
- get_trigger_delay()
Get trigger delay.
- Return type:
float- Returns:
Trigger delay setting.
- get_trigger_source()
Get trigger source setting.
- Return type:
str- Returns:
Current trigger source.
- get_wait_for_trigger_status()
Get the ‘Waiting for trigger’ bit from the Standard Operation Register.
- Return type:
bool- Returns:
Bit status boolean.
- is_connected: bool
- logger: logging.Logger
- measure_capacitance()
Get the capacitance.
- Return type:
float
- measure_continuity()
Get continutiy boolean.
- Return type:
bool
- measure_current()
Get the measured output DC current.
- Return type:
float
- measure_current_ac()
Get the measured output AC current.
- Return type:
float
- measure_diode_bias()
Get the forward/reverse bias voltage of the diode.
- Return type:
float
- measure_frequency()
Get the frequency.
Timeout if frequency is too low. Specify the lowest frequency you expect to encounter with set_frequency_bandwidth(). May take up to 10s for low frequencies.
- Return type:
float
- measure_period()
Get the period.
Timeout if period is too high. Specify the lowest frequency you expect to encounter with set_frequency_bandwidth(). May take up to 10s for low frequencies.
- Return type:
float
- measure_resistance()
Get the measured resistance.
- Return type:
float
- measure_resistance_four_wire()
Get the measured four wire resistance.
- Return type:
float
- measure_temperature()
Get the measured temperature.
- Return type:
float
- measure_voltage()
Get the measured output DC voltage.
- Return type:
float
- measure_voltage_ac()
Get the measured output AC voltage.
- Return type:
float
- reset()
Reset instrument to factory default state, including clearing status.
- Return type:
None
- set_averaging_time(averaging_time=0.1)
Set the integration time in seconds.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :type averaging_time:
float:param averaging_time: Integration time in seconds.- Return type:
None
- set_averaging_time_NPLC(averaging_time=10)
Set the integration time in number of power line cycles.
The length of a power line cycle for 50 Hz AC is 20ms, integrating the DC signal over an number of powerline cycles >1 helps reject power line induced AC noise.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :type averaging_time:
float:param averaging_time: Integration time in number of cycles.- Return type:
None
- set_measure_frequency_bandwidth(bandwidth)
Set the AC bandwidth for frequency and period measurements.
The instrument selects the slow (3 Hz), medium (20 Hz) or fast (200 Hz) filter based on the cutoff frequency specified. Specify the lowest frequency you expect to encounter.
- Return type:
None
- set_measurement_range(measurement_range)
Set a fixed measurement range.
Applies to the active trace function from get_sampling_measurement_mode().
- Parameters:
measurement_range (
float|None) – Measurement range to set. If measurement_range is not provided then the default DMM measurement_range is used.- Return type:
None
- set_measurement_range_auto(enable=True)
Set autoranging for measurements.
- Parameters:
enable (
bool) – on/off boolean.- Return type:
None
- set_sample_interval(sample_interval=1)
Set the sample interval for timed sampling.
- Parameters:
sample_interval (
float) – Time between samples in seconds.- Return type:
None
- set_sample_interval_min()
Set the recommended interval for the current measurement configuration.
- Return type:
None
- set_sample_points(sample_points=5)
Set the number of samples for a ‘trace’ acquisition.
- Parameters:
sample_points (
int) – Number of samples.- Return type:
None
- set_sampling_measurement_mode(function='VOLT')
Set the function or measurement mode to be sampled.
Supports measurement modes:
VOLT,VOLT:AC,CURR,CURR:AC,RES,FRES,TEMP,FREQ,PER,DIOD,CONT,CAP- Parameters:
function (
str) – The measurement function to be configured for sampling.- Return type:
None
- set_trigger_bus()
Set trigger source to BUS.
Triggers when a trigger command (*TRG/trigger_now()) is sent over a remote interface.
- Return type:
None
- set_trigger_delay(trigger_delay=1)
Set trigger delay setting.
Delay after trigger before measurement(s) start. Used to allow input to settle before taking measurements.
- Parameters:
trigger_delay (
float) – Trigger delay setting in seconds.- Return type:
None
- set_trigger_external(pos_edge=True)
Set trigger source to external.
Triggers on external positive/negative edge.
- Parameters:
pos_edge (
bool) – True for positive edge triggering, False for negative.- Return type:
None
- set_trigger_immediate()
Set trigger source to immediate.
Triggers as soon as set_wait_for_trigger() is called.
- Return type:
None
- set_trigger_internal_level(trigger_level, pos_edge=True)
Set trigger source to internal.
Triggers when a DMM measurement exceeds a specified trigger_level. Can be configured for positive/negative edge triggering.
- Parameters:
trigger_level (
float) – Trigger level.pos_edge (
bool) – True for positive edge triggering, False for negative.
- Return type:
None
- set_wait_for_trigger()
Set the instrument into a wait-for-trigger state.
After setting the sample count, source, etc. you must place the meter in the “wait-for-trigger” state. A trigger is not accepted from the selected trigger source until the instrument is in the “wait-for-trigger” state.
- Return type:
None
- transport: PyVisaTransport
- trigger_now()
Send trigger (*TRG) command.
Used when the trigger source is set to BUS with set_trigger_bus().
- Return type:
None
- class inspy.instrument.digitalmultimeter.DmmKeysight34461A(visa_address=None, transport=None)[source]
Bases:
DmmKeysight344xxAKeysight 34461A Digital Multimeter Class.
Inherits all methods from the DmmKeysight34465A class, and adds none.
- auto_log_level: int = 20
The log level used for automatic logging of method calls.
To disable logging set to logging.NOTSET.
- await_completion()
Wait for the instrument to complete the current operation.
- Return type:
None
- connect()
Connect to instrument using the transport layer.
- Return type:
None
- disconnect()
- Return type:
None
- get_averaging_time()
Get the integration time in seconds.
- Return type:
float- Returns:
Integration time in seconds.
- get_averaging_time_NPLC()
Get the integration time in number of power line cycles.
The length of a power line cycle for 50 Hz AC is 20ms, integrating the DC signal over a number of powerline cycles >1 helps reject power line induced AC noise.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :rtype:
float:returns: Integration time in number of power line cycles.
- get_errors()
Get a list of errors and error numbers from the instrument.
- Return type:
list[tuple[int,str]]- Returns:
A list where each value is a tuple of the error number and error description
- get_id()
Identification Query.
- Return type:
str- Returns:
Instrument Identification String.
- get_measure_frequency_bandwidth()
Get the AC filter configuration for frequency and period measurements.
- Return type:
float
- get_measurement_range()
Get the fixed measurement range.
Applies to the active trace function from get_sampling_measurement_mode().
- Return type:
float- Returns:
Measurement range.
- get_measurement_range_auto()
Get autorange status.
- Return type:
bool- Returns:
Autorange status boolean.
- get_measuring_status()
Get the ‘Measuring’ bit from the Standard Operation Register.
Indicates if the instrument is currently sampling.
- Return type:
bool- Returns:
Bit status boolean.
- get_sample_interval()
Get the sample interval setting for timed sampling.
The sampling interval is the time between samples.
- Return type:
float- Returns:
Sample interval setting in seconds.
- get_sample_interval_min()
Determine the recommended interval for the current measurement configuration.
- Return type:
float- Returns:
Minimum sample interval for current configuration in seconds.
- get_sample_points()
Get the number of samples points setting.
- Return type:
int- Returns:
Sample number setting.
- get_samples(polling_cycle=0.5)
Wait for measurements to complete and returns all measurements.
Polls the device to get trigger state and measuring status.
- Parameters:
polling_cycle (
float) – Set polling_cycle in seconds.- Return type:
list[float]- Returns:
List of samples.
- get_sampling_measurement_mode()
Get the current function or measurement mode that is set for sampling.
- Return type:
str- Returns:
The current function as a string (e.g.
VOLT:AC)
- get_trigger_delay()
Get trigger delay.
- Return type:
float- Returns:
Trigger delay setting.
- get_trigger_source()
Get trigger source setting.
- Return type:
str- Returns:
Current trigger source.
- get_wait_for_trigger_status()
Get the ‘Waiting for trigger’ bit from the Standard Operation Register.
- Return type:
bool- Returns:
Bit status boolean.
- is_connected: bool
- logger: logging.Logger
- measure_capacitance()
Get the capacitance.
- Return type:
float
- measure_continuity()
Get continutiy boolean.
- Return type:
bool
- measure_current()
Get the measured output DC current.
- Return type:
float
- measure_current_ac()
Get the measured output AC current.
- Return type:
float
- measure_diode_bias()
Get the forward/reverse bias voltage of the diode.
- Return type:
float
- measure_frequency()
Get the frequency.
Timeout if frequency is too low. Specify the lowest frequency you expect to encounter with set_frequency_bandwidth(). May take up to 10s for low frequencies.
- Return type:
float
- measure_period()
Get the period.
Timeout if period is too high. Specify the lowest frequency you expect to encounter with set_frequency_bandwidth(). May take up to 10s for low frequencies.
- Return type:
float
- measure_resistance()
Get the measured resistance.
- Return type:
float
- measure_resistance_four_wire()
Get the measured four wire resistance.
- Return type:
float
- measure_temperature()
Get the measured temperature.
- Return type:
float
- measure_voltage()
Get the measured output DC voltage.
- Return type:
float
- measure_voltage_ac()
Get the measured output AC voltage.
- Return type:
float
- reset()
Reset instrument to factory default state, including clearing status.
- Return type:
None
- set_averaging_time(averaging_time=0.1)
Set the integration time in seconds.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :type averaging_time:
float:param averaging_time: Integration time in seconds.- Return type:
None
- set_averaging_time_NPLC(averaging_time=10)
Set the integration time in number of power line cycles.
The length of a power line cycle for 50 Hz AC is 20ms, integrating the DC signal over an number of powerline cycles >1 helps reject power line induced AC noise.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :type averaging_time:
float:param averaging_time: Integration time in number of cycles.- Return type:
None
- set_measure_frequency_bandwidth(bandwidth)
Set the AC bandwidth for frequency and period measurements.
The instrument selects the slow (3 Hz), medium (20 Hz) or fast (200 Hz) filter based on the cutoff frequency specified. Specify the lowest frequency you expect to encounter.
- Return type:
None
- set_measurement_range(measurement_range)
Set a fixed measurement range.
Applies to the active trace function from get_sampling_measurement_mode().
- Parameters:
measurement_range (
float|None) – Measurement range to set. If measurement_range is not provided then the default DMM measurement_range is used.- Return type:
None
- set_measurement_range_auto(enable=True)
Set autoranging for measurements.
- Parameters:
enable (
bool) – on/off boolean.- Return type:
None
- set_sample_interval(sample_interval=1)
Set the sample interval for timed sampling.
- Parameters:
sample_interval (
float) – Time between samples in seconds.- Return type:
None
- set_sample_interval_min()
Set the recommended interval for the current measurement configuration.
- Return type:
None
- set_sample_points(sample_points=5)
Set the number of samples for a ‘trace’ acquisition.
- Parameters:
sample_points (
int) – Number of samples.- Return type:
None
- set_sampling_measurement_mode(function='VOLT')
Set the function or measurement mode to be sampled.
Supports measurement modes:
VOLT,VOLT:AC,CURR,CURR:AC,RES,FRES,TEMP,FREQ,PER,DIOD,CONT,CAP- Parameters:
function (
str) – The measurement function to be configured for sampling.- Return type:
None
- set_trigger_bus()
Set trigger source to BUS.
Triggers when a trigger command (*TRG/trigger_now()) is sent over a remote interface.
- Return type:
None
- set_trigger_delay(trigger_delay=1)
Set trigger delay setting.
Delay after trigger before measurement(s) start. Used to allow input to settle before taking measurements.
- Parameters:
trigger_delay (
float) – Trigger delay setting in seconds.- Return type:
None
- set_trigger_external(pos_edge=True)
Set trigger source to external.
Triggers on external positive/negative edge.
- Parameters:
pos_edge (
bool) – True for positive edge triggering, False for negative.- Return type:
None
- set_trigger_immediate()
Set trigger source to immediate.
Triggers as soon as set_wait_for_trigger() is called.
- Return type:
None
- set_trigger_internal_level(trigger_level, pos_edge=True)
Set trigger source to internal.
Triggers when a DMM measurement exceeds a specified trigger_level. Can be configured for positive/negative edge triggering.
- Parameters:
trigger_level (
float) – Trigger level.pos_edge (
bool) – True for positive edge triggering, False for negative.
- Return type:
None
- set_wait_for_trigger()
Set the instrument into a wait-for-trigger state.
After setting the sample count, source, etc. you must place the meter in the “wait-for-trigger” state. A trigger is not accepted from the selected trigger source until the instrument is in the “wait-for-trigger” state.
- Return type:
None
- transport: PyVisaTransport
- trigger_now()
Send trigger (*TRG) command.
Used when the trigger source is set to BUS with set_trigger_bus().
- Return type:
None
- class inspy.instrument.digitalmultimeter.DmmKeysight34465A(visa_address=None, transport=None)[source]
Bases:
DmmKeysight344xxAKeysight 34465A Digital Multimeter Class.
Inherits all methods from the DmmKeysight344xxA class, and adds none.
- auto_log_level: int = 20
The log level used for automatic logging of method calls.
To disable logging set to logging.NOTSET.
- await_completion()
Wait for the instrument to complete the current operation.
- Return type:
None
- connect()
Connect to instrument using the transport layer.
- Return type:
None
- disconnect()
- Return type:
None
- get_averaging_time()
Get the integration time in seconds.
- Return type:
float- Returns:
Integration time in seconds.
- get_averaging_time_NPLC()
Get the integration time in number of power line cycles.
The length of a power line cycle for 50 Hz AC is 20ms, integrating the DC signal over a number of powerline cycles >1 helps reject power line induced AC noise.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :rtype:
float:returns: Integration time in number of power line cycles.
- get_errors()
Get a list of errors and error numbers from the instrument.
- Return type:
list[tuple[int,str]]- Returns:
A list where each value is a tuple of the error number and error description
- get_id()
Identification Query.
- Return type:
str- Returns:
Instrument Identification String.
- get_measure_frequency_bandwidth()
Get the AC filter configuration for frequency and period measurements.
- Return type:
float
- get_measurement_range()
Get the fixed measurement range.
Applies to the active trace function from get_sampling_measurement_mode().
- Return type:
float- Returns:
Measurement range.
- get_measurement_range_auto()
Get autorange status.
- Return type:
bool- Returns:
Autorange status boolean.
- get_measuring_status()
Get the ‘Measuring’ bit from the Standard Operation Register.
Indicates if the instrument is currently sampling.
- Return type:
bool- Returns:
Bit status boolean.
- get_sample_interval()
Get the sample interval setting for timed sampling.
The sampling interval is the time between samples.
- Return type:
float- Returns:
Sample interval setting in seconds.
- get_sample_interval_min()
Determine the recommended interval for the current measurement configuration.
- Return type:
float- Returns:
Minimum sample interval for current configuration in seconds.
- get_sample_points()
Get the number of samples points setting.
- Return type:
int- Returns:
Sample number setting.
- get_samples(polling_cycle=0.5)
Wait for measurements to complete and returns all measurements.
Polls the device to get trigger state and measuring status.
- Parameters:
polling_cycle (
float) – Set polling_cycle in seconds.- Return type:
list[float]- Returns:
List of samples.
- get_sampling_measurement_mode()
Get the current function or measurement mode that is set for sampling.
- Return type:
str- Returns:
The current function as a string (e.g.
VOLT:AC)
- get_trigger_delay()
Get trigger delay.
- Return type:
float- Returns:
Trigger delay setting.
- get_trigger_source()
Get trigger source setting.
- Return type:
str- Returns:
Current trigger source.
- get_wait_for_trigger_status()
Get the ‘Waiting for trigger’ bit from the Standard Operation Register.
- Return type:
bool- Returns:
Bit status boolean.
- is_connected: bool
- logger: logging.Logger
- measure_capacitance()
Get the capacitance.
- Return type:
float
- measure_continuity()
Get continutiy boolean.
- Return type:
bool
- measure_current()
Get the measured output DC current.
- Return type:
float
- measure_current_ac()
Get the measured output AC current.
- Return type:
float
- measure_diode_bias()
Get the forward/reverse bias voltage of the diode.
- Return type:
float
- measure_frequency()
Get the frequency.
Timeout if frequency is too low. Specify the lowest frequency you expect to encounter with set_frequency_bandwidth(). May take up to 10s for low frequencies.
- Return type:
float
- measure_period()
Get the period.
Timeout if period is too high. Specify the lowest frequency you expect to encounter with set_frequency_bandwidth(). May take up to 10s for low frequencies.
- Return type:
float
- measure_resistance()
Get the measured resistance.
- Return type:
float
- measure_resistance_four_wire()
Get the measured four wire resistance.
- Return type:
float
- measure_temperature()
Get the measured temperature.
- Return type:
float
- measure_voltage()
Get the measured output DC voltage.
- Return type:
float
- measure_voltage_ac()
Get the measured output AC voltage.
- Return type:
float
- reset()
Reset instrument to factory default state, including clearing status.
- Return type:
None
- set_averaging_time(averaging_time=0.1)
Set the integration time in seconds.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :type averaging_time:
float:param averaging_time: Integration time in seconds.- Return type:
None
- set_averaging_time_NPLC(averaging_time=10)
Set the integration time in number of power line cycles.
The length of a power line cycle for 50 Hz AC is 20ms, integrating the DC signal over an number of powerline cycles >1 helps reject power line induced AC noise.
Only for: ‘VOLT’, ‘CURR’, ‘RES’, ‘FRES’, ‘TEMP’ :type averaging_time:
float:param averaging_time: Integration time in number of cycles.- Return type:
None
- set_measure_frequency_bandwidth(bandwidth)
Set the AC bandwidth for frequency and period measurements.
The instrument selects the slow (3 Hz), medium (20 Hz) or fast (200 Hz) filter based on the cutoff frequency specified. Specify the lowest frequency you expect to encounter.
- Return type:
None
- set_measurement_range(measurement_range)
Set a fixed measurement range.
Applies to the active trace function from get_sampling_measurement_mode().
- Parameters:
measurement_range (
float|None) – Measurement range to set. If measurement_range is not provided then the default DMM measurement_range is used.- Return type:
None
- set_measurement_range_auto(enable=True)
Set autoranging for measurements.
- Parameters:
enable (
bool) – on/off boolean.- Return type:
None
- set_sample_interval(sample_interval=1)
Set the sample interval for timed sampling.
- Parameters:
sample_interval (
float) – Time between samples in seconds.- Return type:
None
- set_sample_interval_min()
Set the recommended interval for the current measurement configuration.
- Return type:
None
- set_sample_points(sample_points=5)
Set the number of samples for a ‘trace’ acquisition.
- Parameters:
sample_points (
int) – Number of samples.- Return type:
None
- set_sampling_measurement_mode(function='VOLT')
Set the function or measurement mode to be sampled.
Supports measurement modes:
VOLT,VOLT:AC,CURR,CURR:AC,RES,FRES,TEMP,FREQ,PER,DIOD,CONT,CAP- Parameters:
function (
str) – The measurement function to be configured for sampling.- Return type:
None
- set_trigger_bus()
Set trigger source to BUS.
Triggers when a trigger command (*TRG/trigger_now()) is sent over a remote interface.
- Return type:
None
- set_trigger_delay(trigger_delay=1)
Set trigger delay setting.
Delay after trigger before measurement(s) start. Used to allow input to settle before taking measurements.
- Parameters:
trigger_delay (
float) – Trigger delay setting in seconds.- Return type:
None
- set_trigger_external(pos_edge=True)
Set trigger source to external.
Triggers on external positive/negative edge.
- Parameters:
pos_edge (
bool) – True for positive edge triggering, False for negative.- Return type:
None
- set_trigger_immediate()
Set trigger source to immediate.
Triggers as soon as set_wait_for_trigger() is called.
- Return type:
None
- set_trigger_internal_level(trigger_level, pos_edge=True)
Set trigger source to internal.
Triggers when a DMM measurement exceeds a specified trigger_level. Can be configured for positive/negative edge triggering.
- Parameters:
trigger_level (
float) – Trigger level.pos_edge (
bool) – True for positive edge triggering, False for negative.
- Return type:
None
- set_wait_for_trigger()
Set the instrument into a wait-for-trigger state.
After setting the sample count, source, etc. you must place the meter in the “wait-for-trigger” state. A trigger is not accepted from the selected trigger source until the instrument is in the “wait-for-trigger” state.
- Return type:
None
- transport: PyVisaTransport
- trigger_now()
Send trigger (*TRG) command.
Used when the trigger source is set to BUS with set_trigger_bus().
- Return type:
None