Step-By-Step Procedure for Locking 1st Stage SQUIDS with DAS

Step-By-Step Procedure for Locking 1st Stage SQUIDS with
DAS Scripts and MCE
By Bryce Burger
Rev. 1.2:
 Mandana Amiri: modified to match the integrated idl/das scripts and the new config_mce_template.
Rev. 1.3:
 MA: described the SA optimal-point selection based on ramp_sa_fb_plot suggestions
 Specified TARGET=0 for sq2servo script
 Latest set_directory uses yyyymmdd structure and also automatically copies the config_mce file
 Added instructions on how to reload the driver
Rev. 1.6
 Added Definitions/Abbreviations sections
1. Setup



the string ‘yyyymmdd’ is a placeholder for the actual date of test (i.e. 20050218)
the string ‘tttt’ is a placeholder for the actual time of test (i.e. 1303)
strings highlighted in grey are command-line entries
2. Definitions



ICmax:
ICmin:
3. Abbreviations





sa_bias: Series Array bias
sa_offset: Series Array offset
adc_offset: Series-Array output lock point
SSA: SQUID Series Array
4. Setup
Make sure that the MCE and Real time Linux PC are linked with a fibre-optic cable. Connect the MCE
cryo-connectors using the screwdriver shafts on the front panel. Power on the MCE, and configure the
MCE with the correct firmware. Log in to the RTL PC. Open 3 XTerm windows.
4.1. Driver Messages Window
In XTerm window #1 or your “Driver Messages window”, load the DAS environment variables:
>cd ~mce/das
>source dassetup
Create a new data directory for today’s data by typing:
>set_directory
Start the Data Acquisition Software (DAS) engine to run MCE commands
>startdas mce
4.2. Data Acquisition Software Window
In XTerm window #2 or your “Data Acquisition Software window”, load the DAS environment
variables:
>cd ~mce/das
>source dassetup
Navigate to the directory where all today’s data will be stored, and open today’s MCE configuration file
(config_mce_yyyymmdd) in a text editor.
>cd $DATADIR
><text editor> config_mce_yyyymmdd &
4.3. IDL Window
In XTerm window #3 or your “IDL window”:
>cd ~mce/das
>source dassetup
Navigate to the IDL directory, and start IDL:
>cd ~mce/idl_pro
>idl
If you forget to run “source dassetup” in the IDL window, then the IDL scripts that spawn DAS scripts
will not work properly.
5. Useful Commands for Clearing Crashes/Hangs
When you are in the DAS environment (see the section above) then the following commands are useful
for clearing hangs/crashes:
If you have powered on or configured the MCE, and commands execute but no replies are received by
the PC, repeat the four following steps until replies are received correctly:
 Disconnect the MCE Tx fibre optic cable
 Reconnect the MCE Tx fibre optic cable
>resetpci
>w cc led 7
If the DAS software has crashed in the “Driver Messages window”, exit and restart the software:
>exitalltasks OR >killtasks
>source dassetup
>startdas mce
If the SDSU PCI card has crashed in the “DAS window”:
>resetpci
If the MCE have hung in the “DAS window”:
>resetmce
If an IDL program crashes, then clear the crash in “IDL window”:
>.reset_session
If you suspect that the PCI card driver is malfunctioning, you may reload the PCI driver by logging in as
root and reloading the driver:
>exitalltasks
>su
><password>
>updatesdsucvs mce
>source dassetup
>startdas mce
6. Ramp Series Array Feedback
6.1. Collecting Series-Array V-Φ Curves
Set the parameters listed in “Step 1” of the MCE configuration file (config_mce_yyyymmdd) appropriately
(i.e. servo_mode = 1).
In the “DAS window”, run the configuration file (you may need to alter its permissions):
>chmod 777 config_mce_yyyymmdd
>config_mce_yyyymmdd
In the “IDL window” run the series array characterization script:
idl>ramp_sa_fb_plot, 'ramp_sa_fb_tttt', DASSCRIPT=1, RC=3
Where:
 DASSCRIPT (optional): runs the MCE DAS data collection routine. When this parameter is not
