
/*	**************************************************************	*/

/*
 * PARAM.H
 * This file contains parameters required by the measurement
 * program.
 *
 * Zachary Wolf
 * 4/16/02
 */
 
/* Protection from multiple definitions */
#ifndef __PERMEAMETERPARAM_HEADER
#define __PERMEAMETERPARAM_HEADER
 
/* GPIB addresses */
#define GPIB_BOARD_ADDR					0
#define GPIB_PDI5025_ADDR				13
#define GPIB_HP3458_ADDR				24
#define GPIB_B9900_ADDR					17
#define GPIB_S7010_ADDR					10
#define GPIB_GP3_ADDR					16
#define GPIB_LS450_ADDR					15
#define GPIB_LS460_ADDR					17 
#define GPIB_LS475_ADDR					17
#define GPIB_HP3457_ADDR				22
#define GPIB_DAC488_ADDR				19
#define GPIB_DAC488HR_ADDR				8
#define GPIB_HP34970_ADDR				9 

/* Email Notification Settings*/
static char MAIL_TO[1000]		=		"sda@slac.stanford.edu";
#define MAIL_SEND_NOTIFICATION			1
#define MAIL_COMPUTER_ID				"Maglab 3"

/* Magnet current */
#define IMAG_BOARD_ADDR					GPIB_BOARD_ADDR
#define IMAG_DAC488_ADDR				GPIB_DAC488_ADDR
#define IMAG_DAC488HR_ADDR				GPIB_DAC488HR_ADDR
#define IMAG_HP3457_ADDR				GPIB_HP3457_ADDR
#define IMAG_HP34970_ADDR				GPIB_HP34970_ADDR
#define IMAG_DAC488_PORT				2
#define IMAG_DAC488HR_PORT				1
#define IMAG_HP3457_CHAN				0
#define IMAG_HP34970_CHAN				102
#define IMAG_CONFIG						IMAG_DAC488_HP34970
#define IMAG_BIPOLAR					IMAG_TRUE
#define IMAG_PS_AMPS_PER_DAC_VOLT	    1.2
#define IMAG_TRANS_VOLTS_PER_AMP		0.08333333 
#define IMAG_RAMP_STYLE					IMAG_COSINE
#define IMAG_MAX_CURR_LIMIT				12.1
#define IMAG_MIN_CURR_LIMIT			    -12.1
#define IMAG_RAMP_RATE				    0.2
#define IMAG_WAIT_AFTER_RAMP			5.
#define IMAG_STAND_RAMP_RATE			0.7
#define IMAG_WAIT_AFTER_STAND_RAMP		5.
#define IMAG_INIT_ZERO_CURRENT_MEAS		IMAG_FALSE 
#define IMAG_INIT_TURN_ON				IMAG_FALSE
#define IMAG_INIT_TURN_ON_CURRENT		10.
#define IMAG_CHECK_CURRENT				IMAG_FALSE
#define IMAG_CHECK_CURRENT_TOL			1.0
#define IMAG_SHOW_UI					IMAG_TRUE
#define IMAG_INVERPOWER					IMAG_FALSE
#define IMAG_CHECK_CURRENT_BALLPARK_LIM	   10
#define IMAG_CHECK_CURRENT_TOL_LOWER_LIM   5

/* Hall probe measurements */
#define BHALL_BOARD_ADDR				GPIB_BOARD_ADDR
#define BHALL_B9900_ADDR				GPIB_B9900_ADDR
#define BHALL_GP3_ADDR					GPIB_GP3_ADDR
#define BHALL_LS450_ADDR				GPIB_LS450_ADDR
#define BHALL_LS460_ADDR				GPIB_LS460_ADDR
#define BHALL_LS475_ADDR				GPIB_LS475_ADDR  
#define BHALL_S7010_ADDR			    GPIB_S7010_ADDR
#define BHALL_HP34970_ADDR			    GPIB_HP34970_ADDR
#define BHALL_HP34970_CHAN				115
#define BHALL_ANALOG_TESLA_PER_VOLT		0.10187
#define BHALL_DEVICE_TYPE				BHALL_LS475
#define BHALL_B9900_CHAN				1
#define BHALL_LS460_CHAN				'X'

