Commit 150c5755 LN

出库逻辑修改

1 个父辈 b76e97b6
...@@ -199,6 +199,30 @@ namespace OnlineStore.Common ...@@ -199,6 +199,30 @@ namespace OnlineStore.Common
/// <summary> /// <summary>
/// 温度报警值 /// 温度报警值
/// </summary> /// </summary>
public static string maxTemperature = "temp"; public static string maxTemperature = "temp";
/// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
public static string urgentReel = "urgentReel";
/// <summary>
/// cutReel: true 表示分盘料,需要出到料串上
/// </summary>
public static string cutReel = "cutReel";
/// <summary>
/// smallReel: true 小料(7x8),放置到小料架上
/// </summary>
public static string smallReel = "smallReel";
/// <summary>
/// rfid: 分配的料架RFID
/// </summary>
public static string rfid = "rfid";
/// <summary>
/// rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线, 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线,
/// 70,71,72时只能分配到3 / 4号皮带线; 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3 / 4号皮带线
/// </summary>
public static string rfidLoc = "rfidLoc";
public static string barcode = "barcode";
} }
} }
...@@ -91,5 +91,36 @@ namespace OnlineStore.Common ...@@ -91,5 +91,36 @@ namespace OnlineStore.Common
} }
return span.Hours.ToString().PadLeft(2, '0') + ":" + span.Minutes.ToString().PadLeft(2, '0') + ":" + seconds; return span.Hours.ToString().PadLeft(2, '0') + ":" + span.Minutes.ToString().PadLeft(2, '0') + ":" + seconds;
} }
public static bool GetBoolData(Dictionary<string, string> data, string key, bool defaultValue = false)
{
if (data.ContainsKey(key))
{
try
{
return Convert.ToBoolean(data[key]);
}
catch (Exception ex)
{
}
}
return defaultValue;
}
public static int GetIntData(Dictionary<string, string> data, string key, int defaultValue = 0)
{
if (data.ContainsKey(key))
{
try
{
return Convert.ToInt32(data[key]);
}
catch (Exception ex)
{
}
}
return defaultValue;
}
} }
} }
...@@ -43,6 +43,7 @@ namespace OnlineStore.Common ...@@ -43,6 +43,7 @@ namespace OnlineStore.Common
{ {
if (sb.openPort()) if (sb.openPort())
{ {
serialBeanMap.Add(port, sb);
return true; return true;
} }
else else
......
...@@ -20,39 +20,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,39 +20,34 @@ namespace OnlineStore.DeviceLibrary
{ {
this.WareCode = ""; this.WareCode = "";
MoveP = null; MoveP = null;
} }
/// <summary> public InOutParam(string wareNo, string posId, string ShelfPosID, string platew = "", string plateh = "", bool urgentReel = false, bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0)
/// 新建一个对象
/// </summary>
/// <param name="wareNo">物品二维码</param>
/// <param name="position">仓位号</param>
public InOutParam(string wareNo, string posId,string ShelfPosID)
{
this.ShelfPosID = ShelfPosID;
WareCode = wareNo;
PosID = posId;
MoveP = null;
IsSolderPaste = false;
}
public InOutParam(string wareNo, string posId,string plateH,string plateW, string ShelfPosID )
{ {
this.ShelfPosID = ShelfPosID; this.ShelfPosID = ShelfPosID;
WareCode = wareNo; WareCode = wareNo;
PosID = posId; PosID = posId;
MoveP = null; MoveP = null;
this.PlateW = plateW; this.PlateW = platew;
this.PlateH = plateH; this.PlateH = plateh;
IsSolderPaste = false; this.urgentReel = urgentReel;
this.cutReel = cutReel;
this.smallReel = smallReel;
this.rfid = rfid;
this.rfidLoc = rfidLoc;
} }
public InOutParam(string wareNo, string posId, string ShelfPosID,LineMoveP linePosition ) public InOutParam(string wareNo, string posId, string ShelfPosID,LineMoveP linePosition )
{ {
WareCode = wareNo; WareCode = wareNo;
this.ShelfPosID = ShelfPosID; this.ShelfPosID = ShelfPosID;
PosID = posId; PosID = posId;
MoveP = linePosition; MoveP = linePosition;
IsSolderPaste = false;
NeedEnterShelf = false; NeedEnterShelf = false;
NeedOutShelf = false; NeedOutShelf = false;
this.urgentReel = false ;
this.cutReel = false ;
this.smallReel = false ;
this.rfid = "";
this.rfidLoc = 0;
} }
/// <summary> /// <summary>
/// 物品二维码信息 /// 物品二维码信息
...@@ -75,10 +70,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,10 +70,7 @@ namespace OnlineStore.DeviceLibrary
/// 料盘宽度 /// 料盘宽度
/// </summary> /// </summary>
public string PlateW { get; set; } public string PlateW { get; set; }
/// <summary>
/// 是否是放入锡膏(在线料仓才需要此字段)
/// </summary>
public bool IsSolderPaste { get; set; }
/// <summary> /// <summary>
/// 出入库时需要进入新料架 /// 出入库时需要进入新料架
...@@ -88,6 +80,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -88,6 +80,31 @@ namespace OnlineStore.DeviceLibrary
/// 出入库结束后需要将料架送出 /// 出入库结束后需要将料架送出
/// </summary> /// </summary>
public bool NeedOutShelf = true; public bool NeedOutShelf = true;
/// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
public bool urgentReel { get; set; }
/// <summary>
/// cutReel: true 表示分盘料,需要出到料串上
/// </summary>
public bool cutReel { get; set; }
/// <summary>
/// smallReel: true 小料(7x8),放置到小料架上
/// </summary>
public bool smallReel { get; set; }
/// <summary>
/// rfid: 分配的料架RFID
/// </summary>
public string rfid { get; set; }
/// <summary>
/// rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线,
/// 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线,
/// 70,71,72时只能分配到3 / 4号皮带线;
/// 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3/ 4号皮带线
/// </summary>
public int rfidLoc { get; set; }
/// <summary> /// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1 /// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
...@@ -114,7 +131,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -114,7 +131,9 @@ namespace OnlineStore.DeviceLibrary
} }
public string ToStr() public string ToStr()
{ {
return " ShelfPosID=["+ ShelfPosID + "],WareCode=【" + WareCode + "】,PosID=【" + PosID + "】,PlateW=【" + PlateW + "】,PlateH=【" + PlateH + "】"; return " ShelfPosID=[" + ShelfPosID + "],WareCode [" + WareCode + "],PosID [" + PosID + "],PlateW [" + PlateW + "],PlateH [" + PlateH + "]" +
"NeedEnterShelf【" + NeedEnterShelf + "】NeedOutShelf【" + NeedOutShelf + "】"+
"urgentReel [" + urgentReel + "],cutReel [" + cutReel + "],smallReel [" + smallReel + "],rfid [" + rfid + "],rfidLoc [" + rfidLoc + "]";
} }
internal void UpdateShelfPosId(string pId) internal void UpdateShelfPosId(string pId)
......
...@@ -170,36 +170,40 @@ namespace OnlineStore.DeviceLibrary ...@@ -170,36 +170,40 @@ namespace OnlineStore.DeviceLibrary
BI_02_DoorOpen = 1002, BI_02_DoorOpen = 1002,
/// <summary> /// <summary>
/// 料架入库:线体正转 /// 料架入库:线体正转,等待入料口检测到信号
/// </summary> /// </summary>
BI_03_LineRun = 1003, BI_03_LineRun = 1003,
/// <summary> /// <summary>
/// 等待取料位检测到信号
/// </summary>
BI_04_WaitTakeSingle=1004,
/// <summary>
/// 料架入库:取料位检测到信号,停止线体正转 /// 料架入库:取料位检测到信号,停止线体正转
/// </summary> /// </summary>
BI_04_LineStop = 1004, BI_05_LineStop = 1005,
/// <summary> /// <summary>
/// 料架入库:入料口移门关闭,等待1000 /// 料架入库:入料口移门关闭,等待1000
/// </summary> /// </summary>
BI_05_DoorClose = 1005, BI_06_DoorClose = 1006,
/// <summary> /// <summary>
/// 线体再正转1秒 /// 线体再正转1秒
/// </summary> /// </summary>
BI_06_LineRun=1006, BI_07_LineRun=1007,
/// <summary> /// <summary>
/// 料架入库:定位装置上升 /// 料架入库:定位装置上升
/// </summary> /// </summary>
BI_07_LocationUp = 1007, BI_08_LocationUp = 1008,
/// <summary> /// <summary>
/// 料架入库:顶升装置上升 /// 料架入库:顶升装置上升
/// </summary> /// </summary>
BI_08_TopCylinderUp = 1008, BI_09_TopCylinderUp = 1009,
#endregion #endregion
#region 出库步骤 2000开始 #region 出库步骤 2000开始
/// <summary> /// <summary>
///料仓出库,,定位气缸下降 ///料仓出库,,定位气缸下降
/// </summary> /// </summary>
...@@ -273,7 +277,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -273,7 +277,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 料架入库:开始循环从第一个空位逐个取料盘,扫码入库 /// 料架入库:开始循环从第一个空位逐个取料盘,扫码入库
/// </summary> /// </summary>
BI_08_StartGetTray = 20008, BI_10_StartGetTray = 3010,
/// <summary> /// <summary>
/// 料架取料:叉子后退到待机点P1 /// 料架取料:叉子后退到待机点P1
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!