Commit d79298bc LN

取出料盘时若检测到料盘信号,需要下降到P2点

1 个父辈 593a1088
...@@ -1333,7 +1333,6 @@ ...@@ -1333,7 +1333,6 @@
<data name="启动失败:设备未初始化完成" xml:space="preserve"> <data name="启动失败:设备未初始化完成" xml:space="preserve">
<value>Startup failure: device initialization is not complete</value> <value>Startup failure: device initialization is not complete</value>
</data> </data>
<data name="FrmPositionTool_groupBox1_Text" xml:space="preserve"> <data name="FrmPositionTool_groupBox1_Text" xml:space="preserve">
<value>equipment information</value> <value>equipment information</value>
</data> </data>
...@@ -1367,18 +1366,19 @@ ...@@ -1367,18 +1366,19 @@
<data name="请输入正确的速度" xml:space="preserve"> <data name="请输入正确的速度" xml:space="preserve">
<value>Please enter the correct speed</value> <value>Please enter the correct speed</value>
</data> </data>
<data name="StartCycle" xml:space="preserve"> <data name="StartCycle" xml:space="preserve">
<value>Start looping out</value> <value>Start looping out</value>
</data> </data>
<data name="StopCycle" xml:space="preserve"> <data name="StopCycle" xml:space="preserve">
<value>Stop the loop</value> <value>Stop the loop</value>
</data> </data>
<data name="FrmStoreBox_btnCycleOut_Text" xml:space="preserve"> <data name="FrmStoreBox_btnCycleOut_Text" xml:space="preserve">
<value>Start looping out</value> <value>Start looping out</value>
</data> </data>
<data name="OutFull" xml:space="preserve"> <data name="OutFull" xml:space="preserve">
<value>Batch shaft is full, please take out the material tray</value> <value>Batch shaft is full, please take out the material tray</value>
</data> </data>
<data name="TheDoorOpen" xml:space="preserve">
<value>门锁未关闭,无法出库</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -1377,4 +1377,7 @@ ...@@ -1377,4 +1377,7 @@
<data name="OutFull" xml:space="preserve"> <data name="OutFull" xml:space="preserve">
<value>批量轴已满,请取出料盘</value> <value>批量轴已满,请取出料盘</value>
</data> </data>
<data name="TheDoorOpen" xml:space="preserve">
<value>The door lock is not closed, unable to exit the warehouse</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -1247,80 +1247,72 @@ namespace OnlineStore.DeviceLibrary ...@@ -1247,80 +1247,72 @@ namespace OnlineStore.DeviceLibrary
Reset(false); Reset(false);
} }
} }
else if (waitOutStoreList.Count > 0 && CanStarInOut()) else if (waitOutStoreList.Count > 0)
{ {
FixtureCodeInfo currInOutFixture = null; if (CanStarInOut() && AutomaticBaiting.BatchOutStoreHeight < Config.BatchAxis_MaxHeight && AutomaticBaiting.DoorIsClose())
lock (waitOutListLock)
{ {
if (waitOutStoreList.Count > 0 && CanStarInOut()) FixtureCodeInfo currInOutFixture = null;
lock (waitOutListLock)
{ {
currInOutFixture = waitOutStoreList[0]; if (waitOutStoreList.Count > 0 )
waitOutStoreList.RemoveAt(0); {
currInOutFixture = waitOutStoreList[0];
waitOutStoreList.RemoveAt(0);
}
} }
} if (currInOutFixture != null && currInOutFixture.WareNum.Equals(""))
if (currInOutFixture != null && currInOutFixture.WareNum.Equals("")) { //出库
{ //出库 LogUtil.info(LOGGER, StoreName + "开始执行排队中的出库【" + currInOutFixture.ToStr() + "】");
LogUtil.info(LOGGER, StoreName + "开始执行排队中的出库【" + currInOutFixture.ToStr() + "】"); bool result = StartOutStoreMove(new InOutStoreParam("", currInOutFixture.PosId, currInOutFixture.plateH, currInOutFixture.plateW), currInOutFixture.BatchInOut);
bool result = StartOutStoreMove(new InOutStoreParam("", currInOutFixture.PosId, currInOutFixture.plateH, currInOutFixture.plateW), currInOutFixture.BatchInOut); if (!result)
if (!result) {
{ LogUtil.info(LOGGER, StoreName + " 执行排队中的出库【" + currInOutFixture.ToStr() + "】失败,重新加入等待队列");
LogUtil.info(LOGGER, StoreName + " 执行排队中的出库【" + currInOutFixture.ToStr() + "】失败,重新加入等待队列"); AddWaitOutInfo(currInOutFixture);
AddWaitOutInfo(currInOutFixture); }
} }
} }
} }
else if (autoNext && CanStarInOut())
else if (autoNext)
{ {
//获取出库的库位号 if (CanStarInOut() && AutomaticBaiting.BatchOutStoreHeight < Config.BatchAxis_MaxHeight && AutomaticBaiting.DoorIsClose())
string readId = "";
//[{"LOC":"1","RI":"A100007","QTY":1000,"PN":"pn"},{"LOC":"2","RI":"A100015","QTY":1000,"PN":"pn"}]
//http://[SMD-BOX-IP]:[SMD-BOX-Port]/rest/api/v2/mes/inventory
//http://localhost/myproject/rest/api/v2/mes/inventory?LOC=1
int LOC = ConfigAppSettings.GetIntValue(Setting_Init.LOC);
if (LOC <= 0)
{ {
LOC = 1; //获取出库的库位号
} string readId = "";
string result = HttpHelper.Get(StoreManager.GetAPI("", StoreManager.api_inventory) + "?LOC=" + LOC); //[{"LOC":"1","RI":"A100007","QTY":1000,"PN":"pn"},{"LOC":"2","RI":"A100015","QTY":1000,"PN":"pn"}]
if (!String.IsNullOrEmpty(result)) //http://[SMD-BOX-IP]:[SMD-BOX-Port]/rest/api/v2/mes/inventory
{ //http://localhost/myproject/rest/api/v2/mes/inventory?LOC=1
List<APIInfo> apilist = JsonHelper.DeserializeJsonToList<APIInfo>(result); int LOC = ConfigAppSettings.GetIntValue(Setting_Init.LOC);
foreach (APIInfo a in apilist) if (LOC <= 0)
{ {
if (a.LOC.Equals(LOC)) LOC = 1;
}
string result = HttpHelper.Get(StoreManager.GetAPI("", StoreManager.api_inventory) + "?LOC=" + LOC);
if (!String.IsNullOrEmpty(result))
{
List<APIInfo> apilist = JsonHelper.DeserializeJsonToList<APIInfo>(result);
foreach (APIInfo a in apilist)
{ {
readId = a.RI; if (a.LOC.Equals(LOC))
LogUtil.debug("自动出入库:查找到:RI: " + readId); {
readId = a.RI;
LogUtil.debug("自动出入库:查找到:RI: " + readId);
}
} }
} }
//string[] rArray = result.Split('}'); if (readId.Equals(""))
//foreach (string obj in rArray) {
//{ //开始自动入库
// string[] objArray = obj.Split(','); string msg = AutomaticBaiting.doStartBatchIn();
// if (objArray.Length >= 4) LogUtil.info("自动出入库:库位号【" + GetAutoPosid(false) + "】,开始入库" + msg);
// { }
// string rId = objArray[1]; else
// if (rId.Length > 7) {
// { autoMsg = "自动出库:RI:" + readId;
// readId = rId.Substring(6, rId.Length - 7); result = HttpHelper.Post(StoreManager.GetAPI("", StoreManager.api_stackOut) + "?RIS=" + readId);
// LogUtil.debug("自动出入库:查找到:RI: " + readId); LogUtil.info("自动出入库:自动出库:RI: " + readId + " ," + result);
// break; }
// }
// }
//}
}
if (readId.Equals(""))
{
//开始自动入库
string msg = AutomaticBaiting.doStartBatchIn();
LogUtil.info("自动出入库:库位号【" + GetAutoPosid(false) + "】,开始入库" + msg);
}
else
{
autoMsg = "自动出库:RI:" + readId;
result = HttpHelper.Post(StoreManager.GetAPI("", StoreManager.api_stackOut) + "?RIS=" + readId);
LogUtil.info("自动出入库:自动出库:RI: " + readId + " ," + result);
} }
} }
} }
......
...@@ -788,7 +788,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -788,7 +788,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
int height = param.GetPosition().BagHeight; int height = param.GetPosition().BagHeight;
if (AutomaticBaiting.BatchOutStoreHeight+ height > Config.BatchAxis_MaxHeight) if (AutomaticBaiting.BatchOutStoreHeight >= Config.BatchAxis_MaxHeight)
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,当前高【"+ AutomaticBaiting.BatchOutStoreHeight + "】出库料盘高【"+ height + "】,最大高【"+ Config.BatchAxis_MaxHeight + "】"); LogUtil.error(LOGGER, StoreName + logMsg + " 出错,当前高【"+ AutomaticBaiting.BatchOutStoreHeight + "】出库料盘高【"+ height + "】,最大高【"+ Config.BatchAxis_MaxHeight + "】");
UpdateInOutMsg(logMsg + "失败,批量上下料机构已满,请先拿出料盘"); UpdateInOutMsg(logMsg + "失败,批量上下料机构已满,请先拿出料盘");
...@@ -868,7 +868,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -868,7 +868,7 @@ namespace OnlineStore.DeviceLibrary
{ {
AutomaticBaiting.BatchOutStoreCount++; AutomaticBaiting.BatchOutStoreCount++;
AutomaticBaiting.BatchOutStoreHeight = 1000; AutomaticBaiting.BatchOutStoreHeight = 1000;
OutStoreLog("出库:SO_03批量上下料轴需下降【" + outDownPosition + "】目标【" + targetValue + "】 ,请检查料盘是否已满"); OutStoreLog("出库:SO_03批量上下料轴需下降【" + outDownPosition + "】目标【" + targetValue + "】,实时位置【" + ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis) + "】 ,请检查料盘是否已满");
//停止出库 //停止出库
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
storeStatus = StoreStatus.StoreOnline; storeStatus = StoreStatus.StoreOnline;
......
...@@ -696,7 +696,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -696,7 +696,7 @@ namespace OnlineStore.DeviceLibrary
//若X12亮,先匀速下降到X12不亮,再开门。 //若X12亮,先匀速下降到X12不亮,再开门。
if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O00_Wait)) if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O00_Wait))
{ {
if (IOManager.IOValue(IO_Type.OutCheck).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.OutCheck).Equals(IO_VALUE.LOW) && IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW))
{ {
LogUtil.info(Name + "出料: OutCheck=LOW ,直接打开门锁 "); LogUtil.info(Name + "出料: OutCheck=LOW ,直接打开门锁 ");
StoreMove.NextMoveStep(StoreMoveStep.AUTO_O02_WaitDoorOpen); StoreMove.NextMoveStep(StoreMoveStep.AUTO_O02_WaitDoorOpen);
...@@ -706,27 +706,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -706,27 +706,29 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_O01_BatchAxisDown); StoreMove.NextMoveStep(StoreMoveStep.AUTO_O01_BatchAxisDown);
LogUtil.info(Name + "出料: OutCheck=HIGH,批量轴先匀速下降到P2 "); LogUtil.info(Name + "出料: OutCheck=HIGH或TrayCheck_LoadMaterial=High,批量轴先匀速下降到P2 ");
//批量轴直接走到P2 ACAxisAbsMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_P2, StoreManager.Config.BatchAxis_P2_Speed);
return;
//批量轴直接走到P2
AUTO_SA_Config Config = StoreManager.Config; AUTO_SA_Config Config = StoreManager.Config;
//ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_SlowSpeed, IO_Type.OutCheck);
StoreMove.WaitList.Add(WaitResultInfo.WaitBatchAxisStop(Config.Batch_Axis, Config.BatchAxis_P2, IO_Type.OutCheck, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitBatchAxisStop(Config.Batch_Axis, Config.BatchAxis_P2, IO_Type.OutCheck, IO_VALUE.LOW));
BatchAxisController.StartCheck(IO_Type.OutCheck, IO_VALUE.LOW); BatchAxisController.StartCheck(IO_Type.OutCheck, IO_VALUE.LOW);
StoreManager.Config.Batch_Axis.TargetPosition = Config.BatchAxis_P2; StoreManager.Config.Batch_Axis.TargetPosition = Config.BatchAxis_P2;
//int speed = Config.BatchAxis_SlowSpeed;
ACServerManager.AbsMove(Config.Batch_Axis.DeviceName, Config.Batch_Axis.GetAxisValue(), Config.BatchAxis_OutMaxValue, Config.BatchAxis_P2_Speed); ACServerManager.AbsMove(Config.Batch_Axis.DeviceName, Config.Batch_Axis.GetAxisValue(), Config.BatchAxis_OutMaxValue, Config.BatchAxis_P2_Speed);
// ACAxisAbsMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_P2, StoreManager.Config.BatchAxis_P2_Speed);
} }
}else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O01_BatchAxisDown)) }else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O01_BatchAxisDown))
{ {
LogUtil.info(Name + "出料: 批量轴已下降到OutCheck=LOW ,打开门锁 "); LogUtil.info(Name + "出料: 批量轴已下降到P2 ,打开门锁 ");
StoreMove.NextMoveStep(StoreMoveStep.AUTO_O02_WaitDoorOpen); StoreMove.NextMoveStep(StoreMoveStep.AUTO_O02_WaitDoorOpen);
BatchDoorOpen(true); BatchDoorOpen(true);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O02_WaitDoorOpen)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O02_WaitDoorOpen))
{ {
LogUtil.info(Name + "出料:回到待机点完成,出料结束");
StoreMove.EndMove();
AutoBaitingStatus = StoreRunStatus.Runing;
return;
if (IOManager.IOValue(IO_Type.OutCheck).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.OutCheck).Equals(IO_VALUE.HIGH))
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_O03_WaitOutSingleLow); StoreMove.NextMoveStep(StoreMoveStep.AUTO_O03_WaitOutSingleLow);
......
...@@ -657,8 +657,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -657,8 +657,8 @@ namespace OnlineStore.DeviceLibrary
{ {
if (BatchOutStoreCount > 0 && BatchOutStoreHeight > 0) if (BatchOutStoreCount > 0 && BatchOutStoreHeight > 0)
{ {
BatchDoorOpen(false); // BatchDoorOpen(false);
//return StartOut(); return StartOut();
return ""; return "";
} }
else else
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!