Example #1
0
        public TCLEDMHardware()
        {
            //Add the boards
            Boards.Add("tclBoardPump", "/PXI1Slot5");
            Boards.Add("tclBoardProbe", "/PXI1Slot2");

            string tclBoardPump  = (string)Boards["tclBoardPump"];
            string tclBoardProbe = (string)Boards["tclBoardProbe"];

            // Analog inputs
            //AddAnalogInputChannel("CavityRampVoltage", tclBoardProbe + "/ai0", AITerminalConfiguration.Rse); //tick
            //AddAnalogInputChannel("Pumpmaster", tclBoardProbe + "/ai3", AITerminalConfiguration.Rse);
            //AddAnalogInputChannel("Pumpp1", tclBoardProbe + "/ai4", AITerminalConfiguration.Rse);
            //AddAnalogInputChannel("Pumpp2", tclBoardProbe + "/ai5", AITerminalConfiguration.Rse);

            // Change on 27/06/2019: I move the pump PD inputs to tclBoardPump
            // to increase the sample rate on tclBoardProbe
            AddAnalogInputChannel("PumpCavityRampVoltage", tclBoardPump + "/ai8", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("Pumpmaster", tclBoardPump + "/ai1", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("Pumpp1", tclBoardPump + "/ai2", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("Pumpp2", tclBoardPump + "/ai3", AITerminalConfiguration.Rse);

            // Lasers locked to pump cavity
            AddAnalogOutputChannel("KeopsysDiodeLaser", tclBoardPump + "/ao2", -4, 4); //tick
            AddAnalogOutputChannel("MenloPZT", tclBoardPump + "/ao0", 0, 10);          //tick

            // Length stabilisation for pump cavity
            AddAnalogOutputChannel("PumpCavityLengthVoltage", tclBoardPump + "/ao1", -10, 10); //tick

            // Probe cavity inputs
            AddAnalogInputChannel("ProbeCavityRampVoltage", tclBoardProbe + "/ai0", AITerminalConfiguration.Rse); //tick
            AddAnalogInputChannel("Probemaster", tclBoardProbe + "/ai1", AITerminalConfiguration.Rse);            //tick
            AddAnalogInputChannel("Probep1", tclBoardProbe + "/ai2", AITerminalConfiguration.Rse);                //tick

            // Lasers locked to Probe cavity
            AddAnalogOutputChannel("TopticaSHGPZT", tclBoardProbe + "/ao0", -4, 4);              //tick
            AddAnalogOutputChannel("ProbeCavityLengthVoltage", tclBoardProbe + "/ao1", -10, 10); //tick

            //TCL configuration for pump cavity: 27/06/2019 (Chris)
            TCLConfig tclConfigPump = new TCLConfig("Pump");

            tclConfigPump.Trigger           = tclBoardPump + "/PFI0";
            tclConfigPump.BaseRamp          = "PumpCavityRampVoltage";
            tclConfigPump.TCPChannel        = 1191;
            tclConfigPump.DefaultScanPoints = 500;
            tclConfigPump.PointsToConsiderEitherSideOfPeakInFWHMs = 12;
            tclConfigPump.AnalogSampleRate    = 61250;
            tclConfigPump.MaximumNLMFSteps    = 20;
            tclConfigPump.TriggerOnRisingEdge = false;
            string pump = "PumpCavity";

            tclConfigPump.AddCavity(pump);
            tclConfigPump.Cavities[pump].AddSlaveLaser("MenloPZT", "Pumpp1");
            tclConfigPump.Cavities[pump].AddSlaveLaser("KeopsysDiodeLaser", "Pumpp2");
            tclConfigPump.Cavities[pump].MasterLaser = "Pumpmaster";
            tclConfigPump.Cavities[pump].RampOffset  = "PumpCavityLengthVoltage";
            tclConfigPump.Cavities[pump].AddDefaultGain("Master", 0.3);
            tclConfigPump.Cavities[pump].AddDefaultGain("MenloPZT", -0.2);
            tclConfigPump.Cavities[pump].AddDefaultGain("KeopsysDiodeLaser", 1);
            tclConfigPump.Cavities[pump].AddFSRCalibration("MenloPZT", 3.84);
            tclConfigPump.Cavities[pump].AddFSRCalibration("KeopsysDiodeLaser", 3.84);

            //TCL configuration of probe cavity: 27/06/2019 (Chris)
            TCLConfig tclConfigProbe = new TCLConfig("Probe");

            tclConfigProbe.Trigger           = tclBoardProbe + "/PFI0";
            tclConfigProbe.BaseRamp          = "ProbeCavityRampVoltage";
            tclConfigProbe.TCPChannel        = 1190;
            tclConfigProbe.DefaultScanPoints = 500 * 1 / 4;
            tclConfigProbe.PointsToConsiderEitherSideOfPeakInFWHMs = 12;
            tclConfigProbe.AnalogSampleRate    = 61250 * 1 / 2;
            tclConfigProbe.MaximumNLMFSteps    = 20;
            tclConfigProbe.TriggerOnRisingEdge = false;
            string probe = "ProbeCavity";

            tclConfigProbe.AddCavity(probe);
            tclConfigProbe.Cavities[probe].AddSlaveLaser("TopticaSHGPZT", "Probep1");
            tclConfigProbe.Cavities[probe].MasterLaser = "Probemaster";
            tclConfigProbe.Cavities[probe].RampOffset  = "ProbeCavityLengthVoltage";
            tclConfigProbe.Cavities[probe].AddDefaultGain("Master", 0.4);
            tclConfigProbe.Cavities[probe].AddDefaultGain("TopticaSHGPZT", 0.04);
            tclConfigProbe.Cavities[probe].AddFSRCalibration("TopticaSHGPZT", 3.84);

            Info.Add("TCLConfigPump", tclConfigPump);
            Info.Add("TCLConfigProbe", tclConfigProbe);
            Info.Add("DefaultCavity", tclConfigPump);

            ////TCL configuration for pump cavity
            //TCLConfig tcl1 = new TCLConfig("Pump Cavity");
            //tcl1.AddLaser("MenloPZT", "Pumpp1");
            //tcl1.AddLaser("KeopsysDiodeLaser", "Pumpp2");
            //tcl1.Trigger = tclBoardPump + "/PFI0";
            //tcl1.Cavity = "PumpCavityRampVoltage";
            //tcl1.MasterLaser = "Pumpmaster";
            //tcl1.Ramp = "PumpCavityLengthVoltage";
            //tcl1.TCPChannel = 1190;
            //tcl1.AnalogSampleRate = 61250;
            //tcl1.DefaultScanPoints = 500;
            //tcl1.MaximumNLMFSteps = 20;
            //tcl1.PointsToConsiderEitherSideOfPeakInFWHMs = 2.5;
            //tcl1.TriggerOnRisingEdge = false;
            //tcl1.AddFSRCalibration("MenloPZT", 3.84);
            //tcl1.AddFSRCalibration("KeopsysDiodeLaser", 3.84);
            //tcl1.AddDefaultGain("Master", 0.3);
            //tcl1.AddDefaultGain("MenloPZT", -0.2);
            //tcl1.AddDefaultGain("KeopsysDiodeLaser", 4);
            //Info.Add("PumpCavity", tcl1);
            //Info.Add("DefaultCavity", tcl1);



            //// TCL configuration for Probe cavity
            //TCLConfig tcl2 = new TCLConfig("Probe Cavity");
            //tcl2.AddLaser("TopticaSHGPZT", "Probep1");
            //tcl2.Trigger = tclBoardProbe + "/PFI0";
            //tcl2.Cavity = "ProbeRampVoltage";
            //tcl2.MasterLaser = "Probemaster";
            //tcl2.Ramp = "ProbeCavityLengthVoltage";
            //tcl2.TCPChannel = 1191;
            //tcl2.AnalogSampleRate = 61250 / 2;
            //tcl2.DefaultScanPoints = 250;
            //tcl2.MaximumNLMFSteps = 20;
            //tcl2.PointsToConsiderEitherSideOfPeakInFWHMs = 12;
            //tcl2.AddFSRCalibration("TopticaSHGPZT", 3.84);
            //tcl2.TriggerOnRisingEdge = false;
            //tcl2.AddDefaultGain("Master", 0.4);
            //tcl2.AddDefaultGain("TopticaSHGPZT", 0.04);
            //Info.Add("ProbeCavity", tcl2);
            //Info.Add("DefaultCavity", tcl2);

            // TCL configuration for pump and probe cavities
            //TCLConfig tclConfig = new TCLConfig("Pump and Probe");
            //tclConfig.Trigger = tclBoardProbe + "/PFI0";
            //tclConfig.BaseRamp = "CavityRampVoltage";
            //tclConfig.TCPChannel = 1190;
            //tclConfig.DefaultScanPoints = 500 * 5 / 2;
            //tclConfig.PointsToConsiderEitherSideOfPeakInFWHMs = 12;
            //tclConfig.AnalogSampleRate = 61250 * 5 / 2;
            //tclConfig.MaximumNLMFSteps = 20;
            //tclConfig.TriggerOnRisingEdge = false;
            //string pump = "PumpCavity";
            //string probe = "ProbeCavity";

            //tclConfig.AddCavity(pump);
            //tclConfig.Cavities[pump].AddSlaveLaser("MenloPZT", "Pumpp1");
            //tclConfig.Cavities[pump].AddSlaveLaser("KeopsysDiodeLaser", "Pumpp2");
            //tclConfig.Cavities[pump].MasterLaser = "Pumpmaster";
            //tclConfig.Cavities[pump].RampOffset = "PumpCavityLengthVoltage";
            //tclConfig.Cavities[pump].AddDefaultGain("Master", 0.3);
            //tclConfig.Cavities[pump].AddDefaultGain("MenloPZT", -0.2);
            //tclConfig.Cavities[pump].AddDefaultGain("KeopsysDiodeLaser", 1);
            //tclConfig.Cavities[pump].AddFSRCalibration("MenloPZT", 3.84);
            //tclConfig.Cavities[pump].AddFSRCalibration("KeopsysDiodeLaser", 3.84);

            //tclConfig.AddCavity(probe);
            //tclConfig.Cavities[probe].AddSlaveLaser("TopticaSHGPZT", "Probep1");
            //tclConfig.Cavities[probe].MasterLaser = "Probemaster";
            //tclConfig.Cavities[probe].RampOffset = "ProbeCavityLengthVoltage";
            //tclConfig.Cavities[probe].AddDefaultGain("Master", 0.4);
            //tclConfig.Cavities[probe].AddDefaultGain("TopticaSHGPZT", 0.04);
            //tclConfig.Cavities[probe].AddFSRCalibration("TopticaSHGPZT", 3.84);

            //Info.Add("TCLConfig", tclConfig);
            //Info.Add("DefaultCavity", tclConfig);
        }
Example #2
0
        public MoleculeMOTHardware()
        {
            //Boards
            string digitalPatternBoardName    = "digitalPattern";
            string digitalPatternBoardAddress = "/Dev1";

            Boards.Add(digitalPatternBoardName, digitalPatternBoardAddress);

            string analogPatternBoardName    = "analogPattern";
            string analogPatternBoardAddress = "/PXI1Slot2"; //7

            Boards.Add(analogPatternBoardName, analogPatternBoardAddress);

            string tclBoard1Name    = "tclBoard1";
            string tclBoard1Address = "/PXI1Slot3";

            Boards.Add(tclBoard1Name, tclBoard1Address);

            string tclBoard2Name    = "tclBoard2";
            string tclBoard2Address = "/PXI1Slot8";

            Boards.Add(tclBoard2Name, tclBoard2Address);

            string tclBoard3Name    = "tclBoard3";
            string tclBoard3Address = "/PXI1Slot6";

            Boards.Add(tclBoard3Name, tclBoard3Address);

            string usbBoard1Name    = "usbBoard1";
            string usbBoard1Address = "/Dev2";

            Boards.Add(usbBoard1Name, usbBoard1Address);

            string usbBoard2Name    = "usbBoard2";
            string usbBoard2Address = "/Dev3";

            Boards.Add(usbBoard2Name, usbBoard2Address);


            string digitalPatternBoardName2    = "digitalPattern2";
            string digitalPatternBoardAddress2 = "/PXI1Slot4";

            Boards.Add(digitalPatternBoardName2, digitalPatternBoardAddress2);


            // Channel Declarations

            AddAnalogInputChannel("ramp", tclBoard1Address + "/ai4", AITerminalConfiguration.Rse);

            // Hamish
            AddAnalogInputChannel("v00PD", tclBoard1Address + "/ai0", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("v10PD", tclBoard1Address + "/ai1", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("bXPD", tclBoard1Address + "/ai2", AITerminalConfiguration.Rse);
            AddDigitalInputChannel("bXLockBlockFlag", tclBoard1Address, 0, 0);
            AddDigitalInputChannel("v00LockBlockFlag", tclBoard1Address, 0, 1);
            AddAnalogInputChannel("refPDHamish", tclBoard1Address + "/ai3", AITerminalConfiguration.Rse);

            AddAnalogOutputChannel("v00Lock", tclBoard1Address + "/ao0");
            AddAnalogOutputChannel("v10Lock", tclBoard1Address + "/ao1");
            AddAnalogOutputChannel("bXLock", tclBoard3Address + "/ao2");
            AddAnalogOutputChannel("cavityLockHamish", tclBoard3Address + "/ao3");


            // Carlos
            AddAnalogInputChannel("v21PD", tclBoard1Address + "/ai5", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("v32PD", tclBoard1Address + "/ai6", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("refPDCarlos", tclBoard1Address + "/ai7", AITerminalConfiguration.Rse);

            AddAnalogOutputChannel("v21Lock", tclBoard2Address + "/ao0");
            AddAnalogOutputChannel("v32Lock", usbBoard1Address + "/ao0", 0, 5);
            AddAnalogOutputChannel("cavityLockCarlos", tclBoard2Address + "/ao1");


            // Digital Pattern
            AddDigitalOutputChannel("flashLamp", digitalPatternBoardAddress, 0, 0);
            AddDigitalOutputChannel("qSwitch", digitalPatternBoardAddress, 0, 1);
            AddDigitalOutputChannel("bXSlowingAOM", digitalPatternBoardAddress, 0, 2);
            AddDigitalOutputChannel("v00MOTAOM", digitalPatternBoardAddress, 0, 3);
            AddDigitalOutputChannel("v10SlowingAOM", digitalPatternBoardAddress, 0, 4);
            AddDigitalOutputChannel("microwaveA", digitalPatternBoardAddress, 0, 5);
            AddDigitalOutputChannel("microwaveB", digitalPatternBoardAddress, 0, 6);
            AddDigitalOutputChannel("cameraTrigger", digitalPatternBoardAddress, 0, 7);
            AddDigitalOutputChannel("cameraTrigger2", digitalPatternBoardAddress, 1, 7);
            AddDigitalOutputChannel("aoPatternTrigger", digitalPatternBoardAddress, 1, 0);
            AddDigitalOutputChannel("v00MOTShutter", digitalPatternBoardAddress, 1, 1);
            AddDigitalOutputChannel("bXSlowingShutter", digitalPatternBoardAddress, 1, 2);
            AddDigitalOutputChannel("bXLockBlock", digitalPatternBoardAddress, 1, 3);
            AddDigitalOutputChannel("v00LockBlock", digitalPatternBoardAddress, 2, 1);
            AddDigitalOutputChannel("topCoilDirection", digitalPatternBoardAddress, 1, 4);
            AddDigitalOutputChannel("bottomCoilDirection", digitalPatternBoardAddress, 1, 5);
            AddDigitalOutputChannel("rbCoolingAOM", digitalPatternBoardAddress, 1, 6);
            AddDigitalOutputChannel("v00Sidebands", digitalPatternBoardAddress, 2, 0);
            AddDigitalOutputChannel("heliumShutter", digitalPatternBoardAddress, 2, 2);
            AddDigitalOutputChannel("microwaveC", digitalPatternBoardAddress, 3, 2);


            // Rb Digital Pattern
            AddDigitalOutputChannel("rbPushBeam", digitalPatternBoardAddress, 1, 6);
            AddDigitalOutputChannel("rbOpticalPumpingAOM", digitalPatternBoardAddress, 2, 3);
            AddDigitalOutputChannel("rbAbsImagingBeam", digitalPatternBoardAddress, 2, 5);
            AddDigitalOutputChannel("rbRepump", digitalPatternBoardAddress, 2, 6);
            AddDigitalOutputChannel("rb2DCooling", digitalPatternBoardAddress, 2, 7);
            AddDigitalOutputChannel("rb3DCooling", digitalPatternBoardAddress, 3, 0);
            AddDigitalOutputChannel("rbAbsImgCamTrig", digitalPatternBoardAddress, 3, 1);
            // Rb shutters
            AddDigitalOutputChannel("rb3DMOTShutter", digitalPatternBoardAddress, 2, 4);
            AddDigitalOutputChannel("rb2DMOTShutter", digitalPatternBoardAddress, 3, 5);

            //AddDigitalOutputChannel("rbspeedbumpCoilsBamAbsorptionShutter", digitalPatternBoardAddress, 3, 6);
            AddDigitalOutputChannel("rbPushBamAbsorptionShutter", digitalPatternBoardAddress, 3, 6);

            AddDigitalOutputChannel("rbOPShutter", digitalPatternBoardAddress, 3, 7);
            AddDigitalOutputChannel("dipoleTrapAOM", digitalPatternBoardAddress, 3, 3);



            // tweezer new digital pattern board
            AddDigitalOutputChannel("test00", digitalPatternBoardAddress2, 0, 0);


            // Analog Pattern
            AddAnalogOutputChannel("slowingChirp", analogPatternBoardAddress + "/ao8");
            AddAnalogOutputChannel("v00Intensity", analogPatternBoardAddress + "/ao9");
            AddAnalogOutputChannel("v00EOMAmp", analogPatternBoardAddress + "/ao11");
            AddAnalogOutputChannel("v00Frequency", analogPatternBoardAddress + "/ao12");
            AddAnalogOutputChannel("MOTCoilsCurrent", analogPatternBoardAddress + "/ao13"); //13
            //AddAnalogOutputChannel("triggerDelay", analogPatternBoardAddress + "/ao15");
            AddAnalogOutputChannel("xShimCoilCurrent", analogPatternBoardAddress + "/ao17");
            AddAnalogOutputChannel("yShimCoilCurrent", analogPatternBoardAddress + "/ao16");
            AddAnalogOutputChannel("zShimCoilCurrent", analogPatternBoardAddress + "/ao21");
            AddAnalogOutputChannel("slowingCoilsCurrent", analogPatternBoardAddress + "/ao18");
            AddAnalogOutputChannel("v00Chirp", analogPatternBoardAddress + "/ao22");
            AddAnalogOutputChannel("topCoilShunt", analogPatternBoardAddress + "/ao26");

            // Old Rb Analog Pattern
            AddAnalogOutputChannel("rbCoolingIntensity", analogPatternBoardAddress + "/ao23"); // from old setup
            AddAnalogOutputChannel("rbCoolingFrequency", analogPatternBoardAddress + "/ao24"); // TTL in?


            // New Rb
            AddAnalogOutputChannel("rb3DCoolingFrequency", analogPatternBoardAddress + "/ao1");
            AddAnalogOutputChannel("rbRepumpFrequency", analogPatternBoardAddress + "/ao3");
            AddAnalogOutputChannel("rbAbsImagingFrequency", analogPatternBoardAddress + "/ao4");
            AddAnalogOutputChannel("rb3DCoolingAttenuation", analogPatternBoardAddress + "/ao0");
            AddAnalogOutputChannel("rbRepumpAttenuation", analogPatternBoardAddress + "/ao5");
            AddAnalogOutputChannel("rbOffsetLock", analogPatternBoardAddress + "/ao15");

            // Transfer coil
            AddAnalogOutputChannel("transferCoils", analogPatternBoardAddress + "/ao6");
            AddAnalogOutputChannel("transferCoilsShunt1", analogPatternBoardAddress + "/ao7");
            AddAnalogOutputChannel("transferCoilsShunt2", analogPatternBoardAddress + "/ao27");

            // Tweezer MOT coils

            AddAnalogOutputChannel("speedbumpCoils", analogPatternBoardAddress + "/ao20");
            AddAnalogOutputChannel("DipoleTrapLaserControl", analogPatternBoardAddress + "/ao29");
            AddAnalogOutputChannel("TweezerMOTCoils", analogPatternBoardAddress + "/ao28");

            // Source
            AddDigitalOutputChannel("cryoCooler", usbBoard2Address, 0, 0);
            AddDigitalOutputChannel("sourceHeater", usbBoard2Address, 0, 1);
            AddAnalogInputChannel("sourceTemp", usbBoard2Address + "/ai0", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("sf6Temp", tclBoard2Address + "/ai0", AITerminalConfiguration.Rse);


            // TCL Config
            //TCLConfig tcl1 = new TCLConfig("Hamish");
            //tcl1.AddLaser("v00Lock", "v00PD");
            //tcl1.AddLaser("v10Lock", "v10PD");
            //tcl1.AddLaser("bXLock", "bXPD");
            //tcl1.Trigger = tclBoard1Address + "/PFI0";
            //tcl1.Cavity = "rampHamish";
            //tcl1.MasterLaser = "refPDHamish";
            //tcl1.Ramp = "cavityLockHamish";
            //tcl1.TCPChannel = 1190;
            //tcl1.AddDefaultGain("Master", 1.0);
            //tcl1.AddDefaultGain("v00Lock", 2);
            //tcl1.AddDefaultGain("v10Lock", 0.5);
            //tcl1.AddDefaultGain("bXLock", -2);
            //tcl1.AddFSRCalibration("v00Lock", 3.95); //This is an approximate guess
            //tcl1.AddFSRCalibration("v10Lock", 4.15);
            //tcl1.AddFSRCalibration("bXLock", 3.9);
            //tcl1.DefaultScanPoints = 850;
            //tcl1.PointsToConsiderEitherSideOfPeakInFWHMs = 3;
            //Info.Add("Hamish", tcl1);

            //TCLConfig tcl2 = new TCLConfig("Carlos");
            //tcl2.AddLaser("v21Lock", "v21PD");
            //tcl2.AddLaser("v32Lock", "v32PD");
            //tcl2.Trigger = tclBoard2Address + "/PFI0";
            //tcl2.Cavity = "rampCarlos";
            //tcl2.MasterLaser = "refPDCarlos";
            //tcl2.Ramp = "cavityLockCarlos";
            //tcl2.TCPChannel = 1191;
            //tcl2.AddDefaultGain("Master", 1.0);
            //tcl2.AddDefaultGain("v21Lock", -0.4);
            //tcl2.AddDefaultGain("v32Lock", 0.2);
            //tcl2.AddFSRCalibration("v21Lock", 3.7); //This is an approximate guess
            //tcl2.AddFSRCalibration("v32Lock", 3.7);
            //tcl2.DefaultScanPoints = 900;
            //tcl2.PointsToConsiderEitherSideOfPeakInFWHMs = 3;
            //Info.Add("Carlos", tcl2);

            TCLConfig tclConfig = new TCLConfig("Hamish & Carlos");

            tclConfig.Trigger           = tclBoard1Address + "/PFI0";
            tclConfig.BaseRamp          = "ramp";
            tclConfig.TCPChannel        = 1190;
            tclConfig.DefaultScanPoints = 1000;
            tclConfig.PointsToConsiderEitherSideOfPeakInFWHMs = 4;
            tclConfig.AnalogSampleRate = 62000;
            string hamish = "Hamish";
            string carlos = "Carlos";

            tclConfig.AddCavity(hamish);
            tclConfig.Cavities[hamish].AddSlaveLaser("v00Lock", "v00PD");
            tclConfig.Cavities[hamish].AddLockBlocker("v00Lock", "v00LockBlockFlag");
            tclConfig.Cavities[hamish].AddSlaveLaser("v10Lock", "v10PD");
            tclConfig.Cavities[hamish].AddSlaveLaser("bXLock", "bXPD");
            tclConfig.Cavities[hamish].AddLockBlocker("bXLock", "bXLockBlockFlag");
            tclConfig.Cavities[hamish].MasterLaser = "refPDHamish";
            tclConfig.Cavities[hamish].RampOffset  = "cavityLockHamish";
            tclConfig.Cavities[hamish].AddDefaultGain("Master", 1.0);
            tclConfig.Cavities[hamish].AddDefaultGain("v00Lock", 2);
            tclConfig.Cavities[hamish].AddDefaultGain("v10Lock", 0.5);
            tclConfig.Cavities[hamish].AddDefaultGain("bXLock", -2);
            tclConfig.Cavities[hamish].AddFSRCalibration("v00Lock", 3.95); //This is an approximate guess
            tclConfig.Cavities[hamish].AddFSRCalibration("v10Lock", 4.15);
            tclConfig.Cavities[hamish].AddFSRCalibration("bXLock", 3.9);

            tclConfig.AddCavity(carlos);
            tclConfig.Cavities[carlos].AddSlaveLaser("v21Lock", "v21PD");
            tclConfig.Cavities[carlos].AddSlaveLaser("v32Lock", "v32PD");
            tclConfig.Cavities[carlos].MasterLaser = "refPDCarlos";
            tclConfig.Cavities[carlos].RampOffset  = "cavityLockCarlos";
            tclConfig.Cavities[carlos].AddDefaultGain("Master", 1.0);
            tclConfig.Cavities[carlos].AddDefaultGain("v21Lock", -0.2);
            tclConfig.Cavities[carlos].AddDefaultGain("v32Lock", 1.0);
            tclConfig.Cavities[carlos].AddFSRCalibration("v21Lock", 3.7); //This is an approximate guess
            tclConfig.Cavities[carlos].AddFSRCalibration("v32Lock", 3.7);

            Info.Add("TCLConfig", tclConfig);



            // MOTMaster configuration
            MMConfig mmConfig = new MMConfig(false, false, true, false);

            mmConfig.ExternalFilePattern = "*.tif";
            Info.Add("MotMasterConfiguration", mmConfig);
            Info.Add("AOPatternTrigger", analogPatternBoardAddress + "/PFI4"); //PFI6
            Info.Add("PatternGeneratorBoard", digitalPatternBoardAddress);
            Info.Add("PGType", "dedicated");
            Info.Add("Element", "CaF");
            //Info.Add("PGTrigger", Boards["pg"] + "/PFI2");   // trigger from "cryocooler sync" box, delay controlled from "triggerDelay" analog output


            // ScanMaster configuration
            //Info.Add("defaultTOFRange", new double[] { 4000, 12000 }); // these entries are the two ends of the range for the upper TOF graph
            //Info.Add("defaultTOF2Range", new double[] { 0, 1000 }); // these entries are the two ends of the range for the middle TOF graph
            //Info.Add("defaultGate", new double[] { 6000, 2000 }); // the first entry is the centre of the gate, the second is the half width of the gate (upper TOF graph)


            // Instruments
            Instruments.Add("windfreak", new WindfreakSynth("ASRL8::INSTR"));
            Instruments.Add("gigatronics 1", new Gigatronics7100Synth("GPIB0::19::INSTR"));
            Instruments.Add("gigatronics 2", new Gigatronics7100Synth("GPIB0::6::INSTR"));


            // Calibrations
            //AddCalibration("freqToVoltage", new PolynomialCalibration(new double[] { -9.7727, 0.16604, -0.0000272 }, 70, 130)); //this is a quadratic fit to the manufacturer's data for a POS-150
            //AddCalibration("motAOMAmp", new PolynomialCalibration(new double[] {6.2871, -0.5907, -0.0706, -0.0088, -0.0004}, -12, 4)); // this is a polynomial fit (up to quartic) to measured behaviour
        }
        public BufferClassicHardware()
        {
            // add the boards
            Boards.Add("daq", "/DAQ_PXIe_6363");
            Boards.Add("pg", "/PG_PXIe_6535");
            Boards.Add("tcl", "/TCL_PXI_6229");
            Boards.Add("UEDMHardwareController", "/UEDM_Hardware_Controller_PXI_6229");
            string daqBoard = (string)Boards["daq"];
            string pgBoard  = (string)Boards["pg"];
            string TCLBoard = (string)Boards["tcl"];
            string UEDMHardwareControllerBoard = (string)Boards["UEDMHardwareController"];

            // map the digital channels of the "pg" card
            AddDigitalOutputChannel("q", pgBoard, 0, 0);        //Pin 10
            AddDigitalOutputChannel("aom", pgBoard, 1, 1);      //
            AddDigitalOutputChannel("aom2", pgBoard, 1, 2);     //
            AddDigitalOutputChannel("shutter1", pgBoard, 1, 3); //
            AddDigitalOutputChannel("shutter2", pgBoard, 1, 4); //
            AddDigitalOutputChannel("flash", pgBoard, 0, 2);    //Pin 45
            AddDigitalOutputChannel("chirpTrigger", pgBoard, 0, 3);
            //(0,3) pin 12 is unconnected
            //AddDigitalOutputChannel("heatersS1TriggerDigitalOutputTask", pgBoard, 1, 6);// Pin 21, used to be "shutterTrig1" (triggers camera for on-shots (not wired up))
            //AddDigitalOutputChannel("heatersS2TriggerDigitalOutputTask", pgBoard, 1, 7);// Pin 22, used to be "shutterTrig2" (triggers camera for off-shots (not wired up))
            AddDigitalOutputChannel("probe", pgBoard, 0, 1);         //Pin 44 previously connected to aom (not wired up)
            AddDigitalOutputChannel("valve", pgBoard, 0, 6);         //
            AddDigitalOutputChannel("detector", pgBoard, 1, 0);      //Pin 16 (onShot)from pg to daq
            AddDigitalOutputChannel("detectorprime", pgBoard, 0, 7); //Pin 15 (OffShot)from pg to daq
            //digital output P 0.6 wired up, not used (Pin 48)

            // map the digital channels of the "daq" card
            // this is the digital output from the daq board that the TTlSwitchPlugin wil switch
            AddDigitalOutputChannel("digitalSwitchChannel", daqBoard, 0, 0);//enable for camera
            //AddDigitalOutputChannel("cryoTriggerDigitalOutputTask", daqBoard, 0, 0);// cryo cooler digital logic


            // add things to the info
            // the analog triggers
            Info.Add("analogTrigger0", daqBoard + "/PFI0");
            Info.Add("analogTrigger1", daqBoard + "/PFI1");
            Info.Add("phaseLockControlMethod", "analog");
            Info.Add("PGClockLine", Boards["pg"] + "/PFI4");
            Info.Add("PatternGeneratorBoard", pgBoard);
            Info.Add("PGType", "dedicated");

            // external triggering control
            Info.Add("PGTrigger", pgBoard + "/PFI1"); //Mapped to PFI7 on 6533 connector


            // map the analog input channels for "daq" card
            AddAnalogInputChannel("Temp1", daqBoard + "/ai0", AITerminalConfiguration.Rse);                  //Pin 31
            AddAnalogInputChannel("pressureGauge_beamline", daqBoard + "/ai1", AITerminalConfiguration.Rse); //Pin 31. Used to be "Temp2"
            AddAnalogInputChannel("TempRef", daqBoard + "/ai2", AITerminalConfiguration.Rse);                //Pin 66
            //AddAnalogInputChannel("pressureGauge_source", daqBoard + "/ai3", AITerminalConfiguration.Rse);//Pin 33 pressure reading at the moment
            AddAnalogInputChannel("detector1", daqBoard + "/ai4", AITerminalConfiguration.Rse);              //Pin 68
            AddAnalogInputChannel("detector2", daqBoard + "/ai5", AITerminalConfiguration.Rse);              //Pin
            AddAnalogInputChannel("detector3", daqBoard + "/ai6", AITerminalConfiguration.Rse);              //Pin 34
            AddAnalogInputChannel("cavitylong", daqBoard + "/ai7", AITerminalConfiguration.Rse);             //Pin 28
            //AddAnalogInputChannel("cellTemperatureMonitor", daqBoard + "/ai8", AITerminalConfiguration.Rse);//Pin 60 used to be "cavityshort"

            // map the analog output channels for "daq" card
            AddAnalogOutputChannel("IRrampfb", daqBoard + "/ao0"); //Pin 22
            AddAnalogOutputChannel("v2laser", daqBoard + "/ao1");  //pin 21

            // map the analog input channels for the "UEDMHardwareControllerBoard" card
            AddAnalogInputChannel("cellTemperatureMonitor", UEDMHardwareControllerBoard + "/ai0", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("S1TemperatureMonitor", UEDMHardwareControllerBoard + "/ai1", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("S2TemperatureMonitor", UEDMHardwareControllerBoard + "/ai2", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("SF6TemperatureMonitor", UEDMHardwareControllerBoard + "/ai3", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("pressureGaugeSource", UEDMHardwareControllerBoard + "/ai4", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("pressureGaugeBeamline", UEDMHardwareControllerBoard + "/ai5", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("AI11", UEDMHardwareControllerBoard + "/ai11", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("AI12", UEDMHardwareControllerBoard + "/ai12", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("AI13", UEDMHardwareControllerBoard + "/ai13", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("AI14", UEDMHardwareControllerBoard + "/ai14", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("AI15", UEDMHardwareControllerBoard + "/ai15", AITerminalConfiguration.Rse);

            // map the digital channels of the "UEDMHardwareControllerBoard" card
            AddDigitalOutputChannel("Port00", UEDMHardwareControllerBoard, 0, 0);
            AddDigitalOutputChannel("Port01", UEDMHardwareControllerBoard, 0, 1);
            AddDigitalOutputChannel("Port02", UEDMHardwareControllerBoard, 0, 2);
            AddDigitalOutputChannel("Port03", UEDMHardwareControllerBoard, 0, 3);
            AddDigitalOutputChannel("heatersS2TriggerDigitalOutputTask", UEDMHardwareControllerBoard, 0, 4);
            AddDigitalOutputChannel("heatersS1TriggerDigitalOutputTask", UEDMHardwareControllerBoard, 0, 5);

            // map the analog output channels for the "UEDMHardwareControllerBoard" card
            //AddAnalogOutputChannel("laser", Unnamed + "/ao0");
            //AddAnalogOutputChannel("phaseLockAnalogOutput", Unnamed + "/ao1")

            // map the digital channels of the "UEDMHardwareControllerBoard" card
            //AddDigitalOutputChannel("cryoTriggerDigitalOutputTask", UEDMHardwareControllerBoard, 0, 0);// cryo cooler digital logic

            // map the analog input channels for the "tcl" card
            AddAnalogInputChannel("VISmaster", TCLBoard + "/ai0", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VIScavityRampMonitor", TCLBoard + "/ai1", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VISp1_v1laser", TCLBoard + "/ai2", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VISp2_probelaser", TCLBoard + "/ai3", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VISp3_v0laser", TCLBoard + "/ai4", AITerminalConfiguration.Rse);
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai5", AITerminalConfiguration.Rse); unused
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai6", AITerminalConfiguration.Rse); unused
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai7", AITerminalConfiguration.Rse); unused
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai8", AITerminalConfiguration.Rse); unused
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai9", AITerminalConfiguration.Rse); unused
            AddAnalogInputChannel("IRp1_v2laser", TCLBoard + "/ai10", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("IRmaster", TCLBoard + "/ai11", AITerminalConfiguration.Rse);
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai16", AITerminalConfiguration.Rse); unused
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai17", AITerminalConfiguration.Rse); unused
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai18", AITerminalConfiguration.Rse); unused
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai19", AITerminalConfiguration.Rse); unused
            //AddAnalogInputChannel("xxx", TCLBoard + "/ai20", AITerminalConfiguration.Rse); unused

            // map the analog output channels for the tcl card
            AddAnalogOutputChannel("VISrampfb", TCLBoard + "/ao0");
            AddAnalogOutputChannel("v1laser", TCLBoard + "/ao1");
            AddAnalogOutputChannel("probelaser", TCLBoard + "/ao2", 0, 10);
            AddAnalogOutputChannel("v0laser", TCLBoard + "/ao3", 0, 10);

            // add the GPIB/RS232/USB instruments
            Instruments.Add("tempController", new LakeShore336TemperatureController("ASRL3::INSTR"));
            Instruments.Add("neonFlowController", new FlowControllerMKSPR4000B("ASRL4::INSTR"));


// TCL, we can now put many cavities in a single instance of TCL (thanks to Luke)
// multiple cavities share a single ramp (BaseRamp analog input) + trigger
// Hardware limitation that all read photodiode/ramp signals must share the same hardware card (hardware configured triggered read)
            TCLConfig tclConfig = new TCLConfig("TCL");

            tclConfig.Trigger                = TCLBoard + "/PFI0";
            tclConfig.BaseRamp               = "VIScavityRampMonitor";
            tclConfig.TCPChannel             = 1190;
            tclConfig.DefaultScanPoints      = 1000;
            tclConfig.AnalogSampleRate       = 15000;
            tclConfig.SlaveVoltageLowerLimit = 0.0;
            tclConfig.SlaveVoltageUpperLimit = 10.0;
            tclConfig.PointsToConsiderEitherSideOfPeakInFWHMs = 4;
            tclConfig.MaximumNLMFSteps = 20;

            string VISCavity = "VISCavity";

            tclConfig.AddCavity(VISCavity);
            tclConfig.Cavities[VISCavity].RampOffset  = "VISrampfb";
            tclConfig.Cavities[VISCavity].MasterLaser = "VISmaster";
            tclConfig.Cavities[VISCavity].AddDefaultGain("VISmaster", 0.2);
            tclConfig.Cavities[VISCavity].AddSlaveLaser("v1laser", "VISp1_v1laser");
            tclConfig.Cavities[VISCavity].AddDefaultGain("v1laser", 0.2);
            tclConfig.Cavities[VISCavity].AddFSRCalibration("v1laser", 3.84);
            tclConfig.Cavities[VISCavity].AddSlaveLaser("probelaser", "VISp2_probelaser");
            tclConfig.Cavities[VISCavity].AddDefaultGain("probelaser", 0.2);
            tclConfig.Cavities[VISCavity].AddFSRCalibration("probelaser", 3.84);
            tclConfig.Cavities[VISCavity].AddSlaveLaser("v0laser", "VISp3_v0laser");
            tclConfig.Cavities[VISCavity].AddDefaultGain("v0laser", 0.2);
            tclConfig.Cavities[VISCavity].AddFSRCalibration("v0laser", 3.84);


            string IRCavity = "IRCavity";

            tclConfig.AddCavity(IRCavity);
            tclConfig.Cavities[IRCavity].RampOffset  = "IRrampfb";
            tclConfig.Cavities[IRCavity].MasterLaser = "IRmaster";
            tclConfig.Cavities[IRCavity].AddDefaultGain("IRmaster", 0.2);
            tclConfig.Cavities[IRCavity].AddSlaveLaser("v2laser", "IRp1_v2laser");
            tclConfig.Cavities[IRCavity].AddDefaultGain("v2laser", 0.2);
            tclConfig.Cavities[IRCavity].AddFSRCalibration("v2laser", 3.84);

            Info.Add("TCLConfig", tclConfig);
            Info.Add("DefaultCavity", tclConfig);

            //These need to be activated for the phase lock
            //AddCounterChannel("phaseLockOscillator", daqBoard + "/ctr0"); //This should be the source pin of a counter PFI 8
            //AddCounterChannel("phaseLockReference", daqBoard + "/PFI9"); //This should be the gate pin of the same counter - need to check it's name
        }
        public BufferClassicHardware()
        {
            // add the boards
            //Boards.Add("daq", "/PXI1Slot2");
            //Boards.Add("pg", "/PXI1Slot3");
            Boards.Add("daq", "/DAQ");
            Boards.Add("pg", "/PG");
            Boards.Add("tcl", "/PXI1Slot4");
            Boards.Add("tclvis", "/VisCavity");
            Boards.Add("tclvis2", "/VisCavity2");
            string TCLBoard  = (string)Boards["tcl"];
            string TCLBoard2 = (string)Boards["tclvis"];
            string TCLBoard3 = (string)Boards["tclvis2"];

            // map the digital channels
            string pgBoard = (string)Boards["pg"];

            AddDigitalOutputChannel("q", pgBoard, 0, 0);        //Pin 10
            AddDigitalOutputChannel("aom", pgBoard, 1, 1);      //
            AddDigitalOutputChannel("aom2", pgBoard, 1, 2);     //
            AddDigitalOutputChannel("shutter1", pgBoard, 1, 3); //
            AddDigitalOutputChannel("shutter2", pgBoard, 1, 4); //
            AddDigitalOutputChannel("flash", pgBoard, 0, 2);    //Pin 45
            AddDigitalOutputChannel("chirpTrigger", pgBoard, 0, 3);
            //(0,3) pin 12 is unconnected
            AddDigitalOutputChannel("shutterTrig1", pgBoard, 1, 6);  // Pin 21, triggers camera for on-shots (not wired up)
            AddDigitalOutputChannel("shutterTrig2", pgBoard, 1, 7);  // Pin 22, triggers camera for off-shots (not wired up)
            AddDigitalOutputChannel("probe", pgBoard, 0, 1);         //Pin 44 previously connected to aom (not wired up)

            AddDigitalOutputChannel("valve", pgBoard, 0, 6);         //

            AddDigitalOutputChannel("detector", pgBoard, 1, 0);      //Pin 16 (onShot)from pg to daq
            AddDigitalOutputChannel("detectorprime", pgBoard, 0, 7); //Pin 15 (OffShot)from pg to daq

            //digital output P 0.6 wired up, not used (Pin 48)
            // this is the digital output from the daq board that the TTlSwitchPlugin wil switch
            AddDigitalOutputChannel("digitalSwitchChannel", (string)Boards["daq"], 0, 0);//enable for camera



            // add things to the info
            // the analog triggers
            Info.Add("analogTrigger0", (string)Boards["daq"] + "/PFI0");
            Info.Add("analogTrigger1", (string)Boards["daq"] + "/PFI1");
            Info.Add("phaseLockControlMethod", "analog");
            Info.Add("PGClockLine", Boards["pg"] + "/PFI4");
            Info.Add("PatternGeneratorBoard", pgBoard);
            Info.Add("PGType", "dedicated");

            // external triggering control
            Info.Add("PGTrigger", pgBoard + "/PFI1"); //Mapped to PFI7 on 6533 connector

            // map the analog channels
            //string daqBoard = (string)Boards["daq"];
            //AddAnalogInputChannel("detector1", daqBoard + "/ai0", AITerminalConfiguration.Nrse);//Pin 68
            //AddAnalogInputChannel("detector2", daqBoard + "/ai3", AITerminalConfiguration.Nrse);//Pin
            //AddAnalogInputChannel("detector3", daqBoard + "/ai8", AITerminalConfiguration.Nrse);//Pin 34
            //AddAnalogInputChannel("pressure1", daqBoard + "/ai1", AITerminalConfiguration.Nrse);//Pin 33 pressure reading at the moment
            //AddAnalogInputChannel("cavity", daqBoard + "/ai2", AITerminalConfiguration.Nrse);//Pin 65
            //AddAnalogInputChannel("cavitylong", daqBoard + "/ai4", AITerminalConfiguration.Nrse);//Pin 28
            //AddAnalogInputChannel("cavityshort", daqBoard + "/ai5", AITerminalConfiguration.Nrse);//Pin 60

            // map the analog input channels
            string daqBoard = (string)Boards["daq"];

            AddAnalogInputChannel("detector1", daqBoard + "/ai4", AITerminalConfiguration.Rse);   //Pin 68
            AddAnalogInputChannel("detector2", daqBoard + "/ai5", AITerminalConfiguration.Rse);   //Pin
            AddAnalogInputChannel("detector3", daqBoard + "/ai6", AITerminalConfiguration.Rse);   //Pin 34
            AddAnalogInputChannel("cavitylong", daqBoard + "/ai7", AITerminalConfiguration.Rse);  //Pin 28
            AddAnalogInputChannel("cavityshort", daqBoard + "/ai8", AITerminalConfiguration.Rse); //Pin 60
            AddAnalogInputChannel("Temp1", daqBoard + "/ai0", AITerminalConfiguration.Rse);       //Pin 31
            AddAnalogInputChannel("Temp2", daqBoard + "/ai1", AITerminalConfiguration.Rse);       //Pin 31
            AddAnalogInputChannel("TempRef", daqBoard + "/ai2", AITerminalConfiguration.Rse);     //Pin 66
            AddAnalogInputChannel("pressure1", daqBoard + "/ai3", AITerminalConfiguration.Rse);   //Pin 33 pressure reading at the moment
            AddAnalogInputChannel("master", TCLBoard + "/ai0", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("p1", TCLBoard + "/ai2", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("p2", TCLBoard + "/ai16", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("cavityRampMonitor", TCLBoard + "/ai1", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VISmaster", TCLBoard2 + "/ai0", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VIScavityRampMonitor", TCLBoard2 + "/ai1", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VISp1", TCLBoard2 + "/ai2", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VISp2", TCLBoard2 + "/ai3", AITerminalConfiguration.Rse);
            AddAnalogInputChannel("VISp3", TCLBoard2 + "/ai16", AITerminalConfiguration.Rse);

            // map the analog output channels
            AddAnalogOutputChannel("phaseLockAnalogOutput", daqBoard + "/ao1"); //pin 21
            AddAnalogOutputChannel("v0laser", TCLBoard + "/ao1");

            AddAnalogOutputChannel("v2laser", TCLBoard + "/ao2");
            AddAnalogOutputChannel("laser", daqBoard + "/ao0");//Pin 22
            AddAnalogOutputChannel("rampfb", TCLBoard + "/ao0");
            AddAnalogOutputChannel("v1laser", TCLBoard2 + "/ao1", 0, 10);
            AddAnalogOutputChannel("VISrampfb", TCLBoard2 + "/ao0");
            AddAnalogOutputChannel("probelaser", TCLBoard2 + "/ao2", 0, 10);
            AddAnalogOutputChannel("v3laser", TCLBoard2 + "/ao3", 0, 10);

// TCL, we can now put many cavities in a single instance of TCL (thanks to Luke)
// multiple cavities share a single ramp (BaseRamp analog input) + trigger
// Hardware limitation that all read photodiode/ramp signals must share the same hardware card (hardware configured triggered read)
            TCLConfig tclConfig = new TCLConfig("TCL");

            tclConfig.Trigger                = TCLBoard2 + "/PFI0"; // probe card atm
            tclConfig.BaseRamp               = "VIScavityRampMonitor";
            tclConfig.TCPChannel             = 1190;
            tclConfig.DefaultScanPoints      = 600;
            tclConfig.AnalogSampleRate       = 15000;
            tclConfig.SlaveVoltageLowerLimit = 0.0;
            tclConfig.SlaveVoltageUpperLimit = 10.0;
            tclConfig.PointsToConsiderEitherSideOfPeakInFWHMs = 4;
            tclConfig.MaximumNLMFSteps = 20;

            /*
             * string IRCavity = "IRCavity";
             * tclConfig.AddCavity(IRCavity);
             * tclConfig.Cavities[IRCavity].RampOffset = "rampfb";
             * tclConfig.Cavities[IRCavity].MasterLaser = "master";
             * tclConfig.Cavities[IRCavity].AddDefaultGain("master", 0.4);
             * tclConfig.Cavities[IRCavity].AddSlaveLaser("v0laser", "p1");
             * tclConfig.Cavities[IRCavity].AddDefaultGain("v0laser", 0.04);
             * tclConfig.Cavities[IRCavity].AddFSRCalibration("v0laser", 3.84);
             * tclConfig.Cavities[IRCavity].AddSlaveLaser("v2laser", "p2");
             * tclConfig.Cavities[IRCavity].AddDefaultGain("v2laser", 0.04);
             * tclConfig.Cavities[IRCavity].AddFSRCalibration("v2laser", 3.84);
             */

            string VISCavity = "VISCavity";

            tclConfig.AddCavity(VISCavity);
            tclConfig.Cavities[VISCavity].RampOffset  = "VISrampfb";
            tclConfig.Cavities[VISCavity].MasterLaser = "VISmaster";
            tclConfig.Cavities[VISCavity].AddDefaultGain("VISmaster", 0.4);
            tclConfig.Cavities[VISCavity].AddSlaveLaser("v1laser", "VISp1");
            tclConfig.Cavities[VISCavity].AddDefaultGain("v1laser", 0.04);
            tclConfig.Cavities[VISCavity].AddFSRCalibration("v1laser", 3.84);
            tclConfig.Cavities[VISCavity].AddSlaveLaser("probelaser", "VISp2");
            tclConfig.Cavities[VISCavity].AddDefaultGain("probelaser", 0.04);
            tclConfig.Cavities[VISCavity].AddFSRCalibration("probelaser", 3.84);
            tclConfig.Cavities[VISCavity].AddSlaveLaser("v3laser", "VISp3");
            tclConfig.Cavities[VISCavity].AddDefaultGain("v3laser", 0.04);
            tclConfig.Cavities[VISCavity].AddFSRCalibration("v3laser", 3.84);

            Info.Add("TCLConfig", tclConfig);

            /*
             * // OLD TCL SETUP, one configuration/instance of TCL per cavity
             *         //TransferCavityLock info
             *         TCLConfig tcl1 = new TCLConfig("IR Cavity");
             *         tcl1.AddLaser("v0laser", "p1");
             *         tcl1.AddLaser("v2laser", "p2");
             *         tcl1.Trigger = TCLBoard + "/PFI0";
             *         tcl1.Cavity = "cavityRampMonitor";
             *         tcl1.MasterLaser = "master";
             *         tcl1.Ramp = "rampfb";
             *         tcl1.TCPChannel = 1190;
             *         tcl1.SlaveVoltageLowerLimit = 0.0;
             *         tcl1.SlaveVoltageUpperLimit = 10.0;
             *   //      tcl1.AnalogSampleRate = 15000;
             *   //      tcl1.DefaultScanPoints = 600;
             *         Info.Add("IR", tcl1);
             *
             *         //TransferCavityLock info
             *         TCLConfig tcl2 = new TCLConfig("VIS Cavity");
             *         tcl2.AddLaser("v1laser", "VISp1");
             *         tcl2.AddLaser("probelaser", "VISp2");
             *         tcl2.AddLaser("v3laser", "VISp3");
             *         tcl2.Trigger = TCLBoard2 + "/PFI0";
             *         tcl2.Cavity = "VIScavityRampMonitor";
             *         tcl2.MasterLaser = "VISmaster";
             *         tcl2.Ramp = "VISrampfb";
             *         tcl2.TCPChannel = 1191;
             *         tcl2.SlaveVoltageLowerLimit = -10.0;
             *         tcl2.SlaveVoltageUpperLimit = 10.0;
             *         //tcl2.AnalogSampleRate = 15000;
             *  //       tcl2.DefaultScanPoints = 300;
             *         Info.Add("VIS", tcl2);
             *
             */

            //These need to be activated for the phase lock
            AddCounterChannel("phaseLockOscillator", daqBoard + "/ctr0"); //This should be the source pin of a counter PFI 8
            AddCounterChannel("phaseLockReference", daqBoard + "/PFI9");  //This should be the gate pin of the same counter - need to check it's name
        }