|
@@ -3,7 +3,10 @@ using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
using System.Diagnostics;
|
|
using System.Diagnostics;
|
|
|
using System.Linq;
|
|
using System.Linq;
|
|
|
|
|
+using System.Net;
|
|
|
|
|
+using System.Net.NetworkInformation;
|
|
|
using System.Runtime.Remoting.Messaging;
|
|
using System.Runtime.Remoting.Messaging;
|
|
|
|
|
+using System.Text;
|
|
|
using System.Threading;
|
|
using System.Threading;
|
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
|
using FluentResults;
|
|
using FluentResults;
|
|
@@ -799,7 +802,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
|
|
|
|
|
|
|
|
|
|
//C/V Sensor 가 Load Start 만 감지면 Tray 가 설비 와 Vehicle 사이에 있는걸로 판단.
|
|
//C/V Sensor 가 Load Start 만 감지면 Tray 가 설비 와 Vehicle 사이에 있는걸로 판단.
|
|
|
- if ( !this.refObjects.Conveyor.IsDetectedCenter() && this.refObjects.Conveyor.IsDetectedLoadStart())
|
|
|
|
|
|
|
+ if (!this.refObjects.Conveyor.IsDetectedCenter() && this.refObjects.Conveyor.IsDetectedLoadStart())
|
|
|
return 46;
|
|
return 46;
|
|
|
|
|
|
|
|
if (this.refObjects.Conveyor.IsDetectedCenter()) //자제가 있으면 Lock
|
|
if (this.refObjects.Conveyor.IsDetectedCenter()) //자제가 있으면 Lock
|
|
@@ -816,7 +819,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
result = this.refObjects.Clamp.Unlock_Sync();
|
|
result = this.refObjects.Clamp.Unlock_Sync();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if ( result != ConstInt.EXECUTE_SUCCESS)
|
|
|
|
|
|
|
+ if (result != ConstInt.EXECUTE_SUCCESS)
|
|
|
return result;
|
|
return result;
|
|
|
|
|
|
|
|
if (result != ConstInt.EXECUTE_SUCCESS)
|
|
if (result != ConstInt.EXECUTE_SUCCESS)
|
|
@@ -910,12 +913,72 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
|
|
|
|
|
void ReqJog(DriveControlEventArgs _args)
|
|
void ReqJog(DriveControlEventArgs _args)
|
|
|
{
|
|
{
|
|
|
|
|
+ //var sessionInfo = TermServicesManager.ListSessions("").FirstOrDefault(_ => _.SessionId == 1);
|
|
|
|
|
+ //if (sessionInfo == null)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // logger.W("RDP not Connected!");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ //if (sessionInfo != null)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // if (sessionInfo.ConnectionState != TermServicesManager.WTS_CONNECTSTATE_CLASS.Active)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // logger.W("RDP is not Active!");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ //logger.I($"sessionInfo id -{sessionInfo.SessionId} / {sessionInfo.StationName} / {sessionInfo.ConnectionState}");
|
|
|
|
|
+
|
|
|
|
|
+ //int portNo = 3389;
|
|
|
|
|
+ //if ( !IsPortBeingUsed(portNo))
|
|
|
|
|
+ //{
|
|
|
|
|
+ // logger.W($"Port {portNo} Not Used");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ if (!CheckPing())
|
|
|
|
|
+ {
|
|
|
|
|
+ logger.W("Tablet is Disconnected");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (_args.JogDir == DriveControlEventArgs.eJogMoveDir.Positive)
|
|
if (_args.JogDir == DriveControlEventArgs.eJogMoveDir.Positive)
|
|
|
this.refObjects.Drive.JogForword();
|
|
this.refObjects.Drive.JogForword();
|
|
|
else
|
|
else
|
|
|
this.refObjects.Drive.JogBackword();
|
|
this.refObjects.Drive.JogBackword();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //bool IsPortBeingUsed(int portNo)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // return IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpListeners().Any(tcp => tcp.Port == portNo);
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ bool CheckPing()
|
|
|
|
|
+ {
|
|
|
|
|
+ bool result = false;
|
|
|
|
|
+ PingOptions option = new PingOptions();
|
|
|
|
|
+ Ping ping = new Ping();
|
|
|
|
|
+
|
|
|
|
|
+ byte[] buffer = ASCIIEncoding.ASCII.GetBytes("");
|
|
|
|
|
+ int timeout = 100;
|
|
|
|
|
+ try
|
|
|
|
|
+ {
|
|
|
|
|
+ var pingReply = ping.Send(IPAddress.Parse("109.19.25.240"), timeout, buffer, option);
|
|
|
|
|
+ if (pingReply.Status == IPStatus.Success)
|
|
|
|
|
+ result = true;
|
|
|
|
|
+ else
|
|
|
|
|
+ result = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ catch (Exception ex)
|
|
|
|
|
+ {
|
|
|
|
|
+ logger.E(ex);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
Logger batteryLogger = Logger.GetLogger("BatteryLogger");
|
|
Logger batteryLogger = Logger.GetLogger("BatteryLogger");
|
|
|
void ReqCurrentPos()
|
|
void ReqCurrentPos()
|
|
|
{
|
|
{
|
|
@@ -1497,7 +1560,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
if (result != ConstInt.EXECUTE_SUCCESS)
|
|
if (result != ConstInt.EXECUTE_SUCCESS)
|
|
|
{
|
|
{
|
|
|
this.OccurVehicleAlarm(result);
|
|
this.OccurVehicleAlarm(result);
|
|
|
- if ( !IsChargeCylinderForword() )
|
|
|
|
|
|
|
+ if (!IsChargeCylinderForword())
|
|
|
this.OnChargingFull?.Invoke();
|
|
this.OnChargingFull?.Invoke();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1771,12 +1834,12 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
this.ObstacleStateProperty = eObstacleState.Normal;
|
|
this.ObstacleStateProperty = eObstacleState.Normal;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if ( this.ObstacleStateProperty == eObstacleState.Blocked) //210812 Kkm
|
|
|
|
|
|
|
+ if (this.ObstacleStateProperty == eObstacleState.Blocked) //210812 Kkm
|
|
|
{
|
|
{
|
|
|
if (this.IsMoving)
|
|
if (this.IsMoving)
|
|
|
this.refObjects.AutoManager.IsBlockedMoving = true;
|
|
this.refObjects.AutoManager.IsBlockedMoving = true;
|
|
|
}
|
|
}
|
|
|
- else if(this.ObstacleStateProperty == eObstacleState.Normal) //210812 Kkm
|
|
|
|
|
|
|
+ else if (this.ObstacleStateProperty == eObstacleState.Normal) //210812 Kkm
|
|
|
{
|
|
{
|
|
|
if (this.IsMoving)
|
|
if (this.IsMoving)
|
|
|
this.refObjects.AutoManager.IsBlockedMoving = false;
|
|
this.refObjects.AutoManager.IsBlockedMoving = false;
|
|
@@ -1883,9 +1946,9 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
if (result != 0)
|
|
if (result != 0)
|
|
|
return result;
|
|
return result;
|
|
|
|
|
|
|
|
- if (!this.refObjects.IO.WaitChangeInputIO(true, 40 * ConstUtils.ONE_SECOND, "IN_LIFTER_POSITION_DETECT"))
|
|
|
|
|
|
|
+ if (!this.refObjects.IO.WaitChangeInputIO(true, pioTimeout * ConstUtils.ONE_SECOND, "IN_LIFTER_POSITION_DETECT"))
|
|
|
{
|
|
{
|
|
|
- loggerPIO.E($"Load Action / [Port {targetName}] - Lift Position Check Error / Timeout[40sec]");
|
|
|
|
|
|
|
+ loggerPIO.E($"Load Action / [Port {targetName}] - Lift Position Check Error / Timeout[{pioTimeout}sec]");
|
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.LoadPIOInterlockTimeout);
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.LoadPIOInterlockTimeout);
|
|
|
//this.OnFailReport?.Invoke( eFailCode.LoadPIOInterlockTimeout );
|
|
//this.OnFailReport?.Invoke( eFailCode.LoadPIOInterlockTimeout );
|
|
|
return 0; //14
|
|
return 0; //14
|
|
@@ -1913,7 +1976,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
if (!this.refObjects.IO.WaitChangeInputIO(true, pioTimeout * ConstUtils.ONE_SECOND, "IN_PIO_SENDABLE"))
|
|
if (!this.refObjects.IO.WaitChangeInputIO(true, pioTimeout * ConstUtils.ONE_SECOND, "IN_PIO_SENDABLE"))
|
|
|
{
|
|
{
|
|
|
PIOClear();
|
|
PIOClear();
|
|
|
- loggerPIO.E($"Load Action / [Port {targetName}] - 4 Ready Time Out / Timeout[{pioTimeout}]");
|
|
|
|
|
|
|
+ loggerPIO.E($"Load Action / [Port {targetName}] - 4 Ready Time Out / Timeout[{pioTimeout}sec]");
|
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.LoadPIOInterlockTimeout);
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.LoadPIOInterlockTimeout);
|
|
|
//this.OnFailReport?.Invoke( eFailCode.LoadPIOInterlockTimeout );
|
|
//this.OnFailReport?.Invoke( eFailCode.LoadPIOInterlockTimeout );
|
|
|
return 0;
|
|
return 0;
|
|
@@ -1933,7 +1996,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
{
|
|
{
|
|
|
this.refObjects.Conveyor.OnOffConveyor(false, true);
|
|
this.refObjects.Conveyor.OnOffConveyor(false, true);
|
|
|
PIOClear();
|
|
PIOClear();
|
|
|
- loggerPIO.E($"Load Action / [Port {targetName}] - 5 Sending Run Time Out");
|
|
|
|
|
|
|
+ loggerPIO.E($"Load Action / [Port {targetName}] - 5 Sending Run Time Out / Timeout[10sec]");
|
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.LoadPIOInterlockTimeout);
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.LoadPIOInterlockTimeout);
|
|
|
//this.OnFailReport?.Invoke( eFailCode.LoadPIOInterlockTimeout );
|
|
//this.OnFailReport?.Invoke( eFailCode.LoadPIOInterlockTimeout );
|
|
|
return 0;
|
|
return 0;
|
|
@@ -1976,7 +2039,6 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
this.OnCarrierDetected?.Invoke(true);
|
|
this.OnCarrierDetected?.Invoke(true);
|
|
|
|
|
|
|
|
this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
|
- PIOClear();
|
|
|
|
|
this.OnConveyorStop?.Invoke(true);
|
|
this.OnConveyorStop?.Invoke(true);
|
|
|
loggerPIO.I("Load Action / [Vehicle] Conveyor Stop");
|
|
loggerPIO.I("Load Action / [Vehicle] Conveyor Stop");
|
|
|
|
|
|
|
@@ -1990,8 +2052,8 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
}
|
|
}
|
|
|
loggerPIO.I("[Port] Send Complete On");
|
|
loggerPIO.I("[Port] Send Complete On");
|
|
|
|
|
|
|
|
- this.refObjects.IO.WriteOutputIO("OUT_PIO_RECIVE_COMPLITE", false, 1000);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ LockUtils.Wait(1 * ConstUtils.ONE_SECOND);
|
|
|
|
|
+ PIOClear();
|
|
|
loggerPIO.I($"Load Action / End Load PIO - [{targetName}]");
|
|
loggerPIO.I($"Load Action / End Load PIO - [{targetName}]");
|
|
|
|
|
|
|
|
result = this.refObjects.Clamp.Lock_Sync();
|
|
result = this.refObjects.Clamp.Lock_Sync();
|
|
@@ -2053,15 +2115,13 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
if (!this.refObjects.Conveyor.IsDetectedCenter())
|
|
if (!this.refObjects.Conveyor.IsDetectedCenter())
|
|
|
{
|
|
{
|
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.Unload_VehicleHasNotCarrier);
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.Unload_VehicleHasNotCarrier);
|
|
|
- //this.OnFailReport?.Invoke( eFailCode.Unload_VehicleHasNotCarrier );
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (!this.refObjects.IO.WaitChangeInputIO(true, 40 * ConstUtils.ONE_SECOND, "IN_LIFTER_POSITION_DETECT"))
|
|
|
|
|
|
|
+ if (!this.refObjects.IO.WaitChangeInputIO(true, pioTimeout * ConstUtils.ONE_SECOND, "IN_LIFTER_POSITION_DETECT"))
|
|
|
{
|
|
{
|
|
|
- loggerPIO.E($"Unload Action / [Port {targetName}] - Lift Position Check Error");
|
|
|
|
|
|
|
+ loggerPIO.E($"Unload Action / [Port {targetName}] - Lift Position Check Error / Timeout[{pioTimeout}sec]");
|
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.UnlaodPIOInterlockTimeout);
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.UnlaodPIOInterlockTimeout);
|
|
|
- //this.OnFailReport?.Invoke( eFailCode.UnlaodPIOInterlockTimeout );
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2072,14 +2132,12 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
// return 0; //13 -> Alarm Code 보고 없음. 경알람 상태 이므로 한번 보고 후 정상 동작
|
|
// return 0; //13 -> Alarm Code 보고 없음. 경알람 상태 이므로 한번 보고 후 정상 동작
|
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
- PIOClear();
|
|
|
|
|
this.OnPIOStart?.Invoke(false);
|
|
this.OnPIOStart?.Invoke(false);
|
|
|
|
|
|
|
|
if (!this.refObjects.IO.WaitChangeInputIO(true, pioTimeout * ConstUtils.ONE_SECOND, "IN_PIO_READY"))
|
|
if (!this.refObjects.IO.WaitChangeInputIO(true, pioTimeout * ConstUtils.ONE_SECOND, "IN_PIO_READY"))
|
|
|
{
|
|
{
|
|
|
- loggerPIO.E($"Unload Action / [Port {targetName}] - 1 Ready not On");
|
|
|
|
|
|
|
+ loggerPIO.E($"Unload Action / [Port {targetName}] - 1 Ready not On / Timeout[{pioTimeout}sec]");
|
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.UnlaodPIOInterlockTimeout);
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.UnlaodPIOInterlockTimeout);
|
|
|
- //this.OnFailReport?.Invoke( eFailCode.UnlaodPIOInterlockTimeout );
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2089,9 +2147,8 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
if (!this.refObjects.IO.WaitChangeInputIO(true, 10 * ConstUtils.ONE_SECOND, "IN_PIO_RECEIVE_RUN"))
|
|
if (!this.refObjects.IO.WaitChangeInputIO(true, 10 * ConstUtils.ONE_SECOND, "IN_PIO_RECEIVE_RUN"))
|
|
|
{
|
|
{
|
|
|
PIOClear();
|
|
PIOClear();
|
|
|
- loggerPIO.E($"Unload Action / [Port {targetName}] - 2 Receive CV Run Timeout");
|
|
|
|
|
|
|
+ loggerPIO.E($"Unload Action / [Port {targetName}] - 2 Receive CV Run Timeout / Timeout[10sec]");
|
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.UnlaodPIOInterlockTimeout);
|
|
TimerUtils.Once(1000, this.OnFailReport, eFailCode.UnlaodPIOInterlockTimeout);
|
|
|
- //this.OnFailReport?.Invoke( eFailCode.UnlaodPIOInterlockTimeout );
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
loggerPIO.I("Unload Action / [Port] - 2 Receive CV Run On");
|
|
loggerPIO.I("Unload Action / [Port] - 2 Receive CV Run On");
|
|
@@ -2103,7 +2160,6 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_SENDING_RUN", true);
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_SENDING_RUN", true);
|
|
|
loggerPIO.I("Unload Action / [Vehicle] - 2 Send Run On");
|
|
loggerPIO.I("Unload Action / [Vehicle] - 2 Send Run On");
|
|
|
|
|
|
|
|
- //this.conveyor.SetConveyorSpeed( true );
|
|
|
|
|
this.refObjects.Conveyor.OnOffConveyor(true);
|
|
this.refObjects.Conveyor.OnOffConveyor(true);
|
|
|
this.OnConveyorStart?.Invoke(false);
|
|
this.OnConveyorStart?.Invoke(false);
|
|
|
|
|
|
|
@@ -2117,7 +2173,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_INTERLOCK", true);
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_INTERLOCK", true);
|
|
|
|
|
|
|
|
this.refObjects.Conveyor.OnOffConveyor(false, true);
|
|
this.refObjects.Conveyor.OnOffConveyor(false, true);
|
|
|
- loggerPIO.E($"Unload Action / [Port {targetName}] Conveyor Wait Time Out");
|
|
|
|
|
|
|
+ loggerPIO.E($"Unload Action / [Port {targetName}] Conveyor Wait Time Out / Timeout[30sec]");
|
|
|
//TimerUtils.Once( 1000, this.OnFailReport, eFailCode.UnlaodPIOInterlockTimeout );
|
|
//TimerUtils.Once( 1000, this.OnFailReport, eFailCode.UnlaodPIOInterlockTimeout );
|
|
|
|
|
|
|
|
return 12; // 2020.07.18 Kang. 센서에 걸리지 않아도 중간에 걸려 있을 가능성 때문에 알람 처리.
|
|
return 12; // 2020.07.18 Kang. 센서에 걸리지 않아도 중간에 걸려 있을 가능성 때문에 알람 처리.
|
|
@@ -2162,13 +2218,12 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
|
|
|
|
|
this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
|
this.OnConveyorStop?.Invoke(false);
|
|
this.OnConveyorStop?.Invoke(false);
|
|
|
- PIOClear();
|
|
|
|
|
|
|
|
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_SEND_COMPLITE", true);
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_SEND_COMPLITE", true);
|
|
|
Thread.Sleep(1000);
|
|
Thread.Sleep(1000);
|
|
|
- this.refObjects.IO.WriteOutputIO("OUT_PIO_SEND_COMPLITE", false);
|
|
|
|
|
loggerPIO.I("Unload Action / [Vehicle] - 3 Send Complete OnOff");
|
|
loggerPIO.I("Unload Action / [Vehicle] - 3 Send Complete OnOff");
|
|
|
#endif
|
|
#endif
|
|
|
|
|
+ PIOClear();
|
|
|
loggerPIO.I($"Unload Action / End Unload PIO - [{targetName}]");
|
|
loggerPIO.I($"Unload Action / End Unload PIO - [{targetName}]");
|
|
|
|
|
|
|
|
//2020.08.18.Kang. Conveyor 작동후 OCS 연결이 끊어지면 알람 처리
|
|
//2020.08.18.Kang. Conveyor 작동후 OCS 연결이 끊어지면 알람 처리
|
|
@@ -2185,7 +2240,6 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
loggerPIO.I($"Start Load PIO - [{this.CurrentTag}]");
|
|
loggerPIO.I($"Start Load PIO - [{this.CurrentTag}]");
|
|
|
|
|
|
|
|
PIOClear();
|
|
PIOClear();
|
|
|
-
|
|
|
|
|
this.PIOSensorOn();
|
|
this.PIOSensorOn();
|
|
|
|
|
|
|
|
int result = ConstInt.EXECUTE_SUCCESS;
|
|
int result = ConstInt.EXECUTE_SUCCESS;
|
|
@@ -2270,7 +2324,6 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
|
- PIOClear();
|
|
|
|
|
loggerPIO.I("[Vehicle] Conveyor Stop");
|
|
loggerPIO.I("[Vehicle] Conveyor Stop");
|
|
|
|
|
|
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_RECIVE_COMPLITE", true);
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_RECIVE_COMPLITE", true);
|
|
@@ -2283,7 +2336,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
}
|
|
}
|
|
|
loggerPIO.I("[Port] Send Complete On");
|
|
loggerPIO.I("[Port] Send Complete On");
|
|
|
|
|
|
|
|
- this.refObjects.IO.WriteOutputIO("OUT_PIO_RECIVE_COMPLITE", false, 1000);
|
|
|
|
|
|
|
+ PIOClear();
|
|
|
|
|
|
|
|
loggerPIO.I($"End Load PIO - [{this.CurrentTag}]");
|
|
loggerPIO.I($"End Load PIO - [{this.CurrentTag}]");
|
|
|
|
|
|
|
@@ -2367,11 +2420,10 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
|
- PIOClear();
|
|
|
|
|
|
|
|
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_SEND_COMPLITE", true);
|
|
this.refObjects.IO.WriteOutputIO("OUT_PIO_SEND_COMPLITE", true);
|
|
|
LockUtils.Wait(1000);
|
|
LockUtils.Wait(1000);
|
|
|
- this.refObjects.IO.WriteOutputIO("OUT_PIO_SEND_COMPLITE", false);
|
|
|
|
|
|
|
+ PIOClear();
|
|
|
loggerPIO.I("[Vehicle] - 3 Send Complete OnOff");
|
|
loggerPIO.I("[Vehicle] - 3 Send Complete OnOff");
|
|
|
loggerPIO.I($"End Unload PIO - [{CurrentTag}]");
|
|
loggerPIO.I($"End Unload PIO - [{CurrentTag}]");
|
|
|
|
|
|
|
@@ -2660,7 +2712,13 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
case eDataKind.SOC:
|
|
case eDataKind.SOC:
|
|
|
- this.BatteryStateOfCharge = (double)obj.Value;
|
|
|
|
|
|
|
+ if (this.BatteryVoltage <= 45 && obj.Value > 15) //2021.09.03 Kang. Battery 통신 Module % 계산이 안맞아 최저 수치 이하로 내려 가면 강재로 15%로 설정
|
|
|
|
|
+ {
|
|
|
|
|
+ this.batteryStateOfCharge = 15;
|
|
|
|
|
+ logger.D($"[BMS] - Real SOC is {obj.Value} / Votage is {this.BatteryVoltage} - Changed SOC -> 15%");
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ this.BatteryStateOfCharge = (double)obj.Value;
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
case eDataKind.SOH:
|
|
case eDataKind.SOH:
|