경로역방향 발생시 프로그램 통신 죽는 현상 수정
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -158,9 +158,9 @@ namespace Project
|
||||
|
||||
private void Bms_BMSDataReceive(object sender, EventArgs e)
|
||||
{
|
||||
PUB.mapctl.agv.BatteryLevel = PUB.BMS.Current_Level;
|
||||
PUB.mapctl.agv.BatteryTemp1 = PUB.BMS.Current_temp1;
|
||||
PUB.mapctl.agv.BatteryTemp2 = PUB.BMS.Current_temp2;
|
||||
AGVControl.MapControlManager.agv.BatteryLevel = PUB.BMS.Current_Level;
|
||||
AGVControl.MapControlManager.agv.BatteryTemp1 = PUB.BMS.Current_temp1;
|
||||
AGVControl.MapControlManager.agv.BatteryTemp2 = PUB.BMS.Current_temp2;
|
||||
if (PUB.BMS.Current_Level <= PUB.setting.ChargeStartLevel)
|
||||
{
|
||||
//배터리 레벨이 기준보다 낮다면 경고를 활성화 한다
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Project
|
||||
case ENIGProtocol.AGVCommands.Goto: //move to tag
|
||||
if (uint.TryParse(dataStr, out uint tagno2))
|
||||
{
|
||||
var currPos = PUB.mapctl.agv.CurrentRFID;///.AGVMoveToRFID(;
|
||||
var currPos = AGVControl.MapControlManager.agv.CurrentRFID;///.AGVMoveToRFID(;
|
||||
if (PUB.mapctl.SetTargetPosition(tagno2))
|
||||
PUB.log.AddI($"New Target {tagno2}");
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user