diff --git a/BPASmartClient.Model/MixWinkModel.cs b/BPASmartClient.Model/MixWinkModel.cs
new file mode 100644
index 00000000..ae41ddbb
--- /dev/null
+++ b/BPASmartClient.Model/MixWinkModel.cs
@@ -0,0 +1,25 @@
+using Microsoft.Toolkit.Mvvm.ComponentModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.Model
+{
+ public class MixWinkModel:ObservableObject
+ {
+ private string _materialName;
+ public string materialName { get { return _materialName; } set { _materialName = value;OnPropertyChanged(); } }
+ ///
+ /// 位置
+ ///
+ private int _loc;
+ public int Loc { get { return _loc; } set { _loc = value;OnPropertyChanged(); } }
+ ///
+ /// 停留时间
+ ///
+ public int Time { get { return _time; } set { _time = value;OnPropertyChanged(); } }
+ private int _time;
+ }
+}
diff --git a/BPASmartClient.Model/订单/MorkMWSimOrder.cs b/BPASmartClient.Model/订单/MorkMWSimOrder.cs
new file mode 100644
index 00000000..5f11798b
--- /dev/null
+++ b/BPASmartClient.Model/订单/MorkMWSimOrder.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.Model.订单
+{
+ public class MorkMWSimOrder:BaseEvent
+ {
+ public List mixWink = new List();
+ }
+}
diff --git a/BPASmartClient.MorkMW/BPASmartClient.MorkMW.csproj b/BPASmartClient.MorkMW/BPASmartClient.MorkMW.csproj
new file mode 100644
index 00000000..2ebedcc7
--- /dev/null
+++ b/BPASmartClient.MorkMW/BPASmartClient.MorkMW.csproj
@@ -0,0 +1,21 @@
+
+
+
+ net6.0-windows
+ enable
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BPASmartClient.MorkMW/Control_MorkMW.cs b/BPASmartClient.MorkMW/Control_MorkMW.cs
new file mode 100644
index 00000000..b181c58a
--- /dev/null
+++ b/BPASmartClient.MorkMW/Control_MorkMW.cs
@@ -0,0 +1,313 @@
+using BPA.Helper;
+using BPA.Message.Enum;
+using BPASmartClient.Device;
+using BPASmartClient.EventBus;
+using BPASmartClient.Modbus;
+using BPASmartClient.Model;
+using BPASmartClient.Model.PLC;
+using BPASmartClient.Model.;
+using BPASmartClient.MorkMW.Model;
+using Org.BouncyCastle.Bcpg.OpenPgp;
+using System;
+using System.Collections.Concurrent;
+using System.Threading;
+using static BPASmartClient.EventBus.EventBus;
+
+namespace BPASmartClient.MorkMW
+{
+ public class Control_MorkMW : BaseDevice
+ {
+ ModbusTcp modbus;
+ public override DeviceClientType DeviceType => DeviceClientType.MORKMW;
+ GVL_MorkMW morkMW = new GVL_MorkMW();
+ public override void DoMain()
+ {
+
+ ConnectKlpRobot("192.168.0.100", 8001);
+ }
+
+ public override void MainTask()
+ {
+ ToGetWink();
+ ToMixWink();
+ ToPourWink();
+ SignalDetect();
+ }
+ ///
+ /// Ӿƹ
+ ///
+ public void ToGetWink()
+ {
+
+ if (morkMW.RobotIdle && orderLocInfos.Count > 0 && !morkMW.TaskLock&&!morkMW.PourWinkComplete&& morkMW.CupSignal)
+ {
+ DeviceProcessLogShow("ʼ");
+ morkMW.TaskLock = true;
+ if (orderLocInfos.TryDequeue(out OrderLocInfo res))
+ {
+ foreach (var item in res.mixWink)
+ {
+ switch (item.Loc)
+ {
+ // case 7: ToMixWink(); break;
+ case 1: ToSpecifiedLocTakeWink(item.Loc, item.Time); break;
+ case 2: ToSpecifiedLocTakeWink(item.Loc, item.Time); break;
+ case 3: ToSpecifiedLocTakeWink(item.Loc, item.Time); break;
+ case 4: ToSpecifiedLocTakeWink(item.Loc, item.Time); break;
+ case 5: ToSpecifiedLocTakeWink(item.Loc, item.Time); break;
+ case 6: ToSpecifiedLocTakeWink(item.Loc, item.Time); break;
+
+ }
+ switch (item.Loc)
+ {
+ //case 7: while (!morkMW.MixWinkComplte) { Thread.Sleep(5); } break;
+ case 1: while (!morkMW.TakeWinkOneComplete) { Thread.Sleep(5); } break;
+ case 2: while (!morkMW.TakeWinkTwoComplete) { Thread.Sleep(5); } break;
+ case 3: while (!morkMW.TakeWinkThreeComplete) { Thread.Sleep(5); } break;
+ case 4: while (!morkMW.TakeWinkFourComplete) { Thread.Sleep(5); } break;
+ case 5: while (!morkMW.TakeWinkFiveComplete) { Thread.Sleep(5); } break;
+ case 6: while (!morkMW.TakeWinkSixComplete) { Thread.Sleep(5); } break;
+
+ }
+
+
+ }
+
+ morkMW.AllowMixWink = true;//Ӿɣ
+ // morkMW.AllowPourWink = true;//ɣ
+ }
+ }
+ }
+ ///
+ /// ƹ
+ ///
+ public void ToMixWink()
+ {
+ // modbus.WriteSingleRegister(0000, 7);//˵
+
+ if (morkMW.AllowMixWink)
+ {
+ DeviceProcessLogShow("ʼ");
+ modbus.WriteSingleRegister(0000, 7);//˵
+ morkMW.AllowMixWink = false;
+ }
+ }
+ ///
+ /// ȥӦλýӾ
+ ///
+ ///
+ ///
+ public void ToSpecifiedLocTakeWink(int loc, int time)
+ {
+ //ͽӾź
+ switch (loc)
+ {
+ case 1: modbus.WriteSingleRegister(0000, 1); break;
+ case 2: modbus.WriteSingleRegister(0000, 2); break;
+ case 3: modbus.WriteSingleRegister(0000, 3); break;
+ case 4: modbus.WriteSingleRegister(0000, 4); break;
+ case 5: modbus.WriteSingleRegister(0000, 5); break;
+ case 6: modbus.WriteSingleRegister(0000, 6); break;
+
+ }
+ //ȴ˵Ӿλ
+ switch (loc)
+ {
+ case 1: while (!morkMW.ArriveWinkOneLoc) { Thread.Sleep(5); } break;
+ case 2: while (!morkMW.ArriveWinkTwoLoc) { Thread.Sleep(5); } break;
+ case 3: while (!morkMW.ArriveWinkThreeLoc) { Thread.Sleep(5); } break;
+ case 4: while (!morkMW.ArriveWinkFourLoc) { Thread.Sleep(5); } break;
+ case 5: while (!morkMW.ArriveWinkFiveLoc) { Thread.Sleep(5); } break;
+ case 6: while (!morkMW.ArriveWinkSixLoc) { Thread.Sleep(5); } break;
+
+ }
+ Thread.Sleep(time * 1000);//ӾƵȴʱ
+ //ͽӾź
+ switch (loc)
+ {
+ case 1: modbus.WriteSingleCoil(4596, true); break;
+ case 2: modbus.WriteSingleCoil(4597, true); break;
+ case 3: modbus.WriteSingleCoil(4598, true); break;
+ case 4: modbus.WriteSingleCoil(4599, true); break;
+ case 5: modbus.WriteSingleCoil(4600, true); break;
+ case 6: modbus.WriteSingleCoil(4601, true); break;
+
+ }
+
+ }
+ ///
+ /// ƹ
+ ///
+ public void ToPourWink()
+ {
+ //if (morkMW.AllowPourWink && morkMW.CupSignal)
+ //{
+ // morkMW.AllowPourWink = false;
+ // modbus.WriteSingleRegister(0000, 8);//
+
+ //}
+ if (morkMW.CupSignal && RTrig.GetInstance("AllowOut").Start(morkMW.MixWinkComplte))
+ {
+ DeviceProcessLogShow("ʼ");
+ modbus.WriteSingleRegister(0000, 8);//
+
+ }
+
+ }
+ ///
+ /// źż
+ ///
+ public void SignalDetect()
+ {
+ if (RTrig.GetInstance("AllComplete").Start(morkMW.ProcessComplete))
+ {
+ morkMW.PourWinkComplete = true;
+ DeviceProcessLogShow("ɣȡߵþƱ");
+ }
+ if (morkMW.PourWinkComplete)
+ {
+ if (TTrig.GetInstance("PoutWinkCom").Start(morkMW.CupSignal))
+ {
+ DeviceProcessLogShow("ͻȡߵþƱ,ÿվƱԴ´ζ");
+ }
+ if (RTrig.GetInstance("PoutWinkCom").Start(morkMW.CupSignal))
+ {
+ DeviceProcessLogShow("վƱλִһ");
+ morkMW.PourWinkComplete = false;
+ morkMW.TaskLock = false;
+ Thread.Sleep(2000);
+ }
+ }
+ }
+
+
+ ///
+ /// ջ״̬
+ ///
+ public override void ReadData()
+ {
+ //GetStatus("M230.0", new Action