Difference between revisions of "Configuration for mux11d operation"

From MCEWiki
(Created page with ''''This topic is undergoing active development; information on this page is more subject to change than usual!''' == Software requirements == === MAS === MAS has been branched…')
 
Line 8: Line 8:
 
  svn checkout svn://e-mode.phas.ubc.ca/mas/branch/mux11d mas_mux11d
 
  svn checkout svn://e-mode.phas.ubc.ca/mas/branch/mux11d mas_mux11d
 
or "switch" your existing installation to use the new branch
 
or "switch" your existing installation to use the new branch
<verbatim>
 
 
  cd ~/code/mas
 
  cd ~/code/mas
 
  svn switch svn://e-mode.phas.ubc.ca/mas/branch/mux11d .
 
  svn switch svn://e-mode.phas.ubc.ca/mas/branch/mux11d .
</verbatim>
 
  
 
Then rebuild and reinstall.  The only changes are in the "mux_lock" applications (2 new programs) and in the config2 system (mce.cfg).
 
Then rebuild and reinstall.  The only changes are in the "mux_lock" applications (2 new programs) and in the config2 system (mce.cfg).

Revision as of 17:15, 13 April 2012

This topic is undergoing active development; information on this page is more subject to change than usual!

Software requirements

MAS

MAS has been branched for the purposes of mux11d development, but this will be merged back in later. You can check out a new tree

svn checkout svn://e-mode.phas.ubc.ca/mas/branch/mux11d mas_mux11d

or "switch" your existing installation to use the new branch

cd ~/code/mas
svn switch svn://e-mode.phas.ubc.ca/mas/branch/mux11d .

Then rebuild and reinstall. The only changes are in the "mux_lock" applications (2 new programs) and in the config2 system (mce.cfg).

mce_script

Updates for mux11d have been put right into mce_script, starting with r914. Just "svn update $MAS_ROOT". The major changes so far are:

  • experiment.cfg has extra parameters to configure and enable fast SA feedback and fast SQ1 bias switching, and to guide the new servo applications.
  • the config script generation code (script/bits) will set up the MCE for mux11d operation depending on variables in experiment.cfg

Configuration

mce.cfg

When constructing mce.cfg , start from templates/mce_v1_mux11d.cin or templates/mce_v2_mux11d.cin. These will map SQ1 bias as a per-column register, and properly expose fast switching of the SA FB and SQ1 bias.

The default configuration assumes:

  • SA FB is on BC1 FLUX_FB
  • SQ1 BIAS is on BC2 FLUX_FB

In order to provide some kind of weird transitional backwards compatibility, if "sq2" is included in $virt_list then "sq2 fb" may also be used to refer to BC2 FLUX_FB.

At the MCE command level, fast-switching on the SA FB and SQ1 BIAS is accomplished with the same bias card registers used for Fast SQ2 switching (Row-specific SQ2FB (fast switching)#Firmware_requirements). As an example, to load per-row values into the SA FB on column 5, and then enable muxing on that column, you could do the following:

wb sa fb_col5  123 432 514 451 434 653 123 ...
wra sa enbl_mux 5 1

Then to set a constant value on column 5, and disable muxing:

wra sa fb 5 400
wra sa enbl_mux 5 0

A higher level of support is now provided by the experiment.cfg / config script system.

experiment.cfg

A number of parameters have been added to experiment.cfg to allow the config script system to set up fast-switching on the SA FB and SQ1 BIAS. These are:

  • Enable:
    • hardware_mux11d = 1;: triggers handling of all the other mux11d specific settings.
  • Row Select DAC control; these are arrays of up to 41 integers representing values for the "row select" (AC ON_BIAS) and "row deselect" (AC OFF_BIAS) DACs.
    • row_select = [...];: will be written to "row select" by the config script.
    • row_deselect = [...];: will be written to "row deselect" by the config script.
    • default_row_select, default_row_deselect: Eventually these will be used by the tuning to select default row_select and row_deselect values if the tuning has been instructed not to try to choose them.
  • SA FB control:
    • config_fast_sa_fb = 0;: When set to 0, MCE will be set up for constant SA FB output, with values obtained from the setting "sa_fb". When set to 1, MCE will be set up for fast-switching of SA FB output, with values obtained from sa_fb_set.
    • sa_fb_set = [...];: A 1d array encoding SA FB values for each row and column. (As usual the values are arranged as the 41 values for column 0, followed by the 41 values for column 1, etc.)
  • SQ1 BIAS control - these work exactly like SA FB above.
    • config_fast_sq1_bias = 1;
    • sq1_bias_set = [...];

For the purposes of array tuning the sq1_servo_* parameters will be used by the new sq1servo_sa program, which ramps the SQ1 FB and servos with the fast-switching SA FB (on each row independently). This may optionally be done for a series of SQ1 bias values.

A new set of servo control parameters, rowsel_servo_* (taking the same suffixes as the sq1_servo_* variables) has been introduced to control the new rs_servo program, which ramps the "row select" DACs and servos with the fast-switching SA FB (optionally at a series of SQ1 biases). In particular these parameters are:

rowsel_servo_gain, rowsel_servo_flux_start, rowsel_servo_flux_count, rowsel_servo_flux_step, rowsel_servo_bias_ramp, rowsel_servo_bias_start, rowsel_servo_bias_count, rowsel_servo_bias_step


Usage

Using the new servo programs

The servo programs make a lot of assumptions about the state of the MCE before beginning their job. Preparation is usually handled by the tuning code. To run these programs manually, the biggest thing to be careful of is that you have enabled (or disabled) fast-switching on the relevant stages. Here's a sequence of terminal commands which should work:

# Disable fast switching
mas_param set config_fast_sa_fb 0
mas_param set config_fast_sq1_bias 0
# Basic MCE setup and SA tuning
auto_setup --last-stage sa_ramp
mas_param set config_fast_sa_fb 1
# Recreate config script and run it to program the MCE.
mce_make_config -x
# Run the servos on RC2
sq1servo_sa 2 myservo1
rs_servo 2 myservo2

Later, once you have set up the "sq1_bias_set" values:

mas_param set config_fast_sq1_bias 1
mce_make_config -x