LASER INTERFEROMETER GRAVITATIONAL WAVE OBSERVATORY LIGO Laboratory / LIGO Scientific Collaboration LIGO- E1200632-v4 Advanced LIGO 9/4/2013 TwinCAT Library for the ALS Laser Alexa Staley, Daniel Sigg Distribution of this document: LIGO Scientific Collaboration This is an internal working note of the LIGO Laboratory. California Institute of Technology LIGO Project – MS 18-34 1200 E. California Blvd. Pasadena, CA 91125 Phone (626) 395-2129 Fax (626) 304-9834 E-mail: info@ligo.caltech.edu Massachusetts Institute of Technology LIGO Project – NW22-295 185 Albany St Cambridge, MA 02139 Phone (617) 253-4824 Fax (617) 253-7014 E-mail: info@ligo.mit.edu LIGO Hanford Observatory P.O. Box 159 Richland WA 99352 Phone 509-372-8106 Fax 509-372-8137 LIGO Livingston Observatory P.O. Box 940 Livingston, LA 70754 Phone 225-686-3100 Fax 225-686-7189 http://www.ligo.caltech.edu/ LIGO LIGO-E1200632-v4 Library Title ALSLaser Version 4 TwinCAT version 2.11 Name space – Author Alexa Staley, Daniel Sigg Description Monitors the ALS Laser Controls the crystal and doubler temperature A slow feedback servo is implemented to offload the fast PZT feedback to the slow temperature controls. It implements the following equation: 𝑢𝑢 = (1 − ℎ) × 𝑢𝑢−1 + 𝑢𝑢 × (ℎ − 𝑢) Or if the polarity is false: 𝑢𝑢 = (1 − ℎ) × 𝑢𝑢−1 + 𝑢𝑢 × (ℎ + 𝑢) with 𝑢 = 𝑢𝑢𝑢𝑢𝑢 ∆𝑢 and ℎ = 𝑢𝑢𝑢𝑢 ∆𝑢. ∆𝑢: sampling interval, 𝑢𝑢𝑢𝑢 : unity gain frequency of integrator, 𝑢𝑢𝑢 : Knee frequency of proportional gain. (only used for control of the laser crystal, not the doubler) Error codes 0x0001 – Safety interlock engaged 0x0002 – Laser diode 1 guard alarm 0x0004 – Laser diode 2 guard alarm 0x0008 – Laser diode 1 current out-of-range 0x0010 – Laser diode 2 current out-of-range 0x0020 – Laser crystal TEC error signal out-of-range 0x0040 – Doubler crystal TEC error signal out-of-range 0x0080 – Laser diode 1 TEC error signal out-of-range 0x0100 – Laser diode 2 TEC error signal out-of-range 0x0200 – Noise eater readback signal out-of-range 0x0400 – Unity gain frequency too high 0x0800 – Proportional gain knee frequency too high 0x1000 – Temperature feedback limit exceeded Library dependencies ReadADC, WriteADC, SaveRestore, Error 2 LIGO LIGO-E1200632-v4 Hardware Input Type TYPE ALSLaserInStruct : STRUCT LaserDiode1PowerMonitor: LaserDiode2PowerMonitor: LaserCrystalTECErrorSignal: DoublingCrystalTECErrorSignal: LaserDiode1TECErrorSignal: LaserDiode2TECErrorSignal: NoiseEaterMonitor: LaserDiode1TempGuard: LaserDiode2TempGuard: InterLock: END_STRUCT END_TYPE INT; INT; INT; INT; INT; INT; INT; BOOL; BOOL; BOOL; Type name ALSLaserInStruct Description Structure of the hardware input that are wired up for the ALS laser Definition STRUCT Element Name: LaserDiode1PowerMonitor Type: INT Description: Laser diode 1 power monitor Element Name: LaserDiode2PowerMonitor Type: INT Description: Laser diode 2 power monitor Element Name: LaserCrystalTECErrorSignal Type: INT Description: Laser crystal, TEC error signal Element Name: DoublingCrystalTECErrorSignal Type: INT Description: Doubling crystal, TEC error signal Element Name: LaserDiode1TECErrorSignal Type: INT Description: Laser diode 1, TEC error signal Element Name: LaserDiode2TECErrorSignal Type: INT Description: Laser diode 2, TEC error signal Element Name: NoiseEaterMonitor Type: INT Description: Noise eater monitor 3 LIGO LIGO-E1200632-v4 Element Name: LaserDiode1TempGuard Type: BOOL Description: Laser diode 1, temp guard Element Name: LaserDiode2TempGuard Type: BOOL Description: Laser diode 2, temp guard Element Name: InterLock Type: BOOL Description: InterLock Hardware Output Type TYPE ALSLaserOutStruct : STRUCT CrystalTemperature: DoublerTemperature: END_STRUCT END_TYPE INT; INT; Type name ALSLaserOutStruct Description Structure of the hardware output that are wired up for the ALS laser Definition STRUCT Element Name: CrystalTemperature Type: INT Description: Crystal Temperature Element Name: DoublerTemperature Type: INT Description: Doubler Temperature 4 LIGO LIGO-E1200632-v4 User Interface Type TYPE ALSLaserFrequencyControlsStruct: STRUCT On: Enabled: Run: Reset: Low: High: Range: Ugf: Pf: Polarity: END_STRUCT END_TYPE BOOL; BOOL; BOOL; BOOL; LREAL; LREAL; BOOL; LREAL; LREAL; BOOL; Type name ALSLaserFrequencyControlsStruct Description Structure used in the user interface that are used for the slow temperature controls Definition STRUCT In/out Tag Name: On Type: BOOL Description: On/Off button for temperature feedback Output Tag Name: Enabled Type: BOOL Description: Enabled by the autolocker Output Tag Name: Run Type: BOOL Description: Servo is running In/out Tag Name: Reset Type: BOOL Description: Reset the integrator and zero the output In/out Tag Name: Low Type: LREAL Description: Low limit for feedback controls in Hz In/out Tag Name: High Type: LREAL Description: High limit for feedback controls in Hz Output Tag Name: Range Type: BOOL Description: Feedback controls exceeds range 5 LIGO LIGO-E1200632-v4 In/out Tag Name: Ugf Type: LREAL Description: Unity gain frequency of temperature servo in Hz In/out Tag Name: Pf Type: LREAL Description: Knee frequency of proportional feedback in Hz; zero is none 6 LIGO LIGO-E1200632-v4 User Interface Type TYPE ALSLaserStruct : STRUCT Error: LaserDiode1PowerMonitor: LaserDiode2PowerMonitor: LaserDiodePowerNominal: LaserDiodePowerTolerance: LaserCrystalTECErrorSignal: DoublingCrystalTECErrorSignal: LaserDiode1TECErrorSignal: LaserDiode2TECErrorSignal: TECTolerance: NoiseEaterMonitor: NoiseEaterNominal: NoiseEaterTolerance: LaserDiode1TempGuard: LaserDiode2TempGuard: InterLock: CrystalTemperature: CrystalCalibration: CrystalFrequency: FrequencyControl: PZTTuningCoefficient: PZTFrequency: DoublerTemperature: END_STRUCT END_TYPE ErrorStruct; LREAL; LREAL; LREAL; LREAL; LREAL; LREAL; LREAL; LREAL; LREAL; LREAL; LREAL; LREAL; BOOL; BOOL; BOOL; LREAL; LREAL; LREAL; ALSLaserFrequencyControlsStruct; LREAL; LREAL; LREAL; Type name ALSLaserStruct Description Structure of the user interface tags that are used to control the ALS Laser Definition STRUCT Output Tag Name: Error Type: ErrorStruct Description: For error handler Output Tag Name: LaserDiode1PowerMonitor Type: LREAL Description: Laser diode 1 power monitor in A Output Tag Name: LaserDiode2PowerMonitor Type: LREAL Description: Laser diode 2 power monitor in A 7 LIGO LIGO-E1200632-v4 Input Tag Name: LaserDiodePowerNominal Type: LREAL Description: Laser diode power nominal in A Input Tag Name: LaserDiodePowerTolerance Type: LREAL Description: Laser diode power tolerance in A Output Tag Name: LaserCrystalTECErrorSignal Type: LREAL Description: Laser crystal, TEC error signal in C Output Tag Name: DoublingCrystalTECErrorSignal Type: LREAL Description: Doubling crystal, TEC error signal in C Output Tag Name: LaserDiode1TECErrorSignal Type: LREAL Description: Laser diode 1, TEC error signal in C Output Tag Name: LaserDiode2TECErrorSignal Type: LREAL Description: Laser diode 2, TEC error signal in C Input Tag Name: TECTolerance Type: LREAL Description: TEC error signal tolerance in C Output Tag Name: NoiseEaterMonitor Type: LREAL Description: Noise eater monitor in V Input Tag Name: NoiseEaterNominal Type: LREAL Description: Noise eater nominal value in V Input Tag Name: NoiseEaterTolerance Type: LREAL Description: Noise eater tolerance in V Output Tag Name: LaserDiode1TempGuard Type: BOOL Description: Laser diode 1, temp guard, high is alarm Output Tag Name: LaserDiode2TempGuard Type: BOOL Description: Laser diode 2, temp guard, high is alarm Output Tag Name: InterLock Type: BOOL Description: InterLock, high represent an interlock 8 LIGO LIGO-E1200632-v4 In/out Tag Name: CrystalTemperature Type: LREAL Description: Crystal Temperature in C or V Output Tag Name: CrystalCalibration Type: LREAL Description: Crystal temperature coefficient at 1064nm in MHz/C; nominal -3000 MHz/C In/out Tag Name: CrystalFrequency Type: LREAL Description: Laser frequency as set by crystal temperature in MHz; updating the CrystalFrequency will update the CrystalTemperature and vis versa In/out Tag Name: FrequencyControl Type: ALSLaserFrequencyControlsStruct Description: Controls parameters for slow temperature feedback network Output Tag Name: PZTTuningCoefficient Type: LREAL Description: PZT tuning coefficient at 1064nm in MHz/V; nominal 1.5 MHz/V Output Tag Name: PZTFrequency Type: LREAL Description: Laser frequency as set by the PZT actuator in MHz Input Tag Name: DoublerTemperature Type: LREAL Description: Doubler Temperature 9 LIGO LIGO-E1200632-v4 Function Block FUNCTION_BLOCK ALSLaserFB VAR_INPUT Request: SaveRestoreEnum; ALSLaserIn: ALSLaserInStruct; ConstrolsEnable: BOOL:= FALSE; PZTVoltage: LREAL := 0.0; END_VAR VAR_OUTPUT ALSLaserOut: ALSLaserOutStruct; END_VAR VAR_IN_OUT ALSLaserInit: ALSLaserStruct; ALSLaser: ALSLaserStruct; END_VAR Name ALSLaserFB Description Monitors the ALS laser and computes the slow controls feedback Input argument Name: Request Type: SaveRestoreEnum Description: Request for save/restore/safemode or noop Input argument Name: ALSLaserIn Type: ALSLaserInStruct Description: Input hardware structure Input argument Name: ControlsEnable Type: BOOL Description: Enables the slow controls feedback Default: FALSE Input argument Name: PZTVoltage Type: LREAL Description: PZT controls voltage in V (error signal for slow controls feedback) Default: 0 Output argument Name: ALSLaserOut Type: ALSLaserOutStruct Description: Output hardware structure In/out argument Name: ALSLaser Type: ALSLaserStruct Description: User Interface structure In/out argument Name: ALSLaserInit Type: ALSLaserStruct 10 LIGO LIGO-E1200632-v4 Description: Save/restore variable in persistent memory Visual Name ALSLaserVis Description Displays power monitors, TEC error signals, noise eater status, crystal temperatures, slow temperature controls parameters, and alarms for temperature guards, interlock and error. Placeholder Name: ALSLaser Type: ALSLaserStruct Description: ALS laser structure 11