Fast SQ2 Feedback and TES Biasing with an Address Card

From MCEWiki
(Redirected from Biasing Address Card)
The following describes an obsolete procedure or component.  See Row-specific SQ2FB (fast switching) for a more recent alternative.

This page contains information on how to use the Address Card in a "Bias Card 2" slot to multiplex the SQ2 Feedback, and to supply a TES Bias. To use both of these features, you will need Address Card firmware revision 2.0.7 (ac_v02000007_12jun2007) or later.

Step 1: Update your MAS "/etc/mce/mce.cfg" file

Easy Way

  • After placing an AC into the BC2 slot, make the system aware of the new hardware by replacing /etc/mce/mce.cfg with the file that describes the new configuration:
cp /home/mce/mas/config/mce_v1_biasing_ac.cfg /etc/mce/mce.cfg
  • Following this, type:
mce_status -s
  • The status report should no longer show entries from "bc2" and instead describe the parameters of the "bac" (biasing address card).
  • In experiment.cfg, set the entry "hardware_bac" to 1. If you want to do fast sq2 switching (instead of bc2 emulation), set "config_fast_sq2 = 1;" in experiment.cfg. The auto-tuning scripts check the value of "config_fast_sq2" to determine whether to execute a row-by-row sq1 servo or simply to use the preferred rows in the "sq2_rows" parameter.
  • Please be aware the sq2 feedback DAC range is reduced when running in this mode. With bc2, sq2 feedback is a 16 bit unsigned DAC value. With bac, sq2 feedback is a 14 bit unsigned DAC value. With bc2 in place, the sq2 feedbacks are written to "bc2 bias" or the functionally-mapped "sq2 fb", with one value for each of 32 columns. With the bac, the sq2 feedbacks are written to "bac fb_col0", "bac fb_col1", ..., "bac fb_col31"; where each of these registers accepts 41 values corresponding to the rows of the system.
  • TES bias lines on the bac are not available without making physical modifications to the address card. For details of the address-card hardware modification, see: http://www.phas.ubc.ca/~scuba2/sc2mce/system/addr_card/design/ECOs/AC-ECO049-20080508.doc

Hard Way

Add the following card declaration and its associated commands to your mce.cfg file, in the struct called "parameter_sets" :

{ 
name = "biasing-address commands"; parameters = 
(
{name = "bias"; id = 0xE7;},
{name = "row_order"; id = 0x01; count = 41; default_items = (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40);},
{name = "on_bias"; id = 0x02; count = 41; min = 0; max = 16383;},
{name = "off_bias"; id = 0x03; count = 41; min = 0; max = 16383;},
{name = "enbl_mux"; id = 0x05; count = 1; min = 0; max = 2;},
{name = "const_mode"; id = 0x06; count = 41; min = 0; max = 1;},
{name = "const_val"; id = 0x07; count = 41; min = 0; max = 16383;},
{name = "const_val39"; id = 0x08; count = 1; min = 0; max = 16383;},
{name = "fb_col0";  id = 0xE3; count = 41;},
{name = "fb_col1";  id = 0xE1; count = 41;},
{name = "fb_col2";  id = 0xDF; count = 41;},
{name = "fb_col3";  id = 0xDD; count = 41;},
{name = "fb_col4";  id = 0xDB; count = 41;},
{name = "fb_col5";  id = 0xD9; count = 41;},
{name = "fb_col6";  id = 0xD7; count = 41;},
{name = "fb_col7";  id = 0xD5; count = 41;},
{name = "fb_col8";  id = 0xD3; count = 41;},
{name = "fb_col9";  id = 0xD1; count = 41;},
{name = "fb_col10"; id = 0xCF; count = 41;},
{name = "fb_col11"; id = 0xCD; count = 41;},
{name = "fb_col12"; id = 0xCB; count = 41;},
{name = "fb_col13"; id = 0xC9; count = 41;},
{name = "fb_col14"; id = 0xC7; count = 41;},
{name = "fb_col15"; id = 0xC5; count = 41;},
{name = "fb_col16"; id = 0xE2; count = 41;},
{name = "fb_col17"; id = 0xE0; count = 41;},
{name = "fb_col18"; id = 0xDE; count = 41;},
{name = "fb_col19"; id = 0xDC; count = 41;},
{name = "fb_col20"; id = 0xDA; count = 41;},
{name = "fb_col21"; id = 0xD8; count = 41;},
{name = "fb_col22"; id = 0xD6; count = 41;},
{name = "fb_col23"; id = 0xD4; count = 41;},
{name = "fb_col24"; id = 0xD2; count = 41;},
{name = "fb_col25"; id = 0xD0; count = 41;},
{name = "fb_col26"; id = 0xCE; count = 41;},
{name = "fb_col27"; id = 0xCC; count = 41;},
{name = "fb_col28"; id = 0xCA; count = 41;},
{name = "fb_col29"; id = 0xC8; count = 41;},
{name = "fb_col30"; id = 0xC6; count = 41;},
{name = "fb_col31"; id = 0xC4; count = 41;}
); 
},

Add the following card declaration to "card_types" struct:

{ 
name = "biasing-address card"; 
parameter_sets = ("open commands", "biasing-address commands");
},

Add the card to the "system->components" struct:

{ 
name = "bac"; 
nature = "physical"; 
card_type = "biasing-address card"; 
id = ( 0x08 ); error_bits = 0x00E00000;
},

Step 2: Familiarize Yourself With New Address Card Commands

Step 3: Edit The experiment.cfg File

Edit experiment.cfg file to set

hardware_bac=1
config_fast_sq2=1

Additional Information

  • What auto-tuning routines does this require?
  • How do you calculate the optimal SQ2 FB for each pixel?

Hardware requirements

Firmware requirements

  • AC 5.0.0 or later
Relevant mce parameters
enbl_mux
const_val
fb_col0, fb_col1, ... to fb_col31
const_val39
row_len

Software requirements

  • mas/trunk : r439 or later
  • mce_script/trunk : this has worked for a while...
Configuration instructions
  • When creating mce.cfg:
    • $card_list must indicate a "bac" instead of a "bc2"
    • mce_status -g should show entries for "bac fb_col#" and "sq2 fb_col#" and no entries for "bc2"
  • In experiment.cfg:
    • Set one of
      • config_fast_sq2 = 1; # enable fast-SQ2 switching (and tuning)
      • config_fast_sq2 = 0; # simulate non-fast-SQ2 bc2 by writing the same FB value for each row.
    • Set
      • hardware_fast_sq2 = 1; # biasing address card
      • (In older mce_script, set hardware_bac = 1 instead.)