Commit 6a892985 LN

皮带线每次都扫码

1 个父辈 501ace35
...@@ -520,11 +520,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -520,11 +520,14 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(300); Thread.Sleep(300);
if (IOValue(IO_Type.ExitTray_Check3).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.ExitTray_Check3).Equals(IO_VALUE.LOW))
{ {
StationInfo_Scan = new StationTrayInfo(IO_VALUE.LOW); UpdateScanInfo(IO_VALUE.LOW,"");
if (DeviceID.Equals(301)) List<string> LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), hengyiName, true);
LastCode = SServerManager.ProcessCodeList(LastCodeList);
if (LastCodeList.Count > 0)
{ {
StationInfo_NG = new StationTrayInfo(StationInfo_Scan.TrayValue, StationInfo_Scan.CodeStr); UpdateScanInfo(IO_VALUE.HIGH, LastCode);
} }
IsInScanCode = false; IsInScanCode = false;
} }
else else
...@@ -532,12 +535,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -532,12 +535,12 @@ namespace OnlineStore.DeviceLibrary
try try
{ {
LastCode = ""; LastCode = "";
StationInfo_Scan = new StationTrayInfo(IO_VALUE.HIGH, LastCode); // StationInfo_Scan = new StationTrayInfo(IO_VALUE.HIGH, LastCode);
UpdateScanInfo(IO_VALUE.HIGH, LastCode);
if (DeviceID.Equals(301)) if (DeviceID.Equals(301))
{ {
if (Line3LastTrayP > Line3MaxPosition) { Line3LastTrayP = Line3MaxPosition; } if (Line3LastTrayP > Line3MaxPosition) { Line3LastTrayP = Line3MaxPosition; }
StationInfo_NG = new StationTrayInfo(StationInfo_Scan.TrayValue, StationInfo_Scan.CodeStr); // StationInfo_NG = new StationTrayInfo(StationInfo_Scan.TrayValue, StationInfo_Scan.CodeStr);
} }
else else
{ {
...@@ -547,10 +550,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -547,10 +550,10 @@ namespace OnlineStore.DeviceLibrary
} }
} }
LogUtil.info(hengyiName + "扫码工位:开始扫码,IsInScanCode=" + IsInScanCode); LogUtil.info(hengyiName + "扫码工位:开始扫码,IsInScanCode=" + IsInScanCode);
List<string> LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), hengyiName,true); List<string> LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), hengyiName, true);
if (LastCodeList.Count <= 0) if (LastCodeList.Count <= 0)
{ {
LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), hengyiName,true); LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), hengyiName, true);
} }
LastCode = SServerManager.ProcessCodeList(LastCodeList); LastCode = SServerManager.ProcessCodeList(LastCodeList);
} }
...@@ -560,11 +563,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -560,11 +563,7 @@ namespace OnlineStore.DeviceLibrary
} }
finally finally
{ {
StationInfo_Scan = new StationTrayInfo(IO_VALUE.HIGH, LastCode); UpdateScanInfo(IO_VALUE.HIGH, LastCode);
if (DeviceID.Equals(301))
{
StationInfo_NG = new StationTrayInfo(StationInfo_Scan.TrayValue, StationInfo_Scan.CodeStr);
}
IsInScanCode = false; IsInScanCode = false;
LogUtil.info(hengyiName + " 扫码工位 : 扫码结束 ," + StationInfo_Scan.ToStr + " IsInScanCode = " + IsInScanCode); LogUtil.info(hengyiName + " 扫码工位 : 扫码结束 ," + StationInfo_Scan.ToStr + " IsInScanCode = " + IsInScanCode);
...@@ -572,6 +571,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -572,6 +571,15 @@ namespace OnlineStore.DeviceLibrary
} }
}); });
} }
private void UpdateScanInfo(IO_VALUE value,string code)
{
StationInfo_Scan = new StationTrayInfo(value,code);
if (DeviceID.Equals(301))
{
StationInfo_NG = new StationTrayInfo(StationInfo_Scan.TrayValue, StationInfo_Scan.CodeStr);
}
}
protected override void IOTimeOutProcess() protected override void IOTimeOutProcess()
{ {
try try
......
...@@ -15,6 +15,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -15,6 +15,7 @@ namespace OnlineStore.DeviceLibrary
private int OutStoreCount = -1; private int OutStoreCount = -1;
private TaskData taskData = null; private TaskData taskData = null;
private InOutParam LastOutParam = new InOutParam(); private InOutParam LastOutParam = new InOutParam();
private bool NeedCheckShelf = true ;
internal bool CanStartCheckOut(int trayNum) internal bool CanStartCheckOut(int trayNum)
{ {
...@@ -292,8 +293,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -292,8 +293,10 @@ namespace OnlineStore.DeviceLibrary
//判断是否是第一次获取料架,需要从服务器获取此料架的虚拟料架号,若无虚拟料架号,料架可以用 //判断是否是第一次获取料架,需要从服务器获取此料架的虚拟料架号,若无虚拟料架号,料架可以用
//有虚拟料架号,从服务器获取此料架剩余任务,若无任务,需要送出料架 //有虚拟料架号,从服务器获取此料架剩余任务,若无任务,需要送出料架
if (LastOutParam.rfid.Equals("")) if (LastOutParam.rfid.Equals("") && NeedCheckShelf)
{ {
//只有启动后第一个料架才需要验证
NeedCheckShelf = false;
string tempRfid = ""; string tempRfid = "";
string msg = SServerManager.findTempRfid(Name, CurrShelfId, out tempRfid); string msg = SServerManager.findTempRfid(Name, CurrShelfId, out tempRfid);
if (!String.IsNullOrEmpty(msg)) if (!String.IsNullOrEmpty(msg))
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!