
/*	**************************************************************	*/

/*
 * PARAM.H
 * This file contains parameters required by the measurement
 * program.
 *
 * Zachary Wolf
 * 10/15/02
 */
 
/* Protection from multiple definitions */
#ifndef __BNVSZPARAM_HEADER
#define __BNVSZPARAM_HEADER
 
/* GPIB addresses */
#define GPIB_BOARD_ADDR					0
#define GPIB_SR850_ADDR					4
#define GPIB_CM2100_ADDR				01
#define GPIB_CM4000_ADDR				01
#define GPIB_MC4_ADDR					14
#define GPIB_ESP300_ADDR				21
#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				"Mablab 2"

/* RS232 addresses */
#define RS232_COM_PORT					3
#define RS232_SXDRIVE_ADDR				1

/* VCOIL measurements */
#define VCOIL_BOARD_ADDR				GPIB_BOARD_ADDR
#define VCOIL_SR850_ADDR				GPIB_SR850_ADDR
#define VCOIL_DEVICE_TYPE				VCOIL_SR850

/* Move the probes */
#define MOVEZ_BOARD_ADDR				GPIB_BOARD_ADDR
#define MOVEZ_RS232_COM_PORT			RS232_COM_PORT
#define MOVEZ_CM2100_ADDR				GPIB_CM2100_ADDR
#define MOVEZ_CM4000_ADDR				GPIB_CM4000_ADDR
#define MOVEZ_MC4_ADDR					GPIB_MC4_ADDR
#define MOVEZ_ESP300_ADDR				GPIB_ESP300_ADDR
#define MOVEZ_SXDRIVE_ADDR				RS232_SXDRIVE_ADDR
#define MOVEZ_DEVICE_TYPE				MOVEZ_NONE_NONE
#define MOVEZ_CM4000_AXIS				1
#define MOVEZ_ESP300_AXIS               1   
#define MOVEZ_MC4_AXIS					'W'
#define MOVEZ_TRANSLATE_METERS_PER_REV	.00326056
#define MOVEZ_ENCODER_METERS_PER_LINE	20.e-6
#define MOVEZ_ACC						.2
#define MOVEZ_VEL						.02
#define MOVEZ_BACKLASH_ON				 MOVEZ_FALSE
#define MOVEZ_BACKLASH_NUM              0.000003
#define MOVEZ_ENCODER 					MOVEZ_FALSE

/* Movement Devices */
#define MOVE_TOLERANCE_AXIS1			25.e-6
#define MOVE_TOLERANCE_AXIS2			25.e-6
#define MOVE_CORRECTION					0


/* 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				101
#define IMAG_CONFIG						IMAG_NONE
#define IMAG_BIPOLAR					IMAG_TRUE
#define IMAG_PS_AMPS_PER_DAC_VOLT		3.00590 
#define IMAG_TRANS_VOLTS_PER_AMP		.08
#define IMAG_RAMP_STYLE					IMAG_THREE_LINEAR
#define IMAG_MAX_CURR_LIMIT				31.
#define IMAG_MIN_CURR_LIMIT				-31.
#define IMAG_RAMP_RATE				    5.
#define IMAG_WAIT_AFTER_RAMP			10.
#define IMAG_STAND_RAMP_RATE			5.
#define IMAG_WAIT_AFTER_STAND_RAMP		10.
#define IMAG_INIT_ZERO_CURRENT_MEAS		IMAG_TRUE  
#define IMAG_INIT_TURN_ON				IMAG_FALSE
#define IMAG_INIT_TURN_ON_CURRENT		20.
#define IMAG_CHECK_CURRENT				IMAG_TRUE
#define IMAG_CHECK_CURRENT_TOL			0.01
#define IMAG_SHOW_UI					IMAG_TRUE
#define IMAG_INVERPOWER					IMAG_FALSE
#define IMAG_CHECK_CURRENT_BALLPARK_LIM	5
#define IMAG_CHECK_CURRENT_TOL_LOWER_LIM 1

/* Backlash Parameters */
#define BACKLASH_INITIAL_BACKLASH_X			0
#define BACKLASH_BACKLASH_CORRECTION_X		1
#define BACKLASH_BACKLASH_AMOUNT_X			.0003
#define BACKLASH_INITIAL_BACKLASH_Y			0
#define BACKLASH_BACKLASH_CORRECTION_Y		1
#define BACKLASH_BACKLASH_AMOUNT_Y			.0003
#define BACKLASH_INITIAL_BACKLASH_Z			1
#define BACKLASH_BACKLASH_CORRECTION_Z		1
#define BACKLASH_BACKLASH_AMOUNT_Z			.0003
#define BACKLASH_ZERO_POSITION				1

/* Measurement parameters */
#define BNVSZ_COIL_RADIUS				0.0013361
#define BNVSZ_COIL_NUM_TURNS			30.
#define BNVSZ_COIL_LENGTH				0.00348
#define BNVSZ_NUM_HAR					4
#define BNVSZ_Z_MIN						0.0 
#define BNVSZ_Z_STEP					-0.002894
#define BNVSZ_NUM_Z_POS					1
static double  BNVSZ_Z_POS[BNVSZ_NUM_Z_POS];
#define BNVSZ_NUM_STAND_CYCLES			0
#define BNVSZ_STAND_MAX					6
#define BNVSZ_STAND_MIN					-6
#define BNVSZ_NUM_TEST_CURRENTS			1
static double  BNVSZ_TEST_CURRENTS[BNVSZ_NUM_TEST_CURRENTS] = {4.3};
static double BUCKING_FACTOR[BNVSZ_NUM_HAR] = {1.0039, 0.99848, 1.0001, 1.0}; /* 1st num is dipole, 2nd quad, 3rd sext etc.  */ 

 
/* End protection */
#endif
