示例#1
0
        private void setCheckBox(int tolMonitorIndex, GateType gateType, DGateType dGateType)
        {
            bool isCheckBoxChecked;

            isCheckBoxChecked = ((CheckBox)(Controls.Find("checkBox" + tolMonitorIndex + "ON", true)[0])).Checked;

            if (isCheckBoxChecked == true)
            {
                setControlsEnabled(tolMonitorIndex, true);
                ((RadioButton)(Controls.Find("dGate" + tolMonitorIndex, true)[0])).Checked = true;//Active double gate tolerance monitor defaultly
            }
            else
            {
                setControlsEnabled(tolMonitorIndex, false);
                SetGateDAQ.TolMonitorActive(SelectAscan.sessionIndex, SelectAscan.port, gateType, TMActive.OFF);
                SetDGateDAQ.TolMonitorActive(SelectAscan.sessionIndex, SelectAscan.port, dGateType, TMActive.OFF);
            }
        }
示例#2
0
        private void getGateTolMonitor(GateType gateType, DGateType dGatetType, int tolMonitorIndex)
        {
            int    error_code;
            double min         = 0;
            double max         = 0;
            uint   suppressCnt = 0;

            //Close double gate tolerance active
            error_code = SetDGateDAQ.TolMonitorActive(SelectAscan.sessionIndex, SelectAscan.port, dGatetType, TMActive.OFF);
            if (error_code != 0)
            {
                return;
            }

            //Open gate tolerance active
            error_code = SetGateDAQ.TolMonitorActive(SelectAscan.sessionIndex, SelectAscan.port, gateType, TMActive.ON);
            if (error_code != 0)
            {
                return;
            }

            error_code = GetGateDAQ.TolMonitorMax(SelectAscan.sessionIndex, SelectAscan.port, gateType, ref max);
            if (error_code != 0)
            {
                return;
            }
            ((NumericUpDown)(Controls.Find("numUpDownMax" + tolMonitorIndex, true)[0])).Text = max.ToString();

            error_code = GetGateDAQ.TolMonitorMin(SelectAscan.sessionIndex, SelectAscan.port, gateType, ref min);
            if (error_code != 0)
            {
                return;
            }
            ((NumericUpDown)(Controls.Find("numUpDownMin" + tolMonitorIndex, true)[0])).Text = min.ToString();

            error_code = GetGateDAQ.TolMonitorSc(SelectAscan.sessionIndex, SelectAscan.port, gateType, ref suppressCnt);
            if (error_code != 0)
            {
                return;
            }
            ((NumericUpDown)(Controls.Find("numUpDownSc" + tolMonitorIndex, true)[0])).Text = suppressCnt.ToString();
        }