Commit 5bd88572 LN

入料模块料架rfid增加缓存功能。

1 个父辈 3e1330f3
20200528
20200529
1.上料模块料架号增加缓存
20200528
RFID更改为最新方式。
接驳台等待料盘到位去掉超时时间。
......
......@@ -91,5 +91,7 @@ namespace OnlineStore.Common
public static string NeedCheckTray = "NeedCheckTray";
public static string RfidServer_Port = "RfidServer_Port";
public static string Feed_LastShelfID_ = "Feed_LastShelfID_";
}
}
......@@ -865,7 +865,7 @@ namespace OnlineStore.DeviceLibrary
});
}
private bool UpdateShelfId()
private bool ReadShelfId()
{
try
{
......@@ -876,6 +876,15 @@ namespace OnlineStore.DeviceLibrary
//发送料架信息给调度系统
// AgvClient.SendRFID(Config.AgvInName, CurrShelfId);
LogUtil.info(Name + "读取到料架编号:" + CurrShelfId);
if (CurrShelfId.EndsWith("00"))
{
string saveShelf = GetShelfID();
if ((!String.IsNullOrEmpty(saveShelf)) && (!saveShelf.EndsWith("00")))
{
LogUtil.info(Name + "读取到的料架号【" + CurrShelfId + "】无效,使用 缓存料架RFID:" + saveShelf);
CurrShelfId = saveShelf;
}
}
}
catch (Exception ex)
{
......@@ -883,6 +892,22 @@ namespace OnlineStore.DeviceLibrary
}
return true;
}
#region 料架号保存
private void UpdateLastShelfID(string currRfid = "")
{
string configStr = Setting_Init.Feed_LastShelfID_ + DeviceID;
ConfigAppSettings.SaveValue(configStr, currRfid);
LogUtil.info(Name + " UpdateLastShelfID 缓存料架RFID更改:【" + configStr + "】=【" + currRfid + "】");
}
private string GetShelfID()
{
string configStr = Setting_Init.Feed_LastShelfID_ + DeviceID;
return ConfigAppSettings.GetValue(configStr);
}
#endregion
#endregion
private string lastcode = "";
public override string GetMoveStr()
......
......@@ -222,7 +222,8 @@ namespace OnlineStore.DeviceLibrary
else if (IOValue(IO_Type.SL_Stop_Check).Equals(IO_VALUE.HIGH))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_03_LineStart);
OutLog("准备出库料架: " + MoveInfo.SLog + " 阻挡工位检测有料架,进料阻挡下降500ms,缓冲阻挡前进1000,流水线转动 5000");
OutLog("准备出库料架: " + MoveInfo.SLog + " 阻挡工位有新料架,清理缓存料架RFID,进料阻挡下降500ms,缓冲阻挡前进1000,流水线转动 5000");
UpdateLastShelfID();
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.HIGH,500);
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.HIGH, 1000);//缓冲阻挡前进1000
IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH);
......@@ -234,7 +235,7 @@ namespace OnlineStore.DeviceLibrary
else if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.HIGH))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_03_LineStart);
OutLog("准备出库料架: " + MoveInfo.SLog + " 进料口检测有料架,进料阻挡上升,缓冲阻挡前进1000,流水线转动 1000");
OutLog("准备出库料架: " + MoveInfo.SLog + " 进料口有新料架,进料阻挡上升,缓冲阻挡前进1000,流水线转动 1000");
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);//进料阻挡上升
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.HIGH, 1000);//缓冲阻挡前进1000
IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH);
......@@ -290,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
{
if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.HIGH))
{
UpdateShelfId();
ReadShelfId();
if (CurrShelfId.EndsWith("00"))
{
SendOutShelfOut("料架号【" + CurrShelfId + "】无效");
......@@ -319,8 +320,8 @@ namespace OnlineStore.DeviceLibrary
//定位工位有料架,直接开始入料
MoveInfo.NextMoveStep(LineMoveStep.FO_05_LocationUp);
OutLog("定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡下降, 定位气缸上升,读取料架号");
//IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
OutLog("定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡下降, 定位气缸上升,读取并缓存料架RFID");
UpdateLastShelfID(CurrShelfId);
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
}
......@@ -469,7 +470,8 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_37_LineStop))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_38_TopDown);
OutLog("送出料串: " + MoveInfo.SLog + ", 料架到达出口,出口顶升下降 ,清空LastOutParam ");
OutLog("送出料串: " + MoveInfo.SLog + ", 料架到达出口,出口顶升下降 ,清空LastOutParam,清理缓存料架RFID ");
UpdateLastShelfID();
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
LastOutParam = new InOutParam();
......
......@@ -61,15 +61,10 @@ namespace OnlineStore.DeviceLibrary
{
continue;
}
list.Add(str.Trim());
//string code = "=1+0x0-" + width + "x" + height + "=" + str.Trim();
list.Add(str.Trim());
string code = "=" + width + "x" + height + "=" + str.Trim();
codeStr = codeStr + code + spiltStr;
}
//if (String.IsNullOrEmpty(codeStr))
//{
// return msg = deviceName + "未扫到条码";
//}
}
codeStr = CodeManager.ReplaceCode(codeStr);
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
......
......@@ -666,34 +666,36 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
FI_22_BatchAxisDown,
/// <summary>
/// 料盘移栽:从服务器获取入库库位号
/// </summary>
FI_23_GetPosID,
/// <summary>
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
/// </summary>
FI_23_WaitTray,
///// <summary>
///// 料盘移栽:移栽伺服下降到P2
///// </summary>
//FI_21_UpdownAxisToP2,
FI_24_WaitTray,
/// <summary>
/// 料盘移栽: 上料机构下降
/// </summary>
FI_24_CylinderDown,
FI_25_CylinderDown,
/// <summary>
/// 料盘移栽: 上料气缸放松
/// </summary>
FI_25_CylinderRelax,
FI_26_CylinderRelax,
/// <summary>
/// 料盘移栽: 上料横移机构上升
/// </summary>
FI_26_WaitCylinderUp,
FI_27_WaitCylinderUp,
/// <summary>
/// 料盘移栽:上料横移机构上升,定位或者顶升可以先下降
/// </summary>
FI_27_CylinderUp,
FI_28_CylinderUp,
/// <summary>
/// 料盘移栽:升降伺服到P1点
/// </summary>
FI_28_UpDownAxisToP1,
FI_29_UpDownAxisToP1,
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!