Exemplo n.º 1
0
        public static int MeasMode(uint ascanNum, uint ascanPort, DGateType type, MeasMode mode)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.dGate[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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set measurement mode of double gate failed!", "错误:设置门的测量模式失败!");
            }

            return(error_code);
        }
Exemplo n.º 2
0
        public static int TolMonitorSc(uint ascanNum, uint ascanPort, DGateType type, uint tolMonitorSc)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.dGate[gateNum].TolMonitorSc;
            uint val     = tolMonitorSc;

            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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set tolerance monitor suppresser count of double gate failed!", "错误:设置门的容限误差计数失败!");
            }
            return(error_code);
        }
Exemplo n.º 3
0
        public static int AlarmLevel(uint ascanNum, uint ascanPort, DGateType type, GateAlarmLevel level)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.dGate[gateNum].AlarmLevel;
            uint val     = 0;

            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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set alarm level of double gate failed!", "错误:设置门的报警等级失败!");
            }
            level = (GateAlarmLevel)val;
            return(error_code);
        }
Exemplo n.º 4
0
        /**gate measment mode, pls see MeasMode Enum for part of list*/
        public static int MeasMode(uint ascanNum, uint ascanPort, 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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the Gate measment mode failed!", "错误:设置Gate measment mode失败!");
            }
            return(error_code);
        }
Exemplo n.º 5
0
        public static int AlarmActive(uint ascanNum, uint ascanPort, DGateType type, GateAlarmActive active)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.dGate[gateNum].AlarmActive;
            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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get alarm active of double gate failed!", "错误:获得门的报警使能失败!");
            }

            return(error_code);
        }
Exemplo n.º 6
0
        ////public static int AlarmTimeLength(uint ascanNum, uint ascanPort, 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, ascanPort, 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, uint ascanPort, 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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set alarm active level failed!", "错误:设置Alarm active level失败!");
            }
            return(error_code);
        }
Exemplo n.º 7
0
        //需要确定
        //public static int AlarmMode(uint ascanNum, uint ascanPort, GateType type, GateAlarmActive active)
        //{
        //    int error_code;
        //    int gateNum = (int)type;
        //    uint attr = DaqAttrType.dGate[gateNum].AlarmActive;
        //    uint val = 0;

        //    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, ascanPort, attr, ref val);
        //    if (error_code != (int)PDAQ_ERR.GOOD)
        //    {
        //        MessageShow.show("Error:Get alarm active double gate failed!", "错误:获得门的报警使能失败!");
        //    }
        //    active = (GateAlarmActive)val;
        //    return error_code;
        //}

        public static int AlarmSignalLength(uint ascanNum, uint ascanPort, DGateType type, GateAlarmSignalLength length)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.dGate[gateNum].AlarmSignalLength;
            uint val     = (uint)length;

            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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set alarm singal length of double gate failed!", "错误:设置门的报警信号长度失败!");
            }

            return(error_code);
        }
Exemplo n.º 8
0
        /**TM suppress counter(TMSc)*/
        public static int TolMonitorSc(uint ascanNum, uint ascanPort, 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, ascanPort, 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);
        }
Exemplo n.º 9
0
        public static int Threshold(uint ascanNum, uint ascanPort, 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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the Threshold of gate failed", "错误:设置门的高度失败");
            }
            return(error_code);
        }
Exemplo n.º 10
0
        public static int AlarmSignalLength(uint ascanNum, uint ascanPort, 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, ascanPort, 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);
        }
Exemplo n.º 11
0
        public static int DtsStep(uint ascanNum, uint ascanPort, 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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the dts Step failed!", "错误:设置BTS step失败!");
            }
            return(error_code);
        }
Exemplo n.º 12
0
        /**get dynamic threld suppression (dts) active*/
        public static int DtsActive(uint ascanNum, uint ascanPort, GateType type, DTSActive active)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].DtsActive;
            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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Dts Active failed!", "错误:设置Dts Active失败!");
            }
            return(error_code);
        }
Exemplo n.º 13
0
        public static int Delay(uint ascanNum, uint ascanPort, GateType type, double delay)
        {
            int    error_code;
            int    gateNum = (int)type;
            uint   attr    = DaqAttrType.gate[gateNum].Delay;
            double val     = delay;

            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, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the Delay of gate failed", "错误:设置门的起始位置失败");
                return(error_code);
            }
            setDelayDictionary(ascanNum, ascanPort, type, val);
            return(error_code);
        }
Exemplo n.º 14
0
        public static int PeriodTimes(uint ascanNum, uint chn, uint num)
        {
            int  error_code;
            uint attr = DaqAttrType.pA.SeqPeriodTimes;

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

            error_code = DAQ.daqSet(ascanNum, chn, attr, num);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Seq Period Times failed", "错误:设置Seq Period Times失败");
            }
            return(error_code);
        }
Exemplo n.º 15
0
        public static int BeamFile(uint ascanNum, uint chn, StructBeamFile structBeam)
        {
            int  error_code;
            uint attr = DaqAttrType.pA.BeamFormerFile;

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

            error_code = DAQ.daqSet(ascanNum, chn, attr, structBeam);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Beam File failed", "错误:设置Beam File失败");
            }
            return(error_code);
        }
