Commit a7562871 张东亮

降低访问佳世达接口频率为1s

1 个父辈 2405e849
......@@ -61,7 +61,8 @@
<add key="http.server" value="http://10.85.199.25/myproject/" />
<add key="FLEET" value="10.85.199.3" />
<add key="AutoCharge" value="True" />
<add key="ChargeWait" value="1" />
<!--去4C的三辆车IP地址-->
<add key="C4_AGV_IPs" value="10.85.199.71,10.85.199.72,10.85.199.73" />
<add key="ChargeThreshold" value="20,90" />
<add key="IP_4D_Light" value="10.85.196.40:8088" />
<add key="IP_4C_Light" value="10.85.197.40:8088" />
......
......@@ -31,7 +31,7 @@ namespace AGVControl.BLL
{
AgvCallTimer = new System.Timers.Timer
{
Interval = 300,
Interval = 1000,
AutoReset = true,
Enabled = false
};
......@@ -156,6 +156,18 @@ namespace AGVControl.BLL
if (CheckOnline(i))
{
bool change = false;
if (!Common.agvInfo[i].AllocatingTask && Common.agvInfo[i].IsUse && Common.agvInfo[i].CurJob != null && Common.agvInfo[i].CurTaskID.Equals(-1))
{
if (!Common.mir.Get_Fleet_Mission_Info(Common.agvInfo[i]))
{
Common.agvInfo[i].CurJob.ResendTask(Common.agvInfo[i]);
Common.log.Info($"{Common.agvInfo[i].Name}:Task=-1处理,Fleet无任务,重发任务:{Common.agvInfo[i].CurTaskName}");
}
else
{
Common.log.Info($"{Common.agvInfo[i].Name}:Task=-1处理,Fleet有任务,自动赋值FleetTaskID={Common.agvInfo[i].CurTaskID}");
}
}
Common.mir.Get_Task_State(Common.agvInfo[i].CurTaskID, out string stateStr);
Thread.Sleep(50);
//获取AGV状态
......@@ -198,13 +210,13 @@ namespace AGVControl.BLL
if (node.Name.Equals("A5"))
{
if (!SettingString.C4_AGV_IPs.Contains(agv_Info.IP))
if (!Common.C4_AGV_IPs.Contains(agv_Info.IP))
continue;
job = ((DoubleLineNodeFor4C)node).GetNewJob(agv_Info);
}
else if (node.Name.Equals("A6"))
{
if (SettingString.C4_AGV_IPs.Contains(agv_Info.IP))
if (Common.C4_AGV_IPs.Contains(agv_Info.IP))
continue;
job = ((DoubleLineNodeFor4D)node).GetNewJob(agv_Info);
}
......
......@@ -114,8 +114,15 @@ namespace AGVControl
/// <summary>
/// 当前任务的ID号
/// </summary>
public int CurTaskID { get; set; } = -1;
public long CurTaskID { get; set; } = -1;
/// <summary>
/// 任务时间戳
/// </summary>
public string TimeStamp { get; set; } = "";
/// <summary>
/// 正在分配任务
/// </summary>
public bool AllocatingTask = false;
public string CurTaskState { get; set; } = "";
/// <summary>
/// 当前任务名称
......@@ -158,7 +165,7 @@ namespace AGVControl
{
string curJobTaskName = "";
string curJobTaskState = "";
int curJobTaskID = -1;
long curJobTaskID = -1;
if (CurJob != null)
{
if (CurJob is ChargeJob)
......
......@@ -21,7 +21,7 @@ namespace AGVControl
/// </summary>
public abstract Job Execute(Agv_Info agv);
public int CurTaskID { get; set; } = -1;
public long CurTaskID { get; set; } = -1;
/// <summary>
/// 当前的任务名称(与任务GUID对应)
......@@ -42,7 +42,7 @@ namespace AGVControl
/// </summary>
/// <param name="curTaskName"></param>
/// <param name="curTaskId"></param>
protected void UpdateJobTaskInfo(string curTaskName, int curTaskId)
protected void UpdateJobTaskInfo(string curTaskName, long curTaskId)
{
CurTaskID = curTaskId;
CurTaskName = curTaskName;
......
......@@ -22,7 +22,7 @@ namespace AGVControl
/// <returns></returns>
public override Job GetNewJob(Agv_Info currentAgv)
{
if (!SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (!Common.C4_AGV_IPs.Contains(currentAgv.IP))
return null;
if (!Common.CheckCanExecuteMission(currentAgv))
return null;
......@@ -33,7 +33,7 @@ namespace AGVControl
string rfid = "";
foreach (Agv_Info agv in Common.agvInfo)
{
if (!SettingString.C4_AGV_IPs.Contains(agv.IP))
if (!Common.C4_AGV_IPs.Contains(agv.IP))
continue;
if (agv.CurJob is GoEmptyShelfLineJob || (agv.CurJob is EmptyShelfBackJob))
{
......@@ -44,7 +44,7 @@ namespace AGVControl
//出工单料的目的地是否有空料架
if (Common.FindEmptyShelfBeforeSendFullShelf(out string nodeName))
{
if (nodeName.StartsWith(SettingString.C4_Name_Prefix) && SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (nodeName.StartsWith(SettingString.C4_Name_Prefix) && Common.C4_AGV_IPs.Contains(currentAgv.IP))
{
ClientNode clientNode = Common.nodeInfo.Find(s => s.Name.Equals(nodeName));
int cnt = 0;
......@@ -68,7 +68,7 @@ namespace AGVControl
//回收空料架
if (Common.FindEmptyShelfNode(currentAgv, out string emptyNodeName))
{
if (SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (Common.C4_AGV_IPs.Contains(currentAgv.IP))
{
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoEmptyShelfLineJob && ((GoEmptyShelfLineJob)s.CurJob).EmptyShelfPlace.Equals(emptyNodeName));
if (i == -1)
......@@ -84,7 +84,7 @@ namespace AGVControl
if (Common.FindFullShelfTask(currentAgv))
{
if (SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (Common.C4_AGV_IPs.Contains(currentAgv.IP))
{
ClientNode node = Common.nodeInfo.Find(s => s.Name.Equals(SettingString.A6)
&& (s.StateEquals(eNodeStatus.NeedLeave) || s.StateEquals(eNodeStatus.NeedEnterLeave)) && !s.RFID.Equals("00"));
......
using BLL;
using log4net.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AGVControl
namespace AGVControl
{
/// <summary>
///
......@@ -25,7 +17,7 @@ namespace AGVControl
/// <returns></returns>
public override Job GetNewJob(Agv_Info currentAgv)
{
if (SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (Common.C4_AGV_IPs.Contains(currentAgv.IP))
return null;
if (!Common.CheckCanExecuteMission(currentAgv))
return null;
......@@ -36,7 +28,7 @@ namespace AGVControl
string rfid = "";
foreach (Agv_Info agv in Common.agvInfo)
{
if (SettingString.C4_AGV_IPs.Contains(agv.IP))
if (Common.C4_AGV_IPs.Contains(agv.IP))
continue;
if (agv.CurJob is GoEmptyShelfLineJob || agv.CurJob is EmptyShelfBackJob)//
{
......@@ -46,13 +38,13 @@ namespace AGVControl
//出工单料的目的地是否有空料架
if (Common.FindEmptyShelfBeforeSendFullShelf(out string nodeName))
{
if (nodeName.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (nodeName.StartsWith(SettingString.D4_Name_Prefix) && !Common.C4_AGV_IPs.Contains(currentAgv.IP))
{
ClientNode clientNode = Common.nodeInfo.Find(s => s.Name.Equals(nodeName));
int cnt = 0;
foreach (Agv_Info agv in Common.agvInfo)
{
if (SettingString.C4_AGV_IPs.Contains(agv.IP))
if (Common.C4_AGV_IPs.Contains(agv.IP))
continue;
if (agv.CurJob is GoEmptyShelfLineJob)
{
......@@ -73,7 +65,7 @@ namespace AGVControl
//回收空料架
if (Common.FindEmptyShelfNode(currentAgv, out string emptyNodeName))
{
if (!SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (!Common.C4_AGV_IPs.Contains(currentAgv.IP))
{
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoEmptyShelfLineJob && ((GoEmptyShelfLineJob)s.CurJob).EmptyShelfPlace.Equals(emptyNodeName));
if (i == -1)
......@@ -88,7 +80,7 @@ namespace AGVControl
//出满料
if (Common.FindFullShelfTask(currentAgv))
{
if (!SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (!Common.C4_AGV_IPs.Contains(currentAgv.IP))
{
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoFullShelfStationJob && !s.IP.Equals(currentAgv.IP));
if (i > -1)
......@@ -130,7 +122,7 @@ namespace AGVControl
/// <returns></returns>
private bool CanEmptyTask(int emptytASKAGV)
{
if (emptytASKAGV>=1)//确保一辆车回收架子
if (emptytASKAGV >= 1)//确保一辆车回收架子
{
return false;
}
......
......@@ -61,7 +61,8 @@
<add key="http.server" value="http://10.85.199.25/myproject/" />
<add key="FLEET" value="10.85.199.3" />
<add key="AutoCharge" value="True" />
<add key="ChargeWait" value="1" />
<!--去4C的三辆车IP地址-->
<add key="C4_AGV_IPs" value="10.85.199.71,10.85.199.72,10.85.199.73" />
<add key="ChargeThreshold" value="20,90" />
<add key="IP_4D_Light" value="10.85.196.40:8088" />
<add key="IP_4C_Light" value="10.85.197.40:8088" />
......
......@@ -12,7 +12,7 @@
4D-10线,MoveD10,e7c0ad9c-b517-11ea-b6ad-00012998f5a0
4D-11线,MoveD11,2e23a510-b518-11ea-b6ad-00012998f5a0
4D-12线,MoveD12,6efb37bc-b519-11ea-b6ad-00012998f5a0
4D-14线,MoveD14,b03043fd-b519-11ea-b6ad-00012998f5a0
4D-13线,MoveD13,b03043fd-b519-11ea-b6ad-00012998f5a0
4D-15线,MoveD15,f3f9a668-b519-11ea-b6ad-00012998f5a0
4D-16线,MoveD16,5ec0f64a-b51a-11ea-b6ad-00012998f5a0
4D-FeedeerIn,MoveD4FeederIn,37401585-b51b-11ea-b6ad-00012998f5a0
......
......@@ -12,7 +12,7 @@ D9,D9,10.85.199.180,4D-9Ïß,DL9,9e0b64ab-b432-11ea-a1a5-00012999830e
D10,D10,10.85.199.181,4D-10Ïß,DL10,aec7da80-b432-11ea-a1a5-00012999830e
D11,D11,10.85.199.182,4D-11Ïß,DL11,c10984c9-b432-11ea-a1a5-00012999830e
D12,D12,10.85.199.183,4D-12Ïß,DL12,d6e0b92a-b432-11ea-a1a5-00012999830e
D14,D14,10.85.199.184,4D-14Ïß,DL14,efb04c55-b432-11ea-a1a5-00012999830e
D13,D13,10.85.199.184,4D-13Ïß,DL14,efb04c55-b432-11ea-a1a5-00012999830e
D15,D15,10.85.199.185,4D-15Ïß,DL15,fd6b1f95-b432-11ea-a1a5-00012999830e
D16,D16,10.85.199.96,4D-16Ïß,line_16,ac6c413e-895e-11ea-9374-000129922ca6
FeederIn,D21,10.85.199.1,4D-FeedeerIn,FI,1e546c3a-8abe-11ea-ab63-000129922ca6
......
{"NodeUnlockMissions":{"D1":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D2":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D3":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D4":{"NodeName":null,"EmptyCnt":1,"Rfids":{"C2":"2021/01/21/09:18:50,014"}},"D5":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D6":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D8":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D9":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D10":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D11":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D12":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D14":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D15":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D16":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D22":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C1":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C2":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C3":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C4":{"NodeName":null,"EmptyCnt":1,"Rfids":{"D9":"2021/04/14/10:30:23,611"}},"C5":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C6":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C7":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C8":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C9":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C10":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C14":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C15":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C22":{"NodeName":null,"EmptyCnt":0,"Rfids":{}}}}
{"NodeUnlockMissions":{"D1":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D2":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D3":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D4":{"NodeName":null,"EmptyCnt":1,"Rfids":{"C2":"2021/01/21/09:18:50,014"}},"D5":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D6":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D8":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D9":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D10":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D11":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D12":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D13":{"NodeName":null,"EmptyCnt":3,"Rfids":{"D1":"2021/08/06/09:41:37,667","D14":"2021/08/06/09:43:17,419","D15":"2021/08/06/09:43:35,459"}},"D15":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D16":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"D22":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C1":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C2":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C3":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C4":{"NodeName":null,"EmptyCnt":1,"Rfids":{"D9":"2021/04/14/10:30:23,611"}},"C5":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C6":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C7":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C8":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C9":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C10":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C14":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C15":{"NodeName":null,"EmptyCnt":0,"Rfids":{}},"C22":{"NodeName":null,"EmptyCnt":0,"Rfids":{}}}}
......@@ -20,3 +20,5 @@ EmptyShelfCnt=1
EmptyShelfCnt=1
[C4]
EmptyShelfCnt=1
[D13]
EmptyShelfCnt=3
......@@ -71,4 +71,3 @@ E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLi
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csproj.CopyComplete
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.exe
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.pdb
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!