..
This commit is contained in:
@@ -41,31 +41,7 @@ namespace Project
|
||||
{
|
||||
try
|
||||
{
|
||||
if (PUB.mapctl != null)
|
||||
{
|
||||
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)
|
||||
{
|
||||
case arDev.Narumi.DataType.STS:
|
||||
@@ -83,12 +59,12 @@ namespace Project
|
||||
|
||||
//모터방향 입력
|
||||
if (PUB.AGV.data.Direction == 'B')
|
||||
AGVControl.MapControlManager.agv.CurrentMOTDirection = AGVControl.Models.Direction.Backward;
|
||||
PUB.mapctl.Manager.agv.CurrentMOTDirection = AGVControl.Direction.Backward;
|
||||
else
|
||||
AGVControl.MapControlManager.agv.CurrentMOTDirection = AGVControl.Models.Direction.Forward;
|
||||
PUB.mapctl.Manager.agv.CurrentMOTDirection = AGVControl.Direction.Forward;
|
||||
|
||||
AGVControl.MapControlManager.agv.IsMoving = PUB.AGV.system1.agv_run;
|
||||
AGVControl.MapControlManager.agv.IsMarkCheck = PUB.AGV.system1.Mark1_check || PUB.AGV.system1.Mark2_check;
|
||||
PUB.mapctl.Manager.agv.IsMoving = PUB.AGV.system1.agv_run;
|
||||
PUB.mapctl.Manager.agv.IsMarkCheck = PUB.AGV.system1.Mark1_check || PUB.AGV.system1.Mark2_check;
|
||||
|
||||
if (PUB.AGV.signal.mark_sensor == false)
|
||||
{
|
||||
@@ -201,10 +177,8 @@ namespace Project
|
||||
else
|
||||
{
|
||||
//위치는 찾았다 해당 위치가 내 목적지라면 mark stop기능으로 전환한다
|
||||
|
||||
}
|
||||
|
||||
|
||||
////자동, 상하차 모드일때 RFID 가 타겟위치에 올때는 - 멈춤을 설정해준다
|
||||
//if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true &&
|
||||
// PUB.Result.CurrentPos == PUB.Result.TargetPos &&
|
||||
@@ -237,12 +211,19 @@ namespace Project
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
//이 후 상황을 예측한다
|
||||
if (PUB.mapctl != null)
|
||||
{
|
||||
var rlt = PUB.mapctl.Manager.PredictNextAction();
|
||||
if (rlt.Changed)
|
||||
Console.WriteLine($"[new] predict idx:{rlt.Idx}");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"[AGV_DataReceive] {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user