1.更新
This commit is contained in:
parent
790d923aeb
commit
449a5216b2
|
@ -55,8 +55,8 @@ namespace SicRT.Modules
|
||||||
public bool CassetteFromAToB => SC.GetValue<bool>("System.Scheduler.CassetteFromAToB");
|
public bool CassetteFromAToB => SC.GetValue<bool>("System.Scheduler.CassetteFromAToB");
|
||||||
|
|
||||||
private bool _isCycleMode;
|
private bool _isCycleMode;
|
||||||
private int _cycleSetPoint = 0;
|
private int _cycleCount = 0;
|
||||||
private int _cycledCount = 0;
|
private int _cycledTime = 0;
|
||||||
private int _cycledWafer = 0;
|
private int _cycledWafer = 0;
|
||||||
private readonly string _curRecipeName = "";
|
private readonly string _curRecipeName = "";
|
||||||
private readonly string _curSequenceName = "";
|
private readonly string _curSequenceName = "";
|
||||||
|
@ -79,8 +79,8 @@ namespace SicRT.Modules
|
||||||
_dbCallback = new SchedulerDBCallback();
|
_dbCallback = new SchedulerDBCallback();
|
||||||
|
|
||||||
DATA.Subscribe("Scheduler.IsCycleMode", () => _isCycleMode);
|
DATA.Subscribe("Scheduler.IsCycleMode", () => _isCycleMode);
|
||||||
DATA.Subscribe("Scheduler.CycledCount", () => _cycledCount);
|
DATA.Subscribe("Scheduler.CycledCount", () => _cycledTime);
|
||||||
DATA.Subscribe("Scheduler.CycleSetPoint", () => _cycleSetPoint);
|
DATA.Subscribe("Scheduler.CycleSetPoint", () => _cycleCount);
|
||||||
DATA.Subscribe("Scheduler.RecipeName", () => _curRecipeName);
|
DATA.Subscribe("Scheduler.RecipeName", () => _curRecipeName);
|
||||||
DATA.Subscribe("Scheduler.SequenceName", () => _curSequenceName);
|
DATA.Subscribe("Scheduler.SequenceName", () => _curSequenceName);
|
||||||
|
|
||||||
|
@ -256,10 +256,10 @@ namespace SicRT.Modules
|
||||||
|
|
||||||
public void GetConfig()
|
public void GetConfig()
|
||||||
{
|
{
|
||||||
_cycledCount = 0;
|
_cycledTime = 0;
|
||||||
|
|
||||||
_isCycleMode = SC.GetValue<bool>("System.IsCycleMode");
|
_isCycleMode = SC.GetValue<bool>("System.IsCycleMode");
|
||||||
_cycleSetPoint = _isCycleMode ? SC.GetValue<int>("System.CycleCount") : 0;
|
_cycleCount = _isCycleMode ? SC.GetValue<int>("System.CycleCount") : 0;
|
||||||
|
|
||||||
|
|
||||||
_maxTrayCount = _lstPms.Count * 2;
|
_maxTrayCount = _lstPms.Count * 2;
|
||||||
|
@ -797,9 +797,9 @@ namespace SicRT.Modules
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_cycleSetPoint > 0)
|
if (_cycleCount > 0)
|
||||||
{
|
{
|
||||||
_cycleSetPoint = _cycledCount;
|
_cycleCount = _cycledTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1010,7 +1010,7 @@ namespace SicRT.Modules
|
||||||
{
|
{
|
||||||
GetConfig();
|
GetConfig();
|
||||||
_cycledWafer = 0;
|
_cycledWafer = 0;
|
||||||
_cycledCount = 0;
|
_cycledTime = 0;
|
||||||
|
|
||||||
bool hasPmOnline = false;
|
bool hasPmOnline = false;
|
||||||
|
|
||||||
|
@ -1232,24 +1232,27 @@ namespace SicRT.Modules
|
||||||
int unprocessed_cj = 0;
|
int unprocessed_cj = 0;
|
||||||
int aborted_cj = 0;
|
int aborted_cj = 0;
|
||||||
|
|
||||||
foreach (var pj in _lstProcessJobs)
|
if(!_isCycleMode)
|
||||||
{
|
{
|
||||||
if (pj.ControlJobName == cj.Name)
|
foreach (var pj in _lstProcessJobs)
|
||||||
{
|
{
|
||||||
int unprocessed = 0;
|
if (pj.ControlJobName == cj.Name)
|
||||||
int aborted = 0;
|
|
||||||
var wafers = WaferManager.Instance.GetWaferByProcessJob(pj.Name);
|
|
||||||
foreach (var waferInfo in wafers)
|
|
||||||
{
|
{
|
||||||
waferInfo.ProcessJob = null;
|
int unprocessed = 0;
|
||||||
waferInfo.NextSequenceStep = 0;
|
int aborted = 0;
|
||||||
if (waferInfo.ProcessState != WaferProcessStatus.Completed)
|
var wafers = WaferManager.Instance.GetWaferByProcessJob(pj.Name);
|
||||||
|
foreach (var waferInfo in wafers)
|
||||||
{
|
{
|
||||||
unprocessed++;
|
waferInfo.ProcessJob = null;
|
||||||
unprocessed_cj++;
|
waferInfo.NextSequenceStep = 0;
|
||||||
|
if (waferInfo.ProcessState != WaferProcessStatus.Completed)
|
||||||
|
{
|
||||||
|
unprocessed++;
|
||||||
|
unprocessed_cj++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
JobDataRecorder.EndPJ(pj.InnerId.ToString(), aborted, unprocessed);
|
||||||
}
|
}
|
||||||
JobDataRecorder.EndPJ(pj.InnerId.ToString(), aborted, unprocessed);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1266,46 +1269,28 @@ namespace SicRT.Modules
|
||||||
allControlJobComplete = allControlJobComplete && cj.State == EnumControlJobState.Completed;
|
allControlJobComplete = allControlJobComplete && cj.State == EnumControlJobState.Completed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_isCycleMode && _cycledCount < _cycleSetPoint)
|
if (allControlJobComplete && _isCycleMode)
|
||||||
{
|
{
|
||||||
int countPerCycle = 0;
|
_cycledTime++;
|
||||||
int countProcessed = 0;
|
|
||||||
foreach (var pj in _lstProcessJobs)
|
if (_cycledTime < _cycleCount)
|
||||||
{
|
{
|
||||||
foreach (var pjSlotWafer in pj.SlotWafers)
|
foreach (var cj in _lstControlJobs)
|
||||||
{
|
{
|
||||||
countPerCycle++;
|
cj.SetState(EnumControlJobState.Executing);
|
||||||
WaferInfoRt wafer = GetModule(pjSlotWafer.Item1).GetWaferInfo(pjSlotWafer.Item2);
|
|
||||||
if (!wafer.IsWaferEmpty && !GetModule(pjSlotWafer.Item1).CheckWaferNeedProcess(pjSlotWafer.Item2))
|
|
||||||
countProcessed++;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
_cycledWafer = _cycledCount * countPerCycle + countProcessed;
|
foreach (var pj in _lstProcessJobs)
|
||||||
//StatsDataManager.Instance.SetValue(StatsNameTotalRunningWafer, _totalWaferWhenStart + _cycledWafer);
|
|
||||||
|
|
||||||
if (allControlJobComplete)
|
|
||||||
{
|
|
||||||
_cycledCount++;
|
|
||||||
|
|
||||||
if (_cycledCount < _cycleSetPoint)
|
|
||||||
{
|
{
|
||||||
foreach (var cj in _lstControlJobs)
|
pj.SetState(EnumProcessJobState.Queued);
|
||||||
|
pj.InnerId = Guid.NewGuid();
|
||||||
|
foreach (var pjSlotWafer in pj.SlotWafers)
|
||||||
{
|
{
|
||||||
cj.SetState(EnumControlJobState.Executing);
|
WaferInfoRt wafer = GetModule(pjSlotWafer.Item1).GetWaferInfo(pjSlotWafer.Item2);
|
||||||
}
|
|
||||||
foreach (var pj in _lstProcessJobs)
|
|
||||||
{
|
|
||||||
pj.SetState(EnumProcessJobState.Queued);
|
|
||||||
pj.InnerId = Guid.NewGuid();
|
|
||||||
foreach (var pjSlotWafer in pj.SlotWafers)
|
|
||||||
{
|
|
||||||
WaferInfoRt wafer = GetModule(pjSlotWafer.Item1).GetWaferInfo(pjSlotWafer.Item2);
|
|
||||||
|
|
||||||
wafer.ProcessJob = null;
|
//wafer.ProcessJob = null;
|
||||||
wafer.NextSequenceStep = 0;
|
wafer.NextSequenceStep = 0;
|
||||||
wafer.ProcessState = WaferProcessStatus.Idle;
|
wafer.ProcessState = WaferProcessStatus.Idle;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue