|
|
@@ -142,14 +142,19 @@ namespace BPASmartClient.MorkF |
|
|
|
/// <param name="o"></param> |
|
|
|
public void OutSeasoning(object o) |
|
|
|
{ |
|
|
|
if (o == null) return; |
|
|
|
if (o is List<int> ints && ints.Count == 2) |
|
|
|
ThreadManage.GetInstance().Start(new Action(() => |
|
|
|
{ |
|
|
|
FirePot1_Write(morkF.PassWayValue[ints[0]], (ushort)ints[1]);//写入通道值 |
|
|
|
Thread.Sleep(400); |
|
|
|
FirePot1_Write(morkF.StartPassWay[ints[0]], true);//开启通道 |
|
|
|
Thread.Sleep(400); |
|
|
|
} |
|
|
|
if (o == null) return; |
|
|
|
if (o is List<int> ints && ints.Count == 2) |
|
|
|
{ |
|
|
|
FirePot1_Write(morkF.PassWayValue[ints[0]], (ushort)ints[1]);//写入通道值 |
|
|
|
Thread.Sleep(400); |
|
|
|
FirePot1_Write(morkF.StartPassWay[ints[0]], true);//开启通道 |
|
|
|
Thread.Sleep(400); |
|
|
|
} |
|
|
|
}), "出调料"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 出多个调料 |
|
|
@@ -166,6 +171,12 @@ namespace BPASmartClient.MorkF |
|
|
|
FirePot1_Write(morkF.StartPassWay[seasoning.Loc], true); |
|
|
|
Thread.Sleep(300); |
|
|
|
} |
|
|
|
foreach (SeasoningList seasoning in seasoningLists) |
|
|
|
{ |
|
|
|
FirePot1_Write(morkF.StartPassWay[seasoning.Loc], false); |
|
|
|
Thread.Sleep(300); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@@ -236,47 +247,55 @@ namespace BPASmartClient.MorkF |
|
|
|
//倒菜 |
|
|
|
public void OutFood() |
|
|
|
{ |
|
|
|
FirePot1_Write("LB3", true); |
|
|
|
MessageLog.GetInstance.Show("倒菜启动"); |
|
|
|
while (!morkF.FryPot1_MaterialIntoPot) |
|
|
|
{ |
|
|
|
|
|
|
|
FirePot1_Write("LB3", true); |
|
|
|
Thread.Sleep(400); |
|
|
|
MessageLog.GetInstance.Show("倒菜启动"); |
|
|
|
while (!morkF.FryPot1_MaterialIntoPot) |
|
|
|
{ |
|
|
|
Thread.Sleep(200); |
|
|
|
} |
|
|
|
FirePot1_Write("LB3", false); |
|
|
|
Thread.Sleep(200); |
|
|
|
} |
|
|
|
FirePot1_Write("LB3", false); |
|
|
|
Thread.Sleep(200); |
|
|
|
MessageLog.GetInstance.Show("倒菜完成"); |
|
|
|
MessageLog.GetInstance.Show("倒菜完成"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
//搅拌臂去原点位 |
|
|
|
public void StirArmGoOrigin() |
|
|
|
{ |
|
|
|
FirePot1_Write("LB5", true); |
|
|
|
MessageLog.GetInstance.Show("搅拌臂去原点位"); |
|
|
|
while (!morkF.ArmOnOrigin) |
|
|
|
{ |
|
|
|
|
|
|
|
FirePot1_Write("LB5", true); |
|
|
|
MessageLog.GetInstance.Show("搅拌臂去原点位"); |
|
|
|
while (!morkF.ArmOnOrigin) |
|
|
|
{ |
|
|
|
Thread.Sleep(200); |
|
|
|
} |
|
|
|
FirePot1_Write("LB5", false); |
|
|
|
Thread.Sleep(200); |
|
|
|
} |
|
|
|
FirePot1_Write("LB5", false); |
|
|
|
Thread.Sleep(200); |
|
|
|
MessageLog.GetInstance.Show("搅拌臂到达原点位"); |
|
|
|
MessageLog.GetInstance.Show("搅拌臂到达原点位"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//搅拌臂去炒制位 |
|
|
|
public void StirArmGoWork() |
|
|
|
{ |
|
|
|
if (!morkF.ArmOnWorking) |
|
|
|
{ |
|
|
|
FirePot1_Write("LB6", true); |
|
|
|
MessageLog.GetInstance.Show("搅拌臂去工作位"); |
|
|
|
while (!morkF.ArmOnWorking) |
|
|
|
if (!morkF.ArmOnWorking) |
|
|
|
{ |
|
|
|
FirePot1_Write("LB6", true); |
|
|
|
MessageLog.GetInstance.Show("搅拌臂去工作位"); |
|
|
|
while (!morkF.ArmOnWorking) |
|
|
|
{ |
|
|
|
Thread.Sleep(200); |
|
|
|
} |
|
|
|
|
|
|
|
FirePot1_Write("LB6", false); |
|
|
|
Thread.Sleep(200); |
|
|
|
MessageLog.GetInstance.Show("搅拌臂到达工作位"); |
|
|
|
} |
|
|
|
|
|
|
|
FirePot1_Write("LB6", false); |
|
|
|
Thread.Sleep(200); |
|
|
|
MessageLog.GetInstance.Show("搅拌臂到达工作位"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
//HBOT放盒子到位 |
|
|
@@ -394,7 +413,7 @@ namespace BPASmartClient.MorkF |
|
|
|
})); |
|
|
|
GetStatus("LB74", new Action<bool[]>((bools) => |
|
|
|
{ |
|
|
|
for (int i = 0; i < 15; i++) |
|
|
|
for (int i = 0; i < 14; i++) |
|
|
|
{ |
|
|
|
morkF.PassWay1_Compelete[i] = bools[i]; |
|
|
|
} |
|
|
@@ -744,6 +763,8 @@ namespace BPASmartClient.MorkF |
|
|
|
|
|
|
|
} |
|
|
|
Plc1Reset();//复位 |
|
|
|
Thread.Sleep(4000); |
|
|
|
StirArmGoOrigin(); |
|
|
|
MessageLog.GetInstance.Show($"菜品{res.GoodName}完成"); |
|
|
|
|
|
|
|
} |
|
|
|