Add readonly & DPS Temp error handling

This commit is contained in:
YuYang Shen
2025-03-31 13:48:55 +08:00
parent a120c5e7b9
commit f3315354b4
12 changed files with 192 additions and 93 deletions
+127 -86
View File
@@ -93,7 +93,7 @@ namespace Testrong.User.Program
#region FVMV
Dictionary<string, TestParaSet> avgDelays_fvmv_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_fvmv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 40, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -102,7 +102,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_fvmv_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_fvmv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 40, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -113,7 +113,7 @@ namespace Testrong.User.Program
};
#endregion
#region FZMV
Dictionary<string, TestParaSet> avgDelays_fzmv_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_fzmv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 30, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 10, avgTimes = 64, samDelay = 100 } },
@@ -123,7 +123,7 @@ namespace Testrong.User.Program
};
#endregion
#region FIMV PMU
Dictionary<string, TestParaSet> avgDelays_1kft_fimv_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_1kft_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 128, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -131,7 +131,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_1kcp_fimv_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_1kcp_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 128, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -139,7 +139,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_2kft_fimv_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_2kft_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 128, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -147,7 +147,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 128, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_ppmucp_fimv_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_ppmucp_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 255, samDelay = 300 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 300 } },
@@ -155,7 +155,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_ppmuft_fimv_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_ppmuft_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 255, samDelay = 300 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 300 } },
@@ -163,7 +163,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_2km_fimv_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_2km_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
@@ -173,7 +173,7 @@ namespace Testrong.User.Program
};
#endregion
#region FIMV DPS
Dictionary<string, TestParaSet> avgDelays_1kft_fimv_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_1kft_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -181,7 +181,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_1kcp_fimv_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_1kcp_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -189,7 +189,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_2kft_fimv_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_2kft_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 32, samDelay = 100 } },
@@ -197,7 +197,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 32, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 15, avgTimes = 32, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_ppmucp_fimv_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_ppmucp_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -205,7 +205,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_ppmuft_fimv_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_ppmuft_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -213,7 +213,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_2km_fimv_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_2km_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -223,7 +223,7 @@ namespace Testrong.User.Program
};
#endregion
#region FVMI PMU
Dictionary<string, TestParaSet> avgDelays_1kft_fvmi_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_1kft_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
@@ -231,7 +231,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 10, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_1kcp_fvmi_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_1kcp_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 200 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
@@ -239,7 +239,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 10, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 128, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_2kft_fvmi_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_2kft_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 300 } },
@@ -247,7 +247,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 10, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_ppmucp_fvmi_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_ppmucp_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 255, samDelay = 300 } },
@@ -255,7 +255,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 30, avgTimes = 128, samDelay = 200 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_ppmuft_fvmi_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_ppmuft_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 300 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 255, samDelay = 300 } },
@@ -263,7 +263,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 10, avgTimes = 128, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_2km_fvmi_pmu = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_2km_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 255, samDelay = 500 } },
@@ -273,7 +273,7 @@ namespace Testrong.User.Program
};
#endregion
#region FVMI DPS
Dictionary<string, TestParaSet> avgDelays_1kft_fvmi_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_1kft_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
@@ -282,7 +282,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
{"1A", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_1kcp_fvmi_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_1kcp_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 100 } },
@@ -291,7 +291,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 64, samDelay = 100 } },
{"1A", new TestParaSet{delayMs = 30, avgTimes = 64, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_2kft_fvmi_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_2kft_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 200 } },
{"20uA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
@@ -300,7 +300,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
{"1A", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_ppmucp_fvmi_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_ppmucp_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 300 } },
@@ -309,7 +309,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 200 } },
{"1A", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 200 } },
};
Dictionary<string, TestParaSet> avgDelays_ppmuft_fvmi_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_ppmuft_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 500 } },
@@ -318,7 +318,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
{"1A", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
Dictionary<string, TestParaSet> avgDelays_2km_fvmi_dps = new Dictionary<string, TestParaSet>()
readonly Dictionary<string, TestParaSet> avgDelays_2km_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 100 } },
@@ -330,11 +330,11 @@ namespace Testrong.User.Program
#endregion
#region Variables Definition
List<string> testRangesPmu = new List<string> { "5uA", "20uA", "200uA", "2mA", "60mA" };
List<string> testRangesDps = new List<string> { "5uA", "20uA", "200uA", "2mA", "60mA", "1A" };
string[] FreqStr_Test = { "1M", "2M", "2.5M", "5M", "10M" };
double[] FreqForce_Test = { 1000000, 2000000, 2500000, 5000000, 10000000 };
Dictionary<string, string> FreqInfo = new Dictionary<string, string>()
readonly List<string> testRangesPmu = new List<string> { "5uA", "20uA", "200uA", "2mA", "60mA" };
readonly List<string> testRangesDps = new List<string> { "5uA", "20uA", "200uA", "2mA", "60mA", "1A" };
readonly string[] FreqStr_Test = { "1M", "2M", "2.5M", "5M", "10M" };
readonly double[] FreqForce_Test = { 1000000, 2000000, 2500000, 5000000, 10000000 };
readonly Dictionary<string, string> FreqInfo = new Dictionary<string, string>()
{
{"0.625M", "NOR_Pattern_1" },
{"1M", "NOR_Pattern_1" },
@@ -344,25 +344,27 @@ namespace Testrong.User.Program
{"10M","NOR_Pattern_4"},
{"20M","NOR_Pattern_5"}
};
List<int> testChannelDps_1K = new List<int>()
readonly List<int> testChannelDps_1K = new List<int>()
{
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,
};
List<int> testChannelDps_2K = new List<int>()
readonly List<int> testChannelDps_2K = new List<int>()
{
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,
33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,
49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64
};
string[] allDpsPinNames_1K = {
public static class DpsPinConfig
{
public static readonly string[] allDpsPinNames_1K = {
"DPS1","DPS2","DPS3","DPS4","DPS5","DPS6","DPS7","DPS8","DPS9","DPS10",
"DPS11","DPS12","DPS13","DPS14","DPS15","DPS16","DPS17","DPS18","DPS19","DPS20",
"DPS21","DPS22","DPS23","DPS24","DPS25","DPS26","DPS27","DPS28","DPS29","DPS30",
"DPS31","DPS32"
};
string[] allDpsPinNames_2K = {
};
public static readonly string[] allDpsPinNames_2K = {
"DPS1","DPS2","DPS3","DPS4","DPS5","DPS6","DPS7","DPS8","DPS9","DPS10",
"DPS11","DPS12","DPS13","DPS14","DPS15","DPS16","DPS17","DPS18","DPS19","DPS20",
"DPS21","DPS22","DPS23","DPS24","DPS25","DPS26","DPS27","DPS28","DPS29","DPS30",
@@ -370,8 +372,20 @@ namespace Testrong.User.Program
"DPS41","DPS42","DPS43","DPS44","DPS45","DPS46","DPS47","DPS48","DPS49","DPS50",
"DPS51","DPS52","DPS53","DPS54","DPS55","DPS56","DPS57","DPS58","DPS59","DPS60",
"DPS61","DPS62","DPS63","DPS64"
};
Dictionary<TestVersion, string> Select_IP = new Dictionary<TestVersion, string>()
};
public static readonly Dictionary<TestVersion, string[]> Select_DpsPin = new Dictionary<TestVersion, string[]>()
{
{ TestVersion.Board_1K_FT, allDpsPinNames_1K },
{ TestVersion.Board_1K_CP, allDpsPinNames_1K },
{ TestVersion.Board_2K_FT, allDpsPinNames_2K },
{ TestVersion.Board_2K_CP, allDpsPinNames_2K },
{ TestVersion.Board_Ppmu_CP, allDpsPinNames_1K },
{ TestVersion.Board_Ppmu_FT, allDpsPinNames_1K },
{ TestVersion.KM_2, allDpsPinNames_2K}
};
}
readonly Dictionary<TestVersion, string> Select_IP = new Dictionary<TestVersion, string>()
{
{ TestVersion.Board_1K_FT, "192.168.100.110" },
{ TestVersion.Board_1K_CP, "192.168.100.110" },
@@ -381,7 +395,7 @@ namespace Testrong.User.Program
{ TestVersion.Board_Ppmu_FT, "192.168.100.10" },
{ TestVersion.KM_2, "192.168.100.10"}
};
Dictionary<TestVersion, int> Select_Temp = new Dictionary<TestVersion, int>()
readonly Dictionary<TestVersion, int> Select_Temp = new Dictionary<TestVersion, int>()
{
{ TestVersion.Board_1K_FT, 4 },
{ TestVersion.Board_1K_CP, 4 },
@@ -401,15 +415,15 @@ namespace Testrong.User.Program
{6, TestVersion.Board_Ppmu_CP},
{7, TestVersion.KM_2 }
};
Dictionary<string, PpmuMode> ModesPmu = new Dictionary<string, PpmuMode>()
readonly Dictionary<string, PpmuMode> ModesPmu = new Dictionary<string, PpmuMode>()
{
{"FVMV",PpmuMode.FVMV},{"FVMI",PpmuMode.FVMI},{"FIMV",PpmuMode.FIMV}, {"FZMV",PpmuMode.FZMV}
};
Dictionary<string, DpsMode> ModesDps = new Dictionary<string, DpsMode>()
readonly Dictionary<string, DpsMode> ModesDps = new Dictionary<string, DpsMode>()
{
{"FVMV",DpsMode.FVMV},{"FVMI",DpsMode.FVMI},{"FIMV",DpsMode.FIMV}
};
Dictionary<string, PpmuIRange> RangesPmu = new Dictionary<string, PpmuIRange>()
readonly Dictionary<string, PpmuIRange> RangesPmu = new Dictionary<string, PpmuIRange>()
{
{"5uA", PpmuIRange._5uA},
{"20uA", PpmuIRange._20uA},
@@ -417,7 +431,7 @@ namespace Testrong.User.Program
{"2mA", PpmuIRange._2mA},
{"60mA", PpmuIRange._60mA},
};
Dictionary<string, DpsIRange> RangesDps = new Dictionary<string, DpsIRange>()
readonly Dictionary<string, DpsIRange> RangesDps = new Dictionary<string, DpsIRange>()
{
{"5uA", DpsIRange._5uA},
{"20uA", DpsIRange._20uA},
@@ -426,21 +440,21 @@ namespace Testrong.User.Program
{"60mA", DpsIRange._60mA},
{"1A", DpsIRange._1A}
};
Dictionary<string, double> DmmCurrRanges = new Dictionary<string, double>()
readonly Dictionary<string, double> DmmCurrRanges = new Dictionary<string, double>()
{
{"5uA",0.000005},{"20uA",0.00002},{"200uA",0.0002},{"2mA",0.002},{"60mA",0.06},{"1A",1 }
};
Dictionary<string, string> Rname = new Dictionary<string, string>()
readonly Dictionary<string, string> Rname = new Dictionary<string, string>()
{
{"R1","5uA"},{"R2","20uA"},{"R3","200uA"},{"R4","2mA"},{"R5","60mA"},{"R6","1A"}
};
Dictionary<string, double> FiRanges = new Dictionary<string, double>()
readonly Dictionary<string, double> FiRanges = new Dictionary<string, double>()
{
{"5uA",0.000005},{"20uA",0.000015},{"200uA",0.0001},{"2mA",0.001},{"60mA",0.03}
};
double[] rLimit = { 50, 120, 110, 1, 1, 1 };
double[] CurrScale = { -0.8, -0.5, 0, 0.5, 0.8 };
Dictionary<string, string> strRloadFvmi = new Dictionary<string, string>()
readonly double[] rLimit = { 50, 120, 110, 1, 1, 1 };
readonly double[] CurrScale = { -0.8, -0.5, 0, 0.5, 0.8 };
readonly Dictionary<string, string> strRloadFvmi = new Dictionary<string, string>()
{
{"5uA", "1M"},
{"20uA", "402K"},
@@ -449,7 +463,7 @@ namespace Testrong.User.Program
{"60mA", "150"},
{"1A", "10"},
};
Dictionary<string, ExtCaliLoad> Rcut_MIFI = new Dictionary<string, ExtCaliLoad>()
readonly Dictionary<string, ExtCaliLoad> Rcut_MIFI = new Dictionary<string, ExtCaliLoad>()
{
{"5uA", ExtCaliLoad.RC_RL13},
{"20uA", ExtCaliLoad.RC_RL12},
@@ -458,20 +472,23 @@ namespace Testrong.User.Program
{"60mA", ExtCaliLoad.RC_RL5},
{"1A", ExtCaliLoad.RC_RL3},
};
double VoltageInitialDefault = -7.5;
double VoltageStepDefault = 3.75;
double VoltageInitialDps1A = 1.5;
double VoltageStepDps1A = 0.75;
double VoltageInitialSet = -5;
double VoltageStepSet = 2.5;
double[] VoltageStep20uA = { 2.5, 2.5, 3.75, 3.75, 3.75 };
int SampliCount = 5;
List<TestInfoSet> TestInfo = new List<TestInfoSet>();
int port = 200;
string ksightConnStr = "GPIB1::22::INSTR";
TestVersion SelectTestVersion = Select_Version[Readjson(CONFIG_JSON_PATH).Version];
readonly double VoltageInitialDefault = -7.5;
readonly double VoltageStepDefault = 3.75;
readonly double VoltageInitialDps1A = 1.5;
readonly double VoltageStepDps1A = 0.75;
readonly double VoltageInitialSet = -5;
readonly double VoltageStepSet = 2.5;
readonly double[] VoltageStep20uA = { 2.5, 2.5, 3.75, 3.75, 3.75 };
readonly int SampliCount = 5;
readonly List<TestInfoSet> TestInfo = new List<TestInfoSet>();
readonly int port = 200;
readonly string ksightConnStr = "GPIB1::22::INSTR";
readonly TestVersion SelectTestVersion = Select_Version[Readjson(CONFIG_JSON_PATH).Version];
const int ChannelCount = 256;
double[] rInt = new double[ChannelCount];
readonly double[] rInt = new double[ChannelCount];
#endregion
#region
@@ -1677,9 +1694,6 @@ namespace Testrong.User.Program
//-----Read R File-----
double[,] ExtBoard_Res = ReadRext(EXT_CAL_INIT_PATH + "ExtBoardRes.csv");
extCaliHandle.SetPpmuExternalCalibration(extConnStr, extPort, 1, ExternalCalibrationMode.Channel, 1, ExtCaliVI.V, ExtCaliLoad.RC_RL7, 0); //1kΩ
double rload = GetRloadValue(dmm, 2000, 5);
@@ -2083,10 +2097,10 @@ namespace Testrong.User.Program
double ResValue = 0;
StreamWriter ResWriter = new StreamWriter(res_path, true, Encoding.UTF8);
ResWriter.AutoFlush = true;
string[] dpsPinName = { "DPS1" };
string[] pmuPinName = { "A01" };
DPS.Force(dpsPinName, 0, DpsMode.FZMV, DpsIRange._2mA, VRange.Normal);
PPMU.Force(pmuPinName, 0, PpmuMode.FZMV, PpmuIRange._2mA, VRange.Normal);
string[] alldpsPinName = DpsPinConfig.Select_DpsPin[testVersion];
string[] allpmuPinName = GetAllPmuPins();
DPS.Force(alldpsPinName, 0, DpsMode.FZMV, DpsIRange._2mA, VRange.Normal); //We Shall Force ALL DPS channel to Hi-Z
PPMU.Force(allpmuPinName, 0, PpmuMode.FZMV, PpmuIRange._2mA, VRange.Normal); //Just in case, Let's force ALL PMU Hi-Z
for (int i = 0; i < RLoad_Pmu_FV.Length; i++)
{
@@ -2160,16 +2174,7 @@ namespace Testrong.User.Program
{ TestVersion.Board_Ppmu_FT, testChannelDps_1K },
{ TestVersion.KM_2, testChannelDps_2K }
};
Dictionary<TestVersion, string[]> Select_DpsPin = new Dictionary<TestVersion, string[]>()
{
{ TestVersion.Board_1K_FT, allDpsPinNames_1K },
{ TestVersion.Board_1K_CP, allDpsPinNames_1K },
{ TestVersion.Board_2K_FT, allDpsPinNames_2K },
{ TestVersion.Board_2K_CP, allDpsPinNames_2K },
{ TestVersion.Board_Ppmu_CP, allDpsPinNames_1K },
{ TestVersion.Board_Ppmu_FT, allDpsPinNames_1K },
{ TestVersion.KM_2, allDpsPinNames_2K}
};
List<int> ChannelDps = new List<int>();
@@ -2756,7 +2761,7 @@ namespace Testrong.User.Program
else if (Type == "DPS")
{
string[] DpsPinName = { ("DPS" + ListChannels[loopk]) };
string[] allDpsPinNames = Select_DpsPin[testVersion];
string[] allDpsPinNames = DpsPinConfig.Select_DpsPin[testVersion];
double ForceVoltage = (RangesDps[Range] == DpsIRange._1A) ? VoltageInitialDps1A : VoltageInitialDefault;//1A for range
double VoltageStep = (RangesDps[Range] == DpsIRange._1A) ? VoltageStepDps1A : VoltageStepDefault;
if (ModesDps[Mode] == DpsMode.FVMI)
@@ -2806,7 +2811,16 @@ namespace Testrong.User.Program
List<SiteInfo> siList = DPS.Measure(DpsPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FVMV"), testParaSet_dps_fvmv[Range].avgTimes, testParaSet_dps_fvmv[Range].samDelay);
double chResult = GetATEChannelMeasure(siList, DpsPinName);
double[] readTemp = DPS.ReadTemperature();
double chTemp = readTemp[GetDPSTempSensorIndex(ch)];
int TempIndex = GetDPSTempSensorIndex(ch);
double chTemp;
if (TempIndex > readTemp.Length + 1)
{
chTemp = -65535;
}
else
{
chTemp = readTemp[TempIndex];
}
TempValue[p] = chTemp;
ForceValue[p] = ForceVoltage;
AteMeasure[p] = chResult;
@@ -2836,7 +2850,16 @@ namespace Testrong.User.Program
List<SiteInfo> siList = DPS.Measure(DpsPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FVMI"), testParaSet_dps_fvmi[Range].avgTimes, testParaSet_dps_fvmi[Range].samDelay);
double chResult = GetATEChannelMeasure(siList, DpsPinName);
double[] readTemp = DPS.ReadTemperature();
double chTemp = readTemp[GetDPSTempSensorIndex(ch)];
int TempIndex = GetDPSTempSensorIndex(ch);
double chTemp;
if (TempIndex > readTemp.Length + 1)
{
chTemp = -65535;
}
else
{
chTemp = readTemp[TempIndex];
}
TempValue[p] = chTemp;
ForceValue[p] = CurrValue;
AteMeasure[p] = chResult;
@@ -2875,7 +2898,16 @@ namespace Testrong.User.Program
List<SiteInfo> siList = DPS.Measure(DpsPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FVMI"), testParaSet_dps_fvmi[Range].avgTimes, testParaSet_dps_fvmi[Range].samDelay);
double chResult = GetATEChannelMeasure(siList, DpsPinName);
double[] readTemp = DPS.ReadTemperature();
double chTemp = readTemp[GetDPSTempSensorIndex(ch)];
int TempIndex = GetDPSTempSensorIndex(ch);
double chTemp;
if (TempIndex > readTemp.Length + 1)
{
chTemp = -65535;
}
else
{
chTemp = readTemp[TempIndex];
}
TempValue[p] = chTemp;
ForceValue[p] = CurrValue;
AteMeasure[p] = chResult;
@@ -2932,7 +2964,16 @@ namespace Testrong.User.Program
List<SiteInfo> siList = DPS.Measure(DpsPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FIMV"), testParaSet_dps_fimv[Range].avgTimes, testParaSet_dps_fimv[Range].samDelay);
double chResult = GetATEChannelMeasure(siList, DpsPinName);
double[] readTemp = DPS.ReadTemperature();
double chTemp = readTemp[GetDPSTempSensorIndex(ch)];
int TempIndex = GetDPSTempSensorIndex(ch);
double chTemp;
if (TempIndex > readTemp.Length + 1)
{
chTemp = -65535;
}
else
{
chTemp = readTemp[TempIndex];
}
TempValue[p] = chTemp;
ForceValue[p] = ForceCurrent;
AteMeasure[p] = chResult / Convert.ToDouble(RlDpsFi[Range]);