From c3efa98fdb217786ab1cd389ca0a946e8073aafc Mon Sep 17 00:00:00 2001
From: pengliangyang <1406009520@qq.com>
Date: Mon, 20 Jun 2022 16:58:00 +0800
Subject: [PATCH] =?UTF-8?q?JakaDO=E6=B7=BB=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BPASmartClient.JAKA/JakaMachine.cs | 3 +
.../节卡机器人/JakaModel.cs | 2 +
.../Control_MORKJC2.cs | 6 +-
.../BPASmartClient.MorkT_Show.csproj | 19 +
.../Control_MORKJC_Show.cs | 851 ++++++++++++++++++
BPASmartClient.MorkT_Show/GVL_MorkTLebeiJC.cs | 76 ++
BPASmartClient.MorkT_Show/OrderLocInfo.cs | 17 +
BPASmartClient.MorkT_Show/PolymerBatching.cs | 152 ++++
.../Control_MORKJC.cs | 6 +-
SmartClient.sln | 25 +-
10 files changed, 1150 insertions(+), 7 deletions(-)
create mode 100644 BPASmartClient.MorkT_Show/BPASmartClient.MorkT_Show.csproj
create mode 100644 BPASmartClient.MorkT_Show/Control_MORKJC_Show.cs
create mode 100644 BPASmartClient.MorkT_Show/GVL_MorkTLebeiJC.cs
create mode 100644 BPASmartClient.MorkT_Show/OrderLocInfo.cs
create mode 100644 BPASmartClient.MorkT_Show/PolymerBatching.cs
diff --git a/BPASmartClient.JAKA/JakaMachine.cs b/BPASmartClient.JAKA/JakaMachine.cs
index 2df5fbc5..eafd2835 100644
--- a/BPASmartClient.JAKA/JakaMachine.cs
+++ b/BPASmartClient.JAKA/JakaMachine.cs
@@ -52,6 +52,9 @@ namespace BPASmartClient.JAKA
case "JaKaProgramName":
if (par?.Value is string stringvalue) jaKaHelper.JaKaProgramName(stringvalue);
break;
+ case "JakaDOutput":
+ if (par?.Value is bool DO_value && par?.DO_Index is int DO_Index) jaKaHelper.Set_RobotDO(DO_Index, DO_value);
+ break;
default:
break;
}
diff --git a/BPASmartClient.Model/节卡机器人/JakaModel.cs b/BPASmartClient.Model/节卡机器人/JakaModel.cs
index 6ec5a876..00d4702f 100644
--- a/BPASmartClient.Model/节卡机器人/JakaModel.cs
+++ b/BPASmartClient.Model/节卡机器人/JakaModel.cs
@@ -39,6 +39,7 @@ namespace BPASmartClient.Model
{
public string Address { get; set; }
public object Value { get; set; }
+ public int DO_Index { get; set; }
}
public class ReadJaka : BaseEvent
@@ -47,5 +48,6 @@ namespace BPASmartClient.Model
public ushort Length { get; set; }
public object ReadPar { get; set; }
}
+
}
diff --git a/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs b/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs
index 45f2817e..2e379311 100644
--- a/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs
+++ b/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs
@@ -190,7 +190,7 @@ namespace BPASmartClient.MorkTLebaiJC
bFirstTrig_Coffee = true;
delayTimeOut_Coffee = DateTime.Now;
}
- if (DateTime.Now.Subtract(delayTimeOut_Coffee).TotalSeconds > 180 )
+ else if (DateTime.Now.Subtract(delayTimeOut_Coffee).TotalSeconds > 180 && bFirstTrig_Coffee == true)
{
bFirstTrig_Coffee = false;
if (morkTLebaiJC.IsHaveCoffeeCup)
@@ -219,7 +219,7 @@ namespace BPASmartClient.MorkTLebaiJC
bFirstTrig_Juice = true;
delayTimeOut_Juice = DateTime.Now;
}
- if (DateTime.Now.Subtract(delayTimeOut_Juice).TotalSeconds > 30)
+ else if (DateTime.Now.Subtract(delayTimeOut_Juice).TotalSeconds > 30 && bFirstTrig_Juice == true)
{
bFirstTrig_Juice = false;
morkTLebaiJC.MakeJuiceEnd = true;
@@ -232,7 +232,7 @@ namespace BPASmartClient.MorkTLebaiJC
bFirstTrig_TeaWater = true;
delayTimeOut = DateTime.Now;
}
- if (DateTime.Now.Subtract(delayTimeOut).TotalSeconds >= 50)
+ else if (DateTime.Now.Subtract(delayTimeOut).TotalSeconds >= 50 && bFirstTrig_TeaWater == true)
{
bFirstTrig_TeaWater = false;
morkTLebaiJC.MakeTeaEnd = true;
diff --git a/BPASmartClient.MorkT_Show/BPASmartClient.MorkT_Show.csproj b/BPASmartClient.MorkT_Show/BPASmartClient.MorkT_Show.csproj
new file mode 100644
index 00000000..ded7616d
--- /dev/null
+++ b/BPASmartClient.MorkT_Show/BPASmartClient.MorkT_Show.csproj
@@ -0,0 +1,19 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BPASmartClient.MorkT_Show/Control_MORKJC_Show.cs b/BPASmartClient.MorkT_Show/Control_MORKJC_Show.cs
new file mode 100644
index 00000000..cd59083a
--- /dev/null
+++ b/BPASmartClient.MorkT_Show/Control_MORKJC_Show.cs
@@ -0,0 +1,851 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Threading;
+using System.Collections.Concurrent;
+using System.Diagnostics;
+using System.Threading.Tasks;
+using BPASmartClient.Device;
+using BPA.Message.Enum;
+using BPA.Message;
+using BPASmartClient.Helper;
+using BPASmartClient.Model.咖啡机.Enum;
+using BPASmartClient.Model;
+using BPASmartClient.EventBus;
+using static BPASmartClient.EventBus.EventBus;
+using BPASmartClient.Message;
+using BPASmartClient.Model.乐白机器人;
+using BPASmartClient.Model.单片机;
+using BPASmartClient.Model.PLC;
+
+namespace BPASmartClient.MorkT_Show
+{
+ /*
+ * 冰淇淋咖啡机组合套装
+ * 物料位置:
+ * 1:冰淇料
+ * 2:冰淇淋杯
+ * 5:咖啡
+ * 6:咖啡杯
+ * 9: 茶
+ * 10: 茶杯
+ */
+ public class Control_MORKJC_Show : BaseDevice
+ {
+ private Dictionary batchings = new Dictionary();
+ //容器位置
+ private string holderLoc;
+ //主料位置
+ private string mainMaterialLoc;
+ public override global::BPA.Message.Enum.DeviceClientType DeviceType { get { return BPA.Message.Enum.DeviceClientType.MORKT; } }
+
+ GVL_MorkTLebaiJC morkTLebaiJC =new GVL_MorkTLebaiJC();
+ ///
+ /// 果汁机做法,true:热饮,false:冷饮
+ ///
+ private bool GuMake = false;
+ public override void DoMain()
+ {
+ if (Json.Data.IsVerify)
+ {
+ IsHealth = true;
+ }
+ IsHealth = true;
+ serverInit();
+ DataParse();
+ ActionManage.GetInstance.Register(new Action