Example #1
0
        private void cmdReadDIn_Click(object eventSender, System.EventArgs eventArgs)         /* Handles cmdReadDIn.Click */
        {
            // read the digital input and display
            //   Parameters:
            //      PortNum      :the input port
            //      Count        :number of times to read digital input
            //      Rate         :sample rate in samples/second
            //      DataBuffer() :the array for the digital input values read from the port
            //      Options      :data collection options
            Count = NumPoints;
            int Rate = 100;

            MccDaq.ScanOptions Options = MccDaq.ScanOptions.WordXfer
                                         | MccDaq.ScanOptions.Background;
            MccDaq.ErrorInfo ULStat = DaqBoard.DInScan(PortNum, Count, ref Rate, MemHandle, Options);


            tmrCheckStatus.Enabled = true;
        }