included, the ramp_sa_fb_plot script can be used to plot data from a pre-existing data file.
 RC (optional): specifies the Readout Card to collect data with
6.2. Discussion of ramp_sa_fb_plot Script
The ramp_sa_fb_plot IDL script:
 Invokes a DAS script called ramp_sa_fb to collect the data from MCE,
 Calls a plotting routine to process the data and create postscript plots, and
 Launches Ghostview to view the postscript plots.
Set the orientation of the postscript plots in Ghostview to:
view -> orientation
= seascape
view -> size
= letter
The postscript plots in Ghostview are 26 pages long. The first 25 pages show the series-array output vs.
series-array feedback at different series-array bias values. The 26th page shows series-array output vs.
series-array bias. The plots on this page will help you choose the series-array bias that produces the
maximum modulation in the series-array output.
The IDL script also prints suggested values for:
 sa_bias: selects the series array bias value that produces the largest peak-to-peak modulation in the
series-array output.
 sa_offset: not computed.
 adc_offset : selects the maximum slope point on the series-array output vs. series-array feedback
plots. This parameter is chosen in conjunction with the sa_fb.
 sa_fb: selects the maximum slope point on the series-array output vs. series-array feedback plots.
This parameter is chosen in conjunction with the adc_offset.
Be sure to check the suggestions closely, as computations do not replace a trained eye.
6.3. Choosing Series-Array Operating Points Manually
You can use the operating points suggested by the ramp_sa_fb_plot script, or you can choose optimal
points manually by following instructions below. In either case, record the following operating points in
the MCE configuration file (config_mce_yyyymmdd), and then save it:
 sa_bias: Choose a sa_bias for which the series-array V-Φ curves are as close to ICMAX as possible
over all 8 Readout Card channels channels.


sa_offset: The relationship between sa_bias and sa_offset is fixed by a constant. At UBC (sa_bias
= 42000 = sa_offset) works well. However, at Cardiff, (sa_bias = 47000 = [sa_offset-15000]) is
preferred because the cryogenic cable impedances are higher and require a larger offset.
adc_offset: Choose the adc_offset based on the following calculation:
adc _ offset 

series _ array _ output _ lock _ pt
sample _ num
Where the “series-array output lock point” is the series-array output at which maximum slope occurs
on the series-array output vs. series-array feedback plot.
sa_fb (series-array feedback): The simplest approach is to choose 32000, which is midrange of the
DAC range. Within a few iterations, the sq2servo_plot script will correct for coarseness in the choice
of this parameter.
A more targeted approach is to choose a series-array feedback value (sa_fb) at the chosen seriesarray output lock point. For example, suppose that there are 3 sa_fb values that correspond to your
chosen series-array output lock point and they are 9000 (positive slope), 24000 (negative slope),
38000 (positive slope), 58000 (negative slope), then choose 24000.
6.4. Releasing Trapped Flux in the Series Arrays
Trapped flux in the Series Arrays can be denoted by ratty or bumpy looking series array V-Φ curves. If
you suspect that there is trapped flux in your series arrays, repeat the following procedure until the flux is
released:
>w rc<?> sa_bias 65535 65535 65535 65535 65535 65535 65535 65535
 Wait 1s
>w rc<?> sa_bias 0 0 0 0 0 0 0 0
>config_mce_yyyymmdd
idl>ramp_sa_fb_plot, 'ramp_sa_fb_tttt', DASSCRIPT=1, RC=3
7. Ramp 2nd Stage SQUID Feedback
7.1. Collecting 2nd Stage SQUID V-Φ Curves
Make sure the parameters listed in Step 2 of the MCE configuration file have been chosen appropriately.
The sq2servo script is written in C, and if altered, it must be compiled before executing. Open a
temporary XTerm window, and enter the following to compile sq2servo.c and sq1servo.c:
>cd ~mce/ubcscripts/mux_lock
>go
In the “DAS window”, run the configuration file every time before running sq2servo_plot:
>config_mce_yyyymmdd
In the “IDL window” run the second-stage SQUID characterization script (the last 5 parameters are
optional if you don’t need to collect data, and just want to plot data from a file):
idl>sq2servo_plot, 'sq2servo_tttt', DASSCRIPT=1, SSAFB=32000, SQ2BIAS=20000,
RC=3, TARGET=0
Where:
 sq2servo_tttt: is the data file to be plotted. If DASSCRIPT=1, the data are collected automatically
