Commit 4a08017d LN

bug修改:托盘条码丢失

1 个父辈 7f942d15
...@@ -114,7 +114,7 @@ namespace OnlineStore.AssemblyLine ...@@ -114,7 +114,7 @@ namespace OnlineStore.AssemblyLine
lblTrayNum.Text = "T3-C1托盘号:" + LineManager.Line.T3C1_TrayNum.ToString(); lblTrayNum.Text = "T3-C1托盘号:" + LineManager.Line.T3C1_TrayNum.ToString();
if (cmbTray.SelectedIndex >= 0) if (cmbTray.SelectedIndex >= 0)
{ {
int trayNum = cmbTray.SelectedIndex + 1; int trayNum = cmbTray.SelectedIndex + 101;
TrayInfo tray = TrayManager.GetTrayInfo(trayNum); TrayInfo tray = TrayManager.GetTrayInfo(trayNum);
lblSelTrayNum.Text = tray.ToStr(); lblSelTrayNum.Text = tray.ToStr();
} }
...@@ -220,7 +220,7 @@ namespace OnlineStore.AssemblyLine ...@@ -220,7 +220,7 @@ namespace OnlineStore.AssemblyLine
private void LoadTray() private void LoadTray()
{ {
cmbTray.Items.Clear(); cmbTray.Items.Clear();
for (int i = 101; i <= 135; i++) for (int i = 101; i <= 150; i++)
{ {
cmbTray.Items.Add(i.ToString()); cmbTray.Items.Add(i.ToString());
} }
...@@ -240,7 +240,7 @@ namespace OnlineStore.AssemblyLine ...@@ -240,7 +240,7 @@ namespace OnlineStore.AssemblyLine
} }
private void btnUpdateTray_Click(object sender, EventArgs e) private void btnUpdateTray_Click(object sender, EventArgs e)
{ {
int num = cmbTray.SelectedIndex + 1; int num = cmbTray.SelectedIndex + 101;
DialogResult resut = MessageBox.Show("确定手动更新托盘【" + num + "】的信息?", "提示", MessageBoxButtons.YesNo); DialogResult resut = MessageBox.Show("确定手动更新托盘【" + num + "】的信息?", "提示", MessageBoxButtons.YesNo);
if (resut.Equals(DialogResult.Yes)) if (resut.Equals(DialogResult.Yes))
{ {
...@@ -402,7 +402,7 @@ namespace OnlineStore.AssemblyLine ...@@ -402,7 +402,7 @@ namespace OnlineStore.AssemblyLine
{ {
if (cmbTray.SelectedIndex >= 0) if (cmbTray.SelectedIndex >= 0)
{ {
int trayNum = cmbTray.SelectedIndex + 1; int trayNum = cmbTray.SelectedIndex + 101;
TrayInfo tray = TrayManager.GetTrayInfo(trayNum); TrayInfo tray = TrayManager.GetTrayInfo(trayNum);
cmbTrayType.SelectedIndex = tray.InOrOutStore; cmbTrayType.SelectedIndex = tray.InOrOutStore;
......
...@@ -1111,7 +1111,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1111,7 +1111,7 @@ namespace OnlineStore.DeviceLibrary
} }
public string GetLastTrayInfo() public string GetLastTrayInfo()
{ {
return "" + LastWidth + "X" + LastHeight + "=" + lastcode + ""; return "" + LastWidth + "X" + LastHeight + "=" + lastcode + "["+LastPosParam.PosId+"]";
} }
} }
} }
...@@ -451,10 +451,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -451,10 +451,10 @@ namespace OnlineStore.DeviceLibrary
{ {
if (getPosTask.IsCompleted && LastPosParam != null) if (getPosTask.IsCompleted && LastPosParam != null)
{ {
MoveInfo.MoveParam = LastPosParam; MoveInfo.MoveParam = LastPosParam.Clone();
MoveInfo.NextMoveStep(LineMoveStep.FI_32_WaitTray); MoveInfo.NextMoveStep(LineMoveStep.FI_32_WaitTray);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
InLog(" " + MoveInfo.SLog + " 开始拦截空托盘 " + LastPosParam.ToStr() + ""); InLog(" " + MoveInfo.SLog + " 开始拦截空托盘 ");
ClearTimeoutAlarm("获取库位号超时"); ClearTimeoutAlarm("获取库位号超时");
} }
...@@ -472,18 +472,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -472,18 +472,18 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth); int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth);
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
LastPosParam.TrayNumber = currTrayNum; LastPosParam.TrayNumber = currTrayNum;
InLog("料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到P2: [" + targetPositon + "] 托盘号【" + currTrayNum + "】,更新托盘信息 :" + LastPosParam.ToShortStr());
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, LastPosParam, LastPosParam.NgMsg); TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, LastPosParam.Clone(), LastPosParam.NgMsg);
SServerManager.SendPosToStoreCheck(Name, LastPosParam); TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到P2: [" + targetPositon + "] 更新托盘信息【" + tray.ToStr() + "】");
SServerManager.SendPosToStoreCheck(Name, LastPosParam.Clone());
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false)) if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false))
{ {
InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点,不等待结果"); InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点,不等待结果");
BatchAxisToP3(false, false); BatchAxisToP3(false, false);
} }
MoveInfo.MoveParam = LastPosParam;
ClearTimeoutAlarm("等待空托盘到达超时"); ClearTimeoutAlarm("等待空托盘到达超时");
} }
else if (MoveInfo.IsTimeOut(180)) else if (MoveInfo.IsTimeOut(180))
...@@ -516,6 +516,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -516,6 +516,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_36_TrayMoveOk); MoveInfo.NextMoveStep(LineMoveStep.FI_36_TrayMoveOk);
MoveInfo.MoveParam = new InOutParam();
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴已到P1,托盘放行"); InLog("料盘移栽" + MoveInfo.SLog + ":升降轴已到P1,托盘放行");
TrayMoveOk(); TrayMoveOk();
} }
...@@ -666,6 +667,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -666,6 +667,7 @@ namespace OnlineStore.DeviceLibrary
LastPosParam = null; LastPosParam = null;
string code = CodeManager.ProcessCode(LastCodeList); string code = CodeManager.ProcessCode(LastCodeList);
lastcode = code; lastcode = code;
MoveInfo.MoveParam = new InOutParam();
MoveInfo.MoveParam.WareCode = lastcode; MoveInfo.MoveParam.WareCode = lastcode;
getPosTask = Task.Factory.StartNew(delegate getPosTask = Task.Factory.StartNew(delegate
{ {
......
...@@ -383,6 +383,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -383,6 +383,9 @@ namespace OnlineStore.DeviceLibrary
{ {
HY11_TopUpToHY(); HY11_TopUpToHY();
} }
}else if (MoveInfo.IsStep(LineMoveStep.HY08_SL_WaitProcessReel))
{
} }
else if (MoveInfo.IsStep(LineMoveStep.HY09_SL_ReelProEnd)) else if (MoveInfo.IsStep(LineMoveStep.HY09_SL_ReelProEnd))
{ {
......
...@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.MO_58_CylinderDown)) else if (MoveInfo.IsStep(LineMoveStep.MO_58_CylinderDown))
{ {
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】"); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】");
TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam); TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam.Clone());
//出库全部完成 //出库全部完成
MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderRelax); MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderRelax);
...@@ -439,7 +439,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -439,7 +439,7 @@ namespace OnlineStore.DeviceLibrary
//判断是否是自己排队列表中的入库信息 //判断是否是自己排队列表中的入库信息
foreach (InOutParam cc in waitInStoreList) foreach (InOutParam cc in waitInStoreList)
{ {
if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals(""))) if (cc.TrayNumber.Equals(currTrayNum) && (!cc.PosId.Equals("")))
{ {
//判断是否验证成功,如果验证失败,不入库 //判断是否验证成功,如果验证失败,不入库
if (LineServer.RightInPosId(DeviceID, cc.PosId)) if (LineServer.RightInPosId(DeviceID, cc.PosId))
......
...@@ -31,7 +31,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -31,7 +31,11 @@ namespace OnlineStore.DeviceLibrary
this.cutReel = cutReel; this.cutReel = cutReel;
this.smallReel = smallReel; this.smallReel = smallReel;
this.rfid = rfid; this.rfid = rfid;
this.rfidLoc = rfidLoc; this.rfidLoc = rfidLoc;
}
public InOutParam Clone()
{
return (InOutParam)this.MemberwiseClone();
} }
/// <summary> /// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!