Package jisa.devices.smu
Class AgilentSPA.AVMU
- java.lang.Object
-
- jisa.devices.smu.AgilentSPA.AVMU
-
- All Implemented Interfaces:
Instrument
,Switch
,VMeter
- Enclosing class:
- AgilentSPA
public class AgilentSPA.AVMU extends java.lang.Object 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
-
-
Constructor Summary
Constructors Constructor Description AVMU(java.lang.String name, int channel, AgilentSPA.Range[] vRanges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the connection to the instrument.Address
getAddress()
Returns any Address object used to connect to this instrument.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.lang.String
getIDN()
Returns an identifying String of the instrument.double
getIntegrationTime()
Returns the integration time being used for measurements.java.lang.String
getName()
Returns the name of the instrument or channel.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.protected ReadFilter
makeVoltageFilter(AMode type)
protected double
measureVoltage()
protected AgilentSPA.Range
rangeFromVoltage(double value)
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.protected void
updateIntTime()
void
useAutoVoltageRange()
Tells the voltmeter to use auto-ranging for voltage measurements.-
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
getConfigurationParameters, getLockObject, setTimeout
-
Methods inherited from interface jisa.devices.interfaces.VMeter
getConfigurationParameters, getVoltage, waitForStableVoltage
-
-
-
-
Constructor Detail
-
AVMU
public AVMU(java.lang.String name, int channel, AgilentSPA.Range[] vRanges) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
makeVoltageFilter
protected ReadFilter makeVoltageFilter(AMode type)
-
updateIntTime
protected void updateIntTime() throws java.io.IOException
- Throws:
java.io.IOException
-
measureVoltage
protected double measureVoltage() throws java.io.IOException
- Throws:
java.io.IOException
-
rangeFromVoltage
protected AgilentSPA.Range rangeFromVoltage(double value)
-
getIDN
public java.lang.String getIDN() throws java.io.IOException, DeviceException
Description copied from interface:Instrument
Returns an identifying String of the instrument.- Specified by:
getIDN
in interfaceInstrument
- Returns:
- Identifying String
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
getName
public java.lang.String getName()
Description copied from interface:Instrument
Returns the name of the instrument or channel.- Specified by:
getName
in interfaceInstrument
- Returns:
- Name
-
close
public void close() throws java.io.IOException, DeviceException
Description copied from interface:Instrument
Closes the connection to the instrument.- Specified by:
close
in interfaceInstrument
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
getAddress
public Address getAddress()
Description copied from interface:Instrument
Returns any Address object used to connect to this instrument.- Specified by:
getAddress
in interfaceInstrument
- Returns:
- Address object, null if none
-
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
-
getIntegrationTime
public double getIntegrationTime() throws java.io.IOException, DeviceException
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 errorDeviceException
- Upon incompatibility with device
-
setIntegrationTime
public void setIntegrationTime(double time) throws java.io.IOException, DeviceException
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 errorDeviceException
- Upon incompatibility with device
-
getVoltageRange
public double getVoltageRange() throws java.io.IOException, DeviceException
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 errorDeviceException
- Upon incompatibility with device
-
setVoltageRange
public void setVoltageRange(double range) throws java.io.IOException, DeviceException
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 errorDeviceException
- Upon incompatibility with device
-
useAutoVoltageRange
public void useAutoVoltageRange() throws java.io.IOException, DeviceException
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 errorDeviceException
- Upon incompatibility with device
-
isAutoRangingVoltage
public boolean isAutoRangingVoltage() throws java.io.IOException, DeviceException
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 errorDeviceException
- Upon incompatibility with device
-
getAverageMode
public AMode getAverageMode() throws java.io.IOException, DeviceException
Description copied from interface:VMeter
Returns the averaging mode being used for measurements by the voltmeter.- Specified by:
getAverageMode
in interfaceVMeter
- Returns:
- Averaging mode
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
setAverageMode
public void setAverageMode(AMode mode) throws DeviceException, java.io.IOException
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:
DeviceException
- Upon incompatibility with devicejava.io.IOException
- Upon communications error
-
getAverageCount
public int getAverageCount() throws java.io.IOException, DeviceException
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
- 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
-
turnOn
public void turnOn() throws DeviceException, java.io.IOException
Description copied from interface:VMeter
Turns on the voltmeter.- Specified by:
turnOn
in interfaceSwitch
- Specified by:
turnOn
in interfaceVMeter
- Throws:
DeviceException
- Upon incompatibility with devicejava.io.IOException
- Upon communications error
-
turnOff
public void turnOff() throws java.io.IOException, DeviceException
Description copied from interface:VMeter
Turns off the voltmeter.- Specified by:
turnOff
in interfaceSwitch
- Specified by:
turnOff
in interfaceVMeter
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
isOn
public boolean isOn() throws java.io.IOException, DeviceException
Description copied from interface:VMeter
Returns whether the voltmeter is on or not.- Specified by:
isOn
in interfaceSwitch
- Specified by:
isOn
in interfaceVMeter
- Returns:
- Is it on?
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
getTerminalType
public TType getTerminalType(Terminals terminals) throws DeviceException, java.io.IOException
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)
- Throws:
DeviceException
java.io.IOException
-
getTerminals
public Terminals getTerminals() throws DeviceException, java.io.IOException
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
- Throws:
DeviceException
- Upon incompatibility with devicejava.io.IOException
- Upon communications error
-
setTerminals
public void setTerminals(Terminals terminals) throws DeviceException, java.io.IOException
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- Throws:
DeviceException
- Upon incompatibility with devicejava.io.IOException
- Upon communications error
-
isLineFilterEnabled
public boolean isLineFilterEnabled() throws DeviceException, 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:
DeviceException
- Upon incompatibility with devicejava.io.IOException
- Upon communications error
-
setLineFilterEnabled
public void setLineFilterEnabled(boolean enabled) throws DeviceException, 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:
DeviceException
- Upon incompatibility with devicejava.io.IOException
- Upon communications error
-
-