= SPEC_cre_setup = The module SPEC_cre_setup is almost identical to SPEC_CRE_setup. The main difference is that SPEC_cre_setup accepts cre_ctrl_red and cre_ctrl_blu and does not accept blue_heat_current (hence it does not switch on the blue detector heater). {{{ // Purpose : Set CRE bias, ramps' length and capacitor values // // CRE setup according to the DEC/MEC User's Manual // // 1. DMC_SWON_B_DEC to switch on the DEC // 2. Wait 5 seconds to get the 1355 connection between DEC and CPU board // 3. Send the complete set of default parameters. // First send a DMC_WRT_B_SPEC_PAR command with these values // (in hex: 20-8-18C-0-0-EA60-0-0). // 3a. Then, send a DMC_SET_PAR_B_SPEC to really send the parameters to the DEC. // 4. DMC_SWON_B_SPEC to switch on the detector array // 5. Wait 15 seconds to let the switch on procedure run and all voltages // become stables // 6. Then, to activate the CREs (signal SELECT on the CREs), send the first // 3 parameters, i.e. DMC_WRT_B_SPEC_PAR command with these // values (length: 3, values in hex : 20- 8-18E). // 6a. Then, send a DMC_SET_PAR_B_SPEC to really send the parameters to the DEC. // Note: with this command, we set bit1 to 1 (activate CRE). Bit0 // has been set to 1 by the DMC_SWON_B_SPEC command but, // bit0 is not commandable through the DMC_WRT_B_SPEC_PAR. // The only way to switch on/off the detector array is to use the // trigger commands. // 7. Then, you should set the bias voltages by writing the first 4 or 5 // parameters of the block. Make sure to copy the latest values you use // for the first 3 parameters. // // Description : Sets CRE parameters (see list of arguments). // User specifies cre_ctrl_xx as: // cre_ctrl: 256 to set "sync width=2" // 128 to set "T sensor on" // 2 to set "select" // 1 power on (not relevant here) // Script adds capa_xx to cre_ctrl_xx // xx_cre_ctrl = capa_xx + cre_ctrl_xx // xx_cre_ctrl gets written to the CRE register // Must be called on a stopped SPU. This procedure will // neither stop nor start SPU (call SPEC_spu_reset and // SPEC_spu_setup respectively for that) // // Comments : Based on V1.3 of FGB's fgb_spec_cre_setup.tcl. Major // change is getting ENG values for the bias voltages // // Version : 0.1 7-Oct-2004 Creation by DAC // History : 0.2 12-Oct-2004 Removed "delay" statements // 0.3 18-Oct-2004 Normalized variable names // 0.4 21-Oct-2004 Added cre_ctrl_xx and heater_on // arguments to allow calling by // SPEC_orbit_prologue. // Removed heater commands // 0.5 27-Oct-2004 Put bck delay statement // 1.0 10-Apr-2006 HF, modified for FM // }}} Input variable(s): {{{ int procedure SPEC_cre_setup { int cre_ctrl_red = 386; // Red CRE register (capa_red=0) int cre_ctrl_blu = 386; // Blue CRE register (capa_blu=0) int ramp_len_red = 64; // Red ramp length int ramp_len_blu = 64; // Blue ramp length double bias_d_red = 0.0 in [0.0,1.0]; // BIAS_D for red spectro (0-1V) double bias_r_red = 0.0 in [0.0,1.0]; // BIAS_R for red spectro (0-1V) double bias_d_blu = 0.0 in [0.0,1.0]; // BIAS_D for blue spectro (0-1V) double bias_r_blu = 0.0 in [0.0,1.0]; // BIAS_R for blue spectro (0-1V) int capa_red = 0; // Capacitor red (0=100fF,4=400fF,8=0.2pf,12=1pF) int capa_blu = 0; // Capacitor blue (0=100fF,4=400fF,8=0.2pf,12=1pF) }{ }}}