Package jisa.devices.interfaces
Interface LockIn
- 
- All Superinterfaces:
 FMeter,Instrument
- All Known Subinterfaces:
 DPLockIn
- All Known Implementing Classes:
 SR830
public interface LockIn extends Instrument, FMeter
Abstract class to define the standard functionality of lock-in amplifiers 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLockIn.RefModeEnumeration of reference modesstatic classLockIn.TrigModeEnumeration of reference triggering modes- 
Nested classes/interfaces inherited from interface jisa.devices.interfaces.Instrument
Instrument.AutoQuantity<S>, Instrument.OptionalQuantity<S>, Instrument.Parameter<S>, Instrument.Setter<S>, Instrument.TableQuantity 
 - 
 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidautoOffset()Instruct the lock-in to automatically determine the offset to use.default voidautoRange()voidautoRange(double factor, double integrationTime, long waitTime)Instruct the lock-in to automatically determine the measurement range to use for the currently measured input.default java.util.List<Instrument.Parameter<?>>getConfigurationParameters(java.lang.Class<?> target)CouplinggetCoupling()Returns the input coupling mode of the lock-in.static java.lang.StringgetDescription()doublegetExpansion()Returns the signal expansion factor being usedLockIn.TrigModegetExternalTriggerMode()Returns the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).doublegetFilterRollOff()Returns the filter roll-off used by the lock-in.doublegetFrequency()Returns the frequency of the reference signalImpedancegetImpedanceMode()Returns whether HIGH or LOW impedance mode is currently in use.InputgetInput()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.doublegetLockedAmplitude()Returns the amplitude of the signal component locked on to by the amplifierdoublegetOffset()Returns the offset currently being used by the lock-in.doublegetRange()Returns the maximum range, in Volts, that the instrument is measuring.doublegetRefAmplitude()Returns the amplitude of the reference signalLockIn.RefModegetRefMode()Returns whether the lock-in amplifier is using an internal or external reference signal.doublegetRefPhase()Returns the phase of the reference signalShieldgetShielding()Returns the currently used shielding mode for input connections.SourcegetSource()Returns which quantity is being used for measurement (voltage or current).doublegetTimeConstant()Returns the set time constant, in secondsbooleanisSyncFilterEnabled()Returns whether the lock-in is currently using synchronous filtering.voidsetCoupling(Coupling mode)Sets the input coupling mode of the lock-in.voidsetExpansion(double expand)Sets the signal expansion factor to use.voidsetExternalTriggerMode(LockIn.TrigMode mode)Sets the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).voidsetFilterRollOff(double dBperOct)Sets the filter roll-off for the lock-in's input filter.voidsetImpedanceMode(Impedance mode)Sets whether to use HIGH or LOW impedance mode for input signals.voidsetInput(Input source)Sets which input the lock-in should use.voidsetLineFilterHarmonics(int... harmonics)Attempts to set the lock-in to filter all the specified harmonics of the powerline frequency.voidsetOffset(double offset)Sets the offset for input measurements.voidsetOscAmplitude(double level)Sets the amplitude of the internal oscillator output.voidsetOscFrequency(double frequency)Sets the frequency of the internal oscillator of the amplifier (eg for internal reference)voidsetOscPhase(double phase)Sets the phase of the internal oscillatorvoidsetRange(double range)Sets the sensitivity of the instrument based on the maximum range of values you desire to measure.voidsetRefMode(LockIn.RefMode mode)Sets whether the lock-in amplifier is to use an internal or external reference signalvoidsetShielding(Shield mode)Sets the shielding mode to use for input connections.voidsetSource(Source source)Sets which source quantity to be using for measurement (voltage or current).voidsetSyncFilterEnabled(boolean flag)Instructs the lock-in to use synchronous filtering (removes higher harmonics of reference frequency from signal).voidsetTimeConstant(double seconds)Sets the time constant to use for locking onto a signal (or closest over-approximation for devices with discrete settings)default voidwaitForStableLock()Halts the current thread (ie pauses the program) until the lock-in has a stable lock (ie the locked-on amplitude has not varied by more than 0.1% in 5 seconds).default voidwaitForStableLock(double pctMargin, long duration)Halts the current thread (ie pauses the program) until the lock-in has a stable lock (ie the locked-on amplitude has remained within the given percentage margin for at least the specified number of milliseconds).- 
Methods inherited from interface jisa.devices.interfaces.FMeter
getFrequencyRange, setFrequencyRange 
- 
Methods inherited from interface jisa.devices.interfaces.Instrument
close, getAddress, getConfigurationParameters, getIDN, getLockObject, getName, setTimeout 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getDescription
static java.lang.String getDescription()
 
- 
getConfigurationParameters
default java.util.List<Instrument.Parameter<?>> getConfigurationParameters(java.lang.Class<?> target)
- Specified by:
 getConfigurationParametersin interfaceFMeter- Specified by:
 getConfigurationParametersin interfaceInstrument
 
- 
getRefMode
LockIn.RefMode getRefMode() throws java.io.IOException, DeviceException
Returns whether the lock-in amplifier is using an internal or external reference signal.- Returns:
 - INTERNAL or EXTERNAL
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setRefMode
void setRefMode(LockIn.RefMode mode) throws java.io.IOException, DeviceException
Sets whether the lock-in amplifier is to use an internal or external reference signal- Parameters:
 mode- INTERNAL or EXTERNAL- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setOscFrequency
void setOscFrequency(double frequency) throws java.io.IOException, DeviceExceptionSets the frequency of the internal oscillator of the amplifier (eg for internal reference)- Parameters:
 frequency- Frequency, in Hz- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setOscPhase
void setOscPhase(double phase) throws java.io.IOException, DeviceExceptionSets the phase of the internal oscillator- Parameters:
 phase- Phase, in degrees- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setOscAmplitude
void setOscAmplitude(double level) throws java.io.IOException, DeviceExceptionSets the amplitude of the internal oscillator output.- Parameters:
 level- Amplitude, in volts- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getFrequency
double getFrequency() throws java.io.IOException, DeviceExceptionReturns the frequency of the reference signal- Specified by:
 getFrequencyin interfaceFMeter- Returns:
 - Frequency, in Hz
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getRefPhase
double getRefPhase() throws java.io.IOException, DeviceExceptionReturns the phase of the reference signal- Returns:
 - Phase, in degrees
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getRefAmplitude
double getRefAmplitude() throws java.io.IOException, DeviceExceptionReturns the amplitude of the reference signal- Returns:
 - Amplitude, in Volts
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getLockedAmplitude
double getLockedAmplitude() throws java.io.IOException, DeviceExceptionReturns the amplitude of the signal component locked on to by the amplifier- Returns:
 - Amplitude, in Volts
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getTimeConstant
double getTimeConstant() throws java.io.IOException, DeviceExceptionReturns the set time constant, in seconds- Returns:
 - Time constant, in seconds
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setTimeConstant
void setTimeConstant(double seconds) throws java.io.IOException, DeviceExceptionSets the time constant to use for locking onto a signal (or closest over-approximation for devices with discrete settings)- Parameters:
 seconds- Time constant, in seconds- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getRange
double getRange() throws java.io.IOException, DeviceExceptionReturns the maximum range, in Volts, that the instrument is measuring.- Returns:
 - +/- Range, in Volts
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setRange
void setRange(double range) throws java.io.IOException, DeviceExceptionSets the sensitivity of the instrument based on the maximum range of values you desire to measure.- Parameters:
 range- +/- Range, in Volts- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error (eg sensitivity greater than can be achieved by instrument)
 
- 
isSyncFilterEnabled
boolean isSyncFilterEnabled() throws java.io.IOException, DeviceExceptionReturns whether the lock-in is currently using synchronous filtering.- Returns:
 - Enabled?
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setSyncFilterEnabled
void setSyncFilterEnabled(boolean flag) throws java.io.IOException, DeviceExceptionInstructs the lock-in to use synchronous filtering (removes higher harmonics of reference frequency from signal).- Parameters:
 flag- Should this feature be enabled?- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getFilterRollOff
double getFilterRollOff() throws java.io.IOException, DeviceExceptionReturns the filter roll-off used by the lock-in.- Returns:
 - Roll-off in dB/oct
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setFilterRollOff
void setFilterRollOff(double dBperOct) throws java.io.IOException, DeviceExceptionSets the filter roll-off for the lock-in's input filter.- Parameters:
 dBperOct- Roll-off in dB/oct- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getCoupling
Coupling getCoupling() throws java.io.IOException, DeviceException
Returns the input coupling mode of the lock-in.- Returns:
 - AC or DC
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setCoupling
void setCoupling(Coupling mode) throws java.io.IOException, DeviceException
Sets the input coupling mode of the lock-in.- Parameters:
 mode- AC or DC?- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getShielding
Shield getShielding() throws java.io.IOException, DeviceException
Returns the currently used shielding mode for input connections.- Returns:
 - Shield.FLOAT or Shield.GROUND
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setShielding
void setShielding(Shield mode) throws java.io.IOException, DeviceException
Sets the shielding mode to use for input connections.- Parameters:
 mode- Shield.FLOAT or Shield.GROUND- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getInput
