hvl_ccb.dev.fluke884x.base

Inheritance diagram of hvl_ccb.dev.fluke884x.base

Python module for the Fluke8845a Multimeter. The communication to the device is through Telnet. 8845A/8846A Programmers Manual is available in the following link. All page numbers mentioned in this script refer to this manual. https://download.flukecal.com/pub/literature/8845A___pmeng0300.pdf

class Fluke8845a(com, dev_config=None)[source]

Bases: SingleCommDevice

Device class to control Fluke8845a

DISPLAY_MAX_LENGTH = 12
ac_current_range
ac_voltage_range
activate_remote_mode() None[source]

Page 66

Places the Meter in the remote mode for RS-232 or Ethernet remote control. All front-panel keys, except the local key, are disabled.

clear_display_message() None[source]

Page 59

Clears the displayed message on the Meter’s display.

clear_error_queue() None[source]

Page 62

Sets all bits to zero in the Meter’s status byte register and all event registers. Also clears the error queue

static config_cls() type[Fluke8845aConfig][source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

current_filter
dc_current_range
dc_voltage_range
static default_com_cls() type[Fluke8845aTelnetCommunication][source]

Get the class for the default communication protocol used with this device.

Returns:

the type of the standard communication protocol for this device

property display_enable: bool

Page 59

get if the display is enabled or not fluke answer string “1” for ON and “0” for off bool(int(“1”)) = 1 and bool(int(“0”)) = 0

Returns:

bool enabled = True, else False

property display_message: str

Page 59

Retrieves the text sent to the Meter’s display.

fetch() float[source]

Page 36

Transfer stored readings to output buffer

four_wire_resistance_range
frequency_aperture
property identification: str

Page 60

Queries “*IDN?” and returns the identification string of the connected device.

Returns:

the identification string of the connected device e.g. “FLUKE, 8845A, 2540017, 08/02/10-11:53”

initiate_trigger() None[source]

Set trigger system to wait-for-trigger

measure() float[source]

Page 42

Taking measurement

Once the Meter has been configured for a measurement, the INITiate command causes the Meter to take a measurement when the trigger condition have been met. To process readings from the Meter’s internal memory to the output buffer, send the Meter a FETCh? command.

property measurement_function: MeasurementFunction

input_function getter, query what the input function is

Raises:

Fluke8845aUnknownCommandError – if the input function is unknown

period_aperture
reset() None[source]

Page 60

resets the meter to its power-up configuration

start() None[source]

Start this device as recommended by the manual

stop() None[source]

Stop this device. Disables access and closes the communication protocol.

trigger() None[source]

Causes the meter to trigger a measurement when paused

property trigger_delay: int

input_trigger_delay getter, query what the input trigger delay is in second answer format from Fluke: string, ‘+1.00000000E+00’, so convert to float and then to int

Returns:

input trigger delay in second

property trigger_source: TriggerSource

input_trigger_source getter, query what the input trigger source is

Raises:

Fluke8845aUnknownCommandError – if the input trigger source is unknown

two_wire_resistance_range
voltage_filter
class Fluke8845aConfig(name: str = 'Fluke 1')[source]

Bases: object

Config for Fluke8845a

name: the name of the device

clean_values()

Cleans and enforces configuration values. Does nothing by default, but may be overridden to add custom configuration value checks.

force_value(fieldname, value)

Forces a value to a dataclass field despite the class being frozen.

NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.

Parameters:
  • fieldname – name of the field

  • value – value to assign

is_configdataclass = True
classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns:

a list of strings containing all keys.

name: str = 'Fluke 1'
classmethod optional_defaults() dict[str, object]

Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.

Returns:

a list of strings containing all optional keys.

classmethod required_keys() Sequence[str]

Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.

Returns:

a list of strings containing all required keys.

class Fluke8845aTelnetCommunication(configuration)[source]

Bases: TelnetCommunication, SyncCommunicationProtocol

static config_cls()[source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

query(command: str, n_attempts_max: int | None = None, attempt_interval_sec: int | float | None = None) str[source]

Send a command to the interface and handle the status message. Eventually raises an error.

Parameters:
  • command – Command to send

  • n_attempts_max – Amount of attempts how often a non-empty text is tried to be read as answer

  • attempt_interval_sec – time between the reading attempts

Raises:

Fluke8845aError – if the connection is broken

Returns:

Answer from the interface

class Fluke8845aTelnetCommunicationConfig(terminator: bytes = b'\r', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: int | float = 0.5, default_n_attempts_read_text_nonempty: int = 10, host: str | ipaddress.IPv4Address | ipaddress.IPv6Address | NoneType = None, port: int = 3490, timeout: int | float = 0.2)[source]

Bases: TelnetCommunicationConfig

force_value(fieldname, value)

Forces a value to a dataclass field despite the class being frozen.

NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.

Parameters:
  • fieldname – name of the field

  • value – value to assign

classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns:

a list of strings containing all keys.

classmethod optional_defaults() dict[str, object]

Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.

Returns:

a list of strings containing all optional keys.

port: int = 3490

Port at which Fluke 8845a is listening

classmethod required_keys() Sequence[str]

Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.

Returns:

a list of strings containing all required keys.

terminator: bytes = b'\r'

The terminator is CR