Commit bd2f201a 几米阳光

增加批量上料模块状态

1 个父辈 8851ef0f
......@@ -303,14 +303,6 @@ namespace OnlineStore.AutoInOutStore
btnGetOutTray.Enabled = map[ParamDefine.takeOutReel].Equals(ParamDefine.enable);
btnCloseDoor.Enabled = map[ParamDefine.closeLock].Equals(ParamDefine.enable);
//if (AutomaticBaiting.DoorStatus.Equals(2))
//{
// lblDoorStatus.Text = "仓门状态:关闭";
//}
//else
//{
// lblDoorStatus.Text = "仓门状态:打开";
//}
lblDoorStatus.Text = map[ParamDefine.doorStatus];
lblOutInfo.Visible = !lblWaitTragGo.Visible;
lblOutInfo.Text = "批量出入库信息: 入库:" + AutomaticBaiting.BatchInStoreCount + "盘共" + AutomaticBaiting.BatchInStoreHeight + "mm," +
......
......@@ -1502,23 +1502,29 @@ namespace OnlineStore.DeviceLibrary
private int GetStoreStatus()
{
return (int)storeStatus;
int status = (int)storeStatus;
if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && (StoreMove.IsNeedInStore.Equals(false)))
{
status = (int)StoreStatus.SendTrayOut;
}
//如果料仓没有出入库,但是自动上下料机构在上料中
if (storeStatus.Equals(StoreStatus.StoreOnline))
{
if (AutomaticBaiting.StoreMove.MoveType.Equals(StoreMoveType.InStore))
{
return (int)StoreStatus.InStoreExecute;
status = (int)StoreStatus.BatchInStore;
}
else if (AutomaticBaiting.StoreMove.MoveType.Equals(StoreMoveType.StoreReset))
{
return (int)StoreStatus.ResetMove;
status = (int)StoreStatus.BatchReset;
}
}
if (IsDebug)
{
return (int)StoreStatus.Debugging;
status = (int)StoreStatus.Debugging;
}
return status;
}
private void SendLineStatus()
......
......@@ -346,11 +346,16 @@ namespace OnlineStore.DeviceLibrary
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_02_InOutAxisHome)
{
InStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1, 轴4动作至P3");
InStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1, 轴4动作至P3,等待吸盘处于上升位置");
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
ComMoveToPosition(moveP.ComPress_P3);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
//此处需要等待吸盘在上升位置
KND.IOMove(IO_Type.SuckingDisc_Up, IO_VALUE.HIGH);
KND.IOMove(IO_Type.SuckingDisc_Down, IO_VALUE.LOW);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Up, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Down, IO_VALUE.LOW));
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_03_ReturnHome)
{
......@@ -844,17 +849,22 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition);
if (StoreMove.IsBatchInOutStore)
{
OutStoreLog("出库:SO_08 升降轴到出料高点P2,旋转轴至P1(待机点),等待门锁关闭 ");
OutStoreLog("出库:SO_08 升降轴到出料高点P2,旋转轴至P1(待机点),等待吸盘处于上升端");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_OutHigh_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
//BatchAxisUpTrayHeight();
}
else
{
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点) ");
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),等待吸盘处于上升端 ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_Door_P7, Config.UpDownAxis_P7_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
//此处需要等待吸盘在上升位置
KND.IOMove(IO_Type.SuckingDisc_Up, IO_VALUE.HIGH);
KND.IOMove(IO_Type.SuckingDisc_Down, IO_VALUE.LOW);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Up, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Down, IO_VALUE.LOW));
}
private void SO_10_DeviceToDoorPro()
{
......
......@@ -313,14 +313,24 @@ namespace OnlineStore.DeviceLibrary
//TODO 报警
WarnMsg = "吸盘吸料失败,请复位后拿出此料盘";
StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, "吸盘吸料失败", WarnMsg, StoreMoveType.InStore);
LogUtil.error(WarnMsg, 103);
}
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I06_SuckingDisc_Up))
{
if (KND.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I07_BatchAxisUp);
LogUtil.info(Name + "入料: 批量上下料轴上升速度【" + StoreManager.Config.Batch_Axis.TargetSpeed + "】");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
}
else
{
WarnMsg = "吸盘吸料失败,请复位后拿出此料盘";
StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, "吸盘吸料失败", WarnMsg, StoreMoveType.InStore);
LogUtil.error(Name + "入料: 吸盘上升后未检测到吸盘压力信号,吸取料盘失败",105);
}
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I07_BatchAxisUp))
{
if (StoreManager.Store.CanStarInOut())
......
......@@ -348,7 +348,7 @@ namespace OnlineStore.DeviceLibrary
if (StoreManager.Store.CanStarInOut())
{
LastPosId = posId;
InOutStoreParam param = new InOutStoreParam(message, posId, LastHeight, LastWidth );
InOutStoreParam param = new InOutStoreParam(message, posId, LastHeight, LastWidth);
StoreManager.Store.StartInStoreMove(param, true);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(Name + " 入库调试模拟:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
......@@ -361,8 +361,7 @@ namespace OnlineStore.DeviceLibrary
}
}
//开启服务器日志
HttpHelper.isLog = 1;
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
//HttpHelper.isLog = 1;
LogUtil.info(Name + "收到二维码【 " + message + "】,发送给服务器获取入库PosID");
//发送扫码内容到服务器进行入库操作
Operation operation = StoreManager.Store.getLineBoxStatus();
......@@ -378,7 +377,7 @@ namespace OnlineStore.DeviceLibrary
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
Operation resultOperation = HttpHelper.Post(StoreManager.GetPostApi(server), operation, false);
HttpHelper.isLog = ConfigAppSettings.GetIntValue(Setting_Init.Server_Log_Open);
//HttpHelper.isLog = ConfigAppSettings.GetIntValue(Setting_Init.Server_Log_Open);
if (resultOperation == null)
{
......@@ -437,9 +436,10 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info(Name + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 正在忙碌中,无法入库!");
}
}catch(Exception ex)
}
catch (Exception ex)
{
LogUtil.error(Name +"解析服务发送的入库【"+posId+"】出错"+ ex.StackTrace);
LogUtil.error(Name + "解析服务发送的入库【" + posId + "】出错" + ex.StackTrace);
}
}
}
......
......@@ -48,6 +48,9 @@ namespace OnlineStore.DeviceLibrary
///2=急停,3=故障,4=警告,5=调试
/// 6=入库执行中,7=入仓完成,8=入仓失败
/// 9=出库执行,10=出仓完成,11=出库失败
/// 14=批量上料中
/// 15= 扫码失败或无库位料盘送出
/// 16=批量上料模块复位中
/// </summary>
public enum StoreStatus
{
......@@ -100,9 +103,22 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
OutStoreFaild = 11,
/// <summary>
/// 重置中(原点返回和重置都发此状态)
/// 13=重置中(原点返回和重置都发此状态)
/// </summary>
ResetMove=13,
/// <summary>
/// 14=批量上料中
/// </summary>
BatchInStore=14,
/// <summary>
///15= 扫码失败或无库位料盘送出
/// </summary>
SendTrayOut=15,
/// <summary>
/// 16=批量上料模块复位中
/// </summary>
BatchReset=16,
}
/// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!