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) foreach (var key in peripheral.GetAllStatus().Keys)
{ {
peripheralStatus[key] = peripheral.GetAllStatus()[key]; peripheralStatus[key] = peripheral.GetAllStatus()[key];
Status.Update(key, peripheral.GetAllStatus()[key]);
Status.Update($"{TypeName}.{key}", peripheral.GetAllStatus()[key]);
} }
} }
Thread.Sleep(100); Thread.Sleep(100);


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

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


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

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


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




Loading…
Cancel
Save