1.整理StartJob
This commit is contained in:
parent
7895d96734
commit
69b4d03abb
|
@ -255,17 +255,6 @@ namespace SicRT.Modules
|
|||
}
|
||||
}
|
||||
|
||||
public void GetConfig()
|
||||
{
|
||||
_cycledTime = 0;
|
||||
|
||||
_isCycleMode = SC.GetValue<bool>("System.IsCycleMode");
|
||||
_cycleCount = _isCycleMode ? SC.GetValue<int>("System.CycleCount") : 0;
|
||||
|
||||
|
||||
_maxTrayCount = _lstPms.Count * 2;
|
||||
}
|
||||
|
||||
#region Job Management
|
||||
|
||||
public bool CreateJob(Dictionary<string, object> param)
|
||||
|
@ -714,7 +703,7 @@ namespace SicRT.Modules
|
|||
|
||||
internal void StartJob(string jobName)
|
||||
{
|
||||
GetConfig();
|
||||
_maxTrayCount = _lstPms.Count * 2;
|
||||
|
||||
ControlJobInfo cj = _controlJobList.Find(x => x.Name == jobName);
|
||||
if (cj == null)
|
||||
|
@ -723,9 +712,9 @@ namespace SicRT.Modules
|
|||
return;
|
||||
}
|
||||
|
||||
foreach (var needProcessWafer in cj.LotWafers)
|
||||
foreach (var wafer in cj.LotWafers)
|
||||
{
|
||||
if (CheckWaferNeedProcess(ModuleHelper.Converter(needProcessWafer.WaferOriginStation), needProcessWafer.WaferOriginSlot, ModuleName.PM1))
|
||||
if (CheckWaferNeedProcess(ModuleHelper.Converter(wafer.WaferOriginStation), wafer.WaferOriginSlot, ModuleName.PM1))
|
||||
{
|
||||
if (_pm1.IsError)
|
||||
{
|
||||
|
@ -733,13 +722,19 @@ namespace SicRT.Modules
|
|||
return;
|
||||
}
|
||||
|
||||
if (!_pm1.IsOnline)
|
||||
{
|
||||
EV.PostWarningLog("Scheduler", "can not start job, pm1 is not in online");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pm1.IsService)
|
||||
{
|
||||
EV.PostWarningLog("Scheduler", "can no tstart job, PM1 is Service Mode");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (CheckWaferNeedProcess(ModuleHelper.Converter(needProcessWafer.WaferOriginStation), needProcessWafer.WaferOriginSlot, ModuleName.PM2))
|
||||
else if (CheckWaferNeedProcess(ModuleHelper.Converter(wafer.WaferOriginStation), wafer.WaferOriginSlot, ModuleName.PM2))
|
||||
{
|
||||
if (_pm2.IsError)
|
||||
{
|
||||
|
@ -747,27 +742,29 @@ namespace SicRT.Modules
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!_pm2.IsOnline)
|
||||
{
|
||||
EV.PostWarningLog("Scheduler", "can not start job, pm2 is not in online");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pm2.IsService)
|
||||
{
|
||||
EV.PostWarningLog("Scheduler", "can no tstart job, PM2 is Service Mode");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//foreach (var cj in _lstControlJobs)
|
||||
if (cj.State == EnumControlJobState.WaitingForStart)
|
||||
{
|
||||
if (cj.State == EnumControlJobState.WaitingForStart)
|
||||
{
|
||||
cj.BeginTime = DateTime.Now;
|
||||
cj.LotInnerId = Guid.NewGuid();
|
||||
_dbCallback.LotCreated(cj);
|
||||
cj.BeginTime = DateTime.Now;
|
||||
cj.LotInnerId = Guid.NewGuid();
|
||||
_dbCallback.LotCreated(cj);
|
||||
|
||||
cj.SetState(EnumControlJobState.Executing);
|
||||
}
|
||||
cj.SetState(EnumControlJobState.Executing);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -778,23 +775,6 @@ namespace SicRT.Modules
|
|||
/// <returns></returns>
|
||||
public Result CheckAutoMode(params object[] objs)
|
||||
{
|
||||
bool hasPmOnline = false;
|
||||
|
||||
foreach (var schedulerPm in _lstPms)
|
||||
{
|
||||
if (schedulerPm.IsOnline && !schedulerPm.IsError)
|
||||
{
|
||||
hasPmOnline = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasPmOnline)
|
||||
{
|
||||
EV.PostWarningLog("Scheduler", "can not change to auto mode, at least one process chamber be online and no error");
|
||||
return Result.FAIL;
|
||||
}
|
||||
|
||||
if (!_tmRobot.IsOnline || _tmRobot.IsError)
|
||||
{
|
||||
EV.PostWarningLog("Scheduler", "can not change to auto mode, TM robot should be online and no error");
|
||||
|
|
Loading…
Reference in New Issue