|
@@ -32,12 +32,14 @@ namespace WCS.WorkEngineering
|
|
|
|
|
|
#region 基本信息
|
|
|
|
|
|
+ #region 托盘线输送线
|
|
|
+
|
|
|
List<StationSegmentInfo> segmentInfo = new List<StationSegmentInfo>
|
|
|
{
|
|
|
new StationSegmentInfo(2701, 2734, "10.30.37.89"),
|
|
|
new StationSegmentInfo(2501, 2534, "10.30.37.89"),
|
|
|
new StationSegmentInfo(1611, 1616, "10.30.37.89"),
|
|
|
- new StationSegmentInfo(1601, 1606, "10.30.37.89")
|
|
|
+ new StationSegmentInfo(1601, 1606, "10.30.37.89"),
|
|
|
};
|
|
|
|
|
|
foreach (var item in segmentInfo)
|
|
@@ -46,15 +48,78 @@ namespace WCS.WorkEngineering
|
|
|
{
|
|
|
var conv = new Device(i.ToString());
|
|
|
conv.AddFlag(DeviceFlags.输送机);
|
|
|
+
|
|
|
conv.AddProtocol<IStation520>((i - item.Start) * 14, 520, item.IP);
|
|
|
conv.AddProtocol<IStation521>((i - item.Start) * 16, 521, item.IP);
|
|
|
conv.AddProtocol<IStation523>((i - item.Start) * 12, 523, item.IP);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ #endregion 托盘线输送线
|
|
|
+
|
|
|
+ #region 满轮输送线
|
|
|
+
|
|
|
+ #region DB523,所有线体都会有DB523
|
|
|
+
|
|
|
+ List<StationSegmentInfo> segmentInfo1 = new List<StationSegmentInfo>
|
|
|
+ {
|
|
|
+ new StationSegmentInfo(1, 100, "10.30.37.166"),
|
|
|
+ new StationSegmentInfo(401, 586, "10.30.37.166"),
|
|
|
+ };
|
|
|
+
|
|
|
+ foreach (var item in segmentInfo1)
|
|
|
+ {
|
|
|
+ for (int i = item.Start; i <= item.End; i++)
|
|
|
+ {
|
|
|
+ var conv = new Device(i.ToString());
|
|
|
+ conv.AddFlag(DeviceFlags.输送机);
|
|
|
+ conv.AddProtocol<IStation523>((i - item.Start) * 12, 523, item.IP);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion DB523,所有线体都会有DB523
|
|
|
+
|
|
|
+ #region 520、521 交互线体会有520、521
|
|
|
+
|
|
|
+ var list = new List<Tuple<List<int>, string, DeviceFlags>>()
|
|
|
+ {
|
|
|
+ new Tuple<List<int>, string,DeviceFlags>(new List<int>(){1 },"10.30.37.166",DeviceFlags.满轮主线第一次扫码),
|
|
|
+ new Tuple<List<int>, string,DeviceFlags>(new List<int>(){22, 41, 61 },"10.30.37.166",DeviceFlags.主线分流点),
|
|
|
+ new Tuple<List<int>, string,DeviceFlags>(new List<int>(){418, },"10.30.37.166",DeviceFlags.主线分流点)
|
|
|
+ };
|
|
|
+ var db520523 = new List<int>() { 1, 22, 41, 61, };
|
|
|
+ for (int i = 0; i < db520523.Count; i++)
|
|
|
+ {
|
|
|
+ var device = Device.All.FirstOrDefault(v => v.Code == db520523[i].ToString());
|
|
|
+ device.AddProtocol<IStation520>(i * 14, 520, "10.30.37.166");
|
|
|
+ device.AddProtocol<IStation521>(i * 16, 521, "10.30.37.166");
|
|
|
+ device.AddProtocol<IBCR83>(i * 602, 83, "10.30.37.166");
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion 520、521 交互线体会有520、521
|
|
|
+
|
|
|
+ #region 满轮扫码器
|
|
|
+
|
|
|
+ var list1 = new List<Tuple<List<int>, string, DeviceFlags>>()
|
|
|
+ {
|
|
|
+ new Tuple<List<int>, string,DeviceFlags>(new List<int>(){1 },"10.30.37.166",DeviceFlags.满轮主线第一次扫码),
|
|
|
+ new Tuple<List<int>, string,DeviceFlags>(new List<int>(){22, 41, 61 },"10.30.37.166",DeviceFlags.主线分流点)
|
|
|
+ };
|
|
|
+ for (int i = 0; i < db520523.Count; i++)
|
|
|
+ {
|
|
|
+ var device = Device.All.FirstOrDefault(v => v.Code == db520523[i].ToString());
|
|
|
+ device.AddProtocol<IStation520>(i * 14, 520, "10.30.37.166");
|
|
|
+ device.AddProtocol<IStation521>(i * 16, 521, "10.30.37.166");
|
|
|
+ device.AddProtocol<IBCR83>(i * 602, 83, "10.30.37.166");
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion 满轮扫码器
|
|
|
+
|
|
|
+ #endregion 满轮输送线
|
|
|
+
|
|
|
#endregion 基本信息
|
|
|
|
|
|
- #region 扫码器
|
|
|
+ #region 托盘线扫码器
|
|
|
|
|
|
List<BcrInfo> bcrInfo = new List<BcrInfo>
|
|
|
{
|
|
@@ -72,7 +137,7 @@ namespace WCS.WorkEngineering
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- #endregion 扫码器
|
|
|
+ #endregion 托盘线扫码器
|
|
|
|
|
|
#region 外检信息
|
|
|
|
|
@@ -209,7 +274,9 @@ namespace WCS.WorkEngineering
|
|
|
//{ DeviceFlags.二楼入库口, new List<string>() { "1603", "1613" } },
|
|
|
{ DeviceFlags.一列堆垛机, new List<string>() { "SRM1"/*, "SRM3", "SRM5"*/} },
|
|
|
{ DeviceFlags.二列堆垛机, new List<string>() { "SRM2"/*, "SRM4", "SRM6"*/ } },
|
|
|
- { DeviceFlags.一楼扫码,new List<string>(){ "2532","2732"} }
|
|
|
+ { DeviceFlags.一楼扫码,new List<string>(){ "2532","2732"} },
|
|
|
+ //{ DeviceFlags.满轮主线第一次扫码,new List<string>(){ "1"} },
|
|
|
+ //{ DeviceFlags.主线分流点,new List<string>(){ "22","41","61"} }
|
|
|
//{ DeviceFlags.称重, new List<string>() { "1011", "1013", "1015", "1025" } }
|
|
|
};
|
|
|
|