Commit aa4cd176 LN

新建分支 SISO-ACSingleStore-202007

1 个父辈 f2230197
...@@ -44,7 +44,7 @@ namespace OnlineStore.ACSingleStore ...@@ -44,7 +44,7 @@ namespace OnlineStore.ACSingleStore
} }
return str; return str;
} }
internal static string GetCodeNum(string codeName = "RC-SISO-ACSingleStore") internal static string GetCodeNum(string codeName = "SISO-ACSingleStore-202007")
{ {
byte[] byteArray = System.Text.Encoding.ASCII.GetBytes(codeName); byte[] byteArray = System.Text.Encoding.ASCII.GetBytes(codeName);
string result = ""; string result = "";
......
...@@ -197,6 +197,7 @@ namespace OnlineStore.ACSingleStore ...@@ -197,6 +197,7 @@ namespace OnlineStore.ACSingleStore
//ReadPosistion(); //ReadPosistion();
if (store.storeRunStatus > StoreRunStatus.Wait) if (store.storeRunStatus > StoreRunStatus.Wait)
{ {
btnHul.Visible = store.NeedShowBtn();
if (启动ToolStripMenuItem.Enabled.Equals(true)) if (启动ToolStripMenuItem.Enabled.Equals(true))
{ {
StoreOpenStatus(true); StoreOpenStatus(true);
...@@ -267,6 +268,7 @@ namespace OnlineStore.ACSingleStore ...@@ -267,6 +268,7 @@ namespace OnlineStore.ACSingleStore
} }
else else
{ {
btnHul.Visible = false;
lblThisSta.Text = WaitStart; lblThisSta.Text = WaitStart;
//lblWarnMsg.Text = ""; //lblWarnMsg.Text = "";
btnStartAuTo.Text = StartAuto; btnStartAuTo.Text = StartAuto;
...@@ -1225,6 +1227,11 @@ namespace OnlineStore.ACSingleStore ...@@ -1225,6 +1227,11 @@ namespace OnlineStore.ACSingleStore
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW); 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: ...@@ -429,3 +429,5 @@ FrmIOStatus_label14_Text,地址:,Address:
FrmStoreBox_groupBox2_Text,料仓操作,SMD BOX operation FrmStoreBox_groupBox2_Text,料仓操作,SMD BOX operation
FrmStoreBox_btnUpDownP1_Text,升降轴吸盘下方取料点P1:,l-axis picking P1: FrmStoreBox_btnUpDownP1_Text,升降轴吸盘下方取料点P1:,l-axis picking P1:
FrmPositionTool_label8_Text,速度:,Speed: FrmPositionTool_label8_Text,速度:,Speed:
FrmStoreBox_btnOpenAutoInOut_Text,开启自动出入库,Open automatic inbound and outbound
FrmStoreBox_btnHul_Text,忽略夹爪检测信号,Ignore the gripper detection signal
...@@ -178,7 +178,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -178,7 +178,8 @@ namespace OnlineStore.DeviceLibrary
//wait.IsEnd = ShuoKeIsEnd(wait, out msg); //wait.IsEnd = ShuoKeIsEnd(wait, out msg);
// NotOkMsg = NotOkMsg +" "+ msg; // NotOkMsg = NotOkMsg +" "+ msg;
wait.IsEnd = false; 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()); IO_VALUE value = (IO_VALUE)ACServerManager.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
wait.IsEnd = wait.IoValue.Equals(value); wait.IsEnd = wait.IoValue.Equals(value);
...@@ -201,7 +202,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -201,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if (!StoreMove.OneWaitCanEndStep ) if (!StoreMove.OneWaitCanEndStep)
{ {
isOk = false; isOk = false;
break; break;
...@@ -216,8 +217,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -216,8 +217,8 @@ namespace OnlineStore.DeviceLibrary
{ {
// WarnMsg = StoreName + "【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】等待超时 [" + NotOkMsg // WarnMsg = StoreName + "【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】等待超时 [" + NotOkMsg
// + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒"; // + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
SetWarnMsg(ResourceControl.MoveTimeOut, 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); LogUtil.error(LOGGER, WarnObj.WarnMsg, 100);
Alarm(StoreAlarmType.IoSingleTimeOut, "", StoreMove.MoveType); Alarm(StoreAlarmType.IoSingleTimeOut, "", StoreMove.MoveType);
} }
} }
...@@ -336,11 +337,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -336,11 +337,6 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3"); InStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3");
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome); StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); 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.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
} }
...@@ -350,10 +346,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -350,10 +346,7 @@ namespace OnlineStore.DeviceLibrary
{ {
InStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始"); InStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始");
StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare); StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); 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));
}
else else
{ {
SI_05_DeviceToDoor(); SI_05_DeviceToDoor();
...@@ -361,9 +354,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -361,9 +354,6 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_04_CompressWare) 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(); SI_05_DeviceToDoor();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_05_DeviceToDoor) else if (StoreMove.MoveStep == StoreMoveStep.SI_05_DeviceToDoor)
...@@ -372,12 +362,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -372,12 +362,6 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) "); InStoreLog("入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice); StoreMove.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice);
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed); 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);
//}
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed);
} }
...@@ -526,12 +510,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -526,12 +510,12 @@ namespace OnlineStore.DeviceLibrary
if (!LoadParamPosition(param)) if (!LoadParamPosition(param))
{ {
LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,找不到库位信息"); LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,找不到库位信息");
return false ; return false;
} }
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,叉子料盘检测有料"); LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,叉子料盘检测有料");
return false ; return false;
} }
storeStatus = StoreStatus.OutStoreExecute; storeStatus = StoreStatus.OutStoreExecute;
LogUtil.info(LOGGER, StoreName + "启动出库【" + posId + "】 ", storeMoveColor); LogUtil.info(LOGGER, StoreName + "启动出库【" + posId + "】 ", storeMoveColor);
...@@ -586,11 +570,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -586,11 +570,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_03_ToBagPosition); StoreMove.NextMoveStep(StoreMoveStep.SO_03_ToBagPosition);
OutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"); OutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); 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.Middle_Axis, StoreMove.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed); ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
} }
...@@ -628,10 +608,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -628,10 +608,6 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckTray); StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckTray);
OutStoreLog("出库:SO_07 等待TrayCheck_Fixture=High "); OutStoreLog("出库:SO_07 等待TrayCheck_Fixture=High ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.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);
} }
else else
{ {
...@@ -639,15 +615,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -639,15 +615,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),打开舱门 "); OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),打开舱门 ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_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();
//}
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckTray) else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckTray)
{ {
...@@ -694,11 +662,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -694,11 +662,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare); StoreMove.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare);
NeedCheckSafetyLight = 0; NeedCheckSafetyLight = 0;
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); 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); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P8, Config.UpDownAxis_P8_Speed);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_11_DevicePutWare) else if (StoreMove.MoveStep == StoreMoveStep.SO_11_DevicePutWare)
...@@ -734,7 +698,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -734,7 +698,7 @@ namespace OnlineStore.DeviceLibrary
} }
int ms = OutStoreWaitSeconds * 1000; int ms = OutStoreWaitSeconds * 1000;
StoreMove.NextMoveStep(StoreMoveStep.SO_15_WaitTake); StoreMove.NextMoveStep(StoreMoveStep.SO_15_WaitTake);
if(!IsInOutStoreAuto) if (!IsInOutStoreAuto)
{ {
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒"); OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
...@@ -939,5 +903,45 @@ namespace OnlineStore.DeviceLibrary ...@@ -939,5 +903,45 @@ namespace OnlineStore.DeviceLibrary
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; 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!