Commit 763c406e 张东亮

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

1 个父辈 9b67e065
......@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
try
{
OnTimerProcess();
if (IsDebug && runStatus <= RunStatus.Wait)
if (runStatus <= RunStatus.Wait)
{
isInPro = false;
return;
......
......@@ -140,11 +140,6 @@ namespace OnlineStore.DeviceLibrary
}
private void EquipStartRun(EquipBase moveEquip)
{
if (moveEquip.IsDebug)
{
LogUtil.info(moveEquip.Name + "调试状态,暂不启动");
}
else
{
bool result = moveEquip.StartRun();
Thread.Sleep(60);
......@@ -202,7 +197,6 @@ namespace OnlineStore.DeviceLibrary
private void EquipReset(EquipBase equip, bool isNeedAllReset)
{
//调试状态不再重置
if (!equip.IsDebug)
{
if (isNeedAllReset || (!equip.NoAlarm()))
{
......@@ -321,7 +315,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove();
foreach (EquipBase equip in this.equipsMap.Values)
{
if (!equip.IsDebug)
{
equip.StopRun();
}
......
......@@ -49,11 +49,6 @@ namespace OnlineStore.DeviceLibrary
{
//humBean.HumidityProcess(this);
HumitureBean.ProcessAllHumidity(this);
if (IsDebug)
{
}
else
{
if (StoreManager.IsConnectServer)
{
......@@ -124,11 +119,7 @@ namespace OnlineStore.DeviceLibrary
//WarnMsg = "";
//状态
boxStatus.status = (int)deviceStatus;
if (IsDebug)
{
boxStatus.status = (int)DeviceStatus.Debugging;
}
else if (runStatus.Equals(DeviceStatus.OutStoreBoxEnd) || runStatus.Equals(DeviceStatus.InStoreEnd))
if (runStatus.Equals(DeviceStatus.OutStoreBoxEnd) || runStatus.Equals(DeviceStatus.InStoreEnd))
{
boxStatus.data.Add(ParamDefine.posId, lastPosId);
boxStatus.data.Add(ParamDefine.barcode, lastBarcode);
......@@ -280,7 +271,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(logName + "服务器反馈 :" + resultOperation.msg);
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)}】");
return true;
......
......@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
if (CheckASide())
{
//if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo)))
if(PreInStoreCheck(BufferDataManager.BInStoreInfo))
if (PreInStoreCheck(BufferDataManager.BInStoreInfo))
{
inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy();
return true;
......@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary
PullAxisToP1("入库");
break;
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);
if (!IsMoveAxisInSafePos())
{
......@@ -440,6 +440,20 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.HIGH));
}
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;
case StepEnum.SI_19_InoutBack:
if (!CheckInStoreOtherSideInfo())
......
using System;
using Dolen.CV;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
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 OnlineStore.LoadCSVLibrary;
using OnlineStore.Common;
using Dolen.CV;
namespace OnlineStore.XLRStore
{
......@@ -57,32 +47,32 @@ namespace OnlineStore.XLRStore
/// <param name="cameraArgs"></param>
private void BoxBean_camera_A_event(IPCameraEventArgs cameraArgs)
{
if (!this.IsHandleCreated) return;
try
{
this.Invoke(new Action(() =>
{
if (!groupBox2.Text.Contains("-"))
groupBox2.Text = $"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
pictureBox1.Image = cameraArgs.Image;
}));
}
catch { }
//if (!this.IsHandleCreated) return;
//try
//{
// this.Invoke(new Action(() =>
// {
// if (!groupBox2.Text.Contains("-"))
// groupBox2.Text = $"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
// pictureBox1.Image = cameraArgs.Image;
// }));
//}
//catch { }
}
private void BoxBean_camera_B_event(IPCameraEventArgs cameraArgs)
{
if (!this.IsHandleCreated) return;
try
{
this.Invoke(new Action(() =>
{
if (!groupBox5.Text.Contains("-"))
groupBox5.Text = $"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
pictureBox2.Image = cameraArgs.Image;
}));
}
catch { }
//if (!this.IsHandleCreated) return;
//try
//{
// this.Invoke(new Action(() =>
// {
// if (!groupBox5.Text.Contains("-"))
// groupBox5.Text = $"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
// pictureBox2.Image = cameraArgs.Image;
// }));
//}
//catch { }
}
protected Dictionary<string, IOTextControl> DIControlList = new Dictionary<string, IOTextControl>();
......@@ -532,31 +522,25 @@ namespace OnlineStore.XLRStore
private void btnDebugAxis_Click(object sender, EventArgs e)
{
//boxBean.IsDebug
if (frmAxisMove == null)
{
frmAxisMove = new FrmAxisMove(boxBean.IsDebug);
frmAxisMove = new FrmAxisMove(true);
frmAxisMove.ShowDialog();
}
else
{
if (frmAxisMove.IsDisposed)
{
frmAxisMove = new FrmAxisMove(boxBean.IsDebug);
frmAxisMove = new FrmAxisMove(true);
frmAxisMove.ShowDialog();
}
else
{
frmAxisMove.DebugStatus(boxBean.IsDebug);
frmAxisMove.DebugStatus(true);
frmAxisMove.ShowDialog();
}
}
}
private void chbDebug_CheckedChanged_1(object sender, EventArgs e)
{
}
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!