..
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
@@ -15,6 +16,7 @@ namespace Project
|
||||
DateTime LastCommandTime = DateTime.Now;
|
||||
DateTime LastCommandTimeNextStop = DateTime.Now;
|
||||
bool runStepisFirst = false;
|
||||
|
||||
private void _SM_RUN(Boolean isFirst, TimeSpan stepTime)
|
||||
{
|
||||
//중단기능이 동작이라면 처리하지 않는다.
|
||||
@@ -62,9 +64,9 @@ namespace Project
|
||||
if (isFirst)
|
||||
{
|
||||
if (PUB.sm.RunStep == ERunStep.READY)
|
||||
VAR.TIME.Set(eVarTime.ReadyStart);
|
||||
VAR.TIME.Update(eVarTime.ReadyStart);
|
||||
else
|
||||
VAR.TIME.Set(eVarTime.RunStart);
|
||||
VAR.TIME.Update(eVarTime.RunStart);
|
||||
}
|
||||
|
||||
switch (PUB.sm.RunStep)
|
||||
@@ -95,7 +97,7 @@ namespace Project
|
||||
case ERunStep.CHARGECHECK: //충전중
|
||||
if (runStepisFirst)
|
||||
{
|
||||
VAR.TIME.Set(eVarTime.ChargeStart);
|
||||
VAR.TIME.Update(eVarTime.ChargeStart);
|
||||
LastCommandTime = DateTime.Now;
|
||||
}
|
||||
else if (_SM_RUN_GOCHARGECHECK(runStepisFirst, PUB.sm.GetRunSteptime))
|
||||
@@ -109,7 +111,7 @@ namespace Project
|
||||
case ERunStep.CHARGEOFF:
|
||||
if (runStepisFirst)
|
||||
{
|
||||
VAR.TIME.Set(eVarTime.ChargeEnd);
|
||||
VAR.TIME.Update(eVarTime.ChargeEnd);
|
||||
LastCommandTime = DateTime.Now;
|
||||
}
|
||||
else
|
||||
@@ -160,8 +162,8 @@ namespace Project
|
||||
if (_SM_RUN_GODOWN(runStepisFirst, PUB.sm.GetRunSteptime))
|
||||
{
|
||||
PUB.Speak(Lang.하차작업이완료되었습니다);
|
||||
VAR.TIME.Set(eVarTime.ChargeTry);
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down);// (Device.PLC.ZMotDirection.Down); //하차작업이 완료되면 커버를 내려서 바로 작업할 수 있게 한다.
|
||||
VAR.TIME.Update(eVarTime.ChargeTry);
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.DN);// (Device.PLC.ZMotDirection.Down); //하차작업이 완료되면 커버를 내려서 바로 작업할 수 있게 한다.
|
||||
|
||||
//230601
|
||||
//if (PUB.Result != null && PUB.sm != null)
|
||||
@@ -200,7 +202,7 @@ namespace Project
|
||||
// EEMStatus.AddEEDBSQL(PUB.sm.Step, PUB.sm.RunStep.ToString(), PUB.Result.TargetPos.ToString());
|
||||
|
||||
PUB.Speak(Lang.홈이동완료대기상태로전환합니다);
|
||||
VAR.TIME.Set(eVarTime.ChargeTry);
|
||||
VAR.TIME.Update(eVarTime.ChargeTry);
|
||||
PUB.sm.SetNewRunStep(ERunStep.READY); //대기상태로 전환한다
|
||||
return;
|
||||
}
|
||||
@@ -213,6 +215,7 @@ namespace Project
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void CheckAGVMoveTo(eGoDir dir)
|
||||
{
|
||||
//계속내려간다
|
||||
@@ -233,15 +236,12 @@ namespace Project
|
||||
{
|
||||
PUB.log.Add($"마크정지를 해제하기 위해 장비를 멈춥니다");
|
||||
}
|
||||
//이동해야하는데 마크 스탑이 되어있다면 일단 멈춘다
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//움직이지 않으므로 전진하도록 한다
|
||||
PUB.log.Add($"AGV 기동 방향(DOWN):{dir}");
|
||||
PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward);//PUB.PLC.Move(Device.PLC.Rundirection.Backward, "UpdateMotionPosition(" + sender + ")");
|
||||
|
||||
PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward);
|
||||
}
|
||||
LastCommandTime = DateTime.Now;
|
||||
}
|
||||
@@ -266,8 +266,7 @@ namespace Project
|
||||
else
|
||||
{
|
||||
PUB.log.Add($"AGV 기동 방향(UP):{dir}");
|
||||
PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward);//PUB.PLC.Move(Device.PLC.Rundirection.Backward, "UpdateMotionPosition(" + sender + ")");
|
||||
|
||||
PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward);
|
||||
}
|
||||
LastCommandTime = DateTime.Now;
|
||||
}
|
||||
@@ -546,5 +545,7 @@ namespace Project
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}//cvass
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
@@ -18,7 +19,7 @@ namespace Project
|
||||
{
|
||||
if (isFirst)
|
||||
{
|
||||
VAR.TIME.Set(eVarTime.ChargeEnd);
|
||||
VAR.TIME.Update(eVarTime.ChargeEnd);
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONA])
|
||||
{
|
||||
PUB.Speak(Lang.충전을해제합니다);
|
||||
@@ -44,7 +45,7 @@ namespace Project
|
||||
{
|
||||
PUB.log.Add("충전 해제 전송");
|
||||
PUB.AGV.AGVCharge(PUB.setting.ChargerID, false);
|
||||
VAR.TIME.Set(eVarTime.SendChargeOff);
|
||||
VAR.TIME.Update(eVarTime.SendChargeOff);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
@@ -26,11 +27,7 @@ namespace Project
|
||||
PUB.Result.SetResultMessage(eResult.Hardware, eECode.AGVCONN, eNextStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
else if (PUB.PLC.IsValid == false)
|
||||
{
|
||||
PUB.Result.SetResultMessage(eResult.Hardware, eECode.PLCCONN, eNextStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//충전 상태가 OFF되어야 동작하게한다
|
||||
if (_SM_RUN_CHGOFF(isFirst, stepTime) == false)
|
||||
@@ -68,7 +65,7 @@ namespace Project
|
||||
{
|
||||
PUB.Speak(Lang.충전을위해홈위치로이동합니다);
|
||||
PUB.Result.TargetPos = ePosition.QC;
|
||||
VAR.TIME.Set(eVarTime.ChargeSearch);
|
||||
VAR.TIME.Update(eVarTime.ChargeSearch);
|
||||
PUB.sm.UpdateRunStepSeq();
|
||||
PUB.log.Add($"충전:대상위치 QC 시작");
|
||||
return false;
|
||||
@@ -114,7 +111,7 @@ namespace Project
|
||||
});
|
||||
PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward);
|
||||
//PUB.Result.TargetPos = ePosition.CHARGE;
|
||||
VAR.TIME.Set(eVarTime.ChargeSearch);
|
||||
VAR.TIME.Update(eVarTime.ChargeSearch);
|
||||
}
|
||||
else if (PUB.setting.chargerpos == 2) //up search
|
||||
{
|
||||
@@ -129,7 +126,7 @@ namespace Project
|
||||
});
|
||||
PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward);
|
||||
//PUB.Result.TargetPos = ePosition.CHARGE;
|
||||
VAR.TIME.Set(eVarTime.ChargeSearch);
|
||||
VAR.TIME.Update(eVarTime.ChargeSearch);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -148,7 +145,7 @@ namespace Project
|
||||
PUB.log.Add($"충전:AGV기동확인으로 마크정지신호설정");
|
||||
PUB.Speak(Lang.다음마크위치에서정지합니다);
|
||||
PUB.AGV.AGVMoveStop("SM_RUN_GOCHARGE", arDev.Narumi.eStopOpt.MarkStop);
|
||||
VAR.TIME.Set(eVarTime.ChargeSearch);
|
||||
VAR.TIME.Update(eVarTime.ChargeSearch);
|
||||
PUB.sm.UpdateRunStepSeq();
|
||||
}
|
||||
else
|
||||
@@ -163,7 +160,7 @@ namespace Project
|
||||
}
|
||||
else
|
||||
{
|
||||
VAR.TIME.Set(eVarTime.ChargeSearch);
|
||||
VAR.TIME.Update(eVarTime.ChargeSearch);
|
||||
PUB.sm.UpdateRunStepSeq();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
@@ -25,11 +26,7 @@ namespace Project
|
||||
PUB.Result.SetResultMessage(eResult.Hardware, eECode.AGVCONN, eNextStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
else if (PUB.PLC.IsValid == false)
|
||||
{
|
||||
PUB.Result.SetResultMessage(eResult.Hardware, eECode.PLCCONN, eNextStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//충전 상태가 OFF되어야 동작하게한다
|
||||
if (_SM_RUN_CHGOFF(isFirst, stepTime) == false)
|
||||
@@ -124,19 +121,19 @@ namespace Project
|
||||
CoverControlTime = DateTime.Now;
|
||||
UpdateProgressStatus(stepTime.TotalSeconds, 5, Lang.안전커버를내립니다);
|
||||
VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = true;
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down);//
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.DN);//
|
||||
PUB.sm.UpdateRunStepSeq();
|
||||
return false;
|
||||
}
|
||||
else if (PUB.sm.RunStepSeq == 7)
|
||||
{
|
||||
//커버 내림이 완료될때까지 기다린다
|
||||
if (PUB.PLC.IsLimitDn() == true)
|
||||
{
|
||||
VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = false;
|
||||
PUB.sm.UpdateRunStepSeq();
|
||||
}
|
||||
else
|
||||
//if (PUB.PLC.IsLimitDn() == true)
|
||||
//{
|
||||
// VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = false;
|
||||
// PUB.sm.UpdateRunStepSeq();
|
||||
//}
|
||||
//else
|
||||
{
|
||||
//경과시간이 10초가 지나면 5초마다 음성을 출력한다
|
||||
var tsCover = DateTime.Now - CoverControlTime;
|
||||
@@ -177,39 +174,39 @@ namespace Project
|
||||
PUB.Speak(Lang.안전커버를올려주세요);
|
||||
CoverControlTime = DateTime.Now;
|
||||
|
||||
//한쪽이 올라가 있는 상태에..
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == true)
|
||||
{
|
||||
//모터는 올리는 방향일때에...
|
||||
if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LDIR) == true)
|
||||
{
|
||||
//모터가 멈춰있을때에..
|
||||
if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LRUN) == false)
|
||||
{
|
||||
//자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음)
|
||||
////한쪽이 올라가 있는 상태에..
|
||||
//if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == true)
|
||||
//{
|
||||
// //모터는 올리는 방향일때에...
|
||||
// if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LDIR) == true)
|
||||
// {
|
||||
// //모터가 멈춰있을때에..
|
||||
// if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LRUN) == false)
|
||||
// {
|
||||
// //자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음)
|
||||
|
||||
//왼쪽이 올라가 있지 않은 경우
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false)
|
||||
PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == true)
|
||||
{
|
||||
//모터는 올리는 방향일때에...
|
||||
if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RDIR) == true)
|
||||
{
|
||||
//모터가 멈춰있을때에..
|
||||
if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RRUN) == false)
|
||||
{
|
||||
//자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음)
|
||||
// //왼쪽이 올라가 있지 않은 경우
|
||||
// if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false)
|
||||
// PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == true)
|
||||
//{
|
||||
// //모터는 올리는 방향일때에...
|
||||
// if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RDIR) == true)
|
||||
// {
|
||||
// //모터가 멈춰있을때에..
|
||||
// if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RRUN) == false)
|
||||
// {
|
||||
// //자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음)
|
||||
|
||||
//왼쪽이 올라가 있지 않은 경우
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false)
|
||||
PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up);
|
||||
}
|
||||
}
|
||||
}
|
||||
// //왼쪽이 올라가 있지 않은 경우
|
||||
// if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false)
|
||||
// PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
@@ -32,11 +33,7 @@ namespace Project
|
||||
PUB.Result.SetResultMessage(eResult.Hardware, eECode.AGVCONN, eNextStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
else if (PUB.PLC.IsValid == false)
|
||||
{
|
||||
PUB.Result.SetResultMessage(eResult.Hardware, eECode.PLCCONN, eNextStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//충전 상태가 OFF되어야 동작하게한다
|
||||
if (_SM_RUN_CHGOFF(isFirst, stepTime) == false)
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
@@ -25,12 +26,6 @@ namespace Project
|
||||
PUB.Result.SetResultMessage(eResult.Hardware, eECode.AGVCONN, eNextStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
else if (PUB.PLC.IsValid == false)
|
||||
{
|
||||
PUB.Result.SetResultMessage(eResult.Hardware, eECode.PLCCONN, eNextStep.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//충전 상태가 OFF되어야 동작하게한다
|
||||
if (_SM_RUN_CHGOFF(isFirst, stepTime) == false)
|
||||
@@ -111,7 +106,7 @@ namespace Project
|
||||
//커버를 자동으로 내려준다
|
||||
CoverControlTime = DateTime.Now;
|
||||
UpdateProgressStatus(stepTime.TotalSeconds, 5, Lang.안전커버를내립니다);
|
||||
PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down);
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.DN);
|
||||
VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = true;
|
||||
PUB.sm.UpdateRunStepSeq();
|
||||
return false;
|
||||
@@ -130,7 +125,7 @@ namespace Project
|
||||
|
||||
|
||||
//커버 내림이 완료될때까지 기다린다
|
||||
if (PUB.PLC.IsLimitDn() == true)
|
||||
if (true)
|
||||
{
|
||||
VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = false;
|
||||
PUB.Result.NextPos = ePosition.NONE;
|
||||
@@ -138,6 +133,8 @@ namespace Project
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
//경과시간이 10초가 지나면 5초마다 음성을 출력한다
|
||||
var tsCover = DateTime.Now - CoverControlTime;
|
||||
if (tsCover.TotalSeconds >= 7)
|
||||
@@ -179,7 +176,7 @@ namespace Project
|
||||
}
|
||||
else if (PUB.sm.RunStepSeq == idx++)
|
||||
{
|
||||
|
||||
|
||||
//IO업데이트 간격 전송
|
||||
UpdateProgressStatus(stepTime.TotalSeconds, 5, Lang.안전커버를올려주세요);
|
||||
PUB.Speak(Lang.안전커버를올리면상차가완료됩니다);
|
||||
@@ -219,47 +216,47 @@ namespace Project
|
||||
PUB.Speak(Lang.안전커버를올려주세요);
|
||||
CoverControlTime = DateTime.Now;
|
||||
|
||||
//한쪽이 올라가 있는 상태에..
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == true)
|
||||
{
|
||||
//모터는 올리는 방향일때에...
|
||||
if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LDIR) == true)
|
||||
{
|
||||
//모터가 멈춰있을때에..
|
||||
if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LRUN) == false)
|
||||
{
|
||||
//자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음)
|
||||
////한쪽이 올라가 있는 상태에..
|
||||
//if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == true)
|
||||
//{
|
||||
// //모터는 올리는 방향일때에...
|
||||
// if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LDIR) == true)
|
||||
// {
|
||||
// //모터가 멈춰있을때에..
|
||||
// if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LRUN) == false)
|
||||
// {
|
||||
// //자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음)
|
||||
|
||||
//왼쪽이 올라가 있지 않은 경우
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false)
|
||||
PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up);
|
||||
// //왼쪽이 올라가 있지 않은 경우
|
||||
// if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false)
|
||||
// PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up);
|
||||
|
||||
//오른쪽이 올라가 있지 않은 경우
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false)
|
||||
PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == true)
|
||||
{
|
||||
//모터는 올리는 방향일때에...
|
||||
if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RDIR) == true)
|
||||
{
|
||||
//모터가 멈춰있을때에..
|
||||
if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RRUN) == false)
|
||||
{
|
||||
//자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음)
|
||||
// //오른쪽이 올라가 있지 않은 경우
|
||||
// if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false)
|
||||
// PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == true)
|
||||
//{
|
||||
// //모터는 올리는 방향일때에...
|
||||
// if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RDIR) == true)
|
||||
// {
|
||||
// //모터가 멈춰있을때에..
|
||||
// if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RRUN) == false)
|
||||
// {
|
||||
// //자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음)
|
||||
|
||||
//왼쪽이 올라가 있지 않은 경우
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false)
|
||||
PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up);
|
||||
// //왼쪽이 올라가 있지 않은 경우
|
||||
// if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false)
|
||||
// PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up);
|
||||
|
||||
//오른쪽이 올라가 있지 않은 경우
|
||||
if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false)
|
||||
PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up);
|
||||
}
|
||||
}
|
||||
}
|
||||
// //오른쪽이 올라가 있지 않은 경우
|
||||
// if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false)
|
||||
// PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AR;
|
||||
using COMM;
|
||||
using static Project.StateMachine;
|
||||
|
||||
@@ -24,7 +25,7 @@ namespace Project
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true)
|
||||
{
|
||||
if (VAR.TIME.IsSet(eVarTime.ChargeStart) == false)
|
||||
VAR.TIME.Set(eVarTime.ChargeStart);
|
||||
VAR.TIME.Update(eVarTime.ChargeStart);
|
||||
|
||||
//충전중이라면 최대 충전 시간을 체크한다.
|
||||
var tsChargeRunTime = VAR.TIME.RUN(eVarTime.ChargeStart);
|
||||
@@ -53,7 +54,7 @@ namespace Project
|
||||
else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true)
|
||||
{
|
||||
if (VAR.TIME.IsSet(eVarTime.ChargeStart) == false)
|
||||
VAR.TIME.Set(eVarTime.ChargeStart);
|
||||
VAR.TIME.Update(eVarTime.ChargeStart);
|
||||
VAR.STR[eVarString.ChargeCheckMsg] = "수동 충전";
|
||||
}
|
||||
|
||||
@@ -133,7 +134,7 @@ namespace Project
|
||||
{
|
||||
PUB.log.Add($"대기상태에서는 정차");
|
||||
PUB.AGV.AGVMoveStop("대기상태에서는 정차");
|
||||
VAR.TIME.Set(eVarTime.IdleStopTime);
|
||||
VAR.TIME.Update(eVarTime.IdleStopTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using System.Diagnostics;
|
||||
using AR;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Project
|
||||
private void _STEP_CLOSING_START(eSMStep step)
|
||||
{
|
||||
PUB.bShutdown = true;
|
||||
if (PUB.PLC != null) PUB.PLC.Dispose();
|
||||
//if (PUB.PLC != null) PUB.PLC.Dispose();
|
||||
|
||||
PUB.AddEEDB("프로그램 종료");
|
||||
PUB.log.Add("Program Close");
|
||||
@@ -23,7 +23,7 @@ namespace Project
|
||||
PUB.logagv.Flush();
|
||||
PUB.logplc.Flush();
|
||||
PUB.logbms.Flush();
|
||||
PUB.logcal.Flush();
|
||||
PUB.logxbee.Flush();
|
||||
// PUB.sm.Stop();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user