경로역방향 발생시 프로그램 통신 죽는 현상 수정

This commit is contained in:
chi
2025-06-26 15:34:46 +09:00
parent f1aeeeba12
commit 02e71d7446
8 changed files with 655 additions and 588 deletions

View File

@@ -41,10 +41,30 @@ namespace Project
{
try
{
if (PUB.mapctl != null)
PUB.mapctl.PredictNextAction();
{
var rlt = AGVControl.MapControlManager.PredictNextAction();
if (rlt.ReasonCode == AGVControl.AGVActionReasonCode.busy)
{
//var premsg = $"이전 예측작업이 완료되지 않았습니다";
//PUB.log.AddE(premsg);
//PUB.log.AddE(premsg);
//Console.WriteLine(premsg);
//predicterr += 1;
//if (predicterr > 10)
//{
// var premsg = $"행동예측 오류카운트 초과";
// PUB.AGV.AGVMoveStop(premsg);
// PUB.log.AddE(premsg);
// PUB.logagv.AddE(premsg);
// Console.WriteLine(premsg);
//}
}
}
switch (e.DataType)
{
@@ -63,12 +83,12 @@ namespace Project
//모터방향 입력
if (PUB.AGV.data.Direction == 'B')
PUB.mapctl.agv.CurrentMOTDirection = AGVControl.Models.Direction.Backward;
AGVControl.MapControlManager.agv.CurrentMOTDirection = AGVControl.Models.Direction.Backward;
else
PUB.mapctl.agv.CurrentMOTDirection = AGVControl.Models.Direction.Forward;
AGVControl.MapControlManager.agv.CurrentMOTDirection = AGVControl.Models.Direction.Forward;
PUB.mapctl.agv.IsMoving = PUB.AGV.system1.agv_run;
PUB.mapctl.agv.IsMarkCheck = PUB.AGV.system1.Mark1_check || PUB.AGV.system1.Mark2_check;
AGVControl.MapControlManager.agv.IsMoving = PUB.AGV.system1.agv_run;
AGVControl.MapControlManager.agv.IsMarkCheck = PUB.AGV.system1.Mark1_check || PUB.AGV.system1.Mark2_check;
if (PUB.AGV.signal.mark_sensor == false)
{