|
@@ -2928,7 +2928,7 @@ namespace MainForm
|
|
|
#region S1
|
|
|
|
|
|
/// <summary>
|
|
|
- /// [S1] 壳体清洁上料装备
|
|
|
+ /// [S1] 壳体清洁上料装备(10扫码改造注释(临时))
|
|
|
/// </summary>
|
|
|
/// <param name="plcNo">PLC编号</param>
|
|
|
//private void ReadStation_S1(int plcNo)
|
|
@@ -3146,7 +3146,7 @@ namespace MainForm
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
- /// [S1] 壳体清洁上料装备(临时方案)
|
|
|
+ /// [S1] 壳体清洁上料装备(10扫码改造注释(临时))
|
|
|
/// </summary>
|
|
|
/// <param name="plcNo">PLC编号</param>
|
|
|
private void ReadStation_S1(int plcNo)
|
|
@@ -3268,8 +3268,8 @@ namespace MainForm
|
|
|
|
|
|
CommandFromPLC CommandToPlC = new CommandFromPLC();
|
|
|
CommandToPlC.cmd = 0;
|
|
|
- CommandToPlC.cmdParam = 0;
|
|
|
- CommandToPlC.cmdResult = 110;
|
|
|
+ CommandToPlC.cmdParam = 5;
|
|
|
+ CommandToPlC.cmdResult = 0;
|
|
|
WriteResultToPlc(plcNo, stationNameStr, tagBaseName + "." + tagMesCommName, 1, CommandToPlC);
|
|
|
return;
|
|
|
}
|
|
@@ -3279,13 +3279,12 @@ namespace MainForm
|
|
|
|
|
|
CommandFromPLC CommandToPlC = new CommandFromPLC();
|
|
|
CommandToPlC.cmd = 0;
|
|
|
- CommandToPlC.cmdParam = 0;
|
|
|
- CommandToPlC.cmdResult = 1;
|
|
|
+ CommandToPlC.cmdParam = 4;
|
|
|
+ CommandToPlC.cmdResult = 0;
|
|
|
WriteResultToPlc(plcNo, stationNameStr, tagBaseName + "." + tagMesCommName, 1, CommandToPlC);
|
|
|
}
|
|
|
- AddMessage(LogType.Info, $"载具码:{_strCarrierBarcode},产品码:{_strProductBarcode}");
|
|
|
- _strCarrierBarcode = "";
|
|
|
- _strProductBarcode = "";
|
|
|
+ AddMessage(LogType.Info, $"载具码:{_strCarrierBarcode},产品码:{_strCarrierBarcode}");
|
|
|
+
|
|
|
//StopWhile = false;//开启while循环
|
|
|
}
|
|
|
}
|
|
@@ -3438,8 +3437,15 @@ namespace MainForm
|
|
|
{
|
|
|
stopwatch1.Start();
|
|
|
AddMessage(LogType.Info, stationNameStr + "_进站开始");
|
|
|
- string sn = (string)stPLC_MesData.BarcodeSet.strProductBarcode; // 产品SN(物料码),现在PLC只有OP10和OP50返回
|
|
|
+ //10扫码改造注释(临时)
|
|
|
+ //string sn = (string)stPLC_MesData.BarcodeSet.strProductBarcode; // 产品SN(物料码),现在PLC只有OP10和OP50返回
|
|
|
string CarrierBarcode = (string)stPLC_MesData.BarcodeSet.strCarrierBarcode; // 载具条码;
|
|
|
+ string sn = _strProductBarcode;
|
|
|
+ if (string.IsNullOrEmpty(CarrierBarcode))
|
|
|
+ {
|
|
|
+ //获取手持扫码枪的载具码
|
|
|
+ CarrierBarcode = _strCarrierBarcode;
|
|
|
+ }
|
|
|
string MachineId = GlobalContext.S1_MachineId; // 装备ID(可配置)
|
|
|
string StationId = GlobalContext.S1_StationId; // 工位ID(可配置)
|
|
|
int a1Result = (int)stPLC_MesData.iotData.testStatus; // 产品结果
|
|
@@ -3457,15 +3463,17 @@ namespace MainForm
|
|
|
// sn = sn.Substring(sn.Length - 11, 4) + sn.Substring(sn.Length - 5, 5);
|
|
|
AddMessage(LogType.Info, $"载具码:{CarrierBarcode};产品码:{sn}");
|
|
|
//绑定载具和产品
|
|
|
- ResponseMessage message = new ResponseMessage();
|
|
|
- message = SQLHelper.InsertCarrierBind(CarrierBarcode, sn);
|
|
|
- if (message.result == false)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, stationNameStr + "_载具码与产品码绑定失败,错误:" + message.text);
|
|
|
- ProgressState = false;
|
|
|
- Thread.Sleep(10000);
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
+ //测试注释(临时)
|
|
|
+ //ResponseMessage message = new ResponseMessage();
|
|
|
+ //message = SQLHelper.InsertCarrierBind(CarrierBarcode, sn);
|
|
|
+ //if (message.result == false)
|
|
|
+ //{
|
|
|
+ // AddMessage(LogType.Error, stationNameStr + "_载具码与产品码绑定失败,错误:" + message.text);
|
|
|
+ // ProgressState = false;
|
|
|
+ // Thread.Sleep(10000);
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
|
|
|
// 产品SN进站
|
|
|
List<TestItem> item = new List<TestItem>();
|
|
@@ -5709,6 +5717,7 @@ namespace MainForm
|
|
|
batch_num
|
|
|
, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "01-SLOT-01", MachineId, StationId,
|
|
|
PartBarcode, paramJson);
|
|
|
+ uuid = "";
|
|
|
}
|
|
|
else if (stPLC_MesData.mesCommFrmPLC.cmdParam == 1)
|
|
|
{
|
|
@@ -5766,7 +5775,6 @@ namespace MainForm
|
|
|
stationNameStr + "_出站接口;总用时" + stopwatch1.ElapsedMilliseconds + "ms;写入用时" +
|
|
|
stopwatch2.ElapsedMilliseconds + "ms");
|
|
|
ProgressState = false;
|
|
|
- uuid = "";
|
|
|
}
|
|
|
|
|
|
private int S5_PCB进出站(OP50_MesData_t stPLC_MesData, int plcNo, string stationNameStr, string tagBaseName,
|
|
@@ -6101,6 +6109,12 @@ namespace MainForm
|
|
|
}
|
|
|
sn = ProductBarcode;
|
|
|
AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
|
|
|
+ if (ProductBarcode != "")
|
|
|
+ {
|
|
|
+ MessageBox.Show($"产品码:{sn}线外螺丝机过站后点击确认", "提示",
|
|
|
+ MessageBoxButtons.OK,
|
|
|
+ MessageBoxIcon.Information);
|
|
|
+ }
|
|
|
|
|
|
// 产品SN(物料码)校验
|
|
|
List<TestItem> item = new List<TestItem>();
|