'PARAM.INC

'****************************************************************************
'This file contains all the parameters of the Babar field map.
'
'Zachary Wolf
'10/23/97
'****************************************************************************

'Define the GPIB addresses
'Don't use address 21, system controller
CONST k7011gpibaddrP$ = "07"      'K7011 MUX GPIB address
CONST hp3457gpibaddrP$ = "22"     'HP3457 DVM GPIB address
CONST pt2025gpibaddrP$ = "02"     'PT2025 Teslameter GPIB address
CONST gp31gpibaddrP$ = "17"       'Group 3, probe #1 GPIB address
CONST gp32gpibaddrP$ = "16"       'Group 3, probe #2 GPIB address
CONST gp33gpibaddrP$ = "16"       'Group 3, probe #3 GPIB address

'Define the RS232 open parameters and addresses
CONST sxrs232openparP$ = "COM1:9600,N,8,1,ASC,RS,CD0,CS0,DS0"
CONST zdrivers232addrP$ = "2"     'SX drive for z motion
CONST tdrivers232addrP$ = "3"     'SX drive for theta motion

'Define Z software limits for the map
CONST zminlimitP! = -4!           'Z motion software limit (m)
CONST zmaxlimitP! = 4!            'Z motion software limit (m)

'Define Z motion parameters
CONST zdrivenmeterperrevP! = .0011548  'Z motion (m) per motor revolution
CONST zreadnmeterperlineP! = .00002    'Z encoder line spacing (m)
CONST zccwsoftlimitP! = -4!       'CCW software limit (m)
CONST zcwsoftlimitP! = 4!         'CW software limit (m)
CONST zlimitdecelP! = .02         'mps^2
CONST zaccelP! = .02              'mps^2
CONST zdecelP! = .02              'mps^2
CONST zvelP! = .012               'mps

'Define TH software limits for the map
CONST tminlimitP! = -361!         'TH motion software limit (deg)
CONST tmaxlimitP! = 361!          'TH motion software limit (deg)

'Define TH motion parameters
CONST tdrivendegperrevP! = 23.0032  'TH motion (deg) per motor revolution
CONST treadndegperlineP! = .3515625 'TH encoder line spacing (360 deg / 1024 lines)
CONST tccwsoftlimitP! = -361!     'CCW software limit (deg)
CONST tcwsoftlimitP! = 361!       'CW software limit (deg)
CONST tlimitdecelP! = 9!          'dps^2
CONST taccelP! = 9!               'dps^2
CONST tdecelP! = 9!               'dps^2
CONST tvelP! = 1!                 'dps

'Magnet Current parameters
CONST imag1hpchanP% = 2           'HP3457 channel for magnet current
CONST vtrans1perimagP! = .00125   'Transductor volts per amp (V/A)
CONST imag2hpchanP% = 3           'HP3457 channel for magnet current
CONST vtrans2perimagP! = .00125   'Transductor volts per amp (V/A)
CONST imag3hpchanP% = 6           'HP3457 channel for magnet current
CONST vtrans3perimagP! = .03333   'Transductor volts per amp (V/A)
CONST imagnmeasaveP% = 3          'Number of current measurements for averaging

'Temperature Sensor parameters
CONST temp1hpchanP% = 4           'HP3457 channel for temperature sensor 1
CONST temp2hpchanP% = 5           'HP3457 channel for temperature sensor 2

'NMR parameters
CONST bnmrnomP! = 1.5             'Nominal field strength for search (T) (must be within +-5%)

'Share non-const arrays with other routines in the main module
COMMON SHARED /param/ hallparamP!(), hallnameP$()

'Hall probe parameters
CONST muxhpchanP% = 1             'HP3457 channel the MUX is connected to
CONST nmeasaveP% = 3              'Number of measurements to average
CONST nhallP% = 14                'Number of Hall probes
CONST nhallparamP% = 3            'Number of parameters for each Hall probe
DIM hallparamP!(1 TO nhallP%, 1 TO nhallparamP%)
DIM hallnameP$(1 TO nhallP%)

'Hall probe parameter info
'Parameter 1 is the multiplexer channel number for the probe
'Parameter 2 is the calibration constant (T/V)
'Parameter 3 is the voltage offset with B=0 (V)

'Assign values

'Probe 1
hallnameP$(1) = "backupBr_pos1, Rrel = 00.0 cm, Sentron RZ Probe 1 (T), 10^-4 X Channel"
hallparamP!(1, 1) = 1             'MUX ch
hallparamP!(1, 2) = .99877        'Calibration factor (T/V)
hallparamP!(1, 3) = 0!            'Voltage offset with B=0 (V)

