Esempio n. 1
0
        public void WaveformAi(System.ComponentModel.IContainer components)
        {
            waveformAiCtrl1 = new Automation.BDaq.WaveformAiCtrl(components);
            waveformAiCtrl1.SelectedDevice = new DeviceInformation(conf.deviceDescription);
            // waveformAiCtrl1._StateStream = ((Automation.BDaq.DeviceStateStreamer)(resources.GetObject("waveformAiCtrl1._StateStream")));
            // Step 4: Set necessary parameter
            Conversion conversion = waveformAiCtrl1.Conversion;

            conversion.ChannelStart = conf.startChannel;
            conversion.ChannelCount = conf.channelCount;
            conversion.ClockRate    = conf.convertClkRate;
            Record record = waveformAiCtrl1.Record;

            record.SectionCount                 = conf.sectionCount;//The 0 means setting 'streaming' mode.
            record.SectionLength                = conf.sectionLength;
            this.waveformAiCtrl1.Overrun       += new System.EventHandler <Automation.BDaq.BfdAiEventArgs>(this.waveformAiCtrl1_Overrun);
            this.waveformAiCtrl1.CacheOverflow += new System.EventHandler <Automation.BDaq.BfdAiEventArgs>(this.waveformAiCtrl1_CacheOverflow);
            this.waveformAiCtrl1.DataReady     += new System.EventHandler <Automation.BDaq.BfdAiEventArgs>(this.waveformAiCtrl1_DataReady);
        }
Esempio n. 2
0
        public void WaveformAi()
        {
            waveformAiCtrl1 = new Automation.BDaq.WaveformAiCtrl();
            waveformAiCtrl1.SelectedDevice = new DeviceInformation(c.deviceDescription);
            // waveformAiCtrl1.LoadProfile(c.profilePath);
            // System.Console.WriteLine(c.profilePath);
            // waveformAiCtrl1._StateStream = ((Automation.BDaq.DeviceStateStreamer)(resources.GetObject("waveformAiCtrl1._StateStream")));

            Conversion conversion = waveformAiCtrl1.Conversion;

            conversion.ChannelStart = c.startChannel;
            conversion.ChannelCount = c.channelCount;
            conversion.ClockRate    = c.convertClkRate;
            Record record = waveformAiCtrl1.Record;

            record.SectionCount  = c.sectionCount;//The 0 means setting 'streaming' mode.
            record.SectionLength = c.sectionLength;

            this.waveformAiCtrl1.Overrun       += new System.EventHandler <Automation.BDaq.BfdAiEventArgs>(this.waveformAiCtrl1_Overrun);
            this.waveformAiCtrl1.CacheOverflow += new System.EventHandler <Automation.BDaq.BfdAiEventArgs>(this.waveformAiCtrl1_CacheOverflow);
            this.waveformAiCtrl1.DataReady     += new System.EventHandler <Automation.BDaq.BfdAiEventArgs>(this.waveformAiCtrl1_DataReady);
        }