Package ptolemy.actor.lib.gui

Examples of ptolemy.actor.lib.gui.TimedPlotter


        _rcvr1 = new ListenSink(toplevel, "UpperRcvr");
        _rcvr2 = new ListenSink(toplevel, "LowerRcvr");

        _upperTime = new Const(toplevel, "upperTime");
        _upperPlotter = new TimedPlotter(toplevel, "upperPlotter");

        _lowerTime = new Const(toplevel, "lowerTime");
        _lowerPlotter = new TimedPlotter(toplevel, "lowerPlotter");

        //_fBack1.delay.setToken(new DoubleToken(4.5));
        //_fBack2.delay.setToken(new DoubleToken(4.5));
        _fBack1.delay.setToken(new DoubleToken(1.0));
        _fBack2.delay.setToken(new DoubleToken(1.0));
View Full Code Here


        // a const source
        Const source = new Const(this, "Const");
        source.value.setToken(new DoubleToken(1.0));

        // the plot
        TimedPlotter responsePlot = new TimedPlotter(this, "plot");
        Plot newPlot = new Plot();
        responsePlot.plot = newPlot;
        newPlot.setGrid(true);
        newPlot.setTitle("Thermostat");
        newPlot.addLegend(0, "Temperature");
View Full Code Here

        DEDirector director = new DEDirector(toplevel, "director");
        director.stopTime.setExpression("10.0");

        // Create two actors.
        Clock clock = new Clock(toplevel, "clock");
        TimedPlotter plotter = new TimedPlotter(toplevel, "plotter");

        // Connect them.
        toplevel.connect(clock.output, plotter.input);
        return toplevel;
    }
View Full Code Here

        Scale scale2 = new Scale(ctsub, "Scale2");
        Scale scale3 = new Scale(ctsub, "Scale3");
        Scale scale4 = new Scale(ctsub, "Scale4");
        scale4.factor.setExpression("feedbackGain");

        TimedPlotter ctPlot = new TimedPlotter(ctsub, "CTPlot");
        ctPlot.plot = new Plot();
        ctPlot.plot.setGrid(true);
        ctPlot.plot.setXRange(0.0, stopT);
        ctPlot.plot.setYRange(-1.0, 1.0);
        ctPlot.plot.setSize(500, 180);
        ctPlot.plot.addLegend(0, "Position");
        ctPlot.plot.addLegend(1, "Input");
        ctPlot.plot.addLegend(2, "Control");

        CTPeriodicSampler ctSampler = new CTPeriodicSampler(ctsub,
                "PeriodicSampler");
        ctSampler.samplePeriod.setExpression("samplePeriod");

        // CT Connections
        ctsub.connect(time.output, scale3.input);
        ctsub.connect(scale3.output, trigFunction.input);

        Relation cr0 = ctsub.connect(trigFunction.output, scale0.input, "CR0");
        ctsub.connect(scale0.output, add1.plus, "CR1");
        ctsub.connect(add1.output, intgl1.input, "CR2");

        Relation cr3 = ctsub.connect(intgl1.output, intgl2.input, "CR3");
        Relation cr4 = ctsub.connect(intgl2.output, ctPlot.input, "CR4");
        scale1.input.link(cr3);
        scale2.input.link(cr4);
        ctSampler.input.link(cr4);

        TypedIORelation cr5 = new TypedIORelation(ctsub, "CR5");
        ctSampler.output.link(cr5);
        subout.link(cr5);
        ctsub.connect(scale1.output, add1.plus, "CR6");
        ctsub.connect(scale2.output, add1.plus, "CR7");
        ctsub.connect(scale4.output, add1.plus, "CR8");

        TypedIORelation cr9 = new TypedIORelation(ctsub, "CR9");
        hold.input.link(cr9);
        subin.link(cr9);

        Relation cr10 = ctsub.connect(hold.output, scale4.input, "CR10");
        ctPlot.input.link(cr0);
        ctPlot.input.link(cr10);

        // DE System
        ptolemy.domains.de.lib.TimedDelay delay = new ptolemy.domains.de.lib.TimedDelay(
                this, "delay");
        delay.delay.setToken(new DoubleToken(0.02));

        FIR fir = new FIR(this, "fir");
        fir.taps.setExpression("{0.7, 0.3}");

        Quantizer quan = new Quantizer(this, "Quantizer");
        Average accumulator = new Average(this, "accumulator");
        Sampler sampler = new Sampler(this, "sampler");
        Clock clk = new Clock(this, "ADClock");
        clk.offsets.setExpression("{0.0}");
        clk.period.setToken(new DoubleToken(1.0));
        clk.values.setExpression("{true}");

        TimedPlotter dePlot = new TimedPlotter(this, "DEPlot");
        Plot newPlot = new Plot();
        dePlot.plot = newPlot;
        newPlot.setGrid(true);
        newPlot.setXRange(0.0, stopT);
        newPlot.setYRange(-1.0, 1.0);
View Full Code Here

        DEDirector director = new DEDirector(this, "director");
        setDirector(director);

        // Create two actors.
        Clock clock = new Clock(this, "clock");
        TimedPlotter plotter = new TimedPlotter(this, "plotter");

        // Set the user controlled parameters.
        director.stopTime.setExpression("stopTime");
        clock.period.setExpression("clockPeriod");
View Full Code Here

        setDirector(director);
        director.stopTime.setExpression("10.0");

        // Create two actors.
        Clock clock = new Clock(this, "clock");
        TimedPlotter plotter = new TimedPlotter(this, "plotter");

        // Connect them.
        connect(clock.output, plotter.input);
    }
View Full Code Here

        xzPlot.plot.setXRange(-1.0, 100.0);
        xzPlot.plot.setYRange(1.0, 12.0);
        xzPlot.plot.setSize(200, 200);
        xzPlot.plot.addLegend(0, "x, z");

        TimedPlotter vxPlot = new TimedPlotter(this, "Horizontal Speed");
        vxPlot.plot = new Plot();
        vxPlot.plot.setTitle("Horizontal Speed");
        vxPlot.plot.setButtons(false);
        vxPlot.plot.setGrid(true);
        vxPlot.plot.setXRange(0.0, 70.0);
        vxPlot.plot.setYRange(0.0, 6.0);
        vxPlot.plot.setSize(200, 200);
        vxPlot.plot.addLegend(0, "Vx");

        TimedPlotter pzPlot = new TimedPlotter(this, "Vertical Position");
        pzPlot.plot = new Plot();
        pzPlot.plot.setTitle("Vertical Position");
        pzPlot.plot.setButtons(false);
        pzPlot.plot.setGrid(true);
        pzPlot.plot.setXRange(0.0, 70.0);
        pzPlot.plot.setYRange(0.0, 12.0);
        pzPlot.plot.setSize(200, 200);
        pzPlot.plot.addLegend(0, "Pz");

        TimedPlotter thPlot = new TimedPlotter(this, "Pitch Angle");
        thPlot.plot = new Plot();
        thPlot.plot.setTitle("Pitch Angle");
        thPlot.plot.setButtons(false);
        thPlot.plot.setGrid(true);
        thPlot.plot.setXRange(0.0, 70.0);
View Full Code Here

TOP

Related Classes of ptolemy.actor.lib.gui.TimedPlotter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.