public static int DtsStep(uint ascanNum, uint ascanPort, GateType type, ref double step) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.gate[gateNum].DtsStep; double 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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get the dts Step failed!", "错误:获取BTS step失败!"); } step = val; return(error_code); }
public static int Width(uint ascanNum, uint ascanPort, GateType type, ref double width) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.gate[gateNum].Width; double 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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get the Width of gate failed", "错误:获得门的宽度失败"); return(error_code); } width = val; SetGateDAQ.setWidthDictionary(ascanNum, ascanPort, type, width); return(error_code); }
/**get dynamic threld suppression (dts) active*/ public static int DtsActive(uint ascanNum, uint ascanPort, GateType type, ref DTSActive active) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.gate[gateNum].DtsActive; 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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get Dts Active failed!", "错误:获取Dts Active失败!"); } active = (DTSActive)val; return(error_code); }
public void getHardInfo() { int error_code; uint cla_num = 0; uint slt_num = 0; error_code = DAQ.daqGet((uint)index, (uint)port, (uint)AttrbuteType.DAQ_ATTR_PCI_CLASSIC_NUMBER, ref cla_num); if (error_code == 0) { classicNum = cla_num; } else { classicNum = 0; } error_code = DAQ.daqGet((uint)index, (uint)port, (uint)AttrbuteType.DAQ_ATTR_PCI_SLOT_NUMBER, ref slt_num); if (error_code == 0) { slotNum = slt_num; } else { slotNum = 0; } if (assignedName == null) { assignedName = cla_num.ToString() + "-" + slotNum.ToString(); } }
/**gate measment mode, pls see MeasMode Enum for part of list*/ public static int MeasMode(uint ascanNum, uint ascanPort, GateType type, ref MeasMode mode) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.gate[gateNum].MeasMode; 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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get the Gate measment mode failed!", "错误:获取Gate measment mode失败!"); } mode = (MeasMode)val; return(error_code); }
public static int AlarmSignalLength(uint ascanNum, uint ascanPort, GateType type, ref GateAlarmSignalLength len) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.gate[gateNum].AlarmSignalLength; 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.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失败!"); } len = (GateAlarmSignalLength)val; return(error_code); }
////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, ref GateAlarmLevel level) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.gate[gateNum].AlarmActiveLevel; 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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get alarm active level failed!", "错误:获取Alarm active level失败!"); } level = (GateAlarmLevel)val; return(error_code); }
public static int TolMonitorSc(uint ascanNum, uint ascanPort, DGateType type, ref uint tolMonitorSc) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.dGate[gateNum].TolMonitorSc; 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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get tolerance monitor suppresser count of double gate failed!", "错误:获得门的容限误差计数失败!"); } tolMonitorSc = val; return(error_code); }
/**TM suppress counter(TMSc)*/ public static int TolMonitorSc(uint ascanNum, uint ascanPort, GateType type, ref uint cnt) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.gate[gateNum].TolMonitorSc; 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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get Tolerance Monitor Suppress Counter failed!", "错误:获取Tolerance Monitor Suppress Counter失败!"); } cnt = val; return(error_code); }
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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get alarm level of double gate failed!", "错误:获得门的报警等级失败!"); } level = (GateAlarmLevel)val; return(error_code); }
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 = 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.daqGet(ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get measurement mode of double gate failed!", "错误:获得门的测量模式失败!"); } mode = (MeasMode)val; return(error_code); }
public static int Threshold(uint ascanNum, uint ascanPort, GateType type, ref double threshold) { int error_code; int gateNum = (int)type; uint attr = DaqAttrType.gate[gateNum].Threshold; double 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.daqGet((uint)ascanNum, ascanPort, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get the Threshold of gate failed", "错误:获得门的高度失败"); } threshold = val; return(error_code); }
public static int Intensity(uint ascanNum, uint ascanPort, ref double intensity) { int error_code; uint attr = DaqAttrType.pulserTranmit.Intensity; double val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { 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 Pulser transmit reciviever intensity failed", "错误:获得Pulser transmit reciviever intensity失败"); } intensity = val; return(error_code); }
public static int Active(uint ascanNum, uint port, ref ReceiverActive active) { int error_code; uint attr = DaqAttrType.receiver.Active; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get reciviever active failed!", "错误:获得reciviever active失败!"); } active = (ReceiverActive)val; return(error_code); }
public static int DetectionWaveMode(uint ascanNum, uint port, ref AscanWaveDectionMode mode) { int error_code; uint attr = DaqAttrType.ascanVideo.DetectionWaveMode; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get the Detection wave mode of Asacn failed", "错误:获得A扫的检波失败"); } mode = (AscanWaveDectionMode)val; return(error_code); }
public static int Range(uint ascanNum, uint port, ref double range) { int error_code; uint attr = DaqAttrType.ascanVideo.Range; double val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get Ascan range failed", "错误:获得Ascan range失败"); } range = val; return(error_code); }
public static int IFActive(uint ascanNum, uint port, ref AscanIFActive active) { int error_code; uint attr = DaqAttrType.ascanVideo.IFActive; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get Ascan if active failed", "错误:获得Ascan if active失败"); } active = (AscanIFActive)val; return(error_code); }
public static int EnvlopDecayFactor(uint ascanNum, uint port, ref uint speed) { int error_code; uint attr = DaqAttrType.ascanVideo.EnvlopDecayFactor; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get Envlop Decay Factor failed!", "错误:获得包络速度失败!"); } speed = val; return(error_code); }
public static int Length(uint ascanNum, uint port, ref AscanVideoLength length) { int error_code; uint attr = DaqAttrType.ascanVideo.Length; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get Ascan video length failed", "错误:获得Ascan video length失败"); } length = (AscanVideoLength)val; return(error_code); }
public static int AnalogGain(uint ascanNum, uint port, ref double gain) { int error_code; uint attr = DaqAttrType.receiver.AnalogGain; double val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get analog gain failed!", "错误:获得analog gain失败!"); } gain = val; return(error_code); }
public static int ReceiverPATH(uint ascanNum, uint port, ref ReceiverPATH receiverPATH) { int error_code; uint attr = DaqAttrType.receiver.ReceiverPATH; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get reciever PATH failed!", "错误:获得reciever PATH失败!"); } receiverPATH = (ReceiverPATH)val; return(error_code); }
public static int DigitalLPF(uint ascanNum, uint port, ref FilterCutoffFreq digitalLPF) { int error_code; uint attr = DaqAttrType.receiver.DigitalLPF; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get digital low pass filter failed!", "错误:获得digital low pass filter失败!"); } digitalLPF = (FilterCutoffFreq)val; return(error_code); }
public static int DampingValue(uint ascanNum, uint port, ref uint dampingValue) { int error_code; uint attr = DaqAttrType.receiver.DampingValue; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get damping value failed!", "错误:获得damping value失败!"); } dampingValue = val; return(error_code); }
public static int DampingActive(uint ascanNum, uint ascanPort, ref PulserDampingActive active) { int error_code; uint attr = DaqAttrType.pulserTranmit.DampingActive; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { 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 Pulser transmit reciviever damping active failed", "错误:获得Pulser transmit reciviever damping active失败"); } active = (PulserDampingActive)val; return(error_code); }
public static int AnalogHPF(uint ascanNum, uint port, ref FilterCutoffFreq freq) { int error_code; uint attr = DaqAttrType.receiver.AnalogHPF; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get Filter cut off frequency failed!", "错误:获得截止频率失败!"); } freq = (FilterCutoffFreq)val; return(error_code); }
public static int Point(uint ascanNum, uint ascanPort, ref uint point) { int error_code; uint attr = DaqAttrType.dac.Point; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { 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 DAC point failed", "错误:获得DAC point失败"); } point = val; return(error_code); }
public static int Mode(uint ascanNum, uint ascanPort, ref DACMode mode) { int error_code; uint attr = DaqAttrType.dac.Mode; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { 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 DAC mode failed", "错误:获得DAC mode失败"); } mode = (DACMode)val; return(error_code); }
public static int Prf(uint ascanNum, uint ascanPort, ref uint prf) { int error_code; uint attr = DaqAttrType.pulserTranmit.Prf; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { 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 Pulser transmit reciviever prf failed", "错误:获得Pulser transmit reciviever prf value失败"); } prf = val; return(error_code); }
public static int DACFile(uint ascanNum, uint ascanPort, ref DACParas dacParas) { int error_code; uint attr = DaqAttrType.dac.File; DACParas val = new DACParas(); if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, ascanPort, attr, ref dacParas); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get DAC file failed", "错误:获得DAC file失败"); } dacParas = val; return(error_code); }
public static int SoftStart(uint ascanNum, uint ascanPort, ref uint softStart) { int error_code; uint attr = DaqAttrType.globalCtrl.SoftStart; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { 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 soft start failed", "错误:获得软件开始失败"); } softStart = val; return(error_code); }