Connecting to Fluke 7341 by Fluke in Python
Instrument Card
Deep-Well Compact Bath, –45 °C to 150 °C
Device Specification: here
Manufacturer card: FLUKE
Fluke Corporation is the world leader in professional electronic test tools and software for measuring and condition monitoring.
- Headquarters: US
- Yearly Revenue (millions, USD): 700
- Vendor Website: here
Connect to the Fluke 7341 in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
The provided code defines a class Fluke7341
that represents a compact constant temperature bath from Fluke. It is a subclass of Instrument
from the pymeasure.instruments
module.
The class has the following methods:
-
__init__(self, adapter, name="Fluke 7341", **kwargs)
: Initializes theFluke7341
object. It sets default values for the timeout and write termination, and calls the superclassInstrument
constructor. -
read(self)
: Reads the response from the instrument and extracts the value from the response string. It splits the response string by ”:” and returns the last element. -
set_point
: Represents the temperature setpoint control. It is anInstrument.control
object that allows setting the temperature setpoint. It takes a float value between -40 and 150 as an argument. It also has a validatorstrict_range
that ensures the value is within the specified range. Thepreprocess_reply
function splits the reply string and returns the first element. -
unit
: Represents the temperature unit control. It is anInstrument.control
object that allows setting the temperature unit. It takes a string value ‘c’ for Celsius or ‘f’ for Fahrenheit as an argument. It has a validatorstrict_discrete_set
that ensures the value is one of the specified options. -
temperature
: Represents the measurement of the current bath temperature. It is anInstrument.measurement
object that retrieves the temperature value from the instrument. Thepreprocess_reply
function splits the reply string and returns the first element. -
id
: Represents the instrument model identification. It is anInstrument.measurement
object that retrieves the instrument model from the instrument. Thecast
argument specifies the type of the returned value, and theget_process
function formats the response string to the desired format.
To use this code, you would need to create an instance of the Fluke7341
class and provide the appropriate adapter for communication with the instrument. Then, you can use the defined methods to control and measure the temperature bath.