...
- Set the SSA drive max (ACCL:LXB:XXXX:SSA:DRV_MAX_REQ) to:
- 1 If harmonic linearizer
- 0.8 if not harmonic linearizer
- Reset SSA interlocks (set ACCL:LXB:XXXX:SSA:FaultReset to 1)
- Wait for the faults to reset (wait while ACCL:LXB:XXXX:SSA:StatusMsg is 4)
- if ACCL:LXB:XXXX:SSA:StatusMsg is either 1 or 7:
- Raise an error
- if ACCL:LXB:XXXX:SSA:StatusMsg is neither 1 nor 7:
- Turn on SSA (set ACCL:LXB:XXXX:SSA:PowerOn to 1)
- Wait for SSA to turn on (wait until ACCL:LXB:XXXX:SSA:StatusMsg is 3)
- Reset cavity interlocks (set ACCL:LXB:XXXX:INTLK_RESET_ALL to 1) and wait 3s
- If the reset failed (ACCL:LXB:XXXX:RFPERMIT is 0)
- Retry up to 2 more times
- If the reset succeed within 3 total attemps
- Continue to step 5.e.iii
- If the reset fails after 3 total attempts
- Throw an error
- If the reset succeeded (ACCL:LXB:XXXX:RFPERMIT is not 0)
- Start the calibration (set ACCL:LXB:XXXX:SSA:CALSTRT to 1)
- Wait for the calibration to stop running (wait while ACCL:LXB:XXXX:SSA:CALSTS is 2)
- If the calibration crashed (if ACCL:LXB:XXXX:SSA:CALSTS is 0)
- Throw an error
- If the calibration succeeded (if ACCL:LXB:XXXX:SSA:CALSTS is not 0)
- If result is not good (if ACCL:LXB:XXXX:SSA:CALSTAT is not 0)
- Throw an error
- If the result is good (if ACCL:LXB:XXXX:SSA:CALSTAT is 0)
- If the max forward power (ACCL:LXB:XXXX:SSA:CALPWR) is below 3000
- Throw an error
- If the max forward power (ACCL:LXB:XXXX:SSA:CALPWR) is above 3000
- If the measured slope (ACCL:LXB:XXXX:SSA:SLOPE_NEW) is not between 0.5 and 1.6
- Throw an error
- If the measured slope (ACCL:LXB:XXXX:SSA:SLOPE_NEW) is between 0.5 and 1.6
- Push the SSA slope (set ACCL:LXB:XXXX:PUSH_SSA_SLOPE.PROC to 1)
- Save the SSA slope (set ACCL:LXB:XXXX:SAVE_SSA_SLOPE.PROC to 1)
- If the measured slope (ACCL:LXB:XXXX:SSA:SLOPE_NEW) is not between 0.5 and 1.6
- If the max forward power (ACCL:LXB:XXXX:SSA:CALPWR) is below 3000
- If result is not good (if ACCL:LXB:XXXX:SSA:CALSTAT is not 0)