예제 #1
0
        public static int IFActive(uint ascanNum, GateType type, IFActive active)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].IF;
            uint val     = (uint)active;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqSet(ascanNum, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set IF Gate failed!", "错误:设置IF Gate失败!");
            }
            return(error_code);
        }
예제 #2
0
        public static int Threshold(uint ascanNum, GateType type, double threshold)
        {
            int    error_code;
            int    gateNum = (int)type;
            uint   attr    = DaqAttrType.gate[gateNum].Threshold;
            double val     = threshold;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqSet(ascanNum, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the Threshold of gate failed", "错误:设置门的高度失败");
            }
            return(error_code);
        }
예제 #3
0
        /**gate measment mode, pls see MeasMode Enum for part of list*/
        public static int MeasMode(uint ascanNum, GateType type, MeasMode mode)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].MeasMode;
            uint val     = (uint)mode;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqSet(ascanNum, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the Gate measment mode failed!", "错误:设置Gate measment mode失败!");
            }
            return(error_code);
        }
예제 #4
0
        ////public static int AlarmTimeLength(uint ascanNum, GateType type, ref GateAlarmSignalLength len)
        //{
        //    int error_code;
        //    int gateNum = (int)type;
        //    uint attr = DaqAttrType.gate[gateNum].AlarmActive;
        //    uint val = (uint)len;

        //    if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
        //    {
        //        error_code = -1;
        //        return error_code;
        //    }

        //    if (type < gateTypeMin || type > gateTypeMax)
        //    {
        //        error_code = -1;
        //        return error_code;
        //    }

        //    error_code = DAQ.daqGet(ascanNum, attr, ref val);
        //    if (error_code != (int)PDAQ_ERR.GOOD)
        //    {
        //        MessageShow.show("Error:Get the Gate alarm signal length failed!", "错误:获取Gate alarm signal length失败!");
        //    }
        //    return error_code;
        //}

        public static int AlarmActiveLevel(uint ascanNum, GateType type, GateAlarmLevel level)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].AlarmActiveLevel;
            uint val     = (uint)level;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqSet(ascanNum, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set alarm active level failed!", "错误:设置Alarm active level失败!");
            }
            return(error_code);
        }
예제 #5
0
        public static int AlarmSignalLength(uint ascanNum, GateType type, GateAlarmSignalLength len)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].AlarmSignalLength;
            uint val     = (uint)len;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqSet(ascanNum, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the Gate alarm signal length failed!", "错误:设置Gate alarm signal length失败!");
            }
            return(error_code);
        }
예제 #6
0
        /**TM suppress counter(TMSc)*/
        public static int TolMonitorSc(uint ascanNum, GateType type, uint cnt)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].TolMonitorSc;
            uint val     = cnt;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqSet(ascanNum, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Tolerance Monitor Suppress Counter failed!", "错误:设置Tolerance Monitor Suppress Counter失败!");
            }
            return(error_code);
        }
예제 #7
0
        public static int DtsStep(uint ascanNum, GateType type, double step)
        {
            int    error_code;
            int    gateNum = (int)type;
            uint   attr    = DaqAttrType.gate[gateNum].DtsStep;
            double val     = step;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqSet(ascanNum, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the dts Step failed!", "错误:设置BTS step失败!");
            }
            return(error_code);
        }
예제 #8
0
        public static int DnsBw(uint ascanNum, GateType type, double dnsBw)
        {
            int    error_code;
            int    gateNum = (int)type;
            uint   attr    = DaqAttrType.gate[gateNum].DnsBw;
            double val     = dnsBw;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqSet(ascanNum, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the dns Band width failed!", "错误:设置BNS Bandwidth失败!");
            }
            return(error_code);
        }