FUNCTION_DMM7510
Changes the measurement function for the DMM7510. Requires a CONNECT_DMM7510 block to create the connection. Params: connection : VisaConnection The VISA address (requires the CONNECTION_DMM7510 block). function : select, default=DC voltage Select the measurement function Returns: out : String Measurement
Python Code
from typing import Optional, Literal
from flojoy import VisaConnection, flojoy, DataContainer, String
@flojoy(inject_connection=True)
def FUNCTION_DMM7510(
connection: VisaConnection,
input: Optional[DataContainer] = None,
function: Literal[
"DC voltage",
"DC current",
"AC voltage",
"AC current",
"2W resistance",
"4W resistance",
"temperature",
"capacitance",
"continuity",
"diode",
"period",
"frequency",
"DCV ratio",
] = "DC voltage",
) -> String:
"""Changes the measurement function for the DMM7510.
Requires a CONNECT_DMM7510 block to create the connection.
Parameters
----------
connection : VisaConnection
The VISA address (requires the CONNECTION_DMM7510 block).
function : select, default=DC voltage
Select the measurement function
Returns
-------
String
Measurement
"""
dmm = connection.get_handle()
match function:
case "DC voltage":
dmm.commands.dmm.measure.func = "dmm.FUNC_DC_VOLTAGE"
case "DC current":
dmm.commands.dmm.measure.func = "dmm.FUNC_DC_CURRENT"
case "AC voltage":
dmm.commands.dmm.measure.func = "dmm.FUNC_AC_VOLTAGE"
case "AC current":
dmm.commands.dmm.measure.func = "dmm.FUNC_AC_CURRENT"
case "2W resistance":
dmm.commands.dmm.measure.func = "dmm.FUNC_RESISTANCE"
case "4W resistance":
dmm.commands.dmm.measure.func = "dmm.FUNC_4W_RESISTANCE"
case "temperature":
dmm.commands.dmm.measure.func = "dmm.FUNC_TEMPERATURE"
case "capacitance":
dmm.commands.dmm.measure.func = "dmm.FUNC_CAPACITANCE"
case "continuity":
dmm.commands.dmm.measure.func = "dmm.FUNC_CONTINUITY"
case "diode":
dmm.commands.dmm.measure.func = "dmm.FUNC_DIODE"
case "period":
dmm.commands.dmm.measure.func = "dmm.FUNC_PERIOD"
case "frequency":
dmm.commands.dmm.measure.func = "dmm.FUNC_FREQUENCY"
case "DCV ratio":
dmm.commands.dmm.measure.func = "dmm.FUNC_DCV_RATIO"
return String(s=f"Measure {function}")
Videos
Control the DMM7510 Multimeter with Flojoy
Example
Having problems with this example app? Join our Discord community and we will help you out!
In this example, a DC voltage measurement was extracted from a Keithley DMM7510.
First the necessary blocks were added:
CONNECT_DMM7510
RESET_DMM7510
FUNCTION_DMM7510
DIGITS_DMM7510
MEASUREMENT_PARAMS_DMM7510
MEASUREMENT_FILTER_DMM7510
READ_DMM7510
BIG_NUMBER
The instrument address was set for each DMM7510
block. The FUNCTION_DMM7510
block was changed in order to extract the correct measurement. The parameters in DIGITS_DMM7510
, MEASUREMENT_PARAMS_DMM7510
, and MEASUREMENT_FILTER_DMM7510
blocks were changed as necessary. The READ_DMM7510
block was connected to the BIG_NUMBER
block in order to view the reading.
The blocks were connected as shown and the app was run.