@@ -319,25 +319,6 @@ namespace BPASmartClient.MorkF | |||||
/// </summary> | /// </summary> | ||||
private void InitialData() | private void InitialData() | ||||
{ | { | ||||
////模拟流程 | |||||
//if (stirFryBom.StirFryActions.Count > 0) | |||||
//{ | |||||
// stirFryBom.StirFryActions.Clear(); | |||||
//} | |||||
////流程 | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T1, RobotActions = new List<StirFryRobotAction>() { StirFryRobotAction.清洗槽取锅 } }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T2, PotActions = new List<StirFryPotAction>() { StirFryPotAction.停止火力 }, During = 3 }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T3, PotActions = new List<StirFryPotAction>() { StirFryPotAction.加油, StirFryPotAction.停止火力 }, During = 3 }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T4, PotActions = new List<StirFryPotAction>() { StirFryPotAction.搅拌臂下位, StirFryPotAction.停止火力, StirFryPotAction.低速旋转 }, During = 15 }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T5, RobotActions = new List<StirFryRobotAction>() { StirFryRobotAction.加入A料, }, PotActions = new List<StirFryPotAction>() { StirFryPotAction.停止旋转 } }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T6, PotActions = new List<StirFryPotAction>() { StirFryPotAction.快速旋转, StirFryPotAction.停止火力 }, During = 5 }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T7, RobotActions = new List<StirFryRobotAction>() { StirFryRobotAction.加入B料, }, PotActions = new List<StirFryPotAction>() { StirFryPotAction.停止火力, StirFryPotAction.停止旋转 } }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T8, PotActions = new List<StirFryPotAction>() { StirFryPotAction.快速旋转, StirFryPotAction.停止火力 }, During = 5 }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T9, RobotActions = new List<StirFryRobotAction>() { StirFryRobotAction.加入C料, }, PotActions = new List<StirFryPotAction>() { StirFryPotAction.停止火力, StirFryPotAction.停止旋转 } }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T10, PotActions = new List<StirFryPotAction>() { StirFryPotAction.快速旋转, StirFryPotAction.停止火力 }, During = 3 }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T11, PotActions = new List<StirFryPotAction>() { StirFryPotAction.停止火力, StirFryPotAction.停止旋转, StirFryPotAction.搅拌臂上位 } }); | |||||
//stirFryBom.AddAction(new StirFryAction() { Time = StirFryTime.T12, RobotActions = new List<StirFryRobotAction>() { StirFryRobotAction.灶取锅 } }); | |||||
//队列 | //队列 | ||||
string subId = Guid.NewGuid().ToString(); | string subId = Guid.NewGuid().ToString(); | ||||
morkF.TakeMaterialQueue.Enqueue(new OrderLocInfo() { SuborderId = subId, MaterialLoc = 1 });//A料 | morkF.TakeMaterialQueue.Enqueue(new OrderLocInfo() { SuborderId = subId, MaterialLoc = 1 });//A料 | ||||
@@ -52,6 +52,13 @@ namespace BPASmartClient.MorkM | |||||
DeviceProcessLogShow($"添加订单:碗位置【{item}】"); | DeviceProcessLogShow($"添加订单:碗位置【{item}】"); | ||||
} | } | ||||
} | } | ||||
//手动供碗 调试用 | |||||
mORKS.TakeBowlTask.Enqueue(new OrderLocInfo() | |||||
{ | |||||
Loc = 11, | |||||
SuborderId = subId, | |||||
MakeType = false | |||||
}) ; | |||||
mORKS.DishNumber = orders.Count;//订单中配菜的数量 | mORKS.DishNumber = orders.Count;//订单中配菜的数量 | ||||
while (orders.Count > 0) | while (orders.Count > 0) | ||||
{ | { | ||||
@@ -153,7 +160,7 @@ namespace BPASmartClient.MorkM | |||||
List<OrderLocInfo> locs = new List<OrderLocInfo>(); | List<OrderLocInfo> locs = new List<OrderLocInfo>(); | ||||
foreach (var item in order.MorkOrder.GoodBatchings) | foreach (var item in order.MorkOrder.GoodBatchings) | ||||
{ | { | ||||
var res = Json<BatchingInfoPar>.Data.orderMaterialDelivery?.BatchingInfo?.FirstOrDefault(p => p.BatchingId == item.BatchingId); | |||||
var res =orderMaterialDelivery?.BatchingInfo?.FirstOrDefault(p => p.BatchingId == item.BatchingId); | |||||
if (res != null) | if (res != null) | ||||
{ | { | ||||
if (ushort.TryParse(res.BatchingLoc, out ushort loc)) | if (ushort.TryParse(res.BatchingLoc, out ushort loc)) | ||||
@@ -175,7 +182,8 @@ namespace BPASmartClient.MorkM | |||||
{ | { | ||||
Loc = 11, | Loc = 11, | ||||
SuborderId = order.MorkOrder.SuborderId, | SuborderId = order.MorkOrder.SuborderId, | ||||
RecipeNumber = (index >= 1 && index <= 10) ? (ushort)index : (ushort)0 | |||||
RecipeNumber = (index >= 1 && index <= 10) ? (ushort)index : (ushort)0, | |||||
MakeType = order.MorkOrder.MakeID == "2" | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
@@ -293,7 +301,7 @@ namespace BPASmartClient.MorkM | |||||
//正常轮询 | //正常轮询 | ||||
if (mORKS.TurntableMoveInPlace && !mORKS.Feeding && mORKS.InitComplete && !mORKS.AllowTakeNoodle && mORKS.RBTakeNoodleTask.Count > 0) | if (mORKS.TurntableMoveInPlace && !mORKS.Feeding && mORKS.InitComplete && !mORKS.AllowTakeNoodle && mORKS.RBTakeNoodleTask.Count > 0) | ||||
{ | { | ||||
var result = Json<BatchingInfoPar>.Data.orderMaterialDelivery.BatchingInfo.Where(p => p.BatchingId == mORKS.RBTakeNoodleTask.ElementAt(0).BatchingId).ToList(); | |||||
var result = orderMaterialDelivery.BatchingInfo.Where(p => p.BatchingId == mORKS.RBTakeNoodleTask.ElementAt(0).BatchingId).ToList(); | |||||
if (result != null) | if (result != null) | ||||
{ | { | ||||
var res = result.FirstOrDefault(P => P.BatchingLoc == mORKS.TurntableFeedbackloc.ToString()); | var res = result.FirstOrDefault(P => P.BatchingLoc == mORKS.TurntableFeedbackloc.ToString()); | ||||
@@ -7,14 +7,14 @@ | |||||
<add key="IsEnableTest" value="false"/> | <add key="IsEnableTest" value="false"/> | ||||
<!--开发环境--> | <!--开发环境--> | ||||
<!--<add key="apollouri" value="http://10.2.1.21:28080/"/> | |||||
<add key="apollouri" value="http://10.2.1.21:28080/"/> | |||||
<add key="AppId" value="dev1_common"/> | <add key="AppId" value="dev1_common"/> | ||||
<add key ="Namespaces" value="DEV.Config"/>--> | |||||
<add key ="Namespaces" value="DEV.Config"/> | |||||
<!--正式环境--> | <!--正式环境--> | ||||
<add key="apollouri" value="http://47.108.65.220:28080/"/> | |||||
<!--<add key="apollouri" value="http://47.108.65.220:28080/"/> | |||||
<add key="AppId" value="order"/> | <add key="AppId" value="order"/> | ||||
<add key ="Namespaces" value="TEST1.Config"/> | |||||
<add key ="Namespaces" value="TEST1.Config"/>--> | |||||
<!--阿里云上报启动方式:API 或者 LOCAL--> | <!--阿里云上报启动方式:API 或者 LOCAL--> | ||||
<!--API :通过客户端ID,调用接口查询“设备连接信息”--> | <!--API :通过客户端ID,调用接口查询“设备连接信息”--> | ||||
@@ -61,7 +61,7 @@ | |||||
</Device>-->--> | </Device>-->--> | ||||
<!--<Device Name="MorkF" Module="BPASmartClient.MorkF.Control_MorkF" DeviceId="2"> | |||||
<Device Name="MorkF" Module="BPASmartClient.MorkF.Control_MorkF" DeviceId="2"> | |||||
<Peripherals> | <Peripherals> | ||||
<Peripheral Module="BPASmartClient.PLC.PLCMachine"> | <Peripheral Module="BPASmartClient.PLC.PLCMachine"> | ||||
<Parameters> | <Parameters> | ||||
@@ -71,7 +71,7 @@ | |||||
</Parameters> | </Parameters> | ||||
</Peripheral> | </Peripheral> | ||||
</Peripherals> | </Peripherals> | ||||
</Device>--> | |||||
</Device> | |||||
<Device Name="Morks" Module="BPASmartClient.MorkS.Control_Morks" DeviceId="100"> | <Device Name="Morks" Module="BPASmartClient.MorkS.Control_Morks" DeviceId="100"> | ||||
<Peripherals> | <Peripherals> | ||||
@@ -252,8 +252,8 @@ namespace BPASmartClient | |||||
if (sender is MenuItem) | if (sender is MenuItem) | ||||
{ | { | ||||
// Type type = Assembly.Load("BPASmartClient.MorkT").GetType("BPASmartClient.MorkT.View.DebugView"); | // Type type = Assembly.Load("BPASmartClient.MorkT").GetType("BPASmartClient.MorkT.View.DebugView"); | ||||
Type type = Assembly.Load("BPASmartClient.MorkF").GetType("BPASmartClient.MorkF.View.DebugView"); | |||||
//Type type = Assembly.Load("BPASmartClient.MorkM").GetType("BPASmartClient.MorkM.View.DebugView"); | |||||
// Type type = Assembly.Load("BPASmartClient.MorkF").GetType("BPASmartClient.MorkF.View.DebugView"); | |||||
Type type = Assembly.Load("BPASmartClient.MorkM").GetType("BPASmartClient.MorkM.View.DebugView"); | |||||
ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes); | ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes); | ||||
contentRegion.Content = (FrameworkElement)cti.Invoke(null); | contentRegion.Content = (FrameworkElement)cti.Invoke(null); | ||||
Title.Text = (sender as MenuItem).Header?.ToString() + "界面"; | Title.Text = (sender as MenuItem).Header?.ToString() + "界面"; | ||||