Commit 1c941b95 张东亮
2 个父辈 a43875ff f9488a26
...@@ -339,7 +339,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -339,7 +339,7 @@ namespace OnlineStore.DeviceLibrary
{ {
axisCheckTimer = new System.Timers.Timer(); axisCheckTimer = new System.Timers.Timer();
axisCheckTimer.AutoReset = true; axisCheckTimer.AutoReset = true;
axisCheckTimer.Interval += 5; axisCheckTimer.Interval += 10;
axisCheckTimer.Elapsed += CheckTimer_Elapsed; axisCheckTimer.Elapsed += CheckTimer_Elapsed;
axisCheckTimer.Enabled = false; axisCheckTimer.Enabled = false;
} }
...@@ -359,21 +359,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -359,21 +359,18 @@ namespace OnlineStore.DeviceLibrary
return true; return true;
} }
private bool IsInProcess = false; private bool IsInProcess = false;
private DateTime lastOkTime = DateTime.Now;
private void CheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) private void CheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{ {
TimeSpan pan = DateTime.Now - lastOkTime; if (IsInProcess ) { return; }
if (IsInProcess && pan.TotalMilliseconds < 100) { return; }
try try
{ {
IsInProcess = true; IsInProcess = true;
lastOkTime = DateTime.Now;
if (IOManager.IOValue(TargetIoType, 0).Equals(TargetIoValue)) if (IOManager.IOValue(TargetIoType, 0).Equals(TargetIoValue))
{ {
AxisStopCheckMove();
LogUtil.info(AxisName + "上料轴,检测到 " + TargetIoType + "=" + TargetIoValue + ",停止运动,AclPosition=" + GetAclPosition().ToString());
SuddenStop(); SuddenStop();
LogUtil.info(AxisName + "上料轴,检测到 " + TargetIoType + "=" + TargetIoValue + ",停止运动,AclPosition=" + GetAclPosition().ToString());
AxisStopCheckMove();
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -118,6 +118,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -118,6 +118,26 @@ namespace OnlineStore.DeviceLibrary
//CSVPositionReader<DrawerPosition>.AddCSVFile(drawConfigFile); //CSVPositionReader<DrawerPosition>.AddCSVFile(drawConfigFile);
XLRStore = new XLRStoreBean(Config, inputConfig, boxConfig); XLRStore = new XLRStoreBean(Config, inputConfig, boxConfig);
//for (int i = 0; i < 60; i++)
//{
// var height = i;
// int LastHeight = 0;
// List<int> heightList = StoreManager.GetTrayList();
// heightList = (from m in heightList orderby m descending select m).ToList<int>();
// float minCha = height;
// foreach (int h in heightList)
// {
// //取差值最小的接近值
// float cha = Math.Abs(h - (height - 4));
// if (cha < minCha)
// {
// LastHeight = h;
// minCha = cha;
// }
// }
// LogUtil.info($"height:{height}, cha:{minCha}, 对应高度:{LastHeight}");
//}
LogUtil.info("加载 完成!"); LogUtil.info("加载 完成!");
return true; return true;
} }
......
...@@ -184,7 +184,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -184,7 +184,7 @@ namespace OnlineStore.DeviceLibrary
{ {
mainTimer = new System.Timers.Timer(); mainTimer = new System.Timers.Timer();
mainTimer.Enabled = false; mainTimer.Enabled = false;
mainTimer.Interval = 300; mainTimer.Interval = 200;
mainTimer.Elapsed += mainTimer_Elapsed; mainTimer.Elapsed += mainTimer_Elapsed;
mainTimer.AutoReset = true; mainTimer.AutoReset = true;
......
...@@ -46,7 +46,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,7 +46,6 @@ namespace OnlineStore.DeviceLibrary
Name = ($" {title}_" + " ").ToUpper(); Name = ($" {title}_" + " ").ToUpper();
MoveInfo = new DeviceMoveInfo(Name); MoveInfo = new DeviceMoveInfo(Name);
List<string> ioList = new List<string>(); List<string> ioList = new List<string>();
ioList = new List<string>(DeviceConfig.ProIOIpMap.Values); ioList = new List<string>(DeviceConfig.ProIOIpMap.Values);
......
...@@ -46,16 +46,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,16 +46,34 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
//是否自动进入出库状态 if (StoreManager.XLRStore.boxEquip.paresetReset)
if (!autoNext)
{ {
return; if (storeMoveType == MoveType.InStore)
{
StoreManager.XLRStore.boxEquip.paresetReset = false;
boxBean.LogInfo($"上料机构复位时请求料仓复位");
boxBean.Reset();
CurrInOutCount = 0;
}
} }
CurrInOutCount++; CurrInOutCount++;
if (CurrInOutCount >= boxBean.Config.Box_ResetCount) if (CurrInOutCount >= boxBean.Config.Box_ResetCount)
{ {
boxBean.LogInfo($"存储机构出入库达到{CurrInOutCount}次数,需要复位"); boxBean.LogInfo($"存储机构出入库达到{CurrInOutCount}次数,需要复位");
boxBean.Reset();
//if (storeMoveType == MoveType.InStore)
//{
// boxBean.Reset();
//}
//if (storeMoveType == MoveType.OutStore)
//{
// boxBean.Reset();
//}
}
//是否自动进入出库状态
if (!autoNext)
{
return;
} }
if (storeMoveType.Equals(MoveType.InStore)) if (storeMoveType.Equals(MoveType.InStore))
{ {
......
...@@ -99,7 +99,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -99,7 +99,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// B面等待出库的队列 /// B面等待出库的队列
/// </summary> /// </summary>
//public ConcurrentQueue<InOutParam> waitBOutStoreList = new ConcurrentQueue<InOutParam>(); public ConcurrentQueue<InOutParam> waitBOutStoreList = new ConcurrentQueue<InOutParam>();
//库位表 //库位表
public List<string> PositionNumList; public List<string> PositionNumList;
/// <summary> /// <summary>
...@@ -294,7 +294,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -294,7 +294,19 @@ namespace OnlineStore.DeviceLibrary
SetAllTimer(true); SetAllTimer(true);
return true; return true;
} }
public bool paresetReset = false;
public void SafeReset() {
if (MoveInfo.MoveStep == StepEnum.Wait)
{
LogInfo("料仓没有动作 开始重置");
Reset();
}
else
{
LogInfo("料仓正在动作 结束后重置");
paresetReset = true;
}
}
public override bool Reset() public override bool Reset()
{ {
StopMove(); StopMove();
...@@ -752,9 +764,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -752,9 +764,13 @@ namespace OnlineStore.DeviceLibrary
private DateTime errUpperB = DateTime.Now; private DateTime errUpperB = DateTime.Now;
private DateTime errUnderA = DateTime.Now; private DateTime errUnderA = DateTime.Now;
private DateTime errUnderB = DateTime.Now; private DateTime errUnderB = DateTime.Now;
int SigLastTime = 2;//5秒 int SigLastTime = 7;//5秒
protected override void OnTimerProcess() protected override void OnTimerProcess()
{ {
if (ExecuteOutListProcess()) {
LogInfo("优先出库执行");
return;
}
//if (!runStatus.Equals(RunStatus.Runing)) //if (!runStatus.Equals(RunStatus.Runing))
// return; // return;
TimeSpan timeSpanA = DateTime.Now - dtUpperA; TimeSpan timeSpanA = DateTime.Now - dtUpperA;
...@@ -840,13 +856,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -840,13 +856,13 @@ namespace OnlineStore.DeviceLibrary
dtUpperB = DateTime.Now; dtUpperB = DateTime.Now;
} }
} }
private void ExecuteOutListProcess() private bool ExecuteOutListProcess()
{ {
try try
{ {
if (InDoorSigCheck()) if (InDoorSigCheck())
{ {
return; return false;
} }
if (waitAOutStoreList.Count > 0)// if (waitAOutStoreList.Count > 0)//
{ {
...@@ -858,10 +874,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -858,10 +874,10 @@ namespace OnlineStore.DeviceLibrary
{ {
bool rtn = StartExecuctOut(param); bool rtn = StartExecuctOut(param);
if (rtn) waitAOutStoreList.TryDequeue(out _); if (rtn) waitAOutStoreList.TryDequeue(out _);
return; return rtn;
} }
} }
else //if (CheckAOutDoor()) else if (CheckAOutDoor())
{ {
InOutParam param = null; InOutParam param = null;
bool result = waitAOutStoreList.TryPeek(out param); bool result = waitAOutStoreList.TryPeek(out param);
...@@ -869,40 +885,39 @@ namespace OnlineStore.DeviceLibrary ...@@ -869,40 +885,39 @@ namespace OnlineStore.DeviceLibrary
{ {
bool rtn = StartExecuctOut(param); bool rtn = StartExecuctOut(param);
if (rtn) waitAOutStoreList.TryDequeue(out _); if (rtn) waitAOutStoreList.TryDequeue(out _);
return; return rtn;
}
}
}
if (waitBOutStoreList.Count > 0)//
{
if (CloseOutStoreCheck)
{
InOutParam param = null;
bool result = waitBOutStoreList.TryDequeue(out param);
if (result && param != null)
{
LogInfo("执行B面排队的出库【" + param.PosInfo.ToStr() + "】");
return StartExecuctOut(param);
}
}
else if (CheckBOutDoor())
{
InOutParam param = null;
bool result = waitBOutStoreList.TryDequeue(out param);
if (result && param != null)
{
LogInfo("执行B面排队的出库【" + param.PosInfo.ToStr() + "】");
return StartExecuctOut(param);
} }
} }
} }
//if (waitBOutStoreList.Count > 0)//
//{
// if (CloseOutStoreCheck)
// {
// InOutParam param = null;
// bool result = waitBOutStoreList.TryDequeue(out param);
// if (result && param != null)
// {
// LogInfo("执行B面排队的出库【" + param.PosInfo.ToStr() + "】");
// StartExecuctOut(param);
// return;
// }
// }
// else if (CheckBOutDoor())
// {
// InOutParam param = null;
// bool result = waitBOutStoreList.TryDequeue(out param);
// if (result && param != null)
// {
// LogInfo("执行B面排队的出库【" + param.PosInfo.ToStr() + "】");
// StartExecuctOut(param);
// return;
// }
// }
//}
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(Name + "处理出库排队列表出错:" + ex.ToString()); LogUtil.error(Name + "处理出库排队列表出错:" + ex.ToString());
} }
return false;
} }
protected override void BaseTimerProcess() protected override void BaseTimerProcess()
{ {
......
...@@ -408,7 +408,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -408,7 +408,7 @@ namespace OnlineStore.DeviceLibrary
//判断排队列表中是否已存在 //判断排队列表中是否已存在
List<InOutParam> reviceList = new List<InOutParam>(); List<InOutParam> reviceList = new List<InOutParam>();
reviceList.AddRange(waitAOutStoreList); reviceList.AddRange(waitAOutStoreList);
// reviceList.AddRange(waitBOutStoreList); reviceList.AddRange(waitBOutStoreList);
reviceList = (from m in reviceList where m.PosInfo.PosId.Equals(posId) select m).ToList<InOutParam>(); reviceList = (from m in reviceList where m.PosInfo.PosId.Equals(posId) select m).ToList<InOutParam>();
if (reviceList.Count > 0) if (reviceList.Count > 0)
{ {
...@@ -417,8 +417,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -417,8 +417,8 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
waitAOutStoreList.Enqueue(inoutParam); //waitAOutStoreList.Enqueue(inoutParam);
LogUtil.info($"加入出库队列:{inoutParam.PosInfo.ToStr()}"); //LogUtil.info($"加入出库队列:{inoutParam.PosInfo.ToStr()}");
} }
} }
...@@ -426,7 +426,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -426,7 +426,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error(Name + "验证出库【" + inoutParam.PosInfo.ToStr() + "】是否重复出错:" + ex.ToString()); LogUtil.error(Name + "验证出库【" + inoutParam.PosInfo.ToStr() + "】是否重复出错:" + ex.ToString());
} }
//StartExecuctOut(inoutParam); StartExecuctOut(inoutParam);
} }
TimeSpan span = DateTime.Now - time; TimeSpan span = DateTime.Now - time;
......
...@@ -459,14 +459,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -459,14 +459,14 @@ namespace OnlineStore.DeviceLibrary
inOut.PosInfo.IsNG = true; inOut.PosInfo.IsNG = true;
inOut.PosInfo.NgMsg = "验证入库完成失败"; inOut.PosInfo.NgMsg = "验证入库完成失败";
LogInfo($"入库 {MoveInfo.SLog}:验证入库完成失败,将该库位出库[{inOut.PosInfo.ToStr()}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"入库 {MoveInfo.SLog}:验证入库完成失败,将该库位出库[{inOut.PosInfo.ToStr()}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// if (CheckASide()) if (CheckASide())
{ {
waitAOutStoreList.Enqueue(inOut); waitAOutStoreList.Enqueue(inOut);
} }
//else else
//{ {
// waitBOutStoreList.Enqueue(inOut); waitBOutStoreList.Enqueue(inOut);
//} }
} }
break; break;
case StepEnum.SI_19_InoutBack: case StepEnum.SI_19_InoutBack:
......
...@@ -184,52 +184,52 @@ namespace OnlineStore.DeviceLibrary ...@@ -184,52 +184,52 @@ namespace OnlineStore.DeviceLibrary
break; break;
case StepEnum.SO_13_InoutBack: case StepEnum.SO_13_InoutBack:
//检查另一面是否有出库任务 //检查另一面是否有出库任务
//if (MoveInfo.MoveParam.PosInfoBack == null) if (MoveInfo.MoveParam.PosInfoBack == null)
//{ {
// if (CheckASide(MoveInfo.MoveParam)) if (CheckASide(MoveInfo.MoveParam))
// { {
// if (waitBOutStoreList.Count > 0 && CheckBOutDoor()) if (waitBOutStoreList.Count > 0 && CheckBOutDoor())
// { {
// if (waitBOutStoreList.TryDequeue(out InOutParam inOutParam))//B面料叉空且B面出料口无料,有出库任务 if (waitBOutStoreList.TryDequeue(out InOutParam inOutParam))//B面料叉空且B面出料口无料,有出库任务
// { {
// MoveInfo.NextMoveStep(StepEnum.SO_01_PullAxis_Ready); MoveInfo.NextMoveStep(StepEnum.SO_01_PullAxis_Ready);
// LogInfo($"存储机构-出库 {MoveInfo.SLog}:A面切换到B面,B面取料[{inOutParam.PosInfo.barcode}]"); LogInfo($"存储机构-出库 {MoveInfo.SLog}:A面切换到B面,B面取料[{inOutParam.PosInfo.barcode}]");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
// MoveInfo.MoveParam.PosInfoBack = MoveInfo.MoveParam.PosInfo.ToCopy(); MoveInfo.MoveParam.PosInfoBack = MoveInfo.MoveParam.PosInfo.ToCopy();
// MoveInfo.MoveParam.PosInfo = inOutParam.PosInfo.ToCopy(); MoveInfo.MoveParam.PosInfo = inOutParam.PosInfo.ToCopy();
// MoveInfo.MoveParam.MoveP = new LineMoveP(Config, inOutParam.PosInfo.PosId); MoveInfo.MoveParam.MoveP = new LineMoveP(Config, inOutParam.PosInfo.PosId);
// PullAxis_Inout_To_Cam(); PullAxis_Inout_To_Cam();
// return; return;
// } }
// } }
// } }
// else else
// { {
// if (waitAOutStoreList.Count > 0 && CheckAOutDoor()) if (waitAOutStoreList.Count > 0 && CheckAOutDoor())
// { {
// if (waitAOutStoreList.TryDequeue(out InOutParam inOutParam)) if (waitAOutStoreList.TryDequeue(out InOutParam inOutParam))
// { {
// MoveInfo.NextMoveStep(StepEnum.SO_01_PullAxis_Ready); MoveInfo.NextMoveStep(StepEnum.SO_01_PullAxis_Ready);
// LogInfo($"存储机构-出库 {MoveInfo.SLog}:B面切换到A面,A面取料[{inOutParam.PosInfo.barcode}]"); LogInfo($"存储机构-出库 {MoveInfo.SLog}:B面切换到A面,A面取料[{inOutParam.PosInfo.barcode}]");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
// MoveInfo.MoveParam.PosInfoBack = MoveInfo.MoveParam.PosInfo.ToCopy(); MoveInfo.MoveParam.PosInfoBack = MoveInfo.MoveParam.PosInfo.ToCopy();
// MoveInfo.MoveParam.PosInfo = inOutParam.PosInfo.ToCopy(); MoveInfo.MoveParam.PosInfo = inOutParam.PosInfo.ToCopy();
// MoveInfo.MoveParam.MoveP = new LineMoveP(Config, inOutParam.PosInfo.PosId); MoveInfo.MoveParam.MoveP = new LineMoveP(Config, inOutParam.PosInfo.PosId);
// PullAxis_Inout_To_Cam(); PullAxis_Inout_To_Cam();
// return; return;
// } }
// } }
// } }
//} }
//else//两夹爪都有料 else//两夹爪都有料
//{ {
// if(MoveInfo.MoveParam.PosInfoBack.PlateW==MoveInfo.MoveParam.PosInfo.PlateW && if (MoveInfo.MoveParam.PosInfoBack.PlateW == MoveInfo.MoveParam.PosInfo.PlateW &&
// MoveInfo.MoveParam.PosInfoBack.PlateH == MoveInfo.MoveParam.PosInfo.PlateH) MoveInfo.MoveParam.PosInfoBack.PlateH == MoveInfo.MoveParam.PosInfo.PlateH)
// { {
// MoveInfo.NextMoveStep(StepEnum.SOB_14_GetReels_Ready); MoveInfo.NextMoveStep(StepEnum.SOB_14_GetReels_Ready);
// return; return;
// } }
//} }
//直接出库,执行该步骤的情况:1.另一个料叉有料;2.另一面有出库任务但出料口有料;3.另一面没有出库任务; //直接出库,执行该步骤的情况:1.另一个料叉有料;2.另一面有出库任务但出料口有料;3.另一面没有出库任务;
MoveInfo.NextMoveStep(StepEnum.SO_14_GetReels_Ready); MoveInfo.NextMoveStep(StepEnum.SO_14_GetReels_Ready);
MoveAxisToP1(); MoveAxisToP1();
......
...@@ -1202,35 +1202,35 @@ namespace OnlineStore.DeviceLibrary ...@@ -1202,35 +1202,35 @@ namespace OnlineStore.DeviceLibrary
{ {
bool result = false; bool result = false;
result = StartOutstore(param); result = StartOutstore(param);
return result; if (!result)
//if (!result) {
//{ lock (outStoreObject)
// lock (outStoreObject) {
// { if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveParam.PosInfo.PosId.Equals(param.PosInfo.PosId))
// if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveParam.PosInfo.PosId.Equals(param.PosInfo.PosId)) {
// { LogUtil.error(Name + " 出库命令【" + param.PosInfo.ToStr() + "】重复,【" + MoveInfo.MoveParam.PosInfo.PosId + "】出库执行中");
// LogUtil.error(Name + " 出库命令【" + param.PosInfo.ToStr() + "】重复,【" + MoveInfo.MoveParam.PosInfo.PosId + "】出库执行中"); return false;
// return false; }
// }
// List<InOutParam> reviceList = new List<InOutParam>(); List<InOutParam> reviceList = new List<InOutParam>();
// reviceList.AddRange(waitAOutStoreList); reviceList.AddRange(waitAOutStoreList);
// //reviceList.AddRange(waitBOutStoreList); reviceList.AddRange(waitBOutStoreList);
// reviceList = (from m in reviceList where m.PosInfo.PosId.Equals(param.PosInfo.PosId) select m).ToList<InOutParam>(); reviceList = (from m in reviceList where m.PosInfo.PosId.Equals(param.PosInfo.PosId) select m).ToList<InOutParam>();
// if (reviceList.Count == 0) if (reviceList.Count == 0)
// { {
// //LogInfo(" 执行出库【" + param.PosInfo.ToStr() + "】失败,加入等待队列"); LogInfo(" 执行出库【" + param.PosInfo.ToStr() + "】失败,加入等待队列");
// // if (param.PosInfo.GetPosSide().Equals("A")) if (param.PosInfo.GetPosSide().Equals("A"))
// { {
// waitAOutStoreList.Enqueue(param); waitAOutStoreList.Enqueue(param);
// } }
// //else if (param.PosInfo.GetPosSide().Equals("B")) else if (param.PosInfo.GetPosSide().Equals("B"))
// //{ {
// // waitBOutStoreList.Enqueue(param); waitBOutStoreList.Enqueue(param);
// //} }
// } }
// } }
//} }
return result;
} }
private DateTime startOutStoreTime = DateTime.Now; private DateTime startOutStoreTime = DateTime.Now;
/// <summary> /// <summary>
......
...@@ -345,7 +345,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -345,7 +345,10 @@ namespace OnlineStore.DeviceLibrary
targetP2 = Config.BatchAxisP2; targetP2 = Config.BatchAxisP2;
} }
} }
targetSpeed = Robot.Config.BatchAxis_P3Speed/2; targetSpeed = Robot.Config.BatchAxis_P3Speed;
}
else {
targetSpeed = Robot.Config.BatchAxis_P1Speed;
} }
// 需要增加定时器,获取验证信号并停止伺服 // 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition(); StartMovePosition = BatchAxis.GetAclPosition();
...@@ -365,7 +368,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -365,7 +368,7 @@ namespace OnlineStore.DeviceLibrary
public void BatchAxisDown() public void BatchAxisDown()
{ {
int targetP1 = Config.BatchAxisP1; int targetP1 = Config.BatchAxisP1;
int targetSpeed = Robot.Config.BatchAxis_P3Speed / 2; int targetSpeed = Robot.Config.BatchAxis_P1Speed;
{ {
MoveInfo.TimeOutSeconds = 200; MoveInfo.TimeOutSeconds = 200;
MoveInfo.CanWhileCount = 0; MoveInfo.CanWhileCount = 0;
......
...@@ -312,7 +312,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -312,7 +312,12 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StepEnum.IB16_SaveHight); MoveInfo.NextMoveStep(StepEnum.IB16_SaveHight);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LastHeight = GetHeight(); int width = 7;
if (StoreManager.XLRStore.inputEquip.IOValue(IO_Type.Feeding_Reel_13_Check).Equals(IO_VALUE.HIGH))
{
width = 13;
}
LastHeight = GetHeight(width);
} }
else if (MoveInfo.IsStep(StepEnum.IB17_WaitReelLeave)) else if (MoveInfo.IsStep(StepEnum.IB17_WaitReelLeave))
{ {
...@@ -558,7 +563,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -558,7 +563,7 @@ namespace OnlineStore.DeviceLibrary
public int EndMovePosition = 0; public int EndMovePosition = 0;
internal int LastHeight = 0; internal int LastHeight = 0;
string[] cames; string[] cames;
public int GetHeight() public int GetHeight(int width=7)
{ {
CodeManager.CameraCheckHeight(cames?.ToList(), Name); CodeManager.CameraCheckHeight(cames?.ToList(), Name);
LogUtil.info($"{Name} 采集料盘抓走后的图片,开始计算高度"); LogUtil.info($"{Name} 采集料盘抓走后的图片,开始计算高度");
...@@ -574,6 +579,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -574,6 +579,12 @@ namespace OnlineStore.DeviceLibrary
isLast = true; isLast = true;
} }
float height = (float)(1F * Math.Abs(EndMovePosition - StartMovePosition) / AxisChangeValue);//Math.Ceiling float height = (float)(1F * Math.Abs(EndMovePosition - StartMovePosition) / AxisChangeValue);//Math.Ceiling
if (width >= 13) {
height = height - 2;
LogUtil.info($"检测为13寸高度-2={height}");
}
string buchongStr = ""; string buchongStr = "";
if (isLast) if (isLast)
{ {
......
...@@ -153,11 +153,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -153,11 +153,12 @@ namespace OnlineStore.DeviceLibrary
void InoutEndEvent() void InoutEndEvent()
{ {
inoutCnt++; inoutCnt++;
if (inoutCnt > resetCnt) if (inoutCnt > resetCnt && BatchMove_A.MoveInfo.ShelfNoTray && BatchMove_B.MoveInfo.ShelfNoTray)
{ {
OnlyResetInputAxis = true; OnlyResetInputAxis = true;
LogUtil.info($"入料机构出入库到达{resetCnt},准备复位"); LogUtil.info($"入料机构出入库到达{resetCnt},准备复位");
Reset(); Reset();
StoreManager.XLRStore.boxEquip.SafeReset();
} }
} }
public override bool Reset() public override bool Reset()
......
...@@ -68,7 +68,7 @@ namespace OnlineStore.XLRStore ...@@ -68,7 +68,7 @@ namespace OnlineStore.XLRStore
{ {
启用门禁ToolStripMenuItem.Text = "禁用门禁"; 启用门禁ToolStripMenuItem.Text = "禁用门禁";
} }
//tabControl1.TabPages.Remove(tabPage5); tabControl1.TabPages.Remove(tabPage1);
timer1.Start(); timer1.Start();
启用配置模式ToolStripMenuItem.Enabled = true; 启用配置模式ToolStripMenuItem.Enabled = true;
} }
......
...@@ -280,6 +280,7 @@ ...@@ -280,6 +280,7 @@
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="useControl\AxisMoveControl.resx"> <EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="inputForm\FrmInputEquip.resx"> <EmbeddedResource Include="inputForm\FrmInputEquip.resx">
<DependentUpon>FrmInputEquip.cs</DependentUpon> <DependentUpon>FrmInputEquip.cs</DependentUpon>
......
...@@ -189,15 +189,15 @@ namespace OnlineStore.XLRStore ...@@ -189,15 +189,15 @@ namespace OnlineStore.XLRStore
text += param.PosInfo.ToStr() + "\r"; text += param.PosInfo.ToStr() + "\r";
} }
} }
//List<InOutParam> psB = new List<InOutParam>(boxBean.waitBOutStoreList); List<InOutParam> psB = new List<InOutParam>(boxBean.waitBOutStoreList);
//if (psB.Count > 0) if (psB.Count > 0)
//{ {
// text = "B面等待出库列表:\r"; text = "B面等待出库列表:\r";
// foreach (InOutParam param in psB) foreach (InOutParam param in psB)
// { {
// text += param.PosInfo.ToStr() + "\r"; text += param.PosInfo.ToStr() + "\r";
// } }
//} }
} }
} }
if (!lblInstoreList.Text.Equals(text)) if (!lblInstoreList.Text.Equals(text))
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!