Commit 5f8512a7 张东亮

运行ok版本

1 个父辈 3bb51791
正在显示 34 个修改的文件 包含 761 行增加803 行删除
......@@ -103,6 +103,7 @@ namespace BLL
public static bool FindFullShelfTarget(string rfid, out BoxDestInfo dest)
{
dest = null;
A6_Target = "";
try
{
if (rfid.Equals("") || rfid.Equals("00"))
......
......@@ -489,7 +489,7 @@ namespace BLL
int idx = Common.nodeInfo.FindIndex(s => s.Name == node.Name);
if (idx == -1)
{
Common.LogInfo("UpdateNode " + node.Name + " 不存在");
Common.log.Error("UpdateNode " + node.Name + " 不存在");
return;
}
......@@ -591,7 +591,7 @@ namespace BLL
if (!_client[idx].IsConn)
{
Common.LogInfo(ip + " 没有连接");
Common.log.Error(ip + " 没有连接");
return false;
}
......
......@@ -27,12 +27,10 @@ namespace AGVControl
public const string DoubleLine_Name_Prefix = "A";
public const string Wait = "Wait";
public const string Done = "Done";
public const string Aborted = "Aborted";
public const string AutoCharge = "AutoCharge";
public const string Executing = "Executing";
public const string C4_DOOR_Name = "F1";
public const string D4_DOOR_Name = "F2";
public const string Standby_Name_Prefix = "H";
public const string Charge_Name_Prefix = "I";
public const string RandomCharge_IP1 = "10.85.199.80";
public const string RandomCharge_IP2 = "10.85.199.81";
public const string RandomCharge_IP3 = "10.85.199.71";
......@@ -51,6 +49,10 @@ namespace AGVControl
public const string C4_STANDBY1 = "C4_STANDBY1";
public const string C4_STANDBY2 = "C4_STANDBY2";
public const string C4FeederIn = "C21";
public const string D4FeederIn = "D21";
public const string C4FeederOut = "C22";
public const string D4FeederOut = "D22";
/// <summary>
/// 上料区
/// </summary>
......@@ -59,130 +61,8 @@ namespace AGVControl
/// 下料区
/// </summary>
public const string A5 = "A5";
/// <summary>
/// 4D 1线
/// </summary>
public const string E1 = "E1";
/// <summary>
/// 4D 2线
/// </summary>
public const string E2 = "E2";
/// <summary>
/// 4D 3线
/// </summary>
public const string E3 = "E3";
/// <summary>
/// 4D 4线
/// </summary>
public const string E4 = "E4";
/// <summary>
/// 4D 5线
/// </summary>
public const string E5 = "E5";
/// <summary>
/// 4D 6线
/// </summary>
public const string E6 = "E6";
/// <summary>
/// 4D 8线
/// </summary>
public const string E8 = "E8";
/// <summary>
/// 4D 9线
/// </summary>
public const string E9 = "E9";
/// <summary>
/// 4D 10线
/// </summary>
public const string E10 = "E10";
/// <summary>
/// 4D 11线
/// </summary>
public const string E11 = "E11";
/// <summary>
/// 4D 12线
/// </summary>
public const string E12 = "E12";
/// <summary>
/// 4D 14线
/// </summary>
public const string E14 = "E14";
/// <summary>
/// 4D 15线
/// </summary>
public const string E15 = "E15";
/// <summary>
/// 4D 16线
/// </summary>
public const string E16 = "E16";
/// <summary>
/// 4D FeederIn
/// </summary>
public const string E21 = "E21";
/// <summary>
/// 4D FeederOut
/// </summary>
public const string E22 = "E22";
/// <summary>
/// 4C 1线
/// </summary>
public const string G1 = "G1";
/// <summary>
/// 4C 2线
/// </summary>
public const string G2 = "G2";
/// <summary>
/// 4C 3线
/// </summary>
public const string G3 = "G3";
/// <summary>
/// 4C 4线
/// </summary>
public const string G4 = "G4";
/// <summary>
/// 4C 5线
/// </summary>
public const string G5 = "G5";
/// <summary>
/// 4C 6线
/// </summary>
public const string G6 = "G6";
/// <summary>
/// 4C 7线
/// </summary>
public const string G7 = "G7";
/// <summary>
/// 4C 8线
/// </summary>
public const string G8 = "G8";
/// <summary>
/// 4C 9线
/// </summary>
public const string G9 = "G9";
/// <summary>
/// 4C 10线
/// </summary>
public const string G10 = "G10";
/// <summary>
/// 4C 14线
/// </summary>
public const string G14 = "G14";
/// <summary>
/// 4C 15线
/// </summary>
public const string G15 = "G15";
/// <summary>
/// 4C 16线
/// </summary>
public const string G16 = "G16";
/// <summary>
/// 4C FeederIn
/// </summary>
public const string G21 = "G21";
/// <summary>
/// 4C FeederOut
/// </summary>
public const string G22 = "G22";
public const string D4_Name_Prefix = "D";
public const string C4_Name_Prefix = "C";
}
......@@ -279,25 +159,13 @@ namespace AGVControl
public static bool MoveToNode(Agv_Info agv, string nodeName)
{
string log;
//if (!agv.TaskSend.Equals(""))
// return false;
//清除当前任务点
int idx = Common.nodeInfo.FindIndex(s => s.AgvName == agv.Name);
if (idx > -1)
{
Common.nodeInfo[idx].AgvName = "";
log = agv.Name + " 清除任务点[" + Common.nodeInfo[idx].Name + "]的AGV名称";
Common.LogInfo(log);
}
//清除目的地
agv.Place = "";
//执行下一个任务
bool rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Move + nodeName]);
if (rtn)
{
agv.TaskSend = SettingString.Move + nodeName;
agv.Place = nodeName;
log = string.Format("{0} {1} To Node {2}", agv.Name, SettingString.Move, nodeName);
Common.LogInfo(log);
......@@ -305,7 +173,6 @@ namespace AGVControl
}
else
{
agv.TaskSend = "";
log = string.Format("{0} {1} To Node {2} 失败", agv.Name, SettingString.Move, nodeName);
Common.LogInfo(log);
}
......@@ -661,6 +528,7 @@ namespace AGVControl
public static bool DoorMission(Agv_Info agv, string doorName)
{
agv.Place = doorName;
return Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Move + doorName]);
}
......@@ -670,13 +538,13 @@ namespace AGVControl
/// <param name="taskName">任务名称</param>
/// <param name="taskGUID">任务GUID</param>
/// <returns></returns>
public static bool CheckTaskFinished(Agv_Info agv, string nodeName, string taskGUID)
public static bool CheckTaskFinished(Agv_Info agv,string nodeName, string curTaskState)
{
log.Debug(agv.Name + " 检查当前任务是否结束: " + SettingString.Move + nodeName + " " + agv.CurTaskState + " " + taskGUID);
return Common.agvMission[SettingString.Move + nodeName].Equals(taskGUID) && agv.CurTaskState.Equals(SettingString.Done);
log.Debug(agv.Name + " 检查当前任务是否结束: " +SettingString.Move + nodeName + " " + curTaskState);
return Common.agvMission[SettingString.Move+nodeName].Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done);
}
/// <summary>
/// 检查充电任务是否完成
/// 检查充电任务是否分配完成
/// </summary>
/// <param name="taskName"></param>
/// <returns></returns>
......@@ -685,10 +553,10 @@ namespace AGVControl
return taskName.Contains(SettingString.AutoCharge) && agv.CurTaskState.Equals(SettingString.Executing);
}
public static bool CheckEnterOrLeaveFinished(Agv_Info agv, string actionName, string taskGUID)
public static bool CheckEnterOrLeaveFinished(Agv_Info agv, string actionName, string curTaskState)
{
log.Debug(agv.Name + " 检查进出料是否结束: " + actionName + " " + agv.CurTaskState + " " + taskGUID);
return Common.agvMission[actionName].Equals(taskGUID) && agv.CurTaskState.Equals(SettingString.Done);
log.Debug(agv.Name + " 检查进出料是否结束: " + actionName + " " + curTaskState);
return Common.agvMission[actionName].Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done);
}
//双层线工单信息
public static string doubleLine_WO = "";
......@@ -714,14 +582,14 @@ namespace AGVControl
idx = nodeInfo.FindIndex(s => s.Name.Equals(FullShelfDestInfo.location) && s.EmptyShelfCnt > 0);
if (idx > -1)
{
if (FullShelfDestInfo.location.StartsWith("G") && SettingString.C4_AGV_IPs.Contains(agv.IP))
if (FullShelfDestInfo.location.StartsWith(SettingString.C4_Name_Prefix) && SettingString.C4_AGV_IPs.Contains(agv.IP))
{
nodeName = FullShelfDestInfo.location;
Common.GetLineNameByNodeName(nodeName, out string line);
Common.LogInfo("A6出满料架的产线有空料架,优先处理 " + FullShelfDestInfo.ShowInfo(line));
return true;
}
else if (FullShelfDestInfo.location.StartsWith("E") && !SettingString.C4_AGV_IPs.Contains(agv.IP))
else if (FullShelfDestInfo.location.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(agv.IP))
{
nodeName = FullShelfDestInfo.location;
Common.GetLineNameByNodeName(nodeName, out string line);
......@@ -753,13 +621,13 @@ namespace AGVControl
if (idx > -1)
{
if (loc.StartsWith("G") && SettingString.C4_AGV_IPs.Contains(agv.IP))
if (loc.StartsWith(SettingString.C4_Name_Prefix) && SettingString.C4_AGV_IPs.Contains(agv.IP))
{
nodeName = loc;
Common.LogInfo("双层线正在出的工单目标产线有空料架,优先处4C-" + loc);
return true;
}
else if (loc.StartsWith("E") && !SettingString.C4_AGV_IPs.Contains(agv.IP))
else if (loc.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(agv.IP))
{
nodeName = loc;
Common.LogInfo("双层线正在出的工单目标产线有空料架,优先处理4D-" + loc);
......@@ -782,7 +650,7 @@ namespace AGVControl
//4C车间寻找
if (SettingString.C4_AGV_IPs.Contains(agv.IP))
{
string nearNodeName = CalculateNearNode(agv, "G");
string nearNodeName = CalculateNearNode(agv, SettingString.C4_Name_Prefix);
if (nearNodeName.Equals(""))
{
return false;
......@@ -795,7 +663,7 @@ namespace AGVControl
//4D车间寻找
if (!SettingString.C4_AGV_IPs.Contains(agv.IP))
{
string nearNodeName = CalculateNearNode(agv, "E");
string nearNodeName = CalculateNearNode(agv, SettingString.D4_Name_Prefix);
if (nearNodeName.Equals(""))
{
return false;
......@@ -818,7 +686,7 @@ namespace AGVControl
//4C车间寻找
if (SettingString.C4_AGV_IPs.Contains(agv.IP))
{
string nearNodeName = CalculateNearNode(agv, "G");
string nearNodeName = CalculateNearNode(agv, SettingString.C4_Name_Prefix);
if (!nearNodeName.Equals(""))
{
nodeName = nearNodeName;
......@@ -831,7 +699,7 @@ namespace AGVControl
//4D车间寻找
if (!SettingString.C4_AGV_IPs.Contains(agv.IP))
{
string nearNodeName = CalculateNearNode(agv, "E");
string nearNodeName = CalculateNearNode(agv, SettingString.D4_Name_Prefix);
if (!nearNodeName.Equals(""))
{
nodeName = nearNodeName;
......@@ -846,19 +714,23 @@ namespace AGVControl
//4C车间寻找
if (SettingString.C4_AGV_IPs.Contains(agv.IP))
{
idx = nodeInfo.FindIndex(s => s.EmptyShelfCnt > 0 && s.Name.Equals("G22") && s.IsUse);
idx = nodeInfo.FindIndex(s => s.EmptyShelfCnt > 0 && s.Name.Equals(SettingString.C4FeederOut) && s.IsUse);
if (idx > -1)
{
int idx1 = agvInfo.FindIndex(s => s.CurJob is EnterLeaveShelfJob && ((EnterLeaveShelfJob)s.CurJob).LineName.Equals(SettingString.C4FeederOut));
if(idx1==-1)
{
nodeName = nodeInfo[idx].Name;
Common.log.Debug(agv.Name + " 双层线需要小料架,准备去4C-" + nodeName);
return true;
}
}
}
//4D车间寻找
if (!SettingString.C4_AGV_IPs.Contains(agv.IP))
{
idx = nodeInfo.FindIndex(s => s.EmptyShelfCnt > 0 && s.Name.Equals("E22") && s.IsUse);
idx = nodeInfo.FindIndex(s => s.EmptyShelfCnt > 0 && s.Name.Equals(SettingString.D4FeederOut) && s.IsUse);
if (idx > -1)
{
nodeName = nodeInfo[idx].Name;
......@@ -887,16 +759,20 @@ namespace AGVControl
{
if (AGVManager.FindFullShelfTarget(Common.nodeInfo[idx].RFID, out AGVManager.BoxDestInfo FullShelfDestInfo))
{
if (FullShelfDestInfo.location.StartsWith("G") && SettingString.C4_AGV_IPs.Contains(agv.IP))
if (FullShelfDestInfo.location.StartsWith(SettingString.C4_Name_Prefix) && SettingString.C4_AGV_IPs.Contains(agv.IP))
{
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoFullShelfStationJob && !s.IP.Equals(agv.IP));
if (i == -1)
return true;
}
else if (FullShelfDestInfo.location.StartsWith("E") && !SettingString.C4_AGV_IPs.Contains(agv.IP))
else if (FullShelfDestInfo.location.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(agv.IP))
{
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoFullShelfStationJob && !s.IP.Equals(agv.IP));
int i = Common.agvInfo.FindIndex(s => s.CurJob is SendFullShelfToLineJob && !s.IP.Equals(agv.IP)
&& ((SendFullShelfToLineJob)s.CurJob).FullShelfPlace.Equals(FullShelfDestInfo.location));
if (i > -1)
return false;
i = Common.agvInfo.FindIndex(s => s.CurJob is GoFullShelfStationJob && !s.IP.Equals(agv.IP));
if (i == -1)
return true;
}
......@@ -990,13 +866,7 @@ namespace AGVControl
{
bool rtn;
string log;
double sp = (DateTime.Now.Ticks - Common.chargeStatus.chargeInterval) / 10000000.0;
//防止两车同时充电卡住的情况
//if (sp < 60)
//{
// Common.LogInfo(agv.Name + " 与上一辆车的充电时间间隔为" + sp.ToString() + ",小于60s,不能充电。", false);
// return false;
//}
agv.Place = "";
#region 随机充电位置
//if (Common.chargeStatus.charge3 == "")
......@@ -1100,7 +970,7 @@ namespace AGVControl
if (rtn)
{
//agv.TaskSend = "AutoCharge5";
agv.TaskSend = "AutoCharge";
agv.Place = SettingString.AutoCharge;
Common.chargeStatus.charge5 = agv.Name;
Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
log = string.Format("{0} AutoCharge5", agv.Name);
......@@ -1110,7 +980,6 @@ namespace AGVControl
}
else
{
agv.TaskSend = "";
log = string.Format("{0} AutoCharge5 失败", agv.Name);
//防止上一个任务已执行但返回失败时,删除任务
//Common.mir.Del_Mission(agv);
......@@ -1124,7 +993,7 @@ namespace AGVControl
if (rtn)
{
//agv.TaskSend = "AutoCharge6";
agv.TaskSend = "AutoCharge";
agv.Place = SettingString.AutoCharge;
Common.chargeStatus.charge6 = agv.Name;
Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
log = string.Format("{0} AutoCharge6", agv.Name);
......@@ -1134,7 +1003,6 @@ namespace AGVControl
}
else
{
agv.TaskSend = "";
log = string.Format("{0} AutoCharge6 失败", agv.Name);
//防止上一个任务已执行但返回失败时,删除任务
//Common.mir.Del_Mission(agv);
......@@ -1148,7 +1016,7 @@ namespace AGVControl
if (rtn)
{
//agv.TaskSend = "AutoCharge3";
agv.TaskSend = "AutoCharge";
agv.Place = SettingString.AutoCharge;
Common.chargeStatus.charge3 = agv.Name;
Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
log = string.Format("{0} AutoCharge3", agv.Name);
......@@ -1158,7 +1026,6 @@ namespace AGVControl
}
else
{
agv.TaskSend = "";
log = string.Format("{0} AutoCharge3 失败", agv.Name);
//防止上一个任务已执行但返回失败时,删除任务
//Common.mir.Del_Mission(agv);
......@@ -1172,7 +1039,7 @@ namespace AGVControl
if (rtn)
{
//agv.TaskSend = "AutoCharge4";
agv.TaskSend = "AutoCharge";
agv.Place = SettingString.AutoCharge;
Common.chargeStatus.charge4 = agv.Name;
Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
log = string.Format("{0} AutoCharge4", agv.Name);
......@@ -1182,7 +1049,6 @@ namespace AGVControl
}
else
{
agv.TaskSend = "";
log = string.Format("{0} AutoCharge4 失败", agv.Name);
//防止上一个任务已执行但返回失败时,删除任务
//Common.mir.Del_Mission(agv);
......@@ -1190,29 +1056,6 @@ namespace AGVControl
}
return rtn;
}
//else //if (Common.chargeStatus.charge7 == "")
//{
// rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["AutoCharge7"]);
// if (rtn)
// {
// agv.TaskSend = "AutoCharge7";
// Common.chargeStatus.charge3 = agv.Name;
// Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
// log = string.Format("{0} AutoCharge7", agv.Name);
// Common.LogInfo(log);
// Common.mir.State_Ready(agv);
// }
// else
// {
// agv.TaskSend = "";
// log = string.Format("{0} AutoCharge7 失败", agv.Name);
// //防止上一个任务已执行但返回失败时,删除任务
// //Common.mir.Del_Mission(agv);
// Common.LogInfo(log);
// }
// return rtn;
//}
else
{
......@@ -1294,8 +1137,8 @@ namespace AGVControl
string[] mission = s[i].Split(',');
if (mission.Length != 2)
continue;
missionManager.missionList.Add(new MissionStru(mission[0], mission[1]));
//missionManager.missionList.Add(new MissionStru(mission[0], mission[1]));
missionManager.AddMission(new MissionStru(mission[0], mission[1]));
}
}
......@@ -1310,7 +1153,8 @@ namespace AGVControl
int idx = Common.nodeInfo.FindIndex(s => s.Name == nodeName);
if (idx > -1)
{
Common.missionManager.missionList.Add(new MissionStru(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nodeName));
// Common.missionManager.missionList.Add(new MissionStru(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nodeName));
Common.missionManager.AddMission(new MissionStru(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nodeName));
Common.nodeInfo[idx].IncreEmptyShelfCnt(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
using (System.IO.StreamWriter file = new System.IO.StreamWriter(CONFIG_PATH + "LinePlace.txt"))
{
......@@ -1345,7 +1189,8 @@ namespace AGVControl
if (idx > -1)
{
LogInfo("删除一个空料架任务:" + nodeName);
Common.missionManager.missionList.RemoveAt(idx);
Common.missionManager.DelMission(idx);
//Common.missionManager.missionList.RemoveAt(idx);
using (System.IO.StreamWriter file = new System.IO.StreamWriter(CONFIG_PATH + "LinePlace.txt"))
{
foreach (var item in Common.missionManager.missionList)
......@@ -1409,7 +1254,7 @@ namespace AGVControl
}
else
{
Common.log.Debug("GetNodesPosition 获取节点位置失败");
Common.log.Error(clientNode.Name+ " GetNodesPosition 获取节点位置失败");
}
}
}
......@@ -1485,6 +1330,18 @@ namespace AGVControl
StandbyStation.C4_Station2 = "";
}
}
/// <summary>
/// 获取Job任务状态
/// </summary>
/// <param name="CurTaskID"></param>
/// <returns></returns>
public static string GetTakJobState(int CurTaskID)
{
if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
return st;
return SettingString.Wait;
}
}
public static class API
......@@ -1672,24 +1529,45 @@ namespace AGVControl
CreateTime = dateTime;
}
}
/// <summary>
/// 任务管理
/// </summary>
public class MissionManager
{
public delegate void MissionChangedHandler();
public event MissionChangedHandler MissionChanged;
/// <summary>
/// 任务列表
/// </summary>
public List<MissionStru> missionList;
/// <summary>
/// 主动执行空架任务的小车名称
/// 空料架解绑总数
/// </summary>
public string AGV_Name_EmptyTask { get; set; } = "";
public Int32 EmptyMissionCount
{
get { return missionList.Count; }
}
public void AddMission(MissionStru missionStru)
{
missionList.Add(missionStru);
MissionChanged?.Invoke();
}
public void DelMission(int idx)
{
if (idx == -1)
return;
Common.missionManager.missionList.RemoveAt(idx);
MissionChanged?.Invoke();
}
public MissionManager()
{
missionList = new List<MissionStru>();
}
}
}
\ No newline at end of file
......@@ -87,18 +87,25 @@ namespace BLL
{
if (!CheckOnline(i)) continue;
bool change = false;
Common.mir.Get_Task_State(Common.agvInfo[i].CurTaskID, out string stateStr);
Thread.Sleep(50);
//获取AGV状态
rtn = Common.mir.Get_State(Common.agvInfo[i], out eAGVState stateID, out string stateText, out int battery, out string mission_text, out Agv_Info.clsPosition position);
Thread.Sleep(50);
Common.mir.Get_Task_State(Common.agvInfo[i], out string stateStr);
Thread.Sleep(50);
if (rtn) change = Common.agvInfo[i].SetState(stateID, stateStr, battery, mission_text, position);
else
continue;
//更新状态stateID.Equals(eAGVState.Executing)
if (change)
{
AgvChanged?.Invoke(i);
}
Common.log.Debug("获取AGV状态");
//获取地点任务状态
Thread.Sleep(50);
rtn = Common.mir.Get_Register(Common.agvInfo[i], REG_STATUS, out int regValue);
if (rtn) Common.agvInfo[i].GetPlace(regValue);
//Thread.Sleep(50);
//rtn = Common.mir.Get_Register(Common.agvInfo[i], REG_STATUS, out int regValue);
//if (rtn) Common.agvInfo[i].GetPlace(regValue);
Thread.Sleep(50);
rtn = Common.mir.Get_IO_Status(Common.agvInfo[i], out bool[] input, out bool[] output);
......@@ -123,35 +130,21 @@ namespace BLL
preAGVState = Common.agvInfo[i].StateID;
if (battery <= 10)
{
isAlarm = true;
msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "lineAgv." + Common.agvInfo[i].Name + ".battery", "电量 " + battery.ToString() + "%"));
}
//if (battery <= 10)
//{
// isAlarm = true;
// msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "lineAgv." + Common.agvInfo[i].Name + ".battery", "电量 " + battery.ToString() + "%"));
//}
if (stateText.Equals("Error") || stateText.Equals("EmergencyStop") || stateText.Equals("Pause"))
{
isAlarm = true;
msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "lineAgv." + Common.agvInfo[i].Name + ".Error.EmergencyStop", "agv状态:" + stateText + ";" + mission_text));
}
if (input != null && input.Length == 4)
{
if (!Common.agvInfo[i].IsExistShelf.Equals(input[3]))
{
isAlarm = true;
msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "lineAgv." + Common.agvInfo[i].Name + ".IsExistShelf", "agv负载:" + "IO信号与负载信号不匹配"));
}
}
//更新状态stateID.Equals(eAGVState.Executing)
if (change)
{
AgvChanged?.Invoke(i);
}
}
catch(Exception ex)
catch (Exception ex)
{
Common.log.Error("AgvStateTimer_"+Common.agvInfo[i].Name + ex.Message+ex.StackTrace);
Common.log.Error("AgvStateTimer_" + Common.agvInfo[i].Name + ex.Message + ex.StackTrace);
}
}
if (isAlarm)
......
......@@ -233,10 +233,11 @@ namespace BLL
{
//var key = Common.agvMission.Where(qq => qq.Value == mission_id).Select(qq => qq.Key);
//Common.log.Info(string.Format("{0} Add_Mission_Fleet [{1}]", info.Name, key.ToList()[0]));
Common.LogInfo(string.Format("{0} Add_Mission_Fleet [{1}]", info.Name, mission_id));
var key = Common.agvMission.Where(qq => qq.Value == mission_id).Select(qq => qq.Key);
info.CurTaskName = key.ToList()[0];
Common.LogInfo(string.Format("{0} Add_Mission_Fleet [{1}][{2}]", info.Name, key.ToList()[0], mission_id));
info.CurTaskID = -1;
info.CurTaskGUID = "";
info.CurTaskName = "";
info.CurTaskState = SettingString.Wait;
//防止上一个任务已执行但返回失败时,删除任务
//if (isRemovePreMission)
......@@ -260,9 +261,6 @@ namespace BLL
{
info.CurTaskID = Convert.ToInt32(id);
info.CurTaskGUID = mission_id;
var key = Common.agvMission.Where(qq => qq.Value == mission_id).Select(qq => qq.Key);
info.CurTaskName = key.ToList()[0];
Common.LogInfo(string.Format("{0} Add_Mission_Fleet [{1}]", info.Name, key.ToList()[0]));
}
catch
{
......@@ -436,17 +434,17 @@ namespace BLL
}
public bool Get_Task_State(Agv_Info info,out string stateStr)
public bool Get_Task_State(int CurTaskID, out string stateStr)
{
stateStr = "None";
stateStr = SettingString.Wait;
try
{
if (info.CurTaskID == -1)
if (CurTaskID == -1)
return true;
string ip = Common.appConfig.AppSettings.Settings["FLEET"].Value;
//http://10.85.199.3/api/v2.0.0/mission_scheduler
string url = "http://" + ip + "/api/v2.0.0/mission_scheduler/" + info.CurTaskID;
string json = HttpGet(url, info.IP, info.Authorization);
string url = "http://" + ip + "/api/v2.0.0/mission_scheduler/" + CurTaskID;
string json = HttpGet(url, ip, Common.agvInfo[0].Authorization);
Common.log.Debug("URL: " + url + "\n" + "Return: " + json);
if (string.IsNullOrWhiteSpace(json)) return false;
......@@ -458,7 +456,7 @@ namespace BLL
// "state": "Done"
string s = dic["id"].ToString();
if (s.Equals(info.CurTaskID.ToString()))
if (s.Equals(CurTaskID.ToString()))
{
stateStr = dic["state"].ToString();
return true;
......
......@@ -36,10 +36,10 @@
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
......@@ -77,10 +77,10 @@
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.TxtLog = new System.Windows.Forms.TextBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.btnClearC4StandyInfo = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.btnWO = new System.Windows.Forms.Button();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.txtBoxLineName = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.btnUpdateStatus = new System.Windows.Forms.Button();
this.txtBoxRFID = new System.Windows.Forms.TextBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
......@@ -88,11 +88,12 @@
this.btnAddMission = new System.Windows.Forms.Button();
this.cmbBoxLineName = new System.Windows.Forms.ComboBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.btnClearC4StandyInfo = new System.Windows.Forms.Button();
this.BtnMissionPause = new System.Windows.Forms.Button();
this.BtnClearError = new System.Windows.Forms.Button();
this.BtnMissionAdd = new System.Windows.Forms.Button();
this.BtnMissionPause = new System.Windows.Forms.Button();
this.BtnMissionReady = new System.Windows.Forms.Button();
this.LstAgvPlace = new System.Windows.Forms.ListBox();
this.BtnMissionReady = new System.Windows.Forms.Button();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
this.label6 = new System.Windows.Forms.Label();
......@@ -141,10 +142,10 @@
this.Column1,
this.Column2,
this.Column4,
this.Column3,
this.Column14,
this.Column21,
this.Column3,
this.Column18,
this.Column20,
this.Column23,
this.Column13,
this.Column19,
......@@ -185,21 +186,28 @@
this.Column4.ReadOnly = true;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column3
// Column14
//
this.Column3.HeaderText = "任务状态";
this.Column3.MinimumWidth = 6;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column14.HeaderText = "任务ID";
this.Column14.MinimumWidth = 6;
this.Column14.Name = "Column14";
this.Column14.ReadOnly = true;
//
// Column21
//
this.Column21.HeaderText = "RFID";
this.Column21.HeaderText = "任务名称";
this.Column21.MinimumWidth = 6;
this.Column21.Name = "Column21";
this.Column21.ReadOnly = true;
//
// Column3
//
this.Column3.HeaderText = "任务状态";
this.Column3.MinimumWidth = 6;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column18
//
this.Column18.HeaderText = "目的地";
......@@ -208,13 +216,6 @@
this.Column18.ReadOnly = true;
this.Column18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column20
//
this.Column20.HeaderText = "执行状态";
this.Column20.MinimumWidth = 6;
this.Column20.Name = "Column20";
this.Column20.ReadOnly = true;
//
// Column23
//
this.Column23.HeaderText = "负载";
......@@ -447,7 +448,7 @@
this.groupBox5.Size = new System.Drawing.Size(592, 44);
this.groupBox5.TabIndex = 2;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "出料信息信息";
this.groupBox5.Text = "出料信息";
//
// lblDestInfo
//
......@@ -675,41 +676,11 @@
this.tabPage3.Text = "手动";
this.tabPage3.UseVisualStyleBackColor = true;
//
// btnClearC4StandyInfo
//
this.btnClearC4StandyInfo.Location = new System.Drawing.Point(261, 22);
this.btnClearC4StandyInfo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnClearC4StandyInfo.Name = "btnClearC4StandyInfo";
this.btnClearC4StandyInfo.Size = new System.Drawing.Size(100, 65);
this.btnClearC4StandyInfo.TabIndex = 44;
this.btnClearC4StandyInfo.Text = "清除4C待机位占用";
this.btnClearC4StandyInfo.UseVisualStyleBackColor = true;
this.btnClearC4StandyInfo.Click += new System.EventHandler(this.btnClearC4StandyInfo_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(138, 22);
this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(100, 65);
this.button5.TabIndex = 43;
this.button5.Text = "出料查询";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// btnWO
//
this.btnWO.Location = new System.Drawing.Point(10, 22);
this.btnWO.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnWO.Name = "btnWO";
this.btnWO.Size = new System.Drawing.Size(100, 65);
this.btnWO.TabIndex = 42;
this.btnWO.Text = "工单查询";
this.btnWO.UseVisualStyleBackColor = true;
this.btnWO.Click += new System.EventHandler(this.btnWO_Click);
//
// groupBox7
//
this.groupBox7.Controls.Add(this.txtBoxLineName);
this.groupBox7.Controls.Add(this.label8);
this.groupBox7.Controls.Add(this.label7);
this.groupBox7.Controls.Add(this.btnUpdateStatus);
this.groupBox7.Controls.Add(this.txtBoxRFID);
this.groupBox7.Location = new System.Drawing.Point(691, 30);
......@@ -719,12 +690,37 @@
this.groupBox7.TabStop = false;
this.groupBox7.Text = "物料状态上报";
//
// txtBoxLineName
//
this.txtBoxLineName.Location = new System.Drawing.Point(80, 62);
this.txtBoxLineName.Name = "txtBoxLineName";
this.txtBoxLineName.Size = new System.Drawing.Size(101, 25);
this.txtBoxLineName.TabIndex = 44;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(6, 72);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(60, 15);
this.label8.TabIndex = 43;
this.label8.Text = "产线名:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(6, 30);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(47, 15);
this.label7.TabIndex = 42;
this.label7.Text = "RFID:";
//
// btnUpdateStatus
//
this.btnUpdateStatus.Location = new System.Drawing.Point(45, 67);
this.btnUpdateStatus.Location = new System.Drawing.Point(49, 97);
this.btnUpdateStatus.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnUpdateStatus.Name = "btnUpdateStatus";
this.btnUpdateStatus.Size = new System.Drawing.Size(100, 65);
this.btnUpdateStatus.Size = new System.Drawing.Size(100, 49);
this.btnUpdateStatus.TabIndex = 41;
this.btnUpdateStatus.Text = "上报";
this.btnUpdateStatus.UseVisualStyleBackColor = true;
......@@ -732,9 +728,9 @@
//
// txtBoxRFID
//
this.txtBoxRFID.Location = new System.Drawing.Point(24, 27);
this.txtBoxRFID.Location = new System.Drawing.Point(80, 24);
this.txtBoxRFID.Name = "txtBoxRFID";
this.txtBoxRFID.Size = new System.Drawing.Size(139, 25);
this.txtBoxRFID.Size = new System.Drawing.Size(101, 25);
this.txtBoxRFID.TabIndex = 0;
//
// groupBox6
......@@ -756,7 +752,7 @@
this.btnDeleteMission.Name = "btnDeleteMission";
this.btnDeleteMission.Size = new System.Drawing.Size(100, 65);
this.btnDeleteMission.TabIndex = 41;
this.btnDeleteMission.Text = "删除任务";
this.btnDeleteMission.Text = "删除解绑任务";
this.btnDeleteMission.UseVisualStyleBackColor = true;
this.btnDeleteMission.Click += new System.EventHandler(this.btnDeleteMission_Click);
//
......@@ -767,7 +763,7 @@
this.btnAddMission.Name = "btnAddMission";
this.btnAddMission.Size = new System.Drawing.Size(100, 65);
this.btnAddMission.TabIndex = 40;
this.btnAddMission.Text = "添加任务";
this.btnAddMission.Text = "添加解绑任务";
this.btnAddMission.UseVisualStyleBackColor = true;
this.btnAddMission.Click += new System.EventHandler(this.btnAddMission_Click);
//
......@@ -783,17 +779,37 @@
// groupBox2
//
this.groupBox2.Controls.Add(this.btnClearC4StandyInfo);
this.groupBox2.Controls.Add(this.btnWO);
this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Location = new System.Drawing.Point(935, 30);
this.groupBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupBox2.Size = new System.Drawing.Size(388, 151);
this.groupBox2.Size = new System.Drawing.Size(203, 151);
this.groupBox2.TabIndex = 32;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "操作";
//
// btnClearC4StandyInfo
//
this.btnClearC4StandyInfo.Location = new System.Drawing.Point(21, 24);
this.btnClearC4StandyInfo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnClearC4StandyInfo.Name = "btnClearC4StandyInfo";
this.btnClearC4StandyInfo.Size = new System.Drawing.Size(100, 65);
this.btnClearC4StandyInfo.TabIndex = 44;
this.btnClearC4StandyInfo.Text = "清除4C待机位占用";
this.btnClearC4StandyInfo.UseVisualStyleBackColor = true;
this.btnClearC4StandyInfo.Click += new System.EventHandler(this.btnClearC4StandyInfo_Click);
//
// BtnMissionPause
//
this.BtnMissionPause.Location = new System.Drawing.Point(691, 201);
this.BtnMissionPause.Margin = new System.Windows.Forms.Padding(4);
this.BtnMissionPause.Name = "BtnMissionPause";
this.BtnMissionPause.Size = new System.Drawing.Size(100, 65);
this.BtnMissionPause.TabIndex = 2;
this.BtnMissionPause.Text = "暂停";
this.BtnMissionPause.UseVisualStyleBackColor = true;
this.BtnMissionPause.Click += new System.EventHandler(this.BtnMissionPause_Click);
//
// BtnClearError
//
this.BtnClearError.Location = new System.Drawing.Point(539, 201);
......@@ -816,16 +832,17 @@
this.BtnMissionAdd.UseVisualStyleBackColor = true;
this.BtnMissionAdd.Click += new System.EventHandler(this.BtnMissionAdd_Click);
//
// BtnMissionPause
// LstAgvPlace
//
this.BtnMissionPause.Location = new System.Drawing.Point(691, 201);
this.BtnMissionPause.Margin = new System.Windows.Forms.Padding(4);
this.BtnMissionPause.Name = "BtnMissionPause";
this.BtnMissionPause.Size = new System.Drawing.Size(100, 65);
this.BtnMissionPause.TabIndex = 2;
this.BtnMissionPause.Text = "暂停";
this.BtnMissionPause.UseVisualStyleBackColor = true;
this.BtnMissionPause.Click += new System.EventHandler(this.BtnMissionPause_Click);
this.LstAgvPlace.Dock = System.Windows.Forms.DockStyle.Left;
this.LstAgvPlace.FormattingEnabled = true;
this.LstAgvPlace.IntegralHeight = false;
this.LstAgvPlace.ItemHeight = 15;
this.LstAgvPlace.Location = new System.Drawing.Point(4, 4);
this.LstAgvPlace.Margin = new System.Windows.Forms.Padding(4);
this.LstAgvPlace.Name = "LstAgvPlace";
this.LstAgvPlace.Size = new System.Drawing.Size(199, 365);
this.LstAgvPlace.TabIndex = 0;
//
// BtnMissionReady
//
......@@ -838,18 +855,6 @@
this.BtnMissionReady.UseVisualStyleBackColor = true;
this.BtnMissionReady.Click += new System.EventHandler(this.BtnMissionReady_Click);
//
// LstAgvPlace
//
this.LstAgvPlace.Dock = System.Windows.Forms.DockStyle.Left;
this.LstAgvPlace.FormattingEnabled = true;
this.LstAgvPlace.IntegralHeight = false;
this.LstAgvPlace.ItemHeight = 15;
this.LstAgvPlace.Location = new System.Drawing.Point(4, 4);
this.LstAgvPlace.Margin = new System.Windows.Forms.Padding(4);
this.LstAgvPlace.Name = "LstAgvPlace";
this.LstAgvPlace.Size = new System.Drawing.Size(199, 365);
this.LstAgvPlace.TabIndex = 0;
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.ColumnCount = 1;
......@@ -1033,17 +1038,6 @@
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column21;
private System.Windows.Forms.DataGridViewTextBoxColumn Column18;
private System.Windows.Forms.DataGridViewTextBoxColumn Column20;
private System.Windows.Forms.DataGridViewTextBoxColumn Column23;
private System.Windows.Forms.DataGridViewTextBoxColumn Column13;
private System.Windows.Forms.DataGridViewTextBoxColumn Column19;
private System.Windows.Forms.DataGridViewButtonColumn Column11;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Label lblDestInfo;
......@@ -1054,8 +1048,6 @@
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.Button btnUpdateStatus;
private System.Windows.Forms.TextBox txtBoxRFID;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button btnWO;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel7;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.DataGridView dgvLineMission;
......@@ -1067,6 +1059,20 @@
private System.Windows.Forms.Button btnClearC4StandyInfo;
private System.Windows.Forms.Label lblStandy2;
private System.Windows.Forms.Label lblStandy1;
private System.Windows.Forms.TextBox txtBoxLineName;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column14;
private System.Windows.Forms.DataGridViewTextBoxColumn Column21;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column18;
private System.Windows.Forms.DataGridViewTextBoxColumn Column23;
private System.Windows.Forms.DataGridViewTextBoxColumn Column13;
private System.Windows.Forms.DataGridViewTextBoxColumn Column19;
private System.Windows.Forms.DataGridViewButtonColumn Column11;
}
}
......@@ -109,10 +109,12 @@ namespace AGVControl
DgvAgv.Rows[agvIndex].SetValues(Common.agvInfo[agvIndex].ToRow());
}));
ShowEmptyTask();
System.GC.Collect();
}
private void MissionManager_MissionChanged()
{
ShowEmptyTask();
}
private void Control_AgvOnline(int agvIndex)
{
Invoke(new Action(() => { DgvAgv.Rows[agvIndex].DefaultCellStyle.ForeColor = Common.agvInfo[agvIndex].IsCon ? Color.Black : Color.Red; }));
......@@ -148,17 +150,6 @@ namespace AGVControl
if (WindowState == FormWindowState.Minimized)
WindowState = FormWindowState.Normal;
}
private void AgvMissionChanged()
{
if (!Common.missionManager.AGV_Name_EmptyTask.Equals(""))
Invoke(new Action(() =>
{
//txtBoxAGV_EmptyTask.Text = Common.missionManager.AGV_Name_EmptyTask;
groupBox1.Text = "产线任务[" + Common.missionManager.AGV_Name_EmptyTask + "]";
}));
ShowEmptyTask();
}
private void FrmMain_Load(object sender, EventArgs e)
{
//托盘菜单
......@@ -176,12 +167,13 @@ namespace AGVControl
ShowConfig();
change = true;
ChkAutoCharge.Checked = Common.chargeStatus.AutoCharge;
//ChkAutoCharge.Checked = Common.chargeStatus.AutoCharge;
change = false;
Common.control.AgvChanged += Control_AgvChanged;
Common.control.AgvOnline += Control_AgvOnline;
Common.server.NodeChanged += Server_NodeChanged;
Common.server.NodeOnline += Server_NodeOnline;
Common.missionManager.MissionChanged += MissionManager_MissionChanged;
//foreach (var item in Common.agvInfo)
//{
// cmbBoxAGVName.Items.Add(item.Name);
......@@ -218,11 +210,17 @@ namespace AGVControl
{
if (Common.agvInfo[e.RowIndex].IsUse.Equals(true))
{
if (MessageBox.Show("是否关闭当前小车的自动模式?", Common.agvInfo[e.RowIndex].Name + "_警告", MessageBoxButtons.YesNo).Equals(DialogResult.Yes))
{
// if (MessageBox.Show("是否关闭当前小车的自动模式?", Common.agvInfo[e.RowIndex].Name + "_警告", MessageBoxButtons.YesNo).Equals(DialogResult.Yes))
// {
Common.agvInfo[e.RowIndex].IsUse = false;
Common.agvInfo[e.RowIndex].CurJob = null;
Common.agvInfo[e.RowIndex].RFID = "";
//Common.agvInfo[e.RowIndex].CurJob = null;
//Common.agvInfo[e.RowIndex].RFID = "";
// }
}
else
{
//if (MessageBox.Show("是否继续小车上一次的自动运行任务?", Common.agvInfo[e.RowIndex].Name + "_提示", MessageBoxButtons.YesNo).Equals(DialogResult.No))
// {
//清除4c临时待机位的占用
if (Common.agvInfo[e.RowIndex].Name.Equals(Common.StandbyStation.C4_Station1))
{
......@@ -232,64 +230,25 @@ namespace AGVControl
{
Common.StandbyStation.C4_Station2 = "";
}
Common.LogInfo(string.Format("手动关闭小车自动模式,{0} {1}", Common.agvInfo[e.RowIndex].Name, Common.agvInfo[e.RowIndex].RunInfo()));
}
}
else
{
Common.LogInfo(string.Format("手动开启小车自动模式,并清除上一次的自动模式的运行信息{0} {1}", Common.agvInfo[e.RowIndex].Name, Common.agvInfo[e.RowIndex].RunInfo()));
Common.agvInfo[e.RowIndex].CurJob = null;
Common.agvInfo[e.RowIndex].RFID = "";
Common.agvInfo[e.RowIndex].Place = "";
Common.agvInfo[e.RowIndex].IsUse = true;
// }
//else
//{
// Common.agvInfo[e.RowIndex].IsUse = true;
// Common.LogInfo(string.Format("手动开启小车自动模式,并继续上一次的自动模式的运行信息{0} {1}", Common.agvInfo[e.RowIndex].Name, Common.agvInfo[e.RowIndex].RunInfo()));
//}
}
DgvAgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = Common.agvInfo[e.RowIndex].IsUse.ToString();
Common.WriteIni(Common.agvInfo[e.RowIndex].Name, SettingString.IsUse, Common.agvInfo[e.RowIndex].IsUse.ToString());
Common.appConfig.Save();
DgvAgv.Rows[e.RowIndex].SetValues(Common.agvInfo[e.RowIndex].ToRow());
}
else if (e.ColumnIndex == 13) //清除缓存
{
Common.agvInfo[e.RowIndex].IsUse = false;
//清除小车缓存
Common.LogInfo(string.Format("手动清除agv缓存,{0} {1}", Common.agvInfo[e.RowIndex].Name, Common.agvInfo[e.RowIndex].Place));
//string place = Common.agvInfo[e.RowIndex].Place;
//Common.agvInfo[e.RowIndex].Place = "";
//Common.agvInfo[e.RowIndex].PlaceAliceName = "";
//Common.agvInfo[e.RowIndex].RFID = "";
//Common.agvInfo[e.RowIndex].NextPlace = "";
//Common.agvInfo[e.RowIndex].NextPlaceAliceName = "";
//Common.agvInfo[e.RowIndex].TaskSend = "";
//Common.agvInfo[e.RowIndex].Msg = "";
// Common.agvInfo[e.RowIndex].CurJob = null;
//清除执行空架任务的小车
//if (Common.missionManager.AGV_Name_EmptyTask == Common.agvInfo[e.RowIndex].Name)
// Common.missionManager.AGV_Name_EmptyTask = "";
DgvAgv.Rows[e.RowIndex].SetValues(Common.agvInfo[e.RowIndex].ToRow());
//清除节点缓存
//int idx = Common.nodeInfo.FindIndex(s => s.Name == place);
//if (idx > -1)
//{
// Common.nodeInfo[idx].AgvName = "";
// DgvNode.Rows[idx].Cells[5].Value = "";
//}
////添加Init任务
//Common.mir.Add_Mission_Fleet(Common.agvInfo[e.RowIndex], Common.agvMission["Init"]);
//Common.mir.Add_Mission(Common.agvInfo[e.RowIndex], Common.agvMission["Init"]);
// Common.mir.State_Ready(Common.agvInfo[e.RowIndex]);
//判断小车负载与实际是否匹配
//Common.mir.Get_IO_Status(Common.agvInfo[e.RowIndex], out bool[] input, out bool[] output);
//if (input != null && input.Length == 4)
//{
// if (!Common.agvInfo[e.RowIndex].IsExistShelf.Equals(input[3]))
// {
// if (MessageBox.Show("满载IO信号与当前负载信号不一致,是否同步?", "警告", MessageBoxButtons.YesNo).Equals(DialogResult.Yes))
// Common.agvInfo[e.RowIndex].IsExistShelf = input[3];
// DgvAgv.Rows[e.RowIndex].SetValues(Common.agvInfo[e.RowIndex].ToRow());
// }
//}
}
}
private void DgvNode_CellClick(object sender, DataGridViewCellEventArgs e)
......@@ -358,21 +317,29 @@ namespace AGVControl
{
if (MessageBox.Show("确定在自动模式下对小车手动分配任务?", Common.agvInfo[idx].Name, MessageBoxButtons.YesNo) == DialogResult.No)
return;
Common.agvInfo[idx].Resend();
//Common.agvInfo[idx].TaskSend = LstAgvPlace.Text;
Common.LogInfo("手动添加任务:[" + Common.agvInfo[idx].Name + "][" + Common.agvInfo[idx].CurTaskName + "]");
}
//清除4c临时待机位的占用
if (Common.agvInfo[idx].Name.Equals(Common.StandbyStation.C4_Station1))
{
Common.StandbyStation.C4_Station1 = "";
}
else if (Common.agvInfo[idx].Name.Equals(Common.StandbyStation.C4_Station2))
else
{
Common.StandbyStation.C4_Station2 = "";
}
bool rtn = Common.mir.Add_Mission_Fleet(Common.agvInfo[idx], Common.agvMission[Common.showNameMissionName[LstAgvPlace.Text]]);
if (!rtn)
return;
//Common.agvInfo[idx].TaskSend = LstAgvPlace.Text;
Common.LogInfo("手动添加任务:[" + Common.agvInfo[idx].Name + "][" + Common.showNameMissionName[LstAgvPlace.Text] + "]");
if (LstAgvPlace.Text.StartsWith("Move"))
Common.agvInfo[idx].Place = LstAgvPlace.Text.Substring(4);
Common.LogInfo("手动添加任务:[" + Common.agvInfo[idx].Name + "][" + Common.agvInfo[idx].CurTaskName + "]");
}
////清除4c临时待机位的占用
//if (Common.agvInfo[idx].Name.Equals(Common.StandbyStation.C4_Station1))
//{
// Common.StandbyStation.C4_Station1 = "";
//}
//else if (Common.agvInfo[idx].Name.Equals(Common.StandbyStation.C4_Station2))
//{
// Common.StandbyStation.C4_Station2 = "";
//}
}
}
......@@ -419,7 +386,9 @@ namespace AGVControl
//if (change)
BLL.AGVManager.updateDeviceAlarmMsg(msglist);
if (!Common.doubleLine_WO.Equals(""))
lblWO.Text = Common.doubleLine_WO;
if (!AGVManager.A6_Target.Equals(""))
lblDestInfo.Text = AGVManager.A6_Target;
lblCharge3.Text = "充电桩3:" + Common.chargeStatus.charge3;
lblCharge4.Text = "充电桩4:" + Common.chargeStatus.charge4;
......@@ -444,8 +413,10 @@ namespace AGVControl
foreach (var item in Common.missionManager.missionList)
{
var key = Common.nodeInfo.Where(q => q.Name == item.NodeName).Select(q => q.AliceName);
if (key.ToList().Count > 0)
dgvLineMission.Rows.Add(item.CreateTime, key.ToList()[0]);
}
groupBox4.Text = "产线解绑信息:共" + Common.missionManager.EmptyMissionCount.ToString() + "个";
}
catch (Exception ex)
{
......@@ -453,61 +424,12 @@ namespace AGVControl
}
}
//private void BtnReadWriteCharge_Click(object sender, EventArgs e)
//{
// string name = (sender as System.Windows.Forms.Control).Name;
// //if (DgvAgv.SelectedCells.Count == 0) return;
// int idx = cmbBoxAGVName.SelectedIndex;
// if (idx >= Common.agvInfo.Count) return;
// int num =
// if (name.IndexOf("Read") > 0)
// {
// if (num == 3)
// TxtCharge.Text = Common.chargeStatus.charge3;
// else if (num == 4)
// TxtCharge4.Text = Common.chargeStatus.charge4;
// else if (num == 5)
// TxtCharge5.Text = Common.chargeStatus.charge5;
// else if (num == 6)
// TxtCharge6.Text = Common.chargeStatus.charge6;
// else if (num == 7)
// TxtCharge7.Text = Common.chargeStatus.charge7;
// }
// else if (name.IndexOf("Write") > 0)
// {
// if (num == 3)
// {
// //if(!Common.chargeStatus.charge3.Equals(""))
// //{
// // MessageBox.Show("该充电桩已有小车");
// //}
// Common.chargeStatus.charge3 = TxtCharge.Text;
// }
// else if (num == 4)
// Common.chargeStatus.charge4 = TxtCharge4.Text;
// else if (num == 5)
// Common.chargeStatus.charge5 = TxtCharge5.Text;
// else if (num == 6)
// Common.chargeStatus.charge6 = TxtCharge6.Text;
// else if (num == 7)
// Common.chargeStatus.charge7 = TxtCharge7.Text;
// if (Common.agvInfo[idx].IsCon)
// {
// bool rtn = Common.mir.Add_Mission_Fleet(Common.agvInfo[idx], Common.agvMission["AutoCharge" + num.ToString()]);
// if (!rtn)
// return;
// Common.agvInfo[idx].TaskSend = "AutoCharge" + num.ToString();
// }
// }
//}
private void ChkAutoCharge_CheckedChanged(object sender, EventArgs e)
{
if (change) return;
Common.chargeStatus.AutoCharge = ChkAutoCharge.Checked;
//Common.chargeStatus.AutoCharge = ChkAutoCharge.Checked;
}
......@@ -517,7 +439,6 @@ namespace AGVControl
{
if (cmbBoxLineName.SelectedItem == null || cmbBoxLineName.SelectedIndex == 0)
{
ShowEmptyTask();
return;
}
if (MessageBox.Show("确定删除产线任务[" + cmbBoxLineName.SelectedItem.ToString() + "]", "手动删除解绑任务", MessageBoxButtons.YesNo) == DialogResult.No)
......@@ -529,13 +450,10 @@ namespace AGVControl
{
if (Common.DelEmptyShelfTask(Common.nodeInfo[idx].Name))
{
ShowEmptyTask();
Common.LogInfo("手动删除任务成功:" + cmbBoxLineName.SelectedItem.ToString());
}
else
{
ShowEmptyTask();
Common.LogInfo("手动删除任务失败");
}
}
......@@ -543,31 +461,17 @@ namespace AGVControl
}
catch (Exception ex)
{
ShowEmptyTask();
Common.log.Error("手动删除任务失败:" + ex.Message);
}
}
private void btnSetRFID_Click(object sender, EventArgs e)
{
if (DgvAgv.SelectedCells.Count == 0) return;
int idx = DgvAgv.SelectedCells[0].RowIndex;
if (idx < 0) return;
if (Common.agvInfo[idx].IsCon)
{
Common.agvInfo[idx].RFID = txtAgvRFID.Text.ToUpper();
Common.LogInfo("手动设置 " + Common.agvInfo[idx].Name + " RFID=" + txtAgvRFID.Text);
}
}
private void btnAddMission_Click(object sender, EventArgs e)
{
try
{
if (cmbBoxLineName.SelectedItem == null || cmbBoxLineName.SelectedIndex == 0)
{
ShowEmptyTask();
return;
}
if (cmbBoxLineName.SelectedItem.ToString().StartsWith("A"))
......@@ -579,13 +483,10 @@ namespace AGVControl
{
if (Common.AddEmptyShelfTask(Common.nodeInfo[idx].Name))
{
ShowEmptyTask();
Common.LogInfo("手动添加任务成功:" + cmbBoxLineName.SelectedItem.ToString());
}
else
{
ShowEmptyTask();
Common.LogInfo("手动添加任务失败");
}
......@@ -701,23 +602,17 @@ namespace AGVControl
if (DgvAgv.SelectedCells.Count == 0) return;
int idx = DgvAgv.SelectedCells[0].RowIndex;
if (idx < 0) return;
Common.CalculateNearNode(Common.agvInfo[idx], "E");
Common.CalculateNearNode(Common.agvInfo[idx], SettingString.D4_Name_Prefix);
}
private void btnUpdateStatus_Click(object sender, EventArgs e)
{
try
{
if (DgvAgv.SelectedCells.Count == 0) return;
int idx = DgvAgv.SelectedCells[0].RowIndex;
if (idx < 0) return;
Task.Factory.StartNew(() =>
{
idx = Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A6));
if (idx > -1)
{
AGVManager.UpdateStatus(txtBoxRFID.Text.ToUpper(), Common.agvInfo[idx].Place);
}
AGVManager.UpdateStatus(txtBoxRFID.Text.ToUpper(), txtBoxLineName.Text.ToUpper());
Common.LogInfo(string.Format("手动上报状态 产线{0} 物料状态更新成功[{1}]", txtBoxLineName.Text.ToUpper(), txtBoxRFID.Text.ToUpper()));
});
}
......
......@@ -126,16 +126,16 @@
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column23.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
......
......@@ -50,8 +50,6 @@ namespace AGVControl
Common.mir = new MiR_API();
Common.control = new BLL.Control();
//软件开启时检查小车当前的任务状态,并获取各节点的坐标位置
// Common.CheckAGVMissionState();
//获取节点位置
Common.GetNodesPosition();
......
......@@ -87,23 +87,6 @@ namespace AGVControl
public string MissionText { set; get; }
/// <summary>
/// 关门,用于执行一次
/// </summary>
//public bool CloseDoor { set; get; }
/// <summary>
/// 任务发送
/// </summary>
public string TaskSend { set; get; } = "";
/// <summary>
/// 闲置等待时间,用于充电
/// </summary>
public int WaitTime { set; get; }
/// <summary>
/// 临时待机位,用于执行一次
/// </summary>
//public bool StandbyTemp { set; get; }
public DateTime DockingStartTime { get; set; } = DateTime.Now;
public class clsPosition
{
public double orientation { get; set; }
......@@ -150,38 +133,113 @@ namespace AGVControl
public string RunInfo()
{
Job tmpJob = null;
string curJobTaskName = "";
string curJobTaskState = "";
int curJobTaskID = -1;
if (CurJob != null)
{
if (CurJob is ChargeJob)
tmpJob = (ChargeJob)CurJob;
{
curJobTaskName = ((ChargeJob)CurJob).CurTaskName;
curJobTaskState = ((ChargeJob)CurJob).CurTaskState;
curJobTaskID = ((ChargeJob)CurJob).CurTaskID;
}
else if (CurJob is EmptyAGVBackJob)
tmpJob = (EmptyAGVBackJob)CurJob;
{
curJobTaskName = ((EmptyAGVBackJob)CurJob).CurTaskName;
curJobTaskState = ((EmptyAGVBackJob)CurJob).CurTaskState;
curJobTaskID = ((EmptyAGVBackJob)CurJob).CurTaskID;
}
else if (CurJob is EmptyShelfBackJob)
tmpJob = (EmptyShelfBackJob)CurJob;
{
curJobTaskName = ((EmptyShelfBackJob)CurJob).CurTaskName;
curJobTaskState = ((EmptyShelfBackJob)CurJob).CurTaskState;
curJobTaskID = ((EmptyShelfBackJob)CurJob).CurTaskID;
}
else if (CurJob is EnterLeaveShelfJob)
tmpJob = (EnterLeaveShelfJob)CurJob;
{
curJobTaskName = ((EnterLeaveShelfJob)CurJob).CurTaskName;
curJobTaskState = ((EnterLeaveShelfJob)CurJob).CurTaskState;
curJobTaskID = ((EnterLeaveShelfJob)CurJob).CurTaskID;
}
else if (CurJob is GoEmptyShelfLineJob)
tmpJob = (GoEmptyShelfLineJob)CurJob;
{
curJobTaskName = ((GoEmptyShelfLineJob)CurJob).CurTaskName;
curJobTaskState = ((GoEmptyShelfLineJob)CurJob).CurTaskState;
curJobTaskID = ((GoEmptyShelfLineJob)CurJob).CurTaskID;
}
else if (CurJob is GoFullShelfStationJob)
tmpJob = (GoFullShelfStationJob)CurJob;
{
curJobTaskName = ((GoFullShelfStationJob)CurJob).CurTaskName;
curJobTaskState = ((GoFullShelfStationJob)CurJob).CurTaskState;
curJobTaskID = ((GoFullShelfStationJob)CurJob).CurTaskID;
}
else if (CurJob is SendFullShelfToLineJob)
tmpJob = (SendFullShelfToLineJob)CurJob;
{
curJobTaskName = ((SendFullShelfToLineJob)CurJob).CurTaskName;
curJobTaskState = ((SendFullShelfToLineJob)CurJob).CurTaskState;
curJobTaskID = ((SendFullShelfToLineJob)CurJob).CurTaskID;
}
if (RFID.StartsWith("C"))
{
return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurTaskName:{4}{0}RunInfo:{5}{0}BoxDestInfo:{6}{0}GetRack:{7}{0}MissionText:{8}", "\r\n", Name, RFID, CurJob.ToString(), CurTaskName, Msg, BoxDestInfo, BLL.AGVManager.GetRackBy(RFID), MissionText);
return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurJobTaskInfo:[TaskName={4}][TaskID={5}][TaskState={6}]{0}RunInfo:{7}{0}BoxDestInfo:{8}{0}GetRack:{9}{0}MissionText:{10}",
"\r\n", Name, RFID, CurJob.ToString(), curJobTaskName, curJobTaskID, curJobTaskState, Msg, BoxDestInfo, BLL.AGVManager.GetRackBy(RFID), MissionText);
}
else if (!RFID.Equals(""))
else if (RFID.StartsWith("D"))
{
return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurTaskName:{4}{0}RunInfo:{5}{0}BoxDestInfo:{6}{0}MissionText:{7}", "\r\n", Name, RFID, CurJob.ToString(), CurTaskName, Msg, BoxDestInfo, MissionText);
return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurJobTaskInfo:[TaskName={4}][TaskID={5}][TaskState={6}]{0}RunInfo:{7}{0}BoxDestInfo:{8}{0}MissionText:{9}",
"\r\n", Name, RFID, CurJob.ToString(), curJobTaskName, curJobTaskID, curJobTaskState, Msg, BoxDestInfo, MissionText);
}
else
return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurTaskName:{4}{0}RunInfo:{5}{0}MissionText:{6}", "\r\n", Name, RFID, CurJob.ToString(), CurTaskName, Msg, MissionText);
return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurJobTaskInfo:[TaskName={4}][TaskID={5}][TaskState={6}]{0}RunInfo:{7}{0}MissionText:{8}",
"\r\n", Name, RFID, CurJob.ToString(), curJobTaskName, curJobTaskID, curJobTaskState, Msg, MissionText);
}
else
return string.Format("Name:{1}{0}RFID:{2}{0}CurTaskName:{3}{0}MissionText:{4}", "\r\n", Name, RFID, CurTaskName, MissionText);
return string.Format("Name:{1}{0}RFID:{2}{0}CurTaskInfo:[TaskName={3}][TaskID={4}][TaskState={5}]{0}MissionText:{6}",
"\r\n", Name, RFID, curJobTaskName, curJobTaskID, curJobTaskState, MissionText);
}
/// <summary>
/// 任务重发
/// </summary>
public void Resend()
{
if (CurJob != null)
{
if (CurJob is ChargeJob)
{
((ChargeJob)CurJob).ResendTask(this);
}
else if (CurJob is EmptyAGVBackJob)
{
((EmptyAGVBackJob)CurJob).ResendTask(this);
}
else if (CurJob is EmptyShelfBackJob)
{
((EmptyShelfBackJob)CurJob).ResendTask(this);
}
else if (CurJob is EnterLeaveShelfJob)
{
((EnterLeaveShelfJob)CurJob).ResendTask(this);
}
else if (CurJob is GoEmptyShelfLineJob)
{
((GoEmptyShelfLineJob)CurJob).ResendTask(this);
}
else if (CurJob is GoFullShelfStationJob)
{
((GoFullShelfStationJob)CurJob).ResendTask(this);
}
else if (CurJob is SendFullShelfToLineJob)
{
((SendFullShelfToLineJob)CurJob).ResendTask(this);
}
}
}
public Agv_Info(string id, string name, string ip, string authorization, string ioID, bool isUse, string rfid)
{
......@@ -194,7 +252,6 @@ namespace AGVControl
IsCon = false;
_IsUse = isUse;
Place = "";
TaskSend = "";
Msg = "";
Position = new Agv_Info.clsPosition();
}
......@@ -247,39 +304,39 @@ namespace AGVControl
return isChange;
}
public void GetPlace(int value)
{
// Common.log.Debug(Name + " PLC20=" + value);
if (value == 0)
{
Place = "";
PlaceState = ePlaceState.None;
}
else if (value > 0 && value < 1000)
{
//Place = "";
//PlaceState = PlaceState.None;
//TaskSend = "";
}
else if (value >= 1000)
{
int a = value / 1000;
int b = (value - a * 1000) / 10;
int c = value - a * 1000 - b * 10;
if (c.Equals(1) || c.Equals(3) || c.Equals(5))//Move,Enter,Leave
TaskSend = "";
Place = (char)(64 + a) + b.ToString();
if (Common.nodeInfo != null && Common.nodeInfo.Count != 0)
{
ClientNode node = Common.nodeInfo.Find(s => s.Name == Place);
if (node != null)
PlaceAliceName = node.AliceName;
else
PlaceAliceName = Place;
}
PlaceState = (ePlaceState)c;
}
}
//public void GetPlace(int value)
//{
// // Common.log.Debug(Name + " PLC20=" + value);
// if (value == 0)
// {
// Place = "";
// PlaceState = ePlaceState.None;
// }
// else if (value > 0 && value < 1000)
// {
// //Place = "";
// //PlaceState = PlaceState.None;
// //TaskSend = "";
// }
// else if (value >= 1000)
// {
// int a = value / 1000;
// int b = (value - a * 1000) / 10;
// int c = value - a * 1000 - b * 10;
// //if (c.Equals(1) || c.Equals(3) || c.Equals(5))//Move,Enter,Leave
// // TaskSend = "";
// Place = (char)(64 + a) + b.ToString();
// if (Common.nodeInfo != null && Common.nodeInfo.Count != 0)
// {
// ClientNode node = Common.nodeInfo.Find(s => s.Name == Place);
// if (node != null)
// PlaceAliceName = node.AliceName;
// else
// PlaceAliceName = Place;
// }
// PlaceState = (ePlaceState)c;
// }
//}
public string[] ToRow()
{
......@@ -287,35 +344,25 @@ namespace AGVControl
List<string> s = new List<string>();
s.Add(Name);
s.Add(IP);
// if (IsCon)
//{
s.Add(StateID.ToString());
s.Add(CurTaskID.ToString());
s.Add(CurTaskName);
s.Add(CurTaskState);
s.Add(RFID);
//s.Add(Msg);
// s.Add(MissionText);
if (Common.nodeInfo != null && Common.nodeInfo.Count != 0)
{
ClientNode node = Common.nodeInfo.Find(ss => ss.Name == Place);
if (node != null)
PlaceAliceName = node.AliceName;
else
PlaceAliceName = Place;
}
s.Add(PlaceAliceName);
//s.Add(Place);
s.Add(PlaceState.ToString());
//if (Common.nodeInfo != null && Common.nodeInfo.Count != 0)
//{
// ClientNode node = Common.nodeInfo.Find(q => q.Name == NextPlace);
// if (node != null)
// NextPlaceAliceName = node.AliceName;
// else
// NextPlaceAliceName = NextPlace;
//}
//s.Add(NextPlaceAliceName);
//}
//else
//{
// s.AddRange(new List<string> { "", "", "", "", "", "", "" });
//}
s.Add(IsExistShelf ? "满载" : "空载");
s.Add(IsCon ? "在线" : "离线");
s.Add(Battery + "%");
s.Add(IsUse ? "是" : "否");
// s.Add("清空");
return s.ToArray();
}
......
......@@ -20,6 +20,69 @@ namespace AGVControl
/// </summary>
public abstract Job Execute(Agv_Info agv);
public int CurTaskID { get; set; } = -1;
/// <summary>
/// 当前的任务名称(与任务GUID对应)
/// </summary>
public string CurTaskName { get; set; } = "";
/// <summary>
/// 当前任务的执行状态
/// </summary>
public string CurTaskState { get; set; } = "Wait";
/// <summary>
/// 更新任务信息
/// </summary>
/// <param name="curTaskName"></param>
/// <param name="curTaskId"></param>
protected void UpdateJobTaskInfo(string curTaskName, int curTaskId)
{
CurTaskID = curTaskId;
CurTaskName = curTaskName;
//CurTaskState = SettingString.Wait;
CurTaskState = Common.GetTakJobState(CurTaskID);
}
/// <summary>
/// 任务重发
/// </summary>
/// <returns></returns>
public bool ResendTask(Agv_Info agv)
{
bool rtn = false;
if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string stateStr))
{
if (stateStr.Equals(SettingString.Aborted))
{
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[CurTaskName]);
if (rtn)
{
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
return true;
}
}
}
else if (!CurTaskName.Equals("") && !Common.agvMission[CurTaskName].Equals(agv.CurTaskGUID))//Job的当前任务与agv最新任务不一致
{
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[CurTaskName]);
if (rtn)
{
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
return true;
}
}
else if (CurTaskID.Equals(-1))//任务发送失败,重新发送
{
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[CurTaskName]);
if (rtn)
{
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
return true;
}
}
return false;
}
}
}
......@@ -28,7 +28,7 @@ namespace AGVControl
/// <summary>
/// 接收任务时,agv的位置
/// </summary>
private string agvPlace { get; set; }
private string agvPlace = "";
private string runInfo = "";
/// <summary>
......@@ -39,7 +39,6 @@ namespace AGVControl
get { return runInfo; }
}
private JobStep<CHARGE_STEP> ChargeStep = new JobStep<CHARGE_STEP>(CHARGE_STEP.NONE);
/// <summary>
......@@ -52,11 +51,14 @@ namespace AGVControl
bool rtn = false;
runInfo = "";
agv.Msg = runInfo;
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
CurTaskState = Common.GetTakJobState(CurTaskID);
if (ChargeStep.IsStep(CHARGE_STEP.NONE))
{
if (agv.Battery > Common.chargeStatus.chargeMax)
{
if (agv.Place.StartsWith(SettingString.Standby_Name_Prefix))//在待机位不操作
if (agv.Place.Equals(SettingString.Standby))//在待机位不操作
{
ChargeStep.ToNextStep(CHARGE_STEP.END);
runInfo = "在待机位,电量充足[" + agv.Battery + "%],等待任务";
......@@ -64,13 +66,14 @@ namespace AGVControl
ChargeStep.Msg = msg;
}
else if (agvPlace.StartsWith("G"))
else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix))
{
ChargeStep.ToNextStep(CHARGE_STEP.WAIT_AGV_REACH_4D_DOOR);
runInfo = "电量充足[" + agv.Battery + "%],从当前位置4C-" + agvPlace + "回到待机位,先到4D门";
runInfo = "电量充足[" + agv.Battery + "%],从当前位置" + agvPlace + "回到待机位,先到4D门";
msg += runInfo;
ChargeStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -81,11 +84,12 @@ namespace AGVControl
//Common.StatusCharge(agv);
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else
{
if (agvPlace.StartsWith("G"))
if (agvPlace.StartsWith(SettingString.C4_Name_Prefix))
{
ChargeStep.ToNextStep(CHARGE_STEP.WAIT_AGV_REACH_4D_DOOR);
runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + Common.chargeStatus.chargeMax + "%],从当前位置" + agvPlace + "回到充电位,先到4D门";
......@@ -93,6 +97,7 @@ namespace AGVControl
ChargeStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -104,14 +109,15 @@ namespace AGVControl
msg += runInfo;
ChargeStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
ChargeStep.ToNextStep(CHARGE_STEP.WAIT_REACH_CHARGE_STATION);
runInfo = "电量[" + agv.Battery + " %]小于最大电量[" + Common.chargeStatus.chargeMax + " %],从当前位置" + agvPlace + "回到充电位";
runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + Common.chargeStatus.chargeMax + "%],从当前位置" + agvPlace + "回到充电位";
msg += runInfo;
ChargeStep.Msg = msg;
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
}
......@@ -120,7 +126,7 @@ namespace AGVControl
else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_AGV_REACH_4D_DOOR))
{
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, agv.CurTaskGUID))
if (Common.CheckTaskFinished(agv,SettingString.DoorCToD,CurTaskState))
{
if (agv.Battery > Common.chargeStatus.chargeMax)
{
......@@ -129,6 +135,7 @@ namespace AGVControl
msg += runInfo;
ChargeStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -140,6 +147,7 @@ namespace AGVControl
ChargeStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -147,6 +155,7 @@ namespace AGVControl
runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + Common.chargeStatus.chargeMax + "%],从当前位置" + agvPlace + "回到充电位";
msg += runInfo;
ChargeStep.Msg = msg;
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
......@@ -154,7 +163,7 @@ namespace AGVControl
}
else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_REACH_CHARGE_STATION))
{
if (Common.CheckTaskFinished(agv, agv.CurTaskName))
if (Common.CheckTaskFinished(agv,CurTaskName))
{
ChargeStep.ToNextStep(CHARGE_STEP.WAIT_REACH_CHARGE_OK);
runInfo = "充电任务分配完成,去充电且等待任务";
......@@ -181,6 +190,7 @@ namespace AGVControl
Common.chargeStatus.charge4 = "";
}
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if (agv.Battery >= Common.chargeStatus.chargeMin)
{
......@@ -195,7 +205,7 @@ namespace AGVControl
{
Common.chargeStatus.charge4 = "";
}
runInfo = "充电过程检测到任务,电量[" + agv.Battery + "]大于最小电量[" + Common.chargeStatus.chargeMin + "],中断充电执行任务";
runInfo = "充电过程检测到任务,电量[" + agv.Battery + "%]大于最小电量[" + Common.chargeStatus.chargeMin + "%],中断充电执行任务";
msg += runInfo;
ChargeStep.Msg = msg;
return job;
......@@ -217,7 +227,7 @@ namespace AGVControl
Job job = Common.control.GetJob(agv);
if (job != null && !(job is ChargeJob))
{
runInfo = "充电过程检测到任务,电量[" + agv.Battery + "]大于最小电量[" + Common.chargeStatus.chargeMin + "],中断充电执行任务";
runInfo = "充电过程检测到任务,电量[" + agv.Battery + "%]大于最小电量[" + Common.chargeStatus.chargeMin + "%],中断充电执行任务";
msg += runInfo;
ChargeStep.Msg = msg;
if (Common.chargeStatus.charge3.Equals(agv.Name))
......@@ -233,7 +243,7 @@ namespace AGVControl
else if (job == null && agv.Battery < Common.chargeStatus.chargeMax / 2)
{
ChargeStep.ToNextStep(CHARGE_STEP.NONE);
runInfo = "在待机位暂无任务,且当前电量小于" + Common.chargeStatus.chargeMax / 2 + ",去充电位";
runInfo = "在待机位暂无任务,且当前电量小于" + Common.chargeStatus.chargeMax / 2 + "%,去充电位";
msg += runInfo;
ChargeStep.Msg = msg;
if (Common.chargeStatus.charge3.Equals(agv.Name))
......@@ -252,7 +262,7 @@ namespace AGVControl
}
else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_REACH_STANDBY))
{
if (Common.CheckTaskFinished(agv, SettingString.Standby, agv.CurTaskGUID))
if (Common.CheckTaskFinished(agv, SettingString.Standby, CurTaskState))
{
ChargeStep.ToNextStep(CHARGE_STEP.END);
runInfo= "充电完成,到达待机位";
......@@ -262,7 +272,7 @@ namespace AGVControl
}
else if (ChargeStep.IsStep(CHARGE_STEP.END))
{
runInfo = "等待任务";
Job job = Common.control.GetJob(agv);
if (job != null && !(job is ChargeJob))
{
......@@ -282,7 +292,7 @@ namespace AGVControl
else if (job == null && agv.Battery < Common.chargeStatus.chargeMax / 2)
{
ChargeStep.ToNextStep(CHARGE_STEP.NONE);
runInfo= "在待机位暂无任务,且当前电量小于" + Common.chargeStatus.chargeMax / 2 + ",去充电位";
runInfo= "在待机位暂无任务,且当前电量小于" + Common.chargeStatus.chargeMax / 2 + "%,去充电位";
msg += runInfo;
ChargeStep.Msg = msg;
if (Common.chargeStatus.charge3.Equals(agv.Name))
......
......@@ -52,7 +52,9 @@ namespace AGVControl
string msg = agv.Name + " ";
bool rtn = false;
agv.Msg = runInfo;
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
CurTaskState = Common.GetTakJobState(CurTaskID);
if (EmptyAGVBackStep.IsStep(EMPTY_AGV_BACK_STEP.NONE))
{
......@@ -69,13 +71,14 @@ namespace AGVControl
else
{
if (agvPlace.StartsWith("G"))
if (agvPlace.StartsWith(SettingString.C4_Name_Prefix))
{
EmptyAGVBackStep.ToNextStep(EMPTY_AGV_BACK_STEP.WAIT_AGV_REACH_4D_DOOR);
runInfo= "从产线" + agvPlace + "回待机位,先到4D门";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -84,6 +87,7 @@ namespace AGVControl
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
//EmptyAGVBackStep.ToNextStep(EMPTY_AGV_BACK_STEP.END);
......@@ -91,13 +95,14 @@ namespace AGVControl
}
else
{
if (agvPlace.StartsWith("G"))
if (agvPlace.StartsWith(SettingString.C4_Name_Prefix))
{
EmptyAGVBackStep.ToNextStep(EMPTY_AGV_BACK_STEP.WAIT_AGV_REACH_4D_DOOR);
runInfo= "从产线" + agvPlace + "回待机位,先到4D门";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -106,12 +111,14 @@ namespace AGVControl
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
}
else if (EmptyAGVBackStep.IsStep(EMPTY_AGV_BACK_STEP.WAIT_REACH_STANDBY))
{
if (Common.CheckTaskFinished(agv, SettingString.Standby, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.Standby,CurTaskState))
{
Job job = Common.control.GetJob(agv);
if (job == null && agv.Battery < Common.chargeStatus.chargeMax)
......@@ -150,21 +157,22 @@ namespace AGVControl
}
else if (EmptyAGVBackStep.IsStep(EMPTY_AGV_BACK_STEP.WAIT_AGV_REACH_4D_DOOR))
{
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState))
{
if (Common.FindFullShelfTask(agv))
{
runInfo= "从产线" + agvPlace + "到达4D门,检测到A6出满料,去A6";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
return new GoFullShelfStationJob(SettingString.D4_DOOR_Name);
return new GoFullShelfStationJob(SettingString.DoorCToD);
}
else
{
runInfo= "从产线" + agvPlace + "到达4D门,暂无任务,去充电位";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
return new ChargeJob(SettingString.D4_DOOR_Name);
return new ChargeJob(SettingString.DoorCToD);
}
}
}
......
......@@ -40,7 +40,7 @@ namespace AGVControl
/// </summary>
private string EmptyShelfTargetPlace { get; set; }
private int tryTimes = 0;
private eShelfType shelfType;
private string runInfo = "";
/// <summary>
......@@ -63,15 +63,19 @@ namespace AGVControl
string msg = agv.Name+ " ";
bool rtn = false;
agv.Msg = runInfo;
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
if (EmptyBackStep.IsStep(EMPTY_SHELF_BACK_STEP.NONE))
{
if (EmptyShelfPlace.StartsWith("G"))//4车间
if (EmptyShelfPlace.StartsWith(SettingString.C4_Name_Prefix))//4C车间
{
EmptyBackStep.ToNextStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_DOOR);
runInfo= "空料架从产线" + EmptyShelfPlace + "前往4D门";
msg += runInfo;
EmptyBackStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -83,7 +87,11 @@ namespace AGVControl
msg += runInfo;
EmptyBackStep.Msg = msg;
if (!EmptyShelfTargetPlace.Equals(""))
{
Common.MoveToNode(agv, EmptyShelfTargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else
{
......@@ -92,12 +100,14 @@ namespace AGVControl
msg += runInfo;
EmptyBackStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
}
else if (EmptyBackStep.IsStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_DOOR))
{
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState))
{
if (Common.CheckA5A6State(agv, shelfType, out string nodeName))
{
......@@ -107,6 +117,7 @@ namespace AGVControl
msg += runInfo;
EmptyBackStep.Msg = msg;
Common.MoveToNode(agv, EmptyShelfTargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -115,11 +126,13 @@ namespace AGVControl
msg += runInfo;
EmptyBackStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
}
else if (EmptyBackStep.IsStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_STANDBY))
{
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckA5A6State(agv, shelfType, out string nodeName))
{
EmptyShelfTargetPlace = nodeName;
......@@ -128,11 +141,13 @@ namespace AGVControl
msg += runInfo;
EmptyBackStep.Msg = msg;
Common.MoveToNode(agv, EmptyShelfTargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else if (EmptyBackStep.IsStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_A5A6))
{
if (Common.CheckTaskFinished(agv, EmptyShelfTargetPlace, agv.CurTaskGUID) && EmptyShelfTargetPlace.StartsWith("A"))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, EmptyShelfTargetPlace, CurTaskState) && EmptyShelfTargetPlace.StartsWith("A"))
{
//msg = "AGV到达 " + EmptyShelfTargetPlace;
//EmptyBackStep.Msg = msg;
......@@ -157,21 +172,49 @@ namespace AGVControl
msg += runInfo;
EmptyBackStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Leave"]);
agv.TaskSend = rtn ? "Leave" : "";
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else if (EmptyBackStep.IsTimeOut(15000, out double timeOutValue))
{
EmptyBackStep.ToNextStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_A5A6);
runInfo= "AGV到达 " + EmptyShelfTargetPlace + ",15秒后重新向双层线发送入料架请求[ReadyEnter]";
tryTimes++;
if (tryTimes < 5)
return this;
// if(EmptyShelfTargetPlace.Equals(SettingString.A6))
// {
tryTimes = 0;
EmptyBackStep.ToNextStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_STANDBY);
runInfo = "双层线"+ EmptyShelfTargetPlace + "暂不需要空料架,从[" + EmptyShelfTargetPlace + "]到待机位";
msg += runInfo;
EmptyBackStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
// }
//else if(EmptyShelfTargetPlace.Equals(SettingString.A5))
//{
// tryTimes = 0;
// EmptyBackStep.ToNextStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_STANDBY);
// runInfo = "双层线A5暂不需要空料架,从[" + EmptyShelfTargetPlace + "]到待机位";
// msg += runInfo;
// EmptyBackStep.Msg = msg;
// Common.MoveToNode(agv, SettingString.Standby);
// UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
//}
//else
//{
// EmptyBackStep.ToNextStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_A5A6);
//}
// EmptyBackStep.ToNextStep(EMPTY_SHELF_BACK_STEP.WAIT_AGV_REACH_A5A6);
//runInfo= "AGV到达 " + EmptyShelfTargetPlace + ",15秒后重新向双层线发送入料架请求[ReadyEnter]";
//msg += runInfo;
//EmptyBackStep.Msg = msg;
}
}
else if (EmptyBackStep.IsStep(EMPTY_SHELF_BACK_STEP.WAIT__EMPTY_SHELF_IN_DOUBLE_LINE))
{
if (Common.CheckEnterOrLeaveFinished(agv,"Leave",agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckEnterOrLeaveFinished(agv,"Leave",CurTaskState))
{
//EmptyBackStep.ToNextStep(EMPTY_SHELF_BACK_STEP.END);
......@@ -189,6 +232,8 @@ namespace AGVControl
runInfo= "空料架进入" + EmptyShelfTargetPlace + "完成,暂无任务,回充电位";
msg += runInfo;
EmptyBackStep.Msg = msg;
agv.RFID = "";
agv.BoxDestInfo = "";
return new ChargeJob(SettingString.DoubleLine_Name_Prefix);
}
......@@ -197,8 +242,8 @@ namespace AGVControl
{
//链条停止
runInfo= "空料架在[" + EmptyShelfTargetPlace + "]离开小车超时[" + timeOutValue.ToString("f1") + "秒],请检查料架离开小车的情况";
msg += runInfo;
EmptyBackStep.Msg = msg;
//msg += runInfo;
//EmptyBackStep.Msg = msg;
}
}
......
......@@ -70,6 +70,8 @@ namespace AGVControl
string msg = agv.Name+ " ";
bool rtn = false;
agv.Msg = runInfo;
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
if (EnterLeaveShelfStep.IsStep(ENTER_LEAVE_SHELF_STEP.NONE))
{
if (ActionType.Equals(eEnterLeaveType.Leave))
......@@ -83,7 +85,7 @@ namespace AGVControl
msg += runInfo;
EnterLeaveShelfStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Leave"]);
agv.TaskSend = rtn ? "Leave" : "";
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if(ActionType.Equals(eEnterLeaveType.Enter))
{
......@@ -96,7 +98,7 @@ namespace AGVControl
msg += runInfo;
EnterLeaveShelfStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Enter"]);
agv.TaskSend = rtn ? "Enter" : "";
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else if (EnterLeaveShelfStep.IsStep(ENTER_LEAVE_SHELF_STEP.WAIT_LINE_ReadyEnter_RESPONSE))
......@@ -110,7 +112,7 @@ namespace AGVControl
msg += runInfo;
EnterLeaveShelfStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Leave"]);
agv.TaskSend = rtn ? "Leave" : "";
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if (EnterLeaveShelfStep.IsTimeOut(15000, out double timeOutValue))
{
......@@ -131,7 +133,7 @@ namespace AGVControl
msg += runInfo;
EnterLeaveShelfStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Enter"]);
agv.TaskSend = rtn ? "Enter" : "";
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if (EnterLeaveShelfStep.IsTimeOut(15000, out double timeOutValue))
{
......@@ -143,7 +145,8 @@ namespace AGVControl
}
else if (EnterLeaveShelfStep.IsStep(ENTER_LEAVE_SHELF_STEP.WAIT__SHELF_IN_LINE))
{
if (Common.CheckEnterOrLeaveFinished(agv, "Leave", agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckEnterOrLeaveFinished(agv, "Leave", CurTaskState))
{
//EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END);
......@@ -158,14 +161,15 @@ namespace AGVControl
{
//链条停止
runInfo= "料架在[" + LineName + "]离开小车超时[" + timeOutValue.ToString("f1") + "秒],请检查料架离开小车的情况";
msg += runInfo;
EnterLeaveShelfStep.Msg = msg;
//msg += runInfo;
//EnterLeaveShelfStep.Msg = msg;
}
}
else if (EnterLeaveShelfStep.IsStep(ENTER_LEAVE_SHELF_STEP.WAIT__SHELF_OUT_LINE))
{
if (Common.CheckEnterOrLeaveFinished(agv, "Enter", agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckEnterOrLeaveFinished(agv, "Enter", CurTaskState))
{
//EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END);
......@@ -179,8 +183,8 @@ namespace AGVControl
{
//链条停止
runInfo= "料架在[" + LineName + "]进入小车超时[" + timeOutValue.ToString("f1") + "秒],请检查料架进入小车的情况";
msg += runInfo;
EnterLeaveShelfStep.Msg = msg;
//msg += runInfo;
//EnterLeaveShelfStep.Msg = msg;
}
}
......
......@@ -58,27 +58,30 @@ namespace AGVControl
bool rtn = false;
agv.Msg = runInfo;
int nodeIdx = Common.FindNode(EmptyShelfPlace);
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
if (TakeEmptyStep.IsStep(TAKE_EMPTY_STEP.NONE))
{
if (agvPlae.StartsWith("G") && EmptyShelfPlace.StartsWith("E"))//4C->4D
if (agvPlae.StartsWith(SettingString.C4_Name_Prefix) && EmptyShelfPlace.StartsWith(SettingString.D4_Name_Prefix))//4C->4D
{
TakeEmptyStep.ToNextStep(TAKE_EMPTY_STEP.WAIT_AGV_REACH_4D_DOOR);
runInfo = "去空料架产线" + EmptyShelfPlace + ",先前往4D门[" + agvPlae + "->" + EmptyShelfPlace + "]";
msg += runInfo;
TakeEmptyStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if ((agvPlae.StartsWith("E") || agvPlae.StartsWith("A") || agvPlae.StartsWith("I") || agvPlae.StartsWith("H"))
&& EmptyShelfPlace.StartsWith("G"))//4D->4C
else if ((agvPlae.StartsWith(SettingString.D4_Name_Prefix) || agvPlae.StartsWith("A") || agvPlae.Equals(SettingString.Standby) || agvPlae.Equals(SettingString.AutoCharge))
&& EmptyShelfPlace.StartsWith(SettingString.C4_Name_Prefix))//4D->4C
{
TakeEmptyStep.ToNextStep(TAKE_EMPTY_STEP.WAIT_AGV_REACH_4C_DOOR);
runInfo= "去空料架产线" + EmptyShelfPlace + ",先前往4C门[" + agvPlae + "->" + EmptyShelfPlace + "]";
msg += runInfo;
TakeEmptyStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorDToC);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if(agvPlae.StartsWith("G") && EmptyShelfPlace.StartsWith("G"))
else if(agvPlae.StartsWith(SettingString.C4_Name_Prefix) && EmptyShelfPlace.StartsWith(SettingString.C4_Name_Prefix))
{
if(Common.Check4CTarget(agv, EmptyShelfPlace))//被占用
{
......@@ -87,6 +90,7 @@ namespace AGVControl
msg += runInfo;
TakeEmptyStep.Msg = msg;
Common.MoveTo4CStandy(agv);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -106,7 +110,8 @@ namespace AGVControl
}
else if (TakeEmptyStep.IsStep(TAKE_EMPTY_STEP.WAIT_AGV_REACH_4C_DOOR))
{
if (Common.CheckTaskFinished(agv, SettingString.DoorDToC, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.DoorDToC, CurTaskState))
{
if (Common.Check4CTarget(agv, EmptyShelfPlace))//被占用
{
......@@ -115,6 +120,7 @@ namespace AGVControl
msg += runInfo;
TakeEmptyStep.Msg = msg;
Common.MoveTo4CStandy(agv);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -127,8 +133,8 @@ namespace AGVControl
}
else if (TakeEmptyStep.IsStep(TAKE_EMPTY_STEP.WAIT_REACH_TEMP_PLACE))
{
if (Common.CheckTaskFinished(agv, SettingString.C4_STANDBY1, agv.CurTaskGUID)|| Common.CheckTaskFinished(agv, SettingString.C4_STANDBY2, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.C4_STANDBY1, CurTaskState) || Common.CheckTaskFinished(agv, SettingString.C4_STANDBY2, CurTaskState))
{
if (!Common.Check4CTarget(agv, EmptyShelfPlace))//未占用
{
......@@ -142,7 +148,8 @@ namespace AGVControl
}
else if (TakeEmptyStep.IsStep(TAKE_EMPTY_STEP.WAIT_AGV_REACH_4D_DOOR))
{
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState))
{
TakeEmptyStep.ToNextStep(TAKE_EMPTY_STEP.ASSIGN_AGV_TASK);
runInfo = "开始执行回收空料架任务[" + agvPlae + "->" + EmptyShelfPlace + "]";
......@@ -160,6 +167,7 @@ namespace AGVControl
msg += runInfo;
TakeEmptyStep.Msg = msg;
Common.MoveToNode(agv, EmptyShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -181,9 +189,10 @@ namespace AGVControl
}
else if (TakeEmptyStep.IsStep(TAKE_EMPTY_STEP.WAIT_REACH_PLACE))
{
if (Common.CheckTaskFinished(agv, EmptyShelfPlace, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, EmptyShelfPlace, CurTaskState))
{
if (EmptyShelfPlace.Equals("G22"))
if (EmptyShelfPlace.Equals(SettingString.C4FeederOut))
{
runInfo = "AGV到达 " + EmptyShelfPlace;
msg += runInfo;
......@@ -196,6 +205,15 @@ namespace AGVControl
runInfo= "AGV到达 " + EmptyShelfPlace + " 向产线发送出料架请求[ReadyLeave]";
msg += runInfo;
TakeEmptyStep.Msg = msg;
if (nodeIdx == -1)
{
runInfo = EmptyShelfPlace + " 未开启调用";
msg += runInfo;
TakeEmptyStep.Msg = msg;
return this;
}
ClientNode node = Common.nodeInfo[nodeIdx];
agv.RFID = node.RFID;
Common.server.ReadyLeave(EmptyShelfPlace);
}
......@@ -208,8 +226,10 @@ namespace AGVControl
runInfo= EmptyShelfPlace + " 未开启调用";
msg += runInfo;
TakeEmptyStep.Msg = msg;
return this;
}
ClientNode node = Common.nodeInfo[nodeIdx];
agv.RFID = node.RFID;
if (node.StateEquals(eNodeStatus.MayLeave))
{
if (!agv.CurTaskName.Equals("Enter"))
......@@ -218,35 +238,34 @@ namespace AGVControl
runInfo = "收到产线出料请求[ReadyLeave]的响应 " + EmptyShelfPlace + "出料架,小车链条运行";
msg += runInfo;
TakeEmptyStep.Msg = msg;
agv.RFID = node.RFID;
//agv.RFID = node.RFID;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Enter"]);
agv.TaskSend = rtn ? "Enter" : "";
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else if (TakeEmptyStep.IsTimeOut(15000, out double timeOutValue))
{
TakeEmptyStep.ToNextStep(TAKE_EMPTY_STEP.WAIT_REACH_PLACE);
runInfo = "AGV到达 " + EmptyShelfPlace + ",15秒后重新向产线发送出料架请求[ReadyLeave]";
msg += runInfo;
TakeEmptyStep.Msg = msg;
//runInfo = "AGV到达 " + EmptyShelfPlace + ",15秒后重新向产线发送出料架请求[ReadyLeave]";
//msg += runInfo;
//TakeEmptyStep.Msg = msg;
}
}
else if (TakeEmptyStep.IsStep(TAKE_EMPTY_STEP.WAIT_TAKE_EMPTY_SHELF))
{
if (Common.CheckEnterOrLeaveFinished(agv, "Enter", agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckEnterOrLeaveFinished(agv, "Enter", CurTaskState))
{
ClientNode node = Common.nodeInfo[nodeIdx];
node.AgvName = "";
//回收空料架数量减少1
// node.DecreEmptyShelfCnt();
//TakeEmptyStep.ToNextStep(TAKE_EMPTY_STEP.END);
//if (shelfType.Equals(eShelfType.SmallShelf))
Common.DelEmptyShelfTask(EmptyShelfPlace);
runInfo= "空料架在[" + EmptyShelfPlace + "]进入小车完成";
msg += runInfo;
TakeEmptyStep.Msg = msg;
if (agv.Place.Equals("E22"))
//4DfeederOut默认大料架
if (agv.Place.Equals(SettingString.D4FeederOut))
return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.BigShelf);
else if (agv.RFID.StartsWith("D"))
return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.SmallShelf);
......@@ -261,8 +280,8 @@ namespace AGVControl
{
//链条停止
runInfo = "空料架在[" + EmptyShelfPlace + "]进入小车超时[" + timeOutValue.ToString("f1") + "秒],请检查料架进入小车的情况";
msg += runInfo;
TakeEmptyStep.Msg = msg;
// msg += runInfo;
//TakeEmptyStep.Msg = msg;
}
}
......
......@@ -57,6 +57,8 @@ namespace AGVControl
string msg = agv.Name + " ";
bool rtn = false;
agv.Msg = runInfo;
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
if (GoFullShelfStationStep.IsStep(GO_FULL_SHELF_STATION_STEP.NONE))
{
GoFullShelfStationStep.ToNextStep(GO_FULL_SHELF_STATION_STEP.WAIT_CHECK_RESULT);
......@@ -64,10 +66,12 @@ namespace AGVControl
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
Common.CheckLoad(agv);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if (GoFullShelfStationStep.IsStep(GO_FULL_SHELF_STATION_STEP.WAIT_CHECK_RESULT))
{
//Common.log.Debug("WAIT_CHECK_RESULT " + Common.agvMission["CheckShelf"].Equals(agv.CurTaskGUID).ToString() + " " + agv.CurTaskGUID + " " + Common.agvMission["CheckShelf"]);
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.agvMission["CheckShelf"].Equals(agv.CurTaskGUID) && agv.CurTaskState.Equals(SettingString.Done))
{
rtn = Common.mir.Get_IO_Status(agv, out bool[] input, out bool[] output);
......@@ -85,21 +89,23 @@ namespace AGVControl
}
else if (input != null && !input[3])
{
if (agvPlace.StartsWith(SettingString.Charge_Name_Prefix) || agvPlace.StartsWith(SettingString.Standby_Name_Prefix))//待机位/充电位接到任务
if (agvPlace.Equals(SettingString.Standby) || agvPlace.StartsWith(SettingString.AutoCharge))//待机位/充电位接到任务
{
GoFullShelfStationStep.ToNextStep(GO_FULL_SHELF_STATION_STEP.WAIT_AGV_REACH_A6);
runInfo = "无负载,准备运动到入料口" + FullShelfStationPlace;
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
Common.MoveToNode(agv, FullShelfStationPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if (agvPlace.StartsWith("G"))//4C车间
else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix))//4C车间
{
GoFullShelfStationStep.ToNextStep(GO_FULL_SHELF_STATION_STEP.WAIT_AGV_REACH_DOOR);
runInfo = "在4C车间,向4D门运行,再到双层线入料口";
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
......@@ -108,6 +114,7 @@ namespace AGVControl
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
Common.MoveToNode(agv, FullShelfStationPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
}
......@@ -123,14 +130,16 @@ namespace AGVControl
msg = runInfo;
GoFullShelfStationStep.Msg = msg;
Common.MoveToNode(agv, FullShelfStationPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else if (agvPlace.StartsWith("G"))//4C车间
else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix))//4C车间
{
GoFullShelfStationStep.ToNextStep(GO_FULL_SHELF_STATION_STEP.WAIT_AGV_REACH_DOOR);
runInfo = "在4C车间,向4D门运行,再到双层线入料口";
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
......@@ -140,19 +149,22 @@ namespace AGVControl
}
else if (GoFullShelfStationStep.IsStep(GO_FULL_SHELF_STATION_STEP.WAIT_AGV_REACH_DOOR))
{
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState))
{
GoFullShelfStationStep.ToNextStep(GO_FULL_SHELF_STATION_STEP.WAIT_AGV_REACH_A6);
runInfo = "到达4D门,准备运动到双层线入料口" + FullShelfStationPlace;
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
Common.MoveToNode(agv, FullShelfStationPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else if (GoFullShelfStationStep.IsStep(GO_FULL_SHELF_STATION_STEP.WAIT_AGV_REACH_A6))
{
if (Common.CheckTaskFinished(agv, FullShelfStationPlace, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, FullShelfStationPlace, CurTaskState))
{
ClientNode node = Common.nodeInfo.Find(s => s.Name.Equals(SettingString.A6)
&& (s.StateEquals(eNodeStatus.NeedLeave) || s.StateEquals(eNodeStatus.NeedEnterLeave)) && !s.RFID.Equals("00"));
......@@ -188,6 +200,7 @@ namespace AGVControl
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
}
......@@ -202,7 +215,8 @@ namespace AGVControl
}
else if (GoFullShelfStationStep.IsStep(GO_FULL_SHELF_STATION_STEP.WAIT_REACH_STANDBY))
{
if (Common.CheckTaskFinished(agv, SettingString.Standby, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.Standby, CurTaskState))
{
GoFullShelfStationStep.ToNextStep(GO_FULL_SHELF_STATION_STEP.END);
runInfo = "到达待机位";
......@@ -230,23 +244,24 @@ namespace AGVControl
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Enter"]);
agv.TaskSend = rtn ? "Enter" : "";
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else if (GoFullShelfStationStep.IsTimeOut(15000, out double timeOutValue))
{
GoFullShelfStationStep.ToNextStep(GO_FULL_SHELF_STATION_STEP.WAIT_AGV_REACH_A6);
runInfo = "AGV到达 " + FullShelfStationPlace + ",15秒后重新向双层线发送出料架请求[ReadyLeave]";
msg += runInfo;
GoFullShelfStationStep.Msg = msg;
//runInfo = "AGV到达 " + FullShelfStationPlace + ",15秒后重新向双层线发送出料架请求[ReadyLeave]";
//msg += runInfo;
//GoFullShelfStationStep.Msg = msg;
}
}
else if (GoFullShelfStationStep.IsStep(GO_FULL_SHELF_STATION_STEP.WAIT__FULL_SHELF_IN_AGV))
{
if (Common.CheckEnterOrLeaveFinished(agv, "Enter", agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckEnterOrLeaveFinished(agv, "Enter", CurTaskState))
{
//GoFullShelfStationStep.ToNextStep(GO_FULL_SHELF_STATION_STEP.END);
......@@ -264,8 +279,8 @@ namespace AGVControl
{
//链条停止
runInfo= "满料架在[" + FullShelfStationPlace + "]进入小车超时[" + timeOutValue.ToString("f1") + "秒],请检查料架进入小车的情况";
msg +=runInfo;
GoFullShelfStationStep.Msg = msg;
//msg +=runInfo;
//GoFullShelfStationStep.Msg = msg;
}
}
......
......@@ -61,31 +61,36 @@ namespace AGVControl
bool rtn = false;
agv.RFID = RFID;
agv.Msg = runInfo;
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
if (SendFullShelfStep.IsStep(SEND_FULL_SHELF_STEP.NONE))
{
if(FullShelfPlace.StartsWith("G"))
if(FullShelfPlace.StartsWith(SettingString.C4_Name_Prefix))
{
SendFullShelfStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_DOOR);
runInfo = "满料架前往4C门,从双层线A6送往[" + FullShelfPlace + "][" + RFID + "]";
runInfo = "满料架前往4C门,从双层线A6送往[" + FullShelfPlace + "][RFID=" + RFID + "]";
msg += runInfo;
SendFullShelfStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorDToC);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
SendFullShelfStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_LINE);
runInfo= "满料架从双层线A6送往[" + FullShelfPlace + "][" + RFID + "]";
runInfo= "满料架从双层线A6送往[" + FullShelfPlace + "][RFID=" + RFID + "]";
msg += runInfo;
SendFullShelfStep.Msg = msg;
Common.MoveToNode(agv, FullShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
else if (SendFullShelfStep.IsStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_DOOR))
{
if (Common.CheckTaskFinished(agv,SettingString.DoorDToC,agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv,SettingString.DoorDToC,CurTaskState))
{
if (Common.Check4CTarget(agv, FullShelfPlace))//被占用
{
......@@ -94,38 +99,43 @@ namespace AGVControl
msg += runInfo;
SendFullShelfStep.Msg = msg;
Common.MoveTo4CStandy(agv);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
SendFullShelfStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_LINE);
runInfo = "满料架从双层线A6送往[" + FullShelfPlace + "][" + RFID + "]";
runInfo = "满料架从双层线A6送往[" + FullShelfPlace + "][RFID=" + RFID + "]";
msg += runInfo;
SendFullShelfStep.Msg = msg;
Common.MoveToNode(agv, FullShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
}
else if (SendFullShelfStep.IsStep(SEND_FULL_SHELF_STEP.WAIT_REACH_TEMP_PLACE))
{
if (Common.CheckTaskFinished(agv, SettingString.C4_STANDBY1, agv.CurTaskGUID) || Common.CheckTaskFinished(agv, SettingString.C4_STANDBY2, agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.C4_STANDBY1, CurTaskState) || Common.CheckTaskFinished(agv, SettingString.C4_STANDBY2, CurTaskState))
{
if (!Common.Check4CTarget(agv, FullShelfPlace))//未占用
{
SendFullShelfStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_LINE);
runInfo = "满料架从临时待机位送往[" + FullShelfPlace + "][" + RFID + "]";
runInfo = "满料架从临时待机位送往[" + FullShelfPlace + "][RFID=" + RFID + "]";
msg += runInfo;
SendFullShelfStep.Msg = msg;
Common.DeleteStandyInfo(agv);
Common.MoveToNode(agv, FullShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
}
else if (SendFullShelfStep.IsStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_LINE))
{
if (Common.CheckTaskFinished(agv,FullShelfPlace,agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv,FullShelfPlace, CurTaskState))
{
if(FullShelfPlace.Equals("G21"))
if(FullShelfPlace.Equals(SettingString.C4FeederIn))
{
runInfo= "AGV到达 " + FullShelfPlace + "完成";
msg += runInfo;
......@@ -142,7 +152,7 @@ namespace AGVControl
}
else
{
if (RFID.StartsWith("C") && !agv.Place.Equals("E21"))
if (RFID.StartsWith("C") && !agv.Place.Equals(SettingString.D4FeederIn))
{
SendFullShelfStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_BIG_SHELF_UNLOCK);
runInfo= "AGV到达 " + FullShelfPlace + ",并等待大料架[" + RFID + "]解绑";
......@@ -167,7 +177,8 @@ namespace AGVControl
System.Threading.Thread.Sleep(50);
if (AGVManager.GetRackBy(RFID, out string lineName) || (input!=null && input[0]))
{
runInfo= "大料架在" + FullShelfPlace + "解绑完成 [" + RFID + "]";
runInfo= "大料架在" + FullShelfPlace + "解绑完成 [" + RFID + "] [" + agv.BoxDestInfo + "]";
agv.BoxDestInfo = "";
msg += runInfo;
SendFullShelfStep.Msg = msg;
return new EmptyShelfBackJob(FullShelfPlace,eShelfType.BigShelf);
......@@ -186,7 +197,7 @@ namespace AGVControl
msg += runInfo;
SendFullShelfStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Leave"]);
agv.TaskSend = rtn ? "Leave" : "";
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
}
......@@ -200,12 +211,14 @@ namespace AGVControl
}
else if (SendFullShelfStep.IsStep(SEND_FULL_SHELF_STEP.WAIT__SHELF_IN_LINE))
{
if (Common.CheckEnterOrLeaveFinished(agv, "Leave", agv.CurTaskGUID))
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckEnterOrLeaveFinished(agv, "Leave", CurTaskState))
{
runInfo= "满料架进入" + FullShelfPlace + "完成 [" + RFID + "]";
runInfo= "满料架进入" + FullShelfPlace + "完成 [RFID=" + RFID + "] ["+agv.BoxDestInfo+"]";
msg += runInfo;
SendFullShelfStep.Msg = msg;
agv.RFID = "";
agv.BoxDestInfo = "";
AGVManager.UpdateStatus(RFID, FullShelfPlace);
return new EmptyAGVBackJob(FullShelfPlace);
}
......@@ -213,8 +226,8 @@ namespace AGVControl
{
//链条停止
runInfo= "满料架在[" + FullShelfPlace + "]离开小车超时[" + timeOutValue.ToString("f1") + "秒],请检查料架离开小车的情况";
msg += runInfo;
SendFullShelfStep.Msg = msg;
//msg += runInfo;
//SendFullShelfStep.Msg = msg;
}
}
......
......@@ -11,7 +11,7 @@ namespace AGVControl
/// </summary>
public class DoubleLineNodeFor4C : ClientNode
{
public DoubleLineNodeFor4C(string name, string ip, string aliceName,string lineName, string pos_name, string pos_guid, bool isUse,int emptyCnt): base(name,ip, aliceName,lineName,pos_name,pos_guid, isUse, emptyCnt)
public DoubleLineNodeFor4C(string name, string ip, string aliceName, string lineName, string pos_name, string pos_guid, bool isUse, int emptyCnt) : base(name, ip, aliceName, lineName, pos_name, pos_guid, isUse, emptyCnt)
{
}
......@@ -46,7 +46,7 @@ namespace AGVControl
//出工单料的目的地是否有空料架
if (Common.FindEmptyShelfBeforeSendFullShelf(out string nodeName))
{
if (nodeName.StartsWith("G") && SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (nodeName.StartsWith(SettingString.C4_Name_Prefix) && SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
{
ClientNode clientNode = Common.nodeInfo.Find(s => s.Name.Equals(nodeName));
int cnt = 0;
......@@ -72,19 +72,7 @@ namespace AGVControl
if (SettingString.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)
return null;
//foreach (Agv_Info agv in Common.agvInfo)
//{
// if (!SettingString.C4_AGV_IPs.Contains(agv.IP))
// continue;
// if (agv.CurJob is GoEmptyShelfLineJob && ((GoEmptyShelfLineJob)agv.CurJob).EmptyShelfPlace.Equals(emptyNodeName))
// {
// return null;
// }
//}
if (i == -1)
return new GoEmptyShelfLineJob(currentAgv.Place, emptyNodeName);
}
}
......@@ -96,17 +84,7 @@ namespace AGVControl
if (SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
{
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoFullShelfStationJob && !s.IP.Equals(currentAgv.IP));
if (i > -1)
return null;
//foreach (Agv_Info agv in Common.agvInfo)
//{
// if (agv.CurJob is GoFullShelfStationJob)
// {
// return null;
// }
//}
if (i == -1)
return new GoFullShelfStationJob(currentAgv.Place);
}
}
......
......@@ -49,7 +49,7 @@ namespace AGVControl
//出工单料的目的地是否有空料架
if (Common.FindEmptyShelfBeforeSendFullShelf(out string nodeName))
{
if (nodeName.StartsWith("E") && !SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
if (nodeName.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(currentAgv.IP))
{
ClientNode clientNode = Common.nodeInfo.Find(s => s.Name.Equals(nodeName));
int cnt = 0;
......@@ -76,18 +76,7 @@ namespace AGVControl
if (!SettingString.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)
return null;
//foreach (Agv_Info agv in Common.agvInfo)
//{
// if (SettingString.C4_AGV_IPs.Contains(agv.IP))
// continue;
// if (agv.CurJob is GoEmptyShelfLineJob && ((GoEmptyShelfLineJob)agv.CurJob).EmptyShelfPlace.Equals(emptyNodeName))
// {
// return null;
// }
//}
if (i == -1)
return new GoEmptyShelfLineJob(currentAgv.Place, emptyNodeName);
}
}
......
产线任务名称,任务名称,任务GUID
下料区(A5),MoveA5,679f2ca1-b520-11ea-b6ad-00012998f5a0
上料区(A6),MoveA6,7e5e9dc2-b521-11ea-b6ad-00012998f5a0
4D-1线,MoveE1,73bcddb3-b513-11ea-b6ad-00012998f5a0
4D-2线,MoveE2,9bacf16b-b515-11ea-b6ad-00012998f5a0
4D-3线,MoveE3,f84313b5-b515-11ea-b6ad-00012998f5a0
4D-4线,MoveE4,5683db0e-b516-11ea-b6ad-00012998f5a0
4D-5线,MoveE5,9c04b71b-b516-11ea-b6ad-00012998f5a0
4D-6线,MoveE6,f46be62a-b516-11ea-b6ad-00012998f5a0
4D-8线,MoveE8,41dccfcf-b517-11ea-b6ad-00012998f5a0
4D-9线,MoveE9,7fc3ec2f-b517-11ea-b6ad-00012998f5a0
4D-10线,MoveE10,e7c0ad9c-b517-11ea-b6ad-00012998f5a0
4D-11线,MoveE11,2e23a510-b518-11ea-b6ad-00012998f5a0
4D-12线,MoveE12,6efb37bc-b519-11ea-b6ad-00012998f5a0
4D-14线,MoveE14,b03043fd-b519-11ea-b6ad-00012998f5a0
4D-15线,MoveE15,f3f9a668-b519-11ea-b6ad-00012998f5a0
4D-16线,MoveE16,5ec0f64a-b51a-11ea-b6ad-00012998f5a0
4D-FeedeerIn,MoveE21,37401585-b51b-11ea-b6ad-00012998f5a0
4D-FeederOut,MoveE22,a4846723-b51b-11ea-b6ad-00012998f5a0
4D-1线,MoveD1,73bcddb3-b513-11ea-b6ad-00012998f5a0
4D-2线,MoveD2,9bacf16b-b515-11ea-b6ad-00012998f5a0
4D-3线,MoveD3,f84313b5-b515-11ea-b6ad-00012998f5a0
4D-4线,MoveD4,5683db0e-b516-11ea-b6ad-00012998f5a0
4D-5线,MoveD5,9c04b71b-b516-11ea-b6ad-00012998f5a0
4D-6线,MoveD6,f46be62a-b516-11ea-b6ad-00012998f5a0
4D-8线,MoveD8,41dccfcf-b517-11ea-b6ad-00012998f5a0
4D-9线,MoveD9,7fc3ec2f-b517-11ea-b6ad-00012998f5a0
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-15线,MoveD15,f3f9a668-b519-11ea-b6ad-00012998f5a0
4D-16线,MoveD16,5ec0f64a-b51a-11ea-b6ad-00012998f5a0
4D-FeedeerIn,MoveD4FeederIn,37401585-b51b-11ea-b6ad-00012998f5a0
4D-FeederOut,MoveD4FeederOut,a4846723-b51b-11ea-b6ad-00012998f5a0
4D-4C门,MoveDoorDToC,fd6e26ac-c1bf-11ea-9a66-94c691a7387d
4C-4D门,MoveDoorCToD,d67f31c8-ca7e-11ea-9a66-94c691a7387d
4C-1线,MoveG1,94a15e2c-cda7-11ea-a3e4-94c691a7387d
4C-2线,MoveG2,cece230b-cda7-11ea-a3e4-94c691a7387d
4C-3线,MoveG3,e393e846-cda7-11ea-a3e4-94c691a7387d
4C-4线,MoveG4,0b297e08-cda8-11ea-a3e4-94c691a7387d
4C-5线,MoveG5,1d3512ae-cda8-11ea-a3e4-94c691a7387d
4C-6线,MoveG6,33c8d629-cda8-11ea-a3e4-94c691a7387d
4C-7线,MoveG7,56c5a660-cda8-11ea-a3e4-94c691a7387d
4C-8线,MoveG8,6873fd7f-cda8-11ea-a3e4-94c691a7387d
4C-9线,MoveG9,8ba46b72-cda8-11ea-a3e4-94c691a7387d
4C-10线,MoveG10,c0b75c41-ca7d-11ea-9a66-94c691a7387d
4C-FeedeerIn,MoveG21,0a657afd-ca9d-11ea-9a66-94c691a7387d
4C-FeedeerOut,MoveG22,83b9ba6d-cdb2-11ea-a3e4-94c691a7387d
4C-14线,MoveG14,2baac336-d0d4-11ea-a3e4-94c691a7387d
4C-15线,MoveG15,41cc7a90-d0d4-11ea-a3e4-94c691a7387d
4C-1线,MoveC1,94a15e2c-cda7-11ea-a3e4-94c691a7387d
4C-2线,MoveC2,cece230b-cda7-11ea-a3e4-94c691a7387d
4C-3线,MoveC3,e393e846-cda7-11ea-a3e4-94c691a7387d
4C-4线,MoveC4,0b297e08-cda8-11ea-a3e4-94c691a7387d
4C-5线,MoveC5,1d3512ae-cda8-11ea-a3e4-94c691a7387d
4C-6线,MoveC6,33c8d629-cda8-11ea-a3e4-94c691a7387d
4C-7线,MoveC7,56c5a660-cda8-11ea-a3e4-94c691a7387d
4C-8线,MoveC8,6873fd7f-cda8-11ea-a3e4-94c691a7387d
4C-9线,MoveC9,8ba46b72-cda8-11ea-a3e4-94c691a7387d
4C-10线,MoveC10,c0b75c41-ca7d-11ea-9a66-94c691a7387d
4C-FeedeerIn,MoveC4FeederIn,0a657afd-ca9d-11ea-9a66-94c691a7387d
4C-FeedeerOut,MoveC4FeederOut,83b9ba6d-cdb2-11ea-a3e4-94c691a7387d
4C-14线,MoveC14,2baac336-d0d4-11ea-a3e4-94c691a7387d
4C-15线,MoveC15,41cc7a90-d0d4-11ea-a3e4-94c691a7387d
4C-AirIn,MoveDoorAirIn,2dc71db5-d0cb-11ea-a3e4-94c691a7387d
4C-AirOut,MoveDoorAirOut,9bc63eaa-d0d3-11ea-a3e4-94c691a7387d
小车进料,Enter,51233d8c-c044-11ea-9a66-94c691a7387d
小车出料,Leave,2e433130-c045-11ea-9a66-94c691a7387d
1763充电桩,AutoCharge3,b7371c5f-c045-11ea-9a66-94c691a7387d
1764充电桩,AutoCharge4,1296084c-c046-11ea-9a66-94c691a7387d
1767充电桩,AutoCharge5,40c8f44e-c046-11ea-9a66-94c691a7387d
1768充电桩,AutoCharge6,56cca0a3-c046-11ea-9a66-94c691a7387d
3号充电桩,AutoCharge3,b7371c5f-c045-11ea-9a66-94c691a7387d
4号充电桩,AutoCharge4,1296084c-c046-11ea-9a66-94c691a7387d
5号充电桩,AutoCharge5,40c8f44e-c046-11ea-9a66-94c691a7387d
6号充电桩,AutoCharge6,56cca0a3-c046-11ea-9a66-94c691a7387d
小车初始化,Init,adcb7a04-b525-11ea-b6ad-00012998f5a0
小车进料-需要人员操作,EnterWaitUser,7fe98805-d245-11ea-a3e4-94c691a7387d
小车出料-需要人员操作,LeaveWaitUser,217f8bad-d246-11ea-a3e4-94c691a7387d
待机位,MoveStandby,ae6e4f12-c050-11ea-9a66-94c691a7387d
BenQ充电桩,AutoCharge7,8811a589-8793-11ea-87e1-000129922cf6
4C临时停车位1,MoveC4_STANDBY1,d5fc690b-f1a5-11ea-a03e-94c691a7387d
4C临时停车位2,MoveC4_STANDBY2,90f4399f-f1a6-11ea-a03e-94c691a7387d
临时停车位,MoveStandbyTemp,d6c32ad3-d64e-11ea-a3e4-94c691a7387d
检查料架情况,CheckShelf,f3e46a3e-d734-11ea-a3e4-94c691a7387d
\ No newline at end of file
产线名,节点名,IP,产线别名,位置名称,位置guid
A5,A5,10.85.199.20,下料区(A5),PA5,7ed952c3-b520-11ea-b6ad-00012998f5a0
A6,A6,10.85.199.20,上料区(A6),PA6,929eb1c2-b520-11ea-b6ad-00012998f5a0
D1,E1,10.85.199.42,4D-1线,DL1,3b823fe4-b368-11ea-a1a5-00012999830e
D2,E2,10.85.199.90,4D-2线,DL2,ede15fcb-b367-11ea-a1a5-00012999830e
D3,E3,10.85.199.91,4D-3线,DL3,43855a9b-b365-11ea-a1a5-00012999830e
D4,E4,10.85.199.92,4D-4线,DL4,73c8b98c-b368-11ea-a1a5-00012999830e
D5,E5,10.85.199.93,4D-5线,DL5,5436efd7-b432-11ea-a1a5-00012999830e
D6,E6,10.85.199.94,4D-6线,DL6,6b7710c1-b432-11ea-a1a5-00012999830e
D8,E8,10.85.199.95,4D-8线,DL8,8f039d2e-b432-11ea-a1a5-00012999830e
D9,E9,10.85.199.180,4D-9线,DL9,9e0b64ab-b432-11ea-a1a5-00012999830e
D10,E10,10.85.199.181,4D-10线,DL10,aec7da80-b432-11ea-a1a5-00012999830e
D11,E11,10.85.199.182,4D-11线,DL11,c10984c9-b432-11ea-a1a5-00012999830e
D12,E12,10.85.199.183,4D-12线,DL12,d6e0b92a-b432-11ea-a1a5-00012999830e
D14,E14,10.85.199.184,4D-14线,DL14,efb04c55-b432-11ea-a1a5-00012999830e
D15,E15,10.85.199.185,4D-15线,DL15,fd6b1f95-b432-11ea-a1a5-00012999830e
FeederIn,E21,10.85.199.1,4D-FeedeerIn,FI,1e546c3a-8abe-11ea-ab63-000129922ca6
FeederOut,E22,10.85.199.1,4D-FeederOut,FO,431649a4-8abe-11ea-ab63-000129922ca6
C1,G1,10.85.199.50,4C-1线,G1,d402fbc2-cdac-11ea-a3e4-94c691a7387d
C2,G2,10.85.199.51,4C-2线,G2,ce0d60e9-cdac-11ea-a3e4-94c691a7387d
C3,G3,10.85.199.52,4C-3线,G3,c768170a-cdac-11ea-a3e4-94c691a7387d
C4,G4,10.85.199.53,4C-4线,G4,c2de9745-cdac-11ea-a3e4-94c691a7387d
C5,G5,10.85.199.54,4C-5线,G5,be468ef4-cdac-11ea-a3e4-94c691a7387d
C6,G6,10.85.199.55,4C-6线,G6,b9117881-cdac-11ea-a3e4-94c691a7387d
C7,G7,10.85.199.56,4C-7线,G7,b3cda9db-cdac-11ea-a3e4-94c691a7387d
C8,G8,10.85.199.57,4C-8线,G8,ae09fc56-cdac-11ea-a3e4-94c691a7387d
C9,G9,10.85.199.58,4C-9线,G9,a64bdbbb-cdac-11ea-a3e4-94c691a7387d
C10,G10,10.85.199.59,4C-10线,G10,604b1c3c-ca4e-11ea-810b-00012999830e
C14,G14,10.85.199.60,4C-14线,G14,07841fc6-d0d4-11ea-a3e4-94c691a7387d
C15,G15,10.85.199.61,4C-15线,G15,0efca2c6-d0d4-11ea-a3e4-94c691a7387d
4CFeederIn,G21,10.85.199.1,4C-FeederIn,tyty,cb7f117b-ca88-11ea-9b28-0001299981d4
4CFeederOut,G22,10.85.199.1,4C-FeederOut,tyty,cb7f117b-ca88-11ea-9b28-0001299981d4
D16,E16,10.85.199.96,4D-16线,line_16,ac6c413e-895e-11ea-9374-000129922ca6
C11,G11,10.85.199.1,4C-11线,PA33,
C12,G12,10.85.199.1,4C-12线,PA34,
C13,G13,10.85.199.1,4C-13线,PA35,
C16,G16,10.85.199.1,4C-16线,PA38,
D1,D1,10.85.199.42,4D-1线,DL1,3b823fe4-b368-11ea-a1a5-00012999830e
D2,D2,10.85.199.90,4D-2线,DL2,ede15fcb-b367-11ea-a1a5-00012999830e
D3,D3,10.85.199.91,4D-3线,DL3,43855a9b-b365-11ea-a1a5-00012999830e
D4,D4,10.85.199.92,4D-4线,DL4,73c8b98c-b368-11ea-a1a5-00012999830e
D5,D5,10.85.199.93,4D-5线,DL5,5436efd7-b432-11ea-a1a5-00012999830e
D6,D6,10.85.199.94,4D-6线,DL6,6b7710c1-b432-11ea-a1a5-00012999830e
D8,D8,10.85.199.95,4D-8线,DL8,8f039d2e-b432-11ea-a1a5-00012999830e
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
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,FeederIn,10.85.199.1,4D-FeedeerIn,FI,1e546c3a-8abe-11ea-ab63-000129922ca6
FeederOut,FeederOut,10.85.199.1,4D-FeederOut,FO,431649a4-8abe-11ea-ab63-000129922ca6
C1,C1,10.85.199.50,4C-1线,G1,d402fbc2-cdac-11ea-a3e4-94c691a7387d
C2,C2,10.85.199.51,4C-2线,G2,ce0d60e9-cdac-11ea-a3e4-94c691a7387d
C3,C3,10.85.199.52,4C-3线,G3,c768170a-cdac-11ea-a3e4-94c691a7387d
C4,C4,10.85.199.53,4C-4线,G4,c2de9745-cdac-11ea-a3e4-94c691a7387d
C5,C5,10.85.199.54,4C-5线,G5,be468ef4-cdac-11ea-a3e4-94c691a7387d
C6,C6,10.85.199.55,4C-6线,G6,b9117881-cdac-11ea-a3e4-94c691a7387d
C7,C7,10.85.199.56,4C-7线,G7,b3cda9db-cdac-11ea-a3e4-94c691a7387d
C8,C8,10.85.199.57,4C-8线,G8,ae09fc56-cdac-11ea-a3e4-94c691a7387d
C9,C9,10.85.199.62,4C-9线,G9,a64bdbbb-cdac-11ea-a3e4-94c691a7387d
C10,C10,10.85.199.59,4C-10线,G10,604b1c3c-ca4e-11ea-810b-00012999830e
C14,C14,10.85.199.60,4C-14线,G14,07841fc6-d0d4-11ea-a3e4-94c691a7387d
C15,C15,10.85.199.61,4C-15线,G15,0efca2c6-d0d4-11ea-a3e4-94c691a7387d
4CFeederIn,4CFeederIn,10.85.199.1,4C-FeederIn,G21,cb7f117b-ca88-11ea-9b28-0001299981d4
4CFeederOut,4CFeederOut,10.85.199.1,4C-FeederOut,G22,0fcf606c-d417-11ea-9b6b-0001299981d4
......@@ -26,3 +26,5 @@ EmptyShelfCnt=1
EmptyShelfCnt=1
[G9]
IsUse=False
[A6]
IsUse=False
......@@ -54,3 +54,4 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\Newtonsoft.Json.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\AsaPL.AgvClient.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
......@@ -45,10 +45,10 @@ namespace AgvClientTest
//client.SetStatus("E14", "", AsaPL.ClientAction.None);
//client.SetStatus("E15", "", AsaPL.ClientAction.None);
//client.SetStatus("E16", "", AsaPL.ClientAction.None);
client.SetStatus("E21", "", AsaPL.ClientAction.None);
client.SetStatus("E22", "", AsaPL.ClientAction.None);
client.SetStatus("G21", "", AsaPL.ClientAction.None);
client.SetStatus("G22", "", AsaPL.ClientAction.None);
//client.SetStatus("D4FeederIn", "", AsaPL.ClientAction.None);
//client.SetStatus("D4FeederOut", "", AsaPL.ClientAction.None);
//client.SetStatus("C4FeederIn", "", AsaPL.ClientAction.None);
//client.SetStatus("C4FeederOut", "", AsaPL.ClientAction.None);
client.Connect();
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!