Commit a8dda7d4 几米阳光

增加清料功能。出库时若门口无料盘需要报警

1 个父辈 a667c512
...@@ -244,7 +244,7 @@ namespace OnlineStore.ACSingleStore ...@@ -244,7 +244,7 @@ namespace OnlineStore.ACSingleStore
//如果不在出入库中,且叉子上有信号,需要提示检查叉子 //如果不在出入库中,且叉子上有信号,需要提示检查叉子
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && store.KNDIOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && store.KNDIOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
lblWarnMsg.Text = lblWarnMsg.Text + " 叉子料盘检测有料,请检查"; lblWarnMsg.Text = lblWarnMsg.Text + " 叉子料盘检测有料,请检查或复位";
} }
if (store.autoNext) if (store.autoNext)
{ {
......
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
3.扫码不需要每次都关闭相机。 3.扫码不需要每次都关闭相机。
增加功能:
1,复位时增加料盘感应功能,感应到料盘时给提示且增加出库功能
2,出库完成时,通过料仓窗口高度感应检测出料有无料盘,无料盘提示报警。
......
...@@ -319,23 +319,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -319,23 +319,11 @@ namespace OnlineStore.DeviceLibrary
private void InoutStartReset() private void InoutStartReset()
{ {
string portName = Config.InOut_Axis.DeviceName; string portName = Config.InOut_Axis.DeviceName;
int slvAddr = Config.InOut_Axis.GetAxisValue(); int slvAddr = Config.InOut_Axis.GetAxisValue();
//if (ACServerManager.GetHomeEndStatus(portName, slvAddr).Equals(1)
// && ACServerManager.GetHomeSingle(portName, slvAddr).Equals(1))
//{
// StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutMove);
// LogUtil.info(LOGGER, StoreName + "复位中,进出轴原点亮且已经原点返回过,先相对走-5000");
// int currPos = ACServerManager.GetActualtPosition(portName, slvAddr);
// int targetPos = currPos - 5000;
// ACAxisMove(Config.InOut_Axis, targetPos, Config.InoutAxis_HomeLowSpeed);
//}
//else
//{
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack); StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack);
LogUtil.info(LOGGER, StoreName + "复位中,进出轴开始原点返回"); LogUtil.info(LOGGER, StoreName + "复位中,进出轴开始原点返回");
ACAxisHomeMove(Config.InOut_Axis); ACAxisHomeMove(Config.InOut_Axis);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
//}
} }
/// <summary> /// <summary>
/// 复位处理 /// 复位处理
...@@ -404,13 +392,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -404,13 +392,19 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition(Config.CompressAxis_P1_Position); ComMoveToPosition(Config.CompressAxis_P1_Position);
break; break;
case StoreMoveStep.BOX_H_MiddleAxisToP1: case StoreMoveStep.BOX_H_MiddleAxisToP1:
LogUtil.info(LOGGER, StoreName + "复位完成"); if (StartResetOut())
storeRunStatus = StoreRunStatus.Runing;
StoreMove.EndMove();
storeStatus = StoreStatus.StoreOnline;
if (alarmType.Equals(StoreAlarmType.None))
{ {
WarnMsg = ""; }
else
{
LogUtil.info(LOGGER, StoreName + "复位完成");
storeRunStatus = StoreRunStatus.Runing;
StoreMove.EndMove();
storeStatus = StoreStatus.StoreOnline;
if (alarmType.Equals(StoreAlarmType.None))
{
WarnMsg = "";
}
} }
break; break;
...@@ -433,7 +427,64 @@ namespace OnlineStore.DeviceLibrary ...@@ -433,7 +427,64 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition(Config.CompressAxis_P1_Position); ComMoveToPosition(Config.CompressAxis_P1_Position);
break; break;
case StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1: case StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1:
LogUtil.info(LOGGER, StoreName + "到待机状态完成");
if (StartResetOut())
{
}
else
{
LogUtil.info(LOGGER, StoreName + "到待机状态完成");
StoreMove.EndMove();
storeStatus = StoreStatus.StoreOnline;
storeRunStatus = StoreRunStatus.Runing;
if (alarmType.Equals(StoreAlarmType.None))
{
WarnMsg = "";
}
}
break;
case StoreMoveStep.BOX_R41_UpdownMove:
LogUtil.info(LOGGER, StoreName + "复位中清料:打开仓门,等待门口无料盘 ");
StoreMove.NextMoveStep(StoreMoveStep.BOX_R42_OpenDoor);
OpenDoorAndWait();
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
break;
case StoreMoveStep.BOX_R42_OpenDoor:
StoreMove.NextMoveStep(StoreMoveStep.BOX_R43_InoutToP2);
LogUtil.info(LOGGER, StoreName + "复位中清料: 叉子进出料口,进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P2, Config.InOutAxis_P2_Speed);
break;
case StoreMoveStep.BOX_R43_InoutToP2:
LogUtil.info(LOGGER, StoreName + "复位中清料: 放下物品,升降轴至P8(进料口出料缓冲点) ");
StoreMove.NextMoveStep(StoreMoveStep.BOX_R44_DevicePutWare);
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P8, Config.UpDownAxis_P8_Speed);
break;
case StoreMoveStep.BOX_R44_DevicePutWare:
StoreMove.NextMoveStep(StoreMoveStep.BOX_R45_DeviceOutFromDoor);
LogUtil.info(LOGGER, StoreName + "复位中清料: 叉子从出料口返回,,进出轴动作至P1(待机点) ");
InOutBackToP1(StoreMove.MoveParam.MoveP.InOut_P1);
break;
case StoreMoveStep.BOX_R45_DeviceOutFromDoor:
StoreMove.NextMoveStep(StoreMoveStep.BOX_R46_GoBack);
LogUtil.info(LOGGER, StoreName + "复位中清料: 升降轴返回,轴2至P1(待机点) ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
break;
case StoreMoveStep.BOX_R46_GoBack:
int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds);
if (OutStoreWaitSeconds <= 0)
{
OutStoreWaitSeconds = 600;
}
int ms = OutStoreWaitSeconds * 1000;
StoreMove.NextMoveStep(StoreMoveStep.BOX_R47_WaitTake);
LogUtil.info(LOGGER, StoreName + "复位中清料: 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove.OneWaitCanEndStep = true;
break;
case StoreMoveStep.BOX_R47_WaitTake:
LogUtil.info(LOGGER, StoreName + "复位 并清料完成");
StoreMove.EndMove(); StoreMove.EndMove();
storeStatus = StoreStatus.StoreOnline; storeStatus = StoreStatus.StoreOnline;
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
...@@ -442,10 +493,36 @@ namespace OnlineStore.DeviceLibrary ...@@ -442,10 +493,36 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = ""; WarnMsg = "";
} }
break; break;
default: break; default: break;
} }
} }
private bool StartResetOut()
{
if (KNDIOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
if (PositionNumList.Count > 0)
{
InOutStoreParam param = new InOutStoreParam("", PositionNumList[0]);
if (LoadParamPosition(param))
{
StoreMove.MoveParam = param;
StoreMove.NextMoveStep(StoreMoveStep.BOX_R41_UpdownMove);
LogUtil.info(LOGGER, StoreName + "复位完成检测到叉子有料,启动清料: 升降轴走到P2");
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P2, Config.UpDownAxis_P2_Speed);
return true;
}
else
{
LogUtil.error(LOGGER, StoreName + " 启动清料失败:【" + PositionNumList[0] + "】加载参数失败");
}
}
else
{
LogUtil.info(LOGGER, StoreName + "复位完成检测到叉子有料,启动清料失败:无可用库位");
}
}
return false;
}
private void ComBeforeHomeMove() private void ComBeforeHomeMove()
{ {
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
...@@ -554,7 +631,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -554,7 +631,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_DoorOPosition_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_DoorOPosition_P1, Config.UpDownAxis_P1_Speed);
ComMoveToPosition(Config.CompressAxis_P1_Position); ComMoveToPosition(Config.CompressAxis_P1_Position);
break; break;
case StoreMoveStep.BOX_H_MiddleAxisToP1: case StoreMoveStep.BOX_H_MiddleAxisToP1:
LogUtil.info(LOGGER, StoreName + "回原点完成"); LogUtil.info(LOGGER, StoreName + "回原点完成");
StoreMove.EndMove(); StoreMove.EndMove();
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
...@@ -1003,7 +1080,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1003,7 +1080,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
//判断已经在复位中并且没有报警,不需要重新复位 //判断已经在复位中并且没有报警,不需要重新复位
if (StoreMove.MoveType.Equals(StoreMoveType.StoreReset) && alarmType.Equals(StoreAlarmType.None)) if (StoreMove.MoveType.Equals(StoreMoveType.StoreReset) && alarmType.Equals(StoreAlarmType.None) &&KNDIOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{ {
LogUtil.error(LOGGER, "收到复位信号:已经在复位中且没有报警,不需要重新复位!"); LogUtil.error(LOGGER, "收到复位信号:已经在复位中且没有报警,不需要重新复位!");
} }
......
...@@ -171,7 +171,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -171,7 +171,14 @@ namespace OnlineStore.DeviceLibrary
} }
else if (wait.WaitType == 7) else if (wait.WaitType == 7)
{ {
wait.IsEnd = (wait.HeightValue.Equals(GetHeight())); if (wait.HeightValue > 0)
{
wait.IsEnd = (GetHeight() > 0);
}
else
{
wait.IsEnd = (wait.HeightValue.Equals(GetHeight()));
}
if (wait.IsEnd) if (wait.IsEnd)
{ {
LogUtil.debug("等待height=" + wait.HeightValue + "完成"); LogUtil.debug("等待height=" + wait.HeightValue + "完成");
...@@ -711,10 +718,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -711,10 +718,17 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_12_DeviceOutFromDoor) else if (StoreMove.MoveStep == StoreMoveStep.SO_12_DeviceOutFromDoor)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_121_CheckHasTray);
OutStoreLog("出库:SO_121等待门口有料盘高度");
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(8));
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_121_CheckHasTray)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_13_GoBack); StoreMove.NextMoveStep(StoreMoveStep.SO_13_GoBack);
OutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门"); OutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait(); CloseDoorAndWait();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_13_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SO_13_GoBack)
{ {
......
...@@ -172,6 +172,36 @@ namespace OnlineStore.DeviceLibrary ...@@ -172,6 +172,36 @@ namespace OnlineStore.DeviceLibrary
/// 关闭门,旋转轴到P1,升降轴到P1 /// 关闭门,旋转轴到P1,升降轴到P1
/// </summary> /// </summary>
BOX_M_H_TOP1_OtherAxisToP1 = 032, BOX_M_H_TOP1_OtherAxisToP1 = 032,
/// <summary>
/// 复位时检测到叉子有料, ,轴2( 上下) 至P2( 进料口出料前点)
/// </summary>
BOX_R41_UpdownMove = 041,
/// <summary>
/// 复位时清料:打开仓门并等待
/// </summary>
BOX_R42_OpenDoor=042,
/// <summary>
/// 复位时清料:叉子前进到P2点
/// </summary>
BOX_R43_InoutToP2 = 043,
/// <summary>
/// 复位时清料:轴2( 上下) 至P8( 进料口出料缓冲点)
/// </summary>
BOX_R44_DevicePutWare = 044,
/// <summary>
/// 复位时清料:叉子返回
/// </summary>
BOX_R45_DeviceOutFromDoor = 045,
/// <summary>
/// 复位时清料:关闭仓门
/// </summary>
BOX_R46_GoBack = 046,
/// <summary>
/// 复位时清料:等待拿走物品
/// </summary>
BOX_R47_WaitTake = 047,
#endregion #endregion
...@@ -179,7 +209,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -179,7 +209,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
///料仓出库,,定位气缸下降 ///料仓出库,,定位气缸下降
/// </summary> /// </summary>
SO_01_LocationCylinderDown=101, SO_01_LocationCylinderDown =101,
/// <summary> /// <summary>
///料仓出库:叉子先运动到P1 ///料仓出库:叉子先运动到P1
/// </summary> /// </summary>
...@@ -238,7 +268,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -238,7 +268,10 @@ namespace OnlineStore.DeviceLibrary
/// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点) /// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点)
/// </summary> /// </summary>
SO_12_DeviceOutFromDoor = 112, SO_12_DeviceOutFromDoor = 112,
/// <summary>
/// 需要检测到门口有料盘高度
/// </summary>
SO_121_CheckHasTray=116,
/// <summary> /// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点) /// 料仓出库,,升降轴返回,, 轴2至P1( 待机点)
/// </summary> /// </summary>
......
...@@ -103,7 +103,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -103,7 +103,7 @@ namespace OnlineStore.DeviceLibrary
moveStep = StoreMoveStep.Wait; moveStep = StoreMoveStep.Wait;
this.moveType = type; this.moveType = type;
LastSetpTime = DateTime.Now; LastSetpTime = DateTime.Now;
WaitList = new List<WaitResultInfo>(); WaitList = new List<WaitResultInfo>();
MoveNum++; MoveNum++;
} }
public void NewMove(StoreMoveType type, InOutStoreParam param) public void NewMove(StoreMoveType type, InOutStoreParam param)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!