|
@@ -36,13 +36,13 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
List<Tuple<string, List<Tuple<int, int>>>> tuples = new List<Tuple<string, List<Tuple<int, int>>>>()
|
|
|
{
|
|
|
- new Tuple<string, List<Tuple<int, int>>>("10.30.37.89",new List<Tuple<int, int>>()
|
|
|
- {
|
|
|
- new Tuple<int, int>(1601, 1620),
|
|
|
- new Tuple<int, int>(2501, 2540),
|
|
|
+ //new Tuple<string, List<Tuple<int, int>>>("10.30.37.89",new List<Tuple<int, int>>()
|
|
|
+ //{
|
|
|
+ // new Tuple<int, int>(1601, 1620),
|
|
|
+ // new Tuple<int, int>(2501, 2540),
|
|
|
|
|
|
- new Tuple<int, int>(2701, 2740),
|
|
|
- })
|
|
|
+ // new Tuple<int, int>(2701, 2740),
|
|
|
+ //})
|
|
|
};
|
|
|
|
|
|
foreach (var item in tuples)
|
|
@@ -70,122 +70,13 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#endregion 托盘线输送线
|
|
|
|
|
|
- #region 满轮输送线
|
|
|
-
|
|
|
- #region DB523,所有线体都会有DB523
|
|
|
-
|
|
|
- List<Tuple<string, List<Tuple<int, int>>>> MLtuples523 = new List<Tuple<string, List<Tuple<int, int>>>>()
|
|
|
- {
|
|
|
- new Tuple<string, List<Tuple<int, int>>>("10.30.37.166",new List<Tuple<int, int>>()
|
|
|
- {
|
|
|
- new Tuple<int, int>(1, 110),
|
|
|
- new Tuple<int, int>(401, 586),
|
|
|
- })
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in MLtuples523)
|
|
|
- {
|
|
|
- var db523 = 0;
|
|
|
- var db524 = 0;
|
|
|
- foreach (var item1 in item.Item2)
|
|
|
- {
|
|
|
- for (int 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);
|
|
|
- if (i == 475)
|
|
|
- {
|
|
|
- var a = 0;
|
|
|
- }
|
|
|
- db523 = db523 + 12;
|
|
|
- db524 = db524 + 16;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion DB523,所有线体都会有DB523
|
|
|
-
|
|
|
- #region 520、521 交互线体会有520、521
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- List<Tuple<string, List<int>>> MLtuples520 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new Tuple<string, List<int>>("10.30.37.166",new List<int>(){1,22,41,61,418,426,435,444,455,466,480,494})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in MLtuples520)
|
|
|
- {
|
|
|
- var db520 = 0;
|
|
|
- var db521 = 0;
|
|
|
-
|
|
|
- foreach (var item1 in item.Item2)
|
|
|
- {
|
|
|
- var device = Device.All.FirstOrDefault(v => v.Code == item1.ToString());
|
|
|
-
|
|
|
- device.AddProtocol<IStation520>(db520, 520, item.Item1);
|
|
|
- device.AddProtocol<IStation521>(db521, 521, item.Item1);
|
|
|
- db520 = db520 + 14;
|
|
|
- db521 = db521 + 16;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 520、521 交互线体会有520、521
|
|
|
-
|
|
|
- #region 满轮扫码器
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- List<Tuple<string, List<int>>> MLtuples83 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new Tuple<string, List<int>>("10.30.37.166",new List<int>(){1,22,41,61})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in MLtuples83)
|
|
|
- {
|
|
|
- var db83 = 0;
|
|
|
-
|
|
|
- foreach (var item1 in item.Item2)
|
|
|
- {
|
|
|
- var device = Device.All.FirstOrDefault(v => v.Code == item1.ToString());
|
|
|
- device.AddProtocol<IBCR83>(db83, 83, item.Item1);
|
|
|
- db83 = db83 + 604;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 满轮扫码器
|
|
|
-
|
|
|
- #region 外检信息
|
|
|
-
|
|
|
- //Item2表示线体号集合,Item1表示IP
|
|
|
- List<Tuple<string, List<int>>> MLtuples91 = new List<Tuple<string, List<int>>>()
|
|
|
- {
|
|
|
- new Tuple<string, List<int>>("10.30.37.166",new List<int>(){418})
|
|
|
- };
|
|
|
-
|
|
|
- foreach (var item in MLtuples91)
|
|
|
- {
|
|
|
- var db91 = 0;
|
|
|
-
|
|
|
- foreach (var item1 in item.Item2)
|
|
|
- {
|
|
|
- var device = Device.All.FirstOrDefault(v => v.Code == item1.ToString());
|
|
|
- device.AddProtocol<IStation91>(db91, 91, item.Item1);
|
|
|
- db91 = db91 + 14;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion 外检信息
|
|
|
-
|
|
|
- #endregion 满轮输送线
|
|
|
-
|
|
|
#endregion 基本信息
|
|
|
|
|
|
#region 托盘线扫码器
|
|
|
|
|
|
List<BcrInfo> bcrInfo = new List<BcrInfo>
|
|
|
{
|
|
|
- new BcrInfo(new int[] {2532, 2732 }, "10.30.37.89")
|
|
|
+ //new BcrInfo(new int[] {2532, 2732 }, "10.30.37.89")
|
|
|
};
|
|
|
|
|
|
foreach (var item in bcrInfo)
|
|
@@ -205,7 +96,7 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
List<ShapeInfo> shapeInfo = new List<ShapeInfo>
|
|
|
{
|
|
|
- new ShapeInfo(new int[] { 2732,2532 }, "10.30.37.89")
|
|
|
+ //new ShapeInfo(new int[] { 2732,2532 }, "10.30.37.89")
|
|
|
};
|
|
|
|
|
|
foreach (var item in shapeInfo)
|
|
@@ -250,7 +141,7 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
List<TrussSegmentInfo> TrussInfo = new List<TrussSegmentInfo>
|
|
|
{
|
|
|
- new TrussSegmentInfo( 1, "10.30.37.211"),
|
|
|
+ //new TrussSegmentInfo( 1, "10.30.37.211"),
|
|
|
};
|
|
|
|
|
|
foreach (var item in TrussInfo)
|
|
@@ -291,22 +182,22 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
List<RouteInfo> routeInfos = new List<RouteInfo>
|
|
|
{
|
|
|
- new RouteInfo("SRM1", new string[] { "TY1" }),
|
|
|
- new RouteInfo("SRM2", new string[] { "TY2" }),
|
|
|
- //巷道对应堆垛机 及 一楼出库点
|
|
|
- new RouteInfo("TY1", new string[] { "SRM1","2532"}),
|
|
|
- new RouteInfo("TY2", new string[] { "SRM2","2732" }),
|
|
|
-
|
|
|
- //一楼入库点
|
|
|
- new RouteInfo("2532", new string[] { "TY1" }),
|
|
|
- new RouteInfo("2732", new string[] { "TY2" }),
|
|
|
- new RouteInfo("2527", new string[] { "TY1" }),
|
|
|
- new RouteInfo("2528", new string[] { "TY1" }),
|
|
|
- new RouteInfo("2727", new string[] { "TY2" }),
|
|
|
- new RouteInfo("2728", new string[] { "TY2" }),
|
|
|
-
|
|
|
- //分流点路径配置
|
|
|
- new RouteInfo("455", new string[] { "466", "480", "494", "508","522","536"}),
|
|
|
+ // new RouteInfo("SRM1", new string[] { "TY1" }),
|
|
|
+ // new RouteInfo("SRM2", new string[] { "TY2" }),
|
|
|
+ // //巷道对应堆垛机 及 一楼出库点
|
|
|
+ // new RouteInfo("TY1", new string[] { "SRM1","2532"}),
|
|
|
+ // new RouteInfo("TY2", new string[] { "SRM2","2732" }),
|
|
|
+
|
|
|
+ // //一楼入库点
|
|
|
+ // new RouteInfo("2532", new string[] { "TY1" }),
|
|
|
+ // new RouteInfo("2732", new string[] { "TY2" }),
|
|
|
+ // new RouteInfo("2527", new string[] { "TY1" }),
|
|
|
+ // new RouteInfo("2528", new string[] { "TY1" }),
|
|
|
+ // new RouteInfo("2727", new string[] { "TY2" }),
|
|
|
+ // new RouteInfo("2728", new string[] { "TY2" }),
|
|
|
+
|
|
|
+ // //分流点路径配置
|
|
|
+ // new RouteInfo("455", new string[] { "466", "480", "494", "508","522","536"}),
|
|
|
};
|
|
|
|
|
|
foreach (var item in routeInfos)
|
|
@@ -334,13 +225,13 @@ namespace WCS.WorkEngineering
|
|
|
//{ DeviceFlags.二列堆垛机, new List<string>() { "SRM2"/*, "SRM4", "SRM6"*/ } },
|
|
|
//{ DeviceFlags.一楼扫码,new List<string>(){ "2532","2732"} },
|
|
|
//{ DeviceFlags.一楼叠盘机,new List<string>() { "2527","2528","2727","2728"} },
|
|
|
- { DeviceFlags.主线分流点,new List<string>() { "22","41","61"} },
|
|
|
- { DeviceFlags.满轮主线第一次扫码,new List<string>() { "1"} },
|
|
|
- { DeviceFlags.环形库分流点,new List<string>(){ "418"} },
|
|
|
- { DeviceFlags.桁架分流点,new List<string>() { "455" } },
|
|
|
- { DeviceFlags.桁架缓存放行点, new List<string>(){ "466", "480", "494", "508","522","536" } },
|
|
|
- { DeviceFlags.桁架取货点, new List<string>(){ "461", "475", "489", "503","517","531" } }
|
|
|
- };
|
|
|
+ //{ DeviceFlags.主线分流点,new List<string>() { "22","41","61"} },
|
|
|
+ //{ DeviceFlags.满轮主线第一次扫码,new List<string>() { "1"} },
|
|
|
+ //{ DeviceFlags.环形库分流点,new List<string>(){ "418"} },
|
|
|
+ //{ DeviceFlags.桁架分流点,new List<string>() { "455" } },
|
|
|
+ //{ DeviceFlags.桁架缓存放行点, new List<string>(){ "466", "480", "494", "508","522","536" } },
|
|
|
+ //{ DeviceFlags.桁架取货点, new List<string>(){ "461", "475", "489", "503","517","531" } }
|
|
|
+ };
|
|
|
|
|
|
devices.ForEach(item =>
|
|
|
{
|