Commit 4a08017d LN

bug修改:托盘条码丢失

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