pry 2 years ago
parent
commit
77f8acdcb0
3 changed files with 12 additions and 12 deletions
  1. +1
    -1
      BPASmartClient.Device/BaseDevice.cs
  2. +10
    -10
      BPASmartClient.MorkF/Control_MorkF.cs
  3. +1
    -1
      BPASmartClient/MainWindow.xaml.cs

+ 1
- 1
BPASmartClient.Device/BaseDevice.cs View File

@@ -87,7 +87,7 @@ namespace BPASmartClient.Device
foreach (var key in peripheral.GetAllStatus().Keys)
{
peripheralStatus[key] = peripheral.GetAllStatus()[key];
Status.Update(key, peripheral.GetAllStatus()[key]);
Status.Update($"{TypeName}.{key}", peripheral.GetAllStatus()[key]);
}
}
Thread.Sleep(100);


+ 10
- 10
BPASmartClient.MorkF/Control_MorkF.cs View File

@@ -363,14 +363,14 @@ namespace BPASmartClient.MorkF
Task.Run(new Action(() =>
{
KitchenAdjustGears(3);
Task.Delay(1000); //大火加热1s
Task.Delay(1000).Wait(); //大火加热1s
AddOil();//注油
KitchenAdjustGears(2);
Task.Delay(2000); //中火2s
Task.Delay(2000).Wait(); //中火2s
TurnDownStatusDetect();//翻转机下降及检测
KitchenAdjustGears(1);//灶台1挡
TurnMachineGearsControl(1);//翻炒机1挡
Task.Delay(2000);
Task.Delay(2000).Wait();
TurnMachineGearsControl(0);//关闭翻炒机
TurnUpStatusDetect();//翻转机上升及检测
TurnDownStatusDetect();//翻转机下降及检测
@@ -383,20 +383,20 @@ namespace BPASmartClient.MorkF
TurnDownStatusDetect();//翻转机下降及检测
KitchenAdjustGears(3);//灶台3挡
TurnMachineGearsControl(3);//翻炒机3挡
Task.Delay(2000);//B料断生
Task.Delay(2000).Wait();//B料断生
KitchenAdjustGears(1);//灶台1挡
TurnMachineGearsControl(0);//关闭翻炒机
TurnUpStatusDetect();//翻转机上升及检测
TurnDownStatusDetect();//翻转机下降及检测
KitchenAdjustGears(2);//灶台3挡
TurnMachineGearsControl(3);//翻炒机3挡
Task.Delay(2000);//煸炒入味
Task.Delay(2000).Wait();//煸炒入味
KitchenAdjustGears(0);//灶台0挡
TurnMachineGearsControl(0);//关闭翻炒机
TurnMachineOrientControl("Top");//翻转机上升
while (!morkF.TurnMachineUpComplete)
{
Task.Delay(5);
Task.Delay(5).Wait();
}
EventBus.EventBus.GetInstance().Publish(new WriteModel() { Address = "M8.1", Value = false });
morkF.CookingComplete = true; //烹饪完成
@@ -426,7 +426,7 @@ namespace BPASmartClient.MorkF
if (morkF.PlaceRinseTableComplete && !morkF.CleanModule)
{
CleanModuleControl("Start");
Task.Delay(5000);
Task.Delay(5000).Wait();
CleanModuleControl("Stop");
}
}
@@ -464,7 +464,7 @@ namespace BPASmartClient.MorkF
TurnMachineOrientControl("Down");
while (!morkF.TurnMachineDownComplete)//等待翻转机下降完成
{
Task.Delay(5);
Task.Delay(5).Wait();
}
EventBus.EventBus.GetInstance().Publish(new WriteModel() { Address = "M8.3", Value = false });//复位
MessageLog.GetInstance.Show($"翻转机下降执行完成");
@@ -478,7 +478,7 @@ namespace BPASmartClient.MorkF
morkF.AllowTakeMaterial = true;
while (!morkF.TurnMachineUpComplete || !morkF.TakeMaterialComplete)//等待翻转机上升完成以及取料完成
{
Task.Delay(5);
Task.Delay(5).Wait();
}
EventBus.EventBus.GetInstance().Publish(new WriteModel() { Address = "M8.1", Value = false });
MessageLog.GetInstance.Show("翻转机上升执行完成");
@@ -591,7 +591,7 @@ namespace BPASmartClient.MorkF
MessageLog.GetInstance.Show("开始注油");
while (!morkF.FallOilComplete)
{
Task.Delay(5);
Task.Delay(5).Wait();
}
MessageLog.GetInstance.Show("注油完成");
}


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

@@ -61,9 +61,9 @@ namespace BPASmartClient

ThreadManage.GetInstance().Start(new Action(() =>
{
//DataVClient.GetInstance().Start();
new MainConsole().Start();
}), "启动主控制台", false);
DataVClient.GetInstance().Start();
}
#endregion



Loading…
Cancel
Save