出站
This commit is contained in:
@@ -140,7 +140,7 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
DicStationFunction.Add("电芯进站", FeedingStation);
|
||||
//DicStationFunction.Add("NG出站", NGStation);
|
||||
//DicStationFunction.Add("外观检测出站", BlankingStation);
|
||||
DicStationFunction.Add("电芯出站", BlankingStation);
|
||||
|
||||
for (int i = 0; i < CommonMethods.ChatLineCount; i++)
|
||||
{
|
||||
|
||||
@@ -50,6 +50,115 @@ namespace JinYuan.ControlCenters
|
||||
/// <summary>
|
||||
/// 判断总结果
|
||||
/// </summary>
|
||||
//private int JudgmentResult(int A, int B, int C, int D, int E, int F, int G, int H, int I, int J, int K, int L, int M, int N)
|
||||
//{
|
||||
// //条码,芯包重量,芯包侧厚,芯包CCD极性检测,电芯裁切粘连,电芯裁切毛刺,芯包铜焊印位置,
|
||||
// //芯包正面极耳撕裂H,芯包背面极耳撕裂,芯包正面极耳翻折J,芯包背面极耳翻折,测厚压力结果,
|
||||
// //焊前CCD检测结果,铝焊印位置判定结果
|
||||
|
||||
// //目前先判断条码,芯包重量,芯包侧厚,芯包CCD极性检测,芯包正面极耳撕裂,芯包正面极耳翻折
|
||||
// int Result = 0;
|
||||
// OK_NG = "OK";
|
||||
// if (A == 2 || B == 2 || C == 2 || D == 2 || H == 2 || J == 2)
|
||||
// {
|
||||
// //ed
|
||||
// Result = 2;
|
||||
// OK_NG = "NG";
|
||||
// }
|
||||
// else if (A == 1 && B == 1 && C == 1 && D == 1 && H == 1 && J == 1)
|
||||
// {
|
||||
// Result = 1;
|
||||
// OK_NG = "OK";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Result = 1;
|
||||
// OK_NG = "OK";
|
||||
// }
|
||||
|
||||
// if (A == 2)
|
||||
// {
|
||||
// NG_Type += "无条码_";
|
||||
// Result = 2;
|
||||
// }
|
||||
// if (B == 2)
|
||||
// {
|
||||
// NG_Type += "芯包重量1NG_";
|
||||
// //return 2;
|
||||
// Result = 2;
|
||||
// }
|
||||
// if (C == 2)
|
||||
// {
|
||||
// NG_Type += "芯包侧厚NG_";
|
||||
// //return 2;
|
||||
// Result = 2;
|
||||
// }
|
||||
// if (D == 2)
|
||||
// {
|
||||
// NG_Type += "芯包CCD极性检测NG_";
|
||||
// //return 2;
|
||||
// Result = 2;
|
||||
// }
|
||||
|
||||
// //if (E == 2)
|
||||
// //{
|
||||
// // NG_Type += "电芯裁切粘连NG_";
|
||||
// // //return 2;
|
||||
// //}
|
||||
// //if (F == 2)
|
||||
// //{
|
||||
// // NG_Type += "电芯裁切毛刺NG_";
|
||||
// // //return 2;
|
||||
// //}
|
||||
// //if (G == 2)
|
||||
// //{
|
||||
// // NG_Type += "芯包铜焊印位置判定NG_";
|
||||
// // //return 2;
|
||||
// //}
|
||||
// if (H == 2)
|
||||
// {
|
||||
// NG_Type += "芯包正面极耳撕裂NG_";
|
||||
// //return 2;
|
||||
// }
|
||||
// //if (I == 2)
|
||||
// //{
|
||||
// // NG_Type += "芯包背面极耳撕裂NG_";
|
||||
// // //return 2;
|
||||
// //}
|
||||
// if (J == 2)
|
||||
// {
|
||||
// NG_Type += "芯包正面极耳翻折NG_";
|
||||
// //return 2;
|
||||
// }
|
||||
// //if (K == 2)
|
||||
// //{
|
||||
// // NG_Type += "芯包背面极耳翻折NG_";
|
||||
// // //return 2;
|
||||
// //}
|
||||
// if (L == 2)
|
||||
// {
|
||||
// NG_Type += "测厚压力NG_";
|
||||
// //return 2;
|
||||
// }
|
||||
// if (M == 2)
|
||||
// {
|
||||
// NG_Type += "焊前CCD检测NG_";
|
||||
// //return 2;
|
||||
// }
|
||||
// if (N == 2)
|
||||
// {
|
||||
// NG_Type += "铝焊印位置判定NG_";
|
||||
// //return 2;
|
||||
// }
|
||||
// if (Result == 1)
|
||||
// {
|
||||
// NG_Type += "OK_";
|
||||
// }
|
||||
// return Result;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 判断总结果
|
||||
/// </summary>
|
||||
private int JudgmentResult(int A, int B, int C, int D, int E, int F, int G, int H, int I, int J, int K, int L, int M, int N)
|
||||
{
|
||||
//条码,芯包重量,芯包侧厚,芯包CCD极性检测,电芯裁切粘连,电芯裁切毛刺,芯包铜焊印位置,
|
||||
@@ -156,7 +265,6 @@ namespace JinYuan.ControlCenters
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
#region 上料工位(数据处理)
|
||||
/// <summary>
|
||||
/// 上料工位
|
||||
@@ -195,9 +303,9 @@ namespace JinYuan.ControlCenters
|
||||
//listBarCode[1] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 240, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
//listBarCode[2] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 280, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
//listBarCode[3] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 320, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[0] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 0, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[1] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 40, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[2] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 80, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[0] = StringLib.GetStringFromByteArrayByEncoding(bytes, 0, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[1] = StringLib.GetStringFromByteArrayByEncoding(bytes, 40, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[2] = StringLib.GetStringFromByteArrayByEncoding(bytes, 80, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
|
||||
//listBarCode[0] = "TEST";
|
||||
//listBarCode[1] = "TEST";
|
||||
@@ -1626,9 +1734,9 @@ namespace JinYuan.ControlCenters
|
||||
//反馈结果
|
||||
#region 电芯解析
|
||||
//电芯解析 从3200 开始
|
||||
listBarCode[0] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 0, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[1] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 40, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[2] = StringLib.GetStringFromByteArrayByEncoding(bArrays.Content, 80, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[0] = StringLib.GetStringFromByteArrayByEncoding(bytes, 0, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[1] = StringLib.GetStringFromByteArrayByEncoding(bytes, 40, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[2] = StringLib.GetStringFromByteArrayByEncoding(bytes, 80, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
#region 上传MES
|
||||
//D3200起
|
||||
for (int i = 0; i < 3; i++)
|
||||
@@ -1705,33 +1813,33 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
//电芯CCD判定结果
|
||||
#region //电芯CCD判定结果
|
||||
m.CCDResult1 = m.CCD_Data[i, 0] == 1 ? "OK" : (m.CCD_Data[i, 0] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult2 = m.CCD_Data[i, 1] == 1 ? "OK" : (m.CCD_Data[i, 1] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult3 = m.CCD_Data[i, 2] == 1 ? "OK" : (m.CCD_Data[i, 2] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult4 = m.CCD_Data[i, 3] == 1 ? "OK" : (m.CCD_Data[i, 3] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult5 = m.CCD_Data[i, 4] == 1 ? "OK" : (m.CCD_Data[i, 4] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult6 = m.CCD_Data[i, 5] == 1 ? "OK" : (m.CCD_Data[i, 5] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult7 = m.CCD_Data[i, 6] == 1 ? "OK" : (m.CCD_Data[i, 6] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult8 = m.CCD_Data[i, 7] == 1 ? "OK" : (m.CCD_Data[i, 7] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult9 = m.CCD_Data[i, 8] == 1 ? "OK" : (m.CCD_Data[i, 8] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult10 = m.CCD_Data[i, 9] == 1 ? "OK" : (m.CCD_Data[i, 9] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult11 = m.CCD_Data[i, 10] == 1 ? "OK" : (m.CCD_Data[i, 10] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult12 = m.CCD_Data[i, 11] == 1 ? "OK" : (m.CCD_Data[i, 11] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult13 = m.CCD_Data[i, 12] == 1 ? "OK" : (m.CCD_Data[i, 12] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult14 = m.CCD_Data[i, 13] == 1 ? "OK" : (m.CCD_Data[i, 13] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult15 = m.CCD_Data[i, 14] == 1 ? "OK" : (m.CCD_Data[i, 14] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult16 = m.CCD_Data[i, 15] == 1 ? "OK" : (m.CCD_Data[i, 15] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult17 = m.CCD_Data[i, 16] == 1 ? "OK" : (m.CCD_Data[i, 16] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult18 = m.CCD_Data[i, 17] == 1 ? "OK" : (m.CCD_Data[i, 17] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult19 = m.CCD_Data[i, 18] == 1 ? "OK" : (m.CCD_Data[i, 18] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult20 = m.CCD_Data[i, 19] == 1 ? "OK" : (m.CCD_Data[i, 19] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult21 = m.CCD_Data[i, 20] == 1 ? "OK" : (m.CCD_Data[i, 20] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult22 = m.CCD_Data[i, 21] == 1 ? "OK" : (m.CCD_Data[i, 21] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult23 = m.CCD_Data[i, 22] == 1 ? "OK" : (m.CCD_Data[i, 22] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult24 = m.CCD_Data[i, 23] == 1 ? "OK" : (m.CCD_Data[i, 23] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult25 = m.CCD_Data[i, 24] == 1 ? "OK" : (m.CCD_Data[i, 24] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult26 = m.CCD_Data[i, 25] == 1 ? "OK" : (m.CCD_Data[i, 25] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult27 = m.CCD_Data[i, 26] == 1 ? "OK" : (m.CCD_Data[i, 26] == 2 ? "NG" : "缺图");
|
||||
m.CCDResult1 = m.CCD_Data[i, 0] == 0 ? "OK" : (m.CCD_Data[i, 0] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult2 = m.CCD_Data[i, 1] == 0 ? "OK" : (m.CCD_Data[i, 1] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult3 = m.CCD_Data[i, 2] == 0 ? "OK" : (m.CCD_Data[i, 2] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult4 = m.CCD_Data[i, 3] == 0 ? "OK" : (m.CCD_Data[i, 3] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult5 = m.CCD_Data[i, 4] == 0 ? "OK" : (m.CCD_Data[i, 4] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult6 = m.CCD_Data[i, 5] == 0 ? "OK" : (m.CCD_Data[i, 5] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult7 = m.CCD_Data[i, 6] == 0 ? "OK" : (m.CCD_Data[i, 6] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult8 = m.CCD_Data[i, 7] == 0 ? "OK" : (m.CCD_Data[i, 7] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult9 = m.CCD_Data[i, 8] == 0 ? "OK" : (m.CCD_Data[i, 8] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult10 = m.CCD_Data[i, 9] == 0 ? "OK" : (m.CCD_Data[i, 9] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult11 = m.CCD_Data[i, 10] == 0 ? "OK" : (m.CCD_Data[i, 10] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult12 = m.CCD_Data[i, 11] == 0 ? "OK" : (m.CCD_Data[i, 11] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult13 = m.CCD_Data[i, 12] == 0 ? "OK" : (m.CCD_Data[i, 12] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult14 = m.CCD_Data[i, 13] == 0 ? "OK" : (m.CCD_Data[i, 13] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult15 = m.CCD_Data[i, 14] == 0 ? "OK" : (m.CCD_Data[i, 14] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult16 = m.CCD_Data[i, 15] == 0 ? "OK" : (m.CCD_Data[i, 15] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult17 = m.CCD_Data[i, 16] == 0 ? "OK" : (m.CCD_Data[i, 16] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult18 = m.CCD_Data[i, 17] == 0 ? "OK" : (m.CCD_Data[i, 17] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult19 = m.CCD_Data[i, 18] == 0 ? "OK" : (m.CCD_Data[i, 18] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult20 = m.CCD_Data[i, 19] == 0 ? "OK" : (m.CCD_Data[i, 19] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult21 = m.CCD_Data[i, 20] == 0 ? "OK" : (m.CCD_Data[i, 20] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult22 = m.CCD_Data[i, 21] == 0 ? "OK" : (m.CCD_Data[i, 21] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult23 = m.CCD_Data[i, 22] == 0 ? "OK" : (m.CCD_Data[i, 22] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult24 = m.CCD_Data[i, 23] == 0 ? "OK" : (m.CCD_Data[i, 23] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult25 = m.CCD_Data[i, 24] == 0 ? "OK" : (m.CCD_Data[i, 24] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult26 = m.CCD_Data[i, 25] == 0 ? "OK" : (m.CCD_Data[i, 25] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult27 = m.CCD_Data[i, 26] == 0 ? "OK" : (m.CCD_Data[i, 26] == 1 ? "NG" : "缺图");
|
||||
#endregion
|
||||
|
||||
m.CSBYHASCANNINGTIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
@@ -1742,14 +1850,25 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
m.Thickness1 = SaveTwoNum(m.Thickness_Data[i, 0]);
|
||||
m.Thickness2 = SaveTwoNum(m.Thickness_Data[i, 1]);
|
||||
m.Thickness3 = SaveTwoNum(m.Thickness_Data[i, 2]);
|
||||
|
||||
m.Thickness3 = SaveTwoNum(m.Thickness_Data[i, 2]);
|
||||
|
||||
//条码,芯包重量,芯包侧厚,芯包CCD极性检测,电芯裁切粘连,电芯裁切毛刺,芯包焊印位置,
|
||||
//芯包正面极耳撕裂,芯包背面极耳撕裂,芯包正面极耳翻折,芯包背面极耳翻折
|
||||
MyRes[i] = JudgmentResult(Code_NG, m.list_Data1[i, 10], m.list_Data1[i, 11],
|
||||
m.list_Data1[i, 12], m.list_Data1[i, 13], m.list_Data1[i, 14], m.list_Data1[i, 15],
|
||||
m.list_Data1[i, 16], m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19],
|
||||
m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25]);
|
||||
if (Code_NG == 1)
|
||||
{
|
||||
for (int ii = 0; ii < 27; ii++)
|
||||
{
|
||||
if (m.CCD_Data[i, ii] != 0)
|
||||
{
|
||||
MyRes[i] = m.CCD_Data[i, ii];
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
MyRes[i] = 1;
|
||||
//MyRes[i] = JudgmentResult(Code_NG, m.CCD_Data);
|
||||
|
||||
m.Result = MyRes[i];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user