Commit 646d3dfa LN

增加料架的目标位置

1 个父辈 34a486f9
...@@ -6,6 +6,7 @@ using System; ...@@ -6,6 +6,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
...@@ -340,7 +341,36 @@ namespace OnlineStore.ACPackingStore ...@@ -340,7 +341,36 @@ namespace OnlineStore.ACPackingStore
Clipboard.SetDataObject(logBox.Text); Clipboard.SetDataObject(logBox.Text);
MessageBox.Show("已复制日志到粘贴板!"); MessageBox.Show("已复制日志到粘贴板!");
} }
private DateTime lastLogTime = DateTime.Now;
private void LogM()
{
try
{
TimeSpan sp = DateTime.Now - lastLogTime;
if (sp.TotalMinutes > 3)
{
lastLogTime = DateTime.Now;
Process[] processes = Process.GetProcesses();
long totalMemery = 0;
StringBuilder sbResult = new StringBuilder();
foreach (Process process in processes)
{
if (process.ProcessName.EndsWith("ACPackingStore"))
{
sbResult.AppendFormat(DateTime.Now.ToLongTimeString() + ", 名称:{0} 内存大小:{1}M ", process.ProcessName, process.PrivateMemorySize64 / 1024 / 1024F);
totalMemery += process.PrivateMemorySize64 / 1024;
// string result = string.Format("进程总数 {0} 个,共占内存:{1}MB \n", processes.Length, totalMemery / 1024) + sbResult.ToString();
LogUtil.info(sbResult.ToString());
}
}
}
}
catch (Exception ex)
{
LogUtil.error("LogM Error: "+ex.ToString());
}
}
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
{ {
if (!this.Visible) if (!this.Visible)
...@@ -358,6 +388,7 @@ namespace OnlineStore.ACPackingStore ...@@ -358,6 +388,7 @@ namespace OnlineStore.ACPackingStore
} }
} }
lblWarnMsg.Text = msg; lblWarnMsg.Text = msg;
LogM();
} }
private void chbAutoRun_CheckedChanged(object sender, EventArgs e) private void chbAutoRun_CheckedChanged(object sender, EventArgs e)
......
...@@ -65,6 +65,13 @@ agv客户端启动时需要设置状态为none。 ...@@ -65,6 +65,13 @@ agv客户端启动时需要设置状态为none。
20200222 20200222
修改:出库时没有给agv发mark 修改:出库时没有给agv发mark
20200223
增加料架的目标位置。
//包装料会发往分盘区, 紧急料区, 包装线区
// urgentReel 这个为true是紧急料 出到紧急料区
// cutReel 为true是分盘料,AGV会拉到到分盘区
//料串会发到分盘区和紧急料区
//两个都为false 包装料默认拉到包装线体, 料串默认拉到紧急料区
......
...@@ -865,10 +865,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -865,10 +865,11 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_DeviceToShelf) else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_DeviceToShelf)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_12_DevicePutWare); MoveInfo.NextMoveStep(StoreMoveStep.SO_12_DevicePutWare);
InOutStoreLog("出库 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101 "); InOutStoreLog("出库 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101,清空serverShelfData=null ");
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed); ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
serverShelfData = null;
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
int posLoc = StoreManager.GetLocByShelfPosID(MoveInfo.MoveParam.ShelfPosID, ShelfPosList); int posLoc = StoreManager.GetLocByShelfPosID(MoveInfo.MoveParam.ShelfPosID, ShelfPosList);
......
...@@ -170,8 +170,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -170,8 +170,9 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.BS_01_TopDown); MoveInfo.NextMoveStep(StoreMoveStep.BS_01_TopDown);
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore)) if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{ {
InOutStoreLog("送出出库料架:顶升气缸下降,调用 NeedLeave[" + CurrShelfID + "][" + CurrShelfID + "],清空料架clearPutInRfid[" + CurrShelfID + "]"); string mark = GetMarkInfo();
AgvClient.NeedLeave(Config.AgvNodeName, CurrShelfID,CurrShelfID); InOutStoreLog("送出出库料架:顶升气缸下降,调用 NeedLeave[" + mark + "][" + CurrShelfID + "],清空料架clearPutInRfid[" + CurrShelfID + "]");
AgvClient.NeedLeave(Config.AgvNodeName, mark, CurrShelfID);
} }
else else
{ {
...@@ -181,17 +182,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -181,17 +182,42 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
StoreManager.clearPutInRfid(Name, CurrShelfID); StoreManager.clearPutInRfid(Name, CurrShelfID);
} }
private string GetMarkInfo()
{
string mark = "0";
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{
//包装料会发往分盘区, 紧急料区, 包装线区
// urgentReel 这个为true是紧急料 出到紧急料区
// cutReel 为true是分盘料,AGV会拉到到分盘区
//料串会发到分盘区和紧急料区
//两个都为false 包装料默认拉到包装线体, 料串默认拉到紧急料区
if (MoveInfo.MoveParam.urgentReel)
{
//紧急料,需要到紧急料区
mark = CurrShelfID + ",urgent";
}
else if (MoveInfo.MoveParam.cutReel)
{
//cutReel 为true是分盘料,AGV会拉到到分盘区
mark = CurrShelfID + ",cut";
}
else
{
mark = CurrShelfID + ",pack";
}
}
return mark;
}
private void ShelfOutProcess() private void ShelfOutProcess()
{ {
string moveName = "送出空料架"; string moveName = "送出空料架";
string mark = "0"; string mark = GetMarkInfo();
//bool instoreShelf = true;
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore)) if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{ {
// instoreShelf = false;
moveName = "送出出库料架"; moveName = "送出出库料架";
mark = CurrShelfID;
} }
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_01_TopDown)) if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_01_TopDown))
......
...@@ -320,7 +320,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -320,7 +320,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(deviceName + " " + ex.ToString()); LogUtil.error(deviceName + " PutShelfFinished error : " + ex.ToString());
} }
return ""; return "";
} }
...@@ -364,7 +364,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -364,7 +364,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(deviceName + " " + ex.ToString()); LogUtil.error(deviceName + " UpdateTrayLoc error " + ex.ToString());
} }
return msg; return msg;
} }
...@@ -388,7 +388,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -388,7 +388,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(deviceName + " " + ex.ToString()); LogUtil.error(deviceName + " clearPutInRfid error " + ex.ToString());
} }
return msg; return msg;
} }
......
...@@ -154,6 +154,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -154,6 +154,11 @@ namespace OnlineStore.DeviceLibrary
} }
public static bool NeedLeave(string id, string mark, string shelfId ) public static bool NeedLeave(string id, string mark, string shelfId )
{ {
//包装料会发往分盘区, 紧急料区, 包装线区
// urgentReel 这个为true是紧急料 出到紧急料区
// cutReel 为true是分盘料,AGV会拉到到分盘区
//料串会发到分盘区和紧急料区
//两个都为false 包装料默认拉到包装线体, 料串默认拉到紧急料区
ClientAction currA = GetAction(id); ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter) || currA.Equals(ClientAction.FinishEnter)||currA.Equals(ClientAction.FinishLeave)) if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter) || currA.Equals(ClientAction.FinishEnter)||currA.Equals(ClientAction.FinishLeave))
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!