Exemplo n.º 16
0
        public static int Mode(uint ascanNum, uint ascanPort, DACMode mode)
        {
            int  error_code;
            uint attr = DaqAttrType.dac.Mode;
            uint val  = (uint)mode;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set DAC mode failed", "错误:设置DAC mode失败");
            }
            return(error_code);
        }
Exemplo n.º 17
0
        public static int RunMode(uint ascanNum, uint ascanPort, RunMode runMode)
        {
            int  error_code;
            uint attr = DaqAttrType.globalCtrl.RunMode;
            uint val  = (uint)runMode;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set run mode failed", "错误:设置运行模式失败");
            }
            return(error_code);
        }
Exemplo n.º 18
0
        public static int Range(uint ascanNum, uint ascanPort, double range)
        {
            int    error_code;
            uint   attr = DaqAttrType.ascanVideo.Range;
            double val  = range;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Ascan range failed", "错误:设置Ascan range失败");
            }
            return(error_code);
        }
Exemplo n.º 19
0
        public static int AnalogHPF(uint ascanNum, uint ascanPort, FilterCutoffFreq freq)
        {
            int  error_code;
            uint attr = DaqAttrType.receiver.AnalogHPF;
            uint val  = (uint)freq;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Filter cut off frequency failed!", "错误:设置截止频率失败!");
            }
            return(error_code);
        }
Exemplo n.º 20
0
        public static int RecieverPATH(uint ascanNum, uint ascanPort, ReceiverPATH receiverPATH)
        {
            int  error_code;
            uint attr = DaqAttrType.receiver.ReceiverPATH;
            uint val  = (uint)receiverPATH;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set reciever PATH failed!", "错误:设置reciever PATH失败!");
            }
            return(error_code);
        }
Exemplo n.º 21
0
        public static int Point(uint ascanNum, uint ascanPort, uint point)
        {
            int  error_code;
            uint attr = DaqAttrType.dac.Point;
            uint val  = point;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set DAC point failed", "错误:设置DAC point失败");
            }
            return(error_code);
        }
Exemplo n.º 22
0
        public static int DampingValue(uint ascanNum, uint ascanPort, uint dampingValue)
        {
            int  error_code;
            uint attr = DaqAttrType.receiver.DampingValue;
            uint val  = (uint)dampingValue;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set damping value failed!", "错误:设置damping value失败!");
            }
            return(error_code);
        }
Exemplo n.º 23
0
        public static int DACFile(uint ascanNum, uint ascanPort, DACParas dacParas)
        {
            int      error_code;
            uint     attr = DaqAttrType.dac.File;
            DACParas val  = dacParas;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set DAC file failed", "错误:设置DAC file失败");
            }
            return(error_code);
        }
Exemplo n.º 24
0
        private static int DetectionWaveMode(uint ascanNum, uint ascanPort, AscanWaveDectionMode mode)
        {
            int  error_code;
            uint attr = DaqAttrType.ascanVideo.DetectionWaveMode;
            uint val  = (uint)mode;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set the Detection wave mode of Asacn failed", "错误:设置A扫的检波失败");
            }
            return(error_code);
        }
Exemplo n.º 25
0
        public static int Active(uint ascanNum, uint ascanPort, ReceiverActive active)
        {
            int  error_code;
            uint attr = DaqAttrType.receiver.Active;
            uint val  = (uint)active;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set reciviever active failed!", "错误:设置reciviever active失败!");
            }
            return(error_code);
        }
Exemplo n.º 26
0
        public static int Longitudinal(uint ascanNum, uint ascanPort, double longitudinal)
        {
            int    error_code;
            uint   attr = DaqAttrType.matVelocity.Longitudinal;
            double val  = longitudinal;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Material longitudinal velocity failed", "错误:设置材料纵波声速失败");
            }
            return(error_code);
        }
Exemplo n.º 27
0
        public static int AnalogGain(uint ascanNum, uint ascanPort, double gain)
        {
            int    error_code;
            uint   attr = DaqAttrType.receiver.AnalogGain;
            double val  = gain;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set analog gain failed!", "错误:设置analog gain失败!");
            }
            return(error_code);
        }
Exemplo n.º 28
0
        public static int Transverse(uint ascanNum, uint ascanPort, double transverse)
        {
            int    error_code;
            uint   attr = DaqAttrType.matVelocity.Transverse;
            double val  = transverse;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Material transverse velocity failed", "错误:设置材料横波声速失败");
            }
            return(error_code);
        }
Exemplo n.º 29
0
        public static int DigitalLPF(uint ascanNum, uint ascanPort, FilterCutoffFreq digitalLPF)
        {
            int  error_code;
            uint attr = DaqAttrType.receiver.DigitalLPF;
            uint val  = (uint)digitalLPF;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set digital low pass filter failed!", "错误:设置digital low pass filter失败!");
            }
            return(error_code);
        }
Exemplo n.º 30
0
        public static int IFActive(uint ascanNum, uint ascanPort, AscanIFActive active)
        {
            int  error_code;
            uint attr = DaqAttrType.ascanVideo.IFActive;
            uint val  = (uint)active;

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

            error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Set Ascan if active failed", "错误:设置Ascan if active失败");
            }
            return(error_code);
        }