'Probe 2
hallnameP$(2) = "Bz_pos2, Rrel = 15.0 cm, Sentron RZ Probe 2 (T), 10^-4 X Channel"
hallparamP!(2, 1) = 2             'MUX ch
hallparamP!(2, 2) = .99989        'Calibration factor (T/V)
hallparamP!(2, 3) = 0!            'Voltage offset with B=0 (V)

'Probe 3
hallnameP$(3) = "Bz_pos3, Rrel = 30.0 cm, Sentron RZ Probe 3 (T), 10^-4 X Channel"
hallparamP!(3, 1) = 3             'MUX ch
hallparamP!(3, 2) = .99974        'Calibration factor (T/V)
hallparamP!(3, 3) = 0!            'Voltage offset with B=0 (V)

'Probe 4
hallnameP$(4) = "Bz_pos4, Rrel = 45.0 cm, Sentron RZ Probe 4 (T), 10^-4 X Channel"
hallparamP!(4, 1) = 4             'MUX ch
hallparamP!(4, 2) = .99956        'Calibration factor (T/V)
hallparamP!(4, 3) = 0!            'Voltage offset with B=0 (V)

'Probe 5
hallnameP$(5) = "Bz_pos5, Rrel = 60.0 cm, Sentron RZ Probe 5 (T), 10^-4 Y Channel"
hallparamP!(5, 1) = 5            'MUX ch
hallparamP!(5, 2) = 1.00018      'Calibration factor (T/V)
hallparamP!(5, 3) = 0!           'Voltage offset with B=0 (V)

'Probe 6
hallnameP$(6) = "Broken, Rrel = 00.0 cm, Sentron RZ Probe 1 (T), 10^-3 Y Channel"
hallparamP!(6, 1) = 11            'MUX ch
hallparamP!(6, 2) = 1.00014       'Calibration factor (T/V)
hallparamP!(6, 3) = 0!            'Voltage offset with B=0 (V)

'Probe 7
hallnameP$(7) = "Br_pos2, Rrel = 15.0 cm, Sentron RZ Probe 2 (T), 10^-3 Y Channel"
hallparamP!(7, 1) = 12            'MUX ch
hallparamP!(7, 2) = -.99918       'Calibration factor (T/V)
hallparamP!(7, 3) = -.00011       'Voltage offset with B=0 (V)

'Probe 8
hallnameP$(8) = "Br_pos3, Rrel = 30.0 cm, Sentron RZ Probe 3 (T), 10^-3 Y Channel"
hallparamP!(8, 1) = 13            'MUX ch
hallparamP!(8, 2) = -.99932       'Calibration factor (T/V)
hallparamP!(8, 3) = 0!            'Voltage offset with B=0 (V)

'Probe 9
hallnameP$(9) = "Br_pos4, Rrel = 45.0 cm, Sentron RZ Probe 4 (T), 10^-3 Y Channel"
hallparamP!(9, 1) = 14            'MUX ch
hallparamP!(9, 2) = -.99982       'Calibration factor (T/V)
hallparamP!(9, 3) = 0!            'Voltage offset with B=0 (V)

'Probe 10
hallnameP$(10) = "Br_pos5, Rrel = 60.0 cm, Sentron RZ Probe 5 (T), 10^-3 X Channel"
hallparamP!(10, 1) = 15            'MUX ch
hallparamP!(10, 2) = 1.00052       'Calibration factor (T/V)
hallparamP!(10, 3) = 0!            'Voltage offset with B=0 (V)

'Probe 11
hallnameP$(11) = "Bphi_pos3.5, Rrel = 22.5 cm, Sentron Phi Probe 1 (T), 10^-3 Accuracy"
hallparamP!(11, 1) = 21           'MUX ch
hallparamP!(11, 2) = -1!          'Calibration factor (T/V)
hallparamP!(11, 3) = 0!           'Voltage offset with B=0 (V)

'Probe 12
hallnameP$(12) = "Bphi_pos4.5, Rrel = 57.5 cm, Sentron Phi Probe 2 (T), 10^-3 Accuracy"
hallparamP!(12, 1) = 22           'MUX ch
hallparamP!(12, 2) = -1!          'Calibration factor (T/V)
hallparamP!(12, 3) = 0!           'Voltage offset with B=0 (V)

'Probe 13
hallnameP$(13) = "Br_pos1, Rrel = 00.0 cm, Sentron Loaner Probe (T), 10^-3 Accuracy"
hallparamP!(13, 1) = 16            'MUX ch
hallparamP!(13, 2) = 1!            'Calibration factor (T/V)
hallparamP!(13, 3) = -.0015        'Voltage offset with B=0 (V)

'Probe 14
hallnameP$(14) = "Fixed Hall probe, Group 3 (T), 10^-3 Accuracy"
hallparamP!(14, 1) = 32           'MUX ch
hallparamP!(14, 2) = 1!           'Calibration factor (T/V)
hallparamP!(14, 3) = 0!           'Voltage offset with B=0 (V)

