Commit 0f1f1b80 LN

放料到托盘优化

1 个父辈 36387ea6
......@@ -250,7 +250,17 @@ PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=800
皮带线456需要提前扫码,扫码后缓存,送料逻辑修改。
20200306
未更新:
放盘逻辑修改:阻挡1检测持续500ms,阻挡2检测持续灭500ms才可以下降阻挡1。
料架rfid读取需要增加重连。
需要修改:
上料模块,取料后达到流水线,可以先走伺服位置,然后再等托盘。
上料模块,等到托盘放料后,放松气缸到位,升降伺服,升降气缸和定位下降可以一起动作。放托盘离开需要等升降气缸到位。
问题:入料1 9:36,料架送走以后又发needLeave
......
......@@ -77,7 +77,7 @@ namespace OnlineStore.DeviceLibrary
bool canProcess = (LineManager.Line.SwNoProcess(Config.SidesWayNum));
if (IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH))
{
if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, true) && canProcess)
if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, false ) && canProcess)
{
swWaitWatch.Stop();
UpdateTrayNum();
......@@ -99,7 +99,7 @@ namespace OnlineStore.DeviceLibrary
else if (Config.SidesWayNum.Equals(2) && IOValue(IO_Type.SW_StopCheck).Equals(IO_VALUE.HIGH)
&& (DateTime.Now - lastStopDown).TotalSeconds > 3)
{
if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, true) && canProcess)
if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, false ) && canProcess)
{
swWaitWatch.Stop();
lastStopDown = DateTime.Now;
......@@ -683,11 +683,14 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_CylinderGive))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_20_WaitTray);
int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth);
string log = ":移栽伺服下降到P2:" + targetPositon;
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
bool isScan = ConfigAppSettings.GetIntValue(Setting_Init.NeedScanCode).Equals(1);
//TODO 此处需要等待空托盘
if (MoveInfo.ShelfNoTray.Equals(false) && isScan)
{
InLog("料盘移栽" + MoveInfo.SLog + ":等待空托盘到达,同时为下一盘料预扫码");
InLog("料盘移栽" + MoveInfo.SLog + ":等待空托盘到达 "+ log + ",同时为下一盘料预扫码");
//还有料盘,直接扫码
NextCodeList = new List<string>();
try
......@@ -711,7 +714,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
InLog("料盘移栽" + MoveInfo.SLog + ":等待空托盘到达");
InLog("料盘移栽" + MoveInfo.SLog + ":等待空托盘到达 " + log + "");
}
}
......@@ -719,10 +722,14 @@ namespace OnlineStore.DeviceLibrary
{
if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_21_UpdownAxisToP2);
int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth);
InLog("料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到P2:" + targetPositon + ",托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息");
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
// MoveInfo.NextMoveStep(LineMoveStep.FI_21_UpdownAxisToP2);
//int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth);
//InLog("料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到P2:" + targetPositon + ",托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息");
//UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
MoveInfo.NextMoveStep(LineMoveStep.FI_22_CylinderDown);
InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降, 托盘号【" + currTrayNum + "】,获取库位号,更新托盘信息");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
Task.Factory.StartNew(delegate
{
......@@ -736,7 +743,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, param, "扫码失败");
}
//从服务器获取库位号
string result = SServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth,CurrShelfId,DeviceID);
string result = SServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth, CurrShelfId, DeviceID);
if (!result.Equals(""))
{
InOutParam param = new InOutParam(currTrayNum, code, "", LastHeight, LastWidth, true);
......@@ -756,13 +763,12 @@ namespace OnlineStore.DeviceLibrary
//送出料架处理
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_UpdownAxisToP2))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_22_CylinderDown);
InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降,");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_UpdownAxisToP2))
//{
// MoveInfo.NextMoveStep(LineMoveStep.FI_22_CylinderDown);
// InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降,");
// CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
//}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_CylinderDown))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_23_CylinderRelax);
......@@ -781,6 +787,16 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.FI_25_UpDownAxisToP1);
InLog("料盘移栽" + MoveInfo.SLog + ":升降伺服到P1点");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
if (Config.SidesWayNum > 0)
{
InLog(MoveInfo.SLog + " 提前下降顶升气缸 ,环形线定位气缸先下降");
CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
}
else
{
InLog(MoveInfo.SLog + " 提前顶升下降, 顶升气缸下降)");
CylinderMove(null, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down);
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_UpDownAxisToP1))
......@@ -796,7 +812,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_31_BatchAxisToP2))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_32_TrayLocationCylinder_After);
InLog("上料完成" + MoveInfo.SLog + ": 升降盘定位气缸后退, 清理料架信息clearPutInRfid["+CurrShelfId+"]");
InLog("上料完成" + MoveInfo.SLog + ": 升降盘定位气缸后退, 清理料架信息clearPutInRfid[" + CurrShelfId + "]");
TrayLCylinderAfter(MoveInfo);
SServerManager.clearPutInRfid(Name, CurrShelfId);
}
......@@ -1106,7 +1122,7 @@ namespace OnlineStore.DeviceLibrary
if (trayCanUse && runStatus.Equals(LineRunStatus.Busy) && MoveInfo.MoveType.Equals(LineMoveType.InStore))
{
//入料执行中, 且需要空托盘
if (MoveInfo.MoveStep >= LineMoveStep.FI_20_WaitTray && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray)
if (MoveInfo.MoveStep .Equals(LineMoveStep.FI_20_WaitTray)&&MoveInfo.IsInWait.Equals(false))
//if (MoveInfo.MoveStep >= LineMoveStep.FI_11_CylinderUp && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray)
{
if (NeedSaveParam)
......
......@@ -162,8 +162,9 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_59_CylinderRelax))
{
this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_CylinderUp);
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸上升");
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸上升,同时顶升气缸先下降");
UpdownUpMove();
CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_60_CylinderUp))
{
......
......@@ -662,13 +662,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
FI_19_CylinderGive ,
/// <summary>
/// 料盘移栽:等待空托盘到达,并顶升上升,定位上升
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
/// </summary>
FI_20_WaitTray ,
/// <summary>
/// 料盘移栽:移栽伺服下降到P2
/// </summary>
FI_21_UpdownAxisToP2,
FI_20_WaitTray,
///// <summary>
///// 料盘移栽:移栽伺服下降到P2
///// </summary>
//FI_21_UpdownAxisToP2,
/// <summary>
/// 料盘移栽: 上料机构下降
/// </summary>
......@@ -679,7 +679,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
FI_23_CylinderRelax ,
/// <summary>
/// 料盘移栽:上料横移机构上升
/// 料盘移栽:上料横移机构上升,定位或者顶升可以先下降
/// </summary>
FI_24_CylinderUp,
/// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!