C# Class TransferCavityLock2012.Controller

A class for locking the laser using a transfer cavity. The controller reads the voltage fed to the piezo of the cavity, the voltage from a photodiode measuring the light from a master laser (He-Ne) and a further n photodiode signals from n lasers you're trying to lock. The controller then fits a lorenzian to each of these datasets, and works out what to do with each slave laser to keep the peak distances the same. In the hardware class, you need to make a TCLConfig and populate all the fields of that TCLConfig.
Inheritance: System.MarshalByRefObject
Afficher le fichier Open project: ColdMatter/EDMSuite Class Usage Examples

Méthodes publiques

Свойство Type Description
SlaveLasers SlaveLaser>.Dictionary
TCLState ControllerState
config DAQ.TransferCavityLock2012.TCLConfig
default_ScanPoints int
rampStopLock object
tweakLock object

Méthodes publiques

Méthode Description
Controller ( ) : System
Controller ( string configName ) : System
DisengageLock ( string name ) : void
EngageLock ( string name ) : void
InitializeLifetimeService ( ) : Object
InitializeUI ( ) : void
RefreshLockParametersOnUI ( string name ) : void
SetLaserSetpoint ( string laserName, double newSetpoint ) : void
Start ( ) : void
StartLogger ( ) : void
StartTCL ( ) : void
StopLogger ( ) : void
StopTCL ( ) : void

This will make the program exit the while loop in ramploop. Note: this will call

UpdateUIState ( string name, SlaveLaser state ) : void

The controller needs to be able to change the UI. Enabling buttons, changing the values in text boxes...

disposeMasterVoltageOut ( ) : void
setupMasterVoltageOut ( ) : void
writeMasterVoltageOut ( double voltage ) : void

Private Methods

Méthode Description
AddSetPointDecrement ( string name ) : void
AddSetPointIncrement ( string name ) : void
GainChanged ( string name, double g ) : void
RefreshErrorGraph ( string name ) : void
SetPointIncrementSize ( string name, double value ) : void
VoltageToLaserChanged ( string name, double voltage ) : void

These are events triggered by one of the LockControlPanels. Example: User changes the voltage to be sent to the slave laser. The UI will call VoltageToLaserChanged. Each LockControlPanel knows which laser it corresponds to. so the "name" argument tells the controller which SlaveLaser class it needs to send the command to!

acquireAI ( ScanParameters sp ) : CavityScanData

Reads some analogue inputs. The basic unit of the program.

calculateNewMasterVoltage ( double masterV ) : double
checkRampChannel ( ) : bool

Functions for locking master laser to cavity length

createInitialScanParameters ( ) : ScanParameters
endRamping ( ) : void

The function which gets called at the end, after breaking out of the while loop.

fitMaster ( CavityScanData data ) : double[]
fitSlave ( string name, CavityScanData data ) : double[]
getErrorCount ( string name ) : int
incrementCounter ( string name ) : void
initializeAIHardware ( ScanParameters sp ) : void

Prepares the hardware for analog reads.

initializeAIs ( string>.Dictionary channels ) : void
initializeSlaveLaserControl ( string>.Dictionary lockableLasers ) : void
mainLoop ( ) : void

The main loop. Reads the analog inputs, fits to the data and (when locked) adjusts the slave laser voltage.

plotCavity ( CavityScanData data ) : void
plotError ( string name, double time, double error ) : void
plotMaster ( CavityScanData data ) : void
plotMaster ( CavityScanData data, double MasterFit ) : void
plotSlave ( string name, CavityScanData data, double slaveFit ) : void
plotSlaveNoFit ( string name, CavityScanData data ) : void
readParametersFromUI ( ) : void
updateTime ( System.DateTime previousTime ) : void

Method Details

Controller() public méthode

public Controller ( ) : System
Résultat System

Controller() public méthode

public Controller ( string configName ) : System
configName string
Résultat System

DisengageLock() public méthode

public DisengageLock ( string name ) : void
name string
Résultat void

EngageLock() public méthode

public EngageLock ( string name ) : void
name string
Résultat void

InitializeLifetimeService() public méthode

public InitializeLifetimeService ( ) : Object
Résultat Object

InitializeUI() public méthode

public InitializeUI ( ) : void
Résultat void

RefreshLockParametersOnUI() public méthode

public RefreshLockParametersOnUI ( string name ) : void
name string
Résultat void

SetLaserSetpoint() public méthode

public SetLaserSetpoint ( string laserName, double newSetpoint ) : void
laserName string
newSetpoint double
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

StartLogger() public méthode

public StartLogger ( ) : void
Résultat void

StartTCL() public méthode

public StartTCL ( ) : void
Résultat void

StopLogger() public méthode

public StopLogger ( ) : void
Résultat void

StopTCL() public méthode

This will make the program exit the while loop in ramploop. Note: this will call
public StopTCL ( ) : void
Résultat void

UpdateUIState() public méthode

The controller needs to be able to change the UI. Enabling buttons, changing the values in text boxes...
public UpdateUIState ( string name, SlaveLaser state ) : void
name string
state SlaveLaser
Résultat void

disposeMasterVoltageOut() public méthode

public disposeMasterVoltageOut ( ) : void
Résultat void

setupMasterVoltageOut() public méthode

public setupMasterVoltageOut ( ) : void
Résultat void

writeMasterVoltageOut() public méthode

public writeMasterVoltageOut ( double voltage ) : void
voltage double
Résultat void

Property Details

SlaveLasers public_oe property

public Dictionary SlaveLasers
Résultat SlaveLaser>.Dictionary

TCLState public_oe property

public ControllerState TCLState
Résultat ControllerState

config public_oe property

public TCLConfig,DAQ.TransferCavityLock2012 config
Résultat DAQ.TransferCavityLock2012.TCLConfig

default_ScanPoints public_oe property

public int default_ScanPoints
Résultat int

rampStopLock public_oe property

public object rampStopLock
Résultat object

tweakLock public_oe property

public object tweakLock
Résultat object