A class for locking the laser using a transfer cavity.
Inheritance: System.MarshalByRefObject
Example #1
0
        static void Main()
        {
            Controller controller = new Controller();

            // publish the controller to the remoting system
               // TcpChannel channel = new TcpChannel(1179);
               // 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);
        }
Example #2
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;

                    lockEnableCheck.Enabled = false;

                    fitAndStabilizeEnableCheck.Enabled = false;

                    VoltageToLaserTextBox.Enabled = false;
                    LaserSetPointTextBox.Enabled = false;
                    GainTextbox.Enabled = false;

                    NumberOfScanpointsTextBox.Enabled = true;
                    CavityScanWidthTextBox.Enabled = true;
                    CavityScanOffsetTextBox.Enabled = true;

                    rampLED.Value = false;
                    break;

                case Controller.ControllerState.FREERUNNING:
                    rampStartButton.Enabled = false;
                    rampStopButton.Enabled = true;

                    fitAndStabilizeEnableCheck.Enabled = true;
                    fitAndStabilizeEnableCheck.Checked = false;

                    lockEnableCheck.Enabled = false;
                    VoltageToLaserTextBox.Enabled = false;
                    LaserSetPointTextBox.Enabled = false;
                    GainTextbox.Enabled = false;

                    NumberOfScanpointsTextBox.Enabled = false;
                    CavityScanWidthTextBox.Enabled = false;
                    CavityScanOffsetTextBox.Enabled = false;

                    rampLED.Value = true;
                    break;

                case Controller.ControllerState.LASERLOCKING:
                    VoltageToLaserTextBox.Enabled = false;
                    GainTextbox.Enabled = false;
                    break;

                case Controller.ControllerState.LASERLOCKED:

                    break;

                case Controller.ControllerState.CAVITYSTABILIZED:
                    VoltageToLaserTextBox.Enabled = true;
                    LaserSetPointTextBox.Enabled = true;
                    lockEnableCheck.Enabled = true;
                    GainTextbox.Enabled = true;
                    break;

            }
        }