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 intgetAverageCount()Returns the number of measurements used for averaging by the voltmeter.AModegetAverageMode()Returns the averaging mode being used for measurements by the voltmeter.java.util.List<Instrument.Parameter<?>>getConfigurationParameters(java.lang.Class<?> target)static java.lang.StringgetDescription()doublegetIntegrationTime()Returns the integration time being used for measurements.TerminalsgetTerminals()Returns the type of the set of terminals currently being used on the voltmeter.TTypegetTerminalType(Terminals terminals)Returns what type of connector is used for the given terminal.doublegetVoltage()Takes a voltage measurement and returns the value.doublegetVoltageRange()Returns the measurement range being used for voltage measurements.booleanisAutoRangingVoltage()Returns whether the voltmeter is using auto-ranging for voltage measurements.booleanisLineFilterEnabled()Returns whether the voltmeter is using any line-frequency filteringbooleanisOn()Returns whether the voltmeter is on or not.voidsetAverageCount(int count)Sets the number of measurements to use for averaging.voidsetAverageMode(AMode mode)Sets the averaging mode used for taking each measurement.voidsetIntegrationTime(double time)Sets the integration time for each measurement.voidsetLineFilterEnabled(boolean enabled)Sets whether the voltmeter should use any line-frequency filtering (if available)voidsetTerminals(Terminals terminals)Sets which set of terminals should be used on the voltmeter.voidsetVoltageRange(double range)Sets the measurement range to use for voltage measurements.voidturnOff()Turns off the voltmeter.voidturnOn()Turns on the voltmeter.voiduseAutoVoltageRange()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.IOExceptionDeviceException
-
K2182
public K2182(Address address, java.lang.Class<? extends Driver> prefDriver) throws java.io.IOException, DeviceException
- Throws:
java.io.IOExceptionDeviceException
-
-
Method Detail
-
getDescription
public static java.lang.String getDescription()
-
getVoltage
public double getVoltage() throws java.io.IOException, DeviceExceptionDescription copied from interface:VMeterTakes a voltage measurement and returns the value.- Specified by:
getVoltagein 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.IOExceptionDescription copied from interface:VMeterSets the integration time for each measurement.- Specified by:
setIntegrationTimein interfaceVMeter- Parameters:
time- Integration time, in seconds.- Throws:
java.io.IOException- Upon communications error
-
getIntegrationTime
public double getIntegrationTime() throws java.io.IOExceptionDescription copied from interface:VMeterReturns the integration time being used for measurements.- Specified by:
getIntegrationTimein interfaceVMeter- Returns:
- Integration time, in seconds.
- Throws:
java.io.IOException- Upon communications error
-
setVoltageRange
public void setVoltageRange(double range) throws java.io.IOExceptionDescription copied from interface:VMeterSets 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:
setVoltageRangein interfaceVMeter- Parameters:
range- Range to use, in Volts- Throws:
java.io.IOException- Upon communications error
-
getVoltageRange
public double getVoltageRange() throws java.io.IOExceptionDescription copied from interface:VMeterReturns the measurement range being used for voltage measurements. A range of n indicates -n to +n.- Specified by:
getVoltageRangein interfaceVMeter- Returns:
- Range being used, in Volts
- Throws:
java.io.IOException- Upon communications error
-
useAutoVoltageRange
public void useAutoVoltageRange() throws java.io.IOExceptionDescription copied from interface:VMeterTells the voltmeter to use auto-ranging for voltage measurements.- Specified by:
useAutoVoltageRangein interfaceVMeter- Throws:
java.io.IOException- Upon communications error
-
isAutoRangingVoltage
public boolean isAutoRangingVoltage() throws java.io.IOExceptionDescription copied from interface:VMeterReturns whether the voltmeter is using auto-ranging for voltage measurements.- Specified by:
isAutoRangingVoltagein 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:VMeterSets the averaging mode used for taking each measurement.- Specified by:
setAverageModein 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, DeviceExceptionDescription copied from interface:VMeterSets the number of measurements to use for averaging.- Specified by:
setAverageCountin 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:VMeterReturns the averaging mode being used for measurements by the voltmeter.- Specified by:
getAverageModein interfaceVMeter- Returns:
- Averaging mode
-
getAverageCount
public int getAverageCount()
Description copied from interface:VMeterReturns the number of measurements used for averaging by the voltmeter.- Specified by:
getAverageCountin interfaceVMeter- Returns:
- Number of measurements
-
turnOn
public void turnOn()
Description copied from interface:VMeterTurns on the voltmeter.
-
turnOff
public void turnOff()
Description copied from interface:VMeterTurns off the voltmeter.
-
isOn
public boolean isOn()
Description copied from interface:VMeterReturns whether the voltmeter is on or not.
-
getTerminalType
public TType getTerminalType(Terminals terminals)
Description copied from interface:VMeterReturns what type of connector is used for the given terminal.- Specified by:
getTerminalTypein interfaceVMeter- Parameters:
terminals- Which terminal- Returns:
- Terminal type (TRIAX, PHOENIX, BNC or BANANA)
-
setTerminals
public void setTerminals(Terminals terminals)
Description copied from interface:VMeterSets which set of terminals should be used on the voltmeter.- Specified by:
setTerminalsin interfaceVMeter- Parameters:
terminals- Which type of terminals to use
-
isLineFilterEnabled
public boolean isLineFilterEnabled() throws java.io.IOExceptionDescription copied from interface:VMeterReturns whether the voltmeter is using any line-frequency filtering- Specified by:
isLineFilterEnabledin interfaceVMeter- Returns:
- Using line filter?
- Throws:
java.io.IOException- Upon communications error
-
setLineFilterEnabled
public void setLineFilterEnabled(boolean enabled) throws java.io.IOExceptionDescription copied from interface:VMeterSets whether the voltmeter should use any line-frequency filtering (if available)- Specified by:
setLineFilterEnabledin interfaceVMeter- Parameters:
enabled- Use line filter?- Throws:
java.io.IOException- Upon communications error
-
getTerminals
public Terminals getTerminals()
Description copied from interface:VMeterReturns the type of the set of terminals currently being used on the voltmeter.- Specified by:
getTerminalsin interfaceVMeter- Returns:
- The type of terminals being used
-
getConfigurationParameters
public java.util.List<Instrument.Parameter<?>> getConfigurationParameters(java.lang.Class<?> target)
- Specified by:
getConfigurationParametersin interfaceInstrument- Specified by:
getConfigurationParametersin interfaceVMeter
-
-