|
|
|
@ -66,7 +66,6 @@ public class MonitorService
|
|
|
|
|
: null,
|
|
|
|
|
Break = StationSoftMgr.SwappingStateMachine.BoxCarInfoModel?.CarStatus?.Break,
|
|
|
|
|
Gear = StationSoftMgr.SwappingStateMachine.BoxCarInfoModel?.CarStatus?.Gear,
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
BatteryInfo = new()
|
|
|
|
|
{
|
|
|
|
@ -173,15 +172,29 @@ public class MonitorService
|
|
|
|
|
return Result<bool>.Fail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = PlcMgr.ReadTaskStatus(2);
|
|
|
|
|
int count = 3;
|
|
|
|
|
while (count > 0)
|
|
|
|
|
{
|
|
|
|
|
result = PlcMgr.ReadTaskStatus(2);
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
count--;
|
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!result)
|
|
|
|
|
{
|
|
|
|
|
Log.Error("BatteryRelocation PlcMgr.ReadTaskStatus(2) =false");
|
|
|
|
|
return Result<bool>.Fail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = PlcMgr.HoldOn();
|
|
|
|
|
if (!result)
|
|
|
|
|
{
|
|
|
|
|
Log.Error("BatteryRelocation PlcMgr.HoldOn() =false");
|
|
|
|
|
return Result<bool>.Fail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|