'PARAM.INC

'****************************************************************************
'This file contains all the parameters of the magnet test.  It also contains
'parameters defined in the program such as filenames.  Such parameters
'are put in common blocks.
'
'Zachary Wolf
'5/18/95
'****************************************************************************

'DEVICE PARAMETERS

'GPIB
COMMON SHARED /gpib/ gpibinP%, gpiboutP%

'DAC488HR
CONST dac488hrgpibaddrP% = 10     'IOTech DAC488HR/2 GPIB address

'HP3457
CONST hp3457gpibaddrP% = 22       'HP3457A DVM GPIB address

'K7011
CONST k7011gpibaddrP% = 7         'Keithley 7011 GPIB address

'DAC488
CONST dac488gpibaddrP% = 9        'IOTech DAC488 GPIB address

'MEASUREMENT AND CONTROL PARAMETERS

'IMAG
CONST imaghpchanP% = 3            'HP3457 channel for the transductor voltage
CONST imagpervdacP! = 200         'power supply amps per DAC volts
CONST imagtransvperiP! = .005     'transductor voltage per magnet amp
CONST imagramprateP! = 10         'power supply amperes per second during a ramp
CONST imagtstableP% = 30          'the number of seconds to wait after a ramp
CONST imagnmeasaveP% = 4          'the number of measurements for I average
CONST nimagstandP% = 8            'the number of standardization currents
CONST nimagtestP% = 11            'number of measurement currents
DIM imagstandP!(1 TO nimagstandP%) 'the standardization current array
DIM imagtestP!(1 TO nimagtestP%)  'the test current array
DIM imagharflagP!(1 TO nimagtestP%) 'the record-harmonics flag array
COMMON SHARED /imag/ imagstandP!(), imagtestP!(), imagharflagP!()

'COIL
CONST coilfreqhpchanP% = 6        'HP3457 channel # for the coil frequency
CONST coilnsampleP% = 64          'the number of voltage samples per revolution
CONST coilnrotaveP% = 10          'the number of coil rotations for V average
COMMON SHARED /coil/ coilradiusmP!, coilnturnsP%, coilvolthpchanP%

'RT
CONST rttbtwnmeassecP% = 60       '# seconds between RT measurements

'TMAG
CONST tmagmxhpchanP% = 4          'HP3457 channel for the multiplexer
CONST tmagmxcardP% = 1            'K7011 card number
CONST tmagt1mxchanP% = 12         'K7011 T1 channel
CONST tmagt1nameP$ = "Water In"
CONST tmagt2mxchanP% = 13         'K7011 T2 channel
CONST tmagt2nameP$ = "Water Out"
CONST tmagt3mxchanP% = 14         'K7011 T3 channel
CONST tmagt3nameP$ = "Magnet Iron"
CONST tmagt4mxchanP% = 15         'K7011 T4 channel
CONST tmagt4nameP$ = "Magnet Coil"
CONST tmagt5mxchanP% = 31         'K7011 T5 channel
CONST tmagt5nameP$ = "Ambient"

'VMAG
CONST vmagmxhpchanP% = 4          'HP3457 channel for the multiplexer
CONST vmagmxcardP% = 1            'K7011 card number
CONST vmagmxchanP% = 11           'K7011 magnet voltage channel

'MAGNETIC FIELD MEASUREMENT PARAMETERS

'BLN
CONST blnnmeasaveP% = 4           'the number of measurements for B average

'SPOL
CONST spolnhardisplayP% = 16      'the number of harmonics to print out < nsampleP%/2

'MEASUREMENT COIL BEING USED

'PEP1 MEASUREMENT COIL
CONST pep1nturnsP% = 20           'number of turns on the measurement coil
CONST pep1radiusmP! = .044882     'radius of the coil in m
CONST pep1volthpchanP% = 5        'HP3457 channel for the coil voltage

'UTILITIES

'GETPARAM
COMMON SHARED /getparam/ magnameP$, barcodeP$, posbarP$, projectP$, teststandP$, coilnameP$, operatorP$, runP$, commentP$

'FILE
COMMON SHARED /file/ logfileP$, rawfileP$, rtdatP$, sldatP$, slpltP$, hardatP$, harpltP$

'ASSIGN VALUES IN COMMON BLOCKS

'Fill several GETPARAM parameters
projectP$ = "PEP II High Energy Ring Sextupoles"
teststandP$ = "IR8, S1, "
coilnameP$ = "# 1"

'Fill the COIL common block
coilradiusmP! = pep1radiusmP!
coilnturnsP% = pep1nturnsP%
coilvolthpchanP% = pep1volthpchanP%

'Define the IMAG standardization cycle
imagstandP!(1) = 250!
imagstandP!(2) = 10!
imagstandP!(3) = 200!
imagstandP!(4) = 10!
imagstandP!(5) = 200!
imagstandP!(6) = 10!
imagstandP!(7) = 200!
imagstandP!(8) = 10!

'Define the IMAG test currents
imagtestP!(1) = 25!
imagtestP!(2) = 50!
imagtestP!(3) = 100!
imagtestP!(4) = 125!
imagtestP!(5) = 150!
imagtestP!(6) = 175!
imagtestP!(7) = 200!
imagtestP!(8) = 150!
imagtestP!(9) = 100!
imagtestP!(10) = 50!
imagtestP!(11) = 25!

'Set IMAG record-harmonics flags
imagharflagP!(1) = 1!
imagharflagP!(2) = 1!
imagharflagP!(3) = 1!
imagharflagP!(4) = 0!
imagharflagP!(5) = 1!
imagharflagP!(6) = 0!
imagharflagP!(7) = 1!
imagharflagP!(8) = 0!
imagharflagP!(9) = 0!
imagharflagP!(10) = 0!
imagharflagP!(11) = 0!
'imagharflagP!(12) = 0!
'imagharflagP!(13) = 0!
'imagharflagP!(14) = 0!
'imagharflagP!(15) = 0!

