private void tmrReadCounter_Tick(object eventSender, System.EventArgs eventArgs) { tmrReadCounter.Stop(); // Read the counter value // Parameters: // CounterNum :the counter to be read // Count :the count value in the counter int Count = 0; MccDaq.ErrorInfo ULStat = DaqBoard.CIn32(CounterNum, out Count); lblShowReadVal.Text = Count.ToString("0"); // Get the status information about the counter // Parameters: // CounterNum : the counter whose status we need // StatusBits : status information include direction of counter, as well as error and other information MccDaq.StatusBits StatusBits = 0; ULStat = DaqBoard.CStatus(CounterNum, out StatusBits); if ((StatusBits & MccDaq.StatusBits.Updown) != 0) { lblShowDirection.Text = "UP"; } else { lblShowDirection.Text = "DOWN"; } tmrReadCounter.Start(); }
private void tmrReadCount_Tick(object eventSender, System.EventArgs eventArgs) /* Handles tmrReadCount.Tick */ { tmrReadCount.Stop(); // Parameters: // CounterNum :the counter to be read // Count :the value read from the counter uint Count = 0; MccDaq.ErrorInfo ULStat = DaqBoard.CIn32(CounterNum, out Count); lblShowCountRead.Text = Count.ToString("0"); tmrReadCount.Start(); }