Add New Calculate Method for PMU FIMV 60mA
This commit is contained in:
@@ -919,15 +919,31 @@ namespace Testrong.User.Program
|
||||
{
|
||||
double[] IntBoard_Res = new double[256];
|
||||
int cnt3 = 0;
|
||||
StreamReader IntResReader = new StreamReader(RintFilePath, Encoding.UTF8);
|
||||
while (!IntResReader.EndOfStream)
|
||||
try
|
||||
{
|
||||
string[] A = IntResReader.ReadLine().Split(' ', ':');
|
||||
IntBoard_Res[cnt3] = Convert.ToDouble(A[4]);
|
||||
cnt3 = cnt3 + 1;
|
||||
// 提前检查文件是否存在,避免深层构造器异常
|
||||
if (!File.Exists(RintFilePath))
|
||||
{
|
||||
throw new FileNotFoundException($"File not found: {RintFilePath}");
|
||||
}
|
||||
|
||||
using (var IntResReader = new StreamReader(RintFilePath, Encoding.UTF8))
|
||||
{
|
||||
while (!IntResReader.EndOfStream)
|
||||
{
|
||||
string[] A = IntResReader.ReadLine().Split(' ', ':');
|
||||
IntBoard_Res[cnt3] = Convert.ToDouble(A[4]);
|
||||
cnt3 = cnt3 + 1;
|
||||
}
|
||||
IntResReader.Close();
|
||||
return IntBoard_Res;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogRawText(ex.StackTrace); // 调用日志记录方法
|
||||
throw; // 重新抛出保留原始堆栈追踪
|
||||
}
|
||||
IntResReader.Close();
|
||||
return IntBoard_Res;
|
||||
}
|
||||
public List<string> RangeTrans(List<int> range)
|
||||
{
|
||||
@@ -2248,6 +2264,12 @@ namespace Testrong.User.Program
|
||||
armDnaRaw = armDnaRaw.Reverse().ToArray();
|
||||
string arm_dna = BitConverter.ToUInt64(armDnaRaw, 0).ToString();
|
||||
int SlotNum = context.Communicator.SlotNo;
|
||||
|
||||
//Get PMU_R
|
||||
string Currnet_IP_NUM = context.Communicator.ServerIP;
|
||||
string PMUR_FileName = "C:\\ProgramData\\Testrong\\ATE_Tester\\CalibrationLog\\RintCal\\PMUR\\" + Currnet_IP_NUM + "_Pmur.txt";
|
||||
double[] current_ip_pmuRint = ReadRint(PMUR_FileName);
|
||||
|
||||
#endregion
|
||||
//-----Select PreTest or ReTest-----
|
||||
#region 选择第一次测试还是复测
|
||||
@@ -2438,7 +2460,7 @@ namespace Testrong.User.Program
|
||||
{
|
||||
if (Range == "60mA")
|
||||
{
|
||||
dmm.Setup(NiVisaComms.Dmm3458AMeasureMode.CURR, DmmCurrRanges[Range], 0.04);
|
||||
dmm.Setup(NiVisaComms.Dmm3458AMeasureMode.CURR, DmmCurrRanges[Range], 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2605,6 +2627,7 @@ namespace Testrong.User.Program
|
||||
PPMU.Force(PmuPinName, ForceVoltage, ModesPmu[Mode], RangesPmu[Range], VRange.Normal);
|
||||
Thread.Sleep(testParaSet_pmu_fvmi[Range].delayMs);
|
||||
dmm.TriggerSingleMeasure();
|
||||
Thread.Sleep(50);
|
||||
List<SiteInfo> siList = PPMU.Measure(PmuPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FVMI"), testParaSet_pmu_fvmi[Range].avgTimes, testParaSet_pmu_fvmi[Range].samDelay);
|
||||
double chResult = GetATEChannelMeasure(siList, PmuPinName);
|
||||
double[] readTemp = PPMU.ReadTemperature();
|
||||
@@ -2673,7 +2696,14 @@ namespace Testrong.User.Program
|
||||
}
|
||||
List<SiteInfo> siList = PPMU.Measure(PmuPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FIMV"), testParaSet_pmu_fimv[Range].avgTimes, testParaSet_pmu_fimv[Range].samDelay);
|
||||
double chResult = GetATEChannelMeasure(siList, PmuPinName);
|
||||
AteMeasure[p] = chResult / (Convert.ToDouble(RlPmuFi[Range]) + ExtBoard_Res[ch - 1, SlotNum - 1]);
|
||||
double Real_V = 0;
|
||||
double ExtRload = Convert.ToDouble(RlPmuFi[Range]);
|
||||
|
||||
Real_V = chResult + ForceCurrent * current_ip_pmuRint[ListChannels[loopk] - 1];
|
||||
double Total_Rint = current_ip_pmuRint[ListChannels[loopk] - 1] + ExtBoard_Res[ListChannels[loopk] - 1, SlotNum - 1];
|
||||
double Real_I = Real_V / (Total_Rint + ExtRload);
|
||||
AteMeasure[p] = (Real_V - (Total_Rint * Real_I)) / ExtRload;
|
||||
//AteMeasure[p] = chResult / (Convert.ToDouble(RlPmuFi[Range]) + ExtBoard_Res[ch - 1, SlotNum - 1]);
|
||||
ForceValue[p] = ForceCurrent;
|
||||
double[] readTemp = PPMU.ReadTemperature();
|
||||
double chTemp = readTemp[GetPMUTempSensorIndex(ch)];
|
||||
|
||||
Reference in New Issue
Block a user