diff --git a/BPASmartClient.AGV/AGVHelper.cs b/BPASmartClient.AGV/AGVHelper.cs
index 50e08d91..b26f8923 100644
--- a/BPASmartClient.AGV/AGVHelper.cs
+++ b/BPASmartClient.AGV/AGVHelper.cs
@@ -52,9 +52,94 @@ namespace BPASmartClient.AGV
request.Abort();
}
return retString;//返回响应报文
-
-
}
-
+ ///
+ /// AGV去1号线体装桶
+ ///
+ ///
+ public string AgvToLineOneLoadRoller()
+ {
+ string url = "";
+ string head = "";
+ string body = "";
+ return HttpRequest(url,head,body);
+ }
+ ///
+ /// AGV去2号线体装桶
+ ///
+ ///
+ public string AgvToLineTwoLoadRoller()
+ {
+ string url = "";
+ string head = "";
+ string body = "";
+ return HttpRequest(url, head, body);
+ }
+ ///
+ /// AGV去3号线体装桶
+ ///
+ ///
+ public string AgvToLineThreeLoadRoller()
+ {
+ string url = "";
+ string head = "";
+ string body = "";
+ return HttpRequest(url, head, body);
+ }
+ ///
+ /// AGV离开炒锅1
+ ///
+ ///
+ public string AgvLeaveFryPotOne()
+ {
+ string url = "";
+ string head = "";
+ string body = "";
+ return HttpRequest(url, head, body);
+ }
+ ///
+ /// AGV离开炒锅2
+ ///
+ ///
+ public string AgvLeaveFryPotTwo()
+ {
+ string url = "";
+ string head = "";
+ string body = "";
+ return HttpRequest(url, head, body);
+ }
+ ///
+ /// AGV离开炒锅3
+ ///
+ ///
+ public string AgvLeaveFryPotThree()
+ {
+ string url = "";
+ string head = "";
+ string body = "";
+ return HttpRequest(url, head, body);
+ }
+ ///
+ /// AGV离开炒锅4
+ ///
+ ///
+ public string AgvLeaveFryPotFour()
+ {
+ string url = "";
+ string head = "";
+ string body = "";
+ return HttpRequest(url, head, body);
+ }
+ ///
+ /// AGV离开炒锅5
+ ///
+ ///
+ public string AgvLeaveFryPotFive()
+ {
+ string url = "";
+ string head = "";
+ string body = "";
+ return HttpRequest(url, head, body);
+ }
}
}
diff --git a/BPASmartClient.Helper/RTrig.cs b/BPASmartClient.Helper/RTrig.cs
index 86cd4ea4..469cebb6 100644
--- a/BPASmartClient.Helper/RTrig.cs
+++ b/BPASmartClient.Helper/RTrig.cs
@@ -15,7 +15,7 @@ namespace BPASmartClient.Helper
private volatile static ConcurrentDictionary _Instance;
public static RTrig GetInstance(string name)
{
- if (_Instance == null) _Instance = new ConcurrentDictionary();
+ if (_Instance == null) _Instance = new ConcurrentDictionary();
if (!_Instance.ContainsKey(name)) _Instance.TryAdd(name, new RTrig());
return _Instance[name];
}
diff --git a/BPASmartClient.Helper/ThreadManage.cs b/BPASmartClient.Helper/ThreadManage.cs
index 479efa1a..47598773 100644
--- a/BPASmartClient.Helper/ThreadManage.cs
+++ b/BPASmartClient.Helper/ThreadManage.cs
@@ -32,6 +32,10 @@ namespace BPASmartClient.Helper
if (CancellationTokenSources.ContainsKey(guid + key))
{
CancellationTokenSources[guid + key]?.Cancel();
+ if (key.Equals("MainTask"))
+ {
+ ActionManage.GetInstance.Send("FryPotDosingMainTaskExit");
+ }
ActionManage.GetInstance.Register(ExitCallback, guid + key);
}
else
diff --git a/FryPot_DosingSystem/Control/DosingLogicControl.cs b/FryPot_DosingSystem/Control/DosingLogicControl.cs
index fcce3b34..829f849c 100644
--- a/FryPot_DosingSystem/Control/DosingLogicControl.cs
+++ b/FryPot_DosingSystem/Control/DosingLogicControl.cs
@@ -1,4 +1,6 @@
-using BPASmartClient.Helper;
+using BPASmartClient.AGV;
+using BPASmartClient.Helper;
+using BPASmartClient.Message;
using FryPot_DosingSystem.Model;
using System;
using System.Collections.Concurrent;
@@ -14,13 +16,78 @@ namespace FryPot_DosingSystem.Control
internal class DosingLogicControl
{
public static DosingLogicControl _instance;
- public static DosingLogicControl GetInstance=>_instance ??= new DosingLogicControl();
- public ConcurrentDictionary PlcReadData=new ConcurrentDictionary();
+ public static DosingLogicControl GetInstance => _instance ??= new DosingLogicControl();
+ public ConcurrentDictionary PlcReadData = new ConcurrentDictionary();
+ ///
+ /// 配方队列
+ ///
+ public ConcurrentQueue RecipeQuene = new ConcurrentQueue();
+ ///
+ /// 进料原料队列
+ ///
+ public ConcurrentQueue InputMaterialQuene = new ConcurrentQueue();
+ ///
+ /// 出料原料队列
+ ///
+ public ConcurrentQueue OutputMaterialQuene = new ConcurrentQueue();
+ ///
+ /// 全局变量对象声明
+ ///
+ GlobalVariable globalVar;
+
+ #region 上位机内部变量
+ int lineAlarm = 0;//线体故障信号 1:无故障 -1:故障
+ int FryPotAlarm = 0;//炒锅滚筒故障信号 1:无故障 -1:故障
+ int ReicpeNum = 0;//记录接收到的配方数
+ #endregion
+ #region agv临时变量
+ bool agvArriveLine = false;//agv是否到达线体装料位置
+ bool agvArriveFryPot = false;//agv是否到达炒锅送料位置
+ bool agvFryPotEmptyRollerArrive = false;//agv是否拿到炒锅空桶
+ #endregion
public DosingLogicControl()
{
+ globalVar = new GlobalVariable();
+ ActionManage.GetInstance.Register(new Action