and put in that file.
 DASSCRIPT (optional): “=1” runs the MCE DAS data collection routine. When this parameter is not
included, the ramp_sa_fb_plot script can be used to plot data from a pre-existing data file. If this
parameter is specified, then all of the following parameters must be specified as well.
 SSAFB (optional): is the sa_fb value chosen in the previous section
 SQ2BIAS (optional): is the 2nd stage SQUID bias applied during the script. This parameter cannot
be inferred from previous tests. You will have to experiment to find the optimal value. At UBC,
“SQ2BIAS=20000” works well; at ACT, “SQ2BIAS=64000” works well.
 TARGET (optional): Specifies the series array lock point. Assuming that the adc_offset is set to the
desired point (in step 2 of the configuration file), then TARGET=0 means the ADC reading has to
match the adc_offset to provide error=0.
 RC (optional): specifies the Readout Card # to collect data with.
7.2. Tuning with the “sq2servo_plot” Script
The sq2servo_plot script
 Runs a DAS script called sq2servo,
 Runs an IDL program to process the data and create a postscript file and
 Opens a ghostview window with the plot data.
Note that you can remove discontinuities in the sa_fb (underflow below 0, overflow above 65535) by
locking to a different slope of the series array V-Φ (SSAFB), or for finer adjustment, try locking to a point
on the series array V-Φ curves that does not produce such a large amplitude modulation in the series
array current output for the given 2nd Stage SQUID modulation.
Note also that introducing sq2_bias and sa_fb in the following section (Ramp 1 st Stage SQUIDs) changes
the phase of the series array curves. To see this, run config_mce_yyyymmdd and ramp_sa_fb after
running sq2servo_plot. You will find that your sq2servo locks on negative slopes of the series-array V-Φ
curves. To confirm this, on the series array V-Φ curves, triangulate the lock point with the sa_fb you have
chosen.
7.3. Choosing 2nd Stage SQUID Operating Points Manually
From these plots, choose the SQ2 operating points as follows:
 sq2_bias: Choose a sq2_bias value that V-Φ curves that are close to ICMAX for all 8 channels.
 sq2_fb: record the SQ2 feedback (sq2_fb) that corresponds to a large negative slopes on these
curves, choose a value that is midrange. If there are 2 points with large negative slopes, then pick
one that is midrange of the DAC range.
Update the configuration file with these values and save the file.
Also update the file called sq2fb.init in $DATADIR directory. This file will be used by sq1servo in the next
step. It has 32 lines that correspond to 32 columns. If you are working with RC3, then you need to update
values for line 24 to 31 of this file. In the “Data Acquisition Software window” window, type:
><text editor> $DATADIR/sq2fb.init &
8. Ramp 1st Stage SQUID Feedback
8.1. Collecting 1st Stage SQUID V-Φ Curves
Specify the parameters listed in Step 3 of the MCE configuration file. Also, update the sq2fb.init file with
starting points for the “sq1servo_plot” script below.
The sq2servo script is written in C, and if altered, it must be compiled before executing. Open a
temporary XTerm window, and enter the following to compile sq2servo.c and sq1servo.c:
>cd ~mce/ubcscripts/mux_lock
>go
In “Data Acquisition Software window” window, run the configuration file every time before running
sq1servo_plot:
>config_mce_yyyymmdd
In the “IDL window” window, type:
idl>sq1servo_plot, 'sq1servo_tttt', DASSCRIPT=1, SQ1BIAS=6000, RC=3, TARGET=0
Where:
 sq1servo_tttt: is the data file to be plotted. If DASSCRIPT=1, the data are collected automatically
and put in that file.
 DASSCRIPT (optional): “=1” runs the MCE DAS data collection routine. When this parameter is not
included, the ramp_sa_fb_plot script can be used to plot data from a pre-existing data file. If this
parameter is specified, then all of the following parameters must be specified as well.
 SQ1BIAS (optional): is the 1st Stage SQUID Bias applied during the script. This parameter cannot
