Commit aed2a716 张东亮

接口变化以及流程变更

1 个父辈 0c83f472
...@@ -20,6 +20,7 @@ namespace Common ...@@ -20,6 +20,7 @@ namespace Common
public const string Leave = "Leave"; public const string Leave = "Leave";
public const string Enter = "Enter"; public const string Enter = "Enter";
public const string Init = "Init"; public const string Init = "Init";
public const string Adjust = "Adjust";
//任务状态 //任务状态
...@@ -35,7 +36,8 @@ namespace Common ...@@ -35,7 +36,8 @@ namespace Common
public const string FileName_Missions = "Missions.json"; public const string FileName_Missions = "Missions.json";
public const string IsUse = "IsUse"; public const string IsUse = "IsUse";
public const string RFID = "RFID"; public const string RFID = "RFID";
public const string Warehouse = "Warehouse"; public const string Warehouse = "storage";
public const string Cancel = "Cancel";
public const string C4_STANDBY1 = "C4_STANDBY1"; public const string C4_STANDBY1 = "C4_STANDBY1";
public const string C4_STANDBY2 = "C4_STANDBY2"; public const string C4_STANDBY2 = "C4_STANDBY2";
......
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
<!--节点IP,不需要通讯的设为空--> <!--节点IP,不需要通讯的设为空-->
<ip></ip> <ip></ip>
<!--名称--> <!--名称-->
<name>Warehouse</name> <name>storage</name>
<!--是否调用--> <!--是否调用-->
<IsUse>true</IsUse> <IsUse>true</IsUse>
<!--别名--> <!--别名-->
......
...@@ -217,4 +217,11 @@ ...@@ -217,4 +217,11 @@
<!--任务类型:None,Move,Dock,InOut--> <!--任务类型:None,Move,Dock,InOut-->
<type>Move</type> <type>Move</type>
</task> </task>
<task id ="31">
<name>Adjust</name>
<alicename>调宽</alicename>
<guid>615cef05-61f4-11eb-96a9-0001297a1dca</guid>
<!--任务类型:None,Move,Dock,InOut-->
<type>None</type>
</task>
</tasks> </tasks>
\ No newline at end of file \ No newline at end of file
...@@ -151,7 +151,17 @@ namespace DeviceLibrary ...@@ -151,7 +151,17 @@ namespace DeviceLibrary
if (!AGVManager.agvInfo[i].IsUse) continue; //AGV是否可用 if (!AGVManager.agvInfo[i].IsUse) continue; //AGV是否可用
//Ready,Pause,Executing,Error //Ready,Pause,Executing,Error
if (!AGVManager.agvInfo[i].StateID.Equals(eAGVState.Ready) && !AGVManager.agvInfo[i].StateID.Equals(eAGVState.Pause) if(AGVManager.agvInfo[i].StateID.Equals(eAGVState.Pause))
{
MiR_API.State_Ready(AGVManager.agvInfo[i]);
continue;
}
if (AGVManager.agvInfo[i].StateID.Equals(eAGVState.Error))
{
MiR_API.Clear_Error(AGVManager.agvInfo[i]);
continue;
}
if (!AGVManager.agvInfo[i].StateID.Equals(eAGVState.Ready)
&& !AGVManager.agvInfo[i].StateID.Equals(eAGVState.Executing) && !AGVManager.agvInfo[i].StateID.Equals(eAGVState.None)) && !AGVManager.agvInfo[i].StateID.Equals(eAGVState.Executing) && !AGVManager.agvInfo[i].StateID.Equals(eAGVState.None))
{ {
log.Warn(string.Format("{0}不能调用 StateID={1}", AGVManager.agvInfo[i].Name, AGVManager.agvInfo[i].StateID.ToString())); log.Warn(string.Format("{0}不能调用 StateID={1}", AGVManager.agvInfo[i].Name, AGVManager.agvInfo[i].StateID.ToString()));
......
...@@ -59,13 +59,13 @@ ...@@ -59,13 +59,13 @@
<Compile Include="bean\ChargePiles.cs" /> <Compile Include="bean\ChargePiles.cs" />
<Compile Include="bean\job\ChargeJob.cs" /> <Compile Include="bean\job\ChargeJob.cs" />
<Compile Include="bean\job\EmptyAGVBackJob.cs" /> <Compile Include="bean\job\EmptyAGVBackJob.cs" />
<Compile Include="bean\job\EmptyShelfBackJob.cs" /> <Compile Include="bean\job\FixToInStoreJob.cs" />
<Compile Include="bean\job\GoEmptyShelfLineJob.cs" /> <Compile Include="bean\job\GoLineForRecyJob.cs" />
<Compile Include="bean\job\GoFullShelfStationJob.cs" /> <Compile Include="bean\job\GoWarehouseForOutStoreJob.cs" />
<Compile Include="bean\JobParam.cs" /> <Compile Include="bean\JobParam.cs" />
<Compile Include="bean\TaskRunState.cs" /> <Compile Include="bean\TaskRunState.cs" />
<Compile Include="bean\job\jobType\JobForFixture.cs" /> <Compile Include="bean\job\jobType\JobForFixture.cs" />
<Compile Include="bean\job\SendFullShelfToLineJob.cs" /> <Compile Include="bean\job\SendFixToLineJob.cs" />
<Compile Include="bean\job\StandyJob.cs" /> <Compile Include="bean\job\StandyJob.cs" />
<Compile Include="bean\Task.cs" /> <Compile Include="bean\Task.cs" />
<Compile Include="bean\Node.cs" /> <Compile Include="bean\Node.cs" />
...@@ -83,10 +83,11 @@ ...@@ -83,10 +83,11 @@
<Compile Include="manager\AGVManager.cs" /> <Compile Include="manager\AGVManager.cs" />
<Compile Include="DisplayBoard.cs" /> <Compile Include="DisplayBoard.cs" />
<Compile Include="bean\MiR_API.cs" /> <Compile Include="bean\MiR_API.cs" />
<Compile Include="manager\WarehouseSigManager.cs" />
<Compile Include="manager\XmlConfigOpManager.cs" /> <Compile Include="manager\XmlConfigOpManager.cs" />
<Compile Include="manager\AgvTaskManager.cs" /> <Compile Include="manager\AgvTaskManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="service\FixMissionInfo.cs" /> <Compile Include="service\MissionInfo.cs" />
<Compile Include="manager\FixMissionManager.cs" /> <Compile Include="manager\FixMissionManager.cs" />
<Compile Include="bean\Shelf.cs" /> <Compile Include="bean\Shelf.cs" />
<Compile Include="service\FixtureService.cs" /> <Compile Include="service\FixtureService.cs" />
......
...@@ -29,6 +29,10 @@ namespace DeviceLibrary.bean ...@@ -29,6 +29,10 @@ namespace DeviceLibrary.bean
/// 等待到达4C门 /// 等待到达4C门
/// </summary> /// </summary>
WAIT_IN_ROOM_C, WAIT_IN_ROOM_C,
/// <summary>
/// 调整宽度
/// </summary>
ADJUST_WIDTH,
#endregion #endregion
#region 充电任务 #region 充电任务
...@@ -62,6 +66,22 @@ namespace DeviceLibrary.bean ...@@ -62,6 +66,22 @@ namespace DeviceLibrary.bean
/// </summary> /// </summary>
RECY_BACK_WAIT_SHELF_IN_RECY_ST, RECY_BACK_WAIT_SHELF_IN_RECY_ST,
/// <summary> /// <summary>
/// 检查是否有出库
/// </summary>
RECY_BACK_CHECK_OUT_STORE,
/// <summary>
/// 等待出料信息
/// </summary>
RECY_BACK_WAIT_RESPONSE,
/// <summary>
/// 等待治具进入AGV
/// </summary>
RECY_BACK_WAIT_FIX_IN_AGV,
/// <summary>
/// 等待离开信号
/// </summary>
RECY_BACK_WAIT_LEAVE_SIG,
/// <summary>
/// 回收处暂时不需要,等待AGV到达待机位 /// 回收处暂时不需要,等待AGV到达待机位
/// </summary> /// </summary>
RECY_BACK_WAIT_REACH_STANDBY, RECY_BACK_WAIT_REACH_STANDBY,
...@@ -153,6 +173,10 @@ namespace DeviceLibrary.bean ...@@ -153,6 +173,10 @@ namespace DeviceLibrary.bean
/// </summary> /// </summary>
WAIT__FULL_SHELF_IN_AGV, WAIT__FULL_SHELF_IN_AGV,
/// <summary> /// <summary>
/// 等待离开信号
/// </summary>
WAIT_LEAVE_SIG,
/// <summary>
/// 等待AGV到达待机位 /// 等待AGV到达待机位
/// </summary> /// </summary>
WAIT_REACH_STANDBY, WAIT_REACH_STANDBY,
......
...@@ -59,7 +59,7 @@ namespace DeviceLibrary ...@@ -59,7 +59,7 @@ namespace DeviceLibrary
} }
public void EnWaitTaskQueue(AgvTask task) public void EnWaitTaskQueue(AgvTask task)
{ {
if (string.IsNullOrEmpty(task.Name)) if (string.IsNullOrEmpty(task.Name) || task.Type.Equals(TaskType.InOut))
return; return;
WaitExecuteTask.Enqueue(task); WaitExecuteTask.Enqueue(task);
} }
......
...@@ -21,7 +21,7 @@ namespace DeviceLibrary ...@@ -21,7 +21,7 @@ namespace DeviceLibrary
/// </summary> /// </summary>
public EmptyAGVBackJob(JobParam jobParam):base(jobParam) public EmptyAGVBackJob(JobParam jobParam):base(jobParam)
{ {
JobName = "返回任务"; JobName = "空车返回任务";
} }
/// <summary> /// <summary>
...@@ -33,14 +33,15 @@ namespace DeviceLibrary ...@@ -33,14 +33,15 @@ namespace DeviceLibrary
StartJobTime = JobRunStep.startTime; StartJobTime = JobRunStep.startTime;
if (JobRunStep.IsStep(RunStep.NONE)) if (JobRunStep.IsStep(RunStep.NONE))
{ {
{ return null;
JobRunStep.ToNextStep(RunStep.END); //{
} // JobRunStep.ToNextStep(RunStep.END);
//}
} }
else if(JobRunStep.IsStep(RunStep.END)) else if(JobRunStep.IsStep(RunStep.END))
{ {
JobRunStep.EndJob(); JobRunStep.EndJob();
return new ChargeJob(new JobParam(JobParam.SrcNode.ToCopy())); return null;
} }
return this; return this;
} }
......
...@@ -13,16 +13,16 @@ using DeviceLibrary.manager; ...@@ -13,16 +13,16 @@ using DeviceLibrary.manager;
namespace DeviceLibrary namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 料架回收任务 /// 治具入库任务
/// </summary> /// </summary>
public class EmptyShelfBackJob : Job public class FixToInStoreJob : Job
{ {
/// <summary> /// <summary>
/// 料架回收任务 /// 料架回收任务
/// </summary> /// </summary>
public EmptyShelfBackJob(JobParam jobParam) : base(jobParam) public FixToInStoreJob(JobParam jobParam) : base(jobParam)
{ {
JobName = "料架回收返回任务"; JobName = "治具入库任务";
} }
private int tryTimes = 0; private int tryTimes = 0;
...@@ -85,22 +85,23 @@ namespace DeviceLibrary ...@@ -85,22 +85,23 @@ namespace DeviceLibrary
{ {
if (agv.TaskRunState.CheckTaskFinished(agv.Name)) if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{ {
WarehouseSigManager.TargetWithFix.CurPlace = JobParam.TargetNode.Name;
JobRunStep.ToNextStep(RunStep.RECY_BACK_WAIT_RECY_ST_RESPONSE); JobRunStep.ToNextStep(RunStep.RECY_BACK_WAIT_RECY_ST_RESPONSE);
runInfo = "AGV到达 " + JobParam.TargetNode + ",并发送入料架请求"; runInfo = "AGV到达 " + JobParam.TargetNode + ",并发送治具入库请求";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
OpManager.ServerToClient.ReadyEnter(JobParam.TargetNode.Name, JobParam.Shelf == null ? "" : JobParam.Shelf.RFID); OpManager.ServerToClient.ReadyEnter(JobParam.TargetNode.Name, JobParam.Shelf == null ? "" : JobParam.Shelf.RFID);
} }
} }
else if (JobRunStep.IsStep(RunStep.RECY_BACK_WAIT_RECY_ST_RESPONSE)) else if (JobRunStep.IsStep(RunStep.RECY_BACK_WAIT_RECY_ST_RESPONSE))
{ {
Node node = NodeManager.GetNodeByName(JobParam.TargetNode.Name); if (WarehouseSigManager.MayEnter)
if (node.StateEquals(NodeStatus.MayEnter))
{ {
{ {
JobRunStep.ToNextStep(RunStep.RECY_BACK_WAIT_SHELF_IN_RECY_ST); JobRunStep.ToNextStep(RunStep.RECY_BACK_WAIT_SHELF_IN_RECY_ST);
runInfo = "收到入料架请求的响应 " + JobParam.TargetNode + "入料架,小车链条运行"; runInfo = "收到治具入库请求的响应 " + JobParam.TargetNode + "入治具,小车链条运行";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.Leave); AllocateTask(agv, SettingString.Leave);
WarehouseSigManager.MayEnter = false;
} }
} }
...@@ -110,27 +111,111 @@ namespace DeviceLibrary ...@@ -110,27 +111,111 @@ namespace DeviceLibrary
if (tryTimes < 3) if (tryTimes < 3)
return this; return this;
tryTimes = 0; tryTimes = 0;
JobRunStep.ToNextStep(RunStep.RECY_BACK_WAIT_REACH_RECY_ST); runInfo = JobParam.TargetNode + "无响应";
runInfo = JobParam.TargetNode + "无响应,再次发送请求";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.Standby);
} }
} }
else if (JobRunStep.IsStep(RunStep.RECY_BACK_WAIT_SHELF_IN_RECY_ST)) else if (JobRunStep.IsStep(RunStep.RECY_BACK_WAIT_SHELF_IN_RECY_ST))
{ {
if (agv.TaskRunState.CheckTaskFinished(agv.Name)) if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{ {
JobRunStep.ToNextStep(RunStep.END); JobRunStep.ToNextStep(RunStep.RECY_BACK_CHECK_OUT_STORE);
runInfo = $"料架{(JobParam.Shelf == null ? "" : JobParam.Shelf.RFID)}进入{JobParam.TargetNode}完成"; runInfo = $"治具{(JobParam.Shelf == null ? "" : JobParam.Shelf.RFID)}进入{JobParam.TargetNode}完成";
JobRunStep.Msg = runInfo;
}
else if (WarehouseSigManager.StopEnter)
{
JobRunStep.ToNextStep(RunStep.RECY_BACK_CHECK_OUT_STORE);
runInfo = $"治具{(JobParam.Shelf == null ? "" : JobParam.Shelf.RFID)}进入{JobParam.TargetNode}完成";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.Init);
WarehouseSigManager.StopEnter = false;
} }
else if (JobRunStep.IsTimeOut(60000, out TimeSpan timeOutValue1)) else if (JobRunStep.IsTimeOut(60000, out TimeSpan timeOutValue1))
{ {
runInfo = "空料架在[" + JobParam.TargetNode + "]离开小车超时"; runInfo = "治具在[" + JobParam.TargetNode + "]离开小车超时";
agv.HasError = true; agv.HasError = true;
agv.SetErrorMsg("空料架在[" + JobParam.TargetNode + "]进入小车超时", timeOutValue1.TotalMinutes.ToString("f2")); agv.SetErrorMsg("治具在[" + JobParam.TargetNode + "]进入小车超时", timeOutValue1.TotalMinutes.ToString("f2"));
}
}
else if (JobRunStep.IsStep(RunStep.RECY_BACK_CHECK_OUT_STORE))
{
if (WarehouseSigManager.OutStore.Has)
{
//调宽
JobRunStep.ToNextStep(RunStep.ADJUST_WIDTH);
runInfo = JobParam.TargetNode + " 有出库任务,开始调宽";
JobRunStep.Msg = runInfo;
AdjustWidth(agv, JobParam.FixMissionInfo.Type);
} }
else if (OpManager.Info.GetTransfer(out string target))
{
JobRunStep.ToNextStep(RunStep.END);
runInfo = JobParam.TargetNode + " 无出库任务,任务结束";
JobRunStep.Msg = runInfo;
}
}
else if(JobRunStep.IsStep(RunStep.ADJUST_WIDTH))
{
if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{
JobRunStep.ToNextStep(RunStep.RECY_BACK_WAIT_RESPONSE);
runInfo = $"调宽完成";
JobRunStep.Msg = runInfo;
}
}
else if (JobRunStep.IsStep(RunStep.RECY_BACK_WAIT_RESPONSE))
{
if(WarehouseSigManager.MayLeave)
{
JobRunStep.ToNextStep(RunStep.RECY_BACK_WAIT_FIX_IN_AGV);
runInfo = "收到出料的响应 " + JobParam.TargetNode + "出治具,小车链条运行";
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.Enter);
}
}
else if(JobRunStep.IsStep(RunStep.RECY_BACK_WAIT_FIX_IN_AGV))
{
if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{
agv.HasError = false;
JobRunStep.ToNextStep(RunStep.RECY_BACK_WAIT_LEAVE_SIG);
runInfo ="治具进入AGV完成";
JobRunStep.Msg = runInfo;
}
else if (JobRunStep.IsTimeOut(60000, out TimeSpan timeOutValue))
{
//链条停止
runInfo = "治具在[" + JobParam.TargetNode.Name + "]进入小车超时";
//msg +=runInfo;
//GoFullShelfStationStep.Msg = msg;
agv.HasError = true;
agv.SetErrorMsg("治具在[" + JobParam.TargetNode.Name + "]进入小车超时", timeOutValue.TotalMinutes.ToString("f2"));
}
}
else if (JobRunStep.IsStep(RunStep.RECY_BACK_WAIT_LEAVE_SIG))
{
if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{
if (OpManager.Info.GetTransfer(out string target))
{
if(!target.Equals(SettingString.Cancel))
{
agv.HasError = false;
runInfo = $"收到离开信号,开始运送出库治具";
JobRunStep.Msg = runInfo;
return new SendFixToLineJob(new JobParam(JobParam.TargetNode, NodeManager.GetNodeByName(target)),true);
}
else
{
agv.HasError = true;
agv.SetErrorMsg("有出库任务,但返回目的地为Cancel",(DateTime.Now-StartJobTime).TotalMinutes.ToString("f2"));
}
}
}
} }
else if (JobRunStep.IsStep(RunStep.END)) else if (JobRunStep.IsStep(RunStep.END))
{ {
......
...@@ -6,16 +6,16 @@ using System; ...@@ -6,16 +6,16 @@ using System;
namespace DeviceLibrary namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 去空料架任务点 /// 去产线回收治具
/// </summary> /// </summary>
public class GoEmptyShelfLineJob : Job public class GoLineForRecyJob : Job
{ {
/// <summary> /// <summary>
/// 去空料架任务点 /// 去空料架任务点
/// </summary> /// </summary>
public GoEmptyShelfLineJob(JobParam jobParam) : base(jobParam) public GoLineForRecyJob(JobParam jobParam) : base(jobParam)
{ {
JobName = "料架回收任务"; JobName = "治具回收任务";
} }
/// <summary> /// <summary>
...@@ -27,68 +27,59 @@ namespace DeviceLibrary ...@@ -27,68 +27,59 @@ namespace DeviceLibrary
Node node = NodeManager.GetNodeByName(JobParam.TargetNode.Name); Node node = NodeManager.GetNodeByName(JobParam.TargetNode.Name);
if (JobRunStep.IsStep(RunStep.NONE)) if (JobRunStep.IsStep(RunStep.NONE))
{ {
if (JobParam.SrcNode.Area.Equals(Area.Air_C) && !JobParam.TargetNode.Area.Equals(Area.Air_C))//4C风淋门内->风淋门外 JobRunStep.ToNextStep(RunStep.ADJUST_WIDTH);
{ runInfo = "准备去" + JobParam.TargetNode + ",先调宽";
JobRunStep.ToNextStep(RunStep.WAIT_OUT_AIR_DOOR); JobRunStep.Msg = runInfo;
runInfo = "去" + JobParam.TargetNode + ",先过风淋门"; AdjustWidth(agv,JobParam.FixMissionInfo.Type);
JobRunStep.Msg = runInfo; }
AllocateTask(agv, SettingString.DoorAirOut); else if(JobRunStep.IsStep(RunStep.ADJUST_WIDTH))
} {
else if (!JobParam.SrcNode.Area.Equals(Area.Air_C) && JobParam.TargetNode.Area.Equals(Area.Air_C))//4C风淋门外->风淋门内 if(agv.TaskRunState.CheckTaskFinished(agv.Name))
{ {
if (JobParam.SrcNode.Area.Equals(Area.C) && !JobParam.TargetNode.Area.Equals(Area.C))//4C->4C if (JobParam.SrcNode.Area.Equals(Area.Air_C) && !JobParam.TargetNode.Area.Equals(Area.Air_C))//4C风淋门内->风淋门外
{ {
if (AGVManager.CheckRoomCTarget(agv, JobParam.TargetNode.Name))//被占用 JobRunStep.ToNextStep(RunStep.WAIT_OUT_AIR_DOOR);
{ runInfo = "去" + JobParam.TargetNode + ",先过风淋门";
JobRunStep.ToNextStep(RunStep.RECY_TO_WAIT_REACH_TEMP_PLACE);
runInfo = "目的地" + JobParam.TargetNode + "有小车占用,先到临时待机位";
JobRunStep.Msg = runInfo;
AGVManager.MoveToRoomCStandy(agv);
}
else
{
JobRunStep.ToNextStep(RunStep.WAIT_IN_AIR_DOOR);
runInfo = "去" + JobParam.TargetNode + ",先过风淋门";
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorAirIn);
}
}
else if ((JobParam.SrcNode.Area.Equals(Area.D)) && (JobParam.TargetNode.Area.Equals(Area.C)))//4D->4C
{
JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_C);
runInfo = "去" + JobParam.TargetNode + ",先过门";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorDToC); AllocateTask(agv, SettingString.DoorAirOut);
} }
} else if (!JobParam.SrcNode.Area.Equals(Area.Air_C) && JobParam.TargetNode.Area.Equals(Area.Air_C))//4C风淋门外->风淋门内
else//起始与目的地在风淋门同一侧
{
if (JobParam.SrcNode.Area.Equals(Area.Air_C) && JobParam.TargetNode.Equals(Area.Air_C))//都在风淋门内
{ {
if (AGVManager.CheckRoomCTarget(agv, JobParam.TargetNode.Name))//被占用 if (JobParam.SrcNode.Area.Equals(Area.C) && !JobParam.TargetNode.Area.Equals(Area.C))//4C->4C
{ {
JobRunStep.ToNextStep(RunStep.WAIT_OUT_AIR_DOOR); if (AGVManager.CheckRoomCTarget(agv, JobParam.TargetNode.Name))//被占用
runInfo = "目的地" + JobParam.TargetNode + "有小车占用,先过风淋门,再到临时待机位"; {
JobRunStep.Msg = runInfo; JobRunStep.ToNextStep(RunStep.RECY_TO_WAIT_REACH_TEMP_PLACE);
AllocateTask(agv, SettingString.DoorAirOut); runInfo = "目的地" + JobParam.TargetNode + "有小车占用,先到临时待机位";
JobRunStep.Msg = runInfo;
AGVManager.MoveToRoomCStandy(agv);
}
else
{
JobRunStep.ToNextStep(RunStep.WAIT_IN_AIR_DOOR);
runInfo = "去" + JobParam.TargetNode + ",先过风淋门";
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorAirIn);
}
} }
else else if ((JobParam.SrcNode.Area.Equals(Area.D)) && (JobParam.TargetNode.Area.Equals(Area.C)))//4D->4C
{ {
JobRunStep.ToNextStep(RunStep.RECY_TO_ASSIGN_AGV_TASK); JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_C);
runInfo = "开始回收任务"; runInfo = "去" + JobParam.TargetNode + ",先过门";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorDToC);
} }
} }
else if (!JobParam.SrcNode.Area.Equals(Area.Air_C) && !JobParam.TargetNode.Area.Equals(Area.Air_C))//都在风淋门外 else//起始与目的地在风淋门同一侧
{ {
if (JobParam.SrcNode.Area.Equals(Area.C) && JobParam.TargetNode.Area.Equals(Area.C))//4C->4C if (JobParam.SrcNode.Area.Equals(Area.Air_C) && JobParam.TargetNode.Equals(Area.Air_C))//都在风淋门内
{ {
if (AGVManager.CheckRoomCTarget(agv, JobParam.TargetNode.Name))//被占用 if (AGVManager.CheckRoomCTarget(agv, JobParam.TargetNode.Name))//被占用
{ {
JobRunStep.ToNextStep(RunStep.RECY_TO_WAIT_REACH_TEMP_PLACE); JobRunStep.ToNextStep(RunStep.WAIT_OUT_AIR_DOOR);
runInfo = "目的地" + JobParam.TargetNode + "有小车占用,先到临时待机位"; runInfo = "目的地" + JobParam.TargetNode + "有小车占用,先过风淋门,再到临时待机位";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AGVManager.MoveToRoomCStandy(agv); AllocateTask(agv, SettingString.DoorAirOut);
} }
else else
{ {
...@@ -97,31 +88,49 @@ namespace DeviceLibrary ...@@ -97,31 +88,49 @@ namespace DeviceLibrary
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
} }
} }
else if (JobParam.SrcNode.Area.Equals(Area.C) && JobParam.TargetNode.Area.Equals(Area.D))//4C->4D else if (!JobParam.SrcNode.Area.Equals(Area.Air_C) && !JobParam.TargetNode.Area.Equals(Area.Air_C))//都在风淋门外
{
JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_D);
runInfo = "去" + JobParam.TargetNode + ",先过门";
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorCToD);
}
else if (JobParam.SrcNode.Area.Equals(Area.D) && JobParam.TargetNode.Area.Equals(Area.C))//4D->4C
{ {
JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_C); if (JobParam.SrcNode.Area.Equals(Area.C) && JobParam.TargetNode.Area.Equals(Area.C))//4C->4C
runInfo = "去产线" + JobParam.TargetNode + ",先过门"; {
JobRunStep.Msg = runInfo; if (AGVManager.CheckRoomCTarget(agv, JobParam.TargetNode.Name))//被占用
AllocateTask(agv, SettingString.DoorDToC); {
} JobRunStep.ToNextStep(RunStep.RECY_TO_WAIT_REACH_TEMP_PLACE);
runInfo = "目的地" + JobParam.TargetNode + "有小车占用,先到临时待机位";
JobRunStep.Msg = runInfo;
AGVManager.MoveToRoomCStandy(agv);
}
else
{
JobRunStep.ToNextStep(RunStep.RECY_TO_ASSIGN_AGV_TASK);
runInfo = "开始回收任务";
JobRunStep.Msg = runInfo;
}
}
else if (JobParam.SrcNode.Area.Equals(Area.C) && JobParam.TargetNode.Area.Equals(Area.D))//4C->4D
{
JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_D);
runInfo = "去" + JobParam.TargetNode + ",先过门";
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorCToD);
}
else if (JobParam.SrcNode.Area.Equals(Area.D) && JobParam.TargetNode.Area.Equals(Area.C))//4D->4C
{
JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_C);
runInfo = "去产线" + JobParam.TargetNode + ",先过门";
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorDToC);
}
else//4D->4D else//4D->4D
{ {
JobRunStep.ToNextStep(RunStep.RECY_TO_ASSIGN_AGV_TASK); JobRunStep.ToNextStep(RunStep.RECY_TO_ASSIGN_AGV_TASK);
runInfo = "开始回收任务"; runInfo = "开始回收任务";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
}
} }
}
}
} }
} }
else if (JobRunStep.IsStep(RunStep.WAIT_OUT_AIR_DOOR)) else if (JobRunStep.IsStep(RunStep.WAIT_OUT_AIR_DOOR))
{ {
...@@ -230,7 +239,7 @@ namespace DeviceLibrary ...@@ -230,7 +239,7 @@ namespace DeviceLibrary
JobRunStep.ToNextStep(RunStep.RECY_TO_BACK_WAIT_AGV_START_TASK); JobRunStep.ToNextStep(RunStep.RECY_TO_BACK_WAIT_AGV_START_TASK);
runInfo = "移动到" + JobParam.TargetNode; runInfo = "移动到" + JobParam.TargetNode;
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv,JobParam.TargetNode.Name); AllocateTask(agv, JobParam.TargetNode.Name);
} }
else else
{ {
...@@ -249,6 +258,7 @@ namespace DeviceLibrary ...@@ -249,6 +258,7 @@ namespace DeviceLibrary
{ {
if (agv.TaskRunState.CheckTaskFinished(agv.Name)) if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{ {
WarehouseSigManager.TargetWithFix.CurPlace = JobParam.TargetNode.Name;
if (JobParam.OpType.Equals(OpType.ComToLine)) if (JobParam.OpType.Equals(OpType.ComToLine))
{ {
JobRunStep.ToNextStep(RunStep.RECY_TO_WAIT_LINE_RESPONSE); JobRunStep.ToNextStep(RunStep.RECY_TO_WAIT_LINE_RESPONSE);
...@@ -282,18 +292,28 @@ namespace DeviceLibrary ...@@ -282,18 +292,28 @@ namespace DeviceLibrary
runInfo = "人员在" + JobParam.TargetNode + "操作完成"; runInfo = "人员在" + JobParam.TargetNode + "操作完成";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
JobRunStep.EndJob(); JobRunStep.EndJob();
return new EmptyShelfBackJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy())); return new FixToInStoreJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy()));
} }
} }
} }
else if (JobParam.OpType.Equals(OpType.RequestAPI)) else if (JobParam.OpType.Equals(OpType.RequestAPI))
{ {
if (OpManager.Info.GetUnlock(JobParam.Shelf.RFID)) if (OpManager.Info.GetTransfer(out string target))
{ {
runInfo = "人员在" + JobParam.TargetNode + "操作完成"; if(target.Equals(SettingString.Cancel))
JobRunStep.Msg = runInfo; {
JobRunStep.EndJob(); JobRunStep.ToNextStep(RunStep.END);
return new EmptyShelfBackJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy())); runInfo = "到达" + JobParam.TargetNode + ",该任务被取消";
JobRunStep.Msg = runInfo;
}
else
{
runInfo = "人员在" + JobParam.TargetNode + "操作完成";
JobRunStep.Msg = runInfo;
JobRunStep.EndJob();
return new FixToInStoreJob(new JobParam(JobParam.TargetNode, NodeManager.GetNodeByName(target), JobParam.Shelf.ToCopy()));
}
} }
} }
else if (JobParam.OpType.Equals(OpType.MaulAndAPI)) else if (JobParam.OpType.Equals(OpType.MaulAndAPI))
...@@ -305,7 +325,7 @@ namespace DeviceLibrary ...@@ -305,7 +325,7 @@ namespace DeviceLibrary
runInfo = "人员在" + JobParam.TargetNode + "操作完成"; runInfo = "人员在" + JobParam.TargetNode + "操作完成";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
JobRunStep.EndJob(); JobRunStep.EndJob();
return new EmptyShelfBackJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy())); return new FixToInStoreJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy()));
} }
} }
} }
...@@ -324,7 +344,7 @@ namespace DeviceLibrary ...@@ -324,7 +344,7 @@ namespace DeviceLibrary
JobRunStep.ToNextStep(RunStep.RECY_TO_WAIT_TAKE_EMPTY_SHELF); JobRunStep.ToNextStep(RunStep.RECY_TO_WAIT_TAKE_EMPTY_SHELF);
runInfo = "收到线体对出料请求的响应," + JobParam.TargetNode + "出料架"; runInfo = "收到线体对出料请求的响应," + JobParam.TargetNode + "出料架";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv,SettingString.Enter); AllocateTask(agv, SettingString.Enter);
} }
else if (JobRunStep.IsTimeOut(15000, out TimeSpan timeOutValue)) else if (JobRunStep.IsTimeOut(15000, out TimeSpan timeOutValue))
...@@ -339,7 +359,7 @@ namespace DeviceLibrary ...@@ -339,7 +359,7 @@ namespace DeviceLibrary
{ {
agv.HasError = false; agv.HasError = false;
JobRunStep.EndJob(); JobRunStep.EndJob();
return new EmptyShelfBackJob(new JobParam(JobParam.TargetNode.ToCopy())); return new FixToInStoreJob(new JobParam(JobParam.TargetNode.ToCopy()));
} }
else if (JobRunStep.IsTimeOut(60000, out TimeSpan timeOutValue)) else if (JobRunStep.IsTimeOut(60000, out TimeSpan timeOutValue))
......
...@@ -6,16 +6,16 @@ using System; ...@@ -6,16 +6,16 @@ using System;
namespace DeviceLibrary namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 去云仓接满料 /// 去立库接出库的治具
/// </summary> /// </summary>
public class GoFullShelfStationJob : Job public class GoWarehouseForOutStoreJob : Job
{ {
/// <summary> /// <summary>
/// 去云仓接满料 /// 去云仓接满料
/// </summary> /// </summary>
public GoFullShelfStationJob(JobParam jobParam) : base(jobParam) public GoWarehouseForOutStoreJob(JobParam jobParam) : base(jobParam)
{ {
JobName = "接满料任务"; JobName = "出库任务";
} }
bool IsLoadOnAGV = false; bool IsLoadOnAGV = false;
...@@ -24,10 +24,20 @@ namespace DeviceLibrary ...@@ -24,10 +24,20 @@ namespace DeviceLibrary
if (JobRunStep.IsStep(RunStep.NONE)) if (JobRunStep.IsStep(RunStep.NONE))
{ {
JobRunStep.ToNextStep(RunStep.WAIT_CHECK_RESULT); JobRunStep.ToNextStep(RunStep.ADJUST_WIDTH);
runInfo = "检查AGV负载情况"; runInfo = "准备去" + JobParam.TargetNode + ",先调宽";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.CheckShelf); AdjustWidth(agv, JobParam.FixMissionInfo.Type);
}
else if(JobRunStep.IsStep(RunStep.ADJUST_WIDTH))
{
if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{
JobRunStep.ToNextStep(RunStep.WAIT_CHECK_RESULT);
runInfo = "检查AGV负载情况";
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.CheckShelf);
}
} }
else if (JobRunStep.IsStep(RunStep.WAIT_CHECK_RESULT)) else if (JobRunStep.IsStep(RunStep.WAIT_CHECK_RESULT))
{ {
...@@ -36,7 +46,7 @@ namespace DeviceLibrary ...@@ -36,7 +46,7 @@ namespace DeviceLibrary
if (agv.IsExistShelf) if (agv.IsExistShelf)
{ {
JobRunStep.ToNextStep(RunStep.END); JobRunStep.ToNextStep(RunStep.END);
runInfo = "车上有料架,无法接送满料任务"; runInfo = "车上有负载,无法运行出库任务";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
IsLoadOnAGV = true; IsLoadOnAGV = true;
} }
...@@ -101,8 +111,9 @@ namespace DeviceLibrary ...@@ -101,8 +111,9 @@ namespace DeviceLibrary
{ {
if (agv.TaskRunState.CheckTaskFinished(agv.Name)) if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{ {
WarehouseSigManager.TargetWithFix.CurPlace = JobParam.TargetNode.Name;
JobRunStep.ToNextStep(RunStep.WAIT_DOUBLE_LINE_RESPONSE); JobRunStep.ToNextStep(RunStep.WAIT_DOUBLE_LINE_RESPONSE);
runInfo = "到达 " + JobParam.TargetNode.Name + ",并发送出料架请求"; runInfo = "到达 " + JobParam.TargetNode.Name + ",并发送出请求";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
OpManager.ServerToClient.ReadyLeave(JobParam.TargetNode.Name, JobParam.Shelf == null ? "" : JobParam.Shelf.RFID); OpManager.ServerToClient.ReadyLeave(JobParam.TargetNode.Name, JobParam.Shelf == null ? "" : JobParam.Shelf.RFID);
...@@ -110,20 +121,21 @@ namespace DeviceLibrary ...@@ -110,20 +121,21 @@ namespace DeviceLibrary
} }
else if (JobRunStep.IsStep(RunStep.WAIT_DOUBLE_LINE_RESPONSE)) else if (JobRunStep.IsStep(RunStep.WAIT_DOUBLE_LINE_RESPONSE))
{ {
Node node = NodeManager.GetNodeByName(JobParam.TargetNode.Name); //Node node = NodeManager.GetNodeByName(JobParam.TargetNode.Name);
if (node == null) //if (node == null)
{ //{
runInfo = "未找到节点:" + JobParam.TargetNode.Name; // runInfo = "未找到节点:" + JobParam.TargetNode.Name;
JobRunStep.Msg = runInfo; // JobRunStep.Msg = runInfo;
return this; // return this;
} //}
if (node.StateEquals(NodeStatus.MayLeave)) if (WarehouseSigManager.MayLeave)
{ {
agv.HasError = false; agv.HasError = false;
JobRunStep.ToNextStep(RunStep.WAIT__FULL_SHELF_IN_AGV); JobRunStep.ToNextStep(RunStep.WAIT__FULL_SHELF_IN_AGV);
runInfo = "收到出料架请求的响应," + JobParam.TargetNode.Name + "出料架"; runInfo = "收到出库请求的响应," + JobParam.TargetNode.Name + "出治具";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.Enter); AllocateTask(agv, SettingString.Enter);
WarehouseSigManager.MayLeave = false;
} }
else if (JobRunStep.IsTimeOut(15000, out TimeSpan timeOutValue)) else if (JobRunStep.IsTimeOut(15000, out TimeSpan timeOutValue))
...@@ -141,22 +153,40 @@ namespace DeviceLibrary ...@@ -141,22 +153,40 @@ namespace DeviceLibrary
{ {
agv.HasError = false; agv.HasError = false;
//GoFullShelfStationStep.ToNextStep(RunStep.END); //GoFullShelfStationStep.ToNextStep(RunStep.END);
runInfo = JobParam.TargetNode.Name + "料架进入小车完成"; runInfo = JobParam.TargetNode.Name + "治具进入小车完成";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
JobRunStep.EndJob(); JobRunStep.EndJob();
return new SendFullShelfToLineJob(new JobParam(JobParam.TargetNode.ToCopy())); return new SendFixToLineJob(new JobParam(JobParam.TargetNode.ToCopy()),true);
} }
else if (JobRunStep.IsTimeOut(60000, out TimeSpan timeOutValue)) else if (JobRunStep.IsTimeOut(60000, out TimeSpan timeOutValue))
{ {
//链条停止 //链条停止
runInfo = "满料架在[" + JobParam.TargetNode.Name + "]进入小车超时"; runInfo = "治具在[" + JobParam.TargetNode.Name + "]进入小车超时";
//msg +=runInfo; //msg +=runInfo;
//GoFullShelfStationStep.Msg = msg; //GoFullShelfStationStep.Msg = msg;
agv.HasError = true; agv.HasError = true;
agv.SetErrorMsg("满料架在[" + JobParam.TargetNode.Name + "]进入小车超时", timeOutValue.TotalMinutes.ToString("f2")); agv.SetErrorMsg("治具在[" + JobParam.TargetNode.Name + "]进入小车超时", timeOutValue.TotalMinutes.ToString("f2"));
} }
} }
else if(JobRunStep.IsStep(RunStep.WAIT_LEAVE_SIG))
{
if (OpManager.Info.GetTransfer(out string target))
{
if (!target.Equals(SettingString.Cancel))
{
agv.HasError = false;
runInfo = $"收到离开信号,开始运送出库治具";
JobRunStep.Msg = runInfo;
return new SendFixToLineJob(new JobParam(JobParam.TargetNode, NodeManager.GetNodeByName(target)), true);
}
else
{
agv.HasError = true;
agv.SetErrorMsg("有出库任务,但返回目的地为Cancel", (DateTime.Now - StartJobTime).TotalMinutes.ToString("f2"));
}
}
}
else if(JobRunStep.IsStep(RunStep.END)) else if(JobRunStep.IsStep(RunStep.END))
{ {
JobRunStep.EndJob(); JobRunStep.EndJob();
......
using Common; using Common;
using DeviceLibrary.bean; using DeviceLibrary.bean;
using DeviceLibrary.manager;
using System; using System;
namespace DeviceLibrary namespace DeviceLibrary
{ {
public abstract class Job public abstract class Job
{ {
public Job(JobParam jobParam) { JobParam = jobParam; } public Job(JobParam jobParam) {
JobParam = jobParam;
WarehouseSigManager.Reset();
}
public JobParam JobParam { get; private set; } public JobParam JobParam { get; private set; }
public JobStep<RunStep> JobRunStep = new JobStep<RunStep>(RunStep.NONE); public JobStep<RunStep> JobRunStep = new JobStep<RunStep>(RunStep.NONE);
...@@ -17,11 +21,12 @@ namespace DeviceLibrary ...@@ -17,11 +21,12 @@ namespace DeviceLibrary
/// <summary> /// <summary>
/// 运行信息 /// 运行信息
/// </summary> /// </summary>
public string RunInfo { get { return $"{JobName}{TaskStateInfo}:{runInfo}"; } } public string RunInfo { get { return $"{JobName}{TaskStateInfo}{FixInfo}:{runInfo}"; } }
/// <summary> /// <summary>
/// agv任务状态信息 /// agv任务状态信息
/// </summary> /// </summary>
public string TaskStateInfo = ""; public string TaskStateInfo = "";
public string FixInfo = "";
public string runInfo = ""; public string runInfo = "";
/// <summary> /// <summary>
/// 根据任务状态继续执行任务 /// 根据任务状态继续执行任务
...@@ -41,6 +46,7 @@ namespace DeviceLibrary ...@@ -41,6 +46,7 @@ namespace DeviceLibrary
{ {
JobRunStep.StepRunInfo.SetInfo(agv.Name.PadLeft(4, '0'), JobName, agv.Place.AliceName, JobRunStep.CurStep(), runInfo, StartJobTime, DateTime.Now); JobRunStep.StepRunInfo.SetInfo(agv.Name.PadLeft(4, '0'), JobName, agv.Place.AliceName, JobRunStep.CurStep(), runInfo, StartJobTime, DateTime.Now);
TaskStateInfo = agv.TaskRunState.ToTaskInfo(); TaskStateInfo = agv.TaskRunState.ToTaskInfo();
FixInfo = JobParam.FixMissionInfo != null ? JobParam.FixMissionInfo.ToTxt():"";
StartJobTime = JobRunStep.startTime; StartJobTime = JobRunStep.startTime;
} }
/// <summary> /// <summary>
...@@ -57,6 +63,17 @@ namespace DeviceLibrary ...@@ -57,6 +63,17 @@ namespace DeviceLibrary
Task = AgvTaskManager.GetTaskByName(taskName); Task = AgvTaskManager.GetTaskByName(taskName);
AgvTaskManager.AssignMission(agv, taskName); AgvTaskManager.AssignMission(agv, taskName);
} }
protected void AdjustWidth(Agv_Info agv,manager.FixType fixType)
{
int val = (int)fixType;
int times = 0;
while(!MiR_API.Set_Register(agv, 50, val))
{
if (times > 5)
break;
}
AllocateTask(agv, SettingString.Adjust);
}
/// <summary> /// <summary>
/// 任务重发 /// 任务重发
/// </summary> /// </summary>
......
...@@ -6,37 +6,70 @@ using System; ...@@ -6,37 +6,70 @@ using System;
namespace DeviceLibrary namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 从云仓向线体运送料任务 /// 将治具送往产线
/// </summary> /// </summary>
public class SendFullShelfToLineJob : Job public class SendFixToLineJob : Job
{ {
/// <summary> /// <summary>
/// 从云仓向线体运送料任务 /// 送治具任务
/// </summary> /// </summary>
public SendFullShelfToLineJob(JobParam jobParam) : base(jobParam) public SendFixToLineJob(JobParam jobParam, bool adjustWidth = true) : base(jobParam)
{ {
JobName = "送满料任务"; JobName = "送治具任务";
jobParam.OpType = OpType.Mannual; jobParam.OpType = OpType.Mannual;
this.adjustWidth = adjustWidth;
} }
bool adjustWidth = false;
public override Job Run(Agv_Info agv) public override Job Run(Agv_Info agv)
{ {
if (JobRunStep.IsStep(RunStep.NONE)) if (JobRunStep.IsStep(RunStep.NONE))
{ {
OpManager.ClientToSMDServer.RemoveRfidBufInfo(JobParam.Shelf.RFID); if (adjustWidth)
if (JobParam.TargetNode.Area.Equals(Area.C) || JobParam.TargetNode.Area.Equals(Area.Air_C))
{ {
JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_C); OpManager.ClientToSMDServer.RemoveRfidBufInfo(JobParam.Shelf.RFID);
runInfo = string.Format("前往{0},先过门", JobParam.TargetNode); if (JobParam.TargetNode.Area.Equals(Area.C) || JobParam.TargetNode.Area.Equals(Area.Air_C))
JobRunStep.Msg = runInfo; {
AllocateTask(agv, SettingString.DoorDToC); JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_C);
runInfo = string.Format("前往{0},先过门", JobParam.TargetNode);
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorDToC);
}
else
{
JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE);
runInfo = string.Format("前往{0},先过门", JobParam.TargetNode);
JobRunStep.Msg = runInfo;
AllocateTask(agv, JobParam.TargetNode.Name);
}
} }
else else
{ {
JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE); JobRunStep.ToNextStep(RunStep.ADJUST_WIDTH);
runInfo = string.Format("前往{0},先过门", JobParam.TargetNode); runInfo = "准备去" + JobParam.TargetNode + ",先调宽";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, JobParam.TargetNode.Name); AdjustWidth(agv, JobParam.FixMissionInfo.Type);
}
}
else if (JobRunStep.IsStep(RunStep.ADJUST_WIDTH))
{
if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{
OpManager.ClientToSMDServer.RemoveRfidBufInfo(JobParam.Shelf.RFID);
if (JobParam.TargetNode.Area.Equals(Area.C) || JobParam.TargetNode.Area.Equals(Area.Air_C))
{
JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_C);
runInfo = string.Format("前往{0},先过门", JobParam.TargetNode);
JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorDToC);
}
else
{
JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE);
runInfo = string.Format("前往{0},先过门", JobParam.TargetNode);
JobRunStep.Msg = runInfo;
AllocateTask(agv, JobParam.TargetNode.Name);
}
} }
} }
...@@ -58,14 +91,14 @@ namespace DeviceLibrary ...@@ -58,14 +91,14 @@ namespace DeviceLibrary
JobRunStep.ToNextStep(RunStep.WAIT_IN_AIR_DOOR); JobRunStep.ToNextStep(RunStep.WAIT_IN_AIR_DOOR);
runInfo = "过风淋门,去" + JobParam.TargetNode; runInfo = "过风淋门,去" + JobParam.TargetNode;
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorAirIn); AllocateTask(agv, SettingString.DoorAirIn);
} }
else else
{ {
JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE); JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE);
runInfo = "送往" + JobParam.TargetNode; runInfo = "送往" + JobParam.TargetNode;
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, JobParam.TargetNode.Name); AllocateTask(agv, JobParam.TargetNode.Name);
} }
} }
...@@ -78,7 +111,7 @@ namespace DeviceLibrary ...@@ -78,7 +111,7 @@ namespace DeviceLibrary
JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE); JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE);
runInfo = "送往" + JobParam.TargetNode; runInfo = "送往" + JobParam.TargetNode;
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, JobParam.TargetNode.Name); AllocateTask(agv, JobParam.TargetNode.Name);
} }
} }
else if (JobRunStep.IsStep(RunStep.SF_WAIT_REACH_TEMP_PLACE)) else if (JobRunStep.IsStep(RunStep.SF_WAIT_REACH_TEMP_PLACE))
...@@ -92,14 +125,14 @@ namespace DeviceLibrary ...@@ -92,14 +125,14 @@ namespace DeviceLibrary
JobRunStep.ToNextStep(RunStep.WAIT_IN_AIR_DOOR); JobRunStep.ToNextStep(RunStep.WAIT_IN_AIR_DOOR);
runInfo = "到临时待机位,先过风淋门,去" + JobParam.TargetNode; runInfo = "到临时待机位,先过风淋门,去" + JobParam.TargetNode;
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorAirIn); AllocateTask(agv, SettingString.DoorAirIn);
} }
else else
{ {
JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE); JobRunStep.ToNextStep(RunStep.SF_WAIT_AGV_REACH_LINE);
runInfo = "从临时待机位送往" + JobParam.TargetNode; runInfo = "从临时待机位送往" + JobParam.TargetNode;
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, JobParam.TargetNode.Name); AllocateTask(agv, JobParam.TargetNode.Name);
} }
} }
} }
...@@ -136,7 +169,7 @@ namespace DeviceLibrary ...@@ -136,7 +169,7 @@ namespace DeviceLibrary
runInfo = "人员在" + JobParam.TargetNode + "操作完成"; runInfo = "人员在" + JobParam.TargetNode + "操作完成";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
JobRunStep.EndJob(); JobRunStep.EndJob();
return new EmptyShelfBackJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy())); return new EmptyAGVBackJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy()));
} }
} }
} }
...@@ -147,7 +180,7 @@ namespace DeviceLibrary ...@@ -147,7 +180,7 @@ namespace DeviceLibrary
runInfo = "人员在" + JobParam.TargetNode + "操作完成"; runInfo = "人员在" + JobParam.TargetNode + "操作完成";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
JobRunStep.EndJob(); JobRunStep.EndJob();
return new EmptyShelfBackJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy())); return new FixToInStoreJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy()));
} }
} }
else if (JobParam.OpType.Equals(OpType.MaulAndAPI)) else if (JobParam.OpType.Equals(OpType.MaulAndAPI))
...@@ -159,7 +192,7 @@ namespace DeviceLibrary ...@@ -159,7 +192,7 @@ namespace DeviceLibrary
runInfo = "人员在" + JobParam.TargetNode + "操作完成"; runInfo = "人员在" + JobParam.TargetNode + "操作完成";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
JobRunStep.EndJob(); JobRunStep.EndJob();
return new EmptyShelfBackJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy())); return new FixToInStoreJob(new JobParam(JobParam.TargetNode, null, JobParam.Shelf.ToCopy()));
} }
} }
} }
...@@ -173,7 +206,7 @@ namespace DeviceLibrary ...@@ -173,7 +206,7 @@ namespace DeviceLibrary
JobRunStep.ToNextStep(RunStep.SF_WAIT__SHELF_IN_LINE); JobRunStep.ToNextStep(RunStep.SF_WAIT__SHELF_IN_LINE);
runInfo = "收到入料架请求的响应" + JobParam.TargetNode + "入料架"; runInfo = "收到入料架请求的响应" + JobParam.TargetNode + "入料架";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.Leave); AllocateTask(agv, SettingString.Leave);
} }
else if (JobRunStep.IsTimeOut(15000, out TimeSpan timeOutValue)) else if (JobRunStep.IsTimeOut(15000, out TimeSpan timeOutValue))
...@@ -209,7 +242,7 @@ namespace DeviceLibrary ...@@ -209,7 +242,7 @@ namespace DeviceLibrary
} }
else if (JobRunStep.IsStep(RunStep.END)) else if (JobRunStep.IsStep(RunStep.END))
{ {
return null;
} }
return this; return this;
} }
......
...@@ -20,7 +20,7 @@ namespace DeviceLibrary ...@@ -20,7 +20,7 @@ namespace DeviceLibrary
int BatteryMin = ChargePileManager.GetChargePiles().BatteryMin; int BatteryMin = ChargePileManager.GetChargePiles().BatteryMin;
int BatteryMid = ChargePileManager.GetChargePiles().BatteryMiddle; int BatteryMid = ChargePileManager.GetChargePiles().BatteryMiddle;
/// <summary> /// <summary>
/// 空车返回执行 /// 待机任务
/// </summary> /// </summary>
/// <param name="agv"></param> /// <param name="agv"></param>
public override Job Run(Agv_Info agv) public override Job Run(Agv_Info agv)
...@@ -31,7 +31,7 @@ namespace DeviceLibrary ...@@ -31,7 +31,7 @@ namespace DeviceLibrary
if (JobParam.SrcNode.Area.Equals(Area.Air_C)) if (JobParam.SrcNode.Area.Equals(Area.Air_C))
{ {
JobRunStep.ToNextStep(RunStep.WAIT_OUT_AIR_DOOR); JobRunStep.ToNextStep(RunStep.WAIT_OUT_AIR_DOOR);
runInfo = string.Format("电量{0}%小于最大电量{1}%,从{2}回到待机位,先过风淋门", agv.Battery, BatteryMax, JobParam.SrcNode.Name); runInfo = string.Format("从{2}回到待机位,先过风淋门", agv.Battery, BatteryMax, JobParam.SrcNode.Name);
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorAirOut); AllocateTask(agv, SettingString.DoorAirOut);
...@@ -39,7 +39,7 @@ namespace DeviceLibrary ...@@ -39,7 +39,7 @@ namespace DeviceLibrary
else if (JobParam.SrcNode.Area.Equals(Area.C)) else if (JobParam.SrcNode.Area.Equals(Area.C))
{ {
JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_D); JobRunStep.ToNextStep(RunStep.WAIT_IN_ROOM_D);
runInfo = string.Format("电量{0}%小于最大电量{1}%,从{2}回到待机位,先过门", agv.Battery, BatteryMax, JobParam.SrcNode.Name); runInfo = string.Format("从{2}回到待机位,先过门", agv.Battery, BatteryMax, JobParam.SrcNode.Name);
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.DoorCToD); AllocateTask(agv, SettingString.DoorCToD);
...@@ -69,7 +69,7 @@ namespace DeviceLibrary ...@@ -69,7 +69,7 @@ namespace DeviceLibrary
if (agv.TaskRunState.CheckTaskFinished(agv.Name)) if (agv.TaskRunState.CheckTaskFinished(agv.Name))
{ {
JobRunStep.ToNextStep(RunStep.STANDBY_WAIT_REACH_STANDBY); JobRunStep.ToNextStep(RunStep.STANDBY_WAIT_REACH_STANDBY);
runInfo = "充电桩有小车,从" + JobParam.SrcNode + "回到待机位"; runInfo = "从" + JobParam.SrcNode + "回到待机位";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.Standby); AllocateTask(agv, SettingString.Standby);
} }
......
...@@ -4,7 +4,6 @@ using System.Collections.Generic; ...@@ -4,7 +4,6 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using DeviceLibrary.manager; using DeviceLibrary.manager;
using DeviceLibrary.bean; using DeviceLibrary.bean;
using DeviceLibrary.manager;
namespace DeviceLibrary namespace DeviceLibrary
{ {
...@@ -21,23 +20,23 @@ namespace DeviceLibrary ...@@ -21,23 +20,23 @@ namespace DeviceLibrary
/// <returns></returns> /// <returns></returns>
public override Job GetNewJob(Agv_Info agv) public override Job GetNewJob(Agv_Info agv)
{ {
//if (!agv.IsIdle()) if (!agv.IsIdle())
// return null; return null;
if(FixMissionManager.HasNext()) if (FixMissionManager.HasNext())
{ {
MissionInfo fixMissionInfo= manager.FixMissionManager.ExecuteMission(); MissionInfo fixMissionInfo= manager.FixMissionManager.ExecuteMission();
JobParam jobParam = new JobParam(agv.Place); JobParam jobParam = new JobParam(agv.Place);
jobParam.FixMissionInfo = fixMissionInfo; jobParam.FixMissionInfo = fixMissionInfo;
jobParam.SrcNode = agv.Place; jobParam.SrcNode = agv.Place;
jobParam.TargetNode = NodeManager.GetNodeByName(fixMissionInfo.Name); jobParam.TargetNode = NodeManager.GetNodeByName(fixMissionInfo.Target);
if (fixMissionInfo.MissionType.Equals(MissionType.Line)) if (fixMissionInfo.MissionType.Equals(MissionType.Line))
{ {
jobParam.OpType = OpType.Mannual; jobParam.OpType = OpType.RequestAPI;
return new GoEmptyShelfLineJob(jobParam); return new GoLineForRecyJob(jobParam);
} }
else if(fixMissionInfo.MissionType.Equals(MissionType.Warehouse)) else if(fixMissionInfo.MissionType.Equals(MissionType.Warehouse))
{ {
return new GoFullShelfStationJob(jobParam); return new GoWarehouseForOutStoreJob(jobParam);
} }
} }
return null; return null;
......
...@@ -88,9 +88,12 @@ namespace DeviceLibrary ...@@ -88,9 +88,12 @@ namespace DeviceLibrary
{ {
bool rtn = false; bool rtn = false;
AgvTask task = GetTaskByName(taskname); AgvTask task = GetTaskByName(taskname);
Node node = manager.NodeManager.GetNodeByName(taskname);
if (task !=null) if (task !=null)
{ {
agv.TaskRunState.Task = task; agv.TaskRunState.Task = task;
if (node != null)
agv.Place = node;
if (!agv.IsCon) if (!agv.IsCon)
{ {
agv.TaskRunState.ResetInfo(); agv.TaskRunState.ResetInfo();
......
...@@ -88,6 +88,7 @@ namespace DeviceLibrary ...@@ -88,6 +88,7 @@ namespace DeviceLibrary
if(agv.Equals(item.OccupiedAgv)) if(agv.Equals(item.OccupiedAgv))
{ {
item.DelOccupy(agv); item.DelOccupy(agv);
agv.IsInCharge = false;
return; return;
} }
} }
......
...@@ -51,6 +51,16 @@ namespace DeviceLibrary ...@@ -51,6 +51,16 @@ namespace DeviceLibrary
{ {
return HttpManager.GetRackBy(rfid, out string lineName); return HttpManager.GetRackBy(rfid, out string lineName);
} }
public static bool GetTransfer(out string target)
{
target = "";
if (!string.IsNullOrEmpty(manager.WarehouseSigManager.TargetWithFix.Target))
{
target= manager.WarehouseSigManager.TargetWithFix.Target;
return true;
}
return false;
}
public static bool UpdateShelfStatus(string rfid,string place) public static bool UpdateShelfStatus(string rfid,string place)
{ {
return true; return true;
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeviceLibrary.manager
{
public class WarehouseSigManager
{
public static bool MayEnter =false;
public static bool MayLeave =false;
public static bool StopEnter = false;
public static TargetWithFix TargetWithFix = new TargetWithFix();
public static OutStore OutStore = new OutStore();
public static void Reset()
{
MayEnter = false;
MayLeave = false;
StopEnter = false;
TargetWithFix.Reset();
OutStore.Reset();
}
}
/// <summary>
/// 运送目的地
/// </summary>
public class TargetWithFix
{
/// <summary>
/// 呼叫地
/// </summary>
public string Name { get; set; }
/// <summary>
/// 目的地
/// </summary>
public string Target { get; set; }
public string CurPlace { get; set; } = "";
public void Set(string name,string target)
{
Name = name;
Target = target;
}
public void Reset()
{
Name = "";
Target = "";
CurPlace = "";
}
}
public class FixInfoOnAGV
{
public FixType Type { get; private set; }
public bool HasLoad { get;private set; }
public void Set(FixType fixType,bool hasload)
{
Type = fixType;
HasLoad = hasload;
}
public void Reset()
{
Type = FixType.None;
HasLoad = false;
}
}
public class OutStore
{
public bool Has { get; set; }
public FixType Type { get; set; }
public void Set(bool has,FixType fixType)
{
Has = has;
Type = fixType;
}
public void Reset()
{
Has = false;
Type = FixType.None;
}
}
}
;
\ No newline at end of file \ No newline at end of file
...@@ -6,30 +6,66 @@ using System.IO; ...@@ -6,30 +6,66 @@ using System.IO;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Common; using Common;
using DeviceLibrary.manager; using DeviceLibrary.manager;
using DeviceLibrary.manager;
namespace DeviceLibrary namespace DeviceLibrary
{ {
[ServiceContract(Name = "FixtureServices")] [ServiceContract(Name = "FixtureServices")]
internal interface IWebService internal interface IFixtureService
{ {
[OperationContract] [OperationContract]
[WebInvoke(UriTemplate = "warehouse", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)] [WebInvoke(UriTemplate = "call", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string WarehouseRequestByPost(Stream stream); string CallByPost(Stream stream);
[OperationContract]
[WebInvoke(UriTemplate = "call?target={target}&type={type}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string CallByGet(string target, int type);
[OperationContract]
[WebInvoke(UriTemplate = "transfer", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string TransferByPost(Stream stream);
[OperationContract]
[WebInvoke(UriTemplate = "transfer?name={name}&target={target}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string TransferByGet(string name, string target);
[OperationContract]
[WebInvoke(UriTemplate = "getType", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string GetTypeByPost();
[OperationContract]
[WebInvoke(UriTemplate = "getType", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string GetTypeByGet();
[OperationContract]
[WebInvoke(UriTemplate = "mayEnter", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string MayEnterByPost(Stream stream);
[OperationContract]
[WebInvoke(UriTemplate = "mayEnter?allow={allow}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string MayEnterByGet(bool allow);
[OperationContract]
[WebInvoke(UriTemplate = "stopEnter", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string StopEnterByPost(Stream stream);
[OperationContract]
[WebInvoke(UriTemplate = "stopEnter?allow={allow}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string StopEnterByGet(bool allow);
[OperationContract]
[WebInvoke(UriTemplate = "outStore", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string OutStoreByPost(Stream stream);
[OperationContract] [OperationContract]
[WebInvoke(UriTemplate = "warehouse?name={name}&targetline={targetline}&type={type}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)] [WebInvoke(UriTemplate = "outStore?has={has}&type={type}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string WarehouseRequestByGet(string name, string targetline,int type); string OutStoreByGet(bool has, int type);
[OperationContract] [OperationContract]
[WebInvoke(UriTemplate = "line", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)] [WebInvoke(UriTemplate = "mayLeave", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string LineRequestByPost(Stream stream); string MayLeaveByPost(Stream stream);
[OperationContract] [OperationContract]
[WebInvoke(UriTemplate = "line?name={name}&targetwarehouse={targetwarehouse}&type={type}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)] [WebInvoke(UriTemplate = "mayLeave?allow={allow}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
string LineRequestByGet(string name, string targetwarehouse, int type); string MayLeaveByGet(bool allow);
} }
[DataContract] [DataContract]
internal class Result internal class Result1
{ {
/// <summary> /// <summary>
/// 呼叫成功;false:呼叫失败 /// 呼叫成功;false:呼叫失败
...@@ -49,157 +85,311 @@ namespace DeviceLibrary ...@@ -49,157 +85,311 @@ namespace DeviceLibrary
} }
[DataContract]
internal class Result2
{
[DataMember]
public bool Succeed { get; set; }
[DataMember]
public int Type { get; set; }
[DataMember]
public bool HasLoad { get; set; }
}
[DataContract]
internal class FixInfo
{
[DataMember]
public bool Succeed { get; set; }
[DataMember]
public FixType Type { get; set; }
[DataMember]
public bool HasLoad { get; set; }
}
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single, IncludeExceptionDetailInFaults = true)] [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single, IncludeExceptionDetailInFaults = true)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
internal class ClsWebService : IWebService internal class FixtureWebService : IFixtureService
{ {
static log4net.ILog Log = log4net.LogManager.GetLogger("FixtureServices"); static log4net.ILog Log = log4net.LogManager.GetLogger("FixtureServices");
public string LineRequestByGet(string name, string targetwarehouse, int type) #region 呼叫
public string CallByGet(string target, int type)
{ {
Result res; Result1 res;
name = name.ToUpper(); MissionInfo missionInfo;
targetwarehouse = SettingString .Warehouse; if (SettingString.Warehouse.Equals(target))
manager.MissionInfo missionInfo = new manager.MissionInfo(name, (manager.FixType)type, targetwarehouse, manager.MissionType.Line);
if (!NodeManager.HasNode(name))
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetwarehouse},type:{type}", Msg = $"节点名{name}不存在" }; missionInfo = new MissionInfo(target, (FixType)type, MissionType.Warehouse);
Log.Error("产线呼叫任务失败[GET](节点不存在):" + missionInfo.ToString());
} }
else if(!NodeManager.HasNode(targetwarehouse)) else
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetwarehouse},type:{type}", Msg = $"节点名{targetwarehouse}不存在" }; missionInfo = new MissionInfo(target, (FixType)type, MissionType.Line);
Log.Error("产线呼叫任务失败[GET](节点不存在):" + missionInfo.ToString()); }
if (!NodeManager.HasNode(target))
{
res = new Result1() { Succeed = false, Data = $"target:{target},type:{type}", Msg = $"节点名{target}不存在" };
Log.Error("呼叫失败[GET](节点不存在):" + missionInfo.ToString());
} }
else else
{ {
if (!FixMissionManager.Contains(missionInfo)) if (!FixMissionManager.Contains(missionInfo))
{ {
FixMissionManager.Add(missionInfo); FixMissionManager.Add(missionInfo);
res = new Result() { Succeed = true, Data = $"name:{name},targetwarehouse:{targetwarehouse},type:{type}", Msg = "" }; res = new Result1() { Succeed = true, Data = $"target:{target},type:{type}", Msg = "" };
Log.Info("产线呼叫任务成功[GET]:" + missionInfo.ToString()); Log.Info("呼叫成功[GET]:" + missionInfo.ToString());
} }
else else
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetwarehouse},type:{type}", Msg = "该任务已存在" }; res = new Result1() { Succeed = false, Data = $"target:{target},type:{type}", Msg = $"目的地{target}任务已存在,无法添加重复任务" };
Log.Error("产线呼叫任务失败[GET](已存在相同任务):" + missionInfo.ToString()); Log.Error("呼叫失败[GET](已存在相同任务):" + missionInfo.ToString());
} }
} }
return JsonHelper.SerializeObject(res); return JsonHelper.SerializeObject(res);
} }
public string LineRequestByPost(Stream stream) public string CallByPost(Stream stream)
{ {
Result res; Result1 res;
StreamReader sr = new StreamReader(stream); StreamReader sr = new StreamReader(stream);
string s = sr.ReadToEnd(); string s = sr.ReadToEnd();
System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s); System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s);
string name = nvc["name"].ToUpper(); string target = nvc["target"];
string targetwarehouse = SettingString.Warehouse;//nvc["targetwarehouse"].ToUpper();
int type = int.Parse(nvc["type"]); int type = int.Parse(nvc["type"]);
manager.MissionInfo missionInfo = new manager.MissionInfo(name, (manager.FixType)type, targetwarehouse, manager.MissionType.Line); MissionInfo missionInfo;
if (!NodeManager.HasNode(name)) if (SettingString.Warehouse.Equals(target))
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetwarehouse},type:{type}", Msg = $"节点名{name}不存在" }; missionInfo = new MissionInfo(target, (FixType)type, MissionType.Warehouse);
Log.Error("产线呼叫任务失败[POST](节点不存在):" + missionInfo.ToString());
} }
else if (!NodeManager.HasNode(targetwarehouse)) else
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetwarehouse},type:{type}", Msg = $"节点名{targetwarehouse}不存在" }; missionInfo = new MissionInfo(target, (FixType)type, MissionType.Line);
Log.Error("产线呼叫任务失败[POST](节点不存在):" + missionInfo.ToString()); }
if (!NodeManager.HasNode(target))
{
res = new Result1() { Succeed = false, Data = $"target:{target},type:{type}", Msg = $"节点名{target}不存在" };
Log.Error("呼叫失败[POST](节点不存在):" + missionInfo.ToString());
} }
else else
{ {
if (!FixMissionManager.Contains(missionInfo)) if (!FixMissionManager.Contains(missionInfo))
{ {
FixMissionManager.Add(missionInfo); FixMissionManager.Add(missionInfo);
res = new Result() { Succeed = true, Data = $"name:{name},targetwarehouse:{targetwarehouse},type:{type}", Msg = "" }; res = new Result1() { Succeed = true, Data = $"target:{target},type:{type}", Msg = "" };
Log.Info("产线呼叫任务成功[POST]:" + missionInfo.ToString()); Log.Info("呼叫成功[POST]:" + missionInfo.ToString());
} }
else else
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetwarehouse},type:{type}", Msg = "该任务已存在" }; res = new Result1() { Succeed = false, Data = $"target:{target},type:{type}", Msg = $"目的地{target}任务已存在,无法添加重复任务" };
Log.Error("产线呼叫任务失败[POST](已存在相同任务):" + missionInfo.ToString()); Log.Error("呼叫失败[POST](已存在相同任务):" + missionInfo.ToString());
} }
} }
return JsonHelper.SerializeObject(res); return JsonHelper.SerializeObject(res);
} }
public string WarehouseRequestByGet(string name, string targetline, int type) #endregion
#region 获取治具类型
public string GetTypeByGet()
{ {
Result res; FixInfo fixInfo;
name = SettingString.Warehouse;//name.ToUpper(); if (AGVManager.agvInfo[0].CurJob == null)
targetline = targetline.ToUpper(); {
manager.MissionInfo missionInfo = new manager.MissionInfo(name, (manager.FixType)type, targetline, manager.MissionType.Warehouse); fixInfo = new FixInfo() { Succeed = true, HasLoad = AGVManager.agvInfo[0].IsExistShelf, Type = FixType.None };
if (!NodeManager.HasNode(name)) Log.Info($"GetTypeByGet : 当前无任务,治具类型为空");
}
else if (AGVManager.agvInfo[0].CurJob.JobParam != null && AGVManager.agvInfo[0].CurJob.JobParam.FixMissionInfo != null)
{
fixInfo = new FixInfo() { Succeed = true, HasLoad = AGVManager.agvInfo[0].IsExistShelf, Type = AGVManager.agvInfo[0].CurJob.JobParam.FixMissionInfo.Type };
Log.Info($"GetTypeByGet : {AGVManager.agvInfo[0].IsExistShelf},{AGVManager.agvInfo[0].CurJob.JobParam.FixMissionInfo.Type.ToString()}");
}
else
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetline},type:{type}", Msg = $"节点名{name}不存在" }; fixInfo = new FixInfo() { Succeed = false, HasLoad = AGVManager.agvInfo[0].IsExistShelf, Type = FixType.None };
Log.Error("立库呼叫任务失败[GET](节点不存在):" + missionInfo.ToString()); Log.Info($"GetTypeByGet : 当前无任务,查询失败");
}
return JsonHelper.SerializeObject(fixInfo);
}
public string GetTypeByPost()
{
FixInfo fixInfo;
if (AGVManager.agvInfo[0].CurJob == null)
{
fixInfo = new FixInfo() { Succeed = true, HasLoad = AGVManager.agvInfo[0].IsExistShelf, Type = FixType.None };
Log.Info($"GetTypeByPost : 当前无任务,治具类型为空");
} }
else if (!NodeManager.HasNode(targetline)) else if (AGVManager.agvInfo[0].CurJob.JobParam != null && AGVManager.agvInfo[0].CurJob.JobParam.FixMissionInfo != null)
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetline},type:{type}", Msg = $"节点名{targetline}不存在" }; fixInfo = new FixInfo() { Succeed = true, HasLoad = AGVManager.agvInfo[0].IsExistShelf, Type = AGVManager.agvInfo[0].CurJob.JobParam.FixMissionInfo.Type };
Log.Error("立库呼叫任务失败[GET](节点不存在):" + missionInfo.ToString()); Log.Info($"GetTypeByPost : {AGVManager.agvInfo[0].IsExistShelf},{AGVManager.agvInfo[0].CurJob.JobParam.FixMissionInfo.Type.ToString()}");
} }
else else
{ {
if (!FixMissionManager.Contains(missionInfo)) fixInfo = new FixInfo() { Succeed = false, HasLoad = AGVManager.agvInfo[0].IsExistShelf, Type = FixType.None };
{ Log.Info($"GetTypeByPost : 当前无任务,查询失败");
FixMissionManager.Add(missionInfo);
res = new Result() { Succeed = true, Data = $"name:{name},targetline:{targetline},type:{type}", Msg = "" };
Log.Info("立库呼叫任务成功[GET]:" + missionInfo.ToString());
}
else
{
res = new Result() { Succeed = false, Data = $"name:{name},targetline:{targetline},type:{type}", Msg = "该任务已存在" };
Log.Error("立库呼叫任务失败[GET](已存在相同任务):" + missionInfo.ToString());
}
} }
return JsonHelper.SerializeObject(fixInfo);
}
return JsonHelper.SerializeObject(res); #endregion
public string MayEnterByGet(bool allow)
{
WarehouseSigManager.MayEnter = allow;
Log.Info($"Get: 收到MayEnter={allow}信号");
return JsonHelper.SerializeObject(new Result1() { Succeed = true, Data = $"MayEnter={allow}", Msg = "" });
} }
public string WarehouseRequestByPost(Stream stream) public string MayEnterByPost(Stream stream)
{ {
Result res;
StreamReader sr = new StreamReader(stream); StreamReader sr = new StreamReader(stream);
string s = sr.ReadToEnd(); string s = sr.ReadToEnd();
System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s); System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s);
string name = SettingString.Warehouse;//nvc["name"].ToUpper(); bool allow = bool.Parse(nvc["allow"]);
string targetline = nvc["targetline"].ToUpper(); WarehouseSigManager.MayEnter = allow;
Log.Info($"Post: 收到MayEnter={allow}信号");
return JsonHelper.SerializeObject(new Result1() { Succeed = true, Data = $"MayEnter={allow}", Msg = "" });
}
public string MayLeaveByGet(bool allow)
{
Result1 result1;
if (AGVManager.agvInfo[0].StateID.Equals(eAGVState.Executing))
{
result1 = new Result1() { Succeed = false, Data = $"MayLeave={allow}", Msg = "AGV正在运行,无法进料" };
Log.Info($"Get: 收到MayLeave={allow}信号,AGV正在运行,无法进料");
}
else
{
WarehouseSigManager.MayLeave = allow;
result1 = new Result1() { Succeed = true, Data = $"MayLeave={allow}", Msg = "" };
Log.Info($"Get: 收到MayLeave={allow}信号");
}
return JsonHelper.SerializeObject(result1);
}
public string MayLeaveByPost(Stream stream)
{
StreamReader sr = new StreamReader(stream);
string s = sr.ReadToEnd();
System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s);
bool allow = bool.Parse(nvc["allow"]);
Result1 result1;
if (AGVManager.agvInfo[0].StateID.Equals(eAGVState.Executing))
{
result1 = new Result1() { Succeed = false, Data = $"MayLeave={allow}", Msg = "AGV正在运行,无法进料" };
Log.Info($"Post: 收到MayLeave={allow}信号,AGV正在运行,无法进料");
}
else
{
WarehouseSigManager.MayLeave = allow;
result1 = new Result1() { Succeed = true, Data = $"MayLeave={allow}", Msg = "" };
Log.Info($"Post: 收到MayLeave={allow}信号");
}
return JsonHelper.SerializeObject(result1);
}
public string OutStoreByGet(bool has, int type)
{
WarehouseSigManager.OutStore.Set(has, (FixType)type);
Log.Info($"Get: 收到出库信息:{has.ToString()} {type}");
return JsonHelper.SerializeObject(new Result1() { Succeed = true, Data = $"OutStore:{has},{type}", Msg = "" });
}
public string OutStoreByPost(Stream stream)
{
StreamReader sr = new StreamReader(stream);
string s = sr.ReadToEnd();
System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s);
bool has = bool.Parse(nvc["has"]);
int type = int.Parse(nvc["type"]); int type = int.Parse(nvc["type"]);
manager.MissionInfo missionInfo = new manager.MissionInfo(name, (manager.FixType)type, targetline, manager.MissionType.Warehouse); WarehouseSigManager.OutStore.Set(has, (FixType)type);
Log.Info($"Post: 收到出库信息:{has.ToString()} {type}");
return JsonHelper.SerializeObject(new Result1() { Succeed = true, Data = $"OutStore:{has},{type}", Msg = "" });
}
public string StopEnterByGet(bool allow)
{
WarehouseSigManager.StopEnter = allow;
Log.Info($"Get: 收到StopEnter={allow}信号");
return JsonHelper.SerializeObject(new Result1() { Succeed = true, Data = $"StopEnter={allow}", Msg = "" });
}
public string StopEnterByPost(Stream stream)
{
StreamReader sr = new StreamReader(stream);
string s = sr.ReadToEnd();
System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s);
bool allow = bool.Parse(nvc["allow"]);
WarehouseSigManager.StopEnter = allow;
Log.Info($"Post: 收到StopEnter={allow}信号");
return JsonHelper.SerializeObject(new Result1() { Succeed = true, Data = $"StopEnter={allow}", Msg = "" });
}
public string TransferByGet(string name, string target)
{
Result1 result1;
if (!NodeManager.HasNode(name)) if (!NodeManager.HasNode(name))
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetline},type:{type}", Msg = $"节点名{name}不存在" }; result1 = new Result1() { Succeed = false, Data = "", Msg = $"name {name} do not exist" };
Log.Error("立库呼叫任务失败[POST](节点不存在):" + missionInfo.ToString()); Log.Info($"运送接口调用失败[GET]: : 呼叫地不存在, name={name},target={target},curplace={WarehouseSigManager.TargetWithFix.CurPlace}");
} }
else if (!NodeManager.HasNode(targetline)) else if (WarehouseSigManager.TargetWithFix.CurPlace.Equals(name) && NodeManager.HasNode(target))
{ {
res = new Result() { Succeed = false, Data = $"name:{name},targetwarehouse:{targetline},type:{type}", Msg = $"节点名{targetline}不存在" }; result1 = new Result1() { Succeed = true, Data = $"name={name},target={target}", Msg = "" };
Log.Error("立库呼叫任务失败[POST](节点不存在):" + missionInfo.ToString()); WarehouseSigManager.TargetWithFix.Set(name, target);
Log.Info($"运送接口调用成功[GET]: name={name},target={target}");
}
else if (WarehouseSigManager.TargetWithFix.CurPlace.Equals(name) && SettingString.Cancel.Equals(target))
{
result1 = new Result1() { Succeed = true, Data = $"name={name},target={target}", Msg = "" };
WarehouseSigManager.TargetWithFix.Set(name, target);
Log.Info($"运送接口调用成功[GET]: name={name},target={target}");
} }
else else
{ {
if (!FixMissionManager.Contains(missionInfo)) result1 = new Result1() { Succeed = false, Data = "", Msg = $" AGV is in {WarehouseSigManager.TargetWithFix.CurPlace}, line {name} is not allowed to call this interface TransferByGet at this time." };
{ Log.Info($"运送接口调用失败[GET]: : name={name},target={target},curplace={WarehouseSigManager.TargetWithFix.CurPlace}");
FixMissionManager.Add(missionInfo);
res = new Result() { Succeed = true, Data = $"name:{name},targetline:{targetline},type:{type}", Msg = "" };
Log.Info("立库呼叫任务成功[POST]:" + missionInfo.ToString());
}
else
{
res = new Result() { Succeed = false, Data = $"name:{name},targetline:{targetline},type:{type}", Msg = "该任务已存在" };
Log.Error("立库呼叫任务失败[POST](已存在相同任务):" + missionInfo.ToString());
}
} }
return JsonHelper.SerializeObject(result1);
}
return JsonHelper.SerializeObject(res); public string TransferByPost(Stream stream)
{
Result1 result1;
StreamReader sr = new StreamReader(stream);
string s = sr.ReadToEnd();
System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s);
string name = nvc["name"];
string target = nvc["target"];
if (!NodeManager.HasNode(name))
{
result1 = new Result1() { Succeed = false, Data = "", Msg = $"name {name} do not exist" };
Log.Info($"运送接口调用失败[POST]: : 呼叫地不存在, name={name},target={target},curplace={WarehouseSigManager.TargetWithFix.CurPlace}");
}
else if (WarehouseSigManager.TargetWithFix.CurPlace.Equals(name) && NodeManager.HasNode(target))
{
result1 = new Result1() { Succeed = true, Data = $"name={name},target={target}", Msg = "" };
WarehouseSigManager.TargetWithFix.Set(name, target);
Log.Info($"运送接口调用成功[POST]: name={name},target={target}");
}
else if (WarehouseSigManager.TargetWithFix.CurPlace.Equals(name) && SettingString.Cancel.Equals(target))
{
result1 = new Result1() { Succeed = true, Data = $"name={name},target={target}", Msg = "" };
WarehouseSigManager.TargetWithFix.Set(name, target);
Log.Info($"运送接口调用成功[GET]: name={name},target={target}");
}
else
{
result1 = new Result1() { Succeed = false, Data = "", Msg = $" AGV is in {WarehouseSigManager.TargetWithFix.CurPlace}, line {name} is not allowed to call this interface TransferByGet at this time." };
Log.Info($"运送接口调用失败[POST]: : name={name},target={target},curplace={WarehouseSigManager.TargetWithFix.CurPlace}");
}
return JsonHelper.SerializeObject(result1);
} }
} }
...@@ -211,7 +401,7 @@ namespace DeviceLibrary ...@@ -211,7 +401,7 @@ namespace DeviceLibrary
{ {
try try
{ {
ClsWebService service = new ClsWebService(); FixtureWebService service = new FixtureWebService();
_serviceHost = new WebServiceHost(service, new Uri(url));//service, new Uri(url) _serviceHost = new WebServiceHost(service, new Uri(url));//service, new Uri(url)
_serviceHost.Open(); _serviceHost.Open();
State = true; State = true;
......
...@@ -13,21 +13,17 @@ namespace DeviceLibrary.manager ...@@ -13,21 +13,17 @@ namespace DeviceLibrary.manager
public class MissionInfo public class MissionInfo
{ {
/// <summary> /// <summary>
/// 请求任务时间 /// 呼叫时间
/// </summary> /// </summary>
public DateTime RTime { get; set; } public DateTime RTime { get; set; }
/// <summary> /// <summary>
/// 呼叫地名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 治具类型 /// 治具类型
/// </summary> /// </summary>
public FixType Type { get; set; } public FixType Type { get; set; }
/// <summary> /// <summary>
/// 目的地名称 /// 目的地名称
/// </summary> /// </summary>
public string TargetName { get; set; } public string Target { get; set; }
/// <summary> /// <summary>
/// 任务类型 /// 任务类型
/// </summary> /// </summary>
...@@ -36,12 +32,11 @@ namespace DeviceLibrary.manager ...@@ -36,12 +32,11 @@ namespace DeviceLibrary.manager
/// 任务是否执行 /// 任务是否执行
/// </summary> /// </summary>
public bool On { get; set; } = true; public bool On { get; set; } = true;
public MissionInfo(string name, FixType fixType, string TargetName, MissionType missionType) public MissionInfo(string target, FixType fixType, MissionType missionType)
{ {
RTime = DateTime.Now; RTime = DateTime.Now;
Name = name;
Type = fixType; Type = fixType;
this.TargetName = TargetName; Target = target;
MissionType = missionType; MissionType = missionType;
} }
public MissionInfo() { } public MissionInfo() { }
...@@ -55,12 +50,16 @@ namespace DeviceLibrary.manager ...@@ -55,12 +50,16 @@ namespace DeviceLibrary.manager
} }
return tmp; return tmp;
} }
public string ToTxt()
{
return $" [Target={Target} Type={Type.ToString()}] ";
}
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
if (obj is MissionInfo) if (obj is MissionInfo)
{ {
MissionInfo fixMissionInfo = obj as MissionInfo; MissionInfo fixMissionInfo = obj as MissionInfo;
if (this.Name.Equals(fixMissionInfo.Name) && this.Type.Equals(fixMissionInfo.Type) && this.TargetName.Equals(fixMissionInfo.TargetName)) if (this.Target.Equals(fixMissionInfo.Target))
return true; return true;
else else
return false; return false;
......
...@@ -6,14 +6,13 @@ ...@@ -6,14 +6,13 @@
<appSettings> <appSettings>
<add key="ITS" value="10.85.17.233"/> <add key="ITS" value="10.85.17.233"/>
<add key="WebService" value="http://127.0.0.1:8888/service/agv/request/"/> <add key="WebService" value="http://127.0.0.1:8888/service/agv/"/>
<add key="http.server" value="http://10.85.162.124/myproject/"/> <add key="http.server" value="http://10.85.162.124/myproject/"/>
<add key="FLEET" value="10.85.19.3"/> <add key="FLEET" value="10.85.19.3"/>
<add key="log4net_configname" value="log4net.config"/> <add key="log4net_configname" value="log4net.config"/>
<add key="File_AgvInfo" value="agvinfos.xml"/> <add key="File_AgvInfo" value="agvinfos.xml"/>
<add key="File_AgvTaskInfo" value="taskinfos.xml"/> <add key="File_AgvTaskInfo" value="taskinfos.xml"/>
<add key="File_NodeInfo" value="nodeinfos.xml"/> <add key="File_NodeInfo" value="nodeinfos.xml"/>
<add key="UseFleet" value="False"/>
<add key="ChargeThreshold" value="20,90"/> <add key="ChargeThreshold" value="20,90"/>
</appSettings> </appSettings>
</configuration> </configuration>
...@@ -218,7 +218,7 @@ namespace AGVControl ...@@ -218,7 +218,7 @@ namespace AGVControl
private void dgvInfos_CellContentClick(object sender, DataGridViewCellEventArgs e) private void dgvInfos_CellContentClick(object sender, DataGridViewCellEventArgs e)
{ {
if(e.ColumnIndex==5) if(e.ColumnIndex==4)
{ {
if (e.RowIndex == -1) if (e.RowIndex == -1)
return; return;
......
...@@ -99,12 +99,14 @@ namespace AGVControl ...@@ -99,12 +99,14 @@ namespace AGVControl
{ {
if (Agv.IsExistShelf) if (Agv.IsExistShelf)
{ {
chkBxAuto.Checked = false;
MessageBox.Show(this,string.Format("{0} 车上有负载,无法开启自动模式,请先清空小车负载!", Agv.Name), "警告");
LogUtil.error(string.Format("{0} 车上有负载,无法开启自动模式,请先清空小车负载!", Agv.Name)); LogUtil.error(string.Format("{0} 车上有负载,无法开启自动模式,请先清空小车负载!", Agv.Name));
return; return;
} }
if (Agv.Place.Equals(SettingString.Standby) || Agv.Place.Equals(SettingString.AutoCharge)) //if (Agv.Place.Equals(SettingString.Standby) || Agv.Place.Equals(SettingString.AutoCharge))
Agv.Place = new Node(); // Agv.Place = new Node();
if (Agv.IsCon) if (Agv.IsCon)
MiR_API.Del_Mission(Agv); MiR_API.Del_Mission(Agv);
} }
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<file value="logs/runLog/RunLog.json"/> <file value="logs/runLog/RunLog.json"/>
<param name="Encoding" value="UTF-8"/> <param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/> <appendToFile value="true"/>
<param name="MaxSizeRollBackups" value="10" /> <param name="MaxSizeRollBackups" value="30" />
<rollingStyle value="Date"/> <rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/> <datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
......
文件属性发生变化
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!