diff --git a/.vs/Testrong.User.Program/v17/.suo b/.vs/Testrong.User.Program/v17/.suo
index b73b05a..8dfa707 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 b1ab8e0..f3b3e51 100644
--- a/.vs/Testrong.User.Program/v17/DocumentLayout.backup.json
+++ b/.vs/Testrong.User.Program/v17/DocumentLayout.backup.json
@@ -5,13 +5,6 @@
{
"AbsoluteMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|d:\\work\\manlin\\verify\\userprogram_time\\testrong.user.program\\userprogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|solutionrelative:testrong.user.program\\userprogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\ProgramData\\Testrong\\ATE_Tester\\setting\\NLog.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|D:\\WORK\\ManLin\\Verify\\UserProgram_time\\testrong.user.program\\keysight53220a.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|solutionrelative:testrong.user.program\\keysight53220a.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
@@ -21,34 +14,12 @@
"DocumentGroups": [
{
"DockedWidth": 200,
- "SelectedChildIndex": 3,
+ "SelectedChildIndex": 1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
- {
- "$type": "Document",
- "DocumentIndex": 1,
- "Title": "NLog.config",
- "DocumentMoniker": "C:\\ProgramData\\Testrong\\ATE_Tester\\setting\\NLog.config",
- "ToolTip": "C:\\ProgramData\\Testrong\\ATE_Tester\\setting\\NLog.config",
- "ViewState": "AQIAADgAAAAAzszMzMwgwE8AAAAjAAAA",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|",
- "WhenOpened": "2024-07-10T10:20:55.074Z"
- },
- {
- "$type": "Document",
- "DocumentIndex": 2,
- "Title": "Keysight53220A.cs",
- "DocumentMoniker": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\Keysight53220A.cs",
- "RelativeDocumentMoniker": "Testrong.User.Program\\Keysight53220A.cs",
- "ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\Keysight53220A.cs",
- "RelativeToolTip": "Testrong.User.Program\\Keysight53220A.cs",
- "ViewState": "AQIAAHMAAAAAAAAAAAAYwKkAAAAiAAAA",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2024-06-18T12:27:43.62Z"
- },
{
"$type": "Document",
"DocumentIndex": 0,
@@ -57,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": "AgIAALsEAAAAAAAAAAAQwNAEAAA6AAAAAAAAAA==",
+ "ViewState": "AgIAAEEEAAAAAAAAAAAIwGAEAAAdAAAAAAAAAA==",
"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 494c4f9..e613d52 100644
--- a/.vs/Testrong.User.Program/v17/DocumentLayout.json
+++ b/.vs/Testrong.User.Program/v17/DocumentLayout.json
@@ -5,13 +5,6 @@
{
"AbsoluteMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|d:\\work\\manlin\\verify\\userprogram_time\\testrong.user.program\\userprogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|solutionrelative:testrong.user.program\\userprogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\ProgramData\\Testrong\\ATE_Tester\\setting\\NLog.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|D:\\WORK\\ManLin\\Verify\\UserProgram_time\\testrong.user.program\\keysight53220a.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|solutionrelative:testrong.user.program\\keysight53220a.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
@@ -21,43 +14,21 @@
"DocumentGroups": [
{
"DockedWidth": 200,
- "SelectedChildIndex": 3,
+ "SelectedChildIndex": 1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
- {
- "$type": "Document",
- "DocumentIndex": 1,
- "Title": "NLog.config",
- "DocumentMoniker": "C:\\ProgramData\\Testrong\\ATE_Tester\\setting\\NLog.config",
- "ToolTip": "C:\\ProgramData\\Testrong\\ATE_Tester\\setting\\NLog.config",
- "ViewState": "AQIAADgAAAAAzszMzMwgwE8AAAAjAAAA",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|",
- "WhenOpened": "2024-07-10T10:20:55.074Z"
- },
- {
- "$type": "Document",
- "DocumentIndex": 2,
- "Title": "Keysight53220A.cs",
- "DocumentMoniker": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\Keysight53220A.cs",
- "RelativeDocumentMoniker": "Testrong.User.Program\\Keysight53220A.cs",
- "ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\Keysight53220A.cs",
- "RelativeToolTip": "Testrong.User.Program\\Keysight53220A.cs",
- "ViewState": "AQIAAHMAAAAAAAAAAAAYwKkAAAAiAAAA",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2024-06-18T12:27:43.62Z"
- },
{
"$type": "Document",
"DocumentIndex": 0,
"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": "AgIAAEsGAAAAAAAAAAAowFcGAAAAAAAAAAAAAA==",
+ "ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs",
+ "RelativeToolTip": "Testrong.User.Program\\UserProgram.cs",
+ "ViewState": "AgIAAMwDAAAAAAAAAAAmwOoDAAAyAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-18T12:27:43.78Z",
"EditorCaption": ""
diff --git a/Testrong.User.Program.sln b/Testrong.User.Program.sln
index e1297b6..3264741 100644
--- a/Testrong.User.Program.sln
+++ b/Testrong.User.Program.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30320.27
+# Visual Studio Version 17
+VisualStudioVersion = 17.13.35806.99 d17.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testrong.User.Program", "Testrong.User.Program\Testrong.User.Program.csproj", "{E96B1A19-D109-4F67-B1AA-5BF15E580D77}"
EndProject
diff --git a/Testrong.User.Program/Keysight53220A.cs b/Testrong.User.Program/Keysight53220A.cs
index b73ebe6..3afa9e1 100644
--- a/Testrong.User.Program/Keysight53220A.cs
+++ b/Testrong.User.Program/Keysight53220A.cs
@@ -11,8 +11,14 @@ using Testrong.User.Program;
namespace Testrong.User.Program
{
+ ///
+ /// Keysight53220A Related
+ ///
public class Keysight53220A
{
+ ///
+ /// Global variables
+ ///
public class Globals
{
public static int videfaultRM;
@@ -24,14 +30,22 @@ namespace Testrong.User.Program
public static bool connected;
}
+ ///
+ /// KeysightMeasMode
+ ///
public enum KeysightMeasMode
{
FREQ,
INIT
}
- // KeysightMeasMode PresentMode;
+ ///
+ /// Initial DMM
+ ///
+ /// DMM USB ADDR
+ /// KeysightMeasMode
+ /// true if connected, false if not
public bool InitDMM53220A(string address, KeysightMeasMode funcMode)
{
try
@@ -73,7 +87,11 @@ namespace Testrong.User.Program
return false;
}
}
-
+ ///
+ /// Get DMM Measured Data
+ ///
+ /// count
+ /// ReturnReadings()
public double GetDmm53220AMeasureData(int count = 1)
{
if (!Globals.connected)
@@ -85,8 +103,12 @@ namespace Testrong.User.Program
}
- //bool GlobalSetup = false;
+ ///
+ /// Setup DMM
+ ///
+ /// KeysightMeasMode
+ /// SendCmd(text) if Success, false if Failed
private bool Setup(KeysightMeasMode funcMode)
{
try
@@ -96,47 +118,27 @@ namespace Testrong.User.Program
text += "*CLS\n";
text += "STAT:PRES\n";
text += "CONF:FREQ\n";
- //switch (funcMode)
- //{
- // case KeysightMeasMode.FREQ:
- // {
- // //text += "TRIG:COUN 1\n";
- // //text += "SAMP:COUN 10\n";
- // //text += "INIT\n";
- // }
- // break;
- // default:
- // {
- // return false;
- // }
- //}
text += "INP:COUP DC\n";
- //text += "INP:NREJ ON\n";
text += "INP:LEV 2\n";
text += "INP:SLOP NEG\n";
- //text += "INP:LEV 10\n";
text += "SYST:BEEP:STAT OFF\n";
text += "FREQ:GATE:SOUR TIME\n";
text += "FREQ:GATE:TIME .0001\n";
text += "TRIG:SOUR BUS\n";
text += "TRIG:COUN 100000\n";
text += "SAMP:COUN 1\n";
- //text += "INP:LEV:AUTO ON\n";
-
- //text += "SAMP:COUN 2\n";
- //text += "TRIG:DEL .01\n";
text += "INIT\n";
- //GlobalSetup = true;
- //PresentMode = funcMode;
return SendCmd(text);
}
catch (Exception)
{
return false;
}
- //return true;
}
-
+ ///
+ /// Return DMM Readings
+ ///
+ ///
private double ReturnReadings()
{
string text = "";
@@ -182,6 +184,11 @@ namespace Testrong.User.Program
}
}
+ ///
+ /// Send CMD to DMM
+ ///
+ /// CMD String
+ ///
private bool SendCmd(string Cmds)
{
try
@@ -200,12 +207,20 @@ namespace Testrong.User.Program
}
}
+ ///
+ /// Close DMM Connection
+ ///
+ /// true
public bool CloseDMM53220A()
{
Globals.errorStatus = visa32.viClose(Globals.vi);
return true;
}
+ ///
+ ///
+ ///
+ ///
private string GetData()
{
StringBuilder stringBuilder = new StringBuilder(2048);
diff --git a/Testrong.User.Program/Testrong.User.Program.csproj b/Testrong.User.Program/Testrong.User.Program.csproj
index 8d0612f..e337d08 100644
--- a/Testrong.User.Program/Testrong.User.Program.csproj
+++ b/Testrong.User.Program/Testrong.User.Program.csproj
@@ -22,6 +22,8 @@
7.3
prompt
MinimumRecommendedRules.ruleset
+ bin\x64\Debug\UserProgram.xml
+ true
bin\x64\Release\
diff --git a/Testrong.User.Program/UserProgram.cs b/Testrong.User.Program/UserProgram.cs
index 4b9d976..140d048 100644
--- a/Testrong.User.Program/UserProgram.cs
+++ b/Testrong.User.Program/UserProgram.cs
@@ -4,7 +4,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Runtime.Remoting.Contexts;
using System.Text;
using System.Threading;
using Testrong.Core.Common;
@@ -17,11 +16,13 @@ using Testrong.Core.Model.Ppmu;
using Testrong.Core.Model.Relay;
using Testrong.Core.Primitives;
using Testrong.Core.Primitives.Extend;
-using Testrong.Core.Primitives.Service.AcTiming;
using Testrong.Core.Primitives.TestrongSystem;
namespace Testrong.User.Program
{
+ ///
+ /// ALL BOARDS
+ ///
public enum TestVersion
{
Board_1K_FT,
@@ -32,6 +33,9 @@ namespace Testrong.User.Program
Board_Ppmu_FT,
KM_2
}
+ ///
+ /// Test Parameters
+ ///
public class TestParaSet
{
public int delayMs;
@@ -325,7 +329,7 @@ namespace Testrong.User.Program
};
#endregion
- #region 其他参数
+ #region Variables Definition
List testRangesPmu = new List { "5uA", "20uA", "200uA", "2mA", "60mA" };
List testRangesDps = new List { "5uA", "20uA", "200uA", "2mA", "60mA", "1A" };
string[] FreqStr_Test = { "1M", "2M", "2.5M", "5M", "10M" };
@@ -466,10 +470,17 @@ namespace Testrong.User.Program
int port = 200;
string ksightConnStr = "GPIB1::22::INSTR";
TestVersion SelectTestVersion = Select_Version[Readjson(CONFIG_JSON_PATH).Version];
+ const int ChannelCount = 256;
+ double[] rInt = new double[ChannelCount];
#endregion
#region 函数定义
+ ///
+ /// Read JSON From json_path
+ ///
+ /// The Path of JSON
+ /// Json TYPE
public static Json Readjson(string json_path)
{
Json get = new Json();
@@ -481,22 +492,23 @@ namespace Testrong.User.Program
return get;
}
-
- /* ----------Metadata_handler-------------
- * StreamWriter swdata: File Handler, Should be Initialized ahead,
- * int SlotNum: Current Slot Number,
- * List slotList: Slot List,
- * string arm_dna: DNA Data from Zynq,
- * IFlowRunnerContext context: info from ATE Software,
- * bool init_Flag: choose from Header to Body| True=Header/False=Body,
- * string Type:[OPTIONAL] Only need if init_Flag == False, Channel Type, Possible Value="PMU","DPS", "NULL"(Default),
- * int Channel:[OPTIONAL] Only need if init_Flag == False, Channel Number, Default = -1,
- * string Mode:[OPTIONAL] Only need if init_Flag == False, Test Mode, Possible Value="FVMV","FVMI","FIMV","FIMI","FZMV"(PMU Only), "NULL"(Default),
- * string Rload:[OPTIONAL] Only need if init_Flag == False,Resistance Load, Default = "NaN",
- * string Range:[OPTIONAL] Only need if init_Flag == False,Range, Possible Value="5uA", "20uA", "200uA", "2mA", "60mA", "1A"(DPS Only), Default = "N/A",
- * string filepath:[OPTIONAL] Only need if init_Flag == False, CSV File Path, Default = "N/A",
- * string filetime:[OPTIONAL] Only need if init_Flag == False, CSV File Creation Time, Default = "N/A"
- */
+ ///
+ /// Metadata_handler, Write metadata.csv
+ /// Also Prevents thread conflict
+ ///
+ /// File Handler, Should be Initialized ahead,
+ /// Current Slot Number,
+ /// Slot List,
+ /// DNA Data from Zynq,
+ /// info from ATE Software,
+ /// choose from Header to Body| True=Header/False=Body,
+ /// [OPTIONAL] Only need if init_Flag == False, Channel Type, Possible Value="PMU","DPS", "NULL"(Default),
+ /// [OPTIONAL] Only need if init_Flag == False, Channel Number, Default = -1,
+ /// [OPTIONAL] Only need if init_Flag == False, Test Mode, Possible Value="FVMV","FVMI","FIMV","FIMI","FZMV"(PMU Only), "NULL"(Default),
+ /// [OPTIONAL] Only need if init_Flag == False,Resistance Load, Default = "NaN",
+ /// [OPTIONAL] Only need if init_Flag == False,Range, Possible Value="5uA", "20uA", "200uA", "2mA", "60mA", "1A"(DPS Only), Default = "N/A",
+ /// [OPTIONAL] Only need if init_Flag == False, CSV File Path, Default = "N/A",
+ /// [OPTIONAL] Only need if init_Flag == False, CSV File Creation Time, Default = "N/A"
public void Metadata_handler(StreamWriter swdata, int SlotNum, List slotList, string arm_dna, IFlowRunnerContext context, bool init_Flag, string Type = "NULL", int Channel = -1, string Mode = "NULL", string Rload = "NaN", string Range = "N/A", string filepath = "N/A", string filetime = "N/A")
{
//Are We Writing the header of MetaData?
@@ -584,12 +596,13 @@ namespace Testrong.User.Program
}
}
- /* ----------File_Mover-------------
- * int SlotNum: Current Slot Number,
- * List slotList: Slot List,
- * string pathFlag: Path Selector, Possible Value="Freq","CAL_Single"(No Pre/Post),"CAL_Normal",
- * bool isPreCheck:[OPTIONAL] Only need if pathFlag =="CAL_Normal",PreCheck Flag, Default = false
- */
+ ///
+ /// Move Folder to Bak/History
+ ///
+ /// Current Slot Number,
+ /// Slot List,
+ /// Path Selector, Possible Value="Freq","CAL_Single"(No Pre/Post),"CAL_Normal",
+ /// [OPTIONAL] Only need if pathFlag =="CAL_Normal",PreCheck Flag, Default = false
public void File_Mover(int SlotNum, List slotList, string pathFlag, bool isPreCheck = false)
{
string DateCode = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
@@ -655,18 +668,19 @@ namespace Testrong.User.Program
}
- /* ----------SlotThreadLocker-------------
- * int SlotNum: Current Slot Number,
- * List slotList: Slot List,
- * string pathFlag: Path Selector, Possible Value="Freq","CAL_Init","CAL","RINT","CAL_COM",
- */
+ ///
+ /// Prevent thread run at the same time
+ ///
+ /// Current Slot Number,
+ /// Slot List,
+ /// Path Selector, Possible Value="Freq","CAL_Init","CAL","RINT","CAL_COM",
public void SlotThreadLocker(int SlotNum, List slotList, string pathFlag)
{
string WritePath;
switch (pathFlag)
{
case "Freq":
- WritePath = EXT_CAL_FREQ_PATH;
+ WritePath = EXT_CAL_FREQ_PATH;
break;
case "CAL_Init":
WritePath = EXT_CAL_INIT_PATH;
@@ -678,7 +692,7 @@ namespace Testrong.User.Program
WritePath = CAL_COMPFILE_PATH;
break;
default:
- WritePath = EXT_CAL_PATH;
+ WritePath = EXT_CAL_PATH;
break;
}
if (SlotNum < slotList[slotList.Count - 1])
@@ -712,7 +726,7 @@ namespace Testrong.User.Program
private int GetDPSTempSensorIndex(int channel)
{
- return ((channel-1)/4);
+ return ((channel - 1) / 4);
}
public int GetFileSize(string path)
@@ -747,6 +761,10 @@ namespace Testrong.User.Program
}
}
}
+ ///
+ /// Delete Anything inside Folder
+ ///
+ ///
public void EmptyDir(string DirPath)
{
System.IO.DirectoryInfo di = new DirectoryInfo(DirPath);
@@ -765,6 +783,13 @@ namespace Testrong.User.Program
}
return ans;
}
+
+ ///
+ /// Get ATE Measure Result
+ ///
+ /// SiteInfo
+ /// PinName
+ /// double Measured Value
private double GetATEChannelMeasure(List InfoList, string[] PinName)
{
double result = 0;
@@ -784,6 +809,20 @@ namespace Testrong.User.Program
}
return result;
}
+
+ ///
+ /// Get Rload
+ /// Will Loop Measure 100 times,do average
+ /// And measure 101th
+ /// Then Compare the difference between them
+ /// if Out-Of-Limit
+ /// Will Try Again
+ /// For INIFINATE Times
+ ///
+ /// DMM Handler
+ /// DMM Measure Range
+ /// Resistance Diff limit
+ ///
private double GetRloadValue(KeysightDMM3458A rdmm, double range, double limit)
{
double value = 0;
@@ -927,90 +966,136 @@ namespace Testrong.User.Program
return DmmDic;
}
- /*----------Write Data To File-------------
- * Variable Definition
- * string filename: filename
- * int slot: Slot Number
- * string dna: DNA Number
- * string type: DPS/PMU
- * int channel: Channel Number(PMU:1-256, DPS:1-32/64)
- * string mode: FVMV/FVMI/FIMV/FZMV(PMU Only)
- * string rload: External Resistance Load
- * double[,] extR: Internal Resistance On the External Calibration Board
- * string range: Board Measurment Range(5uA; 20uA; 200uA; 2mA; 60mA; 1A(DPS Only))
- * double[] ForceValue: ForceValue
- * double[] AteMeasure: ATE Measure Value
- * double[] DmmMeasure: DMM Measure Value
- * double[] TempValue: Temperature Value(May Not Available)
- */
- public void WriteSingleFile(string filename, int slot, string dna, string type, int channel, string mode, string rload, double[,] extR, string range, double[] ForceValue, double[] AteMeasure, double[] DmmMeasure, double[] TempValue)
+ ///
+ /// Write Data To File, Need import StreamWriter and close FileHandler after using this func
+ ///
+ /// StreamWriter, Need to be initialized first
+ /// Slot Number
+ /// DNA Number
+ /// DPS/PMU
+ /// Channel Number(PMU:1-256, DPS:1-32/64)
+ /// FVMV/FVMI/FIMV/FZMV(PMU Only)
+ /// External Resistance Load
+ /// Internal Resistance On the External Calibration Board
+ /// Board Measurment Range(5uA; 20uA; 200uA; 2mA; 60mA; 1A(DPS Only))
+ /// ForceValue
+ /// ATE Measure Value
+ /// DMM Measure Value
+ /// Temperature Value(May Not Available)
+ /// [OPTIONAL] For custom CSV content
+ /// [OPTIONAL]
+ /// [OPTIONAL]
+ public void WriteSingleFile(StreamWriter sw, int slot, string dna, string type, int channel, string mode, string rload, double[,] extR, string range, double[] ForceValue, double[] AteMeasure, double[] DmmMeasure, double[] TempValue, string contextFormat = "Normal", double[] customData = null, int SampliCount = 5)
{
- StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8);
- sw.AutoFlush = true;
- sw.Write("Tester_Name,Foo\n");
- sw.Write($"Slot_No,{slot}\n");
- sw.Write($"Board_Dna,{dna}\n");
- sw.Write($"Channel_Type,{type}\n");
- sw.Write($"Channel_No,{channel}\n");
- sw.Write($"Mode,{mode}\n");
- sw.Write($"R_Load,{rload}\n");
- sw.Write($"R_Int,{0}\n");
- if (type == "PMU")
- {
- sw.Write($"R_Ext,{extR[channel - 1, slot - 1]}\n");
- }
- else
- {
- sw.Write($"R_Ext,{0}\n");
- }
- sw.Write($"I_Range,{range}\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");
- for (int writeLine = 0; writeLine < 5; writeLine++)
+ switch (contextFormat)
{
+ case "Freq":
+ sw.Write("Channel_No,Freq_Force,Freq_Measure\n");
+ for (int fCount = 0; fCount < SampliCount; fCount++) // 625K - 32M
+ {
+ for(int ch=0; ch
+ /// Reset Rint
+ /// Empty Local Rint Folder and Files
+ /// Put Initial Files into Zynq (Not only Rint,but also others)
+ ///
+ /// info from ATE Software
void Rint_Reset(IFlowRunnerContext context)
{
var slotInfos = context.FlowCatalog.GetAll();
@@ -1319,6 +1431,13 @@ namespace Testrong.User.Program
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Init");
}
+
+ ///
+ /// To Pre-Test Rint with External Calibration Board
+ /// Mainly get FVMV data to Calibrate ForceV
+ ///
+ /// info from ATE Software
+ ///
void Rint_FVMV_2mA_Pre(IFlowRunnerContext context, TestVersion testVersion)
{
List ChannelDps = new List();
@@ -1352,7 +1471,7 @@ namespace Testrong.User.Program
double[,] ExtBoard_Res = ReadRext(EXT_CAL_INIT_PATH + "ExtBoardRes.csv");
//Folder Related
- File_Mover(SlotNum:SlotNum,slotList:slotList,pathFlag:"CAL_Single");
+ File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
//-----Start Slot Number-----
StreamWriter swdata;
@@ -1383,10 +1502,6 @@ namespace Testrong.User.Program
string filename = EXT_CAL_PATH + filepath;
int ch = ChannelPmu[loopk];
- StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8)
- {
- AutoFlush = true
- };
double[] AteMeasure = new double[SampliCount];
double[] ForceValue = new double[SampliCount];
@@ -1402,11 +1517,11 @@ namespace Testrong.User.Program
for (int p = 0; p < SampliCount; p++)
{
PPMU.Force(PmuPinName, ForceVoltage, PpmuMode.FVMV, PpmuIRange._2mA, VRange.Normal);
-
+
Thread.Sleep(20);
List siList = PPMU.Measure(PmuPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FVMV"), 128, 100);
double chResult = GetATEChannelMeasure(siList, PmuPinName);
-
+
double dmmRead = dmm.GetDmmMeasureData(KeysightDMM3458A.KeysightMeasMode.VOLT, 1, 7.5);//dmm 3458A read
double[] readTemp = PPMU.ReadTemperature();
@@ -1422,40 +1537,40 @@ namespace Testrong.User.Program
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
- );
+ StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8)
+ {
+ AutoFlush = true
+ };
+ WriteSingleFile(sw: sw,
+ 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();
- Metadata_handler(
- swdata: swdata,
- SlotNum: SlotNum,
- slotList: slotList,
- arm_dna: arm_dna,
- context: context,
- init_Flag: false,
- Type: "PMU",
- Channel: ch,
- Mode: "FVMV",
- Rload: "Hi-Z",
- Range: "2mA",
- filepath: filepath,
- filetime: filetime
- );
+ Metadata_handler(swdata: swdata,
+ SlotNum: SlotNum,
+ slotList: slotList,
+ arm_dna: arm_dna,
+ context: context,
+ init_Flag: false,
+ Type: "PMU",
+ Channel: ch,
+ Mode: "FVMV",
+ Rload: "Hi-Z",
+ Range: "2mA",
+ filepath: filepath,
+ filetime: filetime);
}
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL");
@@ -1463,97 +1578,13 @@ namespace Testrong.User.Program
swdata.Close();
}
- void Rint_DataUpload(IFlowRunnerContext context)
- {
- var slotInfos = context.FlowCatalog.GetAll();
- List slotList = new List();
- for (int slotLen = 0; slotLen < slotInfos.Count; slotLen++)
- {
- if (slotInfos[slotLen].FirmwareVersion == "")
- {
- continue;
- }
- slotList.Add(slotInfos[slotLen].No);
- }
- byte[] armDnaPortCmd = new byte[2] { 14, 57 }; // command to read arm dna
- byte[] armDnaRaw = context.Communicator.Send(armDnaPortCmd); //send command
- armDnaRaw = armDnaRaw.Reverse().ToArray();
- string arm_dna = BitConverter.ToUInt64(armDnaRaw, 0).ToString(); //convert hex dna to decimal
- int SlotNum = context.Communicator.SlotNo;
- ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
- if (SlotNum == slotList[0])
- {
- DelayHelper.Sleep(1);
- }
- else
- {
- int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
- while (true)
- {
- Thread.Sleep(1000);
- if (File.Exists(RINT_COMPFILE_PATH + slotList[Cried - 1] + ".flag"))
- {
- File.Delete(RINT_COMPFILE_PATH + slotList[Cried - 1] + ".flag");
- break;
- }
- }
- }
-
- Thread.Sleep(10);
- var isDnaUploadOK = extCaliHandle.UploadFile(context.Communicator.ServerIP, RINT_COMPFILE_PATH + "DNA_" + context.Communicator.ServerIP + ".csv", FileType.dna);
- LogRawText($"Dna Status: {isDnaUploadOK}");
-
- Thread.Sleep(10);
- var isMVUploadOK = extCaliHandle.UploadFile(context.Communicator.ServerIP, RINT_COMPFILE_PATH + context.Communicator.ServerIP + "_MV.csv", FileType.mv);
- LogRawText($"MV Status: {isMVUploadOK}");
-
- SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "RINT");
- }
- void Pmur_Upload(IFlowRunnerContext context)
- {
- var slotInfos = context.FlowCatalog.GetAll();
- List slotList = new List();
- for (int slotLen = 0; slotLen < slotInfos.Count; slotLen++)
- {
- if (slotInfos[slotLen].FirmwareVersion == "")
- {
- continue;
- }
- slotList.Add(slotInfos[slotLen].No);
- }
- byte[] armDnaPortCmd = new byte[2] { 14, 57 }; // command to read arm dna
- byte[] armDnaRaw = context.Communicator.Send(armDnaPortCmd); //send command
- armDnaRaw = armDnaRaw.Reverse().ToArray();
- string arm_dna = BitConverter.ToUInt64(armDnaRaw, 0).ToString(); //convert hex dna to decimal
- int SlotNum = context.Communicator.SlotNo;
- ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
- if (SlotNum == slotList[0])
- {
- DelayHelper.Sleep(1);
- }
- else
- {
- int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
- while (true)
- {
- Thread.Sleep(1000);
- if (File.Exists(RINT_FILE_PATH + slotList[Cried - 1] + ".flag"))
- {
- File.Delete(RINT_FILE_PATH + slotList[Cried - 1] + ".flag");
- break;
- }
- }
- }
- Thread.Sleep(10);
- var isPmurUploadOK = extCaliHandle.UploadFile(context.Communicator.ServerIP, RINT_FILE_PATH + context.Communicator.ServerIP + "_Pmur.txt", FileType.pmu_r);
- LogRawText($"Pmur Status: {isPmurUploadOK}");
- if (SlotNum < slotList[slotList.Count - 1])
- {
- StreamWriter swSignal = new StreamWriter(RINT_FILE_PATH + SlotNum + ".flag");
- swSignal.Flush();
- swSignal.Close();
- }
- }
+ ///
+ /// Post-Test Rint with External Calibration Board
+ /// Do FVMV Second time with MV Compensate
+ /// Calculate Rint value and generate Pmu_r file
+ ///
+ /// info from ATE Software
+ ///
void Rint_FVMV_2mA_Post(IFlowRunnerContext context, TestVersion testVersion)
{
List ChannelDps = new List();
@@ -1592,8 +1623,8 @@ namespace Testrong.User.Program
double[,] ExtBoard_Res = ReadRext(EXT_CAL_INIT_PATH + "ExtBoardRes.csv");
//-----Move File To History-----
- File_Mover(SlotNum:SlotNum,slotList:slotList,pathFlag:"CAL_Single");
-
+ File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
+
//-----Start Slot Number-----
StreamWriter swdata;
swdata = new StreamWriter(METADATA_PATH, true, Encoding.UTF8)
@@ -1606,7 +1637,7 @@ namespace Testrong.User.Program
slotList: slotList,
arm_dna: arm_dna,
context: context,
- init_Flag:true
+ init_Flag: true
);
dmm.InitDMM(ksightConnStr);
@@ -1628,10 +1659,7 @@ 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;
- 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)
@@ -1641,11 +1669,11 @@ namespace Testrong.User.Program
for (int p = 0; p < SampliCount; p++)
{
PPMU.Force(PmuPinName, ForceVoltage, PpmuMode.FVMV, PpmuIRange._2mA, VRange.Normal);
-
+
Thread.Sleep(20);
List siList = PPMU.Measure(PmuPinName, true, context.BinHandler.GetBinningByTestSuite("ExtCalibration_FVMV"), 128, 100);
double chResult = GetATEChannelMeasure(siList, PmuPinName);
-
+
double dmmRead = dmm.GetDmmMeasureData(KeysightDMM3458A.KeysightMeasMode.VOLT, 1, 7.5);
double[] readTemp = PPMU.ReadTemperature();
@@ -1659,40 +1687,41 @@ namespace Testrong.User.Program
}
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
- );
+ StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8)
+ {
+ AutoFlush = true
+ };
+ WriteSingleFile(sw: sw,
+ 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();
- Metadata_handler(
- swdata: swdata,
- SlotNum: SlotNum,
- slotList: slotList,
- arm_dna: arm_dna,
- context: context,
- init_Flag: false,
- Type: "PMU",
- Channel: ch,
- Mode: "FVMV",
- Rload: rload.ToString(),
- Range: "2mA",
- filepath: filepath,
- filetime: filetime
- );
+ Metadata_handler(swdata: swdata,
+ SlotNum: SlotNum,
+ slotList: slotList,
+ arm_dna: arm_dna,
+ context: context,
+ init_Flag: false,
+ Type: "PMU",
+ Channel: ch,
+ Mode: "FVMV",
+ Rload: rload.ToString(),
+ Range: "2mA",
+ filepath: filepath,
+ filetime: filetime);
+
}
swdata.Flush();
swdata.Close();
@@ -1760,6 +1789,7 @@ namespace Testrong.User.Program
ChannelFormat = Convert.ToString(ChannelNum);
}
Pmur.WriteLine($"ch {ChannelFormat} : {res:F3}");
+ rInt[ChannelNum] = res; //Put R_Int into array
datassingle.Clear();
singlefile.Close();
}
@@ -1769,6 +1799,112 @@ namespace Testrong.User.Program
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL");
#endregion
}
+
+ ///
+ /// Use TFTP to upload DNA/MV file into Zynq
+ ///
+ /// info from ATE Software
+ void Rint_DataUpload(IFlowRunnerContext context)
+ {
+ var slotInfos = context.FlowCatalog.GetAll();
+ List slotList = new List();
+ for (int slotLen = 0; slotLen < slotInfos.Count; slotLen++)
+ {
+ if (slotInfos[slotLen].FirmwareVersion == "")
+ {
+ continue;
+ }
+ slotList.Add(slotInfos[slotLen].No);
+ }
+ byte[] armDnaPortCmd = new byte[2] { 14, 57 }; // command to read arm dna
+ byte[] armDnaRaw = context.Communicator.Send(armDnaPortCmd); //send command
+ armDnaRaw = armDnaRaw.Reverse().ToArray();
+ string arm_dna = BitConverter.ToUInt64(armDnaRaw, 0).ToString(); //convert hex dna to decimal
+ int SlotNum = context.Communicator.SlotNo;
+ ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
+ if (SlotNum == slotList[0])
+ {
+ DelayHelper.Sleep(1);
+ }
+ else
+ {
+ int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
+ while (true)
+ {
+ Thread.Sleep(1000);
+ if (File.Exists(RINT_COMPFILE_PATH + slotList[Cried - 1] + ".flag"))
+ {
+ File.Delete(RINT_COMPFILE_PATH + slotList[Cried - 1] + ".flag");
+ break;
+ }
+ }
+ }
+
+ Thread.Sleep(10);
+ var isDnaUploadOK = extCaliHandle.UploadFile(context.Communicator.ServerIP, RINT_COMPFILE_PATH + "DNA_" + context.Communicator.ServerIP + ".csv", FileType.dna);
+ LogRawText($"Dna Status: {isDnaUploadOK}");
+
+ Thread.Sleep(10);
+ var isMVUploadOK = extCaliHandle.UploadFile(context.Communicator.ServerIP, RINT_COMPFILE_PATH + context.Communicator.ServerIP + "_MV.csv", FileType.mv);
+ LogRawText($"MV Status: {isMVUploadOK}");
+
+ SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "RINT");
+ }
+
+ ///
+ /// Use TFTP to upload PMU_R(Rint) file into Zynq
+ ///
+ /// info from ATE Software
+ void Pmur_Upload(IFlowRunnerContext context)
+ {
+ var slotInfos = context.FlowCatalog.GetAll();
+ List slotList = new List();
+ for (int slotLen = 0; slotLen < slotInfos.Count; slotLen++)
+ {
+ if (slotInfos[slotLen].FirmwareVersion == "")
+ {
+ continue;
+ }
+ slotList.Add(slotInfos[slotLen].No);
+ }
+ byte[] armDnaPortCmd = new byte[2] { 14, 57 }; // command to read arm dna
+ byte[] armDnaRaw = context.Communicator.Send(armDnaPortCmd); //send command
+ armDnaRaw = armDnaRaw.Reverse().ToArray();
+ string arm_dna = BitConverter.ToUInt64(armDnaRaw, 0).ToString(); //convert hex dna to decimal
+ int SlotNum = context.Communicator.SlotNo;
+ ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
+ if (SlotNum == slotList[0])
+ {
+ DelayHelper.Sleep(1);
+ }
+ else
+ {
+ int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
+ while (true)
+ {
+ Thread.Sleep(1000);
+ if (File.Exists(RINT_FILE_PATH + slotList[Cried - 1] + ".flag"))
+ {
+ File.Delete(RINT_FILE_PATH + slotList[Cried - 1] + ".flag");
+ break;
+ }
+ }
+ }
+ Thread.Sleep(10);
+ var isPmurUploadOK = extCaliHandle.UploadFile(context.Communicator.ServerIP, RINT_FILE_PATH + context.Communicator.ServerIP + "_Pmur.txt", FileType.pmu_r);
+ LogRawText($"Pmur Status: {isPmurUploadOK}");
+ if (SlotNum < slotList[slotList.Count - 1])
+ {
+ StreamWriter swSignal = new StreamWriter(RINT_FILE_PATH + SlotNum + ".flag");
+ swSignal.Flush();
+ swSignal.Close();
+ }
+ }
+
+ ///
+ /// Put Initial Files into Zynq (MV MI DNA)
+ ///
+ /// info from ATE Software
void ExternalCalibrationReset(IFlowRunnerContext context)
{
var slotInfos = context.FlowCatalog.GetAll();
@@ -1819,6 +1955,14 @@ namespace Testrong.User.Program
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Init");
}
+
+ ///
+ /// Get External Calibration Board's Resistance Value
+ /// Will Call GetRloadValue(),
+ /// Will get R Value for each different Type and Mode
+ ///
+ /// info from ATE Software
+ ///
void DmmGetResValue(IFlowRunnerContext context, TestVersion testVersion)
{
//config DMM3458A
@@ -1925,6 +2069,15 @@ namespace Testrong.User.Program
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Init");
}
+
+
+ ///
+ /// Main Function to Do External Instrument Calibration
+ ///
+ /// info from ATE Software
+ ///
+ /// Flag for first test or retest
+ /// Flag for Precheck/Postcheck
void ExternalCalibrationCollect(IFlowRunnerContext context, TestVersion testVersion, bool isFirstTest, bool isPreCheck)
{
#region Read JSON
@@ -2164,7 +2317,7 @@ namespace Testrong.User.Program
#region File/Folder Prepartion
//-----Move File To History-----
- File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Normal",isPreCheck:isPreCheck);
+ File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Normal", isPreCheck: isPreCheck);
//-----Start Slot Number-----
// Write MetaData.csv Header
@@ -2209,7 +2362,7 @@ namespace Testrong.User.Program
Dictionary AteMeasureDir = new Dictionary();
Dictionary ForceValueDir = new Dictionary();
Dictionary DmmMeasureDir = new Dictionary();
- Dictionary TempValueDir = new Dictionary();
+ Dictionary TempValueDir = new Dictionary();
List testCh = new List();
@@ -2373,7 +2526,7 @@ namespace Testrong.User.Program
{
ForceVoltage = VoltageInitialSet;
}
- }
+ }
switch (Info[loopi].Mode)
{
case "FVMV":
@@ -2721,7 +2874,7 @@ namespace Testrong.User.Program
testCh.Add(ch);
}
}
-
+
//Read Back Value From DMM
int DataCount = testCh.Count * SampliCount;
@@ -2740,40 +2893,45 @@ namespace Testrong.User.Program
string filepath = "Slot" + SlotNum + "_PMU_" + "ch" + ch + "_" + Mode + "_" + Rload + "_" + Range + ".csv";
string filename = EXT_CAL_PATH + filepath;
string filetime = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
- WriteSingleFile(
- filename: filename,
- slot: SlotNum,
- dna: arm_dna,
- type: Type,
- channel: ch,
- mode: Mode,
- rload: rl,
- extR: ExtBoard_Res,
- range: Range,
- ForceValue: ForceValueDir[ch],
- AteMeasure: AteMeasureDir[ch],
- DmmMeasure: DmmMeasureDir[ch],
- TempValue: TempValueDir[ch]
- );
- Metadata_handler(
- swdata: swdata,
- SlotNum: SlotNum,
- slotList: slotList,
- arm_dna: arm_dna,
- context: context,
- init_Flag: false,
- Type: Type,
- Channel: ch,
- Mode: Mode,
- Rload: rl,
- Range: Range,
- filepath: filepath,
- filetime: filetime
- );
+ StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8)
+ {
+ AutoFlush = true
+ };
+
+ WriteSingleFile(sw: sw,
+ slot: SlotNum,
+ dna: arm_dna,
+ type: Type,
+ channel: ch,
+ mode: Mode,
+ rload: rl,
+ extR: ExtBoard_Res,
+ range: Range,
+ ForceValue: ForceValueDir[ch],
+ AteMeasure: AteMeasureDir[ch],
+ DmmMeasure: DmmMeasureDir[ch],
+ TempValue: TempValueDir[ch]);
+
+ sw.Flush();
+ sw.Close();
+
+ Metadata_handler(swdata: swdata,
+ SlotNum: SlotNum,
+ slotList: slotList,
+ arm_dna: arm_dna,
+ context: context,
+ init_Flag: false,
+ Type: Type,
+ Channel: ch,
+ Mode: Mode,
+ Rload: rl,
+ Range: Range,
+ filepath: filepath,
+ filetime: filetime);
}
}
- else if(Type == "DPS")
+ else if (Type == "DPS")
{
for (int writeNum = 0; writeNum < testCh.Count; writeNum++)
{
@@ -2784,37 +2942,42 @@ namespace Testrong.User.Program
double[,] ZeroExtR = {
{ 0.0 , 0.0 , 0.0}
};
- WriteSingleFile(
- filename: filename,
- slot: SlotNum,
- dna: arm_dna,
- type: Info[loopi].chType,
- channel: ch,
- mode: Mode,
- rload: rl,
- extR: ZeroExtR,
- range: Range,
- ForceValue: ForceValueDir[ch],
- AteMeasure: AteMeasureDir[ch],
- DmmMeasure: DmmMeasureDir[ch],
- TempValue: TempValueDir[ch]
- );
- Metadata_handler(
- swdata: swdata,
- SlotNum: SlotNum,
- slotList: slotList,
- arm_dna: arm_dna,
- context: context,
- init_Flag: false,
- Type: Type,
- Channel: ch,
- Mode: Mode,
- Rload: rl,
- Range: Range,
- filepath: filepath,
- filetime: filetime
- );
+ StreamWriter sw = new StreamWriter(filename, true, Encoding.UTF8)
+ {
+ AutoFlush = true
+ };
+
+ WriteSingleFile(sw: sw,
+ slot: SlotNum,
+ dna: arm_dna,
+ type: Info[loopi].chType,
+ channel: ch,
+ mode: Mode,
+ rload: rl,
+ extR: ZeroExtR,
+ range: Range,
+ ForceValue: ForceValueDir[ch],
+ AteMeasure: AteMeasureDir[ch],
+ DmmMeasure: DmmMeasureDir[ch],
+ TempValue: TempValueDir[ch]);
+
+ sw.Flush();
+ sw.Close();
+
+ Metadata_handler(swdata: swdata,
+ SlotNum: SlotNum,
+ slotList: slotList,
+ arm_dna: arm_dna,
+ context: context,
+ init_Flag: false,
+ Type: Type,
+ Channel: ch,
+ Mode: Mode,
+ Rload: rl,
+ Range: Range,
+ filepath: filepath,
+ filetime: filetime);
}
}
#endregion
@@ -2832,6 +2995,10 @@ namespace Testrong.User.Program
}
+ ///
+ /// Use TFTP to upload DNA/MV/MI file into Zynq
+ ///
+ /// info from ATE Software
void ExternalCalibrationWriteCalFiles(IFlowRunnerContext context)
{
//read dna and ip
@@ -2885,6 +3052,12 @@ namespace Testrong.User.Program
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_COM");
}
+
+ ///
+ /// Get Measurments For Rint w/ GND Board
+ /// Only Use FVMI 2mA Range
+ ///
+ /// info from ATE Software
void Rint_GND_FVMI_2mA(IFlowRunnerContext context)
{
List ChannelPmu = new List();
@@ -2949,7 +3122,7 @@ namespace Testrong.User.Program
{
AutoFlush = true
};
-
+
if (loopk == 0)
{
DelayHelper.Sleep(20);
@@ -2989,35 +3162,38 @@ namespace Testrong.User.Program
}
PPMU.Force(PmuPinName, 0, PpmuMode.FVMI, PpmuIRange._2mA, VRange.Normal);
- WriteSingleFile(
- filename: filename,
- slot: SlotNum,
- dna: arm_dna,
- type: "PMU",
- channel: ch,
- mode: "FVMI",
- rload: "Hi-Z",
- extR: ExtBoard_Res,
- range: "2mA",
- ForceValue: ForceValue,
- AteMeasure: AteMeasure,
- DmmMeasure: DMMValue,
- TempValue: TempValue
- );
+ WriteSingleFile(sw: sw,
+ slot: SlotNum,
+ dna: arm_dna,
+ type: "PMU",
+ channel: ch,
+ mode: "FVMI",
+ rload: "Hi-Z",
+ extR: ExtBoard_Res,
+ range: "2mA",
+ ForceValue: ForceValue,
+ AteMeasure: AteMeasure,
+ DmmMeasure: DMMValue,
+ TempValue: TempValue,
+ contextFormat: "RintGND");
sw.Flush();
sw.Close();
- swdata.Write($"{arm_dna},");
- swdata.Write("PMU,");
- swdata.Write($"{ChannelPmu[loopk]},");
- swdata.Write($"FVMI,");
- swdata.Write($"Hi-Z,");
- swdata.Write($"2mA,");
- swdata.Write("20V,");
- swdata.Write("13V,");
- swdata.Write($"{filepath},");
- swdata.Write($"{filetime}\n");
- swdata.Flush();
+
+ Metadata_handler(swdata: swdata,
+ SlotNum: SlotNum,
+ slotList: slotList,
+ arm_dna: arm_dna,
+ context: context,
+ init_Flag: false,
+ Type: "PMU",
+ Channel: ch,
+ Mode: "FVMI",
+ Rload: "Hi-Z",
+ Range: "2mA",
+ filepath: filepath,
+ filetime: filetime);
+
}
swdata.Flush();
swdata.Close();
diff --git a/Testrong.User.Program/bin/x64/Debug/UserProgram.dll b/Testrong.User.Program/bin/x64/Debug/UserProgram.dll
index 9f6a836..0b837a4 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 eab763b..5b9c16e 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/Testrong.User.Program.csproj.AssemblyReference.cache b/Testrong.User.Program/obj/x64/Debug/Testrong.User.Program.csproj.AssemblyReference.cache
index 9bf6334..d06cb46 100644
Binary files a/Testrong.User.Program/obj/x64/Debug/Testrong.User.Program.csproj.AssemblyReference.cache and b/Testrong.User.Program/obj/x64/Debug/Testrong.User.Program.csproj.AssemblyReference.cache differ
diff --git a/Testrong.User.Program/obj/x64/Debug/Testrong.User.Program.csproj.FileListAbsolute.txt b/Testrong.User.Program/obj/x64/Debug/Testrong.User.Program.csproj.FileListAbsolute.txt
index 8c929d6..fd2a7d7 100644
--- a/Testrong.User.Program/obj/x64/Debug/Testrong.User.Program.csproj.FileListAbsolute.txt
+++ b/Testrong.User.Program/obj/x64/Debug/Testrong.User.Program.csproj.FileListAbsolute.txt
@@ -2421,3 +2421,4 @@ D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\obj\x64\Debug\Testr
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\obj\x64\Debug\Testrong.A8AD3C05.Up2Date
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\obj\x64\Debug\UserProgram.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\obj\x64\Debug\UserProgram.pdb
+D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\UserProgram.xml
diff --git a/Testrong.User.Program/obj/x64/Debug/UserProgram.dll b/Testrong.User.Program/obj/x64/Debug/UserProgram.dll
index 9f6a836..0b837a4 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 eab763b..5b9c16e 100644
Binary files a/Testrong.User.Program/obj/x64/Debug/UserProgram.pdb and b/Testrong.User.Program/obj/x64/Debug/UserProgram.pdb differ