Input getInput() throws java.io.IOException, DeviceException
Returns which input is currently being used by the lock-in.- Returns:
 - Input: A, B or DIFF (A - B)
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setInput
void setInput(Input source) throws java.io.IOException, DeviceException
Sets which input the lock-in should use.- Parameters:
 source- Input: A, B or DIFF (A - B)- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getSource
Source getSource() throws java.io.IOException, DeviceException
Returns which quantity is being used for measurement (voltage or current).- Returns:
 - Source.VOLTAGE or Source.CURRENT
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setSource
void setSource(Source source) throws java.io.IOException, DeviceException
Sets which source quantity to be using for measurement (voltage or current).- Parameters:
 source- Source.VOLTAGE or Source.CURRENT- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getImpedanceMode
Impedance getImpedanceMode() throws java.io.IOException, DeviceException
Returns whether HIGH or LOW impedance mode is currently in use.- Returns:
 - Impedance.HIGH or Impedance.LOW
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setImpedanceMode
void setImpedanceMode(Impedance mode) throws java.io.IOException, DeviceException
Sets whether to use HIGH or LOW impedance mode for input signals.- Parameters:
 mode- Impedance.HIGH or Impedance.LOW- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getLineFilterHarmonics
java.util.List<java.lang.Integer> getLineFilterHarmonics() throws java.io.IOException, DeviceExceptionReturns a list of all harmonics of the powerline frequency being filtered by the lock-in.- Returns:
 - List of harmonics (list of integers)
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setLineFilterHarmonics
void setLineFilterHarmonics(int... harmonics) throws java.io.IOException, DeviceExceptionAttempts to set the lock-in to filter all the specified harmonics of the powerline frequency. Any unavailable harmonics will be ignored.- Parameters:
 harmonics- Harmonics to filter, as integers (ie 1, 4, 5 for 1st 4th and 5th)- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getOffset
double getOffset() throws java.io.IOException, DeviceExceptionReturns the offset currently being used by the lock-in.- Returns:
 - Offset as % of measurement range
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setOffset
void setOffset(double offset) throws java.io.IOException, DeviceExceptionSets the offset for input measurements.- Parameters:
 offset- Offset as % of measurement range- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
getExpansion
double getExpansion() throws java.io.IOException, DeviceExceptionReturns the signal expansion factor being used- Returns:
 - Expansion factor
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setExpansion
void setExpansion(double expand) throws java.io.IOException, DeviceExceptionSets the signal expansion factor to use. Will choose closest discrete option if not continuous.- Parameters:
 expand- Expansion factor- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
autoOffset
void autoOffset() throws java.io.IOException, DeviceExceptionInstruct the lock-in to automatically determine the offset to use.- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
autoRange
void autoRange(double factor, double integrationTime, long waitTime) throws java.io.IOException, DeviceException, java.lang.InterruptedExceptionInstruct 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.- 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)factor-- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility errorjava.lang.InterruptedException- Upon interruption error
 
- 
autoRange
default void autoRange() throws java.io.IOException, DeviceException, java.lang.InterruptedException- Throws:
 java.io.IOExceptionDeviceExceptionjava.lang.InterruptedException
 
- 
getExternalTriggerMode
LockIn.TrigMode getExternalTriggerMode() throws java.io.IOException, DeviceException
Returns the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).- Returns:
 - Triggering mode
 - Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
setExternalTriggerMode
void setExternalTriggerMode(LockIn.TrigMode mode) throws java.io.IOException, DeviceException
Sets the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).- Parameters:
 mode- Triggering mode- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility error
 
- 
waitForStableLock
default void waitForStableLock(double pctMargin, long duration) throws java.io.IOException, DeviceException, java.lang.InterruptedExceptionHalts the current thread (ie pauses the program) until the lock-in has a stable lock (ie the locked-on amplitude has remained within the given percentage margin for at least the specified number of milliseconds).- Parameters:
 pctMargin- Percentage margin within which to consider amplitude constantduration- Minimum duration to be considered stable, in milliseconds- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility errorjava.lang.InterruptedException- Upon interruption error
 
- 
waitForStableLock
default void waitForStableLock() throws java.io.IOException, DeviceException, java.lang.InterruptedExceptionHalts the current thread (ie pauses the program) until the lock-in has a stable lock (ie the locked-on amplitude has not varied by more than 0.1% in 5 seconds).- Throws:
 java.io.IOException- Upon communication errorDeviceException- Upon compatibility errorjava.lang.InterruptedException- Upon interruption error
 
 - 
 
 -