Browse Source

冒菜多订单调试

样式分支
taoye 2 years ago
parent
commit
46b5a4da8f
5 changed files with 19 additions and 30 deletions
  1. +0
    -19
      BPASmartClient.MorkF/Control_MorkF.cs
  2. +11
    -3
      BPASmartClient.MorkM/Control_MORKM.cs
  3. +4
    -4
      BPASmartClient/App.config
  4. +2
    -2
      BPASmartClient/DeviceInfo.xml
  5. +2
    -2
      BPASmartClient/MainWindow.xaml.cs

+ 0
- 19
BPASmartClient.MorkF/Control_MorkF.cs View File

@@ -319,25 +319,6 @@ namespace BPASmartClient.MorkF
/// </summary>
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();
morkF.TakeMaterialQueue.Enqueue(new OrderLocInfo() { SuborderId = subId, MaterialLoc = 1 });//A料


+ 11
- 3
BPASmartClient.MorkM/Control_MORKM.cs View File

@@ -52,6 +52,13 @@ namespace BPASmartClient.MorkM
DeviceProcessLogShow($"添加订单:碗位置【{item}】");
}
}
//手动供碗 调试用
mORKS.TakeBowlTask.Enqueue(new OrderLocInfo()
{
Loc = 11,
SuborderId = subId,
MakeType = false
}) ;
mORKS.DishNumber = orders.Count;//订单中配菜的数量
while (orders.Count > 0)
{
@@ -153,7 +160,7 @@ namespace BPASmartClient.MorkM
List<OrderLocInfo> locs = new List<OrderLocInfo>();
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 (ushort.TryParse(res.BatchingLoc, out ushort loc))
@@ -175,7 +182,8 @@ namespace BPASmartClient.MorkM
{
Loc = 11,
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)
{
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)
{
var res = result.FirstOrDefault(P => P.BatchingLoc == mORKS.TurntableFeedbackloc.ToString());


+ 4
- 4
BPASmartClient/App.config View File

@@ -7,14 +7,14 @@
<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 ="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 ="Namespaces" value="TEST1.Config"/>
<add key ="Namespaces" value="TEST1.Config"/>-->

<!--阿里云上报启动方式:API 或者 LOCAL-->
<!--API :通过客户端ID,调用接口查询“设备连接信息”-->


+ 2
- 2
BPASmartClient/DeviceInfo.xml View File

@@ -61,7 +61,7 @@
</Device>-->-->


<!--<Device Name="MorkF" Module="BPASmartClient.MorkF.Control_MorkF" DeviceId="2">
<Device Name="MorkF" Module="BPASmartClient.MorkF.Control_MorkF" DeviceId="2">
<Peripherals>
<Peripheral Module="BPASmartClient.PLC.PLCMachine">
<Parameters>
@@ -71,7 +71,7 @@
</Parameters>
</Peripheral>
</Peripherals>
</Device>-->
</Device>

<Device Name="Morks" Module="BPASmartClient.MorkS.Control_Morks" DeviceId="100">
<Peripherals>


+ 2
- 2
BPASmartClient/MainWindow.xaml.cs View File

@@ -252,8 +252,8 @@ namespace BPASmartClient
if (sender is MenuItem)
{
// 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);
contentRegion.Content = (FrameworkElement)cti.Invoke(null);
Title.Text = (sender as MenuItem).Header?.ToString() + "界面";


Loading…
Cancel
Save