diff --git a/.vs/Testrong.User.Program/v17/.suo b/.vs/Testrong.User.Program/v17/.suo
index 8dfa707..b45c8cd 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 f3b3e51..e613d52 100644
--- a/.vs/Testrong.User.Program/v17/DocumentLayout.backup.json
+++ b/.vs/Testrong.User.Program/v17/DocumentLayout.backup.json
@@ -28,7 +28,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": "AgIAAEEEAAAAAAAAAAAIwGAEAAAdAAAAAAAAAA==",
+ "ViewState": "AgIAAMwDAAAAAAAAAAAmwOoDAAAyAAAAAAAAAA==",
"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 e613d52..40e02e8 100644
--- a/.vs/Testrong.User.Program/v17/DocumentLayout.json
+++ b/.vs/Testrong.User.Program/v17/DocumentLayout.json
@@ -28,7 +28,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": "AgIAAMwDAAAAAAAAAAAmwOoDAAAyAAAAAAAAAA==",
+ "ViewState": "AgIAAOwMAAAAAAAAAAA4wJgHAABBAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-18T12:27:43.78Z",
"EditorCaption": ""
diff --git a/Testrong.User.Program/.vscode/settings.json b/Testrong.User.Program/.vscode/settings.json
new file mode 100644
index 0000000..013007b
--- /dev/null
+++ b/Testrong.User.Program/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "dotnet.preferCSharpExtension": true
+}
\ No newline at end of file
diff --git a/Testrong.User.Program/Testrong.User.Program.sln b/Testrong.User.Program/Testrong.User.Program.sln
new file mode 100644
index 0000000..a0db562
--- /dev/null
+++ b/Testrong.User.Program/Testrong.User.Program.sln
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.2.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testrong.User.Program", "Testrong.User.Program.csproj", "{CEA70DC9-57FA-EDF5-51BB-E451A1E7E26A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CEA70DC9-57FA-EDF5-51BB-E451A1E7E26A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CEA70DC9-57FA-EDF5-51BB-E451A1E7E26A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CEA70DC9-57FA-EDF5-51BB-E451A1E7E26A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CEA70DC9-57FA-EDF5-51BB-E451A1E7E26A}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {399175A2-AA9D-4BED-9765-E69B1CF3DD98}
+ EndGlobalSection
+EndGlobal
diff --git a/Testrong.User.Program/UserProgram.cs b/Testrong.User.Program/UserProgram.cs
index 140d048..ace8d7c 100644
--- a/Testrong.User.Program/UserProgram.cs
+++ b/Testrong.User.Program/UserProgram.cs
@@ -1440,6 +1440,7 @@ namespace Testrong.User.Program
///
void Rint_FVMV_2mA_Pre(IFlowRunnerContext context, TestVersion testVersion)
{
+ #region Init Config & Variables
List ChannelDps = new List();
List ChannelPmu = new List();
for (int m = 0; m < 256; m++)
@@ -1457,11 +1458,6 @@ namespace Testrong.User.Program
slotList.Add(slotInfos[slotLen].No);
}
- //-----config dmm3458A and ExtCalibrationBoard-----
- KeysightDMM3458A dmm = new KeysightDMM3458A();
- ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
- string extConnStr = Select_IP[testVersion];
- int extPort = port;
//-----config Board-----
byte[] armDnaPortCmd = new byte[2] { 14, 57 };
byte[] armDnaRaw = context.Communicator.Send(armDnaPortCmd);
@@ -1470,9 +1466,6 @@ namespace Testrong.User.Program
int SlotNum = context.Communicator.SlotNo;
double[,] ExtBoard_Res = ReadRext(EXT_CAL_INIT_PATH + "ExtBoardRes.csv");
- //Folder Related
- File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
-
//-----Start Slot Number-----
StreamWriter swdata;
swdata = new StreamWriter(METADATA_PATH, true, Encoding.UTF8)
@@ -1488,11 +1481,27 @@ namespace Testrong.User.Program
context: context,
init_Flag: true
);
+ #endregion
+
+ #region Config DMM
+ //-----config dmm3458A and ExtCalibrationBoard-----
+ KeysightDMM3458A dmm = new KeysightDMM3458A();
+ ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
+ string extConnStr = Select_IP[testVersion];
+ int extPort = port;
dmm.InitDMM(ksightConnStr);
+ #endregion
+
+ //Folder Related
+ File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
+
string filetime = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
+
+ #region Test
for (int loopk = 0; loopk < 256; loopk++)
{
+ #region Test Config
string[] PmuPinName = { ("A" + (ChannelPmu[loopk] < 10 ? "0" : "") + ChannelPmu[loopk]) };
RELAY.SwitchMode(RelayMode.Open);
RELAY.SwitchToPPMU(PmuPinName);
@@ -1502,11 +1511,11 @@ namespace Testrong.User.Program
string filename = EXT_CAL_PATH + filepath;
int ch = ChannelPmu[loopk];
-
double[] AteMeasure = new double[SampliCount];
double[] ForceValue = new double[SampliCount];
double[] DMMValue = new double[SampliCount];
double[] TempValue = new double[SampliCount];
+ #endregion
extCaliHandle.SetPpmuExternalCalibration(extConnStr, extPort, SlotNum, ExternalCalibrationMode.Channel, ch, ExtCaliVI.V, ExtCaliLoad.no_load, 0);//change channel
@@ -1514,6 +1523,7 @@ namespace Testrong.User.Program
{
DelayHelper.Sleep(20);
}
+ #region Actual Test
for (int p = 0; p < SampliCount; p++)
{
PPMU.Force(PmuPinName, ForceVoltage, PpmuMode.FVMV, PpmuIRange._2mA, VRange.Normal);
@@ -1534,9 +1544,10 @@ namespace Testrong.User.Program
TempValue[p] = chTemp;
ForceVoltage += VoltageStep;
}
+ #endregion
PPMU.Force(PmuPinName, 0, PpmuMode.FVMV, PpmuIRange._2mA, VRange.Normal);
-
+ #region File Writing
StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8)
{
AutoFlush = true
@@ -1571,11 +1582,14 @@ namespace Testrong.User.Program
Range: "2mA",
filepath: filepath,
filetime: filetime);
+
+ #endregion
}
-
+ #endregion
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL");
swdata.Flush();
swdata.Close();
+
}
///
@@ -1587,6 +1601,7 @@ namespace Testrong.User.Program
///
void Rint_FVMV_2mA_Post(IFlowRunnerContext context, TestVersion testVersion)
{
+ #region Init Config & Variables
List ChannelDps = new List();
List ChannelPmu = new List();
//-----Select PreTest or ReTest-----
@@ -1605,13 +1620,6 @@ namespace Testrong.User.Program
}
slotList.Add(slotInfos[slotLen].No);
}
-
- //-----config dmm3458A and ExtCalibrationBoard-----
- KeysightDMM3458A dmm = new KeysightDMM3458A();
- ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
- string extConnStr = Select_IP[testVersion];
- int extPort = port;
-
//-----config Board-----
byte[] armDnaPortCmd = new byte[2] { 14, 57 };
byte[] armDnaRaw = context.Communicator.Send(armDnaPortCmd);
@@ -1619,18 +1627,13 @@ namespace Testrong.User.Program
string arm_dna = BitConverter.ToUInt64(armDnaRaw, 0).ToString();
int SlotNum = context.Communicator.SlotNo;
- //-----Read R File-----
- double[,] ExtBoard_Res = ReadRext(EXT_CAL_INIT_PATH + "ExtBoardRes.csv");
-
- //-----Move File To History-----
- File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
-
- //-----Start Slot Number-----
+ //-----Start Write MetaData-----
StreamWriter swdata;
swdata = new StreamWriter(METADATA_PATH, true, Encoding.UTF8)
{
AutoFlush = true
};
+
Metadata_handler(
swdata: swdata,
SlotNum: SlotNum,
@@ -1639,13 +1642,33 @@ namespace Testrong.User.Program
context: context,
init_Flag: true
);
+ #endregion
+
+ #region Config DMM
+ //-----config dmm3458A and ExtCalibrationBoard-----
+ KeysightDMM3458A dmm = new KeysightDMM3458A();
+ ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
+ string extConnStr = Select_IP[testVersion];
+ int extPort = port;
dmm.InitDMM(ksightConnStr);
+ #endregion
+
+ //-----Read R File-----
+ double[,] ExtBoard_Res = ReadRext(EXT_CAL_INIT_PATH + "ExtBoardRes.csv");
+
+ //-----Move File To History-----
+ File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
+
+
extCaliHandle.SetPpmuExternalCalibration(extConnStr, extPort, 1, ExternalCalibrationMode.Channel, 1, ExtCaliVI.V, ExtCaliLoad.RC_RL7, 0);
double rload = GetRloadValue(dmm, 2000, 5);
string filetime = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
+
+ #region Test
for (int loopk = 0; loopk < 256; loopk++)
{
+ #region Test Config
double ForceVoltage = -2;
double VoltageStep = 1;
string[] PmuPinName = { ("A" + (ChannelPmu[loopk] < 10 ? "0" : "") + ChannelPmu[loopk]) };
@@ -1659,13 +1682,14 @@ namespace Testrong.User.Program
RELAY.SwitchToPPMU(PmuPinName);
string filepath = "Slot" + SlotNum + "_PMU_" + "ch" + ChannelPmu[loopk] + "_" + "FVMV" + "_" + "Hi-Z" + "_" + "2mA" + ".csv";
string filename = EXT_CAL_PATH + filepath;
-
+ #endregion
extCaliHandle.SetPpmuExternalCalibration(extConnStr, extPort, SlotNum, ExternalCalibrationMode.Channel, ch, ExtCaliVI.V, ExtCaliLoad.RC_RL7, 0);//change channel
if (loopk == 0)
{
DelayHelper.Sleep(20);
}
+ #region Actual Test
for (int p = 0; p < SampliCount; p++)
{
PPMU.Force(PmuPinName, ForceVoltage, PpmuMode.FVMV, PpmuIRange._2mA, VRange.Normal);
@@ -1685,8 +1709,11 @@ namespace Testrong.User.Program
TempValue[p] = chTemp;
ForceVoltage += VoltageStep;
}
+ #endregion
+
PPMU.Force(PmuPinName, 0, PpmuMode.FVMV, PpmuIRange._2mA, VRange.Normal);
+ #region File Writing
StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8)
{
AutoFlush = true
@@ -1721,12 +1748,17 @@ namespace Testrong.User.Program
Range: "2mA",
filepath: filepath,
filetime: filetime);
-
+ #endregion
}
+
+ #endregion
+
swdata.Flush();
swdata.Close();
Thread.Sleep(1000);
+ #region Post Process
+ #region File Process
StreamReader metareader = new StreamReader(METADATA_PATH, Encoding.UTF8);
List dnaip = new List();
List path = new List();
@@ -1745,9 +1777,12 @@ namespace Testrong.User.Program
cnnt = cnnt + 1;
}
metareader.Close();
+
string pmurapth = EXT_CAL_PATH + context.Communicator.ServerIP + "_" + "Pmur" + ".txt";
StreamWriter Pmur = new StreamWriter(pmurapth, true);
Pmur.AutoFlush = true;
+ #endregion
+ #region Rint Calculation
for (int p = 0; p < path.Count; p++)
{
string dna = path[p].Split(',')[0];
@@ -1769,12 +1804,12 @@ namespace Testrong.User.Program
}
double ateV = Convert.ToDouble(datassingle[linefile].Split(',')[1]);
double voltage = Convert.ToDouble(datassingle[linefile].Split(',')[2]);
- double iii = voltage / RL;
- double diff = ateV - voltage;
- double rrr = diff / iii;
- res = res + (rrr - rext);
+ double iii = voltage / RL; //???
+ double diff = ateV - voltage;
+ double rrr = diff / iii; //???
+ res = res + (rrr - rext); //Rint?
}
- res = res / 4;
+ res = res / 4; //Average
string ChannelFormat;
if (ChannelNum < 10)
{
@@ -1793,7 +1828,9 @@ namespace Testrong.User.Program
datassingle.Clear();
singlefile.Close();
}
+ #endregion
Pmur.Close();
+ #endregion
#region Thread Lock
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL");