Package jisa.devices.vmeter
Class K2182
- java.lang.Object
-
- jisa.visa.VISADevice
-
- jisa.devices.vmeter.K2182
-
- All Implemented Interfaces:
Instrument
,Switch
,VMeter
public class K2182 extends VISADevice implements VMeter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jisa.devices.interfaces.Instrument
Instrument.AutoQuantity<S>, Instrument.OptionalQuantity<S>, Instrument.Parameter<S>, Instrument.Setter<S>, Instrument.TableQuantity
-
-
Field Summary
-
Fields inherited from class jisa.visa.VISADevice
C_IDN, CR_TERMINATOR, CRLF_TERMINATOR, DEFAULT_EOI, DEFAULT_EOS, DEFAULT_TIMEOUT, EOS_RETURN, LF_TERMINATOR
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAverageCount()
Returns the number of measurements used for averaging by the voltmeter.AMode
getAverageMode()
Returns the averaging mode being used for measurements by the voltmeter.java.util.List<Instrument.Parameter<?>>
getConfigurationParameters(java.lang.Class<?> target)
static java.lang.String
getDescription()
double
getIntegrationTime()
Returns the integration time being used for measurements.Terminals
getTerminals()
Returns the type of the set of terminals currently being used on the voltmeter.TType
getTerminalType(Terminals terminals)
Returns what type of connector is used for the given terminal.double
getVoltage()
Takes a voltage measurement and returns the value.double
getVoltageRange()
Returns the measurement range being used for voltage measurements.boolean
isAutoRangingVoltage()
Returns whether the voltmeter is using auto-ranging for voltage measurements.boolean
isLineFilterEnabled()
Returns whether the voltmeter is using any line-frequency filteringboolean
isOn()
Returns whether the voltmeter is on or not.void
setAverageCount(int count)
Sets the number of measurements to use for averaging.void
setAverageMode(AMode mode)
Sets the averaging mode used for taking each measurement.void
setIntegrationTime(double time)
Sets the integration time for each measurement.void
setLineFilterEnabled(boolean enabled)
Sets whether the voltmeter should use any line-frequency filtering (if available)void
setTerminals(Terminals terminals)
Sets which set of terminals should be used on the voltmeter.void
setVoltageRange(double range)
Sets the measurement range to use for voltage measurements.void
turnOff()
Turns off the voltmeter.void
turnOn()
Turns on the voltmeter.void
useAutoVoltageRange()
Tells the voltmeter to use auto-ranging for voltage measurements.-
Methods inherited from class jisa.visa.VISADevice
addAutoRemove, checkLimit, checkLimit, clearBuffers, close, getAddress, getConnection, getIDN, getName, manuallyClearReadBuffer, query, queryDouble, queryInt, read, read, readBytes, readDouble, readInt, setIOLimit, setReadBufferSize, setReadTerminator, setReadTerminator, setRetryCount, setTimeout, setWriteTerminator, write, writeBytes
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jisa.devices.interfaces.Instrument
close, getAddress, getConfigurationParameters, getIDN, getLockObject, getName, setTimeout
-
Methods inherited from interface jisa.devices.interfaces.VMeter
getVoltage, waitForStableVoltage
-
-
-
-
Constructor Detail
-
K2182
public K2182(Address address) throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
K2182
public K2182(Address address, java.lang.Class<? extends Driver> prefDriver) throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
-
Method Detail
-
getDescription
public static java.lang.String getDescription()
-
getVoltage
public double getVoltage() throws java.io.IOException, DeviceException
Description copied from interface:VMeter
Takes a voltage measurement and returns the value.- Specified by:
getVoltage
in interfaceVMeter
- Returns:
- Voltage measurement value, in Volts
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
setIntegrationTime
public void setIntegrationTime(double time) throws java.io.IOException
Description copied from interface:VMeter
Sets the integration time for each measurement.- Specified by:
setIntegrationTime
in interfaceVMeter
- Parameters:
time
- Integration time, in seconds.- Throws:
java.io.IOException
- Upon communications error
-
getIntegrationTime
public double getIntegrationTime() throws java.io.IOException
Description copied from interface:VMeter
Returns the integration time being used for measurements.- Specified by:
getIntegrationTime
in interfaceVMeter
- Returns:
- Integration time, in seconds.
- Throws:
java.io.IOException
- Upon communications error
-
setVoltageRange
public void setVoltageRange(double range) throws java.io.IOException
Description copied from interface:VMeter
Sets the measurement range to use for voltage measurements. If only discrete options are available, the smallest range that contains the supplied value is used. A range of n indicates -n to +n.- Specified by:
setVoltageRange
in interfaceVMeter
- Parameters:
range
- Range to use, in Volts- Throws:
java.io.IOException
- Upon communications error
-
getVoltageRange
public double getVoltageRange() throws java.io.IOException
Description copied from interface:VMeter
Returns the measurement range being used for voltage measurements. A range of n indicates -n to +n.- Specified by:
getVoltageRange
in interfaceVMeter
- Returns:
- Range being used, in Volts
- Throws:
java.io.IOException
- Upon communications error
-
useAutoVoltageRange
public void useAutoVoltageRange() throws java.io.IOException
Description copied from interface:VMeter
Tells the voltmeter to use auto-ranging for voltage measurements.- Specified by:
useAutoVoltageRange
in interfaceVMeter
- Throws:
java.io.IOException
- Upon communications error
-
isAutoRangingVoltage
public boolean isAutoRangingVoltage() throws java.io.IOException
Description copied from interface:VMeter
Returns whether the voltmeter is using auto-ranging for voltage measurements.- Specified by:
isAutoRangingVoltage
in interfaceVMeter
- Returns:
- Is it auto-ranging?
- Throws:
java.io.IOException
- Upon communications error
-
setAverageMode
public void setAverageMode(AMode mode) throws java.io.IOException, DeviceException
Description copied from interface:VMeter
Sets the averaging mode used for taking each measurement.- Specified by:
setAverageMode
in interfaceVMeter
- Parameters:
mode
- Averaging mode to use- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
setAverageCount
public void setAverageCount(int count) throws java.io.IOException, DeviceException
Description copied from interface:VMeter
Sets the number of measurements to use for averaging.- Specified by:
setAverageCount
in interfaceVMeter
- Parameters:
count
- Number of measurements- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
getAverageMode
public AMode getAverageMode()
Description copied from interface:VMeter
Returns the averaging mode being used for measurements by the voltmeter.- Specified by:
getAverageMode
in interfaceVMeter
- Returns:
- Averaging mode
-
getAverageCount
public int getAverageCount()
Description copied from interface:VMeter
Returns the number of measurements used for averaging by the voltmeter.- Specified by:
getAverageCount
in interfaceVMeter
- Returns:
- Number of measurements
-
turnOn
public void turnOn()
Description copied from interface:VMeter
Turns on the voltmeter.
-
turnOff
public void turnOff()
Description copied from interface:VMeter
Turns off the voltmeter.
-
isOn
public boolean isOn()
Description copied from interface:VMeter
Returns whether the voltmeter is on or not.
-
getTerminalType
public TType getTerminalType(Terminals terminals)
Description copied from interface:VMeter
Returns what type of connector is used for the given terminal.- Specified by:
getTerminalType
in interfaceVMeter
- Parameters:
terminals
- Which terminal- Returns:
- Terminal type (TRIAX, PHOENIX, BNC or BANANA)
-
setTerminals
public void setTerminals(Terminals terminals)
Description copied from interface:VMeter
Sets which set of terminals should be used on the voltmeter.- Specified by:
setTerminals
in interfaceVMeter
- Parameters:
terminals
- Which type of terminals to use
-
isLineFilterEnabled
public boolean isLineFilterEnabled() throws java.io.IOException
Description copied from interface:VMeter
Returns whether the voltmeter is using any line-frequency filtering- Specified by:
isLineFilterEnabled
in interfaceVMeter
- Returns:
- Using line filter?
- Throws:
java.io.IOException
- Upon communications error
-
setLineFilterEnabled
public void setLineFilterEnabled(boolean enabled) throws java.io.IOException
Description copied from interface:VMeter
Sets whether the voltmeter should use any line-frequency filtering (if available)- Specified by:
setLineFilterEnabled
in interfaceVMeter
- Parameters:
enabled
- Use line filter?- Throws:
java.io.IOException
- Upon communications error
-
getTerminals
public Terminals getTerminals()
Description copied from interface:VMeter
Returns the type of the set of terminals currently being used on the voltmeter.- Specified by:
getTerminals
in interfaceVMeter
- Returns:
- The type of terminals being used
-
getConfigurationParameters
public java.util.List<Instrument.Parameter<?>> getConfigurationParameters(java.lang.Class<?> target)
- Specified by:
getConfigurationParameters
in interfaceInstrument
- Specified by:
getConfigurationParameters
in interfaceVMeter
-
-