diff --git a/.vs/Testrong.User.Program/v17/.suo b/.vs/Testrong.User.Program/v17/.suo index 5ca8ea5..5bb2805 100644 Binary files a/.vs/Testrong.User.Program/v17/.suo and b/.vs/Testrong.User.Program/v17/.suo differ diff --git a/.vs/Testrong.User.Program/v17/DocumentLayout.backup.json b/.vs/Testrong.User.Program/v17/DocumentLayout.backup.json index e940a83..b1ab8e0 100644 --- a/.vs/Testrong.User.Program/v17/DocumentLayout.backup.json +++ b/.vs/Testrong.User.Program/v17/DocumentLayout.backup.json @@ -57,7 +57,7 @@ "RelativeDocumentMoniker": "Testrong.User.Program\\UserProgram.cs", "ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs", "RelativeToolTip": "Testrong.User.Program\\UserProgram.cs", - "ViewState": "AgIAAN4JAAAAAAAAAAAowBEKAABZAAAAAAAAAA==", + "ViewState": "AgIAALsEAAAAAAAAAAAQwNAEAAA6AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-18T12:27:43.78Z", "EditorCaption": "" diff --git a/.vs/Testrong.User.Program/v17/DocumentLayout.json b/.vs/Testrong.User.Program/v17/DocumentLayout.json index b1ab8e0..494c4f9 100644 --- a/.vs/Testrong.User.Program/v17/DocumentLayout.json +++ b/.vs/Testrong.User.Program/v17/DocumentLayout.json @@ -55,9 +55,9 @@ "Title": "UserProgram.cs", "DocumentMoniker": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs", "RelativeDocumentMoniker": "Testrong.User.Program\\UserProgram.cs", - "ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs", - "RelativeToolTip": "Testrong.User.Program\\UserProgram.cs", - "ViewState": "AgIAALsEAAAAAAAAAAAQwNAEAAA6AAAAAAAAAA==", + "ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs*", + "RelativeToolTip": "Testrong.User.Program\\UserProgram.cs*", + "ViewState": "AgIAAEsGAAAAAAAAAAAowFcGAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-18T12:27:43.78Z", "EditorCaption": "" diff --git a/Testrong.User.Program/UserProgram.cs b/Testrong.User.Program/UserProgram.cs index 5385984..17b1d16 100644 --- a/Testrong.User.Program/UserProgram.cs +++ b/Testrong.User.Program/UserProgram.cs @@ -1582,6 +1582,7 @@ namespace Testrong.User.Program //-----Move File To History----- File_Mover(SlotNum:SlotNum,slotList:slotList,pathFlag:"CAL_Single"); + //-----Start Slot Number----- StreamWriter swdata; swdata = new StreamWriter(METADATA_PATH, true, Encoding.UTF8) @@ -1596,6 +1597,7 @@ namespace Testrong.User.Program context: context, init_Flag:true ); + dmm.InitDMM(ksightConnStr); extCaliHandle.SetPpmuExternalCalibration(extConnStr, extPort, 1, ExternalCalibrationMode.Channel, 1, ExtCaliVI.V, ExtCaliLoad.RC_RL7, 0); double rload = GetRloadValue(dmm, 2000, 5); @@ -1606,27 +1608,20 @@ namespace Testrong.User.Program double VoltageStep = 1; string[] PmuPinName = { ("A" + (ChannelPmu[loopk] < 10 ? "0" : "") + ChannelPmu[loopk]) }; int ch = ChannelPmu[loopk]; + double[] AteMeasure = new double[SampliCount]; + double[] ForceValue = new double[SampliCount]; + double[] DMMValue = new double[SampliCount]; + double[] TempValue = new double[SampliCount]; RELAY.SwitchMode(RelayMode.Open); RELAY.SwitchToPPMU(PmuPinName); string filepath = "Slot" + SlotNum + "_PMU_" + "ch" + ChannelPmu[loopk] + "_" + "FVMV" + "_" + "Hi-Z" + "_" + "2mA" + ".csv"; string filename = EXT_CAL_PATH + filepath; - StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8); - sw.AutoFlush = true; - sw.Write("Tester_Name,Foo\n"); - sw.Write($"Slot_No,{SlotNum}\n"); - sw.Write($"Board_Dna,{arm_dna}\n"); - sw.Write("Channel_Type,PMU\n"); - sw.Write($"Channel_No,{ChannelPmu[loopk]}\n"); - sw.Write($"Mode,FVMV\n"); - sw.Write($"R_Load,{rload}\n"); - sw.Write($"R_Int,{0}\n"); - sw.Write($"R_Ext,{ExtBoard_Res[ChannelPmu[loopk] - 1, SlotNum - 1]}\n"); - sw.Write($"I_Range,2mA\n"); - sw.Write("V_Range,20V\n"); - sw.Write("Meas_Range,13V\n"); - sw.Write("\n"); - sw.Write("Force Value,ATE Measure,DMM Measure,Temperature\n"); + StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8) + { + AutoFlush = true + }; + extCaliHandle.SetPpmuExternalCalibration(extConnStr, extPort, SlotNum, ExternalCalibrationMode.Channel, ch, ExtCaliVI.V, ExtCaliLoad.RC_RL7, 0);//change channel if (loopk == 0) { @@ -1635,18 +1630,40 @@ namespace Testrong.User.Program for (int p = 0; p < SampliCount; p++) { PPMU.Force(PmuPinName, ForceVoltage, PpmuMode.FVMV, PpmuIRange._2mA, VRange.Normal); - sw.Write($"{ForceVoltage:F8},"); + Thread.Sleep(20); List siList = PPMU.Measure(PmuPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FVMV"), 128, 100); double chResult = GetATEChannelMeasure(siList, PmuPinName); - sw.Write($"{chResult:F8},"); + double dmmRead = dmm.GetDmmMeasureData(KeysightDMM3458A.KeysightMeasMode.VOLT, 1, 7.5); - sw.Write($"{dmmRead:F8},"); + double[] readTemp = PPMU.ReadTemperature(); - sw.Write($"{readTemp[GetPMUTempSensorIndex(ChannelPmu[loopk])]:F8}\n"); + double chTemp = readTemp[GetPMUTempSensorIndex(ch)]; + + ForceValue[p] = ForceVoltage; + AteMeasure[p] = chResult; + DMMValue[p] = dmmRead; + TempValue[p] = chTemp; ForceVoltage += VoltageStep; } PPMU.Force(PmuPinName, 0, PpmuMode.FVMV, PpmuIRange._2mA, VRange.Normal); + + WriteSingleFile( + filename: filename, + slot: SlotNum, + dna: arm_dna, + type: "PMU", + channel: ch, + mode: "FVMV", + rload: "Hi-Z", + extR: ExtBoard_Res, + range: "2mA", + ForceValue: ForceValue, + AteMeasure: AteMeasure, + DmmMeasure: DMMValue, + TempValue: TempValue + ); + sw.Flush(); sw.Close(); diff --git a/Testrong.User.Program/bin/x64/Debug/UserProgram.dll b/Testrong.User.Program/bin/x64/Debug/UserProgram.dll index bd0b746..9f6a836 100644 Binary files a/Testrong.User.Program/bin/x64/Debug/UserProgram.dll and b/Testrong.User.Program/bin/x64/Debug/UserProgram.dll differ diff --git a/Testrong.User.Program/bin/x64/Debug/UserProgram.pdb b/Testrong.User.Program/bin/x64/Debug/UserProgram.pdb index 8e91ac6..eab763b 100644 Binary files a/Testrong.User.Program/bin/x64/Debug/UserProgram.pdb and b/Testrong.User.Program/bin/x64/Debug/UserProgram.pdb differ diff --git a/Testrong.User.Program/obj/x64/Debug/UserProgram.dll b/Testrong.User.Program/obj/x64/Debug/UserProgram.dll index bd0b746..9f6a836 100644 Binary files a/Testrong.User.Program/obj/x64/Debug/UserProgram.dll and b/Testrong.User.Program/obj/x64/Debug/UserProgram.dll differ diff --git a/Testrong.User.Program/obj/x64/Debug/UserProgram.pdb b/Testrong.User.Program/obj/x64/Debug/UserProgram.pdb index 8e91ac6..eab763b 100644 Binary files a/Testrong.User.Program/obj/x64/Debug/UserProgram.pdb and b/Testrong.User.Program/obj/x64/Debug/UserProgram.pdb differ