diff --git a/BPASmartClient.MorkBF/Control_MorkBF.cs b/BPASmartClient.MorkBF/Control_MorkBF.cs
index df20c6cb..73ce08c1 100644
--- a/BPASmartClient.MorkBF/Control_MorkBF.cs
+++ b/BPASmartClient.MorkBF/Control_MorkBF.cs
@@ -98,37 +98,28 @@ namespace BPASmartClient.MorkBF
///
private void CommandRegist()
{
- #region 炒锅1
- ActionManage.GetInstance.Register(FirePot1_SetFireGear, "FirePot1_SetFireGear");//炒锅1设定加热挡位
- ActionManage.GetInstance.Register(FirePot1_StartFire, "FirePot1_StartFire");//炒锅1加热启动
- ActionManage.GetInstance.Register(FirePot1_StartFire, "FirePot1_StopFire");//炒锅1关闭加热
- ActionManage.GetInstance.Register(FirePot1_SetStirGear, "FirePot1_SetStirGear");//炒锅1设定搅拌挡位
- ActionManage.GetInstance.Register(FirePot1_StartStir, "FirePot1_StartStir");//炒锅1搅拌启动
- ActionManage.GetInstance.Register(FirePot1_StartStir, "FirePot1_StopStir");//炒锅1搅拌停止
- ActionManage.GetInstance.Register(FirePot1_SetTurnSpeed, "FirePot1_SetTurnSpeed");//炒锅1翻转频率设定
- #endregion
- #region 炒锅2
- ActionManage.GetInstance.Register(FirePot2_SetFireGear, "FirePot2_SetFireGear");//炒锅2设定加热挡位
- ActionManage.GetInstance.Register(FirePot2_StartFire, "FirePot2_StartFire");//炒锅2加热启动
- ActionManage.GetInstance.Register(FirePot2_StartFire, "FirePot2_StopFire");//炒锅2关闭加热
- ActionManage.GetInstance.Register(FirePot2_SetStirGear, "FirePot2_SetStirGear");//炒锅2设定搅拌挡位
- ActionManage.GetInstance.Register(FirePot2_StartStir, "FirePot2_StartStir");//炒锅2搅拌启动
- ActionManage.GetInstance.Register(FirePot2_StartStir, "FirePot2_StopStir");//炒锅2搅拌停止
- ActionManage.GetInstance.Register(FirePot2_SetTurnSpeed, "FirePot2_SetTurnSpeed");//炒锅2翻转频率设定
- #endregion
- #region 炒锅通用
+ #region 炒锅
+ ActionManage.GetInstance.Register(FirePot_SetFireGear, "FirePot_SetFireGear");//炒锅设定加热挡位
+ ActionManage.GetInstance.Register(FirePot_StartFire, "FirePot_StartFire");//炒锅加热启动
+ ActionManage.GetInstance.Register(FirePot_StartFire, "FirePot_StopFire");//炒锅关闭加热
+ ActionManage.GetInstance.Register(FirePot_SetStirGear, "FirePot_SetStirGear");//炒锅设定搅拌挡位
+ ActionManage.GetInstance.Register(FirePot_StartStir, "FirePot_StartStir");//炒锅搅拌启动
+ ActionManage.GetInstance.Register(FirePot_StartStir, "FirePot_StopStir");//炒锅搅拌停止
+ ActionManage.GetInstance.Register(FirePot_SetTurnSpeed, "FirePot_SetTurnSpeed");//炒锅翻转频率设定
+ ActionManage.GetInstance.Register(FirePot_SetPotAngle, "FirePot_SetPotAngle");//设定炒锅角度
+ ActionManage.GetInstance.Register(FirePot_StartPassWay, "FirePot_StartPassWay");//炒锅翻转频率设定
+
ActionManage.GetInstance.Register(FirePot_Reset, "FirePot_Reset");//复位;
ActionManage.GetInstance.Register(FirePot_PotGotoOrigin, "FirePot_PotGotoOrigin");//炒锅回原点
- ActionManage.GetInstance.Register(FirePot_PotGotoP1, "FirePot_PotGotoP1");//炒锅去位置1
- ActionManage.GetInstance.Register(FirePot_PotGotoP2, "FirePot_PotGotoP2");//炒锅去位置2
- ActionManage.GetInstance.Register(FirePot_PotGotoP3, "FirePot_PotGotoP3");//炒锅去位置3
- ActionManage.GetInstance.Register(FirePot_PotGotoP4, "FirePot_PotGotoP4");//炒锅去位置4
- //ActionManage.GetInstance.Register(FirePot_PotGotoOutFoodPosition, "FirePot_PotGotoOutFoodPositiong");//炒锅去出餐位置
ActionManage.GetInstance.Register(FirePot_PotGotoInFoodPosition, "FirePot_PotGotoInFoodPosition");//炒锅去投料位置
ActionManage.GetInstance.Register(FirePot_StartOutFood, "FirePot_StartOutFood");//出餐启动
ActionManage.GetInstance.Register(FirePot_Clean, "FirePot_Clean");//清洗
ActionManage.GetInstance.Register(FirePot_StartPumpWater, "FirePot_StartPumpWater");//抽水启动
- ActionManage.GetInstance.Register(FirePot_StartPumpOil, "FirePot_StartPumpOil");//抽油启动
+ ActionManage.GetInstance.Register(FirePot_StartPumpWater, "FirePot_StopPumpWater");//抽水关闭
+ ActionManage.GetInstance.Register(FirePot_PushReach, "FirePot_PushReach");//推杆伸出
+ ActionManage.GetInstance.Register(FirePot_PushRetract, "FirePot_PushRetract");//推杆缩回
+ ActionManage.GetInstance.Register(FirePot_PotForward, "FirePot_PotForward");//翻转正转
+ ActionManage.GetInstance.Register(FirePot_PotReversal, "FirePot_PotReversal");//翻转反转
#endregion
#region 机器人
ActionManage.GetInstance.Register(RobotStart, "RobotStart");//机器人启动
@@ -238,15 +229,15 @@ namespace BPASmartClient.MorkBF
bool isRobotWork = false;
if(i == 1)//炒锅1
{
- FirePot1_SetFireGear(item.FryGear);
+ //FirePot1_SetFireGear(item.FryGear);
Thread.Sleep(200);
- FirePot1_StartFire(true);
+ //FirePot1_StartFire(true);
isRobotWork = IsRobotNextWork(morkBF.FryPot1_CurrentProcess,item.FryTime);
}
else if(i == 2)//炒锅2
{
- FirePot2_SetFireGear(item.FryGear);
- FirePot2_StartFire(true);
+ //FirePot2_SetFireGear(item.FryGear);
+ //FirePot2_StartFire(true);
isRobotWork = IsRobotNextWork(morkBF.FryPot2_CurrentProcess, item.FryTime);
}
if (isRobotWork && item.FryDuration > RobotLeadTime) Thread.Sleep((item.FryDuration - RobotLeadTime) * 1000);//提前10秒机器人去取物料
@@ -263,14 +254,14 @@ namespace BPASmartClient.MorkBF
bool isRobotWork = false;
if (item.FryGear != 0)
{
- FirePot1_SetFireGear(item.FryGear);//设定加热挡位
- FirePot1_StartFire(true);//开启加热
- isRobotWork = IsRobotNextWork(morkBF.FryPot1_CurrentProcess, item.FryTime);
+ /* FirePot1_SetFireGear(item.FryGear);*///设定加热挡位
+ //FirePot1_StartFire(true);//开启加热
+ //isRobotWork = IsRobotNextWork(morkBF.FryPot1_CurrentProcess, item.FryTime);
}
if (item.StirGear != 0)
{
- FirePot1_SetStirGear(item.StirGear);//设定搅拌挡位
- FirePot1_StartFire(true);//开启搅拌
+ //FirePot1_SetStirGear(item.StirGear);//设定搅拌挡位
+ //FirePot1_StartFire(true);//开启搅拌
isRobotWork = IsRobotNextWork(morkBF.FryPot2_CurrentProcess, item.FryTime);
}
if (isRobotWork && item.FryDuration > RobotLeadTime) Thread.Sleep((item.FryDuration - RobotLeadTime) * 1000);//提前10秒机器人去取物料
@@ -384,7 +375,7 @@ namespace BPASmartClient.MorkBF
}
else
{
- FirePot_Write("M11.6", true);//炒锅去投料位置
+ //FirePot_Write("M11.6", true);//炒锅去投料位置
while (!morkBF.FirePot1_PotOnIntoFoodPosition)//等待炒锅允许倒料
{
Thread.Sleep(100);
@@ -413,7 +404,7 @@ namespace BPASmartClient.MorkBF
}
else
{
- FirePot_Write("M16.7", true);
+ //FirePot_Write("M16.7", true);
while (!morkBF.FirePot2_PotOnIntoFoodPosition)
{
Thread.Sleep(100);
@@ -603,26 +594,38 @@ namespace BPASmartClient.MorkBF
}
#region 控制
- private void FirePot_Write(string address, object value, int i = 0)
+ private void FirePot1_Write(string address, object value, int i = 0)
+ {
+ WriteControlExact(address, value, i);
+ }
+ private void FirePot2_Write(string address, object value, int i = 1)
{
WriteControlExact(address, value, i);
}
- private void Robot_Write(string address, object value, int i = 1)
+ private void Robot_Write(string address, object value, int i = 2)
{
WriteControlExact(address, value, i);
}
- #region 炒锅1
+
+ #region 炒锅
///
- /// 炒锅1设定加热挡位
+ /// 炒锅设定加热挡位
///
///
- private void FirePot1_SetFireGear(object o)
+ private void FirePot_SetFireGear(object[] o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int value))
+ if (o.Length == 2 && o[0] is int fryNo && o[1] is int value)
{
- FirePot_Write("VW100", (ushort)value);
+ if(fryNo == 1)
+ {
+ FirePot1_Write("VW100", (ushort)value);
+ }
+ else if(fryNo == 2)
+ {
+ FirePot2_Write("VW100", (ushort)value);
+ }
}
Thread.Sleep(200);
}
@@ -630,40 +633,59 @@ namespace BPASmartClient.MorkBF
/// 炒锅1加热启停
///
///
- private void FirePot1_StartFire(object o)
+ private void FirePot_StartFire(object[] o)
{
if (o == null) return;
- if (bool.TryParse(o.ToString(), out bool value))
+ if (o.Length == 2 && o[0] is int fryNo && o[1] is bool value)
{
- FirePot_Write("M10.0", value);
+ if (fryNo == 1)
+ {
+ FirePot1_Write("M10.0", value);
+ }
+ else if (fryNo == 2)
+ {
+ FirePot2_Write("M10.0", value);
+ }
}
Thread.Sleep(200);
- FirePot_Write("M10.2", true);
}
///
/// 炒锅1设置搅拌挡位
///
///
- private void FirePot1_SetStirGear(object o)
+ private void FirePot_SetStirGear(object[] o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int value))
+ if (o.Length == 2 && o[0] is int fryNo && o[1] is int value)
{
- FirePot_Write("VW102", (ushort)value);
+ if (fryNo == 1)
+ {
+ FirePot1_Write("VW102", (ushort)value);
+ }
+ else if (fryNo == 2)
+ {
+ FirePot2_Write("VW102", (ushort)value);
+ }
}
Thread.Sleep(200);
- FirePot_Write("M10.3", true);
}
///
/// 炒锅1搅拌启停
///
///
- private void FirePot1_StartStir(object o)
+ private void FirePot_StartStir(object[] o)
{
if (o == null) return;
- if (bool.TryParse(o.ToString(), out bool value))
+ if (o.Length == 2 && o[0] is int fryNo && o[1] is bool value)
{
- FirePot_Write("M10.1", value);
+ if (fryNo == 1)
+ {
+ FirePot1_Write("M10.1", value);
+ }
+ else if (fryNo == 2)
+ {
+ FirePot2_Write("M10.1", value);
+ }
}
Thread.Sleep(200);
}
@@ -671,94 +693,70 @@ namespace BPASmartClient.MorkBF
/// 设置炒锅1翻转速度
///
///
- private void FirePot1_SetTurnSpeed(object o)
- {
- if (o == null) return;
- if (int.TryParse(o.ToString(), out int value))
- {
- FirePot_Write("VW104", (ushort)value);
- }
- Thread.Sleep(200);
- FirePot_Write("M10.4", true);
- Thread.Sleep(200);
- }
- #endregion
-
- #region 炒锅2
- ///
- /// 炒锅2设定加热挡位
- ///
- ///
- private void FirePot2_SetFireGear(object o)
- {
- if (o == null) return;
- if (int.TryParse(o.ToString(), out int value))
- {
- FirePot_Write("VW130", (ushort)value);
- }
- Thread.Sleep(200);
- FirePot_Write("M15.2", true);
- }
- ///
- /// 炒锅2加热启停
- ///
- ///
- private void FirePot2_StartFire(object o)
- {
- if (o == null) return;
- if (o is bool value)
- {
- FirePot_Write("M15.0", value);
- }
- Thread.Sleep(200);
- }
- ///
- /// 炒锅2设置搅拌挡位
- ///
- ///
- private void FirePot2_SetStirGear(object o)
+ private void FirePot_SetTurnSpeed(object[] o)
{
if (o == null) return;
- if (o is int value)
+ if (o.Length == 2 && o[0] is int fryNo && o[1] is int value)
{
- FirePot_Write("VW132", (ushort)value);
+ if (fryNo == 1)
+ {
+ FirePot1_Write("VW104", (ushort)value);
+ }
+ else if (fryNo == 2)
+ {
+ FirePot2_Write("VW104", (ushort)value);
+ }
}
Thread.Sleep(200);
- FirePot_Write("M15.3", true);
- Thread.Sleep(200);
}
///
- /// 炒锅2搅拌启停
+ /// 设定炒锅角度
///
///
- private void FirePot2_StartStir(object o)
+ private void FirePot_SetPotAngle(object[] o)
{
if (o == null) return;
- if (o is bool value)
+ if (o.Length == 2 && o[0] is int fryNo && o[1] is int value)
{
- FirePot_Write("M15.1", value);
+ if (fryNo == 1)
+ {
+ FirePot1_Write("VW106", (ushort)value);
+ }
+ else if (fryNo == 2)
+ {
+ FirePot2_Write("VW106", (ushort)value);
+ }
}
Thread.Sleep(200);
}
+
///
- /// 设置炒锅2翻转速度
+ /// 通道出料启动
///
///
- private void FirePot2_SetTurnSpeed(object o)
+ private void FirePot_StartPassWay(object[] o)
{
if (o == null) return;
- if (o is int value)
+ if (o.Length == 3 && o[0] is int fryNo && o[1] is int value1&& o[2] is int value2)
{
- FirePot_Write("VW134", (ushort)value);
+ if (fryNo == 1)
+ {
+ FirePot1_Write(morkBF.Fire_PasswayValue[value1], (ushort)value2);//写入需求值
+ Thread.Sleep(200);
+ FirePot1_Write(morkBF.Fire_PasswayWrite[value1], true);//启动通道哦
+ }
+ else if (fryNo == 2)
+ {
+ FirePot2_Write(morkBF.Fire_PasswayValue[value1], (ushort)value2);
+ Thread.Sleep(200);
+ FirePot2_Write(morkBF.Fire_PasswayWrite[value1], true);
+ }
}
Thread.Sleep(200);
- FirePot_Write("M15.4", true);
- Thread.Sleep(200);
}
- #endregion
- #region 炒锅通用
+
///
/// 炒锅复位
///
@@ -787,221 +785,189 @@ namespace BPASmartClient.MorkBF
private void FirePot_PotGotoOrigin(object o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
- {
- if (i == 1)
- {
- FirePot_Write("M10.5", true);
- }
- else if (i == 2)
- {
- FirePot_Write("M15.5", true);
- }
- }
- Thread.Sleep(200);
- }
- ///
- /// 炒锅去位置1
- ///
- ///
- private void FirePot_PotGotoP1(object o)
- {
- if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
+ if (o is int i)
{
if (i == 1)
{
- FirePot_Write("M11.2", true);
+ FirePot1_Write("M10.5", true);
}
else if (i == 2)
{
- FirePot_Write("M16.2", true);
+ FirePot2_Write("M10.5", true);
}
}
Thread.Sleep(200);
}
+
///
- /// 炒锅去位置2
+ /// 炒锅去投料位置
///
///
- private void FirePot_PotGotoP2(object o)
+ private void FirePot_PotGotoInFoodPosition(object o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
+ if (o is int i)
{
if (i == 1)
{
- FirePot_Write("M11.3", true);
+ FirePot1_Write("M11.2", true);
}
else if (i == 2)
{
- FirePot_Write("M16.3", true);
+ FirePot2_Write("M11.2", true);
}
}
Thread.Sleep(200);
}
///
- /// 炒锅去位置3
+ /// 出餐启动
///
///
- private void FirePot_PotGotoP3(object o)
+ private void FirePot_StartOutFood(object o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
+ if (o is int i)
{
if (i == 1)
{
- FirePot_Write("M11.4", true);
+ FirePot1_Write("M10.6", true);
}
else if (i == 2)
{
- FirePot_Write("M16.4", true);
+ FirePot2_Write("M10.6", true);
}
+
}
Thread.Sleep(200);
}
///
- /// 炒锅去位置4
+ /// 清洗
///
///
- private void FirePot_PotGotoP4(object o)
+ private void FirePot_Clean(object o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
+ if (o is int i)
{
if (i == 1)
{
- FirePot_Write("M11.5", true);
+ FirePot1_Write("M10.7", true);
+
}
else if (i == 2)
{
- FirePot_Write("M16.5", true);
+ FirePot2_Write("M10.7", true);
}
}
Thread.Sleep(200);
}
- /////
- ///// 炒锅去出餐位置
- /////
- /////
- //private void FirePot_PotGotoOutFoodPositiong(object o)
- //{
- // if (o == null) return;
- // if (o is int i)
- // {
- // if (i == 1)
- // {
- // FirePot_Write("M11.6", true);
- // }
- // else if (i == 2)
- // {
- // FirePot_Write("M16.6", true);
- // }
- // }
- // Thread.Sleep(200);
- //}
///
- /// 炒锅去投料位置
+ /// 抽水启动
///
///
- private void FirePot_PotGotoInFoodPosition(object o)
+ private void FirePot_StartPumpWater(object[] o)
{
if (o == null) return;
- if (int.TryParse(o.ToString() ,out int i))
+ if (o.Length == 2 && o[0] is int fryNo && o[1] is int value)
{
- if (i == 1)
+ if (fryNo == 1)
{
- FirePot_Write("M11.6", true);
+ FirePot1_Write("M11.0", value);
}
- else if (i == 2)
+ else if (fryNo == 2)
{
- FirePot_Write("M16.6", true);
+ FirePot2_Write("M11.0", value);
}
}
Thread.Sleep(200);
}
+
///
- /// 出餐启动
+ /// 推杆伸出
///
///
- private void FirePot_StartOutFood(object o)
+ private void FirePot_PushReach(object o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
+ if (o is int i)
{
if (i == 1)
{
- FirePot_Write("M10.6", true);
+ FirePot1_Write("M12.3", true);
+
}
else if (i == 2)
{
- FirePot_Write("M15.6", true);
+ FirePot2_Write("M12.3", true);
}
-
}
Thread.Sleep(200);
}
///
- /// 清洗
+ /// 推杆缩回
///
///
- private void FirePot_Clean(object o)
+ private void FirePot_PushRetract(object o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
+ if (o is int i)
{
if (i == 1)
{
- if(morkBF.FirePot1_OnOrigin) FirePot_Write("M10.7", true);
+ FirePot1_Write("M12.4", true);
}
else if (i == 2)
{
- if (morkBF.FirePot2_OnOrigin) FirePot_Write("M15.7", true);
+ FirePot2_Write("M12.4", true);
}
}
Thread.Sleep(200);
}
///
- /// 抽水启动
+ /// 翻转正转
///
///
- private void FirePot_StartPumpWater(object o)
+ private void FirePot_PotForward(object o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
+ if (o is int i)
{
if (i == 1)
{
- FirePot_Write("M11.0", true);
+ FirePot1_Write("M12.5", true);
+
}
else if (i == 2)
{
- FirePot_Write("M16.0", true);
+ FirePot2_Write("M12.5", true);
}
}
Thread.Sleep(200);
}
///
- /// 抽油启动
+ /// 翻转正转
///
///
- private void FirePot_StartPumpOil(object o)
+ private void FirePot_PotReversal(object o)
{
if (o == null) return;
- if (int.TryParse(o.ToString(), out int i))
+ if (o is int i)
{
if (i == 1)
{
- FirePot_Write("M16.0", true);
+ FirePot1_Write("M12.6", true);
+
}
else if (i == 2)
{
- FirePot_Write("M16.1", true);
+ FirePot2_Write("M12.6", true);
}
}
Thread.Sleep(200);
}
+
+
#endregion
#region 机器人
diff --git a/BPASmartClient.MorkBF/GVL_MorkBF.cs b/BPASmartClient.MorkBF/GVL_MorkBF.cs
index 4bbf0ce7..ef3f4fed 100644
--- a/BPASmartClient.MorkBF/GVL_MorkBF.cs
+++ b/BPASmartClient.MorkBF/GVL_MorkBF.cs
@@ -368,7 +368,7 @@ namespace BPASmartClient.MorkBF
public Dictionary FirePot2_CompleteSingle { get; set; }
- public GVL_MorkBF(string FireName)
+ public GVL_MorkBF()
{
FirePot1_CompleteSingle = new Dictionary
@@ -443,6 +443,21 @@ namespace BPASmartClient.MorkBF
{8,"M12.2"},
};
+ ///
+ /// 炒锅通道出料需求值点位
+ ///
+ public Dictionary Fire_PasswayValue { get; set; } = new Dictionary
+ {
+ {1,"VW108"},
+ {2,"VW110"},
+ {3,"VW112"},
+ {4,"VW114"},
+ {5,"VW116"},
+ {6,"VW118"},
+ {7,"VW120"},
+ {8,"VW122"},
+ };
+
#region 炒锅1
///
diff --git a/BPASmartClient.MorkBF/VIew/DebugView.xaml b/BPASmartClient.MorkBF/VIew/DebugView.xaml
index 9c30fa9d..6cefcd9b 100644
--- a/BPASmartClient.MorkBF/VIew/DebugView.xaml
+++ b/BPASmartClient.MorkBF/VIew/DebugView.xaml
@@ -56,58 +56,72 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/BPASmartClient.MorkBF/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkBF/ViewModel/DebugViewModel.cs
index c5603a31..e5941cc4 100644
--- a/BPASmartClient.MorkBF/ViewModel/DebugViewModel.cs
+++ b/BPASmartClient.MorkBF/ViewModel/DebugViewModel.cs
@@ -16,12 +16,6 @@ namespace BPASmartClient.MorkBF.ViewModel
[INotifyPropertyChanged]
partial class DebugViewModel
{
-
-
-
-
-
-
///
/// 加热挡位
///
@@ -30,148 +24,214 @@ namespace BPASmartClient.MorkBF.ViewModel
/// 搅拌挡位
///
public ObservableCollection StirGear { get; set; } = new ObservableCollection() { 1, 2, 3, 4, 5 };
+ ///
+ /// 炒锅角度
+ ///
+ public ObservableCollection PotAngle { get; set; } = new ObservableCollection() { 1, 2, 3, 4, };
+ ///
+ /// 通道号
+ ///
+ public ObservableCollection PassWay { get; set; } = new ObservableCollection() { 1, 2, 3, 4,5,6,7,8 };
[ObservableProperty]
- private int _firePot1_FireGear = 1;
+ private int _firePot1_FireGear = 1;//加热挡位
[ObservableProperty]
private int _firePot2_FireGear = 1;
[ObservableProperty]
- private int _firePot1_StirGear = 1;
+ private int _firePot1_StirGear = 1;//搅拌挡位
[ObservableProperty]
private int _firePot2_StirGear = 1;
[ObservableProperty]
- private int _firePot1_TurnSpeed;
+ private int _firePot1_TurnSpeed;//翻转速度
[ObservableProperty]
private int _firePot2_TurnSpeed;
- #region 炒锅1
+ [ObservableProperty]
+ private int _firePot1_PotAngle = 1;//炒锅角度
+ [ObservableProperty]
+ private int _firePot2_PotAngle = 1;
+ [ObservableProperty]
+ private int _firePot1_PassWay = 1;//通道号
+ [ObservableProperty]
+ private int _firePot2_PassWay = 1;
+ [ObservableProperty]
+ private int _firePot1_PassValue = 0;//通道需求值
+ [ObservableProperty]
+ private int _firePot2_PassValue = 0;
+
+
+ #region 炒锅
///
/// 设定加热挡位
///
[RelayCommand]
- private void FirePot1_SetFireGear()
+ private void FirePot_SetFireGear(object o)
{
- ActionManage.GetInstance.Send("FirePot1_SetFireGear", FirePot1_FireGear);
+ if(o == null) return;
+ if(int.TryParse(o.ToString(),out int i))
+ {
+ int value = 0;
+ if(i == 1)
+ {
+ value = FirePot1_FireGear;
+ }
+ else if(i == 2)
+ {
+ value = FirePot2_FireGear;
+ }
+ ActionManage.GetInstance.Send("FirePot_SetFireGear", new object[] { i, value});
+ }
+
}
///
/// 加热启动
///
[RelayCommand]
- private void FirePot1_StartFire()
+ private void FirePot_StartFire(object o)
{
- ActionManage.GetInstance.Send("FirePot1_StartFire",true);
+ if (o == null) return;
+ if (int.TryParse(o.ToString(), out int i))
+ {
+ ActionManage.GetInstance.Send("FirePot_StartFire", new object[] { i, true });
+ }
+
}
///
/// 关闭加热
///
[RelayCommand]
- private void FirePot1_StopFire()
+ private void FirePot_StopFire(object o)
{
- ActionManage.GetInstance.Send("FirePot1_StopFire",false);
+ if (o == null) return;
+ if (int.TryParse(o.ToString(), out int i))
+ {
+ ActionManage.GetInstance.Send("FirePot_StopFire", new object[] { i, false });
+ }
}
+
///
/// 设定搅拌挡位
///
[RelayCommand]
- private void FirePot1_SetStirGear()
+ private void FirePot_SetStirGear(object o)
{
- ActionManage.GetInstance.Send("FirePot1_SetStirGear", FirePot1_StirGear);
+ if (o == null) return;
+ if (int.TryParse(o.ToString(), out int i))
+ {
+ int value = 0;
+ if (i == 1)
+ {
+ value = FirePot1_StirGear;
+ }
+ else if (i == 2)
+ {
+ value = FirePot2_StirGear;
+ }
+ ActionManage.GetInstance.Send("FirePot_SetStirGear",new object[] { i, value });
+ }
}
///
/// 搅拌启动
///
[RelayCommand]
- private void FirePot1_StartStir()
+ private void FirePot_StartStir(object o)
{
- ActionManage.GetInstance.Send("FirePot1_StartStir",true);
+
+ if (o == null) return;
+ if (int.TryParse(o.ToString(), out int i))
+ {
+ ActionManage.GetInstance.Send("FirePot_StartStir", new object[] { i, true });
+ }
}
///
/// 搅拌停止
///
[RelayCommand]
- private void FirePot1_StopStir()
- {
- ActionManage.GetInstance.Send("FirePot1_StopStir",false);
- }
- ///
- /// 翻转频率设定
- ///
- [RelayCommand]
- private void FirePot1_SetTurnSpeed()
+ private void FirePot_StopStir(object o)
{
- if (FirePot1_TurnSpeed > 800) FirePot1_TurnSpeed = 800;
- ActionManage.GetInstance.Send("FirePot1_SetTurnSpeed", FirePot1_TurnSpeed);
- }
- #endregion
- #region 炒锅2
- ///
- /// 设定加热挡位
- ///
- [RelayCommand]
- private void FirePot2_SetFireGear()
- {
- ActionManage.GetInstance.Send("FirePot2_SetFireGear", FirePot2_FireGear );
+ if (o == null) return;
+ if (int.TryParse(o.ToString(), out int i))
+ {
+ ActionManage.GetInstance.Send("FirePot_StopStir", new object[] { i, false });
+ }
}
///
- /// 加热启动
- ///
- [RelayCommand]
- private void FirePot2_StartFire()
- {
- ActionManage.GetInstance.Send("FirePot2_StartFire", true);
- }
- ///
- /// 关闭加热
- ///
- [RelayCommand]
- private void FirePot2_StopFire()
- {
- ActionManage.GetInstance.Send("FirePot2_StopFire", false);
- }
- ///
- /// 设定搅拌挡位
- ///
- [RelayCommand]
- private void FirePot2_SetStirGear()
- {
- ActionManage.GetInstance.Send("FirePot2_SetStirGear", FirePot2_StirGear);
- }
- ///
- /// 搅拌启动
- ///
- [RelayCommand]
- private void FirePot2_StartStir()
- {
- ActionManage.GetInstance.Send("FirePot2_StartStir", true);
- }
- ///
- /// 搅拌停止
+ /// 翻转频率设定
///
[RelayCommand]
- private void FirePot2_StopStir()
- {
- ActionManage.GetInstance.Send("FirePot2_StopStir", false);
+ private void FirePot_SetTurnSpeed(object o)
+ {
+ if (o == null) return;
+ if (int.TryParse(o.ToString(), out int i))
+ {
+ int value = 0;
+ if (i == 1)
+ {
+ value = FirePot1_TurnSpeed;
+ }
+ else if (i == 2)
+ {
+ value = FirePot2_TurnSpeed;
+ }
+ if (value > 800) value = 800;
+ ActionManage.GetInstance.Send("FirePot_SetTurnSpeed", new object[] { i, value });
+ }
+ }
+ ///
+ /// 设定炒锅角度
+ ///
+ [RelayCommand]
+ private void FirePot_SetPotAngle(object o)
+ {
+ if (o == null) return;
+ if (int.TryParse(o.ToString(), out int i))
+ {
+ int value = 0;
+ if (i == 1)
+ {
+ value = FirePot1_PotAngle;
+ }
+ else if (i == 2)
+ {
+ value = FirePot2_PotAngle;
+ }
+ ActionManage.GetInstance.Send("FirePot_SetPotAngle", new object[] { i, value });
+ }
}
+
///
- /// 翻转频率设定
- ///
- [RelayCommand]
- private void FirePot2_SetTurnSpeed()
- {
- if (FirePot1_TurnSpeed > 800) FirePot1_TurnSpeed = 800;
- ActionManage.GetInstance.Send("FirePot2_SetTurnSpeed", FirePot2_TurnSpeed );
+ /// 通道出料启动
+ ///
+ [RelayCommand]
+ private void FirePot_StartPassWay(object o)
+ {
+ if (o == null) return;
+ if (int.TryParse(o.ToString(), out int i))
+ {
+ int value1 = 0;
+ int value2 = 0;
+ if (i == 1)
+ {
+ value1 = FirePot1_PassWay;
+ value2 = FirePot1_PassValue;
+ }
+ else if (i == 2)
+ {
+ value1 = FirePot2_PassWay;
+ value2 = FirePot2_PassValue;
+ }
+ ActionManage.GetInstance.Send("FirePot_StartPassWay", new object[] { i, value1,value2 });
+ }
}
- #endregion
- #region 炒锅通用
///
/// 复位
///
[RelayCommand]
private void FirePot_Reset(object o)
{
- ActionManage.GetInstance.Send("FirePot1_Reset", o);
+ //ActionManage.GetInstance.Send("FirePot1_Reset", o);
}
///
/// 炒锅回原点
@@ -179,91 +239,85 @@ namespace BPASmartClient.MorkBF.ViewModel
[RelayCommand]
private void FirePot_PotGotoOrigin(object o)
{
- ActionManage.GetInstance.Send("FirePot_PotGotoOrigin", o);
- }
- ///
- /// 炒锅去位置1
- ///
- [RelayCommand]
- private void FirePot_PotGotoP1(object o)
- {
- ActionManage.GetInstance.Send("FirePot_PotGotoP1", o);
+ ActionManage.GetInstance.Send("FirePot_PotGotoOrigin", int.Parse(o.ToString()));
}
+
///
- ///炒锅去位置2
+ /// 炒锅去投料位置
///
[RelayCommand]
- private void FirePot_PotGotoP2(object o)
+ private void FirePot_PotGotoInFoodPosition(object o)
{
- ActionManage.GetInstance.Send("FirePot_PotGotoP2", o);
+
+ ActionManage.GetInstance.Send("FirePot_PotGotoInFoodPosition", int.Parse(o.ToString()));
}
///
- /// 炒锅去位置3
+ /// 出餐启动
///
[RelayCommand]
- private void FirePot_PotGotoP3(object o)
+ private void FirePot_StartOutFood(object o)
{
- ActionManage.GetInstance.Send("FirePot_PotGotoP3", o);
+ ActionManage.GetInstance.Send("FirePot_StartOutFood", int.Parse(o.ToString()));
}
///
- /// 炒锅去位置4
+ /// 清洗
///
[RelayCommand]
- private void FirePot_PotGotoP4(object o)
+ private void FirePot_Clean(object o)
{
- ActionManage.GetInstance.Send("FirePot_PotGotoP4", o);
+ ActionManage.GetInstance.Send("FirePot_Clean", int.Parse(o.ToString()));
}
///
- /// 炒锅去出餐位置
+ /// 抽水启动
///
[RelayCommand]
- private void FirePot_PotGotoOutFoodPositiong(object o)
+ private void FirePot_StartPumpWater(object o)
{
- ActionManage.GetInstance.Send("FirePot_PotGotoOutFoodPositiong", o);
+ ActionManage.GetInstance.Send("FirePot_StartPumpWater", new object[] { int.Parse(o.ToString()), true });
}
///
- /// 炒锅去投料位置
+ /// 抽水关闭
///
[RelayCommand]
- private void FirePot_PotGotoInFoodPosition(object o)
+ private void FirePot_StopPumpWater(object o)
{
-
- ActionManage.GetInstance.Send("FirePot_PotGotoInFoodPosition", o);
+ ActionManage.GetInstance.Send("FirePot_StopPumpWater", new object[] { int.Parse(o.ToString()), false });
}
///
- /// 出餐启动
+ /// 推杆伸出
///
[RelayCommand]
- private void FirePot_StartOutFood(object o)
+ private void FirePot_PushReach(object o)
{
- ActionManage.GetInstance.Send("FirePot_StartOutFood", o);
+ ActionManage.GetInstance.Send("FirePot_PushReach", int.Parse(o.ToString()) );
}
///
- /// 清洗
+ /// 推杆缩回
///
[RelayCommand]
- private void FirePot_Clean(object o)
+ private void FirePot_PushRetract(object o)
{
- ActionManage.GetInstance.Send("FirePot_Clean",o);
+ ActionManage.GetInstance.Send("FirePot_PushRetract", int.Parse(o.ToString()));
}
///
- /// 抽水启动
+ /// 翻转正转
///
[RelayCommand]
- private void FirePot_StartPumpWater(object o)
+ private void FirePot_PotForward(object o)
{
- ActionManage.GetInstance.Send("FirePot_StartPumpWater", o);
+ ActionManage.GetInstance.Send("FirePot_PotForward", int.Parse(o.ToString()));
}
///
- /// 抽油启动
+ /// 翻转反转
///
[RelayCommand]
- private void FirePot_StartPumpOil(object o)
+ private void FirePot_PotReversal(object o)
{
- ActionManage.GetInstance.Send("FirePot_StartPumpOil", o);
+ ActionManage.GetInstance.Send("FirePot_PotReversal", int.Parse(o.ToString()) );
}
+
#endregion