be inferred from previous tests. You will have to experiment to find the optimal value. At UBC,
“SQ1BIAS=6000” works well.
 RC (optional): specifies the Readout Card # to collect data with.
 ROW (optional): specifies which row to plot data from. The default is ‘1’ if not specified. Note that
the numbering for this parameter is offset – i.e. ‘=1’ corresponds to MUX row 0, ‘=2’ corresponds to
MUX row 1, etc.
 TARGET (optional): Specifies the series array lock point. Assuming that the adc_offset is set to the
desired point (in step 2 of the configuration file), then TARGET=0 means the ADC reading has to
match the adc_offset to provide error=0.
Alternatively to running sq1servo_plot, you can sweep the first-stage feedback (sq1_fb) and view the
series-array output directly. In “Data Acquisition Software window” window, type:
>config_mce_yyyymmdd
And in “IDL window” window, type:
idl>ramp_sq1_fb_plot, ‘ramp_sq1_fb_tttt’, DASSCRIPT=1, RC=3, SQ1BIAS=6000
Where:
All parameters are as before, except for SQ1BIAS. Specifying SQ1BIAS is optional, but if SQ1BIAS is
not specified, then the SQ1BIAS specified in the configuration file is in effect. If SQ1BIAS is specified, the
value is used as a starting point for a loop of 10 SQ1BIAS values with increments of 500, where a ramp is
created on sq1fb for each sq1bias setting.
8.2. Choosing 1st Stage SQUID Operating Points Manually
Play around with different values for SQ1BIAS, trying to bias the 1st Stage SQUIDs as near to ICmax as
possible. When you are satisfied with the plots, update the configuration file with the following values and
save the file:
 sq1_bias

sq2_fb
Note that the sq1 V-Φ curves are vertically inverted with respect to the series array and 2 nd stage SQUID
curves due to inverted coupling between the sq1 and sq2 stages compared to the coupling between the
sq2 and series-array stages. As a result, you should see the sq1 V-Φ curves ‘lift’ downwards as you
increase the sq1_bias.
9. Lock 1st Stage SQUIDs
Specify the parameters listed in Step 4 of the MCE configuration file.
In the “Data Acquisition Software window” type:
>config_mce_yyyymmdd
The SQ1s should now be locked. You may collect some data to verify the locking. In the “IDL window”
type:
idl> frametest_plot_2, COLUMN=1, ROW=1, NPTS=200, F_SAMP=2000, DASSCRIPT=1,
'rc3', 'lock_tttt', BITPART=14
Where:
 COLUMN (optional): specifies the column #, from 1 to 8. Numbering for this parameter is offset with
respect to MCE channels. I.e. COLUMN=1 corresponds to channel 0, etc. If you don’t specify the
column, then a multi-page plot reflecting all columns will be created and the plot-filename will reflect
this.
 ROW (optional): specifies the row #, from 1 to 41. Numbering for this parameter is offset with
respect to MCE MUX rows. I.e. ROW=1 corresponds to MUX row select 0, etc. If you don’t specify
the row, then a multi-page plot reflecting all rows will be created and the plot-filename will reflect this.
 NPTS: is number of data frames to be collected
 F_SAMP: is the frequency of the data frames collected. Column refers to the channel number from 1
to 8 and ROW refers to the row number from 1 to 41.
 ‘rc3’: specifies the Readout Card number
 ‘lock_tttt’: specifies the data file name that the script will generate if DASSCRIPT=1.
 BITPART: refers to the bit location of the division between feedback and error data, in combined
data modes (i.e. data_mode 4), where 32 bit-words contain both types of data.
On each page, there are 2 plots. The horizontal axis in the top graph is the sample number and the
horizontal axis in the bottom graph is the frequency in Hz.
10. Observe the Effects of Ramping the TES Bias or Pixel
Heater on 1st Stage Feedback
The “ramp_bias” script ramps either the tes-bias or pixel heater, and take a frame of sq1_fb data after
every step in the ramp. In the “Data Acquisition Software window”, type:
>ramp_bias