Package jisa.devices.amp
Class SR830
- java.lang.Object
-
- jisa.visa.VISADevice
-
- jisa.devices.amp.SR830
-
- All Implemented Interfaces:
DPLockIn
,FMeter
,Instrument
,LockIn
public class SR830 extends VISADevice implements DPLockIn
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SR830.DataPacket
static class
SR830.RefMode
static class
SR830.TimeConst
-
Nested classes/interfaces inherited from interface jisa.devices.interfaces.Instrument
Instrument.AutoQuantity<S>, Instrument.OptionalQuantity<S>, Instrument.Parameter<S>, Instrument.Setter<S>, Instrument.TableQuantity
-
Nested classes/interfaces inherited from interface jisa.devices.interfaces.LockIn
LockIn.TrigMode
-
-
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 void
autoOffsetAmplitude()
void
autoOffsetX()
void
autoOffsetY()
void
autoRange(double factor, double intTime, long waitTime)
Instruct the lock-in to automatically determine the measurement range to use for the currently measured input.SR830.DataPacket
getAll()
Coupling
getCoupling()
Returns the input coupling mode of the lock-in.static java.lang.String
getDescription()
double
getExpansion()
Returns the signal expansion factor being usedLockIn.TrigMode
getExternalTriggerMode()
Returns the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).double
getFilterRollOff()
Returns the filter roll-off used by the lock-in.double
getFrequency()
Returns the frequency of the reference signaldouble
getFrequencyRange()
Returns the frequency measurement range being used by the instrument, in Hz.Impedance
getImpedanceMode()
Returns whether HIGH or LOW impedance mode is currently in use.Input
getInput()
Returns which input is currently being used by the lock-in.java.util.List<java.lang.Integer>
getLineFilterHarmonics()
Returns a list of all harmonics of the powerline frequency being filtered by the lock-in.double
getLockedAmplitude()
Returns the amplitude of the signal component locked on to by the amplifierdouble
getLockedPhase()
Returns of the phase of the locked-on signal (relative to the reference)double
getLockedX()
Returns the amplitude of the component of the signal in-phase with the reference signaldouble
getLockedY()
Returns the amplitude of the component of the signal 90 degrees out of phase with the reference signaldouble
getOffset()
Returns the offset currently being used by the lock-in.double
getRange()
Returns the maximum range, in Volts, that the instrument is measuring.double
getRefAmplitude()
Returns the amplitude of the reference signalLockIn.RefMode
getRefMode()
Returns whether the lock-in amplifier is using an internal or external reference signal.double
getRefPhase()
Returns the phase of the reference signalShield
getShielding()
Returns the currently used shielding mode for input connections.Source
getSource()
Returns which quantity is being used for measurement (voltage or current).SR830.TimeConst
getTimeConst()
double
getTimeConstant()
Returns the set time constant, in secondsboolean
isSyncFilterEnabled()
Returns whether the lock-in is currently using synchronous filtering.void
setCoupling(Coupling mode)
Sets the input coupling mode of the lock-in.void
setExpansion(double expand)
Sets the signal expansion factor to use.void
setExternalTriggerMode(LockIn.TrigMode mode)
Sets the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).void
setFilterRollOff(double dBperOct)
Sets the filter roll-off for the lock-in's input filter.void
setFrequencyRange(double range)
Sets the frequency measurement range to be used by the instrument.void
setImpedanceMode(Impedance mode)
Sets whether to use HIGH or LOW impedance mode for input signals.void
setInput(Input input)
Sets which input the lock-in should use.void
setLineFilterHarmonics(int... harmonics)
Attempts to set the lock-in to filter all the specified harmonics of the powerline frequency.void
setOffset(double offset)
Sets the offset for input measurements.void
setOffsetExpansion(double offset, double expansion)
void
setOscAmplitude(double amp)
Sets the amplitude of the internal oscillator output.void
setOscFrequency(double freq)
Sets the frequency of the internal oscillator of the amplifier (eg for internal reference)void
setOscPhase(double phase)
Sets the phase of the internal oscillatorvoid
setRange(double voltRange)
Sets the sensitivity of the instrument based on the maximum range of values you desire to measure.void
setRefMode(LockIn.RefMode mode)
Sets whether the lock-in amplifier is to use an internal or external reference signalvoid
setShielding(Shield mode)
Sets the shielding mode to use for input connections.void
setSource(Source source)
Sets which source quantity to be using for measurement (voltage or current).void
setSyncFilterEnabled(boolean flag)
Instructs the lock-in to use synchronous filtering (removes higher harmonics of reference frequency from signal).void
setTimeConstant(double seconds)
Sets the time constant to use for locking onto a signal (or closest over-approximation for devices with discrete settings)void
setTimeConstant(SR830.TimeConst mode)
-
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.DPLockIn
autoOffset
-
Methods inherited from interface jisa.devices.interfaces.Instrument
close, getAddress, getConfigurationParameters, getIDN, getLockObject, getName, setTimeout
-
Methods inherited from interface jisa.devices.interfaces.LockIn
autoRange, getConfigurationParameters, waitForStableLock, waitForStableLock
-
-
-
-
Constructor Detail
-
SR830
public SR830(Address address) throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
-
Method Detail
-
getDescription
public static java.lang.String getDescription()
-
getFrequency
public double getFrequency() throws java.io.IOException
Description copied from interface:LockIn
Returns the frequency of the reference signal- Specified by:
getFrequency
in interfaceFMeter
- Specified by:
getFrequency
in interfaceLockIn
- Returns:
- Frequency, in Hz
- Throws:
java.io.IOException
- Upon communication error
-
getFrequencyRange
public double getFrequencyRange() throws java.io.IOException, DeviceException
Description copied from interface:FMeter
Returns the frequency measurement range being used by the instrument, in Hz. A value of x indicates a range of +/- x.- Specified by:
getFrequencyRange
in interfaceFMeter
- Returns:
- Frequency range, in +/- Hz.
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon device compatibility error
-
setFrequencyRange
public void setFrequencyRange(double range) throws java.io.IOException, DeviceException
Description copied from interface:FMeter
Sets the frequency measurement range to be used by the instrument. Will select the smallest range option that contains the specified value.- Specified by:
setFrequencyRange
in interfaceFMeter
- Parameters:
range
- Frequency range to use, in Hz.- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon device compatibility error
-
getRefPhase
public double getRefPhase() throws java.io.IOException
Description copied from interface:LockIn
Returns the phase of the reference signal- Specified by:
getRefPhase
in interfaceLockIn
- Returns:
- Phase, in degrees
- Throws:
java.io.IOException
- Upon communication error
-
getRefAmplitude
public double getRefAmplitude() throws java.io.IOException
Description copied from interface:LockIn
Returns the amplitude of the reference signal- Specified by:
getRefAmplitude
in interfaceLockIn
- Returns:
- Amplitude, in Volts
- Throws:
java.io.IOException
- Upon communication error
-
setOscFrequency
public void setOscFrequency(double freq) throws java.io.IOException
Description copied from interface:LockIn
Sets the frequency of the internal oscillator of the amplifier (eg for internal reference)- Specified by:
setOscFrequency
in interfaceLockIn
- Parameters:
freq
- Frequency, in Hz- Throws:
java.io.IOException
- Upon communication error
-
setOscPhase
public void setOscPhase(double phase) throws java.io.IOException
Description copied from interface:LockIn
Sets the phase of the internal oscillator- Specified by:
setOscPhase
in interfaceLockIn
- Parameters:
phase
- Phase, in degrees- Throws:
java.io.IOException
- Upon communication error
-
setOscAmplitude
public void setOscAmplitude(double amp) throws java.io.IOException
Description copied from interface:LockIn
Sets the amplitude of the internal oscillator output.- Specified by:
setOscAmplitude
in interfaceLockIn
- Parameters:
amp
- Amplitude, in volts- Throws:
java.io.IOException
- Upon communication error
-
getRefMode
public LockIn.RefMode getRefMode() throws java.io.IOException
Description copied from interface:LockIn
Returns whether the lock-in amplifier is using an internal or external reference signal.- Specified by:
getRefMode
in interfaceLockIn
- Returns:
- INTERNAL or EXTERNAL
- Throws:
java.io.IOException
- Upon communication error
-
setRefMode
public void setRefMode(LockIn.RefMode mode) throws java.io.IOException
Description copied from interface:LockIn
Sets whether the lock-in amplifier is to use an internal or external reference signal- Specified by:
setRefMode
in interfaceLockIn
- Parameters:
mode
- INTERNAL or EXTERNAL- Throws:
java.io.IOException
- Upon communication error
-
getLockedX
public double getLockedX() throws java.io.IOException
Description copied from interface:DPLockIn
Returns the amplitude of the component of the signal in-phase with the reference signal- Specified by:
getLockedX
in interfaceDPLockIn
- Returns:
- Amplitude, in volts
- Throws:
java.io.IOException
- Upon communication error
-
getLockedY
public double getLockedY() throws java.io.IOException
Description copied from interface:DPLockIn
Returns the amplitude of the component of the signal 90 degrees out of phase with the reference signal- Specified by:
getLockedY
in interfaceDPLockIn
- Returns:
- Amplitude, in volts
- Throws:
java.io.IOException
- Upon communication error
-
getLockedAmplitude
public double getLockedAmplitude() throws java.io.IOException
Description copied from interface:LockIn
Returns the amplitude of the signal component locked on to by the amplifier- Specified by:
getLockedAmplitude
in interfaceLockIn
- Returns:
- Amplitude, in Volts
- Throws:
java.io.IOException
- Upon communication error
-
getLockedPhase
public double getLockedPhase() throws java.io.IOException
Description copied from interface:DPLockIn
Returns of the phase of the locked-on signal (relative to the reference)- Specified by:
getLockedPhase
in interfaceDPLockIn
- Returns:
- Phase, in degrees
- Throws:
java.io.IOException
- Upon communication error
-
getAll
public SR830.DataPacket getAll() throws java.io.IOException
- Throws:
java.io.IOException
-
getTimeConstant
public double getTimeConstant() throws java.io.IOException
Description copied from interface:LockIn
Returns the set time constant, in seconds- Specified by:
getTimeConstant
in interfaceLockIn
- Returns:
- Time constant, in seconds
- Throws:
java.io.IOException
- Upon communication error
-
setTimeConstant
public void setTimeConstant(double seconds) throws java.io.IOException
Description copied from interface:LockIn
Sets the time constant to use for locking onto a signal (or closest over-approximation for devices with discrete settings)- Specified by:
setTimeConstant
in interfaceLockIn
- Parameters:
seconds
- Time constant, in seconds- Throws:
java.io.IOException
- Upon communication error
-
setTimeConstant
public void setTimeConstant(SR830.TimeConst mode) throws java.io.IOException
- Throws:
java.io.IOException
-
getRange
public double getRange() throws java.io.IOException
Description copied from interface:LockIn
Returns the maximum range, in Volts, that the instrument is measuring.
-
setRange
public void setRange(double voltRange) throws java.io.IOException, DeviceException
Description copied from interface:LockIn
Sets the sensitivity of the instrument based on the maximum range of values you desire to measure.- Specified by:
setRange
in interfaceLockIn
- Parameters:
voltRange
- +/- Range, in Volts- Throws:
java.io.IOException
- Upon communication errorDeviceException
- Upon compatibility error (eg sensitivity greater than can be achieved by instrument)
-
setSyncFilterEnabled
public void setSyncFilterEnabled(boolean flag) throws java.io.IOException
Description copied from interface:LockIn
Instructs the lock-in to use synchronous filtering (removes higher harmonics of reference frequency from signal).- Specified by:
setSyncFilterEnabled
in interfaceLockIn
- Parameters:
flag
- Should this feature be enabled?- Throws:
java.io.IOException
- Upon communication error
-
isSyncFilterEnabled
public boolean isSyncFilterEnabled() throws java.io.IOException
Description copied from interface:LockIn
Returns whether the lock-in is currently using synchronous filtering.- Specified by:
isSyncFilterEnabled
in interfaceLockIn
- Returns:
- Enabled?
- Throws:
java.io.IOException
- Upon communication error
-
getFilterRollOff
public double getFilterRollOff() throws java.io.IOException
Description copied from interface:LockIn
Returns the filter roll-off used by the lock-in.- Specified by:
getFilterRollOff
in interfaceLockIn
- Returns:
- Roll-off in dB/oct
- Throws:
java.io.IOException
- Upon communication error
-
setFilterRollOff
public void setFilterRollOff(double dBperOct) throws java.io.IOException
Description copied from interface:LockIn
Sets the filter roll-off for the lock-in's input filter.- Specified by:
setFilterRollOff
in interfaceLockIn
- Parameters:
dBperOct
- Roll-off in dB/oct- Throws:
java.io.IOException
- Upon communication error
-
getCoupling
public Coupling getCoupling() throws java.io.IOException
Description copied from interface:LockIn
Returns the input coupling mode of the lock-in.- Specified by:
getCoupling
in interfaceLockIn
- Returns:
- AC or DC
- Throws:
java.io.IOException
- Upon communication error
-
setCoupling
public void setCoupling(Coupling mode) throws java.io.IOException, DeviceException
Description copied from interface:LockIn
Sets the input coupling mode of the lock-in.- Specified by:
setCoupling
in interfaceLockIn
- Parameters:
mode
- AC or DC?- Throws:
java.io.IOException
- Upon communication errorDeviceException
- Upon compatibility error
-
getShielding
public Shield getShielding() throws java.io.IOException
Description copied from interface:LockIn
Returns the currently used shielding mode for input connections.- Specified by:
getShielding
in interfaceLockIn
- Returns:
- Shield.FLOAT or Shield.GROUND
- Throws:
java.io.IOException
- Upon communication error
-
setShielding
public void setShielding(Shield mode) throws java.io.IOException
Description copied from interface:LockIn
Sets the shielding mode to use for input connections.- Specified by:
setShielding
in interfaceLockIn
- Parameters:
mode
- Shield.FLOAT or Shield.GROUND- Throws:
java.io.IOException
- Upon communication error
-
getLineFilterHarmonics
public java.util.List<java.lang.Integer> getLineFilterHarmonics() throws java.io.IOException
Description copied from interface:LockIn
Returns a list of all harmonics of the powerline frequency being filtered by the lock-in.- Specified by:
getLineFilterHarmonics
in interfaceLockIn
- Returns:
- List of harmonics (list of integers)
- Throws:
java.io.IOException
- Upon communication error
-
setLineFilterHarmonics
public void setLineFilterHarmonics(int... harmonics) throws java.io.IOException
Description copied from interface:LockIn
Attempts to set the lock-in to filter all the specified harmonics of the powerline frequency. Any unavailable harmonics will be ignored.- Specified by:
setLineFilterHarmonics
in interfaceLockIn
- Parameters:
harmonics
- Harmonics to filter, as integers (ie 1, 4, 5 for 1st 4th and 5th)- Throws:
java.io.IOException
- Upon communication error
-
setOffsetExpansion
public void setOffsetExpansion(double offset, double expansion) throws java.io.IOException
- Throws:
java.io.IOException
-
getOffset
public double getOffset() throws java.io.IOException
Description copied from interface:LockIn
Returns the offset currently being used by the lock-in.
-
setOffset
public void setOffset(double offset) throws java.io.IOException
Description copied from interface:LockIn
Sets the offset for input measurements.
-
getExpansion
public double getExpansion() throws java.io.IOException
Description copied from interface:LockIn
Returns the signal expansion factor being used- Specified by:
getExpansion
in interfaceLockIn
- Returns:
- Expansion factor
- Throws:
java.io.IOException
- Upon communication error
-
setExpansion
public void setExpansion(double expand) throws java.io.IOException
Description copied from interface:LockIn
Sets the signal expansion factor to use. Will choose closest discrete option if not continuous.- Specified by:
setExpansion
in interfaceLockIn
- Parameters:
expand
- Expansion factor- Throws:
java.io.IOException
- Upon communication error
-
autoOffsetX
public void autoOffsetX() throws java.io.IOException
- Specified by:
autoOffsetX
in interfaceDPLockIn
- Throws:
java.io.IOException
-
autoOffsetY
public void autoOffsetY() throws java.io.IOException
- Specified by:
autoOffsetY
in interfaceDPLockIn
- Throws:
java.io.IOException
-
autoOffsetAmplitude
public void autoOffsetAmplitude() throws java.io.IOException
- Specified by:
autoOffsetAmplitude
in interfaceDPLockIn
- Throws:
java.io.IOException
-
autoRange
public void autoRange(double factor, double intTime, long waitTime) throws java.io.IOException, DeviceException, java.lang.InterruptedException
Description copied from interface:LockIn
Instruct the lock-in to automatically determine the measurement range to use for the currently measured input. This is done by picking the smallest range (multiplied by the supplied factor) within which the current value fits within after any offsetting. Does not return until completed.- Specified by:
autoRange
in interfaceLockIn
- Parameters:
factor
- Multiplicative factor used to modify the range (i.e. 0.5 would mean the value must fit within half of the range selected)- Throws:
java.io.IOException
- Upon communication errorDeviceException
- Upon compatibility errorjava.lang.InterruptedException
- Upon interruption error
-
getExternalTriggerMode
public LockIn.TrigMode getExternalTriggerMode() throws java.io.IOException
Description copied from interface:LockIn
Returns the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).- Specified by:
getExternalTriggerMode
in interfaceLockIn
- Returns:
- Triggering mode
- Throws:
java.io.IOException
- Upon communication error
-
setExternalTriggerMode
public void setExternalTriggerMode(LockIn.TrigMode mode) throws java.io.IOException
Description copied from interface:LockIn
Sets the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).- Specified by:
setExternalTriggerMode
in interfaceLockIn
- Parameters:
mode
- Triggering mode- Throws:
java.io.IOException
- Upon communication error
-
setInput
public void setInput(Input input) throws java.io.IOException
Description copied from interface:LockIn
Sets which input the lock-in should use.
-
getInput
public Input getInput() throws java.io.IOException
Description copied from interface:LockIn
Returns which input is currently being used by the lock-in.
-
setSource
public void setSource(Source source) throws java.io.IOException
Description copied from interface:LockIn
Sets which source quantity to be using for measurement (voltage or current).
-
getSource
public Source getSource() throws java.io.IOException
Description copied from interface:LockIn
Returns which quantity is being used for measurement (voltage or current).
-
setImpedanceMode
public void setImpedanceMode(Impedance mode) throws java.io.IOException
Description copied from interface:LockIn
Sets whether to use HIGH or LOW impedance mode for input signals.- Specified by:
setImpedanceMode
in interfaceLockIn
- Parameters:
mode
- Impedance.HIGH or Impedance.LOW- Throws:
java.io.IOException
- Upon communication error
-
getImpedanceMode
public Impedance getImpedanceMode() throws java.io.IOException
Description copied from interface:LockIn
Returns whether HIGH or LOW impedance mode is currently in use.- Specified by:
getImpedanceMode
in interfaceLockIn
- Returns:
- Impedance.HIGH or Impedance.LOW
- Throws:
java.io.IOException
- Upon communication error
-
getTimeConst
public SR830.TimeConst getTimeConst() throws java.io.IOException
- Throws:
java.io.IOException
-
-