protected override bool StartTest() { logoStr = ""; calledCount++; if (calledCount > 1) { Log.SaveLogToTxt("calledCount>1"); OutPutandFlushLog(); return(true); } if (AnalysisInputParameters(inputParameters) == false) { OutPutandFlushLog(); return(false); } if (tempps != null) { if (GlobalParameters.TotalVccCount <= 0) { vccAdcArray = new double[1, calVccDmiStruct.ArrayListVcc.Count]; } else { vccAdcArray = new double[GlobalParameters.TotalVccCount, calVccDmiStruct.ArrayListVcc.Count]; } ReadVccADC(dut, tempps); Log.SaveLogToTxt("Step3...Start Fitting Curve"); tempVccArray = new double[calVccDmiStruct.ArrayListVcc.Count]; for (byte i = 0; i < calVccDmiStruct.ArrayListVcc.Count; i++) { tempVccArray[i] = Convert.ToDouble(calVccDmiStruct.ArrayListVcc[i].ToString()); } tempps.ConfigVoltageCurrent(Convert.ToString(GlobalParameters.CurrentVcc)); if (!CurveVccDMIandWriteCoefs()) { OutPutandFlushLog(); return(false); } tempps.OutPutSwitch(false); tempps.OutPutSwitch(true); dut.FullFunctionEnable(); } else { Log.SaveLogToTxt("Equipments are not enough!"); isCalVccDmiOk = false; OutPutandFlushLog(); return(isCalVccDmiOk); } OutPutandFlushLog(); return(true); }
private bool CalculatedCoefs() { switch (MyStruct.AdjustMethod) { case 0: string SelectCondition = "Channel=" + GlobalParameters.CurrentChannel; DataRow[] drArray = dtMask.Select(SelectCondition); if (drArray.Length < 2) { break; } #region TempCout>=2 string[] TempADCArray = drArray.Select(A => A["TempADC"].ToString()).ToArray(); double[] X = Array.ConvertAll <String, double>(TempADCArray, s => double.Parse(s)); string[] TargetMaskDacArray = drArray.Select(A => A["TargetMaskDac"].ToString()).ToArray(); double[] Y = Array.ConvertAll <String, double>(TargetMaskDacArray, s => double.Parse(s)); double[] coefArray = Algorithm.MultiLine(X, Y, X.Length, 2); //coefArray.Reverse(); Array.Reverse(coefArray); float[] floatArray = Array.ConvertAll <double, float>(coefArray, s => float.Parse(s.ToString())); WriteCoef(floatArray); pPs.OutPutSwitch(false); pPs.OutPutSwitch(true); #endregion break; case 1: // 无系数可写 break; default: break; } return(true); }
protected override bool StartTest() { logoStr = ""; IList <string> tempKeys = realTempratureArray.Keys; for (byte i = 0; i < tempKeys.Count; i++) { if (tempKeys[i].ToUpper().Substring(0, tempKeys[i].ToUpper().Length - 1) == (GlobalParameters.CurrentTemp.ToString().Trim().ToUpper())) { Log.SaveLogToTxt("Current temprature had exist"); OutPutandFlushLog(); return(true); } } if (tempps != null) { AddCurrentTemprature(); if (!CurveTempDmiandWriteCoefs()) { OutPutandFlushLog(); tempps.OutPutSwitch(false); tempps.OutPutSwitch(true); dut.FullFunctionEnable(); return(false); } tempps.OutPutSwitch(false); tempps.OutPutSwitch(true); dut.FullFunctionEnable(); } else { Log.SaveLogToTxt("Equipments are not enough!"); isCalTempDmiOk = false; OutPutandFlushLog(); return(isCalTempDmiOk); } OutPutandFlushLog(); return(true); }
protected override bool StartTest() { logoStr = ""; if (supply != null) { CloseandOpenAPC(Convert.ToByte(APCMODE.IBAISandIMODOFF)); } supply.OutPutSwitch(false); Thread.Sleep(20); supply.OutPutSwitch(true); bool result = Test(); dut.TxAllChannelEnable(); OutPutandFlushLog(); return(result); }