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.
상속: System.MarshalByRefObject
예제 #1
0
        static void Main(string[] config)
        {
            string cg;

            if(config.Length==0)
            {
              cg = "DefaultCavity";
            }
            else
            {
                cg = config[0];
            };

            Controller controller = new Controller(cg);

            // publish the controller to the remoting system
            TcpChannel channel = new TcpChannel(controller.config.TCPChannel);
            ChannelServices.RegisterChannel(channel, false);
            RemotingServices.Marshal(controller, "controller.rem");

            // hand over to the controller
            controller.Start();

            // the application is finishing - close down the remoting channel
            //RemotingServices.Disconnect(controller);
            //ChannelServices.UnregisterChannel(channel);
        }
예제 #2
0
        public override void AcquisitionStarting()
        {
            // connect the TCL controller over remoting network connection
            tclController = new TransferCavityLock2012.Controller();
            scanParameter = 0;

            setV((double)settings["start"], 200);
        }
예제 #3
0
        public override void AcquisitionStarting()
        {
            // connect the TCL controller over remoting network connection
            tclController = new TransferCavityLock2012.Controller();
            scanParameter = 0;

            setV((double)settings["start"], 200);
        }
예제 #4
0
        public override void AcquisitionStarting()
        {
            //connect the TCL controller over remoting network connection


            if (settings["computer"] == null)
            {
                computer = hostName;
            }
            else
            {
                computer = (String)settings["computer"];
            }

            if (settings["scannedParameter"] == null)
            {
                scannedParameter = "setpoint";
            }
            else
            {
                scannedParameter = (String)settings["scannedParameter"];
            }

            IPHostEntry hostInfo = Dns.GetHostEntry(computer);

            foreach (var addr in Dns.GetHostEntry(computer).AddressList)
            {
                if (addr.AddressFamily == AddressFamily.InterNetwork)
                {
                    name = addr.ToString();
                }
            }

            EnvironsHelper eHelper = new EnvironsHelper(computer);

            string tcpChannel = ((TCLConfig)eHelper.Hardware.GetInfo(settings["TCLConfig"])).TCPChannel.ToString();

            tclController = (TransferCavityLock2012.Controller)(Activator.GetObject(typeof(TransferCavityLock2012.Controller), "tcp://" + name + ":" + tcpChannel + "/controller.rem"));

            scanParameter = 0;

            initialVoltage  = tclController.GetLaserVoltage((string)settings["cavity"], (string)settings["channel"]);
            initialSetPoint = tclController.GetLaserSetpoint((string)settings["cavity"], (string)settings["channel"]);
            if (scannedParameter == "voltage")
            {
                tclController.UnlockLaser((string)settings["cavity"], (string)settings["channel"]);
            }

            //go gently to the correct start position
            if ((string)settings["scanMode"] == "up" || (string)settings["scanMode"] == "updown")
            {
                rampV((double)settings["start"], scannedParameter);
            }
            if ((string)settings["scanMode"] == "down" || (string)settings["scanMode"] == "downup")
            {
                rampV((double)settings["end"], scannedParameter);
            }
        }
예제 #5
0
        public override void AcquisitionStarting()
        {
            // connect the TCL controller over remoting network connection
            string tcpChannel = ((TCLConfig)Environs.Hardware.GetInfo(settings["cavity"])).TCPChannel.ToString();
            tclController = (TransferCavityLock2012.Controller)(Activator.GetObject(typeof(TransferCavityLock2012.Controller), "tcp://localhost:" + tcpChannel + "/controller.rem"));

            scanParameter = 0;

            setV((double)settings["start"], 200);
        }
예제 #6
0
        public override void AcquisitionStarting()
        {
            // connect the TCL controller over remoting network connection
            string tcpChannel = ((TCLConfig)Environs.Hardware.GetInfo(settings["cavity"])).TCPChannel.ToString();

            tclController = (TransferCavityLock2012.Controller)(Activator.GetObject(typeof(TransferCavityLock2012.Controller), "tcp://localhost:" + tcpChannel + "/controller.rem"));

            scanParameter = 0;

            setV((double)settings["start"], 200);
        }
예제 #7
0
        static void Main()
        {
            Controller controller = new Controller();

            // publish the controller to the remoting system
            TcpChannel channel = new TcpChannel(1190);
            ChannelServices.RegisterChannel(channel, false);
            RemotingServices.Marshal(controller, "controller.rem");

            // hand over to the controller
            controller.Start();

            // the application is finishing - close down the remoting channel
               // RemotingServices.Disconnect(controller);
               // ChannelServices.UnregisterChannel(channel);
        }
예제 #8
0
        /// <summary>
        /// This controls which parts of the UI are enabled for a given machine state.
        /// </summary>
        public void UpdateUIState(Controller.ControllerState state)
        {
            switch (state)
            {
                case Controller.ControllerState.STOPPED:
                    rampStartButton.Enabled = true;
                    rampStopButton.Enabled = false;
                    NumberOfScanpointsTextBox.Enabled = true;
                    rampLED.Value = false;
                    break;

                case Controller.ControllerState.RUNNING:
                    rampStartButton.Enabled = false;
                    rampStopButton.Enabled = true;
                    NumberOfScanpointsTextBox.Enabled = false;
                    rampLED.Value = true;
                    break;
            }
        }