Commit fbd26364 LN

增加 忽略夹爪检测信号

1 个父辈 f2230197
......@@ -197,6 +197,7 @@ namespace OnlineStore.ACSingleStore
//ReadPosistion();
if (store.storeRunStatus > StoreRunStatus.Wait)
{
btnHul.Visible = store.NeedShowBtn();
if (启动ToolStripMenuItem.Enabled.Equals(true))
{
StoreOpenStatus(true);
......@@ -267,6 +268,7 @@ namespace OnlineStore.ACSingleStore
}
else
{
btnHul.Visible = false;
lblThisSta.Text = WaitStart;
//lblWarnMsg.Text = "";
btnStartAuTo.Text = StartAuto;
......@@ -1225,6 +1227,11 @@ namespace OnlineStore.ACSingleStore
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
private void btnHul_Click(object sender, EventArgs e)
{
LogUtil.info("用户点击:" + btnHul.Text);
bool result= store.BtnNextPro();
btnHul.Visible = store.NeedShowBtn();
}
}
}
......@@ -429,3 +429,5 @@ FrmIOStatus_label14_Text,地址:,Address:
FrmStoreBox_groupBox2_Text,料仓操作,SMD BOX operation
FrmStoreBox_btnUpDownP1_Text,升降轴吸盘下方取料点P1:,l-axis picking P1:
FrmPositionTool_label8_Text,速度:,Speed:
FrmStoreBox_btnOpenAutoInOut_Text,开启自动出入库,Open automatic inbound and outbound
FrmStoreBox_btnHul_Text,忽略夹爪检测信号,Ignore the gripper detection signal
......@@ -143,8 +143,8 @@ namespace OnlineStore.DeviceLibrary
if (!msg.Equals(""))
{
isOk = false;
// WarnMsg = msg;
Alarm(StoreAlarmType.AxisMoveError, GetAlarmCodeByAxis(wait.AxisInfo).ToString(), StoreMove.MoveType);
// WarnMsg = msg;
Alarm(StoreAlarmType.AxisMoveError, GetAlarmCodeByAxis(wait.AxisInfo).ToString(), StoreMove.MoveType);
break;
}
}
......@@ -161,7 +161,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO io = Config.getWaitIO(wait.IoType);
//WarnMsg = StoreName + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!";
SetWarnMsg(ResourceControl.WaitSingleTimeOut, io.DisplayStr, wait.IoValue.ToString());
Alarm(StoreAlarmType.IoSingleTimeOut, io.ElectricalDefinition, StoreMove.MoveType);
Alarm(StoreAlarmType.IoSingleTimeOut, io.ElectricalDefinition, StoreMove.MoveType);
LogUtil.error(LOGGER, StoreName + wait.IoType + "等待信号(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", 14);
isOk = false;
break;
......@@ -171,14 +171,15 @@ namespace OnlineStore.DeviceLibrary
{
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
}
else if (wait.WaitType == 5)
{
//string msg = "";
//wait.IsEnd = ShuoKeIsEnd(wait, out msg);
// NotOkMsg = NotOkMsg +" "+ msg;
// NotOkMsg = NotOkMsg +" "+ msg;
wait.IsEnd = false;
}else if (wait.WaitType == 6)
}
else if (wait.WaitType == 6)
{
IO_VALUE value = (IO_VALUE)ACServerManager.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
wait.IsEnd = wait.IoValue.Equals(value);
......@@ -201,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if (!StoreMove.OneWaitCanEndStep )
if (!StoreMove.OneWaitCanEndStep)
{
isOk = false;
break;
......@@ -213,16 +214,16 @@ namespace OnlineStore.DeviceLibrary
StoreMove.EndStepWait();
}
else if (span.TotalSeconds > StoreMove.TimeOutSeconds)
{
// WarnMsg = StoreName + "【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】等待超时 [" + NotOkMsg
// + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
SetWarnMsg(ResourceControl.MoveTimeOut, StoreMove.MoveStep + "", NotOkMsg, Math.Round(span.TotalSeconds, 1)+"");
LogUtil.error(LOGGER, WarnObj.WarnMsg,100);
Alarm(StoreAlarmType.IoSingleTimeOut, "", StoreMove.MoveType);
}
{
// WarnMsg = StoreName + "【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】等待超时 [" + NotOkMsg
// + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
SetWarnMsg(ResourceControl.MoveTimeOut, StoreMove.MoveStep + "", NotOkMsg, Math.Round(span.TotalSeconds, 1) + "");
LogUtil.error(LOGGER, WarnObj.WarnMsg, 100);
Alarm(StoreAlarmType.IoSingleTimeOut, "", StoreMove.MoveType);
}
}
private static DateTime lastComRHomeTime = DateTime.Now;
#endregion
#region 入库
......@@ -268,7 +269,7 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog("入库:SI_01 定位气缸下降");
StoreMove.NextMoveStep(StoreMoveStep.SI_01_LocationCylinderDown);
LocationDownAndWait();
LocationDownAndWait();
}
}
}
......@@ -276,7 +277,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(LOGGER, StoreName + " 启动【" + posId + "】入库出错,当前状态,storeStatus=" + storeRunStatus);
}
}
}
/// <summary>
/// 开始入库移动移动
......@@ -285,11 +286,11 @@ namespace OnlineStore.DeviceLibrary
{
StartInStoreMove(param, false);
}
private void SI_02_Move(LineMoveP moveP)
{
private void SI_02_Move(LineMoveP moveP)
{
InStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门");
StoreMove.NextMoveStep(StoreMoveStep.SI_02_InOutAxisHome);
OpenDoorAndWait();
StoreMove.NextMoveStep(StoreMoveStep.SI_02_InOutAxisHome);
OpenDoorAndWait();
InOutBackToP1(moveP.InOut_P1);
}
private void SI_05_DeviceToDoor()
......@@ -335,12 +336,7 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3");
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
//}
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
......@@ -350,20 +346,14 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始");
StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
}
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); }
else
{
SI_05_DeviceToDoor();
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_04_CompressWare)
{
//InStoreLog("入库:SI_05 叉子进入入料口,进出轴至P2(进料口取料点) ");
//StoreMove.NextMoveStep(StoreMoveStep.SI_05_DeviceToDoor);
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
{
SI_05_DeviceToDoor();
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_05_DeviceToDoor)
......@@ -371,13 +361,7 @@ namespace OnlineStore.DeviceLibrary
NeedCheckSafetyLight = 0;
InStoreLog("入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice);
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P2);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P2, false));
// System.Threading.Thread.Sleep(600);
//}
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed);
}
......@@ -526,12 +510,12 @@ namespace OnlineStore.DeviceLibrary
if (!LoadParamPosition(param))
{
LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,找不到库位信息");
return false ;
return false;
}
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,叉子料盘检测有料");
return false ;
return false;
}
storeStatus = StoreStatus.OutStoreExecute;
LogUtil.info(LOGGER, StoreName + "启动出库【" + posId + "】 ", storeMoveColor);
......@@ -586,11 +570,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_03_ToBagPosition);
OutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
//}
ACAxisMove(Config.Middle_Axis, StoreMove.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
}
......@@ -627,27 +607,15 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckTray);
OutStoreLog("出库:SO_07 等待TrayCheck_Fixture=High ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
//string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
//CodeMsg = "出库[" + posId + "]叉子从库位退出后,未检测到料盘有料";
//CodeMsgEn = ResourceControl.GetEnglishString("出库{0}叉子从库位退出后,未检测到料盘有料", posId);
//LogUtil.error(CodeMsg);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition);
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),打开舱门 ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
//打开舱门
//OpenDoorAndWait();
}
//else
//{
// StoreMove.NextMoveStep(StoreMoveStep.SO_07_LocationCylinder_Up);
// OutStoreLog("出库:SO_07 定位气缸伸出 ");
// LocationUpAndWait();
//}
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckTray)
{
......@@ -694,11 +662,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare);
NeedCheckSafetyLight = 0;
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P1, false));
//}
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P8, Config.UpDownAxis_P8_Speed);
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_11_DevicePutWare)
......@@ -734,7 +698,7 @@ namespace OnlineStore.DeviceLibrary
}
int ms = OutStoreWaitSeconds * 1000;
StoreMove.NextMoveStep(StoreMoveStep.SO_15_WaitTake);
if(!IsInOutStoreAuto)
if (!IsInOutStoreAuto)
{
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
......@@ -743,7 +707,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
OutStoreLog("出库:SO_14_WaitTake 放置物品,最多等待" + "3秒");
OutStoreLog("出库:SO_14_WaitTake 放置物品,最多等待" + "3秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(3000));
}
StoreMove.OneWaitCanEndStep = true;
......@@ -932,12 +896,52 @@ namespace OnlineStore.DeviceLibrary
private void InStoreLog(string msg)
{
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
LogUtil.info(LOGGER, "【" + posId + "】" + msg, storeMoveColor);
LogUtil.info(LOGGER, "【" + posId + "】" + msg, storeMoveColor);
}
private void OutStoreLog(string msg)
{
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
LogUtil.info(LOGGER, "【" + posId + "】" + msg, storeMoveColor);
LogUtil.info(LOGGER, "【" + posId + "】" + msg, storeMoveColor);
}
public bool NeedShowBtn()
{
if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut))
{
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_07_CheckTray))
{
return true;
}
else if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SI_08_CheckTray))
{
return true;
}
}
return false;
}
public bool BtnNextPro()
{
if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut))
{
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_07_CheckTray))
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckTray);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(100));
InStoreLog("出库:SO_07 等待TrayCheck_Fixture=High,BtnNextPro 忽略夹爪检测信号 ");
return true;
}
else if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SI_08_CheckTray))
{
StoreMove.NextMoveStep(StoreMoveStep.SI_08_CheckTray);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(100));
InStoreLog("入库:SI_08 检测叉子料盘检测信号,BtnNextPro 忽略夹爪检测信号 ");
return true;
}
}
return false;
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!