/* Voltage integration system */
#define VTRAMP_BOARD_ADDR				GPIB_BOARD_ADDR
#define VTRAMP_PDI5025_ADDR				GPIB_PDI5025_ADDR
#define VTRAMP_HP3458_ADDR				GPIB_HP3458_ADDR
#define VTRAMP_PDI5025_CHANNEL			'A'
#define VTRAMP_PDI5025_GAIN				100	// aluminum is 1000 , steel 50
#define VTRAMP_HP3458_RANGE				.1
#define VTRAMP_CONFIG					VTRAMP_HP3458
#define VTRAMP_T_SAMP_BEFORE			0.5
#define VTRAMP_T_SAMP_AFTER				7.
#define VTRAMP_DO_OFFSET_CORRECTION		VTRAMP_TRUE
#define VTRAMP_SHOW_UI					VTRAMP_TRUE

/* BvsH module */
#define BVSH_SAMPLE_GEOMETRY			BVSH_CYLINDER
#define BVSH_CYL_HALL_PROBE_RANGE		3
#define BVSH_CYL_NUM_TURNS_MEAS_COIL	189
#define BVSH_CYL_MEAS_COIL_DIAM			0.019937 //0.020303  // 0.020385  m
#define BVSH_CYL_SAMPLE_OUTER_DIAM		0.018640  // 0.741" or  0.018796 m   Should be 0.741"
#define BVSH_CYL_SAMPLE_INNER_DIAM		0.0048514 // 0.190"  or 0.004826 m.  Should be 11 drill or 191"  0.0048514 m
#define BVSH_RING_NUM_TURNS_DRIVE_COIL	200
#define BVSH_RING_NUM_TURNS_MEAS_COIL	200 
#define BVSH_RING_SAMPLE_OUTER_DIAM		.051808
#define BVSH_RING_SAMPLE_INNER_DIAM		.040454
#define BVSH_RING_SAMPLE_HEIGHT			.007112
#define BVSH_SHOW_UI					BVSH_TRUE

///* Test currents */
//#define BVSH_NUM_STAND_CYCLES			3
//#define BVSH_STAND_MAX					12.
//#define BVSH_STAND_MIN					-12.
//#define BVSH_NUM_TEST_CURRENTS			53
//static double BVSH_TEST_CURRENTS[BVSH_NUM_TEST_CURRENTS] = {0., .1, .2, .3, .4, .6, .8, 1., 2., 4.085, 6.128, 8.146, 10.184, 12., 10., 8., 6., 4., 2., 1., .8, .6, .4, .3, .2,  .1, 0., -.1, -.2, -.3, -.4, -.6, -.8, -1., -2., -4., -6., -8., -10., -12., -10., -8., -6., -4., -2., -1., -.8, -.6, -.4, -.3, -.2, -.1, 0.};


//#define BVSH_NUM_STAND_CYCLES			    3
//#define BVSH_STAND_MAX					12.
//#define BVSH_STAND_MIN					0.
//#define BVSH_NUM_TEST_CURRENTS			88
//static double BVSH_TEST_CURRENTS[BVSH_NUM_TEST_CURRENTS] = {0., .05, .075, .1, .125, .15, .175, .2, .25, .275, .3, .325, .35, .375, .4, .425, .45, .475, .5, .55, .6, .8, 1., 2., 4., 6., 8., 6., 4., 2., 1., .8, .6, .5, .4, .3, .275, .25, .2, .175, .15, .125, .1, .075, .05, 0., -0.05, -.1, -.15, -.2, -.25, -.275, -.3, -.325, -.35, -.375, -.4, -.425, -.45, -.475, -.5, -.55, -.6, -.8, -1., -2., -4., -6., -8., -6., -4., -2., -1., -.8, -.6, -.4, -.35, -.3, -.275, -.25, -.2, -.175, -.15, -.125, -.1, -.075, -.05, 0.};

 #define BVSH_NUM_STAND_CYCLES			 3
#define BVSH_STAND_MAX					12.
#define BVSH_STAND_MIN					0.
#define BVSH_NUM_TEST_CURRENTS			37
static double BVSH_TEST_CURRENTS[BVSH_NUM_TEST_CURRENTS] = {0., .03, .06, .09, .12, .15, .18, .21, .23, .25, .27, .29, .31, .33, .35, .37, .39, .41, .43, .45, .47, .5, .55, .6, .8, 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12.};



//#define BVSH_NUM_STAND_CYCLES			3
//#define BVSH_STAND_MAX					8.
//#define BVSH_STAND_MIN					-8.
//#define BVSH_NUM_TEST_CURRENTS			36
//static double BVSH_TEST_CURRENTS[BVSH_NUM_TEST_CURRENTS] = {0., .1, .2, .25, .275,  .3, .5, 1., 2., 4., 6., 8., 6., 4., 2., 1., .5, .3, .15, 0., -.15, -.3, -.5, -1., -2., -4., -6., -8., -6., -4., -2., -1., -.5, -.3, -.15, 0.};

/* End protection */
#endif
