Commit 763c406e 张东亮

入库完成后检查是否在库位,否则出库

1 个父辈 9b67e065
...@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
try try
{ {
OnTimerProcess(); OnTimerProcess();
if (IsDebug && runStatus <= RunStatus.Wait) if (runStatus <= RunStatus.Wait)
{ {
isInPro = false; isInPro = false;
return; return;
......
...@@ -140,11 +140,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -140,11 +140,6 @@ namespace OnlineStore.DeviceLibrary
} }
private void EquipStartRun(EquipBase moveEquip) private void EquipStartRun(EquipBase moveEquip)
{ {
if (moveEquip.IsDebug)
{
LogUtil.info(moveEquip.Name + "调试状态,暂不启动");
}
else
{ {
bool result = moveEquip.StartRun(); bool result = moveEquip.StartRun();
Thread.Sleep(60); Thread.Sleep(60);
...@@ -202,7 +197,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -202,7 +197,6 @@ namespace OnlineStore.DeviceLibrary
private void EquipReset(EquipBase equip, bool isNeedAllReset) private void EquipReset(EquipBase equip, bool isNeedAllReset)
{ {
//调试状态不再重置 //调试状态不再重置
if (!equip.IsDebug)
{ {
if (isNeedAllReset || (!equip.NoAlarm())) if (isNeedAllReset || (!equip.NoAlarm()))
{ {
...@@ -321,7 +315,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -321,7 +315,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove(); MoveInfo.EndMove();
foreach (EquipBase equip in this.equipsMap.Values) foreach (EquipBase equip in this.equipsMap.Values)
{ {
if (!equip.IsDebug)
{ {
equip.StopRun(); equip.StopRun();
} }
......
...@@ -49,11 +49,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -49,11 +49,6 @@ namespace OnlineStore.DeviceLibrary
{ {
//humBean.HumidityProcess(this); //humBean.HumidityProcess(this);
HumitureBean.ProcessAllHumidity(this); HumitureBean.ProcessAllHumidity(this);
if (IsDebug)
{
}
else
{ {
if (StoreManager.IsConnectServer) if (StoreManager.IsConnectServer)
{ {
...@@ -124,11 +119,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -124,11 +119,7 @@ namespace OnlineStore.DeviceLibrary
//WarnMsg = ""; //WarnMsg = "";
//状态 //状态
boxStatus.status = (int)deviceStatus; boxStatus.status = (int)deviceStatus;
if (IsDebug) if (runStatus.Equals(DeviceStatus.OutStoreBoxEnd) || runStatus.Equals(DeviceStatus.InStoreEnd))
{
boxStatus.status = (int)DeviceStatus.Debugging;
}
else if (runStatus.Equals(DeviceStatus.OutStoreBoxEnd) || runStatus.Equals(DeviceStatus.InStoreEnd))
{ {
boxStatus.data.Add(ParamDefine.posId, lastPosId); boxStatus.data.Add(ParamDefine.posId, lastPosId);
boxStatus.data.Add(ParamDefine.barcode, lastBarcode); boxStatus.data.Add(ParamDefine.barcode, lastBarcode);
...@@ -280,7 +271,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -280,7 +271,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(logName + "服务器反馈 :" + resultOperation.msg); LogUtil.info(logName + "服务器反馈 :" + resultOperation.msg);
continue; continue;
} }
else if (resultOperation.op.Equals(1)&&operation.seq.Equals(resultOperation.seq)) else if (resultOperation.op.Equals(1) && operation.seq.Equals(resultOperation.seq))
{ {
LogUtil.info(logName + " 成功" + $"【{JsonHelper.SerializeObject(resultOperation)}】"); LogUtil.info(logName + " 成功" + $"【{JsonHelper.SerializeObject(resultOperation)}】");
return true; return true;
......
...@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
if (CheckASide()) if (CheckASide())
{ {
//if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo))) //if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo)))
if(PreInStoreCheck(BufferDataManager.BInStoreInfo)) if (PreInStoreCheck(BufferDataManager.BInStoreInfo))
{ {
inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy(); inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy();
return true; return true;
...@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary
PullAxisToP1("入库"); PullAxisToP1("入库");
break; break;
case StepEnum.SI_01_PullAxis_Ready: case StepEnum.SI_01_PullAxis_Ready:
SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId,MoveInfo.MoveParam.PosInfo.barcode); SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
MoveInfo.NextMoveStep(StepEnum.SI_01_Pull_Updown_ToPosition); MoveInfo.NextMoveStep(StepEnum.SI_01_Pull_Updown_ToPosition);
if (!IsMoveAxisInSafePos()) if (!IsMoveAxisInSafePos())
{ {
...@@ -329,9 +329,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -329,9 +329,9 @@ namespace OnlineStore.DeviceLibrary
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); //MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
break; break;
case StepEnum.SI_08_ToPosition: case StepEnum.SI_08_ToPosition:
MoveInfo.NextMoveStep(StepEnum.SI_09_ToTray); MoveInfo.NextMoveStep(StepEnum.SI_09_ToTray);
LogInfo($"入库 {MoveInfo.SLog}:到抽屉提取点,料斗拉取进出轴到抽屉提取点P2/P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"入库 {MoveInfo.SLog}:到抽屉提取点,料斗拉取进出轴到抽屉提取点P2/P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
PullAxis_Inout_To_P2_P4(); PullAxis_Inout_To_P2_P4();
break; break;
case StepEnum.SI_09_ToTray: case StepEnum.SI_09_ToTray:
MoveInfo.NextMoveStep(StepEnum.SI_10_LiftTray); MoveInfo.NextMoveStep(StepEnum.SI_10_LiftTray);
...@@ -440,6 +440,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -440,6 +440,20 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.HIGH));
} }
PullAxis_Inout_To_Cam(); PullAxis_Inout_To_Cam();
bool rtn = SServerManager.InstorePosCheck(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
if(!rtn)
{
InOutParam inOut= new InOutParam(new InOutPosInfo(MoveInfo.MoveParam.PosInfo.barcode, MoveInfo.MoveParam.PosInfo.PosId));
LogInfo($"入库 {MoveInfo.SLog}:验证入库完成失败,将该库位出库[{inOut.PosInfo.ToStr()}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
if (CheckASide())
{
waitAOutStoreList.Enqueue(inOut);
}
else
{
waitBOutStoreList.Enqueue(inOut);
}
}
break; break;
case StepEnum.SI_19_InoutBack: case StepEnum.SI_19_InoutBack:
if (!CheckInStoreOtherSideInfo()) if (!CheckInStoreOtherSideInfo())
......
using System; using Dolen.CV;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Runtime.CompilerServices;
using System.Threading;
using System.IO;
using System.Runtime.InteropServices;
using OnlineStore.DeviceLibrary;
using log4net;
using System.Reflection;
using UserFromControl; using UserFromControl;
using OnlineStore.LoadCSVLibrary;
using OnlineStore.Common;
using Dolen.CV;
namespace OnlineStore.XLRStore namespace OnlineStore.XLRStore
{ {
...@@ -57,32 +47,32 @@ namespace OnlineStore.XLRStore ...@@ -57,32 +47,32 @@ namespace OnlineStore.XLRStore
/// <param name="cameraArgs"></param> /// <param name="cameraArgs"></param>
private void BoxBean_camera_A_event(IPCameraEventArgs cameraArgs) private void BoxBean_camera_A_event(IPCameraEventArgs cameraArgs)
{ {
if (!this.IsHandleCreated) return; //if (!this.IsHandleCreated) return;
try //try
{ //{
this.Invoke(new Action(() => // this.Invoke(new Action(() =>
{ // {
if (!groupBox2.Text.Contains("-")) // if (!groupBox2.Text.Contains("-"))
groupBox2.Text = $"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}"; // groupBox2.Text = $"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
pictureBox1.Image = cameraArgs.Image; // pictureBox1.Image = cameraArgs.Image;
})); // }));
} //}
catch { } //catch { }
} }
private void BoxBean_camera_B_event(IPCameraEventArgs cameraArgs) private void BoxBean_camera_B_event(IPCameraEventArgs cameraArgs)
{ {
if (!this.IsHandleCreated) return; //if (!this.IsHandleCreated) return;
try //try
{ //{
this.Invoke(new Action(() => // this.Invoke(new Action(() =>
{ // {
if (!groupBox5.Text.Contains("-")) // if (!groupBox5.Text.Contains("-"))
groupBox5.Text = $"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}"; // groupBox5.Text = $"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
pictureBox2.Image = cameraArgs.Image; // pictureBox2.Image = cameraArgs.Image;
})); // }));
} //}
catch { } //catch { }
} }
protected Dictionary<string, IOTextControl> DIControlList = new Dictionary<string, IOTextControl>(); protected Dictionary<string, IOTextControl> DIControlList = new Dictionary<string, IOTextControl>();
...@@ -532,31 +522,25 @@ namespace OnlineStore.XLRStore ...@@ -532,31 +522,25 @@ namespace OnlineStore.XLRStore
private void btnDebugAxis_Click(object sender, EventArgs e) private void btnDebugAxis_Click(object sender, EventArgs e)
{ {
//boxBean.IsDebug
if (frmAxisMove == null) if (frmAxisMove == null)
{ {
frmAxisMove = new FrmAxisMove(boxBean.IsDebug); frmAxisMove = new FrmAxisMove(true);
frmAxisMove.ShowDialog(); frmAxisMove.ShowDialog();
} }
else else
{ {
if (frmAxisMove.IsDisposed) if (frmAxisMove.IsDisposed)
{ {
frmAxisMove = new FrmAxisMove(boxBean.IsDebug); frmAxisMove = new FrmAxisMove(true);
frmAxisMove.ShowDialog(); frmAxisMove.ShowDialog();
} }
else else
{ {
frmAxisMove.DebugStatus(boxBean.IsDebug); frmAxisMove.DebugStatus(true);
frmAxisMove.ShowDialog(); frmAxisMove.ShowDialog();
} }
} }
} }
private void chbDebug_CheckedChanged_1(object sender, EventArgs e)
{
}
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!