Commit 243d29d0 几米阳光

入库流程修改

1 个父辈 9267c47b
......@@ -37,15 +37,33 @@
批量上料开始按钮没有锁门
批量上料模块报警,出入库不影响
轴在原点的时候再次原点返回需要反向走相对量。
轴在原点的时候再次原点返回需要反向走相对量。
上料过程中报警了,复位后又开始自动上料
压紧轴原点返回之前,先相对走-2000;
上料过程中报警了,复位后又开始自动上料
叉子未后退完成,吸盘就下降了
压紧轴原点返回之前,先相对走-2000;
如果是未扫到码或者没有入库成功,需要将料盘送出,送出之后批量上料功能才能继续。
需要修改还未修改的:
X12_上料机构出料检测信号:
批量出入库玩抽,打开门DI-21没有以后,上料机构上升,X12ON后停止,X12OFF以后再上升,检测到上极限亮了以后,X12OFF后,轴下降至原点位置。
X16_压紧轴机构计量检测:
此信号每4mm就会亮一次,压紧轴运动过程中需要检测此信号闪的次数。
X04_安全光栅:
光栅默认为High,每次开关门之前都要验证。
X22_气压检测:
运行过程中需要持续检测气压信号,若持续没有气压需要报警。
叉子未后退完成,吸盘就下降了
......
......@@ -199,6 +199,10 @@ namespace OnlineStore.Common
/// <summary>
/// 温度报警值
/// </summary>
public static string maxTemperature = "temp";
public static string maxTemperature = "temp";
/// <summary>
/// 是否是单个出库,true表示单个出库,其他都是批量出库
/// </summary>
public static string singleOut = "singleOut";
}
}
......@@ -436,14 +436,18 @@ namespace OnlineStore.DeviceLibrary
}
private void OpenDoorAndWait()
{
if (StoreMove.MoveType.Equals(StoreMoveType.InStore) || StoreMove.MoveType.Equals(StoreMoveType.OutStore))
if (StoreMove.MoveType.Equals(StoreMoveType.InStore))
{
//如果是批量出入库,不需要经过此门
if (StoreMove.IsBatchInOutStore)
if (StoreMove.IsBatchInOutStore && StoreMove.IsNeedInStore)
{
return;
}
}
else if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.IsBatchInOutStore)
{
return;
}
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.HIGH));
KND.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
......@@ -451,14 +455,18 @@ namespace OnlineStore.DeviceLibrary
}
private void CloseDoorAndWait()
{
if (StoreMove.MoveType.Equals(StoreMoveType.InStore) || StoreMove.MoveType.Equals(StoreMoveType.OutStore))
if (StoreMove.MoveType.Equals(StoreMoveType.InStore))
{
//如果是批量出入库,不需要经过此门
if (StoreMove.IsBatchInOutStore)
if (StoreMove.IsBatchInOutStore && StoreMove.IsNeedInStore)
{
return;
}
}
else if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.IsBatchInOutStore)
{
return;
}
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.LOW));
KND.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
......@@ -977,30 +985,29 @@ namespace OnlineStore.DeviceLibrary
{
try
{
TimeSpan span = DateTime.Now - preIoTimerOutTime;
if (span.TotalSeconds > 1)
if (storeRunStatus < StoreRunStatus.Runing)
{
preIoTimerOutTime = DateTime.Now;
if (!alarmType.Equals(StoreAlarmType.IoSingleTimeOut))
{
return;
}
if (storeRunStatus < StoreRunStatus.Runing)
{
return;
}
if (isInSuddenDown || isNoAirCheck)
{
return;
}
return;
}
if (isInSuddenDown || isNoAirCheck)
{
return;
}
TimeSpan span = DateTime.Now - preIoTimerOutTime;
if (span.TotalSeconds < 1)
{ return; }
preIoTimerOutTime = DateTime.Now;
if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut) || alarmType.Equals(StoreAlarmType.BatchAlarm) || alarmType.Equals(StoreAlarmType.BatchIoTimeOut))
{
//若BOX和移栽都没有在等待Io的过程中则此Io超时异常可能已经处理过
if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut)&&StoreMove.IsInWait == false)
if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut) && StoreMove.IsInWait == false)
{
LogUtil.info(StoreName + "当前空闲中,清理信号超时异常【" + alarmInfo.alarmDetail + "】");
alarmType = StoreAlarmType.None;
WarnMsg = "";
}else if (alarmType.Equals(StoreAlarmType.BatchAlarm) || alarmType.Equals(StoreAlarmType.BatchIoTimeOut))
}
else if (alarmType.Equals(StoreAlarmType.BatchAlarm) || alarmType.Equals(StoreAlarmType.BatchIoTimeOut))
{
if (AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.StoreMove.IsInWait.Equals(false))
{
......@@ -1010,6 +1017,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
catch (Exception ex)
{
......
......@@ -280,7 +280,11 @@ namespace OnlineStore.DeviceLibrary
}
/// <summary>
/// 开始入库移动移动
/// </summary>
/// </summary>
/// <param name="param">入库参数</param>
/// <param name="IsBatchWork">是否批量出库</param>
/// <param name="isNeedInStore">是否需要入库,不需要入库时直接等待拿走料盘</param>
/// <returns></returns>
public bool StartInStoreMove(InOutStoreParam param, bool IsBatchWork, bool isNeedInStore)
{
InOutWatch.Restart();
......
......@@ -159,7 +159,7 @@ namespace OnlineStore.DeviceLibrary
if (IsNeedStartInout)
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_R03_AutoAxisHome);
LogUtil.info(Name + "复位中:需要批量入库,检测是否有料盘");
LogUtil.info(Name + "复位中:需要检测是否有料盘,批量轴匀速上升速度【" + StoreManager.Config.Batch_Axis.TargetSpeed + "】");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
}
else
......@@ -236,7 +236,7 @@ namespace OnlineStore.DeviceLibrary
return;
}
if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I01_Wait))
{
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I02_MoveToUp);
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
{
......@@ -244,7 +244,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil.info(Name + " 入料 ,轴上升到检测到料盘");
LogUtil.info(Name + " 入料 ,轴上升到检测到料盘,速度【"+ StoreManager.Config.Batch_Axis.TargetSpeed + "】");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
}
}
......@@ -294,7 +294,7 @@ namespace OnlineStore.DeviceLibrary
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I06_SuckingDisc_Up))
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I07_BatchAxisUp);
LogUtil.info(Name + "入料: 批量上下料轴上升");
LogUtil.info(Name + "入料: 批量上下料轴上升速度【" + StoreManager.Config.Batch_Axis.TargetSpeed + "】");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I07_BatchAxisUp))
......@@ -303,10 +303,8 @@ namespace OnlineStore.DeviceLibrary
{
if (LastCode.Equals(""))
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I10_WaitTrayGo);
LogUtil.info(Name + "入料: 未扫到二维码,叉子过来拿料盘");
string posId = StoreManager.Store.PositionNumList[0];
StoreManager.Store.StartInStoreMove(new InOutStoreParam("", posId), true, false);
LogUtil.info(Name + "入料: 未扫到二维码,将料盘送出,等待料盘拿走");
SendTrayOut();
}
else
{
......@@ -334,15 +332,14 @@ namespace OnlineStore.DeviceLibrary
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I10_WaitTrayGo);
LogUtil.info(Name + "入料: 未扫到二维码,叉子过来拿料盘");
string posId = StoreManager.Store.PositionNumList[0];
StoreManager.Store.StartInStoreMove(new InOutStoreParam("", posId), true, false);
LogUtil.info(Name + "入料: 未获取到PosID或启动入库失败,将料盘送出,等待料盘拿走");
SendTrayOut();
}
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I09_WaitTrayLeave))
{
if (StoreManager.Store.StoreMove.MoveStep >= StoreMoveStep.SI_09_MoveToBag)
if (StoreManager.Store.StoreMove.MoveType.Equals(StoreMoveType.None) ||
(StoreManager.Store.StoreMove.IsNeedInStore && StoreManager.Store.StoreMove.MoveStep >= StoreMoveStep.SI_09_MoveToBag))
{
IsNeedScanCode();
}
......@@ -366,6 +363,16 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "未找到步骤:" + StoreMove.MoveType);
}
}
private static void SendTrayOut()
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I10_WaitTrayGo);
StoreMove.TimeOutSeconds = 120;
string posId = StoreManager.Store.PositionNumList[0];
StoreManager.Store.StartInStoreMove(new InOutStoreParam("", posId), true, false);
StoreMove.WaitList.Add(WaitResultInfo.WaitStoreRuning());
}
private static void SuckingDiscWork()
{
KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
......
......@@ -136,6 +136,9 @@ namespace OnlineStore.DeviceLibrary
else if (wait.WaitType == (int)Wait_Type.ScanCode_11)
{
wait.IsEnd = (LastCode.Equals("").Equals(false));
}else if (wait.WaitType == (int)Wait_Type.StoreRuning_13)
{
wait.IsEnd = (StoreManager.Store.storeRunStatus.Equals(StoreRunStatus.Runing) && StoreManager.Store.StoreMove.MoveType.Equals(StoreMoveType.None));
}
if (wait.IsEnd)
{
......@@ -400,6 +403,8 @@ namespace OnlineStore.DeviceLibrary
string posId = data[ParamDefine.posId];
string plateW = data[ParamDefine.plateW];
string plateH = data[ParamDefine.plateH];
string singleOut = data[ParamDefine.singleOut];
bool isSingleOut = singleOut.ToLower().Equals("true");
string[] posArray = posId.Split('#');
if (!(posArray.Length == 2))
{
......@@ -424,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
LastPosId = posId;
InOutStoreParam param = new InOutStoreParam(message, posId, plateH, plateW, 0);
StoreManager.Store.StartInStoreMove(param, true);
StoreManager.Store.StartInStoreMove(param, !isSingleOut);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(Name + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
}
......
......@@ -307,6 +307,12 @@ namespace OnlineStore.DeviceLibrary
wait.WaitType = (int)Wait_Type.TakeTrayGo_12;
return wait;
}
public static WaitResultInfo WaitStoreRuning()
{
WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = (int)Wait_Type.StoreRuning_13;
return wait;
}
public string ToStr()
{
if (WaitType == (int)Wait_Type.AxisMove_1)
......@@ -361,12 +367,18 @@ namespace OnlineStore.DeviceLibrary
}else if(WaitType == (int)Wait_Type.TakeTrayGo_12)
{
return "等待操作人员拿走料盘";
}else if (WaitType == (int)Wait_Type.StoreRuning_13)
{
return "等待送料结束";
}
else
{
return "Wait位置类型:WaitType=【" + WaitType + "】";
}
}
/// <summary>
/// 当未结束时可以重复运动的次数
/// </summary>
......@@ -475,6 +487,10 @@ namespace OnlineStore.DeviceLibrary
/// 12=操作人员拿走料盘,并点击确定。
/// </summary>
TakeTrayGo_12 = 12,
/// <summary>
/// 等待料仓正常运行无操作,等待送料结束
/// </summary>
StoreRuning_13,
}
public enum StoreMoveType
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!