Commit 29df02c8 几米阳光

开门增加光栅验证。服务器通信增加是否单盘出库

1 个父辈 243d29d0
...@@ -1552,13 +1552,6 @@ namespace OnlineStore.AutoInOutStore ...@@ -1552,13 +1552,6 @@ namespace OnlineStore.AutoInOutStore
AxisABSMove(store.Config.UpDown_Axis, value, store.Config.UpDownAxis_P7_Speed); AxisABSMove(store.Config.UpDown_Axis, value, store.Config.UpDownAxis_P7_Speed);
} }
} }
private void chbIsUseBatch_CheckedChanged(object sender, EventArgs e)
{
store.UseBatchInout = chbIsUseBatch.Checked;
LogUtil.info("切换是否使用批量上下料:" + store.UseBatchInout);
}
private void BtnOpenDoor_Click(object sender, EventArgs e) private void BtnOpenDoor_Click(object sender, EventArgs e)
{ {
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing)) if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing))
......
...@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary
public partial class AC_SA_BoxBean : AC_Store public partial class AC_SA_BoxBean : AC_Store
{ {
private bool IsIntSlvBlock = false; private bool IsIntSlvBlock = false;
public bool UseBatchInout = true; //public bool UseBatchInout = true;
public string CID = ""; public string CID = "";
public AUTO_SA_Config Config; public AUTO_SA_Config Config;
/// <summary> /// <summary>
...@@ -152,15 +152,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -152,15 +152,15 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
} }
if (UseBatchInout) //if (UseBatchInout)
{ //{
string canStart = AutomaticBaiting.CanStart(); string canStart = AutomaticBaiting.CanStart();
if (!canStart.Equals("")) if (!canStart.Equals(""))
{ {
LogUtil.info(StoreName + canStart); LogUtil.info(StoreName + canStart);
return false; return false;
} }
} //}
autoNext = false; autoNext = false;
mainTimer.Enabled = false; mainTimer.Enabled = false;
alarmType = StoreAlarmType.None; alarmType = StoreAlarmType.None;
...@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (UseBatchInout) //if (UseBatchInout)
{ {
AutomaticBaiting.Reset(false ); AutomaticBaiting.Reset(false );
} }
...@@ -775,7 +775,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -775,7 +775,7 @@ namespace OnlineStore.DeviceLibrary
CheckAxisAlarm(); CheckAxisAlarm();
ShowTimeLog("轴报警检测完成"); ShowTimeLog("轴报警检测完成");
} }
if (UseBatchInout) //if (UseBatchInout)
{ {
AutomaticBaiting.TimerProcess(); AutomaticBaiting.TimerProcess();
} }
...@@ -1177,7 +1177,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1177,7 +1177,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "StopMove"); LogUtil.info(LOGGER, StoreName + "StopMove");
KND.IOMove(IO_Type.Door_Down, IO_VALUE.LOW); KND.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
KND.IOMove(IO_Type.Door_Up, IO_VALUE.LOW); KND.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
if (UseBatchInout) //if (UseBatchInout)
{ {
AutomaticBaiting.StopMove(); AutomaticBaiting.StopMove();
} }
...@@ -1451,18 +1451,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -1451,18 +1451,21 @@ namespace OnlineStore.DeviceLibrary
string posIdStr = data[ParamDefine.posId]; string posIdStr = data[ParamDefine.posId];
string plateWStr = data[ParamDefine.plateW]; string plateWStr = data[ParamDefine.plateW];
string plateHStr = data[ParamDefine.plateH]; string plateHStr = data[ParamDefine.plateH];
string singleOut = data[ParamDefine.singleOut];
LogUtil.info(LOGGER, "收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr); LogUtil.info(LOGGER, "收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr+",singleOut="+singleOut);
char splitChar = '|'; char splitChar = '|';
string[] posIdArray = posIdStr.Split(splitChar); string[] posIdArray = posIdStr.Split(splitChar);
string[] plateWArray = plateWStr.Split(splitChar); string[] plateWArray = plateWStr.Split(splitChar);
string[] plateHArray = plateHStr.Split(splitChar); string[] plateHArray = plateHStr.Split(splitChar);
string[] singleOutArray = plateHStr.Split(splitChar);
int index = -1; int index = -1;
foreach (string posId in posIdArray) foreach (string posId in posIdArray)
{ {
index++; index++;
string plateW = plateWArray[index]; string plateW = plateWArray[index];
string plateH = plateHArray[index]; string plateH = plateHArray[index];
bool isSingleOut = singleOutArray[index].ToLower().Equals("true");
string[] posArray = posId.Split('#'); string[] posArray = posId.Split('#');
if (posArray.Length != 2) if (posArray.Length != 2)
{ {
...@@ -1485,7 +1488,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1485,7 +1488,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (CanStarInOut()) if (CanStarInOut())
{ {
StartOutStoreMove(new InOutStoreParam("", posId, position), true); StartOutStoreMove(new InOutStoreParam("", posId, position), !isSingleOut);
} }
else else
{ {
......
...@@ -384,7 +384,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -384,7 +384,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_05_DoorWarToDevice) else if (StoreMove.MoveStep == StoreMoveStep.SI_05_DoorWarToDevice)
{ {
if (StoreMove.IsBatchInOutStore && (!StoreMove.IsNeedInStore)) if (!StoreMove.IsNeedInStore)
{ {
InStoreLog("送出料盘:SI_21 ,需要操作人员拿走料盘,进出轴(叉子)到门口位置P7 "); InStoreLog("送出料盘:SI_21 ,需要操作人员拿走料盘,进出轴(叉子)到门口位置P7 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_21_DeviceToDoor); StoreMove.NextMoveStep(StoreMoveStep.SI_21_DeviceToDoor);
...@@ -502,10 +502,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -502,10 +502,13 @@ namespace OnlineStore.DeviceLibrary
#region 送出料盘处理 #region 送出料盘处理
else if (StoreMove.MoveStep == StoreMoveStep.SI_21_DeviceToDoor) else if (StoreMove.MoveStep == StoreMoveStep.SI_21_DeviceToDoor)
{ {
if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH))
{
InStoreLog("送出料盘:SI_22 ,打开仓门 "); InStoreLog("送出料盘:SI_22 ,打开仓门 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_22_OpenDoor); StoreMove.NextMoveStep(StoreMoveStep.SI_22_OpenDoor);
OpenDoorAndWait(); OpenDoorAndWait();
} }
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.SI_22_OpenDoor)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.SI_22_OpenDoor))
{ {
InStoreLog("送出料盘:SI_23 ,等待操作人员拿走料盘 "); InStoreLog("送出料盘:SI_23 ,等待操作人员拿走料盘 ");
...@@ -518,6 +521,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -518,6 +521,8 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_23_WaitTrayGo) else if (StoreMove.MoveStep == StoreMoveStep.SI_23_WaitTrayGo)
{ {
if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH))
{
InStoreLog("送出料盘:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) "); InStoreLog("送出料盘:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) ");
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态) // 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
...@@ -528,6 +533,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -528,6 +533,7 @@ namespace OnlineStore.DeviceLibrary
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
CloseDoorAndWait(); CloseDoorAndWait();
} }
}
#endregion #endregion
else else
...@@ -703,7 +709,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -703,7 +709,7 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3); ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3);
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_OutLow_P8, Config.UpDownAxis_P8_Speed); ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_OutLow_P8, Config.UpDownAxis_P8_Speed);
} }
else else if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH))
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_21_OpenDoor); StoreMove.NextMoveStep(StoreMoveStep.SO_21_OpenDoor);
OutStoreLog("出库:SO_21打开仓门,压紧轴至P3(压紧前点),定位气缸下降"); OutStoreLog("出库:SO_21打开仓门,压紧轴至P3(压紧前点),定位气缸下降");
...@@ -723,9 +729,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -723,9 +729,12 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_22_WaitTrayGo)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_22_WaitTrayGo))
{ {
if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH))
{
SO_13_InoutBack(); SO_13_InoutBack();
CloseDoorAndWait(); CloseDoorAndWait();
} }
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_11_PutTray) else if (StoreMove.MoveStep == StoreMoveStep.SO_11_PutTray)
{ {
SO_13_InoutBack(); SO_13_InoutBack();
......
...@@ -404,7 +404,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -404,7 +404,7 @@ namespace OnlineStore.DeviceLibrary
string plateW = data[ParamDefine.plateW]; string plateW = data[ParamDefine.plateW];
string plateH = data[ParamDefine.plateH]; string plateH = data[ParamDefine.plateH];
string singleOut = data[ParamDefine.singleOut]; string singleOut = data[ParamDefine.singleOut];
bool isSingleOut = singleOut.ToLower().Equals("true"); //bool isSingleOut = singleOut.ToLower().Equals("true");
string[] posArray = posId.Split('#'); string[] posArray = posId.Split('#');
if (!(posArray.Length == 2)) if (!(posArray.Length == 2))
{ {
...@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
LastPosId = posId; LastPosId = posId;
InOutStoreParam param = new InOutStoreParam(message, posId, plateH, plateW, 0); InOutStoreParam param = new InOutStoreParam(message, posId, plateH, plateW, 0);
StoreManager.Store.StartInStoreMove(param, !isSingleOut); StoreManager.Store.StartInStoreMove(param, true);
//如果当前正在出入库中,需要记录下来,等待空闲时执行 //如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(Name + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!"); LogUtil.info(Name + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!