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 classSR830.DataPacketstatic classSR830.RefModestatic classSR830.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 voidautoOffsetAmplitude()voidautoOffsetX()voidautoOffsetY()voidautoRange(double factor, double intTime, long waitTime)Instruct the lock-in to automatically determine the measurement range to use for the currently measured input.SR830.DataPacketgetAll()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 signaldoublegetFrequencyRange()Returns the frequency measurement range being used by the instrument, in Hz.ImpedancegetImpedanceMode()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 amplifierdoublegetLockedPhase()Returns of the phase of the locked-on signal (relative to the reference)doublegetLockedX()Returns the amplitude of the component of the signal in-phase with the reference signaldoublegetLockedY()Returns the amplitude of the component of the signal 90 degrees out of phase with the reference signaldoublegetOffset()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).SR830.TimeConstgetTimeConst()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.voidsetFrequencyRange(double range)Sets the frequency measurement range to be used by the instrument.voidsetImpedanceMode(Impedance mode)Sets whether to use HIGH or LOW impedance mode for input signals.voidsetInput(Input input)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.voidsetOffsetExpansion(double offset, double expansion)voidsetOscAmplitude(double amp)Sets the amplitude of the internal oscillator output.voidsetOscFrequency(double freq)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 voltRange)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)voidsetTimeConstant(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.IOExceptionDeviceException
-
-
Method Detail
-
getDescription
public static java.lang.String getDescription()
-
getFrequency
public double getFrequency() throws java.io.IOExceptionDescription copied from interface:LockInReturns the frequency of the reference signal- Specified by:
getFrequencyin interfaceFMeter- Specified by:
getFrequencyin interfaceLockIn- Returns:
- Frequency, in Hz
- Throws:
java.io.IOException- Upon communication error
-
getFrequencyRange
public double getFrequencyRange() throws java.io.IOException, DeviceExceptionDescription copied from interface:FMeterReturns the frequency measurement range being used by the instrument, in Hz. A value of x indicates a range of +/- x.- Specified by:
getFrequencyRangein 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, DeviceExceptionDescription copied from interface:FMeterSets the frequency measurement range to be used by the instrument. Will select the smallest range option that contains the specified value.- Specified by:
setFrequencyRangein 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.IOExceptionDescription copied from interface:LockInReturns the phase of the reference signal- Specified by:
getRefPhasein interfaceLockIn- Returns:
- Phase, in degrees
- Throws:
java.io.IOException- Upon communication error
-
getRefAmplitude
public double getRefAmplitude() throws java.io.IOExceptionDescription copied from interface:LockInReturns the amplitude of the reference signal- Specified by:
getRefAmplitudein interfaceLockIn- Returns:
- Amplitude, in Volts
- Throws:
java.io.IOException- Upon communication error
-
setOscFrequency
public void setOscFrequency(double freq) throws java.io.IOExceptionDescription copied from interface:LockInSets the frequency of the internal oscillator of the amplifier (eg for internal reference)- Specified by:
setOscFrequencyin interfaceLockIn- Parameters:
freq- Frequency, in Hz- Throws:
java.io.IOException- Upon communication error
-
setOscPhase
public void setOscPhase(double phase) throws java.io.IOExceptionDescription copied from interface:LockInSets the phase of the internal oscillator- Specified by:
setOscPhasein interfaceLockIn- Parameters:
phase- Phase, in degrees- Throws:
java.io.IOException- Upon communication error
-
setOscAmplitude
public void setOscAmplitude(double amp) throws java.io.IOExceptionDescription copied from interface:LockInSets the amplitude of the internal oscillator output.- Specified by:
setOscAmplitudein 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:LockInReturns whether the lock-in amplifier is using an internal or external reference signal.- Specified by:
getRefModein 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:LockInSets whether the lock-in amplifier is to use an internal or external reference signal- Specified by:
setRefModein interfaceLockIn- Parameters:
mode- INTERNAL or EXTERNAL- Throws:
java.io.IOException- Upon communication error
-
getLockedX
public double getLockedX() throws java.io.IOExceptionDescription copied from interface:DPLockInReturns the amplitude of the component of the signal in-phase with the reference signal- Specified by:
getLockedXin interfaceDPLockIn- Returns:
- Amplitude, in volts
- Throws:
java.io.IOException- Upon communication error
-
getLockedY
public double getLockedY() throws java.io.IOExceptionDescription copied from interface:DPLockInReturns the amplitude of the component of the signal 90 degrees out of phase with the reference signal- Specified by:
getLockedYin interfaceDPLockIn- Returns:
- Amplitude, in volts
- Throws:
java.io.IOException- Upon communication error
-
getLockedAmplitude
public double getLockedAmplitude() throws java.io.IOExceptionDescription copied from interface:LockInReturns the amplitude of the signal component locked on to by the amplifier- Specified by:
getLockedAmplitudein interfaceLockIn- Returns:
- Amplitude, in Volts
- Throws:
java.io.IOException- Upon communication error
-
getLockedPhase
public double getLockedPhase() throws java.io.IOExceptionDescription copied from interface:DPLockInReturns of the phase of the locked-on signal (relative to the reference)- Specified by:
getLockedPhasein 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.IOExceptionDescription copied from interface:LockInReturns the set time constant, in seconds- Specified by:
getTimeConstantin interfaceLockIn- Returns:
- Time constant, in seconds
- Throws:
java.io.IOException- Upon communication error
-
setTimeConstant
public void setTimeConstant(double seconds) throws java.io.IOExceptionDescription copied from interface:LockInSets the time constant to use for locking onto a signal (or closest over-approximation for devices with discrete settings)- Specified by:
setTimeConstantin 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.IOExceptionDescription copied from interface:LockInReturns the maximum range, in Volts, that the instrument is measuring.
-
setRange
public void setRange(double voltRange) throws java.io.IOException, DeviceExceptionDescription copied from interface:LockInSets the sensitivity of the instrument based on the maximum range of values you desire to measure.- Specified by:
setRangein 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.IOExceptionDescription copied from interface:LockInInstructs the lock-in to use synchronous filtering (removes higher harmonics of reference frequency from signal).- Specified by:
setSyncFilterEnabledin interfaceLockIn- Parameters:
flag- Should this feature be enabled?- Throws:
java.io.IOException- Upon communication error
-
isSyncFilterEnabled
public boolean isSyncFilterEnabled() throws java.io.IOExceptionDescription copied from interface:LockInReturns whether the lock-in is currently using synchronous filtering.- Specified by:
isSyncFilterEnabledin interfaceLockIn- Returns:
- Enabled?
- Throws:
java.io.IOException- Upon communication error
-
getFilterRollOff
public double getFilterRollOff() throws java.io.IOExceptionDescription copied from interface:LockInReturns the filter roll-off used by the lock-in.- Specified by:
getFilterRollOffin interfaceLockIn- Returns:
- Roll-off in dB/oct
- Throws:
java.io.IOException- Upon communication error
-
setFilterRollOff
public void setFilterRollOff(double dBperOct) throws java.io.IOExceptionDescription copied from interface:LockInSets the filter roll-off for the lock-in's input filter.- Specified by:
setFilterRollOffin 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:LockInReturns the input coupling mode of the lock-in.- Specified by:
getCouplingin 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:LockInSets the input coupling mode of the lock-in.- Specified by:
setCouplingin 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:LockInReturns the currently used shielding mode for input connections.- Specified by:
getShieldingin 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:LockInSets the shielding mode to use for input connections.- Specified by:
setShieldingin 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.IOExceptionDescription copied from interface:LockInReturns a list of all harmonics of the powerline frequency being filtered by the lock-in.- Specified by:
getLineFilterHarmonicsin interfaceLockIn- Returns:
- List of harmonics (list of integers)
- Throws:
java.io.IOException- Upon communication error
-
setLineFilterHarmonics
public void setLineFilterHarmonics(int... harmonics) throws java.io.IOExceptionDescription copied from interface:LockInAttempts to set the lock-in to filter all the specified harmonics of the powerline frequency. Any unavailable harmonics will be ignored.- Specified by:
setLineFilterHarmonicsin 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.IOExceptionDescription copied from interface:LockInReturns the offset currently being used by the lock-in.
-
setOffset
public void setOffset(double offset) throws java.io.IOExceptionDescription copied from interface:LockInSets the offset for input measurements.
-
getExpansion
public double getExpansion() throws java.io.IOExceptionDescription copied from interface:LockInReturns the signal expansion factor being used- Specified by:
getExpansionin interfaceLockIn- Returns:
- Expansion factor
- Throws:
java.io.IOException- Upon communication error
-
setExpansion
public void setExpansion(double expand) throws java.io.IOExceptionDescription copied from interface:LockInSets the signal expansion factor to use. Will choose closest discrete option if not continuous.- Specified by:
setExpansionin interfaceLockIn- Parameters:
expand- Expansion factor- Throws:
java.io.IOException- Upon communication error
-
autoOffsetX
public void autoOffsetX() throws java.io.IOException- Specified by:
autoOffsetXin interfaceDPLockIn- Throws:
java.io.IOException
-
autoOffsetY
public void autoOffsetY() throws java.io.IOException- Specified by:
autoOffsetYin interfaceDPLockIn- Throws:
java.io.IOException
-
autoOffsetAmplitude
public void autoOffsetAmplitude() throws java.io.IOException- Specified by:
autoOffsetAmplitudein interfaceDPLockIn- Throws:
java.io.IOException
-
autoRange
public void autoRange(double factor, double intTime, long waitTime) throws java.io.IOException, DeviceException, java.lang.InterruptedExceptionDescription copied from interface:LockInInstruct 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:
autoRangein 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:LockInReturns the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).- Specified by:
getExternalTriggerModein 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:LockInSets the triggering mode used for external referencing (SINE, POS_TTL, NEG_TTL).- Specified by:
setExternalTriggerModein 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:LockInSets which input the lock-in should use.
-
getInput
public Input getInput() throws java.io.IOException
Description copied from interface:LockInReturns which input is currently being used by the lock-in.
-
setSource
public void setSource(Source source) throws java.io.IOException
Description copied from interface:LockInSets which source quantity to be using for measurement (voltage or current).
-
getSource
public Source getSource() throws java.io.IOException
Description copied from interface:LockInReturns which quantity is being used for measurement (voltage or current).
-
setImpedanceMode
public void setImpedanceMode(Impedance mode) throws java.io.IOException
Description copied from interface:LockInSets whether to use HIGH or LOW impedance mode for input signals.- Specified by:
setImpedanceModein 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:LockInReturns whether HIGH or LOW impedance mode is currently in use.- Specified by:
getImpedanceModein 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
-
-