From db0f5530438be4db81642ec3033b1f24341a3e07 Mon Sep 17 00:00:00 2001
From: pengliangyang <1406009520@qq.com>
Date: Sat, 25 Jun 2022 17:32:27 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E8=A3=85=E7=AE=B1=E6=9C=80=E6=96=B0?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../BPASmartClient.IceMaker.csproj | 14 +
BPASmartClient.IceMaker/IceMakerMachine.cs | 67 ++
BPASmartClient.JAKA/JakaMachine.cs | 5 +-
BPASmartClient.Model/果汁机/IceMaker.cs | 26 +
BPASmartClient.Model/果汁机/JuicerModel.cs | 74 +-
.../Control_MORKJC2.cs | 82 +-
.../GVL_MorkTLebaiJC.cs | 136 +++
.../GVL_MorkTLebeiJC.cs | 76 --
.../BPASmartClient.MorkT_BarCounter.csproj | 20 +
.../Control_MorkT_BarCounter.cs | 310 +++---
BPASmartClient.MorkT_BarCounter/GVL_MorkT.cs | 145 +++
.../OrderLocInfo.cs | 18 +
.../PolymerBatching.cs | 152 +++
BPASmartClient.MorkT_BarCounter/SendToPlc.cs | 18 +
... => BPASmartClient.MorkT_Container.csproj} | 1 +
.../Control_MorkT_Container.cs | 941 ++++++++++++++++++
BPASmartClient.MorkT_Show/GVL_MorkT.cs | 137 +++
BPASmartClient.MorkT_Show/GVL_MorkTLebeiJC.cs | 76 --
BPASmartClient.MorkT_Show/OrderLocInfo.cs | 2 +-
BPASmartClient.MorkT_Show/PolymerBatching.cs | 2 +-
.../Control_MORKJC.cs | 183 +++-
BPASmartClient.Morkt.JAKA.JC/GVL_MORKJC.cs | 60 ++
BPASmartClient.SerialPort/IceMakerHelper.cs | 240 +++++
SmartClient.sln | 48 +-
24 files changed, 2379 insertions(+), 454 deletions(-)
create mode 100644 BPASmartClient.IceMaker/BPASmartClient.IceMaker.csproj
create mode 100644 BPASmartClient.IceMaker/IceMakerMachine.cs
create mode 100644 BPASmartClient.Model/果汁机/IceMaker.cs
create mode 100644 BPASmartClient.MorkT.Lebai.JC/GVL_MorkTLebaiJC.cs
delete mode 100644 BPASmartClient.MorkT.Lebai.JC/GVL_MorkTLebeiJC.cs
create mode 100644 BPASmartClient.MorkT_BarCounter/BPASmartClient.MorkT_BarCounter.csproj
rename BPASmartClient.MorkT_Show/Control_MORKJC_Show.cs => BPASmartClient.MorkT_BarCounter/Control_MorkT_BarCounter.cs (73%)
create mode 100644 BPASmartClient.MorkT_BarCounter/GVL_MorkT.cs
create mode 100644 BPASmartClient.MorkT_BarCounter/OrderLocInfo.cs
create mode 100644 BPASmartClient.MorkT_BarCounter/PolymerBatching.cs
create mode 100644 BPASmartClient.MorkT_BarCounter/SendToPlc.cs
rename BPASmartClient.MorkT_Show/{BPASmartClient.MorkT_Show.csproj => BPASmartClient.MorkT_Container.csproj} (90%)
create mode 100644 BPASmartClient.MorkT_Show/Control_MorkT_Container.cs
create mode 100644 BPASmartClient.MorkT_Show/GVL_MorkT.cs
delete mode 100644 BPASmartClient.MorkT_Show/GVL_MorkTLebeiJC.cs
create mode 100644 BPASmartClient.SerialPort/IceMakerHelper.cs
diff --git a/BPASmartClient.IceMaker/BPASmartClient.IceMaker.csproj b/BPASmartClient.IceMaker/BPASmartClient.IceMaker.csproj
new file mode 100644
index 00000000..601a8f6f
--- /dev/null
+++ b/BPASmartClient.IceMaker/BPASmartClient.IceMaker.csproj
@@ -0,0 +1,14 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
+
diff --git a/BPASmartClient.IceMaker/IceMakerMachine.cs b/BPASmartClient.IceMaker/IceMakerMachine.cs
new file mode 100644
index 00000000..aade2e3d
--- /dev/null
+++ b/BPASmartClient.IceMaker/IceMakerMachine.cs
@@ -0,0 +1,67 @@
+using BPASmartClient.EventBus;
+using BPASmartClient.Helper;
+using BPASmartClient.Model;
+using BPASmartClient.Peripheral;
+using BPASmartClient.SerialPort;
+using static BPASmartClient.EventBus.EventBus;
+
+namespace BPASmartClient.Icemoker
+{
+ public class IceMakerMachine : BasePeripheral
+ {
+ IceMakerHelper iceMakerHelper = new IceMakerHelper();
+ public override void Init()
+ {
+ iceMakerHelper.Open(communicationPar.SerialPort, communicationPar.BaudRate);
+
+ ThreadManage.GetInstance().StartLong(new Action(() =>
+ {
+ IsConnected = iceMakerHelper.IsOpen;
+ if (!IsConnected) IsWork = false;
+ while (IsConnected)
+ {
+ IsWork = true;
+ if (status != null)
+ {
+ SetStatus("GetDeviceStatus", iceMakerHelper.GetDeviceStatus());
+ }
+ Thread.Sleep(500);
+ }
+ Thread.Sleep(1000);
+ }), $"设备[{DeviceId}]制冰机读取线程", true);
+
+ EventBus.EventBus.GetInstance().Subscribe(DeviceId, delegate (IEvent @event, EventCallBackHandle callBack)
+ {
+ if (@event == null) return;
+ iceMakerHelper.StartCook();
+ });
+ EventBus.EventBus.GetInstance().Subscribe(DeviceId, delegate (IEvent @event, EventCallBackHandle callBack)
+ {
+ if (@event == null) return;
+ iceMakerHelper.EndCook();
+ });
+ EventBus.EventBus.GetInstance().Subscribe(DeviceId, delegate (IEvent @event, EventCallBackHandle callBack)
+ {
+ if (@event == null) return;
+ var parm = @event as SetIceNumber;
+ iceMakerHelper.IceValue(Convert.ToByte(parm?.Value));
+ });
+ }
+
+ public override void Start()
+ {
+ }
+
+ public override void Stop()
+ {
+ }
+
+ public override void WriteData(string address, object value)
+ {
+ }
+
+ protected override void InitStatus()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/BPASmartClient.JAKA/JakaMachine.cs b/BPASmartClient.JAKA/JakaMachine.cs
index eafd2835..a93c39cb 100644
--- a/BPASmartClient.JAKA/JakaMachine.cs
+++ b/BPASmartClient.JAKA/JakaMachine.cs
@@ -25,7 +25,10 @@ namespace BPASmartClient.JAKA
{
SetStatus("GetProgramStatus", (int)jaKaHelper.GetProgramStatus());
SetStatus("Get_RobotAO1", jaKaHelper.Get_RobotAO1());
-
+ SetStatus("Get_RobotDI0", jaKaHelper.Get_RobotDI(0));
+ SetStatus("Get_RobotDI1", jaKaHelper.Get_RobotDI(1));
+ SetStatus("Get_RobotDI2", jaKaHelper.Get_RobotDI(2));
+ SetStatus("Get_RobotDI3", jaKaHelper.Get_RobotDI(3));
}
Thread.Sleep(500);
}
diff --git a/BPASmartClient.Model/果汁机/IceMaker.cs b/BPASmartClient.Model/果汁机/IceMaker.cs
new file mode 100644
index 00000000..78534e74
--- /dev/null
+++ b/BPASmartClient.Model/果汁机/IceMaker.cs
@@ -0,0 +1,26 @@
+using BPASmartClient.Model.PLC;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.Model
+{
+ public class IceMaker
+ {
+ }
+
+ public class StartMakeIce : BaseEvent
+ {
+
+ }
+ public class StopMakeIce : BaseEvent
+ {
+
+ }
+ public class SetIceNumber : WriteModel
+ {
+
+ }
+}
diff --git a/BPASmartClient.Model/果汁机/JuicerModel.cs b/BPASmartClient.Model/果汁机/JuicerModel.cs
index 99e49d52..e79a99d1 100644
--- a/BPASmartClient.Model/果汁机/JuicerModel.cs
+++ b/BPASmartClient.Model/果汁机/JuicerModel.cs
@@ -9,79 +9,7 @@ namespace BPASmartClient.Model
{
public class JuicerModel
{
- #region 果汁机设备MORKT2 Lebai机器人
- //public const int JUICE2_初始位 = 10021;
- //public const int JUICE2_检测位回原点 = 10023;
- //public const int JUICE2_取纸杯 = 10006;
- //public const int JUICE2_二次取杯 = 10008;
- //public const int JUICE2_纸杯检测 = 10007;
- //public const int JUICE2_再检测 = 10024;
- //public const int JUICE2_接咖啡 = 10009;
- //public const int JUICE2_放咖啡杯 = 10010;
-
- //public const int JUICE2_接茶叶 = 10017;
- //public const int JUICE2_接茶水 = 10018;
- //public const int JUICE2_接水 = 10020;
- //public const int JUICE2_放水杯 = 10019;
-
- //public const int JUICE2_接果汁公共位 = 10011;
- //public const int JUICE2_接1号果汁 = 10012;
- //public const int JUICE2_接2号果汁 = 10013;
- //public const int JUICE2_接3号果汁 = 10014;
- //public const int JUICE2_接4号果汁 = 10015;
- //public const int JUICE2_放果汁杯 = 10016;
-
- public const int JUICE2_初始位 = 10001;
- public const int JUICE2_检测位回原点 = 10001;
- public const int JUICE2_取空杯过渡位 = 10004;
- public const int JUICE2_取纸杯 = 10002;
- public const int JUICE2_取纸杯检测 = 10003;
- public const int JUICE2_再检测 = 10024;
- public const int JUICE2_二次取杯 = 10008;
-
- //public const int JUICE2_取杯完成后接饮料过渡位 = 10004;
-
- public const int JUICE2_接咖啡 = 10004;
- //public const int JUICE2_接咖啡放杯过渡位 = 10004;
- public const int JUICE2_接果汁1 = 10004;
- public const int JUICE2_接果汁2 = 10004;
- public const int JUICE2_接果汁3 = 10004;
- public const int JUICE2_接果汁4 = 10004;
-
- public const int JUICE2_接茶叶 = 10004;
- public const int JUICE2_接茶水 = 10004;
- public const int JUICE2_接开水 = 10004;
- //public const int JUICE2_接开水_茶水放杯过渡位 = 10004;
-
- public const int JUICE2_放咖啡杯 = 10004;//放咖啡杯包括取接好咖啡的流程
- public const int JUICE2_放果汁杯1 = 10004;
- public const int JUICE2_放果汁杯2 = 10004;
- public const int JUICE2_放果汁杯3 = 10004;
- public const int JUICE2_放果汁杯4 = 10004;
- public const int JUICE2_放水杯 = 10004;
-
- #endregion
-
- #region 果汁机设备 MORKT1 JAKA机器人
- public const int JUICE_初始位 = 20000;
- public const int JUICE_取杯 = 20001;
- public const int JUICE_取杯检测 = 20010;
- public const int JUICE_接咖啡 = 20020;
- public const int JUICE_接1号果汁 = 20030;
- public const int JUICE_接2号果汁 = 20040;
- public const int JUICE_接3号果汁 = 20050;
- public const int JUICE_接4号果汁 = 20060;
- public const int JUICE_接茶 = 20070;
- public const int JUICE_接茶水 = 20075;
- public const int JUICE_接水 = 20080;
-
- public const int JUICE_放咖啡杯 = 20090;
- public const int JUICE_放果汁杯 = 20100;
- public const int JUICE_放茶水杯 = 20110;
-
- public const int JUICE_放杯 = 20120;
- public const int JUICE_放杯检测 = 20120;
- #endregion
+
}
public class WriteJuicer : WriteModel
diff --git a/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs b/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs
index 2e379311..6bb4c237 100644
--- a/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs
+++ b/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs
@@ -440,7 +440,7 @@ namespace BPASmartClient.MorkTLebaiJC
{
DeviceProcessLogShow("咖啡杯取杯完成");
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接咖啡);
+ Sence(GVL_MorkTLebaiJC.接咖啡);
Wait();
pickUpCoffeeHaveCup = true;
new DRCoffee_MakeCoffeeEvent() { DrinkCode = (DrCoffeeDrinksCode)int.Parse(mainMaterialLoc) }.Publish(); //接咖啡控制 //DrCoffeeDrinksCode.热水
@@ -448,7 +448,7 @@ namespace BPASmartClient.MorkTLebaiJC
else
{
DeviceProcessLogShow("取杯失败 回到初始位,请及时处理!!");
- Sence(JuicerModel.JUICE2_初始位);
+ Sence(GVL_MorkTLebaiJC.机器人初始位);
}
}
}
@@ -465,7 +465,7 @@ namespace BPASmartClient.MorkTLebaiJC
}
outCupCheck = false;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_放咖啡杯);
+ Sence(GVL_MorkTLebaiJC.放咖啡杯);
Wait();
OrderChange(morkTLebaiJC.morkOrderPushesCoffee.ElementAt(0).SuborderId, BPA.Message.Enum.ORDER_STATUS.COMPLETED_TAKE);
DeviceProcessLogShow("咖啡制作完成");
@@ -485,7 +485,7 @@ namespace BPASmartClient.MorkTLebaiJC
if (resultTakeCup == 1)
{
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接开水);
+ Sence(GVL_MorkTLebaiJC.接开水);
Wait();
Output(false, 1);
Output(false, 0);
@@ -524,7 +524,7 @@ namespace BPASmartClient.MorkTLebaiJC
{
DeviceProcessLogShow("取茶杯完成");
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接茶叶);
+ Sence(GVL_MorkTLebaiJC.接茶叶);
Wait();
new WriteMcu() { TagName = "ServoControl", Address = "1", Value = 90 }.Publish();
@@ -535,7 +535,7 @@ namespace BPASmartClient.MorkTLebaiJC
Thread.Sleep(3000);
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接茶水);
+ Sence(GVL_MorkTLebaiJC.接茶水);
Wait();
Output(false, 1);
Output(false, 0);
@@ -572,7 +572,7 @@ namespace BPASmartClient.MorkTLebaiJC
}
outCupCheck = false;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_放水杯);
+ Sence(GVL_MorkTLebaiJC.放水杯);
Wait();
OrderChange(morkTLebaiJC.morkOrderPushesWater.ElementAt(0).SuborderId, BPA.Message.Enum.ORDER_STATUS.COMPLETED_TAKE);
DeviceProcessLogShow("茶水制作完成");
@@ -606,7 +606,7 @@ namespace BPASmartClient.MorkTLebaiJC
else
JuicerNum = 0x01;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接果汁1);
+ Sence(GVL_MorkTLebaiJC.接果汁1);
Wait();
break;
case 53:
@@ -615,7 +615,7 @@ namespace BPASmartClient.MorkTLebaiJC
else
JuicerNum = 0x03;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接果汁2);
+ Sence(GVL_MorkTLebaiJC.接果汁2);
Wait();
break;
case 54:
@@ -624,7 +624,7 @@ namespace BPASmartClient.MorkTLebaiJC
else
JuicerNum = 0x05;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接果汁3);
+ Sence(GVL_MorkTLebaiJC.接果汁3);
Wait();
break;
case 55:
@@ -633,13 +633,13 @@ namespace BPASmartClient.MorkTLebaiJC
else
JuicerNum = 0x07;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接果汁4);
+ Sence(GVL_MorkTLebaiJC.接果汁4);
Wait();
break;
default:
JuicerNum = 0x00;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_接果汁1);
+ Sence(GVL_MorkTLebaiJC.接果汁1);
Wait();
break;
}
@@ -669,27 +669,27 @@ namespace BPASmartClient.MorkTLebaiJC
{
case 52:
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_放果汁杯1);
+ Sence(GVL_MorkTLebaiJC.放果汁杯1);
Wait();
break;
case 53:
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_放果汁杯2);
+ Sence(GVL_MorkTLebaiJC.放果汁杯2);
Wait();
break;
case 54:
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_放果汁杯3);
+ Sence(GVL_MorkTLebaiJC.放果汁杯3);
Wait();
break;
case 55:
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_放果汁杯4);
+ Sence(GVL_MorkTLebaiJC.放果汁杯4);
Wait();
break;
default:
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_放果汁杯1);
+ Sence(GVL_MorkTLebaiJC.放果汁杯1);
Wait();
break;
}
@@ -716,31 +716,17 @@ namespace BPASmartClient.MorkTLebaiJC
{
nCnt = 0;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_初始位);
+ Sence(GVL_MorkTLebaiJC.机器人初始位);
Wait();
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_取纸杯);
+ Sence(GVL_MorkTLebaiJC.取纸杯);
Wait();
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_取纸杯检测);
+ Sence(GVL_MorkTLebaiJC.取纸杯检测);
Wait();
nCnt++;
Thread.Sleep(2000);
- while (checkCnt < 3)
- {
- if (!GetStatus("GetInput"))
- {
- new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_再检测);
- Wait();
- }
- else
- {
- break;
- }
- checkCnt++;
- }
- checkCnt = 0;
+
while (!GetStatus("GetInput")) //读取传感器的值
{
if (nCnt > 3)
@@ -748,7 +734,7 @@ namespace BPASmartClient.MorkTLebaiJC
nCnt = 0;
DeviceProcessLogShow("三次取杯失败,回原点");
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_检测位回原点);
+ Sence(GVL_MorkTLebaiJC.机器人初始位);
Wait();
return 2;
}
@@ -756,27 +742,11 @@ namespace BPASmartClient.MorkTLebaiJC
{
nCnt++;
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_二次取杯);
+ Sence(GVL_MorkTLebaiJC.二次取杯);
Wait();
new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_取纸杯检测);
+ Sence(GVL_MorkTLebaiJC.取纸杯检测);
Wait();
- checkCnt = 0;
- while (checkCnt < 3)
- {
- if (!GetStatus("GetInput"))
- {
- new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }.Publish();
- Sence(JuicerModel.JUICE2_再检测);
- Wait();
- }
- else
- {
- checkCnt = 0;
- return 1;
- }
- checkCnt++;
- }
}
Thread.Sleep(1000);
}
@@ -796,10 +766,10 @@ namespace BPASmartClient.MorkTLebaiJC
try
{
if (GetStatus("RobotValue1")) return 2;
- Sence(JuicerModel.JUICE_放杯);
+ Sence(GVL_MorkTLebaiJC.JUICE_放杯);
Wait();
new LebaiRobot_SetValueEvent() { RobotSetValue = 1 }.Publish();
- Sence(JuicerModel.JUICE_放杯检测);
+ Sence(GVL_MorkTLebaiJC.JUICE_放杯检测);
Wait();
new LebaiRobot_SetValueEvent() { RobotSetValue = 1 }.Publish();
if (GetStatus("GetInput2"))
diff --git a/BPASmartClient.MorkT.Lebai.JC/GVL_MorkTLebaiJC.cs b/BPASmartClient.MorkT.Lebai.JC/GVL_MorkTLebaiJC.cs
new file mode 100644
index 00000000..5fd56271
--- /dev/null
+++ b/BPASmartClient.MorkT.Lebai.JC/GVL_MorkTLebaiJC.cs
@@ -0,0 +1,136 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using BPASmartClient.Device;
+using System.Collections.Concurrent;
+
+namespace BPASmartClient.MorkTLebaiJC
+{
+ public class GVL_MorkTLebaiJC : IStatus
+ {
+ #region 果汁机设备MORKT2 Lebai机器人
+ public const int 机器人安全位 = 10000;//一个位置(模组可移动,机器人不发生碰撞)
+
+ public const int 机器人初始位 = 10001;
+ public const int 初始位_机器人安全位 = 10002;//初始位---安全位
+
+ public const int 取纸杯 = 10005;//安全位---取杯位
+ public const int 二次取杯 = 10008;//取纸杯检测位---二次取杯位
+ public const int 取纸杯检测 = 10006;//取杯位---取杯检测位
+ public const int 取杯位_机器人安全位 = 10002;//取杯检测位---安全位
+
+ public const int 接咖啡 = 10010;//安全位---接咖啡位
+
+ public const int 接果汁过渡位 = 10002;//安全位---接果汁过渡位
+ public const int 接果汁1 = 10011;//接果汁过渡位---果汁1位
+ public const int 接果汁2 = 10012;//接果汁过渡位---果汁2位
+ public const int 接果汁3 = 10013;//接果汁过渡位---果汁3位
+ public const int 接果汁4 = 10014;//接果汁过渡位---果汁4位
+ public const int 接果汁_机器人安全位 = 10002;//接果汁过渡位---安全位
+
+ public const int 接茶叶 = 10015;
+ public const int 接茶水 = 10016;
+ public const int 接开水 = 10017;
+ public const int 接水_机器人安全位 = 10002;
+
+ public const int 接冰块 = 10018;
+ public const int 接冰_机器人安全位 = 10002;
+
+ public const int 放咖啡杯 = 10020;
+ public const int 放果汁杯1 = 10021;
+ public const int 放果汁杯2 = 10022;
+ public const int 放果汁杯3 = 10023;
+ public const int 放果汁杯4 = 10024;
+ public const int 放水杯 = 10025;
+
+ public const int 放杯 = 10001;
+ public const int 放杯_机器人安全位 = 10001;
+
+ #endregion
+
+ #region 果汁机设备 MORKT1 JAKA机器人
+ public const int JUICE_初始位 = 20000;
+ public const int JUICE_取杯 = 20001;
+ public const int JUICE_取杯检测 = 20010;
+ public const int JUICE_接咖啡 = 20020;
+ public const int JUICE_接1号果汁 = 20030;
+ public const int JUICE_接2号果汁 = 20040;
+ public const int JUICE_接3号果汁 = 20050;
+ public const int JUICE_接4号果汁 = 20060;
+ public const int JUICE_接茶 = 20070;
+ public const int JUICE_接茶水 = 20075;
+ public const int JUICE_接水 = 20080;
+
+ public const int JUICE_放咖啡杯 = 20090;
+ public const int JUICE_放果汁杯 = 20100;
+ public const int JUICE_放茶水杯 = 20110;
+
+ public const int JUICE_放杯 = 20120;
+ public const int JUICE_放杯检测 = 20120;
+ #endregion
+ ///
+ ///
+ /// 咖啡订单队列
+ ///
+ public ConcurrentQueue morkOrderPushesCoffee = new ConcurrentQueue();
+ ///
+ /// 是否有咖啡杯
+ ///
+ public bool IsHaveCoffeeCup = false;
+
+ ///
+ /// 咖啡是否制作完成
+ ///
+ public bool MakeCoffeeEnd = false;
+
+ ///
+ /// 果汁订单队列
+ ///
+ public ConcurrentQueue morkOrderPushesJuicer = new ConcurrentQueue();
+ ///
+ /// 果汁是否在制作中
+ ///
+ public bool IsHaveJuiceCup = false;
+ ///
+ /// 咖啡是否制作完成
+ ///
+ public bool MakeJuiceEnd = false;
+
+ ///
+ /// 做茶订单队列
+ ///
+ public ConcurrentQueue morkOrderPushesTea = new ConcurrentQueue();
+ ///
+ /// 茶或水是否在制作中
+ ///
+ public bool IsHaveTeaWaterCup = false;
+ ///
+ /// 咖啡是否制作完成
+ ///
+ public bool MakeTeaEnd = false;
+
+ ///
+ /// 做开水订单队列
+ ///
+ public ConcurrentQueue morkOrderPushesWater = new ConcurrentQueue();
+
+ ///
+ /// 等待取餐订单
+ ///
+ public OrderLocInfo waitMorkOrder = new OrderLocInfo();
+
+ ///
+ /// 当前正在制作咖啡
+ ///
+ public OrderLocInfo MakeCoffeeOrder = new OrderLocInfo();
+
+ ///
+ /// 订单ID
+ ///
+ public string SuborderId = null;
+
+ }
+
+}
diff --git a/BPASmartClient.MorkT.Lebai.JC/GVL_MorkTLebeiJC.cs b/BPASmartClient.MorkT.Lebai.JC/GVL_MorkTLebeiJC.cs
deleted file mode 100644
index 594115af..00000000
--- a/BPASmartClient.MorkT.Lebai.JC/GVL_MorkTLebeiJC.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using BPASmartClient.Device;
-using System.Collections.Concurrent;
-
-namespace BPASmartClient.MorkTLebaiJC
-{
- public class GVL_MorkTLebaiJC : IStatus
- {
- ///
- ///
- /// 咖啡订单队列
- ///
- public ConcurrentQueue morkOrderPushesCoffee = new ConcurrentQueue();
- ///
- /// 是否有咖啡杯
- ///
- public bool IsHaveCoffeeCup = false;
-
- ///
- /// 咖啡是否制作完成
- ///
- public bool MakeCoffeeEnd = false;
-
- ///
- /// 果汁订单队列
- ///
- public ConcurrentQueue morkOrderPushesJuicer = new ConcurrentQueue();
- ///
- /// 果汁是否在制作中
- ///
- public bool IsHaveJuiceCup = false;
- ///
- /// 咖啡是否制作完成
- ///
- public bool MakeJuiceEnd = false;
-
- ///
- /// 做茶订单队列
- ///
- public ConcurrentQueue morkOrderPushesTea = new ConcurrentQueue();
- ///
- /// 茶或水是否在制作中
- ///
- public bool IsHaveTeaWaterCup = false;
- ///
- /// 咖啡是否制作完成
- ///
- public bool MakeTeaEnd = false;
-
- ///
- /// 做开水订单队列
- ///
- public ConcurrentQueue morkOrderPushesWater = new ConcurrentQueue();
-
- ///
- /// 等待取餐订单
- ///
- public OrderLocInfo waitMorkOrder = new OrderLocInfo();
-
- ///
- /// 当前正在制作咖啡
- ///
- public OrderLocInfo MakeCoffeeOrder = new OrderLocInfo();
-
- ///
- /// 订单ID
- ///
- public string SuborderId = null;
-
- }
-
-}
diff --git a/BPASmartClient.MorkT_BarCounter/BPASmartClient.MorkT_BarCounter.csproj b/BPASmartClient.MorkT_BarCounter/BPASmartClient.MorkT_BarCounter.csproj
new file mode 100644
index 00000000..c9f3d027
--- /dev/null
+++ b/BPASmartClient.MorkT_BarCounter/BPASmartClient.MorkT_BarCounter.csproj
@@ -0,0 +1,20 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BPASmartClient.MorkT_Show/Control_MORKJC_Show.cs b/BPASmartClient.MorkT_BarCounter/Control_MorkT_BarCounter.cs
similarity index 73%
rename from BPASmartClient.MorkT_Show/Control_MORKJC_Show.cs
rename to BPASmartClient.MorkT_BarCounter/Control_MorkT_BarCounter.cs
index cd59083a..27ed9659 100644
--- a/BPASmartClient.MorkT_Show/Control_MORKJC_Show.cs
+++ b/BPASmartClient.MorkT_BarCounter/Control_MorkT_BarCounter.cs
@@ -19,7 +19,7 @@ using BPASmartClient.Model.乐白机器人;
using BPASmartClient.Model.单片机;
using BPASmartClient.Model.PLC;
-namespace BPASmartClient.MorkT_Show
+namespace BPASmartClient.MorkT_BarCounter
{
/*
* 冰淇淋咖啡机组合套装
@@ -31,7 +31,7 @@ namespace BPASmartClient.MorkT_Show
* 9: 茶
* 10: 茶杯
*/
- public class Control_MORKJC_Show : BaseDevice
+ public class Control_MorkT_BarCounter : BaseDevice
{
private Dictionary batchings = new Dictionary();
//容器位置
@@ -40,11 +40,15 @@ namespace BPASmartClient.MorkT_Show
private string mainMaterialLoc;
public override global::BPA.Message.Enum.DeviceClientType DeviceType { get { return BPA.Message.Enum.DeviceClientType.MORKT; } }
- GVL_MorkTLebaiJC morkTLebaiJC =new GVL_MorkTLebaiJC();
+ GVL_MorkT morkTJaka =new GVL_MorkT();
///
/// 果汁机做法,true:热饮,false:冷饮
///
private bool GuMake = false;
+ ///
+ /// 订单是否加冰
+ ///
+ private bool IsAddIce = false;
public override void DoMain()
{
if (Json.Data.IsVerify)
@@ -55,7 +59,7 @@ namespace BPASmartClient.MorkT_Show
serverInit();
DataParse();
ActionManage.GetInstance.Register(new Action