public void Configure(AnalogPatternBuilder aPattern, int clockRate,  bool loop)
        {
            analogOutputTask = new Task();
            foreach (string keys in aPattern.AnalogPatterns.Keys)
            {
                AddToAnalogOutputTask(analogOutputTask, keys);
            }
            string clockSource = "";

            SampleQuantityMode sqm;
            if(loop)
            {
                sqm = SampleQuantityMode.ContinuousSamples;
                analogOutputTask.Stream.WriteRegenerationMode = WriteRegenerationMode.AllowRegeneration;

            }
            else
            {
                sqm = SampleQuantityMode.FiniteSamples;
                analogOutputTask.Stream.WriteRegenerationMode = WriteRegenerationMode.DoNotAllowRegeneration;
            }

            analogOutputTask.Timing.ConfigureSampleClock(clockSource, clockRate,
                    SampleClockActiveEdge.Rising, sqm,
                    aPattern.PatternLength);
            analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger(
                    (string)Environs.Hardware.GetInfo("AOPatternTrigger"), DigitalEdgeStartTriggerEdge.Rising);

            analogOutputTask.Control(TaskAction.Verify);
        }
Пример #2
0
    public override AnalogPatternBuilder GetAnalogPattern()
    {
        AnalogPatternBuilder p = new AnalogPatternBuilder((int)Parameters["PatternLength"]);

        MOTMasterScriptSnippet lm = new SHLoadMOT(p, Parameters);
        p.AddAnalogPulse("coil0current", (int)Parameters["MOTLoadDuration"], (int)Parameters["ReleaseTime"], 0, (double)Parameters["MOTCoilsCurrent"]);
        p.AddAnalogValue("coil0current", 115000, 0);

        p.SwitchAllOffAtEndOfPattern();
        return p;
    }
        public void Configure(AnalogPatternBuilder aPattern, int clockRate)
        {
            analogOutputTask = new Task();
            foreach (string keys in aPattern.AnalogPatterns.Keys)
            {
                AddToAnalogOutputTask(analogOutputTask, keys);
            }
            string clockSource = "";

            analogOutputTask.Timing.ConfigureSampleClock(clockSource, clockRate,
                    SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples,
                    aPattern.PatternLength);
            analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger(
                    (string)Environs.Hardware.GetInfo("AOPatternTrigger"), DigitalEdgeStartTriggerEdge.Rising);
            analogOutputTask.Control(TaskAction.Verify);
        }
        public void Configure(AnalogPatternBuilder aPattern, int clockRate)
        {
            analogOutputTask = new Task();
            foreach (string keys in aPattern.AnalogPatterns.Keys)
            {
                AddToAnalogOutputTask(analogOutputTask, keys);
            }
            string clockSource = "";

            analogOutputTask.Timing.ConfigureSampleClock(clockSource, clockRate,
                                                         SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples,
                                                         aPattern.PatternLength);
            analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger(
                (string)Environs.Hardware.GetInfo("AOPatternTrigger"), DigitalEdgeStartTriggerEdge.Rising);
            analogOutputTask.Control(TaskAction.Verify);
        }
Пример #5
0
    public override AnalogPatternBuilder GetAnalogPattern()
    {
        AnalogPatternBuilder p = new AnalogPatternBuilder((int)Parameters["PatternLength"]);

            MOTMasterScriptSnippet lm = new SHLoadMOT(p, Parameters);

            //p.AddChannel("aom2frequency");
            //p.AddChannel("aom3frequency");

            p.AddAnalogValue("coil0current", 0, 0);
            //p.AddAnalogValue("aom2frequency", 0, 190.875);
            //p.AddAnalogValue("aom3frequency", 0, 210.875);
            p.AddAnalogValue("coil0current", 120000, 0);

            p.SwitchAllOffAtEndOfPattern();
            return p;
    }
Пример #6
0
    public override AnalogPatternBuilder GetAnalogPattern()
    {
        AnalogPatternBuilder p = new AnalogPatternBuilder((int)Parameters["PatternLength"]);
        p.AddChannel("slowingChirp");
        p.AddChannel("v0IntensityRamp");

        p.AddAnalogValue("slowingChirp", 0, (double)Parameters["SlowingChirpStartValue"]);
        p.AddLinearRamp("slowingChirp", (int)Parameters["SlowingChirpStartTime"], (int)Parameters["SlowingChirpDuration"], (double)Parameters["SlowingChirpEndValue"]);
        p.AddLinearRamp("slowingChirp", (int)Parameters["SlowingChirpStartTime"] + (int)Parameters["SlowingChirpDuration"], (int)Parameters["SlowingChirpDuration"], (double)Parameters["SlowingChirpStartValue"]);

           p.AddAnalogValue("v0IntensityRamp", 0, (double)Parameters["v0IntensityRampStartValue"]);
           p.AddLinearRamp("v0IntensityRamp", (int)Parameters["v0IntensityRampStartTime"], (int)Parameters["v0IntensityRampDuration"], (double)Parameters["v0IntensityRampEndValue"]);
           p.AddAnalogValue("v0IntensityRamp", (int)Parameters["motAOMReStart"], (double)Parameters["v0IntensityRampStartValue"]);

        p.SwitchAllOffAtEndOfPattern();
        return p;
    }
Пример #7
0
    public override AnalogPatternBuilder GetAnalogPattern()
    {
        AnalogPatternBuilder p = new AnalogPatternBuilder((int)Parameters["PatternLength"]);

        MOTMasterScriptSnippet lm = new SHLoadMOT(p, Parameters);

        p.AddChannel("aom2frequency");
        p.AddChannel("aom3frequency");

        p.AddAnalogValue("coil0current", 0, 0);
        p.AddAnalogValue("aom2frequency", 0, (double)Parameters["aom2Detuning"]);
        p.AddAnalogValue("aom3frequency", 0, (double)Parameters["aom3Detuning"]);
        //p.AddAnalogValue("coil0current", (int)Parameters["MagRampTime"], (double)Parameters["MagTrapCurrent"]);
        p.AddAnalogValue("coil0current", 130000, 0);

        p.SwitchAllOffAtEndOfPattern();
        return p;
    }
Пример #8
0
    public override AnalogPatternBuilder GetAnalogPattern()
    {
        AnalogPatternBuilder p = new AnalogPatternBuilder((int)Parameters["PatternLength"]);

        MOTMasterScriptSnippet lm = new SHLoadMOT(p, Parameters);

        p.AddChannel("aom2frequency");
        p.AddChannel("aom3frequency");

        p.AddAnalogValue("coil0current", 0, 0);
        p.AddAnalogValue("aom2frequency", (int)Parameters["MOTStartTime"], 180.875);
        p.AddAnalogValue("aom3frequency", (int)Parameters["MOTStartTime"], 220.875);
        p.AddAnalogValue("aom2frequency", (int)Parameters["Frame0Trigger"], 200.875);
        p.AddAnalogValue("aom3frequency", (int)Parameters["Frame0Trigger"], 200.875);
        p.AddAnalogValue("coil0current", 100100, 0);

        p.SwitchAllOffAtEndOfPattern();
        return p;
    }
 public void Configure(AnalogPatternBuilder aPattern, int clockRate)
 {
     Configure(aPattern, clockRate, false);
 }
Пример #10
0
 public void Configure(AnalogPatternBuilder aPattern, int clockRate)
 {
     Configure(aPattern, clockRate, false);
 }
Пример #11
0
        public void AddAnalogSnippet(AnalogPatternBuilder p, Dictionary<String, Object> parameters)
        {
            p.AddChannel("coil0current");

            p.AddAnalogValue("coil0current", (int)parameters["MOTStartTime"], (double)parameters["MOTCoilsCurrent"]);
        }
Пример #12
0
 public SHLoadMOT(AnalogPatternBuilder p, Dictionary<String, Object> parameters)
 {
     AddAnalogSnippet(p, parameters);
 }