..
This commit is contained in:
@@ -134,6 +134,7 @@ namespace Project
|
||||
//마지막위치가 아닌 다른 위치에 있으니 버퍼 작업을 할 수없다
|
||||
PUB.XBE.StepBuffer = Device.eDocStep.NotSet;
|
||||
PUB.log.AddE($"목적지가 버퍼이나 노드가 불일치 한다 오류사항");
|
||||
PUB._mapCanvas.SetAlertMessage("목적지가 버퍼이나 노드 불일치 오류");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace Project
|
||||
//5초동안 AGV까 움직이지 않았다면 오류 처리한다.
|
||||
PUB.AGV.AGVMoveStop($"[bufferin] {overtime}초이내 턴 감지 안됨");
|
||||
PUB.log.AddE($"[{funcname}] {overtime}초이내 턴 감지 안됨");
|
||||
PUB._mapCanvas.SetAlertMessage("턴 완료 확인 불가");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
@@ -129,6 +130,7 @@ namespace Project
|
||||
{
|
||||
PUB.log.AddE($"[{funcname}] 리프트가 내려가지 않습니다");
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.STP);
|
||||
PUB._mapCanvas.SetAlertMessage("리프트가 내려가지 않음");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
@@ -162,6 +164,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] AGV속도설정이 완료되지 않았습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv속도설정 실패");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
@@ -187,6 +190,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] MARK STOP신호가 확인되지 않습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("mark stop 신호 확인 안됨");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
@@ -205,6 +209,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] AGV가 멈추지 않아 강제종료 합니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv가 멈추지 않아 강제 종료");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ namespace Project
|
||||
{
|
||||
PUB.log.AddE($"[{funcname}] 리프트가 동작하지 않습니다");
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.STP);
|
||||
PUB._mapCanvas.SetAlertMessage("LIft 동작오류");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
@@ -96,6 +97,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] AGV속도설정이 완료되지 않았습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 속도설정실패");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -89,6 +89,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] AGV속도설정이 완료되지 않았습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 속도 설정 오류");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
@@ -110,6 +111,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE("MARK STOP신호가 확인되지 않습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("mark stop 신호 확인 안됨");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
@@ -128,6 +130,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE("AGV가 멈추지 않아 강제종료 합니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 가 멈추지 않아 강제 종료");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] AGV속도설정이 완료되지 않았습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 속도 설정 실패");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -126,6 +126,7 @@ namespace Project
|
||||
{
|
||||
PUB.log.AddE($"[{funcname}] AGV속도설정 실패");
|
||||
PUB.AGV.AGVMoveStop("err");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 속더 설정 실패");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE("AGV속도설정이 완료되지 않았습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 속도 설정 실패");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
@@ -115,6 +116,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE("MARK STOP신호가 확인되지 않습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("mark stop 신호 확인 불가");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
@@ -133,6 +135,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE("AGV가 멈추지 않아 강제종료 합니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 가 멈추지 않아 강제 종료");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] AGV속도설정이 완료되지 않았습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 속도 설정 실패");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] AGV속도설정이 완료되지 않았습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv속도설정오류");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
@@ -112,6 +113,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE("MARK STOP신호가 확인되지 않습니다");
|
||||
PUB._mapCanvas.SetAlertMessage("mark stop 신호 확인 불가");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
@@ -130,6 +132,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE("AGV가 멈추지 않아 강제종료 합니다");
|
||||
PUB._mapCanvas.SetAlertMessage("agv 가 멈추지 않아 강제 종료 합니다");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Project
|
||||
{
|
||||
PUB.AGV.AGVMoveStop(funcname);
|
||||
PUB.log.AddE($"[{funcname}] AGV속도설정이 완료되지 않았습니다");
|
||||
PUB._mapCanvas.SetAlertMessage($"[{funcname}] AGV속도설정이 완료되지 않았습니다");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -101,8 +101,7 @@ namespace Project
|
||||
}
|
||||
|
||||
//경로 생성(경로정보가 없거나 현재노드가 경로에 없는경우)
|
||||
if (PUB._virtualAGV.CurrentPath == null ||
|
||||
PUB._virtualAGV.CurrentPath.DetailedPath.Any() == false ||
|
||||
if (PUB._virtualAGV.HasPath() == false ||
|
||||
PUB._virtualAGV.CurrentPath.DetailedPath.Where(t => t.NodeId.Equals(currentNode.Id)).Any() == false)
|
||||
{
|
||||
if (PUB.AGV.system1.agv_run)
|
||||
@@ -112,6 +111,15 @@ namespace Project
|
||||
}
|
||||
|
||||
var PathResult = CalcPath(PUB._virtualAGV.StartNode, PUB._virtualAGV.TargetNode);
|
||||
if(PathResult.result !=null &&
|
||||
PathResult.result.Success == true &&
|
||||
PathResult.result.DetailedPath.Where(t => t.NodeId == currentNode.Id).Any() == false)
|
||||
{
|
||||
PUB._virtualAGV.StartNode = PUB._virtualAGV.CurrentNode;
|
||||
PathResult = CalcPath(PUB._virtualAGV.StartNode, PUB._virtualAGV.TargetNode);
|
||||
}
|
||||
|
||||
|
||||
if (PathResult.result == null)
|
||||
{
|
||||
PUB.log.AddE($"경로가 계산되지 않았습니다");
|
||||
@@ -120,9 +128,10 @@ namespace Project
|
||||
}
|
||||
else
|
||||
{
|
||||
//계산은 되었으나 현재위치가 전체 경로 없다면 시작노드를 현재로 변경해야한다.
|
||||
PUB._mapCanvas.CurrentPath = PathResult.result;
|
||||
PUB._virtualAGV.SetPath(PathResult.result);
|
||||
|
||||
PUB._mapCanvas.CurrentPath = PathResult.result;
|
||||
PUB._virtualAGV.SetPath(PathResult.result);
|
||||
|
||||
}
|
||||
|
||||
PUB.log.AddI($"경로생성 {PUB._virtualAGV.StartNode.RfidId} -> {PUB._virtualAGV.TargetNode.RfidId}");
|
||||
@@ -136,12 +145,12 @@ namespace Project
|
||||
PUB.AGV.AGVMoveStop("Path Integrity Fail");
|
||||
}
|
||||
PUB.log.AddE($"경로 무결성 오류로 인해 경로를 삭제 합니다");
|
||||
Console.WriteLine($"경로 무결성 오류로 인해 경로를 삭제 합니다");
|
||||
PUB._virtualAGV.SetPath(null);
|
||||
VAR.I32[eVarInt32.PathValidationError] += 1;
|
||||
if (VAR.I32[eVarInt32.PathValidationError] > 50)
|
||||
{
|
||||
PUB.log.AddE($"연속 경로 무결성 오류로 인해 중지 합니다");
|
||||
PUB._mapCanvas.SetAlertMessage($"연속 경로 무결성 오류로 인해 중지 합니다");
|
||||
PUB.sm.SetNewRunStep(ERunStep.ERROR);
|
||||
}
|
||||
return false;
|
||||
@@ -182,16 +191,6 @@ namespace Project
|
||||
return false;
|
||||
}
|
||||
|
||||
var message = $"[다음 행동 예측]\n\n" +
|
||||
$"모터: {nextAction.Motor}\n" +
|
||||
$"마그넷: {nextAction.Magnet}\n" +
|
||||
$"속도: {nextAction.Speed}\n" +
|
||||
$"이유: {nextAction.Message}\n\n" +
|
||||
$"---\n" +
|
||||
$"현재 상태: {PUB._virtualAGV.CurrentState}\n" +
|
||||
$"현재 방향: {PUB._virtualAGV.CurrentDirection}\n" +
|
||||
$"위치 확정: {PUB._virtualAGV.IsPositionConfirmed} (RFID {PUB._virtualAGV.DetectedRfidCount}개)\n" +
|
||||
$"현재 노드: {PUB._virtualAGV.CurrentNodeID2}";
|
||||
|
||||
//모터에서 정지를 요청했다
|
||||
if (nextAction.Motor == AGVNavigationCore.Models.MotorCommand.Stop)
|
||||
|
||||
@@ -226,12 +226,23 @@ namespace Project
|
||||
var message = $"[다음 행동 예측]\n\n";
|
||||
|
||||
if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false)
|
||||
message += "[수동모드]\n\n";
|
||||
message += "[X] 수동모드\n";
|
||||
|
||||
if (PUB._virtualAGV.TargetNode == null) message += "[X] 목표노드없음\n";
|
||||
if (PUB._virtualAGV.CurrentNode == null) message += "[X] 현재노드없음\n";
|
||||
else if (PUB._virtualAGV.HasPath() == false) message += "[X] 경로계산안됨\n";
|
||||
if (PUB._virtualAGV.PrevNode == null) message += "[X] 이전노드없음\n";
|
||||
else message += $"이전노드: {PUB._virtualAGV.PrevNode.ID2} : {PUB._virtualAGV.PrevDirection}\n";
|
||||
message += $"현재노드: {PUB._virtualAGV.CurrentNode.ID2} : {PUB._virtualAGV.CurrentDirection}\n";
|
||||
|
||||
message += "-------------\n";
|
||||
|
||||
var node = PUB._virtualAGV.CurrentNode;
|
||||
var curpos = PUB._virtualAGV.CurrentNodeID2;
|
||||
var targetpos = PUB._virtualAGV.TargetNode?.ID2 ?? "(X)";
|
||||
|
||||
|
||||
|
||||
var pathdetail = "";
|
||||
if (PUB._virtualAGV.CurrentPath != null && PUB._virtualAGV.CurrentPath.DetailedPath.Any())
|
||||
{
|
||||
@@ -250,13 +261,13 @@ namespace Project
|
||||
$"마그넷: {nextAction.Magnet}\n" +
|
||||
$"속도: {nextAction.Speed}\n" +
|
||||
$"이유: {nextAction.Message}\n" +
|
||||
$"상태머신:{PUB.sm.Step}:{PUB.sm.RunStep}:{PUB.sm.RunStepSeq}\n"+
|
||||
$"상태머신:{PUB.sm.Step}:{PUB.sm.RunStep}:{PUB.sm.RunStepSeq}\n" +
|
||||
$"---\n" +
|
||||
$"현재 상태: {PUB._virtualAGV.CurrentState}\n" +
|
||||
$"현재 방향: {PUB._virtualAGV.CurrentDirection}\n" +
|
||||
$"턴: {PUB._virtualAGV.Turn}\n" +
|
||||
$"위치 확정: {PUB._virtualAGV.IsPositionConfirmed} (RFID {PUB._virtualAGV.DetectedRfidCount}개)\n" +
|
||||
$"현재 노드: {curpos}\n" +
|
||||
|
||||
$"대상 노드: {targetpos}\n" +
|
||||
$"상세 경로: {pathdetail}";
|
||||
|
||||
|
||||
@@ -437,6 +437,7 @@ namespace Project
|
||||
PUB.Speak(Lang.자동전환, addlog: false);
|
||||
|
||||
PUB.log.Add($"자동전환 이전스텝:{PUB.sm.RunStep},IDX:{PUB.sm.RunStepSeq}]");
|
||||
PUB._mapCanvas.SetAlertMessage("START");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user