LockIn - OE-FET/JISA GitHub Wiki
Reference: Lock-In Amplifiers
public abstract class LockIn extends VISADevice
Abstract class to define the standard functionality of lock-in amplifiers
This page has been generated from the JavaDoc of the abstract LockIn
class. Its purpose is to provide an overview of the methods shared by all classes extending from it. Simply put, this page details the functions shared by all Lock-In Amplifier classes.
Abstract Methods
This section details methods that the abstract class LockIn
requires all extending (non-abstract) classes to implement. That is to say for users of this library all LockIn
based classes will provide these functions and for developers any LockIn
derived class that you create must implement these (otherwise your class will not compile).
setRefMode
public abstract void setRefMode(RefMode mode) throws IOException, DeviceException
Sets whether the lock-in amplifier is to use an internal or external reference signal
-
Parameters:
mode
— INTERNAL or EXTERNAL -
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
setOscFrequency
public abstract void setOscFrequency(double frequency) throws IOException, DeviceException
Sets the frequency of the internal oscillator of the amplifier (eg for internal reference)
-
Parameters:
frequency
— Frequency, in Hz -
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
setOscPhase
public abstract void setOscPhase(double phase) throws IOException, DeviceException
Sets the phase of the internal oscillator
-
Parameters:
phase
— Phase, in degrees -
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
setOscAmplitude
public abstract void setOscAmplitude(double level) throws IOException, DeviceException
Sets the amplitude of the internal oscillator output.
-
Parameters:
level
— Amplitude, in volts -
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
setTimeConstant
public abstract void setTimeConstant(double seconds) throws IOException, DeviceException
Sets 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 -
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
getFrequency
public abstract double getFrequency() throws IOException, DeviceException
Returns the frequency of the reference signal
-
Returns: Frequency, in Hz
-
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
getRefPhase
public abstract double getRefPhase() throws IOException, DeviceException
Returns the phase of the reference signal
-
Returns: Phase, in degrees
-
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
getRefAmplitude
public abstract double getRefAmplitude() throws IOException, DeviceException
Returns the amplitude of the reference signal
-
Returns: Amplitude, in Volts
-
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
getLockedAmplitude
public abstract double getLockedAmplitude() throws IOException, DeviceException
Returns the amplitude of the signal component locked on to by the amplifier
-
Returns: Amplitude, in Volts
-
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
getTimeConstant
public abstract double getTimeConstant() throws IOException, DeviceException
Returns the set time constant, in seconds
-
Returns: Time constant, in seconds
-
Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
Concrete Methods
These are methods that already have an implementation in LockIn
, however you may wish to override them in a deriving class if that particular lock-in has a more efficient means of performing the same task.
waitForStableLock
public void waitForStableLock(double pctMargin, long duration) throws IOException, DeviceException
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).
- Parameters:
-
pctMargin
— Percentage margin within which to consider amplitude constant -
duration
— Minimum duration to be considered stable, in milliseconds
-
- Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
public void waitForStableLock() throws IOException, DeviceException
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).
- Exceptions:
IOException
— Upon communication errorDeviceException
— Upon compatibility error
Enumerations and Subclasses
Structures used by the SMU
class and extending classes.
RefMode
public enum RefMode
Enumeration of reference modes
INTERNAL
- Internal referencing modeEXTERNAL
- External referencing mode