ai로그 추가
This commit is contained in:
@@ -19,6 +19,7 @@ namespace Project
|
||||
|
||||
private void XBE_ProtocReceived(object sender, ENIG.EEProtocol.DataEventArgs e)
|
||||
{
|
||||
PUB.logdebug.Add($"[AI_TRACE] XBEE Protoc Received: Cmd={e.ReceivedPacket.Command}, ID={e.ReceivedPacket.ID}, DataLen={e.ReceivedPacket.Data.Length}");
|
||||
//TODO : 기능 처리필요 (XBee 메세지 데이터처리)
|
||||
//PUB.CheckManualChargeMode() : 수동충전확인
|
||||
//VAR.BOOL[eVarBool.FLAG_AUTORUN] : 자동실행
|
||||
@@ -87,6 +88,7 @@ namespace Project
|
||||
{
|
||||
Resultclear();
|
||||
PUB.log.AddI($"XBEE:작업명령수신:{cmd}");
|
||||
PUB.logdebug.Add($"[AI_TRACE] Processing WorkCommand: {cmd}");
|
||||
|
||||
// 현재 위치 확인 (TargetNode가 아닌 CurrentNode 기준)
|
||||
var currNode = PUB._virtualAGV.CurrentNode;
|
||||
@@ -167,6 +169,7 @@ namespace Project
|
||||
{
|
||||
Resultclear();
|
||||
PUB.log.AddI($"XBEE:작업명령수신:{cmd}");
|
||||
PUB.logdebug.Add($"[AI_TRACE] Processing Exit WorkCommand: {cmd}");
|
||||
|
||||
// 현재 위치 확인 (TargetNode가 아닌 CurrentNode 기준)
|
||||
var currNode = PUB._virtualAGV.CurrentNode;
|
||||
@@ -198,6 +201,7 @@ namespace Project
|
||||
case StationType.Buffer: nextStep = ERunStep.BUFFER_OUT; break;
|
||||
case StationType.Plating: nextStep = ERunStep.CLEANER_OUT; break;
|
||||
default:
|
||||
PUB.logdebug.Add($"[AI_TRACE] REJECTED: Unsupported station type {StationType} for command {cmd}");
|
||||
PUB.log.AddE($"[{logPrefix}-{cmd}] 해당 노드타입({StationType})은 작업을 지원하지 않습니다.");
|
||||
return;
|
||||
}
|
||||
@@ -238,6 +242,7 @@ namespace Project
|
||||
{
|
||||
Resultclear();
|
||||
PUB.log.AddI($"XBEE:충전명령수신");
|
||||
PUB.logdebug.Add($"[AI_TRACE] Processing Charger Command");
|
||||
|
||||
// 버퍼 작업 중일 경우 충전 명령 거부
|
||||
if (PUB._virtualAGV.Turn != AGVTurn.None)
|
||||
@@ -275,12 +280,11 @@ namespace Project
|
||||
//자동상태가아니라면 처리하지 않는다.
|
||||
if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false)
|
||||
{
|
||||
PUB.logdebug.Add($"[AI_TRACE] REJECTED: Manual mode (AutoRun=false) for Goto {currTag}");
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.ManualMode, $"[{logPrefix}-Goto] 자동실행상태가 아닙니다");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//노드가 들어왔는데. 일반 노드라면.. 턴 정보를 제거한다.
|
||||
if (PUB._virtualAGV.CurrentNode != null &&
|
||||
PUB._virtualAGV.CurrentNode.StationType != StationType.Buffer &&
|
||||
@@ -290,7 +294,6 @@ namespace Project
|
||||
PUB._virtualAGV.Turn = AGVTurn.None;
|
||||
}
|
||||
|
||||
|
||||
//s/w턴이 걸려있다면 이동 불가로한다.(버퍼 작업중이다)
|
||||
if (PUB._virtualAGV.Turn != AGVTurn.None)
|
||||
{
|
||||
@@ -298,7 +301,6 @@ namespace Project
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//목적지
|
||||
PUB._virtualAGV.TargetNode = targetNode;
|
||||
if (targetNode == null)
|
||||
|
||||
Reference in New Issue
Block a user