public SettingsDigitalOut(NidaqSingleton.Device dev, string clockPath, int bufferLength, int prebufferLength)
        {
            InitializeComponent();
            numericUpDownBufferLength.Value    = bufferLength;
            numericUpDownPreBufferLength.Value = prebufferLength;
            comboBoxClockSource.Text           = clockPath;

            var terms  = new StringBuilder(10000);
            var result = NidaQmxHelper.DAQmxGetDevTerminals(dev.Name, terms, terms.Capacity - 1);

            if (result >= 0)
            {
                comboBoxClockSource.Items.AddRange(terms.ToString().Split(','));
            }
        }
Beispiel #2
0
        public SettingsDigitalIn(NidaqSingleton.Device dev, NidaqSessionDigitalIn.ClockSource clockSrc, string clockPath, int clockRate)
        {
            InitializeComponent();
            comboBoxClock.DataSource   = Enum.GetValues(typeof(NidaqSessionDigitalIn.ClockSource));
            comboBoxClock.SelectedItem = clockSrc;
            comboBoxClockSource.Text   = clockPath;
            textBoxClockRate.Text      = clockRate.ToString();

            var terms  = new StringBuilder(10000);
            var result = NidaQmxHelper.DAQmxGetDevTerminals(dev.Name, terms, terms.Capacity - 1);

            if (result >= 0)
            {
                comboBoxClockSource.Items.AddRange(terms.ToString().Split(','));
            }
        }