Пример #1
0
        public TriggerSHoldCommands(IProtocolCommand parent) : base(parent)
        {
            DataSource = new TriggerSourceChannelCommand(this);

            ClockSource = new TriggerSourceChannelCommand(this);

            Slope = new TriggerSlopeCommand(this)
            {
                Options = new StringOptions
                {
                    new StringOption("POSitive", "POS"),
                    new StringOption("NEGative", "NEG"),
                }
            };

            Pattern = new TriggerPatternCommands(this)
            {
                Options = new StringOptions()
                {
                    new StringOption("H", "H"),
                    new StringOption("L", "L"),
                }
            };

            Type = new ProtocolCommand(this)
            {
                Name    = "TYP",
                Term    = "TYP",
                Options = new StringOptions
                {
                    new StringOption("SETup", "SET"),
                    new StringOption("HOLd", "HOL"),
                    new StringOption("SETHOLd", "SETHOL"),
                }
            };

            SetupTime = new TriggerTimeCommand(this)
            {
                Name    = "SHOLd",
                Term    = "SHOL",
                Options = new RealOptions(8 * SI.n, 1),
            };

            HoldTime = new TriggerTimeCommand(this)
            {
                Name    = "HTIMe",
                Term    = "HTIM",
                Options = new RealOptions(8 * SI.n, 1),
            };
        }
Пример #2
0
        public TriggerProtocol(IProtocolCommand parent) : base(parent)
        {
            Mode = new ProtocolCommand(this)
            {
                Name    = "Mode",
                Term    = "MODE",
                Options = new ModeStringOptions(),
            };

            Coupling = new ProtocolCommand(this)
            {
                Name    = "Coupling",
                Term    = "COUP",
                Options = new StringOptions()
                {
                    new StringOption("AC", "AC"),
                    new StringOption("DC", "DC"),
                    new StringOption("LFReject", "LFR"),
                    new StringOption("HFReject", "HFR")
                }
            };

            /// <summary>
            /// Query the current status
            /// </summary>
            Status = new ProtocolCommand(this)
            {
                Name    = "Status",
                Term    = "STAT",
                Options = new StringOptions
                {
                    new StringOption("TD", "TD"),
                    new StringOption("WAIT", "WAIT"),
                    new StringOption("RUN", "RUN"),
                    new StringOption("AUTO", "AUTO"),
                    new StringOption("STOP", "STOP")
                }
            };

            /// <summary>
            /// Set or query the trigger mode.
            /// Auto  : No matter whether the trigger condition is met, there is always waveform display.
            /// Normal: Display waveform when the trigger condition is met. Otherwise, the scope
            ///         holds the original waveform and waits for the next trigger.
            /// Single: The scope waits for a trigger and displays the waveform when the trigger
            ///         condition is met and then stops.
            /// </summary>
            Sweep = new ProtocolCommand(this)
            {
                Name    = "Sweep",
                Term    = "SWEep",
                Options = new StringOptions
                {
                    new StringOption("Auto", "AUTO"),
                    new StringOption("Normal", "NORM"),
                    new StringOption("Single", "SING"),
                }
            };

            /// <summary>
            /// Amount of time that is waited before the scope re-arms the trigger circuitry.
            /// This setting is not available when the trigger type is video, timeout, setup/hold,
            /// nth edge, RS232, I2c or SPI.
            /// </summary>
            Holdoff = new ProtocolCommand(this)
            {
                Name    = "Holdoff",
                Term    = "HOLDoff",
                Options = new RealOptions
                {
                    new RealOption(16 * SI.n, 10)
                }
            };

            /// <summary>
            /// Enable or disable noise rejection.
            /// </summary>
            NoiseReject = new ProtocolCommand(this)
            {
                Name    = "NoiseReject",
                Term    = "NREJect",
                Options = StringOptions.Boolean
            };

            /// <summary>
            /// Query the position in the internal memory that corresponds to the waveform
            /// trigger position.
            /// -2 : not triggered, no position
            /// -1 : triggered outside the internal memory
            /// >0 : the position inthe internal memory
            /// </summary>
            Position = new ProtocolCommand(this)
            {
                Name = "Position",
                Term = "POSition",
            };

            Edge = new TriggerEdgeCommands(this);

            Pulse = new TriggerPulseCommands(this);

            Slope = new TriggerSlopeCommands(this);

            Video = new TriggerVideoCommands(this);

            Pattern = new TriggerPatternCommands(this);

            Duration = new TriggerDurationCommands(this);

            Timeout = new TriggerTimeoutCommands(this);

            Runt = new TriggerRuntCommands(this);

            Windows = new TriggerWindowsCommands(this);

            Delay = new TriggerDelayCommands(this);

            SHold = new TriggerSHoldCommands(this);

            NEdge = new TriggerNEdgeCommands(this);
        }