|
@@ -578,6 +578,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
this.refObjects = vehicleRefObjects;
|
|
this.refObjects = vehicleRefObjects;
|
|
|
|
|
|
|
|
this.refObjects.IO.OnChangedIO += IO_OnChangedIO;
|
|
this.refObjects.IO.OnChangedIO += IO_OnChangedIO;
|
|
|
|
|
+ this.refObjects.IO.OnContd += IO_OnContd;
|
|
|
|
|
|
|
|
this.refObjects.BMUManager.OnConnect += BMUManager_OnConnect;
|
|
this.refObjects.BMUManager.OnConnect += BMUManager_OnConnect;
|
|
|
this.refObjects.BMUManager.OnDisconnect += BMUManager_OnDisconnect;
|
|
this.refObjects.BMUManager.OnDisconnect += BMUManager_OnDisconnect;
|
|
@@ -1266,7 +1267,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
|
|
|
|
|
this.VehicleStateProperty = eVehicleState.Move;
|
|
this.VehicleStateProperty = eVehicleState.Move;
|
|
|
|
|
|
|
|
- this.ObstaclePatternChange(this.refObjects.ZmqManager.SegmentID);
|
|
|
|
|
|
|
+ //this.ObstaclePatternChange(this.refObjects.ZmqManager.SegmentID);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.OnMoving?.Invoke();
|
|
this.OnMoving?.Invoke();
|
|
@@ -2353,28 +2354,28 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
int TestLoad()
|
|
int TestLoad()
|
|
|
{
|
|
{
|
|
|
PIOClear();
|
|
PIOClear();
|
|
|
- this.OnPIOStart?.Invoke( true );
|
|
|
|
|
|
|
+ this.OnPIOStart?.Invoke(true);
|
|
|
|
|
|
|
|
- this.refObjects.IO.WriteOutputIO( "OUT_PIO_RECEIVE_RUN", true );
|
|
|
|
|
- loggerPIO.I( "[Vehicle] - 4 Receive Run On" );
|
|
|
|
|
|
|
+ this.refObjects.IO.WriteOutputIO("OUT_PIO_RECEIVE_RUN", true);
|
|
|
|
|
+ loggerPIO.I("[Vehicle] - 4 Receive Run On");
|
|
|
|
|
|
|
|
- Thread.Sleep( 1000 );//상대 IO 기다린다 생각.
|
|
|
|
|
- loggerPIO.I( "[Port] - 4 Ready On" );
|
|
|
|
|
|
|
+ Thread.Sleep(1000);//상대 IO 기다린다 생각.
|
|
|
|
|
+ loggerPIO.I("[Port] - 4 Ready On");
|
|
|
|
|
|
|
|
//Conveyor Start
|
|
//Conveyor Start
|
|
|
this.refObjects.Conveyor.OnOffConveyor(true, true);
|
|
this.refObjects.Conveyor.OnOffConveyor(true, true);
|
|
|
- loggerPIO.I( "[Vehicle] - Conveyor Run" );
|
|
|
|
|
- this.OnConveyorStart?.Invoke( true );
|
|
|
|
|
|
|
+ loggerPIO.I("[Vehicle] - Conveyor Run");
|
|
|
|
|
+ this.OnConveyorStart?.Invoke(true);
|
|
|
|
|
|
|
|
- Thread.Sleep( 10000 );//Conveyor 구동
|
|
|
|
|
- this.OnCarrierDetected?.Invoke( true );
|
|
|
|
|
|
|
+ Thread.Sleep(10000);//Conveyor 구동
|
|
|
|
|
+ this.OnCarrierDetected?.Invoke(true);
|
|
|
this.refObjects.Conveyor.OnOffConveyor(false);
|
|
this.refObjects.Conveyor.OnOffConveyor(false);
|
|
|
|
|
|
|
|
PIOClear();
|
|
PIOClear();
|
|
|
- Thread.Sleep( 1000 );
|
|
|
|
|
- this.OnConveyorStop?.Invoke( true );
|
|
|
|
|
|
|
+ Thread.Sleep(1000);
|
|
|
|
|
+ this.OnConveyorStop?.Invoke(true);
|
|
|
|
|
|
|
|
- Thread.Sleep( 1000 );
|
|
|
|
|
|
|
+ Thread.Sleep(1000);
|
|
|
this.OnLoadComplete?.Invoke();
|
|
this.OnLoadComplete?.Invoke();
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
@@ -2383,22 +2384,22 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
int TestUnload()
|
|
int TestUnload()
|
|
|
{
|
|
{
|
|
|
PIOClear();
|
|
PIOClear();
|
|
|
- this.OnPIOStart?.Invoke( false );
|
|
|
|
|
|
|
+ this.OnPIOStart?.Invoke(false);
|
|
|
|
|
|
|
|
- Thread.Sleep( 1000 );
|
|
|
|
|
|
|
+ Thread.Sleep(1000);
|
|
|
|
|
|
|
|
- this.refObjects.IO.WriteOutputIO( "OUT_PIO_READY", true );
|
|
|
|
|
- loggerPIO.I( "[Vehicle] - 1 Ready On" );
|
|
|
|
|
|
|
+ this.refObjects.IO.WriteOutputIO("OUT_PIO_READY", true);
|
|
|
|
|
+ loggerPIO.I("[Vehicle] - 1 Ready On");
|
|
|
|
|
|
|
|
- Thread.Sleep( 1000 );
|
|
|
|
|
- this.OnConveyorStart?.Invoke( false );
|
|
|
|
|
|
|
+ Thread.Sleep(1000);
|
|
|
|
|
+ this.OnConveyorStart?.Invoke(false);
|
|
|
|
|
|
|
|
- Thread.Sleep( 10000 );
|
|
|
|
|
- this.refObjects.Conveyor.OnOffConveyor( false ); //Stop
|
|
|
|
|
- this.OnConveyorStop?.Invoke( false );
|
|
|
|
|
|
|
+ Thread.Sleep(10000);
|
|
|
|
|
+ this.refObjects.Conveyor.OnOffConveyor(false); //Stop
|
|
|
|
|
+ this.OnConveyorStop?.Invoke(false);
|
|
|
PIOClear();
|
|
PIOClear();
|
|
|
|
|
|
|
|
- Thread.Sleep( 1000 );
|
|
|
|
|
|
|
+ Thread.Sleep(1000);
|
|
|
this.OnUnloadComplete?.Invoke();
|
|
this.OnUnloadComplete?.Invoke();
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
@@ -2948,6 +2949,23 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// 연결 초기에 장애물 감지 센서의 패턴을 30번으로 고정하여 사용.
|
|
|
|
|
+ /// 연결 초기 시 메뉴얼 상태일때만 동작.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ bool isFirstConnected = false;
|
|
|
|
|
+ private void IO_OnContd(string ID)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (this.refObjects.AutoManager.OperationModeProperty == eOperatationMode.ManualMode)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!isFirstConnected)
|
|
|
|
|
+ {
|
|
|
|
|
+ this.ChgObstacleDetectPattern(30);
|
|
|
|
|
+ isFirstConnected = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private void IO_OnChangedIO(BitBlock bit)
|
|
private void IO_OnChangedIO(BitBlock bit)
|
|
|
{
|
|
{
|
|
|
switch (bit.Tag)
|
|
switch (bit.Tag)
|