hvl_ccb.dev.fluke884x.base
digraph inheritance370b3c879a { bgcolor=transparent; rankdir=TB; size=""; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "AsyncCommunicationProtocol" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.AsyncCommunicationProtocol",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for asynchronous communication protocols"]; "CommunicationProtocol" -> "AsyncCommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AsyncCommunicationProtocolConfig" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.AsyncCommunicationProtocolConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base configuration data class for asynchronous communication protocols"]; "CommunicationProtocol" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.CommunicationProtocol",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Communication protocol abstract base class."]; "ConfigurationMixin" -> "CommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "CommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ConfigurationMixin" [URL="../hvl_ccb.configuration.html#hvl_ccb.configuration.ConfigurationMixin",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin providing configuration to a class."]; "ABC" -> "ConfigurationMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Device" [URL="../hvl_ccb.dev.base.html#hvl_ccb.dev.base.Device",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for devices. Implement this class for a concrete device,"]; "ConfigurationMixin" -> "Device" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "Device" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Fluke8845a" [URL="../hvl_ccb.dev.fluke884x.base.html#hvl_ccb.dev.fluke884x.base.Fluke8845a",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Device class to control Fluke8845a"]; "SingleCommDevice" -> "Fluke8845a" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Fluke8845aConfig" [URL="../hvl_ccb.dev.fluke884x.base.html#hvl_ccb.dev.fluke884x.base.Fluke8845aConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Config for Fluke8845a"]; "Fluke8845aTelnetCommunication" [URL="../hvl_ccb.dev.fluke884x.base.html#hvl_ccb.dev.fluke884x.base.Fluke8845aTelnetCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "TelnetCommunication" -> "Fluke8845aTelnetCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SyncCommunicationProtocol" -> "Fluke8845aTelnetCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Fluke8845aTelnetCommunicationConfig" [URL="../hvl_ccb.dev.fluke884x.base.html#hvl_ccb.dev.fluke884x.base.Fluke8845aTelnetCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Fluke8845aTelnetCommunicationConfig(terminator: bytes = b'\r', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: Union[int, float] = 0.5, default_n_attempts_read_text_nonempty: int = 10, host: Union[str, ipaddress.IPv4Address, ipaddress.IPv6Address, NoneType] = None, port: int = 3490, timeout: Union[int, float] = 0.2)"]; "TelnetCommunicationConfig" -> "Fluke8845aTelnetCommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SingleCommDevice" [URL="../hvl_ccb.dev.base.html#hvl_ccb.dev.base.SingleCommDevice",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for devices with a single communication protocol."]; "Device" -> "SingleCommDevice" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "SingleCommDevice" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SyncCommunicationProtocol" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.SyncCommunicationProtocol",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for synchronous communication protocols with `query()`"]; "AsyncCommunicationProtocol" -> "SyncCommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "SyncCommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TelnetCommunication" [URL="../hvl_ccb.comm.telnet.html#hvl_ccb.comm.telnet.TelnetCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Implements the Communication Protocol for telnet."]; "AsyncCommunicationProtocol" -> "TelnetCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TelnetCommunicationConfig" [URL="../hvl_ccb.comm.telnet.html#hvl_ccb.comm.telnet.TelnetCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration dataclass for :class:`TelnetCommunication`."]; "AsyncCommunicationProtocolConfig" -> "TelnetCommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; }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_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[hvl_ccb.dev.fluke884x.base.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[hvl_ccb.dev.fluke884x.base.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.
- 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”
- 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
- 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