The multimeter module¶
Abstraction module for multimeters. The cmd_multimeter module allows the transparent use of a pool of an undefined number of multimeters regardless of maker, model or host-device link technology. Its function is to redirect the requests and orders made to it, to a module that knows how to interface with that particular device.
Presently, the following compatible modules are shipped with Pyrame:
This module is the analog of cmd_ps for multimeters. See its documentation for general considerations.
Functions¶
On top of the mandatory functions listed in cmd_ps, the following can be implemented and accessed through cmd_multimeter:
- get_dc_voltage_MODEL(model_id [, range [, resolution ]])
- get_ac_voltage_MODEL(model_id [, range [, resolution ]])
- get_dc_current_MODEL(model_id [, range [, resolution ]])
- get_ac_current_MODEL(model_id [, range [, resolution ]])
- get_2w_resistance_MODEL(model_id [, range [, resolution ]])
- get_4w_resistance_MODEL(model_id [, range [, resolution ]])
- get_frequency_MODEL(model_id [, range [, resolution ]])
- get_period_MODEL(model_id [, range [, resolution ]])
- get_temp_MODEL(model_id [, range [, resolution ]])
- get_rh_MODEL(model_id [, range [, resolution ]])
- timed_acq_MODEL(model_id, value_type, nb_measures, period [, range [, resolution ]])
- get_error_queue_MODEL (model_id )
In all cases: - Magnitudes (i.e.: voltage, current, frequency, etc.), either sent or returned, must be expressed in base units of the International System of Units (V, A, Hertz, etc.).
Note
As hinted out by the optional arguments on the list of functions, the arguments passed through to the model function will depend on the capabilities of that particular PS model. cmd_ps uses the API exchange mechanism to determine them.
API¶
-
cmd_multimeter.
init_multimeter
(multimeter_id, conf_string)[source]¶ Registers in the pool and initializes a new MULTIMETER. conf_string is the configuration string for the module to be initialized
-
cmd_multimeter.
get_value_multimeter
(multimeter_id, value_type, range='undef', resolution='undef')[source]¶ Generic function to get any value_type. The function get_VALUE_TYPE on the destination module will be called.
-
cmd_multimeter.
get_dc_voltage_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get DC voltage in Volts. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_ac_voltage_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get AC voltage in Volts. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_dc_current_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get DC current in Ampers. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_ac_current_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get AC current in Ampers. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_2w_resistance_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get 2-wire resitance in Ohms. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_4w_resistance_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get 4-wire resitance in Ohms. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_frequency_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get frequency in Hertzs. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_period_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get period in seconds. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_temp_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get temperature in degrees Celcius. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_rh_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get relative humidity in percent. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.
-
cmd_multimeter.
get_pressure_multimeter
(multimeter_id, range='undef', resolution='undef')[source]¶ Get pressure. Optional range argument for scale of measurement. Optional resolution argument for either integration time or allowable error. See documentation of the particular model for allowed values.