Chapter 6, COMPUTER OPERATION 
6-36 
6.5 Programming Examples 
6.5.01 Introduction 
This section gives some examples of the commands that need to be sent to the lock-
in amplifier for typical experimental situations. 
6.5.02 Basic Signal Recovery 
In a typical simple experiment, the computer is used to set the instrument controls 
and then to record the chosen outputs, perhaps as a function of time. At sampling 
rates of up to a few points per second, there is no need to use the internal curve 
buffer. The commands to achieve this would therefore be similar to the following 
sequence: 
IE 2    Set reference to external front panel input 
VMODE 1    Single-ended voltage input mode 
AUTOMATIC 1  AC Gain control automatic 
FLOAT 1    Float input connector shell using 1 k to ground 
LF 0 0    Turn off line frequency rejection filter 
ASM    Auto-Measure (assumes reference frequency > 1 Hz) 
TC 13    Set time constant to 200 ms, since previous ASM changed it 
Then the outputs could be read as follows:  
X.      Reads X channel output in volts 
Y.      Reads Y channel output in volts  
MAG.    Reads Magnitude in volts  
PHA.    Reads Phase in degrees  
FRQ.    Reads reference frequency in hertz  
The controlling program would send a new output command each time a new reading 
were required. Note that when using an output filter slope of 12 dB/octave a good 
"rule of thumb" is to wait for a period of four time-constants after the input signal 
has changed before recording a new value. Hence in a scanning type experiment, the 
program should issue the commands to whatever equipment causes the input signal 
to the lock-in amplifier to change, wait for four time-constants, and then record the 
required output. 
6.5.03 Frequency Response Measurement 
In this example, the lock-in amplifier's internal oscillator output signal is fed via the 
filter stage under test back to the instrument's signal input. The oscillator frequency 
is stepped between a lower and an upper frequency and the signal magnitude and 
phase recorded. At sampling rates of up to a few points per second, there is no need 
to use the internal curve buffer or oscillator frequency sweep generator. The 
commands to achieve this would therefore be similar to the following sequence:  
IE 0    Set reference mode to internal  
VMODE 1    Single-ended voltage input mode 
AUTOMATIC 1  AC Gain control automatic 
FLOAT 1    Float input connector shell using 1 k to ground  
LF 0    Turn off line frequency rejection filter 
OA. 1.0E0    Set oscillator amplitude to 1.0 V rms 
OF. 100.0    Set oscillator frequency to 100 Hz (starting frequency) 
SEN 27    Set sensitivity to 1 V full-scale