|
@@ -58,6 +58,203 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#endregion 设置设备IP集合
|
|
|
|
|
|
+ #region 满轮输送线
|
|
|
+
|
|
|
+ #region DB523,所有线体都会有DB523
|
|
|
+
|
|
|
+ var mLtuples523 = new List<Tuple<string, List<Tuple<int, int>>>>()
|
|
|
+ {
|
|
|
+ new("10.30.37.166",new List<Tuple<int, int>>() //北侧满轮主线
|
|
|
+ {
|
|
|
+ new(1, 100),
|
|
|
+ new(9001, 9010),//暂用,无意义
|
|
|
+ new(401, 599),
|
|
|
+ new(801,999),
|
|
|
+ new(1201,1399),
|
|
|
+ }),
|
|
|
+ new("10.30.37.198",new List<Tuple<int, int>>() //南侧满轮主线
|
|
|
+ {
|
|
|
+ new(101, 210),
|
|
|
+ new(601, 799),
|
|
|
+ new(1001, 1199),
|
|
|
+ new(1401,1599),
|
|
|
+ new(341,379),
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
+ foreach (var item in mLtuples523)
|
|
|
+ {
|
|
|
+ var db523 = 0;
|
|
|
+ var db524 = 0;
|
|
|
+ foreach (var item1 in item.Item2)
|
|
|
+ {
|
|
|
+ for (var i = item1.Item1; i <= item1.Item2; i++)
|
|
|
+ {
|
|
|
+ var conv = new Device(i.ToString());
|
|
|
+ conv.AddFlag(DeviceFlags.输送机);
|
|
|
+ conv.AddProtocol<IStation523>(db523, 523, item.Item1);
|
|
|
+ conv.AddProtocol<IStation524>(db524, 524, item.Item1);
|
|
|
+
|
|
|
+ db523 += 12;
|
|
|
+ db524 += 16;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion DB523,所有线体都会有DB523
|
|
|
+
|
|
|
+ #region 520、521 交互线体会有520、521
|
|
|
+
|
|
|
+ //Item2表示线体号集合,Item1表示IP
|
|
|
+ var mLTuples520 = new List<Tuple<string, List<int>>>()
|
|
|
+ {
|
|
|
+ //北侧
|
|
|
+ new("10.30.37.166",new List<int>() {1,22,41,61,418,426,435,444,455,466,480,494,508,522,536,550,564,578,591,818,826,835,844,855,866,880,894,908,922,936,950,964,978,991,1218,1226,1235,1244,1255,1266,1280,1294,1308,1322,1336,1350,1364,1378,1391}),
|
|
|
+ //南侧
|
|
|
+ new("10.30.37.198",new List<int>(){101,122,141,161,618,626,635,644,655,666,680,694,708,722,736,750,764,778,791,1018,1026,1035,1044,1055,1066,1080,1094,1108,1122,1136,1150,1164,1178,1191,1418,1426,1435,1444,1455,1466,1480,1494,1508,1522,1536,1550,1564,1578,1591})
|
|
|
+ };
|
|
|
+
|
|
|
+ foreach (var item in mLTuples520)
|
|
|
+ {
|
|
|
+ var db520 = 0;
|
|
|
+ var db521 = 0;
|
|
|
+
|
|
|
+ foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
+ {
|
|
|
+ if (device != null)
|
|
|
+ {
|
|
|
+ device.AddProtocol<IStation520>(db520, 520, item.Item1);
|
|
|
+ device.AddProtocol<IStation521>(db521, 521, item.Item1);
|
|
|
+ }
|
|
|
+
|
|
|
+ db520 += 14;
|
|
|
+ db521 += 16;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion 520、521 交互线体会有520、521
|
|
|
+
|
|
|
+ #region 满轮扫码器
|
|
|
+
|
|
|
+ //Item2表示线体号集合,Item1表示IP
|
|
|
+ var mLTuples83 = new List<Tuple<string, List<int>>>()
|
|
|
+ {
|
|
|
+ new("10.30.37.166",new List<int>(){3,14,18,22,38,323,41,58,61}) ,
|
|
|
+ new("10.30.37.198",new List<int>(){101,114,118,122,138,363,141,158,161})
|
|
|
+ };
|
|
|
+
|
|
|
+ foreach (var item in mLTuples83)
|
|
|
+ {
|
|
|
+ var db83 = 0;
|
|
|
+
|
|
|
+ foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
+ {
|
|
|
+ device?.AddProtocol<IBCR83>(db83, 83, item.Item1);
|
|
|
+
|
|
|
+ db83 += 604;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion 满轮扫码器
|
|
|
+
|
|
|
+ #region 满轮线告诉分拣预分配
|
|
|
+
|
|
|
+ //Item2表示线体号集合,Item1表示IP
|
|
|
+ var mLTuples525 = new List<Tuple<string, List<int>>>()
|
|
|
+ {
|
|
|
+ new("10.30.37.166",new List<int>(){18,38,58}),
|
|
|
+ new("10.30.37.198",new List<int>(){118,138,158}),
|
|
|
+ };
|
|
|
+
|
|
|
+ foreach (var item in mLTuples525)
|
|
|
+ {
|
|
|
+ var db525 = 0;
|
|
|
+
|
|
|
+ foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
+ {
|
|
|
+ device?.AddProtocol<IStation525>(db525, 525, item.Item1);
|
|
|
+ db525 += 3266;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion 满轮线告诉分拣预分配
|
|
|
+
|
|
|
+ #region 外检信息
|
|
|
+
|
|
|
+ //Item2表示线体号集合,Item1表示IP
|
|
|
+ var mLTuples91 = new List<Tuple<string, List<int>>>()
|
|
|
+ {
|
|
|
+ new("10.30.37.166",new List<int>(){418,818,1218}),
|
|
|
+ new("10.30.37.198",new List<int>(){618,1018,1418})
|
|
|
+ };
|
|
|
+
|
|
|
+ foreach (var item in mLTuples91)
|
|
|
+ {
|
|
|
+ var db91 = 0;
|
|
|
+
|
|
|
+ foreach (var device in item.Item2.Select(item2 => Device.All.FirstOrDefault(v => v.Code == item2.ToString())))
|
|
|
+ {
|
|
|
+ device?.AddProtocol<IStation91>(db91, 91, item.Item1);
|
|
|
+ db91 += 14;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion 外检信息
|
|
|
+
|
|
|
+ #endregion 满轮输送线
|
|
|
+
|
|
|
+ List<RouteInfo> routeInfos1 = new List<RouteInfo>();
|
|
|
+
|
|
|
+ routeInfos1.AddRange(new List<RouteInfo>()
|
|
|
+ {
|
|
|
+ #region 主线
|
|
|
+
|
|
|
+ //北侧
|
|
|
+ new RouteInfo("3", new string[] { "14" }),
|
|
|
+ new RouteInfo("14", new string[] { "18" }),
|
|
|
+ new RouteInfo("18", new string[] { "22" }),
|
|
|
+ new RouteInfo("22", new string[] { "38" }),
|
|
|
+ new RouteInfo("38", new string[] { "41" }),
|
|
|
+ new RouteInfo("41", new string[] { "58" }),
|
|
|
+ new RouteInfo("58", new string[] { "61" }),
|
|
|
+ //南侧
|
|
|
+ new RouteInfo("101", new string[] { "114" }),
|
|
|
+ new RouteInfo("114", new string[] { "118" }),
|
|
|
+ new RouteInfo("118", new string[] { "122" }),
|
|
|
+ new RouteInfo("122", new string[] { "138" }),
|
|
|
+ new RouteInfo("138", new string[] { "141" }),
|
|
|
+ new RouteInfo("141", new string[] { "158" }),
|
|
|
+ new RouteInfo("158", new string[] { "161" }),
|
|
|
+
|
|
|
+ #endregion 主线
|
|
|
+
|
|
|
+ #region 主线分流点--环形库分流点
|
|
|
+
|
|
|
+ new RouteInfo("22", new string[] { "418" }), //分拣库一北
|
|
|
+ new RouteInfo("122", new string[] { "618" }), //分拣库一南
|
|
|
+ new RouteInfo("41", new string[] { "818" }), //分拣库二北
|
|
|
+ new RouteInfo("141", new string[] { "1018" }), //分拣库二南
|
|
|
+ new RouteInfo("61", new string[] { "1218" }), //分拣库三北
|
|
|
+ new RouteInfo("161", new string[] { "1418" }), //分拣库三南
|
|
|
+
|
|
|
+ #endregion 主线分流点--环形库分流点
|
|
|
+ });
|
|
|
+
|
|
|
+ foreach (var routeInfo in routeInfos1)
|
|
|
+ {
|
|
|
+ if (routeInfo != null)
|
|
|
+ {
|
|
|
+ var device = Device.All.FirstOrDefault(x => x.Code == routeInfo.DeviceCode);
|
|
|
+ device.AddTarget(routeInfo.NextList);
|
|
|
+
|
|
|
+ Parallel.ForEach(routeInfo.NextList, next =>
|
|
|
+ {
|
|
|
+ var dev = Device.All.FirstOrDefault(x => x.Code == next);
|
|
|
+ dev.Parent = device;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (WareHouses.Contains("FJ1"))
|
|
|
{
|
|
|
#region 初始化RGV相关信息
|
|
@@ -122,151 +319,6 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#endregion 托盘线输送线
|
|
|
|
|
|
- #region 满轮输送线
|
|
|
-
|
|
|
- #region DB523,所有线体都会有DB523
|
|
|
-
|
|
|
- var mLtuples523 = new List<Tuple<string, List<Tuple<int, int>>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<Tuple<int, int>>() //北侧满轮主线
|
|
|
- {
|
|
|
- new(1, 100),
|
|
|
- new(9001, 9010),//暂用,无意义
|
|
|
- new(401, 599),
|
|
|
- new(801,999),
|
|
|
- new(1201,1399),
|
|
|
- }),
|
|
|
- new("10.30.37.198",new List<Tuple<int, int>>() //南侧满轮主线
|
|
|
- {
|
|
|
- new(101, 210),
|
|
|
- new(601, 799),
|
|
|
- new(1001, 1199),
|
|
|
- new(1401,1599),
|
|
|
- new(341,379),
|
|
|
- })
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLtuples523)
|
|
|
- {
|
|
|
- var db523 = 0;
|
|
|
- var db524 = 0;
|
|
|
- foreach (var item1 in item.Item2)
|
|
|
- {
|
|
|
- for (var i = item1.Item1; i <= item1.Item2; i++)
|
|
|
- {
|
|
|
- var conv = new Device(i.ToString());
|
|
|
- conv.AddFlag(DeviceFlags.输送机);
|
|
|
- conv.AddProtocol<IStation523>(db523, 523, item.Item1);
|
|
|
- conv.AddProtocol<IStation524>(db524, 524, item.Item1);
|
|
|
-
|
|
|
- db523 += 12;
|
|
|
- db524 += 16;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion DB523,所有线体都会有DB523
|
|
|
-
|
|
|
- #region 520、521 交互线体会有520、521
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples520 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- //北侧
|
|
|
- new("10.30.37.166",new List<int>() {1,22,41,61,418,426,435,444,455,466,480,494,508,522,536,550,564,578,591,818,826,835,844,855,866,880,894,908,922,936,950,964,978,991,1218,1226,1235,1244,1255,1266,1280,1294,1308,1322,1336,1350,1364,1378,1391}),
|
|
|
- //南侧
|
|
|
- new("10.30.37.198",new List<int>(){101,122,141,161,618,626,635,644,655,666,680,694,708,722,736,750,764,778,791,1018,1026,1035,1044,1055,1066,1080,1094,1108,1122,1136,1150,1164,1178,1191,1418,1426,1435,1444,1455,1466,1480,1494,1508,1522,1536,1550,1564,1578,1591})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples520)
|
|
|
- {
|
|
|
- var db520 = 0;
|
|
|
- var db521 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- if (device != null)
|
|
|
- {
|
|
|
- device.AddProtocol<IStation520>(db520, 520, item.Item1);
|
|
|
- device.AddProtocol<IStation521>(db521, 521, item.Item1);
|
|
|
- }
|
|
|
-
|
|
|
- db520 += 14;
|
|
|
- db521 += 16;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 520、521 交互线体会有520、521
|
|
|
-
|
|
|
- #region 满轮扫码器
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples83 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){3,14,18,22,38,323,41,58,61}) ,
|
|
|
- new("10.30.37.198",new List<int>(){101,114,118,122,138,363,141,158,161})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples83)
|
|
|
- {
|
|
|
- var db83 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IBCR83>(db83, 83, item.Item1);
|
|
|
-
|
|
|
- db83 += 604;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 满轮扫码器
|
|
|
-
|
|
|
- #region 满轮线告诉分拣预分配
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples525 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){18,38,58}),
|
|
|
- new("10.30.37.198",new List<int>(){118,138,158}),
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples525)
|
|
|
- {
|
|
|
- var db525 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IStation525>(db525, 525, item.Item1);
|
|
|
- db525 += 3266;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 满轮线告诉分拣预分配
|
|
|
-
|
|
|
- #region 外检信息
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples91 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){418,818,1218}),
|
|
|
- new("10.30.37.198",new List<int>(){618,1018,1418})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples91)
|
|
|
- {
|
|
|
- var db91 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item2 => Device.All.FirstOrDefault(v => v.Code == item2.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IStation91>(db91, 91, item.Item1);
|
|
|
- db91 += 14;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 外检信息
|
|
|
-
|
|
|
- #endregion 满轮输送线
|
|
|
-
|
|
|
#endregion 基本信息
|
|
|
|
|
|
#region 托盘线扫码器
|
|
@@ -500,38 +552,6 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#endregion 一楼叠盘机(堆垛机入口)--巷道
|
|
|
|
|
|
- #region 主线
|
|
|
-
|
|
|
- //北侧
|
|
|
- new RouteInfo("3", new string[] { "14" }),
|
|
|
- new RouteInfo("14", new string[] { "18" }),
|
|
|
- new RouteInfo("18", new string[] { "22" }),
|
|
|
- new RouteInfo("22", new string[] { "38" }),
|
|
|
- new RouteInfo("38", new string[] { "41" }),
|
|
|
- new RouteInfo("41", new string[] { "58" }),
|
|
|
- new RouteInfo("58", new string[] { "61" }),
|
|
|
- //南侧
|
|
|
- new RouteInfo("101", new string[] { "114" }),
|
|
|
- new RouteInfo("114", new string[] { "118" }),
|
|
|
- new RouteInfo("118", new string[] { "122" }),
|
|
|
- new RouteInfo("122", new string[] { "138" }),
|
|
|
- new RouteInfo("138", new string[] { "141" }),
|
|
|
- new RouteInfo("141", new string[] { "158" }),
|
|
|
- new RouteInfo("158", new string[] { "161" }),
|
|
|
-
|
|
|
- #endregion 主线
|
|
|
-
|
|
|
- #region 主线分流点--环形库分流点
|
|
|
-
|
|
|
- new RouteInfo("22", new string[] { "418" }), //分拣库一北
|
|
|
- new RouteInfo("122", new string[] { "618" }), //分拣库一南
|
|
|
- new RouteInfo("41", new string[] { "818" }), //分拣库二北
|
|
|
- new RouteInfo("141", new string[] { "1018" }), //分拣库二南
|
|
|
- new RouteInfo("61", new string[] { "1218" }), //分拣库三北
|
|
|
- new RouteInfo("161", new string[] { "1418" }), //分拣库三南
|
|
|
-
|
|
|
- #endregion 主线分流点--环形库分流点
|
|
|
-
|
|
|
#region 环形库分流点--环形库取货点
|
|
|
|
|
|
new RouteInfo("418", new string[] { "424","433","442" }),
|
|
@@ -777,16 +797,16 @@ namespace WCS.WorkEngineering
|
|
|
#region 托盘线输送线
|
|
|
|
|
|
var tuples = new List<Tuple<string, List<Tuple<int, int>>>>
|
|
|
- {
|
|
|
- //分拣库二
|
|
|
- new("10.30.37.97",new List<Tuple<int, int>>()
|
|
|
- {
|
|
|
- new(1621, 1640),
|
|
|
- new(2901, 2940),
|
|
|
- new(3101, 3140),
|
|
|
- new(1691, 1720),
|
|
|
- }),
|
|
|
- };
|
|
|
+ {
|
|
|
+ //分拣库二
|
|
|
+ new("10.30.37.97",new List<Tuple<int, int>>()
|
|
|
+ {
|
|
|
+ new(1621, 1640),
|
|
|
+ new(2901, 2940),
|
|
|
+ new(3101, 3140),
|
|
|
+ new(1691, 1720),
|
|
|
+ }),
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in tuples)
|
|
|
{
|
|
@@ -813,161 +833,16 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#endregion 托盘线输送线
|
|
|
|
|
|
- #region 满轮输送线
|
|
|
-
|
|
|
- #region DB523,所有线体都会有DB523
|
|
|
-
|
|
|
- var mLtuples523 = new List<Tuple<string, List<Tuple<int, int>>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<Tuple<int, int>>() //北侧满轮主线
|
|
|
- {
|
|
|
- new(1, 100),
|
|
|
- new(9001, 9010),//暂用,无意义
|
|
|
- new(401, 599),
|
|
|
- new(801,999),
|
|
|
- new(1201,1399),
|
|
|
- }),
|
|
|
- new("10.30.37.198",new List<Tuple<int, int>>() //南侧满轮主线
|
|
|
- {
|
|
|
- new(101, 210),
|
|
|
- new(601, 799),
|
|
|
- new(1001, 1199),
|
|
|
- new(1401,1599),
|
|
|
- new(341,379),
|
|
|
- })
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLtuples523)
|
|
|
- {
|
|
|
- var db523 = 0;
|
|
|
- var db524 = 0;
|
|
|
- foreach (var item1 in item.Item2)
|
|
|
- {
|
|
|
- for (var i = item1.Item1; i <= item1.Item2; i++)
|
|
|
- {
|
|
|
- var conv = new Device(i.ToString());
|
|
|
- conv.AddFlag(DeviceFlags.输送机);
|
|
|
- conv.AddProtocol<IStation523>(db523, 523, item.Item1);
|
|
|
- conv.AddProtocol<IStation524>(db524, 524, item.Item1);
|
|
|
-
|
|
|
- db523 += 12;
|
|
|
- db524 += 16;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion DB523,所有线体都会有DB523
|
|
|
-
|
|
|
- #region 520、521 交互线体会有520、521
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples520 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- //北侧
|
|
|
- new("10.30.37.166",new List<int>() {1,22,41,61,418,426,435,444,455,466,480,494,508,522,536,550,564,578,591,818,826,835,844,855,866,880,894,908,922,936,950,964,978,991,1218,1226,1235,1244,1255,1266,1280,1294,1308,1322,1336,1350,1364,1378,1391}),
|
|
|
- //南侧
|
|
|
- new("10.30.37.198",new List<int>(){101,122,141,161,618,626,635,644,655,666,680,694,708,722,736,750,764,778,791,1018,1026,1035,1044,1055,1066,1080,1094,1108,1122,1136,1150,1164,1178,1191,1418,1426,1435,1444,1455,1466,1480,1494,1508,1522,1536,1550,1564,1578,1591})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples520)
|
|
|
- {
|
|
|
- var db520 = 0;
|
|
|
- var db521 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- if (device != null)
|
|
|
- {
|
|
|
- device.AddProtocol<IStation520>(db520, 520, item.Item1);
|
|
|
- device.AddProtocol<IStation521>(db521, 521, item.Item1);
|
|
|
- }
|
|
|
-
|
|
|
- db520 += 14;
|
|
|
- db521 += 16;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 520、521 交互线体会有520、521
|
|
|
-
|
|
|
- #region 满轮扫码器
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples83 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){3,14,18,22,38,323,41,58,61}) ,
|
|
|
- new("10.30.37.198",new List<int>(){101,114,118,122,138,363,141,158,161})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples83)
|
|
|
- {
|
|
|
- var db83 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IBCR83>(db83, 83, item.Item1);
|
|
|
-
|
|
|
- db83 += 604;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 满轮扫码器
|
|
|
-
|
|
|
- #region 满轮线告诉分拣预分配
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples525 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){18,38,58}),
|
|
|
- new("10.30.37.198",new List<int>(){118,138,158}),
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples525)
|
|
|
- {
|
|
|
- var db525 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IStation525>(db525, 525, item.Item1);
|
|
|
- db525 += 3266;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 满轮线告诉分拣预分配
|
|
|
-
|
|
|
- #region 外检信息
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples91 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){418,818,1218}),
|
|
|
- new("10.30.37.198",new List<int>(){618,1018,1418})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples91)
|
|
|
- {
|
|
|
- var db91 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item2 => Device.All.FirstOrDefault(v => v.Code == item2.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IStation91>(db91, 91, item.Item1);
|
|
|
- db91 += 14;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 外检信息
|
|
|
-
|
|
|
- #endregion 满轮输送线
|
|
|
-
|
|
|
#endregion 基本信息
|
|
|
|
|
|
#region 托盘线扫码器
|
|
|
|
|
|
var bcrInfo = new List<BcrInfo>
|
|
|
- {
|
|
|
- new(new [] { "2932", "3132" }, "10.30.37.97"),
|
|
|
- new(new [] {"RGV3"},"10.30.37.123"),
|
|
|
- new(new [] {"RGV4"},"10.30.37.128"),
|
|
|
- };
|
|
|
+ {
|
|
|
+ new(new [] { "2932", "3132" }, "10.30.37.97"),
|
|
|
+ new(new [] {"RGV3"},"10.30.37.123"),
|
|
|
+ new(new [] {"RGV4"},"10.30.37.128"),
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in bcrInfo)
|
|
|
{
|
|
@@ -985,9 +860,9 @@ namespace WCS.WorkEngineering
|
|
|
#region 外检信息
|
|
|
|
|
|
List<ShapeInfo> shapeInfo = new List<ShapeInfo>
|
|
|
- {
|
|
|
- new ShapeInfo(new int[] { 2932,3132 }, "10.30.37.97"),
|
|
|
- };
|
|
|
+ {
|
|
|
+ new ShapeInfo(new int[] { 2932,3132 }, "10.30.37.97"),
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in shapeInfo)
|
|
|
{
|
|
@@ -1007,9 +882,9 @@ namespace WCS.WorkEngineering
|
|
|
#region 初始化桁架相关信息
|
|
|
|
|
|
List<TrussSegmentInfo> TrussInfo = new List<TrussSegmentInfo>
|
|
|
- {
|
|
|
- new TrussSegmentInfo( 2, "10.30.37.217"),
|
|
|
- };
|
|
|
+ {
|
|
|
+ new TrussSegmentInfo( 2, "10.30.37.217"),
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in TrussInfo)
|
|
|
{
|
|
@@ -1021,10 +896,10 @@ namespace WCS.WorkEngineering
|
|
|
}
|
|
|
|
|
|
var tuples1 = new List<Tuple<string, List<int>>>
|
|
|
- {
|
|
|
- //桁架
|
|
|
- new("10.30.37.217",new List<int>(){1715,1716,1717,1718,1719,1720,1705,1704,1703,1702,1701,1700,1707,1708,1709,1710,1695,1694,1693,1692,1636,1626}), //分拣库二
|
|
|
- };
|
|
|
+ {
|
|
|
+ //桁架
|
|
|
+ new("10.30.37.217",new List<int>(){1715,1716,1717,1718,1719,1720,1705,1704,1703,1702,1701,1700,1707,1708,1709,1710,1695,1694,1693,1692,1636,1626}), //分拣库二
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in tuples1)
|
|
|
{
|
|
@@ -1045,12 +920,12 @@ namespace WCS.WorkEngineering
|
|
|
}
|
|
|
|
|
|
var tuples21 = new List<Tuple<string, List<int>>>
|
|
|
- {
|
|
|
- //机械臂
|
|
|
+ {
|
|
|
+ //机械臂
|
|
|
|
|
|
- new("10.30.37.234",new List<int>(){ 1696, 1691}), //库二北
|
|
|
- new("10.30.37.236",new List<int>(){ 1711, 1706}), //库二南
|
|
|
- };
|
|
|
+ new("10.30.37.234",new List<int>(){ 1696, 1691}), //库二北
|
|
|
+ new("10.30.37.236",new List<int>(){ 1711, 1706}), //库二南
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in tuples21)
|
|
|
{
|
|
@@ -1070,10 +945,10 @@ namespace WCS.WorkEngineering
|
|
|
#region 初始化机械臂相关信息
|
|
|
|
|
|
List<TrussSegmentInfo> TrussInfo1 = new List<TrussSegmentInfo>
|
|
|
- {
|
|
|
- new( 3, "10.30.37.234"),
|
|
|
- new( 4, "10.30.37.236"),
|
|
|
- };
|
|
|
+ {
|
|
|
+ new( 3, "10.30.37.234"),
|
|
|
+ new( 4, "10.30.37.236"),
|
|
|
+ };
|
|
|
|
|
|
foreach (var item in TrussInfo1)
|
|
|
{
|
|
@@ -1090,11 +965,11 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
int ip = 57;
|
|
|
|
|
|
- for (int i = 0; i <= 1; i++)
|
|
|
+ for (int i = 2; i <= 3; i++)
|
|
|
{
|
|
|
var srm = new Device($"SRM{i + 1}");
|
|
|
srm.AddFlag(DeviceFlags.堆垛机);
|
|
|
- ip = i == 0 ? ip : ip + 8;
|
|
|
+ ip = i == 2 ? ip : ip + 8;
|
|
|
//三台堆垛机IP主机位分别是 41、49、57、65、73、81
|
|
|
srm.AddProtocol<ISRM520>(0, 520, $"10.30.37.{ip}");
|
|
|
srm.AddProtocol<ISRM521>(0, 521, $"10.30.37.{ip}");
|
|
@@ -1196,28 +1071,6 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#endregion 一楼叠盘机(堆垛机入口)--巷道
|
|
|
|
|
|
- #region 主线
|
|
|
-
|
|
|
- //北侧
|
|
|
- new RouteInfo("38", new string[] { "41" }),
|
|
|
- new RouteInfo("41", new string[] { "58" }),
|
|
|
- new RouteInfo("58", new string[] { "61" }),
|
|
|
- //南侧
|
|
|
- new RouteInfo("138", new string[] { "141" }),
|
|
|
- new RouteInfo("141", new string[] { "158" }),
|
|
|
- new RouteInfo("158", new string[] { "161" }),
|
|
|
-
|
|
|
- #endregion 主线
|
|
|
-
|
|
|
- #region 主线分流点--环形库分流点
|
|
|
-
|
|
|
- new RouteInfo("41", new string[] { "818" }), //分拣库二北
|
|
|
- new RouteInfo("141", new string[] { "1018" }), //分拣库二南
|
|
|
- new RouteInfo("61", new string[] { "1218" }), //分拣库三北
|
|
|
- new RouteInfo("161", new string[] { "1418" }), //分拣库三南
|
|
|
-
|
|
|
- #endregion 主线分流点--环形库分流点
|
|
|
-
|
|
|
#region 环形库分流点--环形库取货点
|
|
|
|
|
|
new RouteInfo("818", new string[] { "824","833","842" }),
|
|
@@ -1496,151 +1349,6 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#endregion 托盘线输送线
|
|
|
|
|
|
- #region 满轮输送线
|
|
|
-
|
|
|
- #region DB523,所有线体都会有DB523
|
|
|
-
|
|
|
- var mLtuples523 = new List<Tuple<string, List<Tuple<int, int>>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<Tuple<int, int>>() //北侧满轮主线
|
|
|
- {
|
|
|
- new(1, 100),
|
|
|
- new(9001, 9010),//暂用,无意义
|
|
|
- new(401, 599),
|
|
|
- new(801,999),
|
|
|
- new(1201,1399),
|
|
|
- }),
|
|
|
- new("10.30.37.198",new List<Tuple<int, int>>() //南侧满轮主线
|
|
|
- {
|
|
|
- new(101, 210),
|
|
|
- new(601, 799),
|
|
|
- new(1001, 1199),
|
|
|
- new(1401,1599),
|
|
|
- new(341,379),
|
|
|
- })
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLtuples523)
|
|
|
- {
|
|
|
- var db523 = 0;
|
|
|
- var db524 = 0;
|
|
|
- foreach (var item1 in item.Item2)
|
|
|
- {
|
|
|
- for (var i = item1.Item1; i <= item1.Item2; i++)
|
|
|
- {
|
|
|
- var conv = new Device(i.ToString());
|
|
|
- conv.AddFlag(DeviceFlags.输送机);
|
|
|
- conv.AddProtocol<IStation523>(db523, 523, item.Item1);
|
|
|
- conv.AddProtocol<IStation524>(db524, 524, item.Item1);
|
|
|
-
|
|
|
- db523 += 12;
|
|
|
- db524 += 16;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion DB523,所有线体都会有DB523
|
|
|
-
|
|
|
- #region 520、521 交互线体会有520、521
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples520 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- //北侧
|
|
|
- new("10.30.37.166",new List<int>() {1,22,41,61,418,426,435,444,455,466,480,494,508,522,536,550,564,578,591,818,826,835,844,855,866,880,894,908,922,936,950,964,978,991,1218,1226,1235,1244,1255,1266,1280,1294,1308,1322,1336,1350,1364,1378,1391}),
|
|
|
- //南侧
|
|
|
- new("10.30.37.198",new List<int>(){101,122,141,161,618,626,635,644,655,666,680,694,708,722,736,750,764,778,791,1018,1026,1035,1044,1055,1066,1080,1094,1108,1122,1136,1150,1164,1178,1191,1418,1426,1435,1444,1455,1466,1480,1494,1508,1522,1536,1550,1564,1578,1591})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples520)
|
|
|
- {
|
|
|
- var db520 = 0;
|
|
|
- var db521 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- if (device != null)
|
|
|
- {
|
|
|
- device.AddProtocol<IStation520>(db520, 520, item.Item1);
|
|
|
- device.AddProtocol<IStation521>(db521, 521, item.Item1);
|
|
|
- }
|
|
|
-
|
|
|
- db520 += 14;
|
|
|
- db521 += 16;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 520、521 交互线体会有520、521
|
|
|
-
|
|
|
- #region 满轮扫码器
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples83 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){3,14,18,22,38,323,41,58,61}) ,
|
|
|
- new("10.30.37.198",new List<int>(){101,114,118,122,138,363,141,158,161})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples83)
|
|
|
- {
|
|
|
- var db83 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IBCR83>(db83, 83, item.Item1);
|
|
|
-
|
|
|
- db83 += 604;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 满轮扫码器
|
|
|
-
|
|
|
- #region 满轮线告诉分拣预分配
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples525 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){18,38,58}),
|
|
|
- new("10.30.37.198",new List<int>(){118,138,158}),
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples525)
|
|
|
- {
|
|
|
- var db525 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item1 => Device.All.FirstOrDefault(v => v.Code == item1.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IStation525>(db525, 525, item.Item1);
|
|
|
- db525 += 3266;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 满轮线告诉分拣预分配
|
|
|
-
|
|
|
- #region 外检信息
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- var mLTuples91 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new("10.30.37.166",new List<int>(){418,818,1218}),
|
|
|
- new("10.30.37.198",new List<int>(){618,1018,1418})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in mLTuples91)
|
|
|
- {
|
|
|
- var db91 = 0;
|
|
|
-
|
|
|
- foreach (var device in item.Item2.Select(item2 => Device.All.FirstOrDefault(v => v.Code == item2.ToString())))
|
|
|
- {
|
|
|
- device?.AddProtocol<IStation91>(db91, 91, item.Item1);
|
|
|
- db91 += 14;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 外检信息
|
|
|
-
|
|
|
- #endregion 满轮输送线
|
|
|
-
|
|
|
#endregion 基本信息
|
|
|
|
|
|
#region 托盘线扫码器
|
|
@@ -1770,14 +1478,14 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#region 初始化堆垛机相关信息
|
|
|
|
|
|
- int ip = 7;
|
|
|
+ int ip = 73;
|
|
|
|
|
|
- for (int i = 73; i <= 1; i++)
|
|
|
+ for (int i = 4; i <= 5; i++)
|
|
|
{
|
|
|
var srm = new Device($"SRM{i + 1}");
|
|
|
srm.AddFlag(DeviceFlags.堆垛机);
|
|
|
- ip = i == 0 ? ip : ip + 8;
|
|
|
- //三台堆垛机IP主机位分别是 41、49、57、65、73、8
|
|
|
+ ip = i == 4 ? ip : ip + 8;
|
|
|
+ //三台堆垛机IP主机位分别是 41、49、57、65、73、81
|
|
|
srm.AddProtocol<ISRM520>(0, 520, $"10.30.37.{ip}");
|
|
|
srm.AddProtocol<ISRM521>(0, 521, $"10.30.37.{ip}");
|
|
|
srm.AddProtocol<ISRM523>(0, 537, $"10.30.37.{ip}");
|
|
@@ -1885,24 +1593,6 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#endregion 环形库分流点--环形库取货点
|
|
|
|
|
|
- #region 主线
|
|
|
-
|
|
|
- //北侧
|
|
|
-
|
|
|
- new RouteInfo("58", new string[] { "61" }),
|
|
|
- //南侧
|
|
|
-
|
|
|
- new RouteInfo("158", new string[] { "161" }),
|
|
|
-
|
|
|
- #endregion 主线
|
|
|
-
|
|
|
- #region 主线分流点--环形库分流点
|
|
|
-
|
|
|
- new RouteInfo("61", new string[] { "1218" }), //分拣库三北
|
|
|
- new RouteInfo("161", new string[] { "1418" }), //分拣库三南
|
|
|
-
|
|
|
- #endregion 主线分流点--环形库分流点
|
|
|
-
|
|
|
#region 环形库分流点--桁架分流点
|
|
|
|
|
|
new RouteInfo("1218", new string[] { "1255" }), //分拣库三北
|
|
@@ -2135,6 +1825,17 @@ namespace WCS.WorkEngineering
|
|
|
{ DeviceFlags.Robot, new List<string>(){ "Robot1", "Robot2" } },
|
|
|
{DeviceFlags.二次码垛RGV取货口, new List<string>(){ "1606", "1616"}}
|
|
|
};
|
|
|
+ Parallel.ForEach(devices, device =>
|
|
|
+ {
|
|
|
+ Parallel.ForEach(device.Value, value =>
|
|
|
+ {
|
|
|
+ var dev = Device.All.FirstOrDefault(v => v.Code == value);
|
|
|
+ if (dev != null)
|
|
|
+ {
|
|
|
+ dev.AddFlag(device.Key);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
if (WareHouses.Contains("FJ2"))
|
|
|
{
|
|
@@ -2153,8 +1854,19 @@ namespace WCS.WorkEngineering
|
|
|
{ DeviceFlags.环形库码垛工位, new List<string>(){"1691", "1696", "1706", "1711" } },
|
|
|
{ DeviceFlags.AGV取货站台口, new List<string>(){"2934","2933","3133", "3134"} },
|
|
|
{ DeviceFlags.Robot, new List<string>(){ "Robot3", "Robot4" } },
|
|
|
- {DeviceFlags.二次码垛RGV取货口, new List<string>(){ "1626","1636"}}
|
|
|
+ { DeviceFlags.二次码垛RGV取货口, new List<string>(){ "1626","1636"}}
|
|
|
};
|
|
|
+ Parallel.ForEach(devices, device =>
|
|
|
+ {
|
|
|
+ Parallel.ForEach(device.Value, value =>
|
|
|
+ {
|
|
|
+ var dev = Device.All.FirstOrDefault(v => v.Code == value);
|
|
|
+ if (dev != null)
|
|
|
+ {
|
|
|
+ dev.AddFlag(device.Key);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
if (WareHouses.Contains("FJ3"))
|
|
|
{
|
|
@@ -2175,19 +1887,18 @@ namespace WCS.WorkEngineering
|
|
|
{ DeviceFlags.Robot, new List<string>(){ "Robot5", "Robot6" } },
|
|
|
{DeviceFlags.二次码垛RGV取货口, new List<string>(){ "1646","1656"}}
|
|
|
};
|
|
|
- }
|
|
|
-
|
|
|
- Parallel.ForEach(devices, device =>
|
|
|
- {
|
|
|
- Parallel.ForEach(device.Value, value =>
|
|
|
+ Parallel.ForEach(devices, device =>
|
|
|
{
|
|
|
- var dev = Device.All.FirstOrDefault(v => v.Code == value);
|
|
|
- if (dev != null)
|
|
|
+ Parallel.ForEach(device.Value, value =>
|
|
|
{
|
|
|
- dev.AddFlag(device.Key);
|
|
|
- }
|
|
|
+ var dev = Device.All.FirstOrDefault(v => v.Code == value);
|
|
|
+ if (dev != null)
|
|
|
+ {
|
|
|
+ dev.AddFlag(device.Key);
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ }
|
|
|
|
|
|
#endregion 标签配置
|
|
|
}
|