diff --git a/bam/baseconfig.py b/bam/baseconfig.py index 068d091727b082b7d019700cf9cedb2603f11d61..384b89a2e49d3cdfc8be7b5e9ceb6d7942966887 100644 --- a/bam/baseconfig.py +++ b/bam/baseconfig.py @@ -25,29 +25,13 @@ def getMotorForStation(station: str) -> str: except KeyError: return 'MOTOR_DEVICE' -# Names of the properties for the different flattops on the Toroid server -TOROID_FT = { - 'XFEL' : ['SAMPLE.SA1', 'SAMPLE.SA2', 'SAMPLE.SA3'], - 'FLASH' : ['SAMPLE.FLASH1', 'SAMPLE.FLASH2', 'this/allZero'] -} -# Lab is part of XFEL but has different location -TOROID_FT['LAB'] = TOROID_FT['XFEL'] - RING_BUFFER = 50000 STORE_RATE = 100 SDM_REVISION = 'r3992' -ZERO_CROSSINGS = 3 - feedbackIntegrationTicks = 10 -# A Motor is either: -# * Not connected: None -# * A pair of integers (a,b) with a being the MD22 controller, b the -# subdevice on that controller -MOTOR_AVAILABLE = [None, None, None, None] - # # Settings which are filled by the accelerator-specific files # @@ -66,30 +50,8 @@ LINK_LOCK_NUMBER = dict() TIMER_LOCATION = dict() -TOROID_DATA_THRESHOLD = dict() - MOTOR_CONVERSION_FACTOR = dict() -MOTOR_CONVERSION_REFLECTION = dict() - -MOTOR_CONVERSION_TRANSLATION_OFFSET = dict() - -SIGN_MOTOR = dict() - -SIGN_SCALE = dict() - -SIGN_EOM = dict() - -START_ARRAY_VALUE_ACCURACY = dict() - -N_SAMPLE_ACCURACY = dict() - -FEEDBACK_THRESHOLD_CHARGE = dict() - -ARRIVAL_TIME_OFFSET = dict() - -ENCODER_OFFSETS = dict() - BCM_LOCATION = dict() LONGITUDINAL_FEEDBACK_MONITORS = dict() diff --git a/bam/settings/00-FLASH.py b/bam/settings/00-FLASH.py index b2b4ea13e85f4a24a546d7614f9dc971d0a718a3..928429a9deed16acbc41335b44d1124f8944337a 100644 --- a/bam/settings/00-FLASH.py +++ b/bam/settings/00-FLASH.py @@ -9,8 +9,6 @@ if ACCELERATOR == 'FLASH': RING_BUFFER = 1000000 TOROID_SAMPLES = 802 - ZERO_CROSSINGS = 4 - FLASH_STATIONS=[ 'FL0.UBC1', 'FL0.DBC1', @@ -31,17 +29,6 @@ MOTOR_AVAILABLE.update({ 'FLF.MAFF' : [(0,0), None, None, None] }) -# TODO: Measure and update -ENCODER_OFFSETS.update({ - 'FL0.UBC1' : [None, None], - 'FL0.DBC1' : [None, None], - 'FL0.UBC2' : [None, None], - 'FL0.DBC2' : [None, None], - 'FL1.SFELC' : [None], - 'FL2.SEED5' : [None], - 'FLF.MAFF' : [None] -}) - TOROID_LOCATION.update({ 'FL0.UBC1' : '2FL0UBC1', 'FL0.DBC1' : '8FL0DBC1', @@ -95,15 +82,6 @@ TIMER_LOCATION.update({ 'FL2.SEED5' : 'SDSEED5', 'FLF.MAFF' : 'SD7FLFMAFF' }) -TOROID_DATA_THRESHOLD.update({ - 'FL0.UBC1' : 3e-3, - 'FL0.DBC1' : 3e-3, - 'FL0.UBC2' : 3e-3, - 'FL0.DBC2' : 3e-2, - 'FL1.SFELC' : 3e-3, - 'FL2.SEED5' : 3e-3, - 'FLF.MAFF' : 3e-3 -}) MOTOR_CONVERSION_FACTOR.update({ 'FL0.UBC1' : [1.04230668925927, 1.04230668925927, 1.040000e+00, 1.040000e+00], 'FL0.DBC1' : [1.04230668925927, 1.04230668925927, 5.000000e-01, 5.000000e-01], @@ -113,88 +91,6 @@ MOTOR_CONVERSION_FACTOR.update({ 'FL2.SEED5' : [1.04230668925927, 1.042700e+00, 1.042700e+00, 1.042700e+00], 'FLF.MAFF' : [1.04230668925927, 1.042700e+00, 1.042700e+00, 1.042700e+00] }) -MOTOR_CONVERSION_REFLECTION.update({ - 'FL0.UBC1' : [1, 1, 1, 1], - 'FL0.DBC1' : [1, 1, 1, 1], - 'FL0.UBC2' : [1, 1, 1, 1], - 'FL0.DBC2' : [1, 1, 1, 1], - 'FL1.SFELC' : [1, 1, 1, 1], - 'FL2.SEED5' : [1, 1, 1, 1], - 'FLF.MAFF' : [1, 1, 1, 1] -}) -MOTOR_CONVERSION_TRANSLATION_OFFSET.update({ - 'FL0.UBC1' : [0, 0, 0, 0], - 'FL0.DBC1' : [0, 0, 0, 0], - 'FL0.UBC2' : [0, 0, 0, 0], - 'FL0.DBC2' : [0, 0, 0, 0], - 'FL1.SFELC' : [0, 0, 0, 0], - 'FL2.SEED5' : [0, 0, 0, 0], - 'FLF.MAFF' : [0, 0, 0, 0] -}) -SIGN_MOTOR.update({ - 'FL0.UBC1' : [1, 1, 1], - 'FL0.DBC1' : [1, 1, 1], - 'FL0.UBC2' : [1, 1, 1], - 'FL0.DBC2' : [1, 1, 1], - 'FL1.SFELC' : [1, 1, 1], - 'FL2.SEED5' : [1, 1, 1], - 'FLF.MAFF' : [1, 1, 1] -}) -SIGN_SCALE.update({ - 'FL0.UBC1' : [1e-3, 1e-3, 1e-3], - 'FL0.DBC1' : [1e-3, 1e-3, 1e-3], - 'FL0.UBC2' : [1e-3, 1e-3, 1e-3], - 'FL0.DBC2' : [1e-3, 1e-3, 1e-3], - 'FL1.SFELC' : [1e-3, 1e-3, 1e-3], - 'FL2.SEED5' : [1e-3, 1e-3, 1e-3], - 'FLF.MAFF' : [1e-3, 1e-3, 1e-3] -}) - -SIGN_EOM.update({ - 'FL0.UBC1' : [-1, -1], - 'FL0.DBC1' : [-1, -1], - 'FL0.DBC2' : [-1, -1], - 'FL1.SFELC' : [-1, -1], - 'FL2.SEED5' : [-1, -1], - 'FLF.MAFF' : [-1, -1] -}) -START_ARRAY_VALUE_ACCURACY.update({ - 'FL0.UBC1' : 1, - 'FL0.DBC1' : 1, - 'FL0.UBC2' : 1, - 'FL0.DBC2' : 1, - 'FL1.SFELC' : 1, - 'FL2.SEED5' : 1, - 'FLF.MAFF' : 1 -}) -N_SAMPLE_ACCURACY.update({ - 'FL0.UBC1' : '255', - 'FL0.DBC1' : '255', - 'FL0.UBC2' : '255', - 'FL0.DBC2' : '255', - 'FL1.SFELC' : '255', - 'FL2.SEED5' : '255', - 'FLF.MAFF' : '255' -}) -FEEDBACK_THRESHOLD_CHARGE.update({ - 'FL0.UBC1' : [0,0,0], - 'FL0.DBC1' : [0,0,0], - 'FL0.UBC2' : [0,0,0], - 'FL0.DBC2' : [0,0,0], - 'FL1.SFELC' : [0,0,0], - 'FL2.SEED5' : [0,0,0], - 'FLF.MAFF' : [0,0,0] -}) -ARRIVAL_TIME_OFFSET.update({ - 'FL0.UBC1' : [-1.3e+05, -1.3e+05, 0.0], - 'FL0.DBC1' : [-1.3e+05, -1.3e+05, 0.0], - 'FL0.UBC2' : [-1.3e+05, -1.3e+05, 0.0], - 'FL0.DBC2' : [-1.3e+05, -1.3e+05, 0.0], - 'FL1.SFELC' : [-1.3e+05, -1.3e+05, 0.0], - 'FL2.SEED5' : [-1.3e+05, -1.3e+05, 0.0], - 'FLF.MAFF' : [-1.3e+05, -1.3e+05, 0.0] -}) - LONGITUDINAL_FEEDBACK_MONITORS.update({ 'FL0.UBC1' : "MONITOR3", 'FL0.DBC1' : "MONITOR4", diff --git a/bam/settings/00-XFEL.py b/bam/settings/00-XFEL.py index c8963e9fea86348dc083e82d769133fc5c849974..873bc6e0f29aec50379b11a161f456a317b6191e 100644 --- a/bam/settings/00-XFEL.py +++ b/bam/settings/00-XFEL.py @@ -15,16 +15,6 @@ MOTOR_AVAILABLE.update({ '1932S.TL' : [(0,0), None, None, None] }) -ENCODER_OFFSETS.update({ - '47.I1' : [114786000], - '181.B1' : [115188000], - '203.B1' : [114735000], - '392.B2' : [114735000], - '414.B2' : [115338000, 115166000], - '1932M.TL' : [115454000, 115454000], - '1932S.TL' : [115159000, 115159000], -}) - TOROID_LOCATION.update({ '47.I1' : 'TORA.46.I1', '181.B1' : 'TORA.175.B1', @@ -88,16 +78,6 @@ TIMER_LOCATION.update({ '1932S.TL' : 'SD1932TL' }) -TOROID_DATA_THRESHOLD.update({ - '47.I1' : 3e-3, - '181.B1' : 3e-3, - '203.B1' : 5e-3, - '392.B2' : 3e-3, - '414.B2' : 3e-3, - '1932M.TL' : 3e-3, - '1932S.TL' : 3e-3 -}) - MOTOR_CONVERSION_FACTOR.update({ '47.I1' : [1.04230668925927, 1.04230668925927, 4.957000e-01, 4.957000e-01], '181.B1' : [1.04230668925927, 1.04230668925927, 4.995900e-01, 4.995900e-01], @@ -108,96 +88,6 @@ MOTOR_CONVERSION_FACTOR.update({ '1932S.TL' : [1.04230668925927, 1.04230668925927, 1.042680e+00, 1.042680e+00] }) -MOTOR_CONVERSION_REFLECTION.update({ - '47.I1' : [1, 1, 1, 1], - '181.B1' : [1, 1, 1, 1], - '203.B1' : [1, 1, 1, 1], - '392.B2' : [1, 1, 1, 1], - '414.B2' : [1, 1, 1, 1], - '1932M.TL' : [1, 1, 1, 1], - '1932S.TL' : [1, 1, 1, 1] -}) - -MOTOR_CONVERSION_TRANSLATION_OFFSET.update({ - '47.I1' : [0, 0, 0, 0], - '181.B1' : [0, 0, 0, 0], - '203.B1' : [0, 0, 0, 0], - '392.B2' : [0, 0, 0, 0], - '414.B2' : [0, 0, 0, 0], - '1932M.TL' : [0, 0, 0, 0], - '1932S.TL' : [0, 0, 0, 0] -}) - -SIGN_MOTOR.update({ - '47.I1' : [1, 1, 1], - '181.B1' : [1, 1, 1], - '203.B1' : [1, 1, 1], - '392.B2' : [1, 1, 1], - '414.B2' : [1, 1, 1], - '1932M.TL' : [1, 1, 1], - '1932S.TL' : [1, 1, 1] -}) - -SIGN_SCALE.update({ - '47.I1' : [1e-3, 1e-3, 1e-3], - '181.B1' : [1e-3, 1e-3, 1e-3], - '203.B1' : [1e-3, 1e-3, 1e-3], - '392.B2' : [1e-3, 1e-3, 1e-3], - '414.B2' : [1e-3, 1e-3, 1e-3], - '1932M.TL' : [1e-3, 1e-3, 1e-3], - '1932S.TL' : [1e-3, 1e-3, 1e-3] -}) - -SIGN_EOM.update({ - '47.I1' : [-1, -1], - '181.B1' : [-1, -1], - '203.B1' : [-1, -1], - '392.B2' : [-1, -1], - '414.B2' : [-1, -1], - '1932M.TL' : [-1, -1], - '1932S.TL' : [-1, -1] -}) - -START_ARRAY_VALUE_ACCURACY.update({ - '47.I1' : 1, - '181.B1' : 1, - '203.B1' : 1, - '392.B2' : 1, - '414.B2' : 1, - '1932M.TL' : 1, - '1932S.TL' : 1 -}) - -N_SAMPLE_ACCURACY.update({ - '47.I1' : '255', - '181.B1' : '255', - '203.B1' : '255', - '392.B2' : '255', - '414.B2' : '250', - '1932M.TL' : '200', - '1932S.TL' : '200' -}) - -FEEDBACK_THRESHOLD_CHARGE.update({ - '47.I1' : [0,0,0], - '181.B1' : [0,0,0], - '203.B1' : [0,0,0], - '392.B2' : [0,0,0], - '414.B2' : [0,0,0], - '1932M.TL' : [0,0,0], - '1932S.TL' : [0,0,0] -}) - -ARRIVAL_TIME_OFFSET.update({ - '47.I1' : [-1.300000e+05, -1.300000e+05, 0.0], - '181.B1' : [-1.300000e+05, -1.300000e+05, 0.0], - '203.B1' : [-1.300000e+05, -1.300000e+05, 0.0], - '392.B2' : [-1.300000e+05, -1.300000e+05, 0.0], - '414.B2' : [-1.300000e+05, -1.300000e+05, 0.0], - '1932M.TL' : [-8.600000e+04, -8.600000e+04, 0.0], - '1932S.TL' : [-2.500000e+05, -2.500000e+05, 0.0] -}) - BCM_LOCATION.update({ '47.I1' : "MONITOR4", '181.B1' : "MONITOR4", diff --git a/bam/settings/01-XFEL.LAB.py b/bam/settings/01-XFEL.LAB.py index 011e5eb49e44853dceafab1b602457bf7f8dba29..839259acabc0bbb14ce6443f5215c6a173292c59 100644 --- a/bam/settings/01-XFEL.LAB.py +++ b/bam/settings/01-XFEL.LAB.py @@ -32,55 +32,10 @@ TIMER_LOCATION.update({ 'XLAB1' : 'SD47I1', }) -TOROID_DATA_THRESHOLD.update({ - 'XLAB1' : 3e-3, -}) - MOTOR_CONVERSION_FACTOR.update({ 'XLAB1' : [5.213400e-01, 5.213400e-01, 4.957000e-01, 4.957000e-01], }) -MOTOR_CONVERSION_REFLECTION.update({ - 'XLAB1' : [1, 1, 1, 1], -}) - -MOTOR_CONVERSION_TRANSLATION_OFFSET.update({ - 'XLAB1' : [0, 0, 0, 0], -}) - -SIGN_MOTOR.update({ - 'XLAB1' : [1, 1, 1], -}) - -SIGN_SCALE.update({ - 'XLAB1' : [1e-3, 1e-3, 1e-3], -}) - -SIGN_EOM.update({ - 'XLAB1' : [-1, -1], -}) - -START_ARRAY_VALUE_ACCURACY.update({ - 'XLAB1' : 1, -}) - -N_SAMPLE_ACCURACY.update({ - 'XLAB1' : '255', -}) - -FEEDBACK_THRESHOLD_CHARGE.update({ - 'XLAB1' : [0,0,0], -}) - -ARRIVAL_TIME_OFFSET.update({ - 'XLAB1' : [-1.300000e+05, -1.300000e+05, 0.0], -}) - -# TODO: Measure and update -ENCODER_OFFSETS.update({ - 'XLAB1' : [1.15210515e8, 1.15210515e8] -}) - BCM_LOCATION.update({ 'XLAB1' : 'MONITOR8' }) diff --git a/bam/settings/10-FLASH.secondary.py b/bam/settings/10-FLASH.secondary.py index c79035d4e61ffbcf1bf115f32b5aa9522a35727f..b6208087536f3091200415940a2016242e02d77c 100644 --- a/bam/settings/10-FLASH.secondary.py +++ b/bam/settings/10-FLASH.secondary.py @@ -6,3 +6,4 @@ if ACCELERATOR == "FLASH" and STATION in ["FL0.UBC1", "FL0.UBC2"]: MOTOR_DEVNO = 'unis9' RPC_NUMBER = 610589844 BPN = 16000 + diff --git a/bam/settings/20-FLASH.flash2.py b/bam/settings/20-FLASH.flash2.py deleted file mode 100644 index f35ca978e994607194d82e60332930840d5fc3c7..0000000000000000000000000000000000000000 --- a/bam/settings/20-FLASH.flash2.py +++ /dev/null @@ -1,12 +0,0 @@ -if ACCELERATOR == 'FLASH': - if STATION == '1SFELC': - TOROID_FT['FLASH'] = ['SAMPLE.ALL', None, None] - - if STATION == '8FL2XTDS': - # FLASH2 uses the second flattop, but it is mapped to the first sample in that toroid - TOROID_FT['FLASH'] = [None, 'SAMPLE.FLASH2', None] - - if STATION == '7FLFMAFF': - # FLASH FORWARD is different again - TOROID_FT['FLASH'] = [None, 'SAMPLE.FLASH2', 'SAMPLE.FLASH3'] - diff --git a/bam/templates/bam_base_config.xml b/bam/templates/bam_base_config.xml index cfd8c8b13cb5e16bc3690b30cb41fdec38fe1c8f..2b0f30c3a748a2296323c624c761fa1042062292 100644 --- a/bam/templates/bam_base_config.xml +++ b/bam/templates/bam_base_config.xml @@ -3,8 +3,6 @@ motors = [x for x in MOTOR_AVAILABLE[STATION] if x is not None] number_of_motors = len(motors) conversion = MOTOR_CONVERSION_FACTOR[STATION] -encoderOffset = ENCODER_OFFSETS[STATION] -signScale = SIGN_SCALE[STATION] chargeSlope = DEFAULT_CHARGE_SLOPE try: chargeSlope = CHARGE_SLOPE[STATION] @@ -26,16 +24,6 @@ except KeyError: <variable name="conversionFactor" type="float"> %for i in range(len(motors)): <value i="${i}" v="${conversion[i]}" /> -%endfor - </variable> - <variable name="reflection" type="int8"> -%for i in range(len(motors)): - <value i="${i}" v="1" /> -%endfor - </variable> - <variable name="translationOffset" type="float"> -%for i in range(len(motors)): - <value i="${i}" v="0.0" /> %endfor </variable> <variable name="deviceName" type="string"> @@ -55,11 +43,6 @@ except KeyError: <variable name="driverId" type="uint8"> %for i in range(len(motors)): <value i="${i}" v="${motors[i][1]}" /> -%endfor - </variable> - <variable name="encoderOffset" type="double"> -%for i in range(len(motors)): - <value i="${i}" v="${encoderOffset[i]}" /> %endfor </variable> <variable name="motorConfig" type="string"> @@ -69,6 +52,9 @@ except KeyError: </variable> </module> <module name="Server"> + <module name="Features"> + <variable name="motorFeedback" type="boolean" value="true" /> + </module> <variable name="slowReadInterval" type="uint32" value="1" /> <variable name="sortBunchesToSase" type="int32" value="1" /> <variable name="bunchClassifier" type="string" value="${classifier}" /> @@ -93,7 +79,6 @@ except KeyError: <variable name="preSamples" type="float" value="0" /> <variable name="sampleFreq" type="float" value="9.02777777778" /> <variable name="nSamplesCompact" type="uint32" value="1000" /> - <variable name="nZeroCrossings" type="uint32" value="${ZERO_CROSSINGS}" /> <variable name="toroidCompaction" type="uint32" value="${toroid_compaction}" /> <variable name="feedbackIntegrationTicks" type="uint64" value="${feedbackIntegrationTicks}" /> </module> diff --git a/bam/templates/link1.cache b/bam/templates/link1.cache deleted file mode 100644 index e9dfb283e40f4ef564cb0048aa7d80994dfecca1..0000000000000000000000000000000000000000 --- a/bam/templates/link1.cache +++ /dev/null @@ -1,11 +0,0 @@ -##mako -<?xml version="1.0" encoding="UTF-8"?> -<catalogue version="1.0"> - <register> - <name>/LSU.${LINK_LOCK_NUMBER[STATION]}.LOCK_STATUS.VALUE.RD</name> - <length>1</length> - <access_mode>wait_for_new_data</access_mode> - <doocs_type_id>1</doocs_type_id> - <!--doocs id: INT--> - </register> -</catalogue> diff --git a/bam/templates/toroid.xlmap b/bam/templates/toroid.xlmap index b8e105ccbc6fc8343ba5deca1e8c9b72a6a7eb36..311142e1afb3947f33c21797d8f249c51d6dabaa 100644 --- a/bam/templates/toroid.xlmap +++ b/bam/templates/toroid.xlmap @@ -2,13 +2,6 @@ <?xml version="1.0" ?> <logicalNameMap> <module name="Toroid"> - <module name="Bunch"> - <redirectedRegister name="divider"> - <targetDevice>TOROID_RAW</targetDevice> - <targetRegister>9MHZ_DIV</targetRegister> - <plugin name="forceReadOnly" /> - </redirectedRegister> - </module> <redirectedRegister name="bunchCharge"> <targetDevice>TOROID_RAW</targetDevice> <targetRegister>CHARGE.TD</targetRegister> diff --git a/shared/local/templates/doocs/150-delay-lines b/shared/local/templates/doocs/150-delay-lines index 9ff998cb1da1edd2b27a83381de4e07dfadc7a0c..e9b8e9dab64c4d20d121aab57ff775cdcb3087ba 100644 --- a/shared/local/templates/doocs/150-delay-lines +++ b/shared/local/templates/doocs/150-delay-lines @@ -2,8 +2,6 @@ <!-- ODLs --> <!-- configuration --> <property name="MOTOR.conversionFactor" source="/Configuration/Motor/conversionFactor" /> - <property name="MOTOR.reflection" source="/Configuration/Motor/reflection" /> - <property name="MOTOR.translationOffset" source="/Configuration/Motor/translationOffset" /> <property name="MOTOR.count" source="/Configuration/Motor/motorCount" /> %for motor in range(getNumberOfMotors()):