Exemplo n.º 1
0
        private void frmCountTest_Load(object sender, EventArgs e)
        {
            InitUL();
            NumCtrs = CtrProps.FindCountersOfType(DaqBoard, CounterType, out CounterNum);
            if (NumCtrs == 0)
            {
                CounterType = Counters.clsCounters.CTRSCAN;
                NumCtrs     = CtrProps.FindCountersOfType(DaqBoard, CounterType, out CounterNum);
            }
            if (NumCtrs == 0)
            {
                lblNoteFreqIn.Text = "Board " + DaqBoard.BoardNum.ToString() +
                                     " has no event counters.";
            }
            else
            {
                //  Clear the counter to zero with MccDaq.MccBoard.CClear()
                //   Parameters:
                //     CounterNum :the counter number to be cleared to zero

                MccDaq.ErrorInfo ULStat = DaqBoard.CClear(CounterNum);

                lblCountLoaded.Text = "Counter starting value cleared to zero:";
                lblShowLoadVal.Text = "0";
                lblNoteFreqIn.Text  =
                    "NOTE: There must be a TTL frequency at the counter "
                    + CounterNum.ToString() + " input on board " +
                    DaqBoard.BoardNum.ToString() + ".";
                this.lblCountRead.Text = "Value read from counter "
                                         + CounterNum.ToString() + ":";
                tmrReadCount.Enabled = true